Hi Maurizio
You have got that matrix applying arGetTransMat right?
You should invert it... try it.. (see below)
void getPos( double target_trans[3][4]) {
double cam_trans[3][4];
if ( arUtilMatInv(target_trans, cam_trans) < 0 )
return;
posX = cam_trans[0][3];
posY = cam_trans[1][3];
posZ = cam_trans[2][3];
// ...... you can handle cam_trans here....
}
===================================================
Hello everybody,
I'm using ARToolKit under Windows...
I would like to get the camera position with respect to the marker...
I know that the gObjectData[i].trans[][] is a matrix made like that:
_
a b c d |
e f g h | > 3X1: these are the translation components
i l m n _|
|_________|
| |
\/
3X3 :These are the rotation components
and it gives the marker position with respect to the camera.
I see that this matrix is fluctuating even if I don't move the camera!!!
By the way I need the camera position with respect to the marker that
is fixed...
Can anybody help me?
|