Public Member Functions
ARToolKitPlus::Tracker Class Reference

Tracker is the vision core of ARToolKit. More...

#include <Tracker.h>

Inheritance diagram for ARToolKitPlus::Tracker:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void activateAutoThreshold (bool nEnable)=0
 Enables or disables automatic threshold calculation.
virtual void activateBinaryMarker (int nThreshold)=0
 activates binary markers
virtual void activateVignettingCompensation (bool nEnable, int nCorners=0, int nLeftRight=0, int nTopBottom=0)=0
 activates the complensation of brightness falloff in the corners of the camera image
virtual int arDetectMarker (ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num)=0
 marker detection using tracking history
virtual int arDetectMarkerLite (ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num)=0
 marker detection without using tracking history
virtual int arFreePatt (int patno)=0
 frees a pattern from memory
virtual ARFloat arGetTransMat (ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4])=0
 calculates the transformation matrix between camera and the given marker
virtual ARFloat arGetTransMatCont (ARMarkerInfo *marker_info, ARFloat prev_conv[3][4], ARFloat center[2], ARFloat width, ARFloat conv[3][4])=0
virtual int arLoadPatt (char *filename)=0
 loads a pattern from a file
virtual int arMultiFreeConfig (ARMultiMarkerInfoT *config)=0
 frees a multimarker config from memory
virtual ARFloat arMultiGetTransMat (ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config)=0
 calculates the transformation matrix between camera and the given multi-marker config
virtual ARMultiMarkerInfoTarMultiReadConfigFile (const char *filename)=0
 reads a standard artoolkit multimarker config file
virtual ARFloat calcOpenGLMatrixFromMarker (ARMarkerInfo *nMarkerInfo, ARFloat nPatternCenter[2], ARFloat nPatternSize, ARFloat *nOpenGLMatrix)=0
 Calculates the OpenGL transformation matrix for a specific marker info.
virtual void changeCameraSize (int nWidth, int nHeight)=0
 changes the resolution of the camera after the camerafile was already loaded
virtual void cleanup ()=0
 does final clean up (memory deallocation)
virtual ARFloat executeMultiMarkerPoseEstimator (ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config)=0
 Calls the pose estimator set with setPoseEstimator() for multi marker tracking.
virtual ARFloat executeSingleMarkerPoseEstimator (ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4])=0
 Calls the pose estimator set with setPoseEstimator() for single marker tracking.
virtual int getBitsPerPixel () const =0
 Returns the number of bits required to store a single pixel.
virtual CameragetCamera ()=0
 Returns the current camera.
virtual const char * getDescription ()=0
 Returns a short description with compiled-in settings.
virtual const ARFloatgetModelViewMatrix () const =0
 Returns an opengl-style modelview transformation matrix.
virtual int getNumLoadablePatterns () const =0
 Returns the maximum number of patterns that can be loaded.
virtual PIXEL_FORMAT getPixelFormat () const =0
 Returns the compiled-in pixel format.
virtual ProfilergetProfiler ()=0
 Returns the internal profiler object.
virtual const ARFloatgetProjectionMatrix () const =0
 Returns an opengl-style projection transformation matrix.
virtual int getThreshold () const =0
 Returns the current threshold value.
virtual bool isAutoThresholdActivated () const =0
 Returns true if automatic threshold calculation is activated.
virtual bool loadCameraFile (const char *nCamParamFile, ARFloat nNearClip, ARFloat nFarClip)=0
 Loads a camera calibration file and stores data internally.
virtual ARFloat rppGetTransMat (ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4])=0
virtual ARFloat rppMultiGetTransMat (ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config)=0
virtual void setBorderWidth (ARFloat nFraction)=0
 Sets a new relative border width. ARToolKit's default value is 0.25.
virtual void setCamera (Camera *nCamera)=0
 Sets a new camera without specifying new near and far clip values.
virtual void setCamera (Camera *nCamera, ARFloat nNearClip, ARFloat nFarClip)=0
 Sets a new camera including specifying new near and far clip values.
virtual void setImageProcessingMode (IMAGE_PROC_MODE nMode)=0
 Sets an image processing mode (half or full resolution)
virtual void setLoadUndistLUT (bool nSet)=0
 Set to true to try loading camera undistortion table from a cache file.
virtual void setLogger (ARToolKitPlus::Logger *nLogger)=0
 sets an instance which implements the ARToolKit::Logger interface
virtual void setMarkerMode (MARKER_MODE nMarkerMode)=0
 activate the usage of id-based markers rather than template based markers
virtual void setNumAutoThresholdRetries (int nNumRetries)=0
 Sets the number of times the threshold is randomized in case no marker was visible (Default: 2)
virtual bool setPixelFormat (PIXEL_FORMAT nFormat)=0
 Sets the pixel format of the camera image.
virtual bool setPoseEstimator (POSE_ESTIMATOR nMethod)=0
 Changes the Pose Estimation Algorithm.
virtual void setThreshold (int nValue)=0
 Sets the threshold value that is used for black/white conversion.
