36 #ifndef _vpMbtDistanceKltPoints_h_
37 #define _vpMbtDistanceKltPoints_h_
39 #include <visp3/core/vpConfig.h>
41 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
45 #include <visp3/core/vpDisplay.h>
46 #include <visp3/core/vpGEMM.h>
47 #include <visp3/core/vpPlane.h>
48 #include <visp3/core/vpPolygon3D.h>
49 #include <visp3/klt/vpKltOpencv.h>
50 #include <visp3/mbt/vpMbHiddenFaces.h>
51 #include <visp3/vision/vpHomography.h>
64 class VISP_EXPORT vpMbtDistanceKltPoints
79 std::map<int, vpImagePoint> initPoints;
81 std::map<int, vpImagePoint> curPoints;
83 std::map<int, int> curPointsInd;
85 unsigned int nbPointsCur;
87 unsigned int nbPointsInit;
89 unsigned int minNbPoint;
99 bool isTrackedKltPoints;
110 double compute_1_over_Z(
double x,
double y);
111 void computeP_mu_t(
double x_in,
double y_in,
double &x_out,
double &y_out,
const vpMatrix &cHc0);
112 bool isTrackedFeature(
int id);
134 vpMbtDistanceKltPoints();
135 virtual ~vpMbtDistanceKltPoints();
142 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
144 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
149 std::vector<std::vector<double> > getFeaturesForDisplay();
151 std::vector<std::vector<double> > getModelForDisplay(
const vpCameraParameters &cam,
bool displayFullModel =
false);
160 inline vpColVector getCurrentNormal()
const {
return N_cur; }
162 inline std::map<int, vpImagePoint> &getCurrentPoints() {
return curPoints; }
164 inline std::map<int, int> &getCurrentPointsInd() {
return curPointsInd; }
174 inline unsigned int getInitialNumberPoint()
const {
return nbPointsInit; }
185 inline unsigned int getCurrentNumberPoints()
const {
return nbPointsCur; }
187 inline bool hasEnoughPoints()
const {
return enoughPoints; }
196 inline bool isTracked()
const {
return isTrackedKltPoints; }
198 void removeOutliers(
const vpColVector &weight,
const double &threshold_outlier);
205 virtual inline void setCameraParameters(
const vpCameraParameters &_cam) { cam = _cam; }
212 inline void setTracked(
const bool &track) { this->isTrackedKltPoints = track; }
214 void updateMask(cv::Mat &mask,
unsigned char _nb = 255,
unsigned int _shiftBorder = 0);
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Implementation of an homography and operations on homographies.
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Implementation of a matrix and operations on matrices.
Implementation of a polygon of the model used by the model-based tracker.