39 #ifndef _vpMbEdgeKltTracker_h_
40 #define _vpMbEdgeKltTracker_h_
42 #include <visp3/core/vpConfig.h>
44 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
46 #include <visp3/core/vpExponentialMap.h>
47 #include <visp3/core/vpPoseVector.h>
48 #include <visp3/core/vpSubColVector.h>
49 #include <visp3/core/vpSubMatrix.h>
50 #include <visp3/klt/vpKltOpencv.h>
51 #include <visp3/mbt/vpMbEdgeTracker.h>
52 #include <visp3/mbt/vpMbKltTracker.h>
53 #include <visp3/mbt/vpMbTracker.h>
207 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
233 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false) vp_override;
235 const
vpColor &col,
unsigned int thickness = 1,
bool displayFullModel = false) vp_override;
237 virtual inline
vpColVector getError() const vp_override {
return m_error_hybrid; }
239 virtual std::vector<std::vector<double> >
getModelForDisplay(
unsigned int width,
unsigned int height,
242 bool displayFullModel =
false) vp_override;
244 virtual inline
vpColVector getRobustWeights() const vp_override {
return m_w_hybrid; }
253 virtual void loadConfigFile(
const std::string &configFile,
bool verbose =
true) vp_override;
257 void resetTracker() vp_override;
295 #ifdef VISP_HAVE_OGRE
296 faces.getOgreContext()->setWindowName(
"MBT Hybrid");
331 unsigned int lvl = 0,
double *edge_residual =
nullptr,
double *klt_residual =
nullptr);
333 virtual
void computeVVSInteractionMatrixAndResidu() vp_override;
337 virtual
void init(const
vpImage<
unsigned char> &I) vp_override;
339 const std::
string &name = "") vp_override;
340 virtual
void initCylinder(const
vpPoint &, const
vpPoint &,
double r,
int idFace, const std::
string &name = "") vp_override;
341 virtual
void initFaceFromCorners(
vpMbtPolygon &polygon) vp_override;
342 virtual
void initFaceFromLines(
vpMbtPolygon &polygon) vp_override;
343 unsigned int initMbtTracking(
unsigned int level = 0);
347 void postTrackingMbt(
vpColVector &w,
unsigned int level = 0);
349 unsigned int trackFirstLoop(const
vpImage<
unsigned char> &I,
vpColVector &factor,
unsigned int lvl = 0);
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of a matrix and operations on matrices.
Hybrid tracker based on moving-edges and keypoints tracked using KLT tracker.
double m_thresholdKLT
The threshold used in the robust estimation of KLT.
virtual void testTracking() vp_override
virtual void setOgreVisibilityTest(const bool &v) vp_override
virtual void setProjectionErrorComputation(const bool &flag) vp_override
virtual void setScanLineVisibilityTest(const bool &v) vp_override
vpColVector m_w_mbt
Robust weights for Edge.
virtual double getNearClippingDistance() const vp_override
virtual void setNearClippingDistance(const double &dist) vp_override
vpColVector m_error_hybrid
(s - s*)
virtual void setFarClippingDistance(const double &dist) vp_override
vpColVector m_w_klt
Robust weights for KLT.
double m_thresholdMBT
The threshold used in the robust estimation of MBT.
unsigned int m_maxIterKlt
The maximum iteration of the virtual visual servoing stage.
vpColVector m_w_hybrid
Robust weights.
Make the complete tracking of an object by using its CAD model.
void computeVVS(const vpImage< unsigned char > &_I, unsigned int lvl)
virtual void setNearClippingDistance(const double &dist) vp_override
virtual void setFarClippingDistance(const double &dist) vp_override
virtual void loadConfigFile(const std::string &configFile, bool verbose=true) vp_override
virtual void track(const vpImage< unsigned char > &I) vp_override
virtual void setClipping(const unsigned int &flags) vp_override
virtual void setScanLineVisibilityTest(const bool &v) vp_override
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false) vp_override
virtual void computeVVSInit() vp_override
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false) vp_override
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo) vp_override
Model based tracker using only KLT.
virtual void setScanLineVisibilityTest(const bool &v) vp_override
Main methods for a model-based tracker.
virtual double getNearClippingDistance() const
virtual void setOgreVisibilityTest(const bool &v)
virtual void setProjectionErrorComputation(const bool &flag)
Implementation of a polygon of the model used by the model-based tracker.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...