61 ArTkMarker(std::string filePath,
unsigned int nid,
float size,
unsigned int maxFeatures = 600);
65 ArTkMarker(cv::Mat tpl,
unsigned int mid,
float size,
unsigned int maxFeatures = 600);
86 bool TrackFrame(AR2HandleT* ar2handle,
const cv::Mat &color,
const cv::Mat &frame,
ArCameraParam &camParams,
const bool &reverse);
97 boost::recursive_mutex m_mutex;
98 boost::recursive_mutex m_dataMutex;
99 boost::recursive_mutex m_trainningMutex;
100 boost::thread m_trainingThread;
101 float mCamPose[3][4];
102 ARdouble mTackingPos[3][4];
103 int mNumGoodTracking;
105 unsigned int m_maxFeatures;
109 KpmRefDataSet* m_refDataSet;
110 AR2SurfaceSetT* m_surfaceSet;
111 AR2FeatureSetT* m_featureSet;
112 ARFilterTransMatInfo* m_ftmi;
113 bool m_cancelTrainning;
114 std::vector<cv::Point2f> m_pcorners;
115 cv::Size m_lastFrameSize;
117 bool m_registerNextFrame;
120 cv::Size m_imageSize;
125 bool initTrackingPicture();
129 void CommonConstructor();
131 void SetTracked(
bool state);
133 void SetTrainned(
bool state);
137 void WarpMarkerImage(cv::Mat color);
139 bool LoadData(std::string filename);
148 bool LoadData(boost::filesystem::path path, KpmRefDataSet** refDataSetPtr, AR2SurfaceSetT** surfaceSetPtr);
150 bool LoadRefDataSet(boost::filesystem::path path, KpmRefDataSet** refDataSetPtr);
151 bool LoadFeatureSet(boost::filesystem::path path, AR2SurfaceSetT** surfaceSetPtr);
152 AR2FeatureSetT* ReadFeatureSet(boost::filesystem::path path);
153 AR2ImageT* GetImageLayer(AR2ImageT* src,
float dpi);
154 AR2ImageSetT* GetImageSet(boost::filesystem::path path);
155 AR2ImageSetT* LoadRawImageSet(FILE* fp);