Find rigid transformation with noisy data, simple approach












1












$begingroup$


I have two set of points $left{ a_j right}_{j=1...n},left{ b_j right}_{j=1...n}$, you can assume $a_j$ are noisy. I want to find a rotation matrix $R$ and a translation vector $T$ such that



$$
epsilon(R,T) = frac{1}{2n} sum_{j=1}^{n} lVert Ra_j + T - b_j rVert_2^2
$$



is minimized. I'm not sure what is the simplest approach, but here is what I was thinking, which I think make sense. I set $R_0 = I$ and $T_0 = 0$ (or maybe something more sensibile, exploiting also the content of this question per each iteration I alternate between minimizing w.r.t. $T$ (which is essentially a mean to be computed) and for finding $R$ at the current iteration I use the method linked in the wiki of the linked question (namely this).



Does this approach make sense? I don't like the "alternate" bit, but I can't see any other way (I can parametrize using quaternions, but I doubt it would be any simpler).










share|cite|improve this question









$endgroup$












  • $begingroup$
    Are there outliers ?
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:54










  • $begingroup$
    You mean values with no correspondences?
    $endgroup$
    – user8469759
    Jan 22 at 17:57










  • $begingroup$
    No, outliers are erratic points that do not belong to the true distribution.
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:58










  • $begingroup$
    No, no outliers.
    $endgroup$
    – user8469759
    Jan 22 at 17:58
















1












$begingroup$


I have two set of points $left{ a_j right}_{j=1...n},left{ b_j right}_{j=1...n}$, you can assume $a_j$ are noisy. I want to find a rotation matrix $R$ and a translation vector $T$ such that



$$
epsilon(R,T) = frac{1}{2n} sum_{j=1}^{n} lVert Ra_j + T - b_j rVert_2^2
$$



is minimized. I'm not sure what is the simplest approach, but here is what I was thinking, which I think make sense. I set $R_0 = I$ and $T_0 = 0$ (or maybe something more sensibile, exploiting also the content of this question per each iteration I alternate between minimizing w.r.t. $T$ (which is essentially a mean to be computed) and for finding $R$ at the current iteration I use the method linked in the wiki of the linked question (namely this).



Does this approach make sense? I don't like the "alternate" bit, but I can't see any other way (I can parametrize using quaternions, but I doubt it would be any simpler).










share|cite|improve this question









$endgroup$












  • $begingroup$
    Are there outliers ?
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:54










  • $begingroup$
    You mean values with no correspondences?
    $endgroup$
    – user8469759
    Jan 22 at 17:57










  • $begingroup$
    No, outliers are erratic points that do not belong to the true distribution.
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:58










  • $begingroup$
    No, no outliers.
    $endgroup$
    – user8469759
    Jan 22 at 17:58














1












1








1





$begingroup$


I have two set of points $left{ a_j right}_{j=1...n},left{ b_j right}_{j=1...n}$, you can assume $a_j$ are noisy. I want to find a rotation matrix $R$ and a translation vector $T$ such that



$$
epsilon(R,T) = frac{1}{2n} sum_{j=1}^{n} lVert Ra_j + T - b_j rVert_2^2
$$



is minimized. I'm not sure what is the simplest approach, but here is what I was thinking, which I think make sense. I set $R_0 = I$ and $T_0 = 0$ (or maybe something more sensibile, exploiting also the content of this question per each iteration I alternate between minimizing w.r.t. $T$ (which is essentially a mean to be computed) and for finding $R$ at the current iteration I use the method linked in the wiki of the linked question (namely this).



Does this approach make sense? I don't like the "alternate" bit, but I can't see any other way (I can parametrize using quaternions, but I doubt it would be any simpler).










share|cite|improve this question









$endgroup$




I have two set of points $left{ a_j right}_{j=1...n},left{ b_j right}_{j=1...n}$, you can assume $a_j$ are noisy. I want to find a rotation matrix $R$ and a translation vector $T$ such that



$$
epsilon(R,T) = frac{1}{2n} sum_{j=1}^{n} lVert Ra_j + T - b_j rVert_2^2
$$



