How can I calculate both translation and rotation (with respect to a center of motion) y=R*x+t with R is rotation matrix and t is translation vector from a dedicated marker. I have the time-series (x,y,z) coordinates of three rigid markers connected to the object?
Thanks in advance for advices!! Andy

 채택된 답변

Matt J
Matt J 2015년 1월 3일
편집: Matt J 2015년 1월 3일

1 개 추천

You can do it using my ABSOR tool ( Download ). So, if you have a matrix of 3 points whose coordinates are known
A=[xa1,ya1,za1;xa2,ya2,za2;xa3,ya3,za3].'
and some target points after rototraslation of A,
B=[xb1,yb1,zb1;xb2,yb2,zb2;xb3,yb3,zb3].'
then you can find the rotation/traslation matching A to B with
params=absor(A,B);
R=params.R;
t=params.t;

댓글 수: 6

Andreas
Andreas 2015년 1월 3일
편집: Andreas 2015년 1월 3일
Thanks very much for your answer. Actually, I don't need scaling, the markers are connected to a rigid body. I use this in MRI, where I want to move an imaging slab according to the head motion detected by the marker. I think I have to take the center of rotation into consideration or is this automatically done by your code?
Matt J
Matt J 2015년 1월 4일
편집: Matt J 2015년 1월 4일
I think I have to take the center of rotation into consideration or is this automatically done by your code?
I assume, since you accepted the answer, that you got it to do what you want?
Andreas
Andreas 2015년 1월 4일
Not 100% yet. Is the originate coordinate system preserved? I plotted the translation vector of a 3 marker combination with your code (cumulative) versus the translation of the center of mass (x,y,z spatial coordinates, CMS calculated from same marker data as your code). There is a difference:
Not sure what "preservation" means here. You said you had x,y data related by the equation
y=R*x+t
The code finds the R and t that best fits this equation.
Andreas
Andreas 2015년 1월 5일
Yes, I have the 3D coordinates von 3 markers at two time-steps x,y and I want to find R and t. The (x,y,z) coordinates is a physical coordinate system (in MRI the z-Axis goes along the bore of the scanner, y is up-down and x is left-right). The question is if R and t are always in this system and how can I calculate from R and t back translation and rotation in the physical coordinate system? Many thanks!
Matt J
Matt J 2015년 1월 5일
편집: Matt J 2015년 1월 6일
The discussion is getting confusing because you are using the notation x,y for two different things, sometimes a "time-step" and sometimes as 3D cartesian coordinates.
But here is the bottom line, I think. You have an initial set of position vectors pos1 and a final set pos2 arrived at after rotation/translation. Here, pos1 and pos2 as 3xN matrices whos column vectors are corresponding points before and after the rototranslation. Both pos1 and pos2 are measured in the same coordinate system and satisfy
pos2(:,i)=R*pos1(:,i) + t (Eq 1)
where R is a rotation matrix and t is a translation vector. So the R and t that the code gives you will correspond to whatever coordinate system pos1 and pos2 are measured in.
how can I calculate from R and t back translation and rotation in the physical coordinate system?
If pos1 and pos2 are measured in the"physical coordinate system", as you say then R and t are the rotation/translation in that system. R is a rotation about some axis through the origin of that system.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2015년 1월 3일

편집:

2015년 1월 6일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by