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?
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.