Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IAH public
DeProj
Commits
46eaef92
Commit
46eaef92
authored
Jul 04, 2020
by
Jean-Yves TINEVEZ
Browse files
Also center points before fitting the 2D ellipse.
parent
de5fe857
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/fit_ellipse_2d.m
View file @
46eaef92
...
...
@@ -4,6 +4,9 @@ function [ f, Q ] = fit_ellipse_2d( p, method )
if
nargin
<
2
method
=
'direct'
;
end
c
=
mean
(
p
);
p
=
p
-
repmat
(
c
,
size
(
p
,
1
),
1
);
switch
(
lower
(
method
)
)
...
...
@@ -14,6 +17,8 @@ function [ f, Q ] = fit_ellipse_2d( p, method )
end
f
=
quadratic_to_cartesian2
(
Q
);
f
(
1
)
=
f
(
1
)
+
c
(
1
);
f
(
2
)
=
f
(
2
)
+
c
(
2
);
%% Subfunctions
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment