What do the elements of the affine3d 4x4 matrix mean?

1 次查看(过去 30 天)
I am trying to use affine3d objects in the Image Processing Toolbox, but I have a question that cannot be answered by the help function or the website. When performing an image volume registration using imregtform.m, the result is an affine3d object that contains a 4x4 matrix. Can you tell me exactly what each element of the matrix means? I've been able to decipher that row 4, column 1 is the shift in the x-direction, row 4, column 2 is the shift in the y-direction, and row 4, column 3 is the shift in the z-direction. The upper left 3x3 matrix contains information regarding rotations, but it's unclear to me how to extract the rotation angles.
Being able to extract the rotation angles from an affine3d object would be very useful for examining registrations of 3D image volumes.
Thank you.

回答(1 个)

Matt J
Matt J 2016-6-1
编辑:Matt J 2016-6-1
If your affine transform is a rigid transform representable as y=R*x+t, then the matrix you are looking at is
T=[R,t;0 0 0 1].';
So, doing R=T(1:3,1:3).' will recover the rotational part, R, from T. As for how to obtain rotation angles from R, that decomposition is not unique. You can read about various choice here.
  2 个评论
David Soltysik
David Soltysik 2016-6-1
Thanks for the reference to the Euler angles. It looks like it will be non-trivial to determine the rotation angles.
Matt J
Matt J 2016-6-1
There are decomposition tools on the file Exchange which might save you some work.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by