43 #ifndef vpMbKltTracker_h
44 #define vpMbKltTracker_h
46 #include <visp/vpConfig.h>
48 #ifdef VISP_HAVE_OPENCV
50 #include <visp/vpMbTracker.h>
51 #include <visp/vpKltOpencv.h>
52 #include <visp/vpMbtKltPolygon.h>
53 #include <visp/vpMeterPixelConversion.h>
54 #include <visp/vpPixelMeterConversion.h>
55 #include <visp/vpDisplayX.h>
56 #include <visp/vpMbtKltXmlParser.h>
57 #include <visp/vpHomography.h>
58 #include <visp/vpRobust.h>
59 #include <visp/vpSubColVector.h>
60 #include <visp/vpSubMatrix.h>
61 #include <visp/vpExponentialMap.h>
62 #include <visp/vpMbtKltPolygon.h>
255 const bool displayFullModel =
false);
257 const vpColor& col,
const unsigned int thickness=1,
const bool displayFullModel =
false);
283 std::vector<vpImagePoint> getKltImagePoints();
285 std::map<int, vpImagePoint> getKltImagePointsWithId();
362 inline void setLambda(
const double lambda) {this->lambda = lambda;}
376 inline void setMaxIter(
const unsigned int max) {maxIter = max;}
378 virtual void setOgreVisibilityTest(
const bool &v);
393 void computeVVS(
const unsigned int &nbInfos,
vpColVector &w);
395 virtual void initFaceFromCorners(
const std::vector<vpPoint>& corners,
const unsigned int indexFace = -1);
403 #endif // VISP_HAVE_OPENCV
bool compute_interaction
If true, compute the interaction matrix at each iteration of the minimisation. Otherwise, compute it only on the first iteration.
CvPoint2D32f * getKltPoints()
void setThresholdAcceptation(const double th)
void setMaxIter(const unsigned int max)
virtual void track(const vpImage< unsigned char > &I)=0
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.
double getThresholdAcceptation()
bool firstInitialisation
Flag to specify whether the init method is called the first or not (specific calls to realise in this...
virtual void resetTracker()=0
void setLambda(const double lambda)
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 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)
unsigned int getMaxIter()
unsigned int getMaskBorder()
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.
vpKltOpencv getKltOpencv()
Model based tracker using only KLT.
bool firstTrack
First track() called.
virtual void loadConfigFile(const std::string &configFile)=0
vpKltOpencv tracker
Points tracker.
virtual double getAngleAppear()
double threshold_outlier
Threshold below which the weight associated to a point to consider this one as an outlier...
virtual void setAngleDisappear(const double &a)
double lambda
The gain of the virtual visual servoing stage.
void setMaskBorder(const unsigned int &e)
virtual double getAngleDisappear()
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 with OpenCV.
int getNbFeatures() const
Get the current number of features.
double angleAppears
Angle used to detect a face apparition.
vpMbHiddenFaces< vpMbtKltPolygon > & getFaces()
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)=0
double angleDisappears
Angle used to detect a face disparition.
vpHomogeneousMatrix c0Mo
Initial pose.