Log in or register to post comments

Using Multiple Image Targets Simultaneously ??

September 15, 2011 - 9:02pm #1

from
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);
}

i uncomment to

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 i can't use Using Multiple Image Targets Simultaneously .

i do something wrong??
help me please.

Re: Using Multiple Image Targets Simultaneously ??

September 25, 2011 - 11:53pm #10
mychocolate wrote:

I change the 3D object from teapot to banana.^^

and can u tell me how to convert .obj to .h in step .

I read the method in this bord but i don't understand.

:D

Hi,
May i know how did you changed the teapot into banana?
Hoping for some clear guidelines...

Re: Using Multiple Image Targets Simultaneously ??

September 19, 2011 - 1:05pm #9

Try multiple simultaneous image targets with the original ImageTargets sample, before changing any of the models. Uncomment those two lines, rebuild using "ndk-build", then refresh the project in Eclipse (right click in the Package Explorer and choose Refresh). Try locking onto one target and then moving the other target into view to get both at the same time.

It sounds like you have successfully swapped in the banana model for the teapot, are you having trouble using that perl script? Just be sure to triangulate your model and save it as a .obj before running it through the script. Do note that that script can't handle animations, it is for static models only.

- Kim

Re: Using Multiple Image Targets Simultaneously ??

September 17, 2011 - 7:15am #8

I change the 3D object from teapot to banana.^^

and can u tell me how to convert .obj to .h in step .

I read the method in this bord but i don't understand.

:D

Re: Using Multiple Image Targets Simultaneously ??

September 17, 2011 - 6:07am #7

Have you changed anything in the ImageTargets sample, or are you simply building and running the sample as it is?

Re: Using Multiple Image Targets Simultaneously ??

September 16, 2011 - 10:29pm #6

I try to do it but it happen the same.Can't use Using Multiple Image Targets Simultaneously.

Re: Using Multiple Image Targets Simultaneously ??

September 16, 2011 - 10:15am #5

thanks again . ^^ I will try it.:)

Re: Using Multiple Image Targets Simultaneously ??

September 16, 2011 - 9:00am #4

So you are working with the native ImageTargets sample in Eclipse?

Does your config.xml file have the targets defined as such..

<?xml version="1.0" encoding="UTF-8"?>
<QCARConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="qcar_config.xsd">
  <Tracking>
   <ImageTarget size="247 173" name="stones" />
   <ImageTarget size="247 173" name="chips" />
  </Tracking>
</QCARConfig>

Here is a tip - first clean the project ( Project > Clean in Eclipse ), then run ndk-build, and then build the apk. This should ensure that you're using the current version of your code.

Re: Using Multiple Image Targets Simultaneously ??

September 16, 2011 - 8:13am #3

Thank you so much^^.I use sample ImageTargets . it have 2 target and 1 .xml file in the asset folder. what should i do?

Re: Using Multiple Image Targets Simultaneously ??

September 16, 2011 - 7:02am #2

Are these multiple instances of the same target, or different targets?

QCAR can track multiple different targets, but not multiple instances of the same target.

Also check your config.xml to make sure that your targets are defined and have unique names.

Log in or register to post comments