47 #ifndef vpMbTracker_hh
48 #define vpMbTracker_hh
50 #include <visp/vpHomogeneousMatrix.h>
51 #include <visp/vpImage.h>
52 #include <visp/vpImagePoint.h>
53 #include <visp/vpColVector.h>
54 #include <visp/vpMatrix.h>
55 #include <visp/vpRGBa.h>
56 #include <visp/vpCameraParameters.h>
57 #include <visp/vpPoint.h>
58 #include <visp/vpMbtPolygon.h>
59 #include <visp/vpMbHiddenFaces.h>
68 # include <Inventor/VRMLnodes/SoVRMLGroup.h>
69 # include <Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h>
70 # include <Inventor/VRMLnodes/SoVRMLIndexedLineSet.h>
140 const vpColor& col ,
const unsigned int thickness=1,
const bool displayFullModel =
false)=0;
153 const vpColor& col ,
const unsigned int thickness=1,
const bool displayFullModel =
false)=0;
166 if(!computeCovariance)
167 vpTRACE(
"Warning : The covariance matrix has not been computed. See setCovarianceComputation() to do it.");
169 return covarianceMatrix;
201 virtual void initClick(
const vpImage<unsigned char>& I,
const std::string& initFile,
const bool displayHelp =
false );
203 const std::string &displayFile =
"" );
206 virtual void initFromPoints(
const vpImage<unsigned char>& I,
const std::vector<vpImagePoint> &points2D_list,
const std::vector<vpPoint> &points3D_list );
219 virtual void loadConfigFile(
const std::string& configFile)=0;
221 virtual void loadModel(
const std::string& modelFile);
226 virtual void resetTracker() = 0;
228 void savePose(
const std::string &filename);
272 poseSavingFilename = filename;
280 virtual void testTracking() = 0;
292 #ifdef VISP_HAVE_COIN
293 virtual void extractGroup(SoVRMLGroup *sceneGraphVRML2,
vpHomogeneousMatrix &transform,
unsigned int &indexFace);
294 virtual void extractFaces(SoVRMLIndexedFaceSet* face_set,
vpHomogeneousMatrix &transform,
unsigned int &indexFace);
295 virtual void extractLines(SoVRMLIndexedLineSet* line_set);
296 virtual void extractCylinders(SoVRMLIndexedFaceSet* face_set,
vpHomogeneousMatrix &transform);
299 vpPoint getGravityCenter(
const std::vector<vpPoint>& _pts);
310 virtual void initCylinder(
const vpPoint& p1,
const vpPoint p2,
const double radius,
const unsigned int indexCylinder=0)=0;
320 virtual void initFaceFromCorners(
const std::vector<vpPoint>& corners,
const unsigned int indexFace = -1)=0;
322 virtual void loadVRMLModel(
const std::string& modelFile);
323 virtual void loadCAOModel(
const std::string& modelFile);
virtual void setCovarianceComputation(const bool &flag)
Definition of the vpMatrix class.
vpMatrix covarianceMatrix
Covariance matrix.
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
Class to define colors available for display functionnalities.
vpHomogeneousMatrix cMo
The current pose.
bool modelInitialised
Flag used to ensure that the CAD model is loaded before the initialisation.
vpHomogeneousMatrix getPose() const
std::string modelFileName
The name of the file containing the model (it is used to create a file name.0.pos used to store the c...
bool computeCovariance
Flag used to specify if the covariance matrix has to be computed or not.
Class that defines what is a point.
vpCameraParameters cam
The camera parameters.
virtual void setCameraParameters(const vpCameraParameters &cam)
Generic class defining intrinsic camera parameters.
Main methods for a model-based tracker.
std::string poseSavingFilename
Filename used to save the initial pose computed using the initClick() method. It is also used to read...
virtual void getCameraParameters(vpCameraParameters &cam) const
bool coinUsed
Flag used to specify that the Coin library has been loaded in order to load a vrml model (used to fre...
bool displayFeatures
If true, the features are displayed.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
The pose is a complete representation of every rigid motion in the euclidian space.
void setPoseSavingFilename(const std::string &filename)
void setDisplayFeatures(const bool displayF)
void getPose(vpHomogeneousMatrix &cMo) const
virtual vpMatrix getCovarianceMatrix() const