Tracker.h
Go to the documentation of this file.
1 /* ========================================================================
2 * PROJECT: ARToolKitPlus
3 * ========================================================================
4 * This work is based on the original ARToolKit developed by
5 * Hirokazu Kato
6 * Mark Billinghurst
7 * HITLab, University of Washington, Seattle
8 * http://www.hitl.washington.edu/artoolkit/
9 *
10 * Copyright of the derived and new portions of this work
11 * (C) 2006 Graz University of Technology
12 *
13 * This framework is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
17 *
18 * This framework is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this framework; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 *
27 * For further information please contact
28 * Dieter Schmalstieg
29 * <schmalstieg@icg.tu-graz.ac.at>
30 * Graz University of Technology,
31 * Institut for Computer Graphics and Vision,
32 * Inffeldgasse 16a, 8010 Graz, Austria.
33 * ========================================================================
34 ** @author Daniel Wagner
35 *
36 * $Id: Tracker.h 172 2006-07-25 14:05:47Z daniel $
37 * @file
38 * ======================================================================== */
39 
40 
41 #ifndef __ARTOOLKIT_TRACKER_HEADERFILE__
42 #define __ARTOOLKIT_TRACKER_HEADERFILE__
43 
44 
46 #include <ARToolKitPlus/ar.h>
47 #include <ARToolKitPlus/arMulti.h>
48 #include <ARToolKitPlus/Logger.h>
50 #include <ARToolKitPlus/Camera.h>
51 
52 
53 namespace ARToolKitPlus {
54 
55 
57 
70 class Tracker
71 {
72 public:
73  virtual ~Tracker()
74  {}
75 
77  virtual void cleanup() = 0;
78 
79 
81 
84  virtual bool setPixelFormat(PIXEL_FORMAT nFormat) = 0;
85 
86 
88 
95  virtual bool loadCameraFile(const char* nCamParamFile, ARFloat nNearClip, ARFloat nFarClip) = 0;
96 
97 
99 
105  virtual void setLoadUndistLUT(bool nSet) = 0;
106 
107 
109  virtual void setLogger(ARToolKitPlus::Logger* nLogger) = 0;
110 
111 
113  virtual int arDetectMarker(ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num) = 0;
114 
115 
117  virtual int arDetectMarkerLite(ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num) = 0;
118 
119 
121  virtual ARFloat arMultiGetTransMat(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) = 0;
123  virtual ARFloat arGetTransMat(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
124 
125  virtual ARFloat arGetTransMatCont(ARMarkerInfo *marker_info, ARFloat prev_conv[3][4], ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
126 
127  // RPP integration -- [t.pintaric]
128  virtual ARFloat rppMultiGetTransMat(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) = 0;
129  virtual ARFloat rppGetTransMat(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
130 
131 
133  virtual int arLoadPatt(char *filename) = 0;
134 
135 
137  virtual int arFreePatt(int patno) = 0;
138 
140  virtual int arMultiFreeConfig( ARMultiMarkerInfoT *config ) = 0;
141 
143  virtual ARMultiMarkerInfoT *arMultiReadConfigFile(const char *filename) = 0;
144 
146 
149  virtual void activateBinaryMarker(int nThreshold) = 0;
150 
152 
160  virtual void setMarkerMode(MARKER_MODE nMarkerMode) = 0;
161 
162 
164 
175  virtual void activateVignettingCompensation(bool nEnable, int nCorners=0, int nLeftRight=0, int nTopBottom=0) = 0;
176 
177 
179  virtual void changeCameraSize(int nWidth, int nHeight) = 0;
180 
181 
183 
187  virtual void setUndistortionMode(UNDIST_MODE nMode) = 0;
188 
190 
194  virtual bool setPoseEstimator(POSE_ESTIMATOR nMethod) = 0;
195 
197 
203  virtual void setBorderWidth(ARFloat nFraction) = 0;
204 
205 
207  virtual void setThreshold(int nValue) = 0;
208 
209 
211  virtual int getThreshold() const = 0;
212 
213 
215  virtual void activateAutoThreshold(bool nEnable) = 0;
216 
217 
219  virtual bool isAutoThresholdActivated() const = 0;
220 
221 
223 
232  virtual void setNumAutoThresholdRetries(int nNumRetries) = 0;
233 
234 
236 
241  virtual void setImageProcessingMode(IMAGE_PROC_MODE nMode) = 0;
242 
243 
245  virtual const ARFloat* getModelViewMatrix() const = 0;
246 
247 
249  virtual const ARFloat* getProjectionMatrix() const = 0;
250 
251 
253  virtual const char* getDescription() = 0;
254 
255 
257  virtual PIXEL_FORMAT getPixelFormat() const = 0;
258 
259 
261  virtual int getBitsPerPixel() const = 0;
262 
263 
265 
269  virtual int getNumLoadablePatterns() const = 0;
270 
271 
273  virtual Camera* getCamera() = 0;
274 
275 
277  virtual void setCamera(Camera* nCamera) = 0;
278 
279 
281  virtual void setCamera(Camera* nCamera, ARFloat nNearClip, ARFloat nFarClip) = 0;
282 
283 
285  virtual ARFloat calcOpenGLMatrixFromMarker(ARMarkerInfo* nMarkerInfo, ARFloat nPatternCenter[2], ARFloat nPatternSize, ARFloat *nOpenGLMatrix) = 0;
286 
287 
289  virtual Profiler& getProfiler() = 0;
290 
291 
293  virtual ARFloat executeSingleMarkerPoseEstimator(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
294 
296  virtual ARFloat executeMultiMarkerPoseEstimator(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) = 0;
297 };
298 
299 
300 } // namespace ARToolKitPlus
301 
302 
303 #endif //__ARTOOLKIT_TRACKER_HEADERFILE__
virtual int getThreshold() const =0
Returns the current threshold value.
virtual ARMultiMarkerInfoT * arMultiReadConfigFile(const char *filename)=0
reads a standard artoolkit multimarker config file
filename
virtual void setLoadUndistLUT(bool nSet)=0
Set to true to try loading camera undistortion table from a cache file.
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 void setBorderWidth(ARFloat nFraction)=0
Sets a new relative border width. ARToolKit&#39;s default value is 0.25.
virtual int getNumLoadablePatterns() const =0
Returns the maximum number of patterns that can be loaded.
virtual const ARFloat * getProjectionMatrix() const =0
Returns an opengl-style projection transformation matrix.
virtual ~Tracker()
Definition: Tracker.h:73
virtual const char * getDescription()=0
Returns a short description with compiled-in settings.
virtual int arDetectMarker(ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num)=0
marker detection using tracking history
virtual bool setPoseEstimator(POSE_ESTIMATOR nMethod)=0
Changes the Pose Estimation Algorithm.
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 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 bool loadCameraFile(const char *nCamParamFile, ARFloat nNearClip, ARFloat nFarClip)=0
Loads a camera calibration file and stores data internally.
virtual bool setPixelFormat(PIXEL_FORMAT nFormat)=0
Sets the pixel format of the camera image.
virtual int arMultiFreeConfig(ARMultiMarkerInfoT *config)=0
frees a multimarker config from memory
virtual ARFloat executeMultiMarkerPoseEstimator(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config)=0
Calls the pose estimator set with setPoseEstimator() for multi marker tracking.
virtual int arDetectMarkerLite(ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num)=0
marker detection without using tracking history
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
Tracker is the vision core of ARToolKit.
Definition: Tracker.h:70
virtual void cleanup()=0
does final clean up (memory deallocation)
virtual Profiler & getProfiler()=0
Returns the internal profiler object.
This file should only be compiled when using ARToolKitPlus as a DLL.
Definition: ar.h:60
virtual void setLogger(ARToolKitPlus::Logger *nLogger)=0
sets an instance which implements the ARToolKit::Logger interface
virtual void setCamera(Camera *nCamera)=0
Sets a new camera without specifying new near and far clip values.
virtual void setUndistortionMode(UNDIST_MODE nMode)=0
Changes the undistortion mode.
unsigned char ARUint8
Definition: ar.h:66
virtual bool isAutoThresholdActivated() const =0
Returns true if automatic threshold calculation is activated.
virtual PIXEL_FORMAT getPixelFormat() const =0
Returns the compiled-in pixel format.
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 ARFloat rppMultiGetTransMat(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config)=0
virtual Camera * getCamera()=0
Returns the current camera.
virtual void setImageProcessingMode(IMAGE_PROC_MODE nMode)=0
Sets an image processing mode (half or full resolution)
ARToolKit::Logger specifies the interface for a logging application.
Definition: Logger.h:61
virtual int arLoadPatt(char *filename)=0
loads a pattern from a file
virtual void setNumAutoThresholdRetries(int nNumRetries)=0
Sets the number of times the threshold is randomized in case no marker was visible (Default: 2) ...
virtual int getBitsPerPixel() const =0
Returns the number of bits required to store a single pixel.
virtual int arFreePatt(int patno)=0
frees a pattern from memory
float ARFloat
Definition: config.h:60
virtual const ARFloat * getModelViewMatrix() const =0
Returns an opengl-style modelview transformation matrix.
virtual ARFloat arGetTransMatCont(ARMarkerInfo *marker_info, ARFloat prev_conv[3][4], ARFloat center[2], ARFloat width, ARFloat conv[3][4])=0
virtual ARFloat rppGetTransMat(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4])=0
virtual void activateAutoThreshold(bool nEnable)=0
Enables or disables automatic threshold calculation.
virtual void setMarkerMode(MARKER_MODE nMarkerMode)=0
activate the usage of id-based markers rather than template based markers
virtual void activateBinaryMarker(int nThreshold)=0
activates binary markers
virtual void setThreshold(int nValue)=0
Sets the threshold value that is used for black/white conversion.


tuw_artoolkitplus
Author(s): Markus Bader
autogenerated on Sun Sep 4 2016 03:24:33