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 58 DEPTH_OCCUPANCY_RATIO_FILTERING = 1 << 1,
59 MIN_DISTANCE_FILTERING = 1 << 2,
62 MAX_DISTANCE_FILTERING = 1 << 3
88 std::string name =
"");
92 const pcl::PointCloud<pcl::PointXYZ>::ConstPtr &point_cloud,
const unsigned int stepX,
93 const unsigned int stepY
94 #
if DEBUG_DISPLAY_DEPTH_DENSE
101 bool computeDesiredFeatures(
const vpHomogeneousMatrix &cMo,
const unsigned int width,
const unsigned int height,
102 const std::vector<vpColVector> &point_cloud,
const unsigned int stepX,
103 const unsigned int stepY
104 #
if DEBUG_DISPLAY_DEPTH_DENSE
113 void computeVisibility();
114 void computeVisibilityDisplay();
117 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
119 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
122 const double scale = 0.05,
const unsigned int thickness = 1);
124 const double scale = 0.05,
const unsigned int thickness = 1);
126 inline unsigned int getNbFeatures()
const {
return (
unsigned int)(m_pointCloudFace.size() / 3); }
128 inline bool isTracked()
const {
return m_isTrackedDepthDenseFace; }
134 void setScanLineVisibilityTest(
const bool v);
138 m_depthDenseFilteringMaxDist = maxDistance;
145 m_depthDenseFilteringMinDist = minDistance;
150 if (occupancyRatio < 0.0 || occupancyRatio > 1.0) {
151 std::cerr <<
"occupancyRatio < 0.0 || occupancyRatio > 1.0" << std::endl;
153 m_depthDenseFilteringOccupancyRatio = occupancyRatio;
157 inline void setTracked(
const bool tracked) { m_isTrackedDepthDenseFace = tracked; }
174 PolygonLine() : m_p1(NULL), m_p2(NULL), m_poly(), m_imPt1(), m_imPt2() {}
176 PolygonLine(
const PolygonLine &polyLine)
177 : m_p1(NULL), m_p2(NULL), m_poly(polyLine.m_poly), m_imPt1(polyLine.m_imPt1), m_imPt2(polyLine.m_imPt2)
183 PolygonLine &operator=(PolygonLine other)
190 void swap(PolygonLine &first, PolygonLine &second)
193 swap(first.m_p1, second.m_p1);
194 swap(first.m_p2, second.m_p2);
195 swap(first.m_poly, second.m_poly);
196 swap(first.m_imPt1, second.m_imPt1);
197 swap(first.m_imPt2, second.m_imPt2);
224 void computeROI(
const vpHomogeneousMatrix &cMo,
const unsigned int width,
const unsigned int height,
225 std::vector<vpImagePoint> &roiPts
226 #
if DEBUG_DISPLAY_DEPTH_DENSE
228 std::vector<std::vector<vpImagePoint> > &roiPts_vec
231 double &distanceToFace);
unsigned int getNbFeatures() const
Implementation of a matrix and operations on matrices.
double m_distNearClip
Distance for near clipping.
void setTracked(const bool tracked)
std::vector< double > m_pointCloudFace
List of depth points inside the face.
vpCameraParameters m_cam
Camera intrinsic parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
int m_depthDenseFilteringMethod
Method to use to consider or not the face.
Class to define colors available for display functionnalities.
bool m_useScanLine
Scan line visibility.
vpDepthDenseFilteringType
void setDepthDenseFilteringMinDistance(const double minDistance)
vpPoint * p
corners in the object frame
double m_depthDenseFilteringMinDist
Minimum distance threshold.
void setDepthDenseFilteringMaxDistance(const double maxDistance)
bool m_isTrackedDepthDenseFace
Flag to define if the face should be tracked or not.
Class that defines what is a point.
bool m_isVisible
Visibility flag.
vpMbtPolygon * m_polygon
Polygon defining the face.
vpPlane m_planeObject
Plane equation described in the object frame.
Implementation of a polygon of the model used by the model-based tracker.
unsigned int m_clippingFlag
Flags specifying which clipping to used.
void setDepthDenseFilteringOccupancyRatio(const double occupancyRatio)
double m_distFarClip
Distance for near clipping.
Generic class defining intrinsic camera parameters.
void setDepthDenseFilteringMethod(const int method)
double m_depthDenseFilteringOccupancyRatio
Ratio between available depth points and theoretical number of points.
std::vector< vpMbtDistanceLine * > m_listOfFaceLines
double m_depthDenseFilteringMaxDist
Maximum distance threshold.
Implementation of column vector and the associated operations.
std::vector< PolygonLine > m_polygonLines
Polygon lines used for scan-line visibility.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
This class defines the container for a plane geometrical structure.
vpMbHiddenFaces< vpMbtPolygon > * m_hiddenFace
Pointer to the list of faces.
bool isvisible
flag to specify whether the face is visible or not