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>
61 # include <Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h>
62 # include <Inventor/VRMLnodes/SoVRMLIndexedLineSet.h>
123 virtual void initClick(
const vpImage<unsigned char>& _I,
const std::string& _initFile,
const bool _displayHelp =
false );
124 virtual void initClick(
const vpImage<unsigned char>& _I,
const std::vector<vpPoint> &points3D_list,
const std::string &displayFile =
"" );
127 virtual void initFromPoints(
const vpImage<unsigned char>& _I,
const std::vector<vpImagePoint> &points2D_list,
const std::vector<vpPoint> &points3D_list );
147 virtual void testTracking() = 0;
156 virtual void loadConfigFile(
const std::string& _configFile)=0;
167 virtual void loadModel(
const std::string& _modelFile);
209 if(!computeCovariance)
210 vpTRACE(
"Warning : The covariance matrix has not been computed. See setCovarianceComputation() to do it.");
212 return covarianceMatrix;
243 poseSavingFilename = filename;
246 void savePose(
const std::string &filename);
249 virtual void loadVRMLModel(
const std::string& _modelFile);
250 virtual void loadCAOModel(
const std::string& _modelFile);
254 #ifdef VISP_HAVE_COIN
255 virtual void extractFaces(SoVRMLIndexedFaceSet* _face_set);
256 virtual void extractLines(SoVRMLIndexedLineSet* _line_set);
257 virtual void extractCylinders(SoVRMLIndexedFaceSet* _face_set);
259 vpPoint getGravityCenter(
const std::vector<vpPoint>& _pts);
269 virtual void initFaceFromCorners(
const std::vector<vpPoint>& _corners,
const unsigned int _indexFace = -1)=0;
280 virtual void initCylinder(
const vpPoint& _p1,
const vpPoint _p2,
const double _radius,
const unsigned int _indexCylinder=0)=0;
282 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
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.
bool cameraInitialised
Flag used to ensure that the camera is set before the initialisation.
Class that defines what is a point.
vpCameraParameters cam
The camera parameters.
virtual void getCameraParameters(vpCameraParameters &_cam) 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 coinUsed
Flag used to specify that the Coin library has been loaded in order to load a vrml model (used to fre...
virtual void setCameraParameters(const vpCameraParameters &_cam)
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 getPose(vpHomogeneousMatrix &_cMo) const
virtual vpMatrix getCovarianceMatrix() const