Log in or register to post comments

Setting Target ID's from the config.xml

June 14, 2011 - 6:20pm #1

It would be more efficient for me to identify targets by an integer ID rather than their string name. I modified the config.xml file like so:

<?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="myTarget" id="2" />
  </Tracking>
</QCARConfig>

However, when I go to find the Trackable via the getId() method, 2 is not returned. Am I doing something wrong?

Setting Target ID's from the config.xml

March 4, 2017 - 10:10pm #4

Is there anyway that we can get the trackabe unique id , coz i need to identify trackable object uniquely .coz will have multiple objects in same paper. 

Re: Setting Target ID's from the config.xml

June 15, 2011 - 10:02am #3

Ok, thanks. Weird that it works like that though. It would be helpful if we could assign our own ID's.

Re: Setting Target ID's from the config.xml

June 15, 2011 - 7:35am #2

The getId() method is used to get the unique ID of a trackable which I assume is defined at runtime and not in an XML file.

You could store the getId() values of targets and use that to identify the target.

Log in or register to post comments