C++ Java Unity
C++ Reference
TrackableResult Class Referenceabstract

Detailed Description

Base class for data about actively tracked objects.

A TrackableResult represents the state of a particular Trackable at a particular moment in time.

The state information includes:

  • A 6DOF pose
  • A status (i.e. whether and/or how the Trackable is currently being tracked)
  • The corresponding Trackable and its Type

TrackableResult instances are typically retrieved from (and fully owned by) a State.

Inheritance diagram for TrackableResult:
NonCopyable AnchorResult AreaTargetResult DeviceTrackableResult ObjectTargetResult CylinderTargetResult ImageTargetResult ModelTargetResult MultiTargetResult VuMarkTargetResult

Public Types

enum  STATUS {
  NO_POSE,
  LIMITED,
  DETECTED,
  TRACKED,
  EXTENDED_TRACKED
}
 The tracking status of the trackable. More...
 
enum  STATUS_INFO {
  NORMAL,
  UNKNOWN,
  INITIALIZING,
  RELOCALIZING,
  EXCESSIVE_MOTION,
  INSUFFICIENT_FEATURES,
  INSUFFICIENT_LIGHT,
  NO_DETECTION_RECOMMENDING_GUIDANCE,
  WRONG_SCALE
}
 Information on the tracking status. More...
 

Public Member Functions

virtual Type getType () const =0
 Get the Type of this instance (typically a subclass of TrackableResult). More...
 
virtual bool isOfType (Type type) const =0
 Check if this instance is of the given Type or any of its subclasses. More...
 
virtual double getTimeStamp () const =0
 Get the time stamp for this result. More...
 
virtual STATUS getStatus () const =0
 Get the tracking status of the Trackable. More...
 
virtual STATUS_INFO getStatusInfo () const =0
 Get further information about the tracking status of the Trackable. More...
 
virtual const TrackablegetTrackable () const =0
 Get the Trackable that participated in generating this result. More...
 
virtual const Matrix34FgetPose () const =0
 Get the pose of the associated Trackable. More...
 
virtual ~TrackableResult ()
 

Static Public Member Functions

static Type getClassType ()
 Get the Type for class 'TrackableResult'. More...
 

Member Enumeration Documentation

enum STATUS

The tracking status of the trackable.

Enumerator
NO_POSE 

No pose was delivered for the trackable.

LIMITED 

The trackable is being tracked in a limited form.

DETECTED 

The trackable was detected.

TRACKED 

The trackable is being tracked.

EXTENDED_TRACKED 

The trackable is being tracked using extended tracking.

Information on the tracking status.

Enumerator
NORMAL 

Status is normal, ie not NO_POSE or LIMITED.

UNKNOWN 

Unknown reason for the tracking status.

INITIALIZING 

The tracking system is currently initializing.

RELOCALIZING 

The tracking system is currently relocalizing.

EXCESSIVE_MOTION 

The device is moving too fast.

INSUFFICIENT_FEATURES 

There are insufficient features available in the scene.

INSUFFICIENT_LIGHT 

There is insufficient light available in the scene.

NO_DETECTION_RECOMMENDING_GUIDANCE 

Could not snap the target.

WRONG_SCALE 

The target scale does not match the physical scale.

Constructor & Destructor Documentation

virtual ~TrackableResult ( )
inlinevirtual

Member Function Documentation

static Type getClassType ( )
static

Get the Type for class 'TrackableResult'.

virtual Type getType ( ) const
pure virtual

Get the Type of this instance (typically a subclass of TrackableResult).

virtual bool isOfType ( Type  type) const
pure virtual

Check if this instance is of the given Type or any of its subclasses.

virtual double getTimeStamp ( ) const
pure virtual

Get the time stamp for this result.

Get the time stamp representing the time that this result was observed, in seconds since application startup time. Typically this is the same as the timestamp of the Frame where this TrackableResult was observed, unless the Trackable uses a predictive model or non-camera-based tracking.

The time stamp can be used to compare different TrackableResult instances for the same Trackable over time.

Returns
Time stamp for this result, in seconds since the application startup time.
virtual STATUS getStatus ( ) const
pure virtual

Get the tracking status of the Trackable.

You can use the returned STATUS to help determine the quality and characteristics of the tracking process that was when creating this TrackableResult.

virtual STATUS_INFO getStatusInfo ( ) const
pure virtual

Get further information about the tracking status of the Trackable.

virtual const Trackable& getTrackable ( ) const
pure virtual
virtual const Matrix34F& getPose ( ) const
pure virtual

Get the pose of the associated Trackable.

Get the pose of the Trackable at the moment in time when this TrackableResult was observed (or predicted).

The pose represents a transform from a target coordinate system (i.e. the coordinate system of the Trackable) to the world coordinate system.

In other words, if this TrackableResult comes from an ObjectTracker and you render 3D geometry using

  • the pose matrix as the geometry's model-view matrix, and
  • a projection matrix obtained from a RenderingPrimitives instance

then

  • (0,0,0) in your 3D geometry's local coordinate space will correspond to (0,0,0) in the Trackable's coordinate space, and
  • your 3D geometry will rotate in the view to match the rotation of the Trackable.

The result of this is that your application's view will contain geometry that appears to be at the same place in the view as the Trackable. (Note that depending on the type of Tracker there may be some drift under certain conditions.)

Note
When the Trackable's STATUS (as returned by getStatus()) is NO_POSE, this method will return the identity matrix.
Returns
A 3x4 row-major matrix representing the observed pose of the Trackable, or the identity matrix if the Trackable's STATUS is NO_POSE. (When using OpenGL, use Tool::convertPose2GLMatrix to convert to an OpenGL-compatible matrix).