46 #ifndef vpMbKltTracker_h
47 #define vpMbKltTracker_h
49 #include <visp/vpConfig.h>
51 #ifdef VISP_HAVE_OPENCV
53 #include <visp/vpMbTracker.h>
54 #include <visp/vpKltOpencv.h>
55 #include <visp/vpMbtKltPolygon.h>
56 #include <visp/vpMeterPixelConversion.h>
57 #include <visp/vpPixelMeterConversion.h>
58 #include <visp/vpDisplayX.h>
59 #include <visp/vpMbtKltXmlParser.h>
60 #include <visp/vpHomography.h>
61 #include <visp/vpRobust.h>
62 #include <visp/vpSubColVector.h>
63 #include <visp/vpSubMatrix.h>
64 #include <visp/vpExponentialMap.h>
65 #include <visp/vpMbtKltPolygon.h>
276 const bool displayFullModel =
false);
278 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel =
false);
301 virtual inline unsigned int getClipping()
const {
return clippingFlag; }
320 std::vector<vpImagePoint> getKltImagePoints()
const;
322 std::map<int, vpImagePoint> getKltImagePointsWithId()
const;
336 virtual inline double getLambda()
const {
return lambda;}
350 virtual inline unsigned int getMaxIter()
const {
return maxIter;}
399 virtual void setClipping(
const unsigned int &flags);
401 virtual void setFarClippingDistance(
const double &dist);
410 virtual inline void setLambda(
const double lambda) {this->lambda = lambda;}
424 virtual inline void setMaxIter(
const unsigned int max) {maxIter = max;}
426 virtual void setNearClippingDistance(
const double &dist);
428 virtual void setOgreVisibilityTest(
const bool &v);
443 void computeVVS(
const unsigned int &nbInfos,
vpColVector &w);
445 virtual void initFaceFromCorners(
const std::vector<vpPoint>& corners,
const unsigned int indexFace = -1);
453 #endif // VISP_HAVE_OPENCV
bool compute_interaction
If true, compute the interaction matrix at each iteration of the minimization. Otherwise, compute it only on the first iteration.
CvPoint2D32f * getKltPoints()
void setThresholdAcceptation(const double th)
double distFarClip
Distance for near clipping.
virtual void track(const vpImage< unsigned char > &I)=0
double distNearClip
Distance for near clipping.
unsigned int clippingFlag
Flags specifying which clipping to used.
unsigned int maxIter
The maximum iteration of the virtual visual servoing stage.
CvPoint2D32f * getFeatures() const
Get the list of features.
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
virtual void initFaceFromCorners(const std::vector< vpPoint > &corners, const unsigned int indexFace=-1)=0
IplImage * cur
Temporary OpenCV image for fast conversion.
Class to define colors available for display functionnalities.
virtual void initCylinder(const vpPoint &, const vpPoint, const double, const unsigned int)
double percentGood
Percentage of good points, according to the initial number, that must have the tracker.
virtual double getLambda() const
bool firstInitialisation
Flag to specify whether the init method is called the first or not (specific calls to realize in this...
virtual void resetTracker()=0
virtual double getFarClippingDistance() const
Class that defines what is a point.
vpHomogeneousMatrix ctTc0
The estimated displacement of the pose between the current instant and the initial position...
virtual void init(const vpImage< unsigned char > &I)=0
virtual double getAngleAppear() const
unsigned int getMaskBorder() const
virtual void setAngleAppear(const double &a)
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
virtual void setCameraParameters(const vpCameraParameters &cam)
virtual double getNearClippingDistance() const
virtual unsigned int getClipping() const
unsigned int maskBorder
Erosion of the mask.
Generic class defining intrinsic camera parameters.
Main methods for a model-based tracker.
vpMbHiddenFaces< vpMbtKltPolygon > faces
Set of faces describing the object.
bool useOgre
Use Ogre3d for visibility tests.
Model based tracker using only KLT.
virtual double getAngleDisappear() const
bool firstTrack
First track() called.
virtual void loadConfigFile(const std::string &configFile)=0
vpKltOpencv tracker
Points tracker.
double threshold_outlier
Threshold below which the weight associated to a point to consider this one as an outlier...
virtual void setMaxIter(const unsigned int max)
virtual void setAngleDisappear(const double &a)
double lambda
The gain of the virtual visual servoing stage.
int getNbKltPoints() const
vpKltOpencv getKltOpencv() const
void setMaskBorder(const unsigned int &e)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
virtual void testTracking()=0
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV.
int getNbFeatures() const
Get the current number of features.
double getThresholdAcceptation() const
double angleAppears
Angle used to detect a face appearance.
vpMbHiddenFaces< vpMbtKltPolygon > & getFaces()
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)=0
virtual unsigned int getMaxIter() const
double angleDisappears
Angle used to detect a face disappearance.
virtual void setLambda(const double lambda)
vpHomogeneousMatrix c0Mo
Initial pose.