Question

I'm using the video playback Vuforia example for building an app. When the app recognises multiple image targets I would like to know which is the closest one to the centre of the screen (which is supposed to be my camera view). In the source code I have found this line:

const QCAR::Matrix34F & QCAR::TrackableResult::getPose()

which gives me a 3x4 pose matrix of the target. How can use this matrix for extracting this information?

thanks

Était-ce utile?

La solution

This Vuforia Knowledge database article explains in detail the meaning of the pose matrix, you should probably have a look at it.

To make it short, the pose matrix is a 3x4 matrix whose last column is the translation vector <x,y,z> from the camera to the detected target. The "closest target to the center of the screen" should thus be the one with the smallest <x,y> vector.

Hope this helps!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top