"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Locate the center of a Marker

I know how to find a Marker. What I don't understand is how to obtain its location within the overall image, find the Marker's center, and then use my own (Cocoa-based) drawing code to write text into the Marker. Any pointers would be much appreciated!

stridefrodo

Tue, 08/02/2011 - 20:58

In EAGLView.m you can find this matrix: modelViewMatrix.data [ 4x4 matrix 16 float values ] So if you project 0,0,0,1 on that you will get the center. So basically modelViewMatrix.data[12],modelViewMatrix.data[13],modelViewMatrix.data[14] is your center.

You can use the projectPoint function to locate the target center in screen coordinates.. QCAR::Vec2F screenPoint = QCAR::Tool::projectPoint(cameraCalibration, trackable->getPose(), QCAR::Vec3F(0, 0, 0)); [ that should read :: projectPoint ] not :P If you do a search on the forum, you'll find a