| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
Macros | Functions
tracking.c File Reference
`#include <ARX/AR/ar.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <strings.h>`
`#include <math.h>`
`#include <ARX/AR/icp.h>`
`#include <ARX/AR2/coord.h>`
`#include <ARX/AR2/imageSet.h>`
`#include <ARX/AR2/featureSet.h>`
`#include <ARX/AR2/template.h>`
`#include <ARX/AR2/tracking.h>`
Include dependency graph for tracking.c:

## Macros
#define | K2_FACTOR 4.0F

## Functions
int | ar2Tracking (AR2HandleT *ar2Handle, AR2SurfaceSetT *surfaceSet, ARUint8 *dataPtr, float trans[3][4], float *err)

## Macro Definition Documentation

## ◆ K2_FACTOR

#define K2_FACTOR 4.0F

## Function Documentation

## ◆ ar2Tracking()

int ar2Tracking | ( | AR2HandleT * | ar2Handle,
|  | AR2SurfaceSetT * | surfaceSet,
|  | ARUint8 * | dataPtr,
|  | float | trans[3][4],
|  | float * | err
| ) |  |

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

Here is the call graph for this function: