Log in or register to post comments

make object to be more trackable???

March 1, 2012 - 2:10pm #1

i try to make object to be more trackable.
any good solution???

after lost the target, how can I keep the lost target position? so I can display object in same perspective as before..

Re: make object to be more trackable???

March 2, 2012 - 11:30am #7

Thank you alot!!

Re: make object to be more trackable???

March 2, 2012 - 8:53am #6

Well the same applies - it's just done in different parts of the code... :-)

Re: make object to be more trackable???

March 2, 2012 - 8:52am #5

When QCAR detects a trackable it estimates the relative position of the target with respect to the view and computes a 3D matrix for you to position your 3D object. This is the pose matrix.

This, combined with the projection matrix (which repesents your viewport into the 3D world) will give you the absolute matrix for display.

Here's the code from EAGLView:renderFrameQCAR for getting the pose after detection/tracking:

        const QCAR::Trackable* trackable = state.getActiveTrackable(i);
        QCAR::Matrix44F modelViewMatrix = QCAR::Tool::convertPose2GLMatrix(trackable->getPose());

And, for OpenGL ES 1.1, here's how the pose matrix is used:

        // Load the projection matrix
        glMatrixMode(GL_PROJECTION);
        glLoadMatrixf(qUtils.projectionMatrix.data);
        
        // Load the model-view matrix
        glMatrixMode(GL_MODELVIEW);
        glLoadMatrixf(modelViewMatrix.data);

Re: make object to be more trackable???

March 2, 2012 - 8:45am #4

by the way, Im using Unity3d to create app.

Re: make object to be more trackable???

March 2, 2012 - 8:32am #3

Hi,MoSR
Thank you for giving me some idea.. it will help me alot.
i have one question..
what is poseMatrix? it means the spawn object matrix???

Thank you. again..

Re: make object to be more trackable???

March 2, 2012 - 12:51am #2

Hi toltoly

There are a number of things you can do depending on the user exeprience required.

1) Just retain a copy of the poseMatrix to freeze the augmentation where it last appeared during tracking

2) Keep a running average of the pose matrix to dampen the movement and smooth between short losses of the target.

3) Implement an animation that the poseMatrix influences, so the object has a life of its own, following the poseMatrix when it is available. The object could always return to a docking position in the camera view or just float to a standstill, or return to a point in the 3D world.

Log in or register to post comments