Defines a simple interface for single-marker tracking with ARToolKitPlus. More...
#include <TrackerSingleMarker.h>
Public Member Functions | |
virtual bool | init (const char *nCamParamFile, ARFloat nNearClip, ARFloat nFarClip, ARToolKitPlus::Logger *nLogger=NULL)=0 |
initializes TrackerSingleMarker | |
virtual int | addPattern (const char *nFileName)=0 |
adds a pattern to ARToolKit | |
virtual int | calc (const unsigned char *nImage, int nPattern=-1, bool nUpdateMatrix=true, ARMarkerInfo **nMarker_info=NULL, int *nNumMarkers=NULL)=0 |
calculates the transformation matrix | |
virtual void | setPatternWidth (ARFloat nWidth)=0 |
Sets the width and height of the patterns. | |
virtual void | getARMatrix (ARFloat nMatrix[3][4]) const =0 |
Provides access to ARToolKit' patt_trans matrix. | |
virtual ARFloat | getConfidence () const =0 |
Returns the confidence value of the currently best detected marker. |
Defines a simple interface for single-marker tracking with ARToolKitPlus.
ARToolKitPlus::TrackerSingleMarker provides all methods to access ARToolKit for single marker tracking without needing to mess around with it low level methods directly.
A current restriction is that only the best detected marker is returned. If you need multi-marker tracking use TrackerMultiMarker.
virtual int ARToolKitPlus::TrackerSingleMarker::addPattern | ( | const char * | nFileName | ) | [pure virtual] |
adds a pattern to ARToolKit
pass the patterns filename
virtual int ARToolKitPlus::TrackerSingleMarker::calc | ( | const unsigned char * | nImage, | |
int | nPattern = -1 , |
|||
bool | nUpdateMatrix = true , |
|||
ARMarkerInfo ** | nMarker_info = NULL , |
|||
int * | nNumMarkers = NULL | |||
) | [pure virtual] |
calculates the transformation matrix
pass the image as RGBX (32-bits) in 320x240 pixels. if nPattern is not -1 then only this pattern is accepted otherwise any found pattern will be used.
virtual void ARToolKitPlus::TrackerSingleMarker::getARMatrix | ( | ARFloat | nMatrix[3][4] | ) | const [pure virtual] |
Provides access to ARToolKit' patt_trans matrix.
This method is primarily for compatibility issues with code previously using ARToolKit rather than ARToolKitPlus. patt_trans is the original transformation matrix ARToolKit calculates rather than the OpenGL style version of this matrix that can be retrieved via getModelViewMatrix().
virtual bool ARToolKitPlus::TrackerSingleMarker::init | ( | const char * | nCamParamFile, | |
ARFloat | nNearClip, | |||
ARFloat | nFarClip, | |||
ARToolKitPlus::Logger * | nLogger = NULL | |||
) | [pure virtual] |
initializes TrackerSingleMarker
nCamParamFile is the name of the camera parameter file nLogger is an instance which implements the ARToolKit::Logger interface