45 #ifndef __vpMbEdgeMultiTracker_h__
46 #define __vpMbEdgeMultiTracker_h__
51 #include <visp3/mbt/vpMbEdgeTracker.h>
52 #include <visp3/core/vpRobust.h>
96 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel=
false);
99 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel=
false);
103 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel=
false);
107 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel=
false);
110 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
111 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
112 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel=
false);
115 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
116 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
117 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel=
false);
119 virtual std::vector<std::string> getCameraNames()
const;
124 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
127 virtual unsigned int getClipping(
const std::string &cameraName)
const;
131 virtual std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> >
getFaces()
const;
133 void getLcircle(std::list<vpMbtDistanceCircle *>& circlesList,
const unsigned int level=0)
const;
134 virtual void getLcircle(
const std::string &cameraName, std::list<vpMbtDistanceCircle *>& circlesList,
135 const unsigned int level=0)
const;
137 void getLcylinder(std::list<vpMbtDistanceCylinder *>& cylindersList,
const unsigned int level=0)
const;
138 virtual void getLcylinder(
const std::string &cameraName, std::list<vpMbtDistanceCylinder *>& cylindersList,
139 const unsigned int level=0)
const;
141 void getLline(std::list<vpMbtDistanceLine *>& linesList,
const unsigned int level=0)
const;
142 virtual void getLline(
const std::string &cameraName, std::list<vpMbtDistanceLine *>& linesList,
143 const unsigned int level=0)
const;
150 virtual unsigned int getNbPoints(
const unsigned int level=0)
const;
151 virtual unsigned int getNbPoints(
const std::string &cameraName,
const unsigned int level=0)
const;
155 virtual unsigned int getNbPolygon(
const std::string &cameraName)
const;
156 virtual std::map<std::string, unsigned int> getMultiNbPolygon()
const;
164 return (
unsigned int) m_mapOfEdgeTrackers.size();
170 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
174 #ifdef VISP_HAVE_MODULE_GUI
176 const std::string &displayFile=
"");
181 const std::string& initFile1,
const std::string& initFile2,
const bool displayHelp=
false,
182 const bool firstCameraIsReference=
true);
185 const std::string &initFile,
const bool displayHelp=
false);
188 const std::map<std::string, std::string> &mapOfInitFiles,
const bool displayHelp=
false);
200 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
204 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
205 const bool firstCameraIsReference=
true);
207 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
209 virtual void loadModel(
const std::string &modelFile,
const bool verbose=
false);
212 const bool verbose=
false);
215 const bool verbose=
false,
const bool firstCameraIsReference=
true);
217 const std::string &cad_name,
const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
218 const bool verbose=
false);
228 const bool firstCameraIsReference=
true);
232 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
234 virtual void setCameraTransformationMatrix(
const std::string &cameraName,
237 virtual void setCameraTransformationMatrix(
const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix);
239 virtual void setClipping(
const unsigned int &flags);
240 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
251 #ifdef VISP_HAVE_OGRE
272 virtual void setLod(
const bool useLod,
const std::string &name=
"");
273 virtual void setLod(
const bool useLod,
const std::string &cameraName,
const std::string &name);
277 const std::string &name);
281 const std::string &name);
314 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
318 virtual void setReferenceCameraName(
const std::string &referenceCameraName);
320 virtual void setScales(
const std::vector<bool>& scales);
324 virtual void setUseEdgeTracking(
const std::string &name,
const bool &useEdgeTracking);
343 const unsigned int lvl);
347 std::map<std::string, unsigned int> &mapOfNumberOfLines,
348 std::map<std::string, unsigned int> &mapOfNumberOfCylinders, std::map<std::string, unsigned int> &mapOfNumberOfCircles,
349 std::map<std::string, vpColVector> &mapOfWeightLines, std::map<std::string, vpColVector> &mapOfWeightCylinders,
350 std::map<std::string, vpColVector> &mapOfWeightCircles, std::map<std::string, vpColVector> &mapOfErrorLines,
351 std::map<std::string, vpColVector> &mapOfErrorCylinders, std::map<std::string, vpColVector> &mapOfErrorCircles,
352 std::map<std::string, vpRobust> &mapOfRobustLines, std::map<std::string, vpRobust> &mapOfRobustCylinders,
353 std::map<std::string, vpRobust> &mapOfRobustCircles,
double threshold);
virtual void setDisplayFeatures(const bool displayF)
std::string m_referenceCameraName
Name of the reference camera.
void getLline(std::list< vpMbtDistanceLine * > &linesList, const unsigned int level=0) const
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void setCovarianceComputation(const bool &flag)
void setMovingEdge(const vpMe &me)
virtual unsigned int getClipping() const
virtual void setAngleDisappear(const double &a)
Implementation of an homogeneous matrix and operations on such kind of matrices.
void init(const vpImage< unsigned char > &I)
void track(const vpImage< unsigned char > &I)
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
void getLcircle(std::list< vpMbtDistanceCircle * > &circlesList, const unsigned int level=0) const
Class to define colors available for display functionnalities.
void computeVVSSecondPhaseWeights(const unsigned int iter, const unsigned int nerror, const unsigned int nbrow, vpColVector &weighted_error, vpRobust &robust_lines, vpRobust &robust_cylinders, vpRobust &robust_circles, vpColVector &w_lines, vpColVector &w_cylinders, vpColVector &w_circles, vpColVector &error_lines, vpColVector &error_cylinders, vpColVector &error_circles, const unsigned int nberrors_lines, const unsigned int nberrors_cylinders, const unsigned int nberrors_circles)
Make the complete tracking of an object by using its CAD model.
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
virtual void setCameraParameters(const vpCameraParameters &camera)
void computeVVS(const vpImage< unsigned char > &_I, const unsigned int lvl)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
void loadConfigFile(const std::string &configFile)
void setGoodMovingEdgesRatioThreshold(const double threshold)
virtual unsigned int getNbPoints(const unsigned int level=0) const
virtual void setNearClippingDistance(const double &dist)
virtual void setOgreVisibilityTest(const bool &v)
void setOgreShowConfigDialog(const bool showConfigDialog)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false)
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
void getLcylinder(std::list< vpMbtDistanceCylinder * > &cylindersList, const unsigned int level=0) const
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
Map of camera transformation matrix between the current camera frame to the reference camera frame (c...
virtual void setScanLineVisibilityTest(const bool &v)
friend class vpMbEdgeMultiTracker
virtual vpHomogeneousMatrix getPose() const
virtual void getCameraParameters(vpCameraParameters &camera) const
Generic class defining intrinsic camera parameters.
void initPyramid(const vpImage< unsigned char > &_I, std::vector< const vpImage< unsigned char > * > &_pyramid)
void cleanPyramid(std::vector< const vpImage< unsigned char > * > &_pyramid)
virtual void setFarClippingDistance(const double &dist)
virtual void setAngleAppear(const double &a)
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, const bool displayHelp=false)
virtual vpMe getMovingEdge() const
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
unsigned int getNumberOfCameras() const
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
void computeProjectionError(const vpImage< unsigned char > &_I)
void setScales(const std::vector< bool > &_scales)
std::map< std::string, std::vector< const vpImage< unsigned char > * > > m_mapOfPyramidalImages
Map of pyramidal images for each camera.
virtual void loadModel(const char *modelFile, const bool verbose=false)
Implementation of column vector and the associated operations.
Implementation of a pose vector and operations on poses.
virtual unsigned int getNbPolygon() const
void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, const unsigned int thickness=1, const bool displayFullModel=false)
virtual void setClipping(const unsigned int &flags)
void setUseEdgeTracking(const std::string &name, const bool &useEdgeTracking)
std::map< std::string, vpMbEdgeTracker * > m_mapOfEdgeTrackers
Map of Model-based edge trackers.
Make the complete stereo (or more) tracking of an object by using its CAD model.
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
virtual void setProjectionErrorComputation(const bool &flag)
virtual void setLod(const bool useLod, const std::string &name="")