 |
Visual Servoing Platform
version 3.2.0
|
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
virtual std::map< std::string, int > getNbKltPoints() const
virtual void loadConfigFile(const std::string &configFile)
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, const double radius, const int idFace=0, const std::string &name="")=0
unsigned int getMaskBorder() const
virtual void setProjectionErrorComputation(const bool &flag)
virtual vpColVector getError() const =0
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, const double radius, const int idFace=0, const std::string &name="")=0
vpColVector m_w_klt
Robust weights.
virtual std::map< std::string, vpKltOpencv > getKltOpencv() const
vpColVector m_error_klt
(s - s*)
int getNbFeatures() const
Get the number of current features.
virtual void computeVVSInteractionMatrixAndResidu()=0
double getThresholdAcceptation() const
Hybrid stereo (or more) tracker based on moving-edges and keypoints tracked using KLT tracker.
vpHomogeneousMatrix cMo
The current pose.
virtual void computeVVSInit()=0
Generic class defining intrinsic camera parameters.
Model based tracker using only KLT.
std::vector< cv::Point2f > getFeatures() const
Get the list of current features.
vpMatrix m_L_klt
Interaction matrix.
unsigned int m_nbFaceUsed
virtual void track(const vpImage< unsigned char > &I)=0
virtual void computeVVS()
Contains an M-Estimator and various influence function.
vpMbHiddenFaces< vpMbtPolygon > faces
Set of faces describing the object.
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
vpKltOpencv tracker
Points tracker.
virtual void setKltOpencv(const vpKltOpencv &t)
virtual std::map< std::string, int > getKltNbPoints() const
vpMbScanLine & getMbScanLineRenderer()
virtual void init(const vpImage< unsigned char > &I)=0
virtual void setUseKltTracking(const std::string &name, const bool &useKltTracking)
vpCameraParameters cam
The camera parameters.
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
Implementation of column vector and the associated operations.
void setWindowName(const Ogre::String &n)
virtual void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, const double r, const std::string &name="")
virtual void resetTracker()=0
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Implementation of a matrix and operations on matrices.
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages, const unsigned int lvl)
Implementation of a polygon of the model used by the model-based tracker.
Model based stereo (or more) tracker using only KLT.
virtual std::map< std::string, std::vector< vpImagePoint > > getKltImagePoints() const
vpColVector m_weightedError_klt
Weighted error.
unsigned int maskBorder
Erosion of the mask.
vpHomogeneousMatrix ctTc0
unsigned int getKltMaskBorder() const
virtual void setMaskBorder(const unsigned int &e)
virtual void initFaceFromCorners(vpMbtPolygon &polygon)=0
virtual void setCameraParameters(const vpCameraParameters &camera)
std::list< vpMbtDistanceKltCylinder * > kltCylinders
virtual std::map< std::string, std::map< int, vpImagePoint > > getKltImagePointsWithId() const
double getKltThresholdAcceptation() const
std::list< vpMbtDistanceCircle * > circles_disp
Vector of the circles used here only to display the full model.
virtual ~vpMbKltTracker()
virtual std::map< std::string, std::vector< cv::Point2f > > getKltPoints() const
virtual void setOgreVisibilityTest(const bool &v)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)=0
vpRobust m_robust_klt
Robust.
vpHomogeneousMatrix c0Mo
Initial pose.
virtual void initFaceFromLines(vpMbtPolygon &polygon)=0
virtual void testTracking()=0
virtual void setThresholdAcceptation(const double th)
vpAROgre * getOgreContext()
virtual vpColVector getRobustWeights() const =0
std::list< vpMbtDistanceKltPoints * > kltPolygons
virtual void setKltMaskBorder(const unsigned int &e)
virtual void preTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
Main methods for a model-based tracker.
Class that defines what is a point.
Class to define colors available for display functionnalities.
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual std::list< vpMbtDistanceKltPoints * > & getFeaturesKlt()
virtual void setScanLineVisibilityTest(const bool &v)
virtual std::list< vpMbtDistanceCircle * > & getFeaturesCircle()
virtual void setKltThresholdAcceptation(const double th)
cv::Mat cur
Temporary OpenCV image for fast conversion.
virtual std::list< vpMbtDistanceKltCylinder * > & getFeaturesKltCylinder()