ARToolKitPlus
Version 2.2
|
#include <Tracker.h>
Public Member Functions | |
virtual bool | setPixelFormat (PIXEL_FORMAT nFormat) |
virtual bool | loadCameraFile (const char *nCamParamFile, ARFloat nNearClip, ARFloat nFarClip) |
virtual void | setLoadUndistLUT (bool nSet) |
virtual int | arDetectMarker (const uint8_t *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num) |
marker detection using tracking history | |
virtual int | arDetectMarkerLite (const uint8_t *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num) |
marker detection without using tracking history | |
virtual ARFloat | arMultiGetTransMat (ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) |
calculates the transformation matrix between camera and the given multi-marker config | |
virtual ARFloat | arGetTransMat (ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) |
calculates the transformation matrix between camera and the given marker | |
virtual int | arLoadPatt (char *filename) |
loads a pattern from a file | |
virtual int | arFreePatt (int patno) |
frees a pattern from memory | |
virtual void | activateBinaryMarker (int nThreshold) |
virtual void | setMarkerMode (MARKER_MODE nMarkerMode) |
virtual void | activateVignettingCompensation (bool nEnable, int nCorners=0, int nLeftRight=0, int nTopBottom=0) |
virtual void | changeCameraSize (int nWidth, int nHeight) |
Changes the resolution of the camera after the camerafile was already loaded. | |
virtual void | setUndistortionMode (UNDIST_MODE nMode) |
virtual bool | setPoseEstimator (POSE_ESTIMATOR nMethod) |
virtual void | setHullMode (HULL_TRACKING_MODE nMode) |
virtual void | setBorderWidth (ARFloat nFraction) |
virtual void | setThreshold (int nValue) |
Sets the threshold value that is used for black/white conversion. | |
virtual int | getThreshold () const |
Returns the current threshold value. | |
virtual void | activateAutoThreshold (bool nEnable) |
Turns automatic threshold calculation on/off. | |
virtual bool | isAutoThresholdActivated () const |
Returns true if automatic threshold detection is enabled. | |
virtual void | setNumAutoThresholdRetries (int nNumRetries) |
virtual void | setImageProcessingMode (IMAGE_PROC_MODE nMode) |
virtual const ARFloat * | getModelViewMatrix () const |
Returns an opengl-style modelview transformation matrix. | |
virtual const ARFloat * | getProjectionMatrix () const |
Returns an opengl-style projection transformation matrix. | |
virtual PIXEL_FORMAT | getPixelFormat () const |
Returns the compiled-in pixel format. | |
virtual int | getBitsPerPixel () const |
Returns the numbber of bits per pixel for the compiled-in pixel format. | |
virtual int | getNumLoadablePatterns () const |
virtual Camera * | getCamera () |
Returns the current camera. | |
virtual void | setCamera (Camera *nCamera) |
Sets a new camera without specifying new near and far clip values. | |
virtual void | setCamera (Camera *nCamera, ARFloat nNearClip, ARFloat nFarClip) |
Sets a new camera including specifying new near and far clip values. | |
virtual ARFloat | calcOpenGLMatrixFromMarker (ARMarkerInfo *nMarkerInfo, ARFloat nPatternCenter[2], ARFloat nPatternSize, ARFloat *nOpenGLMatrix) |
Calculates the OpenGL transformation matrix for a specific marker info. | |
virtual ARFloat | executeSingleMarkerPoseEstimator (ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) |
Calls the pose estimator set with setPoseEstimator() for single marker tracking. | |
virtual ARFloat | executeMultiMarkerPoseEstimator (ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) |
Calls the pose estimator set with setPoseEstimator() for multi marker tracking. | |
Static Public Member Functions | |
static bool | calcCameraMatrix (const char *nCamParamFile, ARFloat nNear, ARFloat nFar, ARFloat *nMatrix) |
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:
|
inlinevirtual |
activates binary markers markers are converted to pure black/white during loading
|
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.
|
static |
Calculates the camera matrix from an ARToolKit camera file. This method retrieves the OpenGL projection matrix that is stored in an ARToolKit camera calibration file. Returns true if loading of the camera file succeeded.
|
inlinevirtual |
Returns the maximum number of patterns that can be loaded This maximum number of loadable patterns can be set via the maxLoadPatterns parameter
|
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.
|
inlinevirtual |
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.
|
inlinevirtual |
If true the alternative hull-algorithm will be used for multi-marker tracking Starting with version 2.2 ARToolKitPlus has a new mode for tracking multi-markers: Instead of using all points (as done by RPP multi-marker tracking) or tracking all markers independently and combine lateron (as done in ARToolKit's standard multi-marker pose estimator), ARToolKitPlus can now use only 4 'good' points of the convex hull to do the pose estimation. If the pose estimator is set to RPP then RPP will be used to track those 4 points. Otherwise, ARToolKit's standard single-marker pose estimator will be used to track the pose of these 4 points.
|
inlinevirtual |
Sets an image processing mode (half or full resolution) Half resolution is faster but less accurate. When using full resolution smaller markers will be detected at a higher accuracy (or even detected at all).
|
inlinevirtual |
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'
|
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.
|
inlinevirtual |
Sets the number of times the threshold is randomized in case no marker was visible (Minimum: 1, 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.
|
virtual |
Sets the pixel format of the camera image Default format is RGB888 (PIXEL_FORMAT_RGB)
|
virtual |
Changes the Pose Estimation Algorithm POSE_ESTIMATOR_ORIGINAL (default): arGetTransMat() POSE_ESTIMATOR_CONT: original pose estimator with "Cont" POSE_ESTIMATOR_RPP: "Robust Pose Estimation from a Planar Target"
|
virtual |
Changes the undistortion mode Default value is UNDIST_STD which means that artoolkit's standard undistortion method is used.