1

I'm using Qualcomm's AR SDK to track an object. I have the following functions available:

https://ar.qualcomm.at/qdevnet/api (specifically look at "Namespace List->QCAR::Tool").

I can get the tracked item's modelview matrix by using the convertPose2GLMatrix (const Matrix34F &pose) function, as I get a pose matrix for each tracked item.

My goal - to determine the marker's location in "the real world". You can assume my camera will be stationary.

I have read numerous articles online, and my general understanding is this: I need to pick a modelview matrix from where I choose the axis' 0,0,0 point to be (i.e. - copy the matrix I get for that point). I then need to transpose that matrix. Then, each model view matrix I extract should be multiplied by that matrix and then by an (x,y,z,1) vector, to obtain the coordinates (ignoring the 4th item).

Am I correct? Is this the way to go? And if not - what is?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Tom Teman
  • 1,975
  • 3
  • 28
  • 43

1 Answers1

1

I like to think of ortho matrices as moving from one coordinate space to another, so what you suggest is correct, yet I would do it the other way around:

1.) Use a reference coordinate system S relative to your camera (i.e. just one of your matrices determined by the pose estimation) 2.) For each pose estimation T calculate the following:

W = S * T^-1 = S * transpose(T)

3.) From matrix W pick the 4 column, as your world position.

Christopher Oezbek
  • 23,994
  • 6
  • 61
  • 85
  • Hi Christoper, unfortunately I couldn't fit my follow up question in a comment, so I wrote my follow up question in an "answer" below – Tom Teman Apr 20 '12 at 13:40
  • Ok, it seems my multiplication function has an error. I'll fix it and report the results :-) – Tom Teman Apr 20 '12 at 14:00
  • Thank you, I fixed the matrix multiplication method, and I think it works ok now. the last row (not column) gives me the world coordinates. Marked answer as accepted. – Tom Teman Apr 20 '12 at 20:36