Log in or register to post comments

Track Targets as Unique Types

May 7, 2012 - 9:09am #1

I have a project where I need to be able to identify an ImageTarget as a specific type programmatically. i.e. I have a card that is to represent the number 4 and when the program sees this card I can show a 3D number 4 above it. I know the API can recognize non rectangular markers but, is there data to recognize the shape of the ImageTarget or some unique data I can use to correlate the ImageTarget to the required 3d model to display.

Thank you,
Matt

Re: Track Targets as Unique Types

May 7, 2012 - 7:02pm #4

The target names are unique. They're not be assigned in order.

But if you still want to use the target size, see: Vec2F QCAR::ImageTarget::getSize() in the API docs - https://ar.qualcomm.at/qdevnet/api

This will give you the width and height in scene units.

Re: Track Targets as Unique Types

May 7, 2012 - 6:26pm #3

Thanks for the suggestion. I understand I can label each target with a name but, that name sounds to be determined based on the order the ImageTargets are recognized. I am looking for a way to uniquely identify the ImageTarget, either by its shape or non-rectangular shape or anything else ?.

So if the user has 3 cards each with a capital letter 'A' 'B' 'C' on it. Then the user will put one of the 3 cards (randomly selected) into view of the camera. Is there some unique identifier or data I can use to render the proper 3D model that corresponds to the letter on the card ('Apple', 'Ball', 'Car' ) respectively.

Hope that is a bit clearer.
Thank you,
Matt

Re: Track Targets as Unique Types

May 7, 2012 - 2:35pm #2

Don't think of each target as a type. Rather, you give each target a name when you create it using the online Target Management System. When the tracker finds that target you can query the name and respond accordingly.

The ImageTargets sample switches the teapot texture according to the target name. The FrameMarkers sample switches the model according to the marker id. See the renderFrame method in either sample (ImageTargets.cpp or FrameMarkers.cpp).

- Kim

Log in or register to post comments