Log in or register to post comments

ImageTargets: How do the Matrices work?

January 11, 2012 - 10:30pm #1

I'm trying to decipher how the matrices work with respect to rotations and translations and I'm totally confused.

For example, translation requires 3 inputs, which I assume are the x y and z coordinates.

In sampleutils, the actual source code says that only 4 of the elements change but they take the information from 3 other elements?

I guess what I'm trying to ask is how do the matrices work, why are there 16 elements, etc.

Re: ImageTargets: How do the Matrices work?

January 13, 2012 - 2:53am #2

The short answer is that it uses a "homogeneous" co-ordinate system, which adds w to the usual x,y,z. Homogeneous vector (x,y,z,w) is equivalent to non-homogenous (x/w, y/w, z/w). If w=1 (and always seems to be in pose matrices) then (x,y,z,1) = (x,y,z). Homogenous co-ordinates can cope with "directions to infinity" where w=0 and are probably good for other things too for all I know.

For getting a translation and rotation from the QCAR pose you could take a look at http://ar.qualcomm.at/node/2001377, hope it helps. Also I have found that pose matrices always have scale=1 in all three directions.

Log in or register to post comments