The ObjectTarget class represents a unified target definition for the ObjectTracker. All targets tracked by the ObjectTracker are specializations of ObjectTarget.
The ObjectTarget class provides parent properties such as the size of the target (3D Vector), therefore this property is valid for any specialized target type. It offers a simple way for developers to get the size of any ObjectTracker’s trackable (or its name), without considering their specific type, which is useful for parsing results generically.
The size property can be seen as the bounding box of any of the existing objects. Size needs to be defined in meter units.
- For ImageTarget, a 2D digital representation of an image, the last component of the size vector will be 0 (a flat object).
- For CylinderTarget, the size will be computed based on existing procedural parameters (e.g. side-length, diameter, etc).
- For MultiTarget, size is currently not supported.
- For ModelTarget, a bounding box defines its size which can be uniformly scaled by using
A motion hint can be set through the ObjectTarget which can help improve the tracking experience. The motion hint can be used to achieve the optimal tracking performance for your user scenario. Set the motion hint to either STATIC for stationary targets or ADAPTIVE for targets that are likely to be moved.
For more information see Optimizing Model Target Tracking.