34#ifndef vpMbtDistanceKltCylinder_h
35#define vpMbtDistanceKltCylinder_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/vpCircle.h>
44#include <visp3/core/vpCylinder.h>
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>
76class VISP_EXPORT vpMbtDistanceKltCylinder
92 std::map<int, vpImagePoint> initPoints;
94 std::map<int, vpPoint> initPoints3D;
96 std::map<int, vpImagePoint> curPoints;
98 std::map<int, int> curPointsInd;
100 unsigned int nbPointsCur;
102 unsigned int nbPointsInit;
104 unsigned int minNbPoint;
110 bool isTrackedKltCylinder;
121 double computeZ(
const double &x,
const double &y);
122 bool isTrackedFeature(
int id);
142#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
143 vpMbtDistanceKltCylinder(
const vpMbtDistanceKltCylinder &) =
delete;
144 vpMbtDistanceKltCylinder &operator=(
const vpMbtDistanceKltCylinder &) =
delete;
148 vpMbtDistanceKltCylinder();
149 virtual ~vpMbtDistanceKltCylinder();
157 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
159 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
198 std::vector<std::vector<double> > getFeaturesForDisplay();
209 inline bool isTracked()
const {
return isTrackedKltCylinder; }
213 void removeOutliers(
const vpColVector &weight,
const double &threshold_outlier);
227 inline void setTracked(
const bool &track) { this->isTrackedKltCylinder = track; }
229 void updateMask(cv::Mat &mask,
unsigned char _nb = 255,
unsigned int _shiftBorder = 0);
Generic class defining intrinsic camera parameters.
Class that defines a 3D circle in the object frame and allows forward projection of a 3D circle in th...
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
Class that defines a 3D cylinder in the object frame and allows forward projection of a 3D cylinder i...
Implementation of an homogeneous matrix and operations on such kind of matrices.
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.
virtual void setCameraParameters(const vpCameraParameters &_cam)
void buildFrom(const vpPoint &p1, const vpPoint &p2, const double &r)
vpCameraParameters & getCameraParameters()
std::map< int, int > & getCurrentPointsInd()
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker)
void computeInteractionMatrixAndResidu(const vpHomogeneousMatrix &cMc0, vpColVector &_R, vpMatrix &_J)
vpCylinder getCylinder() const
bool useScanLine
Use scanline rendering.
void setTracked(const bool &track)
void displayPrimitive(const vpImage< unsigned char > &_I)
unsigned int getCurrentNumberPoints() const
std::vector< int > listIndicesCylinderBBox
Pointer to the polygon that define a face.
bool hasEnoughPoints() const
void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
unsigned int getInitialNumberPoint() const
std::map< int, vpImagePoint > & getCurrentPoints()
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...