Topic locked

Failed to get the ImageTracker from the tracker manager

March 22, 2014 - 8:31am #1

I'm trying to implement the Vuforia SDK in my own application. Initiating QCAR is going well, but when I want to create an ImageTracker an error occurs. 
I'm using te latest version of the SDK and this is my code:        

 

// Get the QCAR tracker manager image tracker

    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();    

    QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(trackerManager.getTracker(QCAR::ImageTracker::getClassType()));

    if (NULL == imageTracker) {

        NSLog(@"ERROR: ViewController : loadImageTrackerDataSet : failed to get the ImageTracker from the tracker manager");

     }

 

In comparison with the example my code seems to be fine, but imageTracker perseveres to be NULL.

Thanks in advance for your help.

Failed to get the ImageTracker from the tracker manager

March 22, 2014 - 9:50am #4

You're welcome.

Failed to get the ImageTracker from the tracker manager

March 22, 2014 - 9:27am #3

Thank you. I don't understand how I missed that ;).

Failed to get the ImageTracker from the tracker manager

March 22, 2014 - 9:17am #2

Hi,

have you called trackerManager.initTracker( ... ) ?

This must  be done when you start your camera (actually, right before initializing and starting te camera); if you don't call initTracker() anywhere in your code, the trackerManagre.getTracker() will return NULL, that's normal and expected.

Search the sample code for the string "initTracker"... so you can check the exact code there.

 

Topic locked