Log in or register to post comments

Render more than one object

November 24, 2010 - 3:36pm #1

Hi everyone!

I am trying to track two image targets and display one object on every target.
I followed the advice given in the "Tips, Tricks and Useful Tools" section of the developer guide and uncommented the two lines in the ImageTargets.cpp.

JNIEXPORT void JNICALL
Java_com_qualcomm_QCARSamples_ImageTargets_ImageTargets_onQCARInitializedNative(JNIEnv *, jobject)
{
    // 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);
    QCAR::setHint(QCAR::HINT_IMAGE_TARGET_MULTI_FRAME_ENABLED, 1);
}

But still the software displays only one kettle at a time.

I then uninstalled the app from my HTC Desire running Android 2.2. I refreshed the project in eclipse, cleaned the project, rebuilt it and deployed it again on the device but to no avail. Still just one kettle.

I'm running Windows 7 x86 using version 0.9.7 of the QCAR SDK.

Is there something I'm missing?

Thanks in advance for your help.

Matthias

Re: Render more than one object

November 29, 2010 - 1:36pm #4
Quote:

Oh, and just in case, make sure that you've rebuilt the native shared library using ndk-build in the ImageTargets directory.

Thank you Kim. That's it.

Maybe it would be helpful for beginners to include this information in the instructions.

Thanks again! :)

Re: Render more than one object

November 25, 2010 - 6:56am #3

Oh, and just in case, make sure that you've rebuilt the native shared library using ndk-build in the ImageTargets directory. Then refresh the project in Eclipse by right-clicking on the project in the Package Explorer and choosing Refresh. You need to do this whenever you change the native code.

- Kim

Re: Render more than one object

November 25, 2010 - 6:53am #2

Make sure you are using both the chips and stones targets, one of each. Place them side by side, then focus the camera on one until you see the teapot. Pull back and focus on the other, until you see the second teapot. Now if you pull back you should be able to see both. It really just requires that the camera focus on each target in turn for tracking to commence, after that the tracking should stay locked on.

Let me know if this helps!

- Kim

Log in or register to post comments