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>
138 const vpColor& col ,
const unsigned int thickness=1,
const bool displayFullModel =
false)=0;
151 const vpColor& col ,
const unsigned int thickness=1,
const bool displayFullModel =
false)=0;
164 if(!computeCovariance)
165 vpTRACE(
"Warning : The covariance matrix has not been computed. See setCovarianceComputation() to do it.");
167 return covarianceMatrix;
199 virtual void initClick(
const vpImage<unsigned char>& I,
const std::string& initFile,
const bool displayHelp =
false );
201 const std::string &displayFile =
"" );
204 virtual void initFromPoints(
const vpImage<unsigned char>& I,
const std::vector<vpImagePoint> &points2D_list,
const std::vector<vpPoint> &points3D_list );
217 virtual void loadConfigFile(
const std::string& configFile)=0;
219 virtual void loadModel(
const std::string& modelFile);
224 virtual void resetTracker() = 0;
226 void savePose(
const std::string &filename);
270 poseSavingFilename = filename;
278 virtual void testTracking() = 0;
290 #ifdef VISP_HAVE_COIN
291 virtual void extractGroup(SoVRMLGroup *sceneGraphVRML2,
vpHomogeneousMatrix &transform,
unsigned int &indexFace);
292 virtual void extractFaces(SoVRMLIndexedFaceSet* face_set,
vpHomogeneousMatrix &transform,
unsigned int &indexFace);
293 virtual void extractLines(SoVRMLIndexedLineSet* line_set);
294 virtual void extractCylinders(SoVRMLIndexedFaceSet* face_set,
vpHomogeneousMatrix &transform);
297 vpPoint getGravityCenter(
const std::vector<vpPoint>& _pts);
308 virtual void initCylinder(
const vpPoint& p1,
const vpPoint &p2,
const double radius,
const unsigned int indexCylinder=0)=0;
318 virtual void initFaceFromCorners(
const std::vector<vpPoint>& corners,
const unsigned int indexFace = -1)=0;
320 virtual void loadVRMLModel(
const std::string& modelFile);
321 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 &camera)
void getPose(vpHomogeneousMatrix &cMo_) const
virtual void getCameraParameters(vpCameraParameters &camera) const
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...
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)
virtual vpMatrix getCovarianceMatrix() const