Defines a simple interface for single-marker tracking with ARToolKitPlus. More...
#include <TrackerSingleMarker.h>
Public Member Functions | |
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 | 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. | |
virtual bool | init (const char *nCamParamFile, ARFloat nNearClip, ARFloat nFarClip, ARToolKitPlus::Logger *nLogger=NULL)=0 |
initializes TrackerSingleMarker | |
virtual bool | init (Camera *camera, ARFloat nNearClip, ARFloat nFarClip, ARToolKitPlus::Logger *nLogger=NULL)=0 |
virtual void | setPatternWidth (ARFloat nWidth)=0 |
Sets the width and height of the patterns. | |
virtual | ~TrackerSingleMarker () |
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.
Definition at line 61 of file TrackerSingleMarker.h.
virtual ARToolKitPlus::TrackerSingleMarker::~TrackerSingleMarker | ( | ) | [inline, virtual] |
Definition at line 64 of file TrackerSingleMarker.h.
virtual int ARToolKitPlus::TrackerSingleMarker::addPattern | ( | const char * | nFileName | ) | [pure virtual] |
adds a pattern to ARToolKit
pass the patterns filename
Implemented in ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.
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.
Implemented in ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.
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().
Implemented in ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.
virtual ARFloat ARToolKitPlus::TrackerSingleMarker::getConfidence | ( | ) | const [pure virtual] |
Returns the confidence value of the currently best detected marker.
Implemented in ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.
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
Implemented in ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.
virtual bool ARToolKitPlus::TrackerSingleMarker::init | ( | Camera * | camera, |
ARFloat | nNearClip, | ||
ARFloat | nFarClip, | ||
ARToolKitPlus::Logger * | nLogger = NULL |
||
) | [pure virtual] |
virtual void ARToolKitPlus::TrackerSingleMarker::setPatternWidth | ( | ARFloat | nWidth | ) | [pure virtual] |
Sets the width and height of the patterns.
Implemented in ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.