Go to the documentation of this file.00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00025 
00026 
00027 
00028 
00029 
00030 
00031 
00032 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 #ifndef __ARTOOLKIT_TRACKER_HEADERFILE__
00042 #define __ARTOOLKIT_TRACKER_HEADERFILE__
00043 
00044 
00045 #include <ARToolKitPlus/ARToolKitPlus.h>
00046 #include <ARToolKitPlus/ar.h>
00047 #include <ARToolKitPlus/arMulti.h>
00048 #include <ARToolKitPlus/Logger.h>
00049 #include <ARToolKitPlus/extra/Profiler.h>
00050 #include <ARToolKitPlus/Camera.h>
00051 
00052 
00053 namespace ARToolKitPlus {
00054 
00055 
00057 
00070 class Tracker
00071 {
00072 public:
00073         virtual ~Tracker()
00074         {}
00075 
00077         virtual void cleanup() = 0;
00078 
00079 
00081 
00084         virtual bool setPixelFormat(PIXEL_FORMAT nFormat) = 0;
00085 
00086 
00088 
00095         virtual bool loadCameraFile(const char* nCamParamFile, ARFloat nNearClip, ARFloat nFarClip) = 0;
00096 
00097 
00099 
00105         virtual void setLoadUndistLUT(bool nSet) = 0;
00106 
00107 
00109         virtual void setLogger(ARToolKitPlus::Logger* nLogger) = 0;
00110 
00111 
00113         virtual int arDetectMarker(ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num) = 0;
00114 
00115 
00117         virtual int arDetectMarkerLite(ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num) = 0;
00118 
00119 
00121         virtual ARFloat arMultiGetTransMat(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) = 0;
00123         virtual ARFloat arGetTransMat(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
00124 
00125         virtual ARFloat arGetTransMatCont(ARMarkerInfo *marker_info, ARFloat prev_conv[3][4], ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
00126 
00127         
00128         virtual ARFloat rppMultiGetTransMat(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) = 0;
00129         virtual ARFloat rppGetTransMat(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
00130 
00131 
00133         virtual int arLoadPatt(char *filename) = 0;
00134 
00135 
00137         virtual int arFreePatt(int patno) = 0;
00138 
00140         virtual int arMultiFreeConfig( ARMultiMarkerInfoT *config ) = 0;
00141 
00143         virtual ARMultiMarkerInfoT *arMultiReadConfigFile(const char *filename) = 0;
00144 
00146 
00149         virtual void activateBinaryMarker(int nThreshold) = 0;
00150 
00152 
00160         virtual void setMarkerMode(MARKER_MODE nMarkerMode) = 0;
00161 
00162 
00164 
00175         virtual void activateVignettingCompensation(bool nEnable, int nCorners=0, int nLeftRight=0, int nTopBottom=0) = 0;
00176 
00177         
00179         virtual void changeCameraSize(int nWidth, int nHeight) = 0;
00180 
00181 
00183 
00187         virtual void setUndistortionMode(UNDIST_MODE nMode) = 0;
00188 
00190 
00194         virtual bool setPoseEstimator(POSE_ESTIMATOR nMethod) = 0;
00195 
00197 
00203         virtual void setBorderWidth(ARFloat nFraction) = 0;
00204 
00205 
00207         virtual void setThreshold(int nValue) = 0;
00208 
00209 
00211         virtual int getThreshold() const = 0;
00212 
00213 
00215         virtual void activateAutoThreshold(bool nEnable) = 0;
00216 
00217         
00219         virtual bool isAutoThresholdActivated() const = 0;
00220 
00221 
00223 
00232         virtual void setNumAutoThresholdRetries(int nNumRetries) = 0;
00233 
00234 
00236 
00241         virtual void setImageProcessingMode(IMAGE_PROC_MODE nMode) = 0;
00242 
00243 
00245         virtual const ARFloat* getModelViewMatrix() const = 0;
00246 
00247 
00249         virtual const ARFloat* getProjectionMatrix() const = 0;
00250 
00251 
00253         virtual const char* getDescription() = 0;
00254 
00255 
00257         virtual PIXEL_FORMAT getPixelFormat() const = 0;
00258 
00259 
00261         virtual int getBitsPerPixel() const = 0;
00262 
00263 
00265 
00269         virtual int getNumLoadablePatterns() const = 0;
00270 
00271 
00273         virtual Camera* getCamera() = 0;
00274 
00275 
00277         virtual void setCamera(Camera* nCamera) = 0;
00278 
00279 
00281         virtual void setCamera(Camera* nCamera, ARFloat nNearClip, ARFloat nFarClip) = 0;
00282 
00283 
00285         virtual ARFloat calcOpenGLMatrixFromMarker(ARMarkerInfo* nMarkerInfo, ARFloat nPatternCenter[2], ARFloat nPatternSize, ARFloat *nOpenGLMatrix) = 0;
00286 
00287 
00289         virtual Profiler& getProfiler() = 0;
00290 
00291 
00293         virtual ARFloat executeSingleMarkerPoseEstimator(ARMarkerInfo *marker_info, ARFloat center[2], ARFloat width, ARFloat conv[3][4]) = 0;
00294 
00296         virtual ARFloat executeMultiMarkerPoseEstimator(ARMarkerInfo *marker_info, int marker_num, ARMultiMarkerInfoT *config) = 0;
00297 };
00298 
00299 
00300 }       
00301 
00302 
00303 #endif //__ARTOOLKIT_TRACKER_HEADERFILE__