Log in or register to post comments

Java API - Simultaneous ImageTargets

February 1, 2014 - 3:01pm #10
Hello,
 
I wanna track multiple image targets, with Java API.
With C++ API I could visualize two teapot at once.
 
The class com.qualcomm.vuforia.HINT (https://developer.vuforia.com/resources/api/classcom_1_1qualcomm_1_1vuforia_1_1_h_i_n_t) have an attribute to specify maximum simultaneous imageTagetes to Hint. 
static final int HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS = 0
But this attribute is final and cannot be assigned. The documentation say calling setHint() yout can set it, but I don't know how.
 
 
How can I set this attribute to track multiple targets?
Where in the Sample.ImageTargets should change de variable?
 
Thanks!
---
Alex

Java API - Simultaneous ImageTargets

February 2, 2014 - 12:59am #9

You can simply call:

Vuforia.setHint( HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2 );

 
and you'll need to import com.qualcomm.vuforia.HINT;
 

 

 

Java API - Simultaneous ImageTargets

February 5, 2014 - 2:13am #8

Works!!!

Thanks.

Java API - Simultaneous ImageTargets

February 5, 2014 - 2:37am #7

Glad to help!

Java API - Simultaneous ImageTargets

August 25, 2014 - 8:55am #6

Where should this line be posted? In the ImageTargets or the ImageTargetsRenderer? I´m still a little stuck with this same issue.

Thanks!

Java API - Simultaneous ImageTargets

July 20, 2015 - 3:26am #5

yes may anybody tell me where to put imagetargets or imagetargetsRenderer  i stuck in his  

THX

Java API - Simultaneous ImageTargets

July 21, 2015 - 5:36am #4

You can put the code after the QCAR initialization (or before the "tracker.Start()" method call); look in ImageTargets.java and SampleAppSession.java files.

Java API - Simultaneous ImageTargets

July 23, 2015 - 2:34am #3

lol    i did that it still can't be done?   what is the problem  please help me.

i use the latest SDK(Android) with Eclipse

i've import 

import com.qualcomm.vuforia.HINT;  in ImageTargets.java and SampleApplicationSessions.java

i wrote a method in  ImageTargets.java

 

public void setHint(int HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS){
    HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS=2;
    }
 
 
 
and i put  this -----Vuforia.setHint(HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS,2);
 
 
public boolean doStartTrackers()
    {
        // Indicate if the trackers were started correctly
        boolean result = true;
        
        Tracker objectTracker = TrackerManager.getInstance().getTracker(
            ObjectTracker.getClassType());       
        
 
if (objectTracker != null)
Vuforia.setHint(HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2);<--------------------------------Here
            objectTracker.start();
        
        return result;
    }
 
 

but i didn't find  QCAR initialization in neither in ImageTargets.java nor SampleApplicationSessions.java

did i do anything wrong or i miss something or missunderstanding.........

what should i write in ImageTargets.java and SampleApplicationSessions.java?? 

THANKS

Java API - Simultaneous ImageTargets

July 23, 2015 - 3:12am #2

Just find the code "doStartTrackers()" in ImageTargets.java and add this line right BEFORE objectTracker.start():


        
        Vuforia.setHint (com.qualcomm.vuforia.HINT.HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS, 2);

 

This works for me.

 

Java API - Simultaneous ImageTargets

July 23, 2015 - 7:12pm #1

Thanks, That really works

Does this Multiple detection only works on two different images (stone and chips) and show the same AR image?

I try to detect the same two pictures (tarmac) but it doesn't work??? 

I wonder to know vuforia support this?

AlessandroB, you're genius!!!

THANKS

Log in or register to post comments