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

Don't forget to center points before fitting plane.

parent 9ba34e11
...@@ -138,6 +138,8 @@ classdef epicell ...@@ -138,6 +138,8 @@ classdef epicell
end end
function E = fit_plane( p ) function E = fit_plane( p )
c = mean( p );
p = p - repmat( c, size( p, 1 ), 1 );
% Fit a plane to these points. % Fit a plane to these points.
[ ~, ~, v ] = svd( p ); [ ~, ~, v ] = svd( p );
E = rot2eulerZXZ( v ); E = rot2eulerZXZ( v );
......
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