virtual void setUndistortionMode (UNDIST_MODE nMode)=0
 Changes the undistortion mode.
virtual ~Tracker ()

Detailed Description

Tracker is the vision core of ARToolKit.

Almost all original ARToolKit methods are included here. Exceptions: matrix & vector.

Tracker includes all methods that are needed to create a basic ARToolKit application (e.g. the simple example from the original ARToolKit package)

Application developers should usually prefer using the more high level classes:

Definition at line 70 of file Tracker.h.


Constructor & Destructor Documentation

virtual ARToolKitPlus::Tracker::~Tracker ( ) [inline, virtual]

Definition at line 73 of file Tracker.h.


Member Function Documentation

virtual void ARToolKitPlus::Tracker::activateAutoThreshold ( bool  nEnable) [pure virtual]
virtual void ARToolKitPlus::Tracker::activateBinaryMarker ( int  nThreshold) [pure virtual]
virtual void ARToolKitPlus::Tracker::activateVignettingCompensation ( bool  nEnable,
int  nCorners = 0,
int  nLeftRight = 0,
int  nTopBottom = 0 
) [pure virtual]

activates the complensation of brightness falloff in the corners of the camera image

some cameras have a falloff in brightness at the border of the image, which creates problems with thresholding the image. use this function to set a (linear) adapted threshold value. the threshold value will stay exactly the same at the center but will deviate near to the border. all values specify a difference, not absolute values! nCorners define the falloff a all four corners. nLeftRight defines the falloff at the half y-position at the left and right side of the image. nTopBottom defines the falloff at the half x-position at the top and bottom side of the image. all values between these 9 points (center, 4 corners, left, right, top, bottom) will be interpolated.

Implemented in ARToolKitPlus::TrackerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, ARToolKitPlus::TrackerMultiMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, and ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.

virtual int ARToolKitPlus::Tracker::arDetectMarker ( ARUint8 dataPtr,
int  thresh,
ARMarkerInfo **  marker_info,
int *  marker_num 
) [pure virtual]
virtual int ARToolKitPlus::Tracker::arDetectMarkerLite ( ARUint8 dataPtr,
int  thresh,
ARMarkerInfo **  marker_info,
int *  marker_num 
) [pure virtual]
virtual int ARToolKitPlus::Tracker::arFreePatt ( int  patno) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::arGetTransMat ( ARMarkerInfo marker_info,
ARFloat  center[2],
ARFloat  width,
ARFloat  conv[3][4] 
) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::arGetTransMatCont ( ARMarkerInfo marker_info,
ARFloat  prev_conv[3][4],
ARFloat  center[2],
ARFloat  width,
ARFloat  conv[3][4] 
) [pure virtual]
virtual int ARToolKitPlus::Tracker::arLoadPatt ( char *  filename) [pure virtual]
virtual int ARToolKitPlus::Tracker::arMultiFreeConfig ( ARMultiMarkerInfoT config) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::arMultiGetTransMat ( ARMarkerInfo marker_info,
int  marker_num,
ARMultiMarkerInfoT config 
) [pure virtual]
virtual ARMultiMarkerInfoT* ARToolKitPlus::Tracker::arMultiReadConfigFile ( const char *  filename) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::calcOpenGLMatrixFromMarker ( ARMarkerInfo nMarkerInfo,
ARFloat  nPatternCenter[2],
ARFloat  nPatternSize,
ARFloat nOpenGLMatrix 
) [pure virtual]
virtual void ARToolKitPlus::Tracker::changeCameraSize ( int  nWidth,
int  nHeight 
) [pure virtual]
virtual void ARToolKitPlus::Tracker::cleanup ( ) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::executeMultiMarkerPoseEstimator ( ARMarkerInfo marker_info,
int  marker_num,
ARMultiMarkerInfoT config 
) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::executeSingleMarkerPoseEstimator ( ARMarkerInfo marker_info,
ARFloat  center[2],
ARFloat  width,
ARFloat  conv[3][4] 
) [pure virtual]
virtual int ARToolKitPlus::Tracker::getBitsPerPixel ( ) const [pure virtual]
virtual Camera* ARToolKitPlus::Tracker::getCamera ( ) [pure virtual]
virtual const char* ARToolKitPlus::Tracker::getDescription ( ) [pure virtual]
virtual const ARFloat* ARToolKitPlus::Tracker::getModelViewMatrix ( ) const [pure virtual]
virtual int ARToolKitPlus::Tracker::getNumLoadablePatterns ( ) const [pure virtual]
virtual PIXEL_FORMAT ARToolKitPlus::Tracker::getPixelFormat ( ) const [pure virtual]
virtual Profiler& ARToolKitPlus::Tracker::getProfiler ( ) [pure virtual]
virtual const ARFloat* ARToolKitPlus::Tracker::getProjectionMatrix ( ) const [pure virtual]
virtual int ARToolKitPlus::Tracker::getThreshold ( ) const [pure virtual]
virtual bool ARToolKitPlus::Tracker::isAutoThresholdActivated ( ) const [pure virtual]
virtual bool ARToolKitPlus::Tracker::loadCameraFile ( const char *  nCamParamFile,
ARFloat  nNearClip,
ARFloat  nFarClip 
) [pure virtual]

