Commit 97b42aa9 authored by Jean-Yves TINEVEZ's avatar Jean-Yves TINEVEZ
Browse files

Add eccentricity descriptor.

parent 18734fcf
...@@ -10,6 +10,7 @@ classdef epicell ...@@ -10,6 +10,7 @@ classdef epicell
perimeter perimeter
euler_angles euler_angles
ellipse_fit ellipse_fit
eccentricity
uncorrected_area uncorrected_area
uncorrected_perimeter uncorrected_perimeter
id id
...@@ -43,7 +44,13 @@ classdef epicell ...@@ -43,7 +44,13 @@ classdef epicell
% Morphological descriptors on non-downsampled boundary. % Morphological descriptors on non-downsampled boundary.
p = epicell.centered_points( boundary ); p = epicell.centered_points( boundary );
obj.euler_angles = epicell.fit_plane( p ); 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 end
function h = plot_patch_2d( obj, val ) function h = plot_patch_2d( obj, val )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment