[Insight-users] Transformation components from affine matrix

Hari harihar.n at gmail.com
Tue Jun 3 11:56:58 EDT 2008


Hi all,

  Is there a way to get the different components (rotation, scaling and
shear) from a 2D affine matrix.
I have a method for getting the rotation and scaling but am not sure how to
get the shear. The method I am using
to get the rotation and scaling is:

Let A be the affine matrix.

USV' = svd(A);
R = UV';

Scale X  = S[0,0]
Scale Y = S[1,1]
Angle = asin(R[1,0])

Is this the right way to do it ? Also I would appreciate if someone can
point me to how to get the shear factors.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080603/b7108702/attachment.htm>


More information about the Insight-users mailing list