Perform NFT texture tracking on an image frame. Before the first call to this function, ar2SetInitTrans() must be called to set the initial tracking transform. The initial transform may be obtained from NFT KPM tracking, or via a fiducial marker embedded in the NFT image. The initial transform must also be set after each loss of tracking (i.e. after each instance when this function does not return 0.
- Parameters
-
ar2Handle | Tracking settings structure, as returned via ar2CreateHandle. |
surfaceSet | Tracking surface set, as returned via ar2ReadSurfaceSet. |
dataPtr | Pointer to image data on which tracking will be performed. |
trans | Pointer to a float[3][4] array which will be filled out with the pose. |
err | On successful return, will be filled out with pose error value. |
- Returns
- 0 in case of successful tracking, or < 0 in case of error. Error codes:
-1: Bad parameter
-2: Tracking not initialised
-3: Insufficient texture features
-4: Pose error exceeds value set with ar2SetTrackingThresh()
- See also
- ar2SetInitTrans ar2SetInitTrans
-
ar2SetTrackingThresh ar2SetTrackingThresh
-
ar2CreateHandle ar2CreateHandle
-
ar2ReadSurfaceSet ar2ReadSurfaceSet