Log in or register to post comments

Won't Recognize Trackable

July 9, 2012 - 5:42pm #1

I'm editing the VideoPlayback example. 

I have created a new Trackable with stones, chips, & my new image. I have downloaded the xml and dat and placed them in my project.

I have changed the NUM_VIDEO_TARGETS from 2 to 3.

In renderFrameQCAR I have added:


if (strcmp(trackable-:getName(), "MyNewImage") == 0)


   playerIndex = 2;




The system does not recognize my image as a trackable. 

Won't Recognize Trackable

July 10, 2012 - 7:44am #6

cool - reallly pleased it worked out for you!


happy to help :)

Won't Recognize Trackable

July 10, 2012 - 6:47am #5

Phineas J. Whoopie, you're a genius!* The key was the BuildPhases/CopyBundleResources. It now recognizes my trackable, it plays the wrong video, but it recognizes my trackable. One step closer to success.

* Phineas J. Whoopie is a reference to a character in the cartoon Tennessee Tuxedo.

EDIT: A few seconds later I found my typo which was causing the wrong video to play. NalinS, you changed this from frustrating to fun with 1 post.


Won't Recognize Trackable

July 10, 2012 - 5:47am #4

Hi willtrosky,


Can I suggest to break down the problem first by taking your image and putting it into its own dataset first i.e. without ChipsAndStones.  

This simply needs the following line added before chips and stones

    [qUtils addTargetName:@"MyDataset" atPath:@"MyDataset.xml"];

This way you can see whether it is tracked or not and might help you to progress.

On iOS you need to make sure that the new trackable is actually in BuildPhases/CopyBundleResources.  Xcode has a feature whereby if you drag the new files in they will not automatically be in the resources.



Won't Recognize Trackable

July 10, 2012 - 4:42am #3

That is not a copy of my code, it was a retype and a typo. I was working on two different machines. My code does have the ->, not the -:

As for NUM_VIDEO_TARGETS: I'm not sure I understand your comment. The default value is 2. There are two images in the .dat/.xml. I added a third item to the .dat & .xml. Should this value not become 3?


Won't Recognize Trackable

July 9, 2012 - 6:00pm #2

If that's copied from your code, you have a syntax error..

Should be trackable->getName()

Also did you add this dataset at ln 122 in VideoPlaybackAppDelegate.mm?


NUM_VIDEO_TARGETS refers to the number of Trackables in the dataset, not the number of datasets.

Log in or register to post comments