2

I am trying to change the marker of the Image Targets Sample app. I have created the trackable from qualcomm website, i used 2 images and got 2 files in total :-

  1. image.xml
  2. image.dat

i placed both the images in media folder next to stones , chips.jpg and replaced the files in the assets folder of config.xml and qcar-android.dat with the above 2 files But still i am unable to get the application working

Is there anything missing?

abhishek
  • 1,434
  • 7
  • 39
  • 71

4 Answers4

1

In ImageTargets.cpp there's the method

NIEXPORT int JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_loadTrackerData

Here you can see it loads the trackable dataset, and you can make your own changes.

super
  • 411
  • 3
  • 16
1

You should change ImageTargets.cpp - define, create and load your own DataSet in loadTrackerData() method.

Vyacheslav Shylkin
  • 9,741
  • 5
  • 39
  • 34
1

I used this sample app for Image target sample app on iPhone IOS ,

Their exist delegate object top root object that iniates every thing else it add targets to Qcar

enter code here

 [qUtils addTargetName:@"Stones & Chips" atPath:@"StonesAndChips.xml"];
[qUtils addTargetName:@"Tarmac" atPath:@"Tarmac.xml"];

change target name and path according to data set files you created and have in your IDE just map this to android i think

Mohamed DiaaEldin
  • 1,061
  • 1
  • 10
  • 23
0

In ImageTarget.cpp:

JNIEXPORT int JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_loadTrackerData(JNIEnv *, jobject)
{

...

// Load the data sets:
if (!dataSetStonesAndChips->load("StonesAndChips.xml",QCAR::DataSet::STORAGE_APPRESOURCE))
{
    LOG("Failed to load data set.");
    return 0;
}

...

Just change the "StonesAndChips.xml" to your own file (Image.xml).

Sam R.
  • 16,027
  • 12
  • 69
  • 122