Best fitting circle to points in 3D
$begingroup$
I have a set of n ≥ 3 points in 3D that are measurements of a possible circle. The measured points are "noisy" so best-fitting algorithms are involved. I'm programming in C# and have put together some algorithms to do my procedure to find the best fitting circle to the points.
My procedure is the following:
- Find the centroid C (x0, y0, z0) of the points.
- Find the best fitting plane for the points using SVD. I now have a normalvector N [a, b, c] and a point C, fully describing the plane P
- Orthogonal project all points to the plane
- Subtract C from all points, such that C becomes the new origin O for the points. I now have a plane that crosses origin.
- Translate the projected points into a 2D coordinate system that lies in the plane, using this algorithm.
- With the points now described in a 2D coordinate system, i can use Levenberg-Marquardt to find the best fitting cirlce. This gives me a circle center A (a, b) and a radius R
- The found circle center is described in the 2D coordinate system of the plane P
Now; my question:
How do I translate the found circle center A to the original 3D coordinate system?
I've tried to do A + C but this produces the following, which places the circle center in the centroid of the points:
circle 3d svd least-squares
$endgroup$
add a comment |
$begingroup$
I have a set of n ≥ 3 points in 3D that are measurements of a possible circle. The measured points are "noisy" so best-fitting algorithms are involved. I'm programming in C# and have put together some algorithms to do my procedure to find the best fitting circle to the points.
My procedure is the following:
- Find the centroid C (x0, y0, z0) of the points.
- Find the best fitting plane for the points using SVD. I now have a normalvector N [a, b, c] and a point C, fully describing the plane P
- Orthogonal project all points to the plane
- Subtract C from all points, such that C becomes the new origin O for the points. I now have a plane that crosses origin.
- Translate the projected points into a 2D coordinate system that lies in the plane, using this algorithm.
- With the points now described in a 2D coordinate system, i can use Levenberg-Marquardt to find the best fitting cirlce. This gives me a circle center A (a, b) and a radius R
- The found circle center is described in the 2D coordinate system of the plane P
Now; my question:
How do I translate the found circle center A to the original 3D coordinate system?
I've tried to do A + C but this produces the following, which places the circle center in the centroid of the points:
circle 3d svd least-squares
$endgroup$
1
$begingroup$
I agree with the process that you use. It is mainely the same as in paper : fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , pages 28-32 , applied to ellipse, parabola and hyperbola in 3D. Circle is a particular case. The main difference is that the final fitting is not carried out with a Levenberg-Marquardt algorithm. It uses a direct method (no itteration, no guessed initial values). In case of circle, the direct fitting is explained pages 11-13 in the paper : fr.scribd.com/doc/14819165/…
$endgroup$
– JJacquelin
Feb 23 '16 at 22:09
add a comment |
$begingroup$
I have a set of n ≥ 3 points in 3D that are measurements of a possible circle. The measured points are "noisy" so best-fitting algorithms are involved. I'm programming in C# and have put together some algorithms to do my procedure to find the best fitting circle to the points.
My procedure is the following:
- Find the centroid C (x0, y0, z0) of the points.
- Find the best fitting plane for the points using SVD. I now have a normalvector N [a, b, c] and a point C, fully describing the plane P
- Orthogonal project all points to the plane
- Subtract C from all points, such that C becomes the new origin O for the points. I now have a plane that crosses origin.
- Translate the projected points into a 2D coordinate system that lies in the plane, using this algorithm.
- With the points now described in a 2D coordinate system, i can use Levenberg-Marquardt to find the best fitting cirlce. This gives me a circle center A (a, b) and a radius R
- The found circle center is described in the 2D coordinate system of the plane P
Now; my question:
How do I translate the found circle center A to the original 3D coordinate system?
I've tried to do A + C but this produces the following, which places the circle center in the centroid of the points:
circle 3d svd least-squares
$endgroup$
I have a set of n ≥ 3 points in 3D that are measurements of a possible circle. The measured points are "noisy" so best-fitting algorithms are involved. I'm programming in C# and have put together some algorithms to do my procedure to find the best fitting circle to the points.
My procedure is the following:
- Find the centroid C (x0, y0, z0) of the points.
- Find the best fitting plane for the points using SVD. I now have a normalvector N [a, b, c] and a point C, fully describing the plane P
- Orthogonal project all points to the plane
- Subtract C from all points, such that C becomes the new origin O for the points. I now have a plane that crosses origin.
- Translate the projected points into a 2D coordinate system that lies in the plane, using this algorithm.
- With the points now described in a 2D coordinate system, i can use Levenberg-Marquardt to find the best fitting cirlce. This gives me a circle center A (a, b) and a radius R
- The found circle center is described in the 2D coordinate system of the plane P
Now; my question:
How do I translate the found circle center A to the original 3D coordinate system?
I've tried to do A + C but this produces the following, which places the circle center in the centroid of the points:
circle 3d svd least-squares
circle 3d svd least-squares
edited Apr 13 '17 at 12:20
Community♦
1
1
asked Nov 28 '14 at 12:36
borgerodsjoborgerodsjo
64
64
1
$begingroup$
I agree with the process that you use. It is mainely the same as in paper : fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , pages 28-32 , applied to ellipse, parabola and hyperbola in 3D. Circle is a particular case. The main difference is that the final fitting is not carried out with a Levenberg-Marquardt algorithm. It uses a direct method (no itteration, no guessed initial values). In case of circle, the direct fitting is explained pages 11-13 in the paper : fr.scribd.com/doc/14819165/…
$endgroup$
– JJacquelin
Feb 23 '16 at 22:09
add a comment |
1
$begingroup$
I agree with the process that you use. It is mainely the same as in paper : fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , pages 28-32 , applied to ellipse, parabola and hyperbola in 3D. Circle is a particular case. The main difference is that the final fitting is not carried out with a Levenberg-Marquardt algorithm. It uses a direct method (no itteration, no guessed initial values). In case of circle, the direct fitting is explained pages 11-13 in the paper : fr.scribd.com/doc/14819165/…
$endgroup$
– JJacquelin
Feb 23 '16 at 22:09
1
1
$begingroup$
I agree with the process that you use. It is mainely the same as in paper : fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , pages 28-32 , applied to ellipse, parabola and hyperbola in 3D. Circle is a particular case. The main difference is that the final fitting is not carried out with a Levenberg-Marquardt algorithm. It uses a direct method (no itteration, no guessed initial values). In case of circle, the direct fitting is explained pages 11-13 in the paper : fr.scribd.com/doc/14819165/…
$endgroup$
– JJacquelin
Feb 23 '16 at 22:09
$begingroup$
I agree with the process that you use. It is mainely the same as in paper : fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , pages 28-32 , applied to ellipse, parabola and hyperbola in 3D. Circle is a particular case. The main difference is that the final fitting is not carried out with a Levenberg-Marquardt algorithm. It uses a direct method (no itteration, no guessed initial values). In case of circle, the direct fitting is explained pages 11-13 in the paper : fr.scribd.com/doc/14819165/…
$endgroup$
– JJacquelin
Feb 23 '16 at 22:09
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Found the answer my self.
Using notation from this question: 2D Coordinates of Projection of 3D Vector onto 2D Plane
Find the matrix M that converts coordinates from the X, Y, Z-system to the coordinate system of the plane: N, e'1, e'2. This is a 3 x 3 matrix with e'1 as row 1, e'2 as row 2 and N as row 3. By taking the inverse (transpose) of this matrix you can convert coordinates the other way around.
$endgroup$
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1042293%2fbest-fitting-circle-to-points-in-3d%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Found the answer my self.
Using notation from this question: 2D Coordinates of Projection of 3D Vector onto 2D Plane
Find the matrix M that converts coordinates from the X, Y, Z-system to the coordinate system of the plane: N, e'1, e'2. This is a 3 x 3 matrix with e'1 as row 1, e'2 as row 2 and N as row 3. By taking the inverse (transpose) of this matrix you can convert coordinates the other way around.
$endgroup$
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
add a comment |
$begingroup$
Found the answer my self.
Using notation from this question: 2D Coordinates of Projection of 3D Vector onto 2D Plane
Find the matrix M that converts coordinates from the X, Y, Z-system to the coordinate system of the plane: N, e'1, e'2. This is a 3 x 3 matrix with e'1 as row 1, e'2 as row 2 and N as row 3. By taking the inverse (transpose) of this matrix you can convert coordinates the other way around.
$endgroup$
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
add a comment |
$begingroup$
Found the answer my self.
Using notation from this question: 2D Coordinates of Projection of 3D Vector onto 2D Plane
Find the matrix M that converts coordinates from the X, Y, Z-system to the coordinate system of the plane: N, e'1, e'2. This is a 3 x 3 matrix with e'1 as row 1, e'2 as row 2 and N as row 3. By taking the inverse (transpose) of this matrix you can convert coordinates the other way around.
$endgroup$
Found the answer my self.
Using notation from this question: 2D Coordinates of Projection of 3D Vector onto 2D Plane
Find the matrix M that converts coordinates from the X, Y, Z-system to the coordinate system of the plane: N, e'1, e'2. This is a 3 x 3 matrix with e'1 as row 1, e'2 as row 2 and N as row 3. By taking the inverse (transpose) of this matrix you can convert coordinates the other way around.
edited Apr 13 '17 at 12:19
Community♦
1
1
answered Feb 17 '15 at 14:08
borgerodsjoborgerodsjo
64
64
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
add a comment |
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
$begingroup$
Here's a MathJax tutorial :)
$endgroup$
– Shaun
Feb 17 '15 at 14:27
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f1042293%2fbest-fitting-circle-to-points-in-3d%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
I agree with the process that you use. It is mainely the same as in paper : fr.scribd.com/doc/31477970/Regressions-et-trajectoires-3D , pages 28-32 , applied to ellipse, parabola and hyperbola in 3D. Circle is a particular case. The main difference is that the final fitting is not carried out with a Levenberg-Marquardt algorithm. It uses a direct method (no itteration, no guessed initial values). In case of circle, the direct fitting is explained pages 11-13 in the paper : fr.scribd.com/doc/14819165/…
$endgroup$
– JJacquelin
Feb 23 '16 at 22:09