Log in or register to post comments

Detecting multiple markers

August 8, 2012 - 3:26am #1



I have 2 markers that will be present at the same time on user screen. I want to detect both of these markers and do some calculations. Current Multitarget sample project detect only one marker at a time so even if we have 2 markers present in front of camera, it will return us 1 for state.getNumActiveTrackables().


How will I be able to detect 2 markers at the sametime and also get projection and matrices for them.




Detecting multiple markers

September 12, 2012 - 2:34am #14

I think at present it is 9 parts per multi-target, and if you wanted to track 3 targets I can only suggest that you try it and see.

At present this is hardcoded, and thank you for bringing it to our attention as it will be fixed in a future release.

Let me know how you progress with this :)


Detecting multiple markers

September 12, 2012 - 1:56am #13

It does look to be the case. Is 9 parts in a multi target the limit or is the 18 imagetargets in total the limit.

Could I still do 9 parts, if I wanted to track 3 targets?

Is there any way to change that magic number or is that hardcoded?

If not, will it be changable or will it be raised in a future release, as that seems a little restrictive to me.

Thank you for your patience and help.

-- Per

Detecting multiple markers

September 11, 2012 - 7:07am #12

Hi perb

I think there is an internal limit at the moment.

Could you try with a 9 part multi-target?  ..as 10 might be the magic number ;)


Detecting multiple markers

September 11, 2012 - 5:55am #11

Hi again, and thank you for your reply.

I don't think that is the case here, as I just remove four of the ten parts from the multitarget and make sure that I am trying to track the side of the cylinder that I did not remove. So the imagetargets that stay in the multitarget are in the same configuration as when I have all ten imagetargets in there.

The tracking of the cylinder is working fine, the problem is getting it to lock on to the second cylinder when they consists of ten instead of six parts.

That is why I was wondering if there is some fundamental difference in MultiTargets with more than six parts. Maybe there is some parameter I can tweek, akin to the Max Sim. Image Targets", but for MultiTargets, that I am not aware of.

-- Per

Detecting multiple markers

September 11, 2012 - 5:35am #10

Hi Perb,

Ok, after detailed dicussions with the dev team while the typical use case for multi-targets is a box/cuboid, the XML configuration does support the creation of mutli-targets through separate images but there are some limitations in that the objects must be faceted and not curved, and there must not be too many overlapping images.

In this case because you are trying to detect a cylinder the application will suffer from detection problems due to curvature and overlapping

When you use only six images, these problems are minimised and hence detection improves.



Detecting multiple markers

September 11, 2012 - 3:38am #9

I modified the XML file that defines the targets and set up a couple MultiTarget that has ten parts and that is also where I defined the orientation to describe a circle. I thought this was the preferred way to set up MultiTargets.

Is that not supported?

Detecting multiple markers

September 11, 2012 - 3:08am #8

Hi Perb,

My understanding was that each multitarget consists of 6 image targets to cover the box/cube shape, particularly since the MyTrackables part of the portal stipulates this, so in the first instance I am not sure how you are making a multitarget of a cylinder?  Furthermore, even if you can I am not sure that any behaviour can be guaranteed outside the standard one

The workaround I stated was to fix an issue that will be fixed in the next release.



Detecting multiple markers

September 11, 2012 - 2:49am #7

Hi Nalin,

thank you for your reply. I had already tried different values for the "Max Simultaneous Image Targets". Now I have done some more tests and it seems it has to do with the multitargets I have set up.

My two multitargets each consists of 10 imagetargets, arranged in a circle to form a cylinder. If I reduce them to 6 imagetargets each, I can track them both simultaneously but when I leave all 10 imagetargets in I get the situation I described in my earlier post.

My initial tests, with one cylinder, showed that I get a more stable tracking if I spilt the cylinder into 10 pieces, instead of only 6. But apparently, multitargets with more than 6 imagetargets have trouble tracking more than one at a time, even if I set the "Max Simultaneous Image Targets" value to 20. I think 10 should be enough though, as I will never see more than half the cylinder at once.

Is there a reason that image targets with more than 6 parts should behave differently?

Are they not a supported feature?

Maybe it is simply too many targets to track and simultaneously scan for new ones? I would have thought that the iPad2 is powerful enough for this.

-- Per

Detecting multiple markers

September 3, 2012 - 5:54am #6

Hi perb,

After discussions with the dev team, can you try setting max simultaneous targets to 7, and then 12 to see if it makes a difference?

Please keep me informed here.



Detecting multiple markers

August 31, 2012 - 6:06am #5

It is surprising to me that we can not track more than one MultiTarget. I have a setup where I have two MultiTargets, that I can track simultaneous, but it will only detect them and start tracking under special circumstances.

This special circumstance seems to be as following:

  1. Track MultiTarget one
  2. Then move it out of view while moving MultiTarget two into view.
  3. As soon as it tracks MultiTarget two, move MultiTarget one back into view.
  4. Now it tracks both.

It does not work every time, and especially step 3 is time sensitive, it has to start tracking of MultiTarget Two quickly for it to work.

This makes me think that there is some functionality in the code that keeps the target in a special state for a brief period after loosing track of it, that allows both it and a new target to be tracked, even though this is not normally possible. It would seem like it is an artificial limitation that only one MultiTarget can be tracked at a time.

Is this by design?

The tracking works very well once it has caught the targets. But of cause this is not useable in a finished product.

Is there anything I can do to avoid this limit by editing the scripts or is this in the closed part of the plugin?

These observations where made using the Unity plugin and testing on a iPad 2.

Detecting multiple markers

August 13, 2012 - 12:29pm #4

Sorry - just reading your initial post again...

only 1 multitarget can be detected at any one point in time irrespective of HINT_MAX_SIMULTANEOUS_IMAGE_TARGETS



Detecting multiple markers

August 12, 2012 - 10:56pm #3

still call to state.getNumActiveTrackables() is returning 1. My postinitQcar is now

- (void) postInitQCAR
    // These two calls to setHint tell QCAR to split work over multiple
    // frames.  Depending on your requirements you can opt to omit these.
    // Here we could also make a QCAR::setHint call to set the maximum
    // number of simultaneous targets               

Detecting multiple markers

August 12, 2012 - 1:14pm #2

You can achieve this as follows:


Look in the image targets samples in the postInitQCAR method

Log in or register to post comments