Trackables
Definition
"Trackables" is the base class that represents all real world objects that the Vuforia SDK can track in six degrees-of-freedom. Each trackable, when detected and tracked, has a name, an ID, status, and pose information. Image Targets, Multi Targets and Markers are all trackables that inherit properties from this base class. Trackables are updated as each frame is processed, and the results are passed to the app in the State object. For a more complete understanding of the data flow between the app and the SDK please take a look at the Vuforia Architecture.
Parameters参数
- Trackable type
- Trackable类
Enum that defines the type of the trackable:
- UNKNOWN_TYPE - A trackable of unknown type.
- IMAGE_TARGET - A trackable of ImageTarget type.
- MULTI_TARGET - A trackable of MultiTarget type.
- MARKER - A trackable of Marker type.
- Trackable name / identifier
Max string length: 25 characters
- Trackable status
- UNKNOWN - The state of the trackable is unknown. This is usually returned before tracker initialization.
- UNDEFINED - The state of the trackable is not defined.
- NOT_FOUND - The trackable was not found, E.x. The referenced trackable is not part of the database.
- DETECTED - The trackable was detected in this frame.
- TRACKED - The trackable was tracked in this frame.
- Trackable pose
Coordinate Systems
The Vuforia SDK uses right handed coordinate systems. Each Image Target and Frame Marker defines a local coordinate system with (0,0,0) in the centre (middle) of the target. +X goes to the right, +Y goes up and +Z points out of the trackable (into the direction from which it can be seen). | |
The origin of the local coordinate system of a Multi Target is defined by its components. Image Target parts are transformed relative to this origin. The reported pose of the Multi Target is the position of this origin, independent from which individual part is tracked within the Multi Target. This feature allows a geometric object (Ex. a box) to be tracked continuously with the same coordinates, even if other Image Target parts are visible in the camera view. |
Relevant API's
QCAR::Trackable::
TYPE getType ()
bool isOfType (TYPE type)
STATUS getStatus ()
int getId ()
char* getName ()
Matrix34F& getPose ()
TYPE { UNKNOWN_TYPE, IMAGE_TARGET, MULTI_TARGET, MARKER }
STATUS { UNKNOWN, UNDEFINED, NOT_FOUND, DETECTED, TRACKED }
QCAR::State::
Frame getFrame ()
int getNumTrackables ()
Trackable* getTrackable (int idx)
int getNumActiveTrackables ()
Trackable* getActiveTrackable (int idx)
More information can be found in the API Reference at the Trackable Class and State Class.