00001
00022 #ifndef __ARTOOLKITPLUS_TRACKERSINGLEMARKERIMPL_HEADERFILE__
00023 #define __ARTOOLKITPLUS_TRACKERSINGLEMARKERIMPL_HEADERFILE__
00024
00025 #include <ARToolKitPlus/Tracker.h>
00026
00027 namespace ARToolKitPlus {
00028
00039 class AR_EXPORT TrackerSingleMarker: public Tracker {
00040 public:
00058 TrackerSingleMarker(int imWidth, int imHeight, int maxImagePatterns = 8, int pattWidth = 6, int pattHeight = 6, int pattSamples = 6,
00059 int maxLoadPatterns = 0);
00060
00066 virtual bool init(const char* nCamParamFile, ARFloat nNearClip, ARFloat nFarClip);
00067
00072 virtual int addPattern(const char* nFileName);
00073
00079 virtual std::vector<int> calc(const uint8_t* nImage, ARMarkerInfo** nMarker_info = NULL, int* nNumMarkers = NULL);
00080
00085 virtual void selectDetectedMarker(const int id);
00086
00090 virtual int selectBestMarkerByCf();
00091
00096 virtual void setPatternWidth(ARFloat nWidth) {
00097 patt_width = nWidth;
00098 }
00099
00107 virtual void getARMatrix(ARFloat nMatrix[3][4]) const;
00108
00112 virtual float getConfidence() const {
00113 return (float)confidence;
00114 }
00115
00116 protected:
00117 ARFloat confidence;
00118 ARFloat patt_width;
00119 ARFloat patt_center[2];
00120 ARFloat patt_trans[3][4];
00121
00122
00123 ARMarkerInfo *marker_info;
00124 int marker_num;
00125 };
00126
00127 }
00128
00129 #endif //__ARTOOLKITPLUS_TRACKERSINGLEMARKERIMPL_HEADERFILE__