Log in or register to post comments

Linking to a new trackable

June 16, 2012 - 10:58am #1

Hi,

I am playing around with the ImageTargets sample. I have so far managed to change the teapot but now I want to use a different target to the preset stonesandchips, I have loaded my image onto the My Trackables page on the vuforia page and obtained the .xml and .dat files. From looking at where similar files are located, I have now saved these into the assets folder alongside the similar files for the stones, chips and tarmac. Now what I want to be able to do is link my replacement for the teapot to these new datasets. Could anyone point me in the right direction of how to do this?

Thanks in advance! :-)

Re: Linking to a new trackable

June 16, 2012 - 2:43pm #5

That may distort the pose and scaling, but I don't think that it would prevent tracking. Are you seeing any tracking events in the log? Be sure to implement each of the steps shown for StonesAndChips. If this doesn't work, trying removing StonesAndChips and naming your resources StonesAndChips.

Re: Linking to a new trackable

June 16, 2012 - 2:31pm #4

@DavidBeard

Thanks! I had taken a look at this.

To start with if I changed where it says StonesAndChips.xml to myfile.xml it should work with my image right? It currently isn't working. Could this be something to do with the aspect ratio being very slightly different between the uploaded image and the printed version? They look the same more or less but they could be 5% different or so maybe. Do you know what are the tolerances around this, do they need to be identical?

Thanks again!

Re: Linking to a new trackable

June 16, 2012 - 12:55pm #3

I'm having the same problem. I'm using the IOS kit and I don't know what file it is I need to define the dataset? I see this was listed but I don't have this file in my project folder set
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTa rgets_loadTrackerData in ImageTargets.cpp

Re: Linking to a new trackable

June 16, 2012 - 12:10pm #2

This is for the Android SDK?

See: Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_loadTrackerData in ImageTargets.cpp for an example.

Be sure to declare your DataSet

QCAR::DataSet* dataSetMyDataSet = 0;

then use

dataSetMyDataSet = imageTracker->createDataSet();

dataSetMyDataSet->load("MyTrackables.xml", QCAR::DataSet::STORAGE_APPRESOURCE);

and

imageTracker->activateDataSet(dataSetMyDataSet);

as demonstrated in loadTrackerData()

Log in or register to post comments