 |
Visual Servoing Platform
version 3.3.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/vision/vpHomography.h>
223 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
278 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
280 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
294 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
337 virtual std::vector<std::vector<double> >
getModelForDisplay(
unsigned int width,
unsigned int height,
340 bool displayFullModel=
false);
383 #ifdef VISP_HAVE_OGRE
397 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it)
398 (*it)->useScanLine = v;
413 std::cerr <<
"This option is not yet implemented in vpMbKltTracker, "
414 "projection error computation set to false."
487 const std::string &name =
"");
499 #endif // VISP_HAVE_OPENCV
virtual void loadConfigFile(const std::string &configFile)
vpKltOpencv getKltOpencv() const
unsigned int getMaskBorder() const
vpColVector m_w_klt
Robust weights.
vpColVector m_error_klt
(s - s*)
int getNbFeatures() const
Get the number of current features.
virtual vpColVector getError() const
virtual void computeVVSInteractionMatrixAndResidu()=0
double getThresholdAcceptation() const
virtual void setProjectionErrorComputation(const bool &flag)
Hybrid stereo (or more) tracker based on moving-edges and keypoints tracked using KLT tracker.
virtual std::list< vpMbtDistanceKltPoints * > & getFeaturesKlt()
virtual void computeVVSInit()=0
Generic class defining intrinsic camera parameters.
virtual void setOgreVisibilityTest(const bool &v)
Model based tracker using only KLT.
std::vector< cv::Point2f > getFeatures() const
Get the list of current features.
vpMatrix m_L_klt
Interaction matrix.
virtual void computeVVS(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages, unsigned int lvl)
unsigned int m_nbFaceUsed
virtual void track(const vpImage< unsigned char > &I)=0
Contains an M-Estimator and various influence function.
vpMbHiddenFaces< vpMbtPolygon > faces
Set of faces describing the object.
vpKltOpencv tracker
Points tracker.
virtual void setKltOpencv(const vpKltOpencv &t)
virtual void setCameraParameters(const vpCameraParameters &cam)
vpMbScanLine & getMbScanLineRenderer()
void setMaskBorder(const unsigned int &e)
virtual void init(const vpImage< unsigned char > &I)=0
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, double radius, int idFace=0, const std::string &name="")=0
virtual void setUseKltTracking(const std::string &name, const bool &useKltTracking)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)=0
virtual std::vector< std::vector< double > > getFeaturesForDisplayKlt()
virtual std::list< vpMbtDistanceCircle * > & getFeaturesCircle()
Implementation of column vector and the associated operations.
virtual vpColVector getRobustWeights() const
void setWindowName(const Ogre::String &n)
virtual void resetTracker()=0
std::vector< cv::Point2f > getKltPoints() const
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Implementation of a matrix and operations on matrices.
int getKltNbPoints() const
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
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)=0
vpColVector m_weightedError_klt
Weighted error.
unsigned int maskBorder
Erosion of the mask.
vpHomogeneousMatrix ctTc0
unsigned int getKltMaskBorder() const
virtual void initFaceFromCorners(vpMbtPolygon &polygon)=0
void setThresholdAcceptation(double th)
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, double radius, int idFace=0, const std::string &name="")=0
std::list< vpMbtDistanceKltCylinder * > kltCylinders
virtual std::map< std::string, std::map< int, vpImagePoint > > getKltImagePointsWithId() const
void setKltMaskBorder(const unsigned int &e)
double getKltThresholdAcceptation() const
std::list< vpMbtDistanceCircle * > circles_disp
Vector of the circles used here only to display the full model.
virtual void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, double r, const std::string &name="")
std::vector< std::vector< double > > m_featuresToBeDisplayedKlt
Display features.
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
void setKltThresholdAcceptation(double th)
vpRobust m_robust_klt
Robust.
vpHomogeneousMatrix c0Mo
Initial pose.
virtual void initFaceFromLines(vpMbtPolygon &polygon)=0
virtual std::list< vpMbtDistanceKltCylinder * > & getFeaturesKltCylinder()
virtual void testTracking()=0
vpAROgre * getOgreContext()
std::list< vpMbtDistanceKltPoints * > kltPolygons
virtual void preTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
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.
int getNbKltPoints() const
virtual void setScanLineVisibilityTest(const bool &v)
virtual void setScanLineVisibilityTest(const bool &v)
cv::Mat cur
Temporary OpenCV image for fast conversion.
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)