By aakulkar
on Thu, 11/08/2012 - 00:19
Could someone help to convert trackable pose to iPhone screen co-ordinates (CGRect)
QCAR::Matrix34F pose = trackableResult->getPose();
I want to get the location of the target on the iPhone screen and use it for rendering.
converting Matrix34F (trackable pose) to screen coordinates
The pose is simply a 3D transformation, it is not an object in its own right that has a "location".
converting Matrix34F (trackable pose) to screen coordinates
Here are instructions for projecting points from target to screen space for both Android and iOS..
https://ar.qualcomm.at/content/technical-how-can-i-project-target-point-screen
converting Matrix34F (trackable pose) to screen coordinates
Thanks for the replies. However I am new to OpenGL and did not fully understand the code snippet. Could you please share mechanism to draw a rectangle around the trackable target? Or drawing/moving the target in 3D to 2D screen?
converting Matrix34F (trackable pose) to screen coordinates
Here are instructions for scaling and positioning models.
https://ar.qualcomm.at/content/opengl-how-do-i-scale-andor-position-my-models