ARToolKitPlus::TrackerSingleMarker Class Reference

#include <TrackerSingleMarker.h>

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

List of all members.

Public Member Functions

virtual int addPattern (const char *nFileName)
virtual std::vector< int > calc (const uint8_t *nImage, ARMarkerInfo **nMarker_info=NULL, int *nNumMarkers=NULL)
virtual void getARMatrix (ARFloat nMatrix[3][4]) const
virtual float getConfidence () const
virtual bool init (const char *nCamParamFile, ARFloat nNearClip, ARFloat nFarClip)
virtual int selectBestMarkerByCf ()
virtual void selectDetectedMarker (const int id)
virtual void setPatternWidth (ARFloat nWidth)
 TrackerSingleMarker (int imWidth, int imHeight, int maxImagePatterns=8, int pattWidth=6, int pattHeight=6, int pattSamples=6, int maxLoadPatterns=0)

Protected Attributes

ARFloat confidence
ARMarkerInfo * marker_info
int marker_num
ARFloat patt_center [2]
ARFloat patt_trans [3][4]
ARFloat patt_width

Detailed Description

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.

Per default the tracker searches for Id-based markers with normal border and uses the RPP algorithm for pose estimation. You can override this using the according methods.

If you need multi-marker tracking use TrackerMultiMarker.

Definition at line 39 of file TrackerSingleMarker.h.


Constructor & Destructor Documentation

ARToolKitPlus::TrackerSingleMarker::TrackerSingleMarker ( int  imWidth,
int  imHeight,
int  maxImagePatterns = 8,
int  pattWidth = 6,
int  pattHeight = 6,
int  pattSamples = 6,
int  maxLoadPatterns = 0 
)

These parameters control the way the toolkit warps a found marker to a perfect square. The square has size pattWidth * pattHeight, the projected square in the image is subsampled at a min of pattWidth/pattHeight and a max of pattSamples steps in both x and y direction

Parameters:
imWidth width of the source image in px
imHeight height of the source image in px
maxImagePatterns describes the maximum number of patterns that can be analyzed in a camera image.
pattWidth describes the pattern image width (must be 6 for binary markers)
pattHeight describes the pattern image height (must be 6 for binary markers)
pattSamples describes the maximum resolution at which a pattern is sampled from the camera image (6 by default, must a a multiple of pattWidth and pattHeight).
maxLoadPatterns describes the maximum number of pattern files that can be loaded. Reduce maxLoadPatterns and maxImagePatterns to reduce memory footprint.

Member Function Documentation

virtual int ARToolKitPlus::TrackerSingleMarker::addPattern ( const char *  nFileName  )  [virtual]

adds a pattern to ARToolKit pass the patterns filename

virtual std::vector<int> ARToolKitPlus::TrackerSingleMarker::calc ( const uint8_t *  nImage,
ARMarkerInfo **  nMarker_info = NULL,
int *  nNumMarkers = NULL 
) [virtual]

calculates the transformation matrix pass the image as RGBX (32-bits)

Returns:
detected markers in image
virtual void ARToolKitPlus::TrackerSingleMarker::getARMatrix ( ARFloat  nMatrix[3][4]  )  const [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 float ARToolKitPlus::TrackerSingleMarker::getConfidence (  )  const [inline, virtual]

Returns the confidence value of the currently best detected marker.

Definition at line 112 of file TrackerSingleMarker.h.

virtual bool ARToolKitPlus::TrackerSingleMarker::init ( const char *  nCamParamFile,
ARFloat  nNearClip,
ARFloat  nFarClip 
) [virtual]

initializes TrackerSingleMarker nCamParamFile is the name of the camera parameter file nLogger is an instance which implements the ARToolKit::Logger interface

virtual int ARToolKitPlus::TrackerSingleMarker::selectBestMarkerByCf (  )  [virtual]

Select the best marker based on Confidence

virtual void ARToolKitPlus::TrackerSingleMarker::selectDetectedMarker ( const int  id  )  [virtual]

manually select one of the detected markers instead of using the best one

virtual void ARToolKitPlus::TrackerSingleMarker::setPatternWidth ( ARFloat  nWidth  )  [inline, virtual]

Sets the width and height of the patterns in OpenGL units defaults to 2.0, so the unity cube fits the marker surface

Definition at line 96 of file TrackerSingleMarker.h.


Member Data Documentation

Definition at line 117 of file TrackerSingleMarker.h.

Definition at line 123 of file TrackerSingleMarker.h.

Definition at line 124 of file TrackerSingleMarker.h.

Definition at line 119 of file TrackerSingleMarker.h.

Definition at line 120 of file TrackerSingleMarker.h.

Definition at line 118 of file TrackerSingleMarker.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


artoolkitplus
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:12:20 2013