Developer Guide4——Trackables

来源:互联网 发布:mac安装jdk后如何配置 编辑:程序博客网 时间:2024/06/16 02:50

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 theVuforia 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
A string that uniquely identifies the trackable within the database of targets.
Max string length: 25 characters
Character set: a-z, A-Z, 0-9,[ - _ .]
  • Trackable status
Each trackable has a status information associated with it in the State object, which is updated as each camera frame is processed. The status is characterized by an enum:
  • 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
Current valid pose of a DETECTED or TRACKED trackable is returned as a 3x4 matrix in row-major order. The Vuforia SDK provides simple tool functions to convert the Vuforia pose matrix into a GL model-view matrix, and to project 3D points from the 3D scene to the device screen.
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 andState Class.

Inherited Classes
  • Image Targets
  • Multi Targets
  • Frame Markers