is minimized. I'm not sure what is the simplest approach, but here is what I was thinking, which I think make sense. I set $R_0 = I$ and $T_0 = 0$ (or maybe something more sensibile, exploiting also the content of this question per each iteration I alternate between minimizing w.r.t. $T$ (which is essentially a mean to be computed) and for finding $R$ at the current iteration I use the method linked in the wiki of the linked question (namely this).



Does this approach make sense? I don't like the "alternate" bit, but I can't see any other way (I can parametrize using quaternions, but I doubt it would be any simpler).







calculus linear-algebra optimization






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Jan 22 at 17:50









user8469759user8469759

1,5541618




1,5541618












  • $begingroup$
    Are there outliers ?
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:54










  • $begingroup$
    You mean values with no correspondences?
    $endgroup$
    – user8469759
    Jan 22 at 17:57










  • $begingroup$
    No, outliers are erratic points that do not belong to the true distribution.
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:58










  • $begingroup$
    No, no outliers.
    $endgroup$
    – user8469759
    Jan 22 at 17:58


















  • $begingroup$
    Are there outliers ?
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:54










  • $begingroup$
    You mean values with no correspondences?
    $endgroup$
    – user8469759
    Jan 22 at 17:57










  • $begingroup$
    No, outliers are erratic points that do not belong to the true distribution.
    $endgroup$
    – Yves Daoust
    Jan 22 at 17:58










  • $begingroup$
    No, no outliers.
    $endgroup$
    – user8469759
    Jan 22 at 17:58
















$begingroup$
Are there outliers ?
$endgroup$
– Yves Daoust
Jan 22 at 17:54




$begingroup$
Are there outliers ?
$endgroup$
– Yves Daoust
Jan 22 at 17:54












$begingroup$
You mean values with no correspondences?
$endgroup$
– user8469759
Jan 22 at 17:57




$begingroup$
You mean values with no correspondences?
$endgroup$
– user8469759
Jan 22 at 17:57












$begingroup$
No, outliers are erratic points that do not belong to the true distribution.
$endgroup$
– Yves Daoust
Jan 22 at 17:58




$begingroup$
No, outliers are erratic points that do not belong to the true distribution.
$endgroup$
– Yves Daoust
Jan 22 at 17:58












$begingroup$
No, no outliers.
$endgroup$
– user8469759
Jan 22 at 17:58




$begingroup$
No, no outliers.
$endgroup$
– user8469759
Jan 22 at 17:58










1 Answer
1






active

oldest

votes


















0












$begingroup$

Hint:



Solving the least-squares equation shows you that the optimal translation maps one centroid to the other and you can easily find it. Then the problem reduces to finding the rotation matrix after you have centered the two point clouds.



$$
epsilon(R) = frac{1}{2n} sum_{j=1}^{n} lVert Rtilde a_j - tilde b_j rVert_2^2
$$



This problem is not so easy, as the matrix $R$ is constrained to be orthogonal. If you have enough points, you can "cheat" by ignoring the constraint, solving the linear system, and ajusting orthogonality by Gram-Schmidt.



The exact solution requires SVD. More here: https://scicomp.stackexchange.com/q/10584/17391






share|cite|improve this answer











$endgroup$













  • $begingroup$
    How do I find $R$? Shall I use at that point the method I've pointed out?
    $endgroup$
    – user8469759
    Jan 22 at 18:00












  • $begingroup$
    Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
    $endgroup$
    – user8469759
    Jan 22 at 18:05











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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3083463%2ffind-rigid-transformation-with-noisy-data-simple-approach%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









0












$begingroup$

Hint:



Solving the least-squares equation shows you that the optimal translation maps one centroid to the other and you can easily find it. Then the problem reduces to finding the rotation matrix after you have centered the two point clouds.



$$
epsilon(R) = frac{1}{2n} sum_{j=1}^{n} lVert Rtilde a_j - tilde b_j rVert_2^2
$$



This problem is not so easy, as the matrix $R$ is constrained to be orthogonal. If you have enough points, you can "cheat" by ignoring the constraint, solving the linear system, and ajusting orthogonality by Gram-Schmidt.



The exact solution requires SVD. More here: https://scicomp.stackexchange.com/q/10584/17391






