By vigneshjeyaraj2
on Thu, 05/05/2016 - 11:14
Is there a way to get trackable angle such as in Euler angle? After the trackable is detected if I change the angle of the device relative to the trackable I want to know the angle between camera and trackable.
Get Trackable Angle
Once you get a Trackable Pose matrix, you can extract its column vectors, which represent the 3 oriented local axis (X,Y,Z) of your Trackable reference frame, with respect to the camera reference frame.
You can then compute the angles of thoese axis using basic trigonometric maths.
Get Trackable Angle
I got the Matrix using the following code
and I did the following code
Get Trackable Angle
The modelViewMatrix.data is an aray of 16 floats that contains the values of the pose local axis that I was referring to;&n
Get Trackable Angle
I used below lines of code
Get Trackable Angle
Also I tried the sample code from the following link
https://developer.vuforia.com/forum/qcar-api/direction-marker#comment-2002780
And the code is as follows,
Vuforia::Vec3F cameraPosition
Vuforia::Vec3F cameraPosition(cameraPosX, cameraPosY, 0);
to
Vuforia::Vec3F cameraPosition(cameraPosX, cameraPosY, cameraposZ);
may work.