Loads a camera calibration file and stores data internally.

To prevent memory leaks, this method internally deletes an existing camera. If you want to use more than one camera, retrieve the existing camera using getCamera() and call setCamera(NULL); before loading another camera file. On destruction, ARToolKitPlus will only destroy the currently set camera. All other cameras have to be destroyed manually.

Implemented in ARToolKitPlus::TrackerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, ARToolKitPlus::TrackerMultiMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, and ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.

virtual ARFloat ARToolKitPlus::Tracker::rppGetTransMat ( ARMarkerInfo marker_info,
ARFloat  center[2],
ARFloat  width,
ARFloat  conv[3][4] 
) [pure virtual]
virtual ARFloat ARToolKitPlus::Tracker::rppMultiGetTransMat ( ARMarkerInfo marker_info,
int  marker_num,
ARMultiMarkerInfoT config 
) [pure virtual]
virtual void ARToolKitPlus::Tracker::setBorderWidth ( ARFloat  nFraction) [pure virtual]

Sets a new relative border width. ARToolKit's default value is 0.25.

Take caution that the markers need of course really have thiner borders. Values other than 0.25 have not been tested for regular pattern-based matching, but only for id-encoded markers. It might be that the pattern creation process needs to be updated too.

Implemented in ARToolKitPlus::TrackerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, ARToolKitPlus::TrackerMultiMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, and ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.

virtual void ARToolKitPlus::Tracker::setCamera ( Camera nCamera) [pure virtual]
virtual void ARToolKitPlus::Tracker::setCamera ( Camera nCamera,
ARFloat  nNearClip,
ARFloat  nFarClip 
) [pure virtual]
virtual void ARToolKitPlus::Tracker::setImageProcessingMode ( IMAGE_PROC_MODE  nMode) [pure virtual]
virtual void ARToolKitPlus::Tracker::setLoadUndistLUT ( bool  nSet) [pure virtual]

Set to true to try loading camera undistortion table from a cache file.

On slow platforms (e.g. Smartphone) creation of the undistortion lookup-table can take quite a while. Consequently caching will speedup the start phase. If set to true and no cache file could be found a new one will be created. The cache file will get the same name as the camera file with the added extension '.LUT'

Implemented in ARToolKitPlus::TrackerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, ARToolKitPlus::TrackerMultiMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, and ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.

virtual void ARToolKitPlus::Tracker::setLogger ( ARToolKitPlus::Logger nLogger) [pure virtual]
virtual void ARToolKitPlus::Tracker::setMarkerMode ( MARKER_MODE  nMarkerMode) [pure virtual]

activate the usage of id-based markers rather than template based markers

Template markers are the classic marker type used in ARToolKit. Id-based markers directly encode the marker id in the image. Simple markers use 3-times redundancy to increase robustness, while BCH markers use an advanced CRC algorithm to detect and repair marker damages. See arBitFieldPattern.h for more information. In order to use id-based markers, the marker size has to be 6x6, 12x12 or 18x18.

Implemented in ARToolKitPlus::TrackerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, ARToolKitPlus::TrackerMultiMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, and ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.

virtual void ARToolKitPlus::Tracker::setNumAutoThresholdRetries ( int  nNumRetries) [pure virtual]

Sets the number of times the threshold is randomized in case no marker was visible (Default: 2)

Autothreshold requires a visible marker to estime the optimal thresholding value. If no marker is visible ARToolKitPlus randomizes the thresholding value until a marker is found. This function sets the number of times ARToolKitPlus will randomize the threshold value and research for a marker per calc() invokation until it gives up. A value of 2 means that ARToolKitPlus will analyze the image a second time with an other treshold value if it does not find a marker the first time. Each unsuccessful try uses less processing power than a single full successful position estimation.

Implemented in ARToolKitPlus::TrackerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, ARToolKitPlus::TrackerMultiMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >, and ARToolKitPlus::TrackerSingleMarkerImpl< __PATTERN_SIZE_X, __PATTERN_SIZE_Y, __PATTERN_SAMPLE_NUM, __MAX_LOAD_PATTERNS, __MAX_IMAGE_PATTERNS >.

virtual bool ARToolKitPlus::Tracker::setPixelFormat ( PIXEL_FORMAT  nFormat) [pure virtual]
virtual bool ARToolKitPlus::Tracker::setPoseEstimator ( POSE_ESTIMATOR  nMethod) [pure virtual]
virtual void ARToolKitPlus::Tracker::setThreshold ( int  nValue) [pure virtual]
virtual void ARToolKitPlus::Tracker::setUndistortionMode ( UNDIST_MODE  nMode) [pure virtual]

The documentation for this class was generated from the following file:


tuw_artoolkitplus
Author(s): Markus Bader
autogenerated on Sun May 29 2016 02:50:12