share|cite|improve this answer











$endgroup$













  • $begingroup$
    How do I find $R$? Shall I use at that point the method I've pointed out?
    $endgroup$
    – user8469759
    Jan 22 at 18:00












  • $begingroup$
    Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
    $endgroup$
    – user8469759
    Jan 22 at 18:05
















0












$begingroup$

Hint:



Solving the least-squares equation shows you that the optimal translation maps one centroid to the other and you can easily find it. Then the problem reduces to finding the rotation matrix after you have centered the two point clouds.



$$
epsilon(R) = frac{1}{2n} sum_{j=1}^{n} lVert Rtilde a_j - tilde b_j rVert_2^2
$$



This problem is not so easy, as the matrix $R$ is constrained to be orthogonal. If you have enough points, you can "cheat" by ignoring the constraint, solving the linear system, and ajusting orthogonality by Gram-Schmidt.



The exact solution requires SVD. More here: https://scicomp.stackexchange.com/q/10584/17391






share|cite|improve this answer











$endgroup$













  • $begingroup$
    How do I find $R$? Shall I use at that point the method I've pointed out?
    $endgroup$
    – user8469759
    Jan 22 at 18:00












  • $begingroup$
    Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
    $endgroup$
    – user8469759
    Jan 22 at 18:05














0












0








0





$begingroup$

Hint:



Solving the least-squares equation shows you that the optimal translation maps one centroid to the other and you can easily find it. Then the problem reduces to finding the rotation matrix after you have centered the two point clouds.



$$
epsilon(R) = frac{1}{2n} sum_{j=1}^{n} lVert Rtilde a_j - tilde b_j rVert_2^2
$$



This problem is not so easy, as the matrix $R$ is constrained to be orthogonal. If you have enough points, you can "cheat" by ignoring the constraint, solving the linear system, and ajusting orthogonality by Gram-Schmidt.



The exact solution requires SVD. More here: https://scicomp.stackexchange.com/q/10584/17391






share|cite|improve this answer











$endgroup$



Hint:



Solving the least-squares equation shows you that the optimal translation maps one centroid to the other and you can easily find it. Then the problem reduces to finding the rotation matrix after you have centered the two point clouds.



$$
epsilon(R) = frac{1}{2n} sum_{j=1}^{n} lVert Rtilde a_j - tilde b_j rVert_2^2
$$



This problem is not so easy, as the matrix $R$ is constrained to be orthogonal. If you have enough points, you can "cheat" by ignoring the constraint, solving the linear system, and ajusting orthogonality by Gram-Schmidt.



The exact solution requires SVD. More here: https://scicomp.stackexchange.com/q/10584/17391







share|cite|improve this answer














share|cite|improve this answer



share|cite|improve this answer








edited Jan 22 at 18:03

























answered Jan 22 at 17:58









Yves DaoustYves Daoust

130k676227




130k676227












  • $begingroup$
    How do I find $R$? Shall I use at that point the method I've pointed out?
    $endgroup$
    – user8469759
    Jan 22 at 18:00












  • $begingroup$
    Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
    $endgroup$
    – user8469759
    Jan 22 at 18:05


















  • $begingroup$
    How do I find $R$? Shall I use at that point the method I've pointed out?
    $endgroup$
    – user8469759
    Jan 22 at 18:00












  • $begingroup$
    Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
    $endgroup$
    – user8469759
    Jan 22 at 18:05
















$begingroup$
How do I find $R$? Shall I use at that point the method I've pointed out?
$endgroup$
– user8469759
Jan 22 at 18:00






$begingroup$
How do I find $R$? Shall I use at that point the method I've pointed out?
$endgroup$
– user8469759
Jan 22 at 18:00














$begingroup$
Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
$endgroup$
– user8469759
Jan 22 at 18:05




$begingroup$
Isn't the "SVD" covered in the "Orthogonal Procrustes" problem, which is what I've linked?
$endgroup$
– user8469759
Jan 22 at 18:05


















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3083463%2ffind-rigid-transformation-with-noisy-data-simple-approach%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

How to fix TextFormField cause rebuild widget in Flutter

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith