46 #ifndef __vpMbEdgeKltMultiTracker_h__ 47 #define __vpMbEdgeKltMultiTracker_h__ 52 #include <visp3/core/vpConfig.h> 54 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100) 56 #include <visp3/mbt/vpMbEdgeMultiTracker.h> 57 #include <visp3/mbt/vpMbKltMultiTracker.h> 112 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
115 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
120 const bool displayFullModel =
false);
124 const vpColor &color,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
127 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
128 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
129 const unsigned int thickness = 1,
const bool displayFullModel =
false);
132 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
133 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
134 const unsigned int thickness = 1,
const bool displayFullModel =
false);
141 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
144 virtual unsigned int getClipping(
const std::string &cameraName)
const;
148 std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> > getEdgeFaces()
const;
150 std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> > getKltFaces()
const;
167 virtual std::map<std::string, unsigned int> getEdgeMultiNbPolygon()
const;
168 virtual std::map<std::string, unsigned int> getKltMultiNbPolygon()
const;
180 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
188 #ifdef VISP_HAVE_MODULE_GUI 190 const std::string &displayFile =
"");
195 const std::string &initFile1,
const std::string &initFile2,
const bool displayHelp =
false,
196 const bool firstCameraIsReference =
true);
199 const std::string &initFile,
const bool displayHelp =
false);
202 const std::map<std::string, std::string> &mapOfInitFiles,
const bool displayHelp =
false);
206 const std::string &name =
"");
215 const bool firstCameraIsReference =
true);
219 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
226 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
227 const bool firstCameraIsReference =
true);
229 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
231 virtual void loadModel(
const std::string &modelFile,
const bool verbose =
false);
238 const bool firstCameraIsReference =
true);
240 const std::string &cad_name,
241 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
242 const bool verbose =
false);
252 const bool firstCameraIsReference =
true);
256 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
264 virtual void setClipping(
const unsigned int &flags);
265 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
279 inline void setFactorKLT(
const double factor) { m_factorKLT = factor; }
286 inline void setFactorMBT(
const double factor) { m_factorMBT = factor; }
288 #ifdef VISP_HAVE_OGRE 312 virtual void setLod(
const bool useLod,
const std::string &name =
"");
313 virtual void setLod(
const bool useLod,
const std::string &cameraName,
const std::string &name);
317 const std::string &name);
321 const std::string &name);
336 const bool firstCameraIsReference =
true);
342 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
366 const unsigned int lvl = 0);
372 std::map<std::string, vpVelocityTwistMatrix> &mapOfVelocityTwist);
389 #endif // VISP_HAVE_OPENCV 390 #endif //__vpMbEdgeKltMultiTracker_h__ virtual unsigned int getClipping() const
Implementation of a matrix and operations on matrices.
virtual void loadModel(const std::string &modelFile, const bool verbose=false)
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
virtual void setFarClippingDistance(const double &dist)
virtual vpColVector getError() const
virtual void computeVVSWeights()
virtual void computeVVSInit()
virtual void setLod(const bool useLod, const std::string &name="")
double thresholdMBT
The threshold used in the robust estimation of MBT.
virtual void initFaceFromCorners(vpMbtPolygon &polygon)
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
virtual void setDisplayFeatures(const bool displayF)
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
friend class vpMbEdgeKltMultiTracker
Class to define colors available for display functionnalities.
virtual void track(const vpImage< unsigned char > &I)
virtual void setProjectionErrorComputation(const bool &flag)
double m_factorMBT
Factor for edge trackers.
virtual void loadConfigFile(const std::string &configFile)
unsigned int m_nbrow
Number of features.
virtual vpColVector getRobustWeights() const
virtual void setThresholdAcceptation(const double th)
Hybrid stereo (or more) tracker based on moving-edges and keypoints tracked using KLT tracker...
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setClipping(const unsigned int &flags)
virtual void setOgreShowConfigDialog(const bool showConfigDialog)
vpMatrix m_L_hybridMulti
Interaction matrix.
virtual void computeVVS()
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual void setNearClippingDistance(const double &dist)
vpColVector m_weightedError_hybridMulti
Weighted error.
Class that defines what is a point.
double thresholdKLT
The threshold used in the robust estimation of KLT.
virtual 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 vpHomogeneousMatrix getPose() const
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void initClick(const vpImage< unsigned char > &I, const std::vector< vpPoint > &points3D_list, const std::string &displayFile="")
void init(const vpImage< unsigned char > &I)
Implementation of a polygon of the model used by the model-based tracker.
virtual void setOgreVisibilityTest(const bool &v)
unsigned int getNumberOfCameras() const
vpColVector m_error_hybridMulti
(s - s*)
virtual void setScanLineVisibilityTest(const bool &v)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
virtual void setCameraParameters(const vpCameraParameters &camera)
Generic class defining intrinsic camera parameters.
unsigned int initMbtTracking(unsigned int &nberrors_lines, unsigned int &nberrors_cylinders, unsigned int &nberrors_circles)
virtual void setCameraTransformationMatrix(const std::string &cameraName, const vpHomogeneousMatrix &cameraTransformationMatrix)
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
void setFactorMBT(const double factor)
void setFactorKLT(const double factor)
virtual void setCovarianceComputation(const bool &flag)
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual void resetTracker()
double getFactorKLT() const
double getFactorMBT() const
virtual void initFaceFromLines(vpMbtPolygon &polygon)
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, const double radius, const int idFace=0, const std::string &name="")
Implementation of column vector and the associated operations.
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, const double radius, const int idFace=0, const std::string &name="")
Implementation of a pose vector and operations on poses.
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
std::string m_referenceCameraName
Name of the reference camera.
virtual unsigned int getNbPolygon() const
virtual void setAngleDisappear(const double &a)
double m_factorKLT
Factor for KLT trackers.
virtual void getCameraParameters(vpCameraParameters &camera) const
Make the complete stereo (or more) tracking of an object by using its CAD model.
virtual void computeVVS(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages, const unsigned int lvl)
vpColVector m_w_hybridMulti
Robust weights.
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false)
Model based stereo (or more) tracker using only KLT.
virtual std::vector< std::string > getCameraNames() const
virtual void setAngleAppear(const double &a)