44 #ifndef vpMbKltTracker_h 45 #define vpMbKltTracker_h 47 #include <visp3/core/vpConfig.h> 49 #if defined(VISP_HAVE_MODULE_KLT) && (defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100)) 51 #include <visp3/core/vpExponentialMap.h> 52 #include <visp3/core/vpMeterPixelConversion.h> 53 #include <visp3/core/vpPixelMeterConversion.h> 54 #include <visp3/core/vpSubColVector.h> 55 #include <visp3/core/vpSubMatrix.h> 56 #include <visp3/klt/vpKltOpencv.h> 57 #include <visp3/mbt/vpMbTracker.h> 58 #include <visp3/mbt/vpMbtDistanceCircle.h> 59 #include <visp3/mbt/vpMbtDistanceKltCylinder.h> 60 #include <visp3/mbt/vpMbtDistanceKltPoints.h> 61 #include <visp3/mbt/vpMbtKltXmlParser.h> 62 #include <visp3/vision/vpHomography.h> 239 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408) 292 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
294 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
308 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408) 392 #ifdef VISP_HAVE_OGRE 406 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it = kltPolygons.begin(); it != kltPolygons.end(); ++it)
407 (*it)->useScanLine = v;
421 std::cerr <<
"This option is not yet implemented in vpMbKltTracker, " 422 "projection error computation set to false." 492 const std::string &name =
"");
502 #endif // VISP_HAVE_OPENCV void setWindowName(const Ogre::String &n)
void setThresholdAcceptation(const double th)
Implementation of a matrix and operations on matrices.
virtual ~vpMbKltTracker()
virtual void setScanLineVisibilityTest(const bool &v)
virtual void track(const vpImage< unsigned char > &I)=0
virtual void computeVVSInteractionMatrixAndResidu()=0
virtual void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, const double r, const std::string &name="")
virtual void setUseKltTracking(const std::string &name, const bool &useKltTracking)
virtual void computeVVSInit()=0
vpMbHiddenFaces< vpMbtPolygon > faces
Set of faces describing the object.
std::vector< cv::Point2f > getFeatures() const
Get the list of current features.
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual std::list< vpMbtDistanceKltPoints * > & getFeaturesKlt()
virtual void setProjectionErrorComputation(const bool &flag)
virtual void loadConfigFile(const std::string &configFile)
Class to define colors available for display functionnalities.
std::list< vpMbtDistanceKltCylinder * > kltCylinders
vpHomogeneousMatrix cMo
The current pose.
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, const double radius, const int idFace=0, const std::string &name="")=0
vpMbScanLine & getMbScanLineRenderer()
vpColVector m_weightedError_klt
Weighted error.
Hybrid stereo (or more) tracker based on moving-edges and keypoints tracked using KLT tracker...
double getKltThresholdAcceptation() const
virtual vpColVector getError() const
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
void setKltMaskBorder(const unsigned int &e)
virtual void resetTracker()=0
virtual void computeVVS()
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages, const unsigned int lvl)
Class that defines what is a point.
int getKltNbPoints() const
vpCameraParameters cam
The camera parameters.
unsigned int getKltMaskBorder() const
vpHomogeneousMatrix ctTc0
virtual void init(const vpImage< unsigned char > &I)=0
unsigned int getMaskBorder() const
std::vector< cv::Point2f > getKltPoints() const
virtual std::map< std::string, std::vector< vpImagePoint > > getKltImagePoints() const
vpAROgre * getOgreContext()
vpRobust m_robust_klt
Robust.
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)=0
void setKltThresholdAcceptation(const double th)
Implementation of a polygon of the model used by the model-based tracker.
virtual void setCameraParameters(const vpCameraParameters &camera)
virtual std::list< vpMbtDistanceCircle * > & getFeaturesCircle()
virtual std::map< std::string, std::vector< cv::Point2f > > getKltPoints() const
unsigned int maskBorder
Erosion of the mask.
virtual void initFaceFromCorners(vpMbtPolygon &polygon)=0
Generic class defining intrinsic camera parameters.
unsigned int m_nbFaceUsed
Main methods for a model-based tracker.
virtual void preTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
Model based tracker using only KLT.
vpKltOpencv tracker
Points tracker.
virtual void setKltOpencv(const vpKltOpencv &t)
virtual std::map< std::string, std::map< int, vpImagePoint > > getKltImagePointsWithId() const
cv::Mat cur
Temporary OpenCV image for fast conversion.
int getNbKltPoints() const
virtual vpColVector getRobustWeights() const
vpColVector m_w_klt
Robust weights.
vpKltOpencv getKltOpencv() const
std::list< vpMbtDistanceCircle * > circles_disp
Vector of the circles used here only to display the full model.
virtual std::list< vpMbtDistanceKltCylinder * > & getFeaturesKltCylinder()
virtual void setOgreVisibilityTest(const bool &v)
void setMaskBorder(const unsigned int &e)
Implementation of column vector and the associated operations.
virtual void initFaceFromLines(vpMbtPolygon &polygon)=0
virtual void setOgreVisibilityTest(const bool &v)
virtual void testTracking()=0
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
int getNbFeatures() const
Get the number of current features.
Contains an M-Estimator and various influence function.
double getThresholdAcceptation() const
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)=0
virtual void setScanLineVisibilityTest(const bool &v)
vpColVector m_error_klt
(s - s*)
std::list< vpMbtDistanceKltPoints * > kltPolygons
Model based stereo (or more) tracker using only KLT.
vpHomogeneousMatrix c0Mo
Initial pose.
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, const double radius, const int idFace=0, const std::string &name="")=0
vpMatrix m_L_klt
Interaction matrix.