40 #ifndef vpMbtDistanceKltPoints_h
41 #define vpMbtDistanceKltPoints_h
43 #include <visp3/core/vpConfig.h>
45 #if defined(VISP_HAVE_MODULE_KLT) && (defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100))
49 #include <visp3/core/vpDisplay.h>
50 #include <visp3/core/vpGEMM.h>
51 #include <visp3/core/vpPlane.h>
52 #include <visp3/core/vpPolygon3D.h>
53 #include <visp3/klt/vpKltOpencv.h>
54 #include <visp3/mbt/vpMbHiddenFaces.h>
55 #include <visp3/vision/vpHomography.h>
82 std::map<int, vpImagePoint> initPoints;
84 std::map<int, vpImagePoint> curPoints;
86 std::map<int, int> curPointsInd;
88 unsigned int nbPointsCur;
90 unsigned int nbPointsInit;
92 unsigned int minNbPoint;
102 bool isTrackedKltPoints;
113 double compute_1_over_Z(
const double x,
const double y);
114 void computeP_mu_t(
const double x_in,
const double y_in,
double &x_out,
double &y_out,
const vpMatrix &cHc0);
115 bool isTrackedFeature(
const int id);
145 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
147 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
159 inline vpColVector getCurrentNormal()
const {
return N_cur; }
161 inline std::map<int, vpImagePoint> &getCurrentPoints() {
return curPoints; }
163 inline std::map<int, int> &getCurrentPointsInd() {
return curPointsInd; }
173 inline unsigned int getInitialNumberPoint()
const {
return nbPointsInit; }
184 inline unsigned int getCurrentNumberPoints()
const {
return nbPointsCur; }
186 inline bool hasEnoughPoints()
const {
return enoughPoints; }
195 inline bool isTracked()
const {
return isTrackedKltPoints; }
197 void removeOutliers(
const vpColVector &weight,
const double &threshold_outlier);
204 virtual inline void setCameraParameters(
const vpCameraParameters &_cam) { cam = _cam; }
211 inline void setTracked(
const bool &track) { this->isTrackedKltPoints = track; }
213 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
214 void updateMask(cv::Mat &mask,
unsigned char _nb = 255,
unsigned int _shiftBorder = 0);
216 void updateMask(IplImage *mask,
unsigned char _nb = 255,
unsigned int _shiftBorder = 0);
222 #endif // VISP_HAVE_OPENCV