Log in or register to post comments

tracking two targets at the same time

April 7, 2013 - 9:36am #1

Hi.. I want to track two targets at the same time. I have modified imageTarget sample code by comment out deactivate one target when another found in onUpdate callback.

But when I tracked two predefined targets at the same time, the state.getNumTrackableResults always return 1.. is there anything else I should modify to accomplish this one?

tracking two targets at the same time

February 16, 2016 - 11:52pm #3

how we can acheive this in android ?

tracking two targets at the same time

April 7, 2013 - 11:17pm #2

Hi, you need to increase the QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS parameter, as shown in ImageTargets sample, where you can find this code to do that (in ImageTargets.cpp):

 

1
2
3
4
5
6
7
8
9
10
11
JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_onQCARInitializedNative(
     JNIEnv *, jobject)
{
    // Register the update callback where we handle the data set swap:
    QCAR::registerCallback(&updateCallback);
 
    // Comment in to enable tracking of up to 2 targets simultaneously and
    // split the work over multiple frames:
    QCAR::setHint(QCAR::HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2);
}

 

Log in or register to post comments