36#ifndef _vpMbtFaceDepthDense_h_
37#define _vpMbtFaceDepthDense_h_
41#include <visp3/core/vpConfig.h>
43#include <pcl/point_cloud.h>
44#include <pcl/point_types.h>
47#include <visp3/core/vpPlane.h>
48#include <visp3/mbt/vpMbTracker.h>
49#include <visp3/mbt/vpMbtDistanceLine.h>
51#define DEBUG_DISPLAY_DEPTH_DENSE 0
88 int polygon = -1, std::string name =
"");
92 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud,
unsigned int stepX,
94#
if DEBUG_DISPLAY_DEPTH_DENSE
102 const std::vector<vpColVector> &point_cloud,
unsigned int stepX,
unsigned int stepY
103#
if DEBUG_DISPLAY_DEPTH_DENSE
116 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
118 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
121 double scale = 0.05,
unsigned int thickness = 1);
123 double scale = 0.05,
unsigned int thickness = 1);
125 std::vector<std::vector<double> >
getModelForDisplay(
unsigned int width,
unsigned int height,
127 bool displayFullModel =
false);
137 void setScanLineVisibilityTest(
bool v);
147 if (occupancyRatio < 0.0 || occupancyRatio > 1.0) {
148 std::cerr <<
"occupancyRatio < 0.0 || occupancyRatio > 1.0" << std::endl;
171 PolygonLine() : m_p1(NULL), m_p2(NULL), m_poly(), m_imPt1(), m_imPt2() {}
173 PolygonLine(
const PolygonLine &polyLine)
174 : m_p1(NULL), m_p2(NULL), m_poly(polyLine.m_poly), m_imPt1(polyLine.m_imPt1), m_imPt2(polyLine.m_imPt2)
180 PolygonLine &operator=(PolygonLine other)
187 void swap(PolygonLine &first, PolygonLine &second)
190 swap(first.m_p1, second.m_p1);
191 swap(first.m_p2, second.m_p2);
192 swap(first.m_poly, second.m_poly);
193 swap(first.m_imPt1, second.m_imPt1);
194 swap(first.m_imPt2, second.m_imPt2);
222 std::vector<vpImagePoint> &roiPts
223#
if DEBUG_DISPLAY_DEPTH_DENSE
225 std::vector<std::vector<vpImagePoint> > &roiPts_vec
228 double &distanceToFace);
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.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition of the vpImage class member functions.
Implementation of a matrix and operations on matrices.
Implementation of the polygons management for the model-based trackers.
double m_depthDenseFilteringMinDist
Minimum distance threshold.
vpMbHiddenFaces< vpMbtPolygon > * m_hiddenFace
Pointer to the list of faces.
void computeVisibilityDisplay()
bool m_isVisible
Visibility flag.
double m_distFarClip
Distance for near clipping.
std::vector< double > m_pointCloudFace
List of depth points inside the face.
vpPlane m_planeObject
Plane equation described in the object frame.
void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
bool computeDesiredFeatures(const vpHomogeneousMatrix &cMo, const pcl::PointCloud< pcl::PointXYZ >::ConstPtr &point_cloud, unsigned int stepX, unsigned int stepY, const vpImage< bool > *mask=NULL)
std::vector< std::vector< double > > getModelForDisplay(unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)
void computeROI(const vpHomogeneousMatrix &cMo, unsigned int width, unsigned int height, std::vector< vpImagePoint > &roiPts, double &distanceToFace)
void setDepthDenseFilteringMethod(int method)
unsigned int getNbFeatures() const
void setTracked(bool tracked)
bool samePoint(const vpPoint &P1, const vpPoint &P2) const
void setDepthDenseFilteringMinDistance(double minDistance)
void computeInteractionMatrixAndResidu(const vpHomogeneousMatrix &cMo, vpMatrix &L, vpColVector &error)
vpMbtPolygon * m_polygon
Polygon defining the face.
bool m_useScanLine
Scan line visibility.
bool m_isTrackedDepthDenseFace
Flag to define if the face should be tracked or not.
double m_depthDenseFilteringMaxDist
Maximum distance threshold.
void setDepthDenseFilteringMaxDistance(double maxDistance)
std::vector< PolygonLine > m_polygonLines
Polygon lines used for scan-line visibility.
int m_depthDenseFilteringMethod
Method to use to consider or not the face.
vpDepthDenseFilteringType
@ DEPTH_OCCUPANCY_RATIO_FILTERING
@ NO_FILTERING
Face is used if visible.
unsigned int m_clippingFlag
Flags specifying which clipping to used.
std::vector< vpMbtDistanceLine * > m_listOfFaceLines
void setDepthDenseFilteringOccupancyRatio(double occupancyRatio)
vpCameraParameters m_cam
Camera intrinsic parameters.
double m_depthDenseFilteringOccupancyRatio
Ratio between available depth points and theoretical number of points.
double m_distNearClip
Distance for near clipping.
void displayFeature(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, double scale=0.05, unsigned int thickness=1)
void addLine(vpPoint &p1, vpPoint &p2, vpMbHiddenFaces< vpMbtPolygon > *const faces, vpUniRand &rand_gen, int polygon=-1, std::string name="")
Implementation of a polygon of the model used by the model-based tracker.
This class defines the container for a plane geometrical structure.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
vpPoint * p
corners in the object frame
Class for generating random numbers with uniform probability density.