Skip to content
Snippets Groups Projects
Commit 97b42aa9 authored by Jean-Yves TINEVEZ's avatar Jean-Yves TINEVEZ
Browse files

Add eccentricity descriptor.

parent 18734fcf
No related branches found
No related tags found
1 merge request!9Rework the whole code for the upcoming publication.
......@@ -10,6 +10,7 @@ classdef epicell
perimeter
euler_angles
ellipse_fit
eccentricity
uncorrected_area
uncorrected_perimeter
id
......@@ -43,7 +44,13 @@ classdef epicell
% Morphological descriptors on non-downsampled boundary.
p = epicell.centered_points( boundary );
obj.euler_angles = epicell.fit_plane( p );
obj.ellipse_fit = epicell.fit_ellipse_3d( boundary, obj.euler_angles );
obj.ellipse_fit = epicell.fit_ellipse_3d( boundary, obj.euler_angles );
% Derived morphological descriptors.
a = obj.ellipse_fit( 4 );
b = obj.ellipse_fit( 5 );
obj.eccentricity = sqrt( 1 - ( b/a) * (b/a) );
end
function h = plot_patch_2d( obj, val )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment