Ask Your Question

2x3 Transformation Matrix

asked 2013-08-20 03:36:56 -0600

pkohout gravatar image


i would like to know how to read the information of a 2x3 Transformation Matrix. If i am right, it contains the rotation, the translation x/y and the scale x/y. But what is the sixth value used for ?

I need to read the rotation from the matrix in RAD or DEG.

I hope someone can explain me the 2x3 Transformation Matrix a little more detailed.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2013-08-20 07:01:15 -0600

Michael Burdinov gravatar image

Sixth value is for shear. Affine transformation (the most general transformation that can be expressed by 2x3 matrix) has rotation, shear, scale x/y, and translation x/y. See this for more details.

Now about your other question. Your assumption is not entirely correct. Rotation, translation, scale or shear are not stored in Transformation Matrix. Lets assume you have 2x3 transformation matrix A.

A = ( (a(0,0),a(0,1),a(0,2)), (a(1,0),a(1,1),a(1,2)) )

Now you want to apply A on point (x,y). Resulting point is this one:

x_new = a(0,0)*x + a(0,1)*y + a(0,2)
y_new = a(1,0)*x + a(1,1)*y + a(1,2)

As you can see none of values of A is actually rotation or scale.

Also it is important to remember that 2x3 matrix don't have to be affine. It can be some simpler transformation as well (rigid, scale, similarity, and so on). For example if a(0,0) = a(1,1) = 1 and a(0,1) = a(1,0) = 0, than your transformation is just translation.

Here I saw very good answer about how to calculate rotation, scale, and translation from transformation matrix. I don't remember how to extract shear, but if you don't have it this will be enough.

edit flag offensive delete link more

answered 2013-08-20 04:33:59 -0600

engine gravatar image

the transformation matrix contain the relationship between the x' and y' in the image coordinate system and the real world coordinate system which is 3 dimensional !

edit flag offensive delete link more


how to get an affine transform based on 6 co-ordinate points?

coolece gravatar imagecoolece ( 2015-11-18 02:48:11 -0600 )edit

Question Tools


Asked: 2013-08-20 03:36:56 -0600

Seen: 6,634 times

Last updated: Aug 20 '13