34#ifndef _vpMbtDistanceKltPoints_h_
35#define _vpMbtDistanceKltPoints_h_
37#include <visp3/core/vpConfig.h>
39#if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_IMGPROC) && defined(HAVE_OPENCV_VIDEO)
43#include <visp3/core/vpDisplay.h>
44#include <visp3/core/vpGEMM.h>
45#include <visp3/core/vpPlane.h>
46#include <visp3/core/vpPolygon3D.h>
47#include <visp3/klt/vpKltOpencv.h>
48#include <visp3/mbt/vpMbHiddenFaces.h>
49#include <visp3/vision/vpHomography.h>
74class VISP_EXPORT vpMbtDistanceKltPoints
89 std::map<int, vpImagePoint> initPoints;
91 std::map<int, vpImagePoint> curPoints;
93 std::map<int, int> curPointsInd;
95 unsigned int nbPointsCur;
97 unsigned int nbPointsInit;
99 unsigned int minNbPoint;
109 bool isTrackedKltPoints;
120 double compute_1_over_Z(
double x,
double y);
121 void computeP_mu_t(
double x_in,
double y_in,
double &x_out,
double &y_out,
const vpMatrix &cHc0);
122 bool isTrackedFeature(
int id);
143#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
144 vpMbtDistanceKltPoints(
const vpMbtDistanceKltPoints &) =
delete;
145 vpMbtDistanceKltPoints &operator=(
const vpMbtDistanceKltPoints &) =
delete;
149 vpMbtDistanceKltPoints();
150 virtual ~vpMbtDistanceKltPoints();
157 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
159 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
211 inline bool isTracked()
const {
return isTrackedKltPoints; }
213 void removeOutliers(
const vpColVector &weight,
const double &threshold_outlier);
227 inline void setTracked(
const bool &track) { this->isTrackedKltPoints = track; }
229 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.
Definition of the vpImage class member functions.
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 the polygons management for the model-based trackers.
bool hasEnoughPoints() const
void displayPrimitive(const vpImage< unsigned char > &_I)
bool useScanLine
Use scanline rendering.
void computeInteractionMatrixAndResidu(vpColVector &_R, vpMatrix &_J)
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker, const vpImage< bool > *mask=nullptr)
vpColVector getCurrentNormal() const
std::vector< std::vector< double > > getFeaturesForDisplay()
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
vpCameraParameters & getCameraParameters()
virtual void setCameraParameters(const vpCameraParameters &_cam)
unsigned int getCurrentNumberPoints() const
std::vector< std::vector< double > > getModelForDisplay(const vpCameraParameters &cam, bool displayFullModel=false)
void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
vpMbtPolygon * polygon
Pointer to the polygon that define a face.
std::map< int, int > & getCurrentPointsInd()
unsigned int getInitialNumberPoint() const
std::map< int, vpImagePoint > & getCurrentPoints()
void computeHomography(const vpHomogeneousMatrix &_cTc0, vpHomography &cHc0)
void setTracked(const bool &track)
Implementation of a polygon of the model used by the model-based tracker.