By CodeEater
on Fri, 10/18/2013 - 14:24
Hi!
I'm trying to create frame markers using a good old for loop, but it seems that the the frame marker creation fails predictably on markers 06 and 07 some others too, but I have scaled down my requirement to only need 25 markers for testing. As a side note, if I increase the range to 512 markers in total the results are similar.
Is there some way to see *why* it fails? Or is there something wrong with the code?
I don't think there is anything clever about my marker creation: I copied it from the Frame Marker sample and adapted it to a loop:
for( int a = 0; a < 25; a = a + 1 ) { if (!markerTracker->createFrameMarker(a, "Marker" + a, QCAR::Vec2F(50,50))) { LOG("Failed to create frame marker"); } else { LOG("Created frame marker"); } }When it runs, I get "Failed..." on marker 06 and 07 consitently. The following code i I've even built an "auto-retry" feature, but the results are the same on successive attemps.. Any assistance with this wouyld be greatly appreciated!
Frame Marker Creation Fails
Ok, I solved it and thought I'd share in case anybody else finds this. Thebiggest trick is to stop the marker tracker before creating the markers and start it after you're done... I also slightly modified the loop, based on this post: