Log in or register to post comments

Adding new Image Target

June 17, 2013 - 8:01pm #1

Hi guys,

I am trying to add new image target  in my project (not sample). 

In imageTargets.ccp

QCAR::DataSet* dataSetourMarker    = 0;

creating data set 

dataSetourMarker = imageTracker->createDataSet();
if (dataSetourMarker == 0){
    LOG("Failed to create a new tracking data.");
return 0;
}

loading data sets and activing  as image targets sample

if (!dataSetourMarker->load("ourmarker.xml", QCAR::DataSet::STORAGE_APPRESOURCE))
    {
        LOG("Failed to load data set.");
        return 0;
    }
if (!imageTracker->activateDataSet(dataSetourMarker))
{
        LOG("Failed to activate data set.");
        return 0;
}

and building ndk 

Application is exiting when device detected the target. 

anyone help ?

 

Adding new Image Target

June 18, 2013 - 2:37pm #4

Glad to hear you solved it.

Adding new Image Target

June 18, 2013 - 11:46am #3
I found my mistake. In this lines, These were stone and chips as image target sample. but there were no stone and chips. I wrote my texture's names. And it works :)
if (strcmp(trackable.getName(), "ourmarker1") == 0) { 
   textureIndex = 0; 
}else if (strcmp(trackable.getName(), "ourmarker2") == 0) { 
   textureIndex = 1; 
}

Adding new Image Target

June 17, 2013 - 10:35pm #2
Log in or register to post comments