Point Cloud Library (PCL)  1.14.1-dev
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes
pcl::OrganizedEdgeBase< PointT, PointLT > Class Template Reference

OrganizedEdgeBase, OrganizedEdgeFromRGB, OrganizedEdgeFromNormals, and OrganizedEdgeFromRGBNormals find 3D edges from an organized point cloud data. More...

#include <pcl/features/organized_edge_detection.h>

+ Inheritance diagram for pcl::OrganizedEdgeBase< PointT, PointLT >:
+ Collaboration diagram for pcl::OrganizedEdgeBase< PointT, PointLT >:

Classes

struct  Neighbor
 

Public Types

enum  {
  EDGELABEL_NAN_BOUNDARY =1 , EDGELABEL_OCCLUDING =2 , EDGELABEL_OCCLUDED =4 , EDGELABEL_HIGH_CURVATURE =8 ,
  EDGELABEL_RGB_CANNY =16
}
 
using Ptr = shared_ptr< OrganizedEdgeBase< PointT, PointLT > >
 
using ConstPtr = shared_ptr< const OrganizedEdgeBase< PointT, PointLT > >
 
- Public Types inherited from pcl::PCLBase< PointT >
using PointCloud = pcl::PointCloud< PointT >
 
using PointCloudPtr = typename PointCloud::Ptr
 
using PointCloudConstPtr = typename PointCloud::ConstPtr
 
using PointIndicesPtr = PointIndices::Ptr
 
using PointIndicesConstPtr = PointIndices::ConstPtr
 

Public Member Functions

 OrganizedEdgeBase ()
 Constructor for OrganizedEdgeBase. More...
 
 ~OrganizedEdgeBase () override=default
 Destructor for OrganizedEdgeBase. More...
 
void compute (pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
 Perform the 3D edge detection (edges from depth discontinuities) More...
 
void setDepthDisconThreshold (const float th)
 Set the tolerance in meters for the relative difference in depth values between neighboring points. More...
 
float getDepthDisconThreshold () const
 Get the tolerance in meters for the relative difference in depth values between neighboring points. More...
 
void setMaxSearchNeighbors (const int max_dist)
 Set the max search distance for deciding occluding and occluded edges. More...
 
int getMaxSearchNeighbors () const
 Get the max search distance for deciding occluding and occluded edges. More...
 
void setEdgeType (int edge_types)
 Set the detecting edge types. More...
 
int getEdgeType () const
 Get the detecting edge types. More...
 
- Public Member Functions inherited from pcl::PCLBase< PointT >
 PCLBase ()
 Empty constructor. More...
 
 PCLBase (const PCLBase &base)
 Copy constructor. More...
 
virtual ~PCLBase ()=default
 Destructor. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud () const
 Get a pointer to the input point cloud dataset. More...
 
virtual void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
virtual void setIndices (std::size_t row_start, std::size_t col_start, std::size_t nb_rows, std::size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud. More...
 
IndicesPtr getIndices ()
 Get a pointer to the vector of indices used. More...
 
IndicesConstPtr const getIndices () const
 Get a pointer to the vector of indices used. More...
 
const PointToperator[] (std::size_t pos) const
 Override PointCloud operator[] to shorten code. More...
 

Static Public Attributes

static const int num_of_edgetype_ = 5
 

Protected Member Functions

void extractEdges (pcl::PointCloud< PointLT > &labels) const
 Perform the 3D edge detection (edges from depth discontinuities) and assign point indices for each edge label. More...
 
void assignLabelIndices (pcl::PointCloud< PointLT > &labels, std::vector< pcl::PointIndices > &label_indices) const
 Assign point indices for each edge label. More...
 
- Protected Member Functions inherited from pcl::PCLBase< PointT >
bool initCompute ()
 This method should get called before starting the actual computation. More...
 
bool deinitCompute ()
 This method should get called after finishing the actual computation. More...
 

Protected Attributes

float th_depth_discon_ {0.02f}
 The tolerance in meters for the relative difference in depth values between neighboring points (The default value is set for .02 meters and is adapted with respect to depth value linearly. More...
 
int max_search_neighbors_ {50}
 The max search distance for deciding occluding and occluded edges. More...
 
int detecting_edge_types_
 The bit encoded value that represents edge types to detect. More...
 
- Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr input_
 The input point cloud dataset. More...
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
bool use_indices_
 Set to true if point indices are used. More...
 
bool fake_indices_
 If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...
 

Detailed Description

template<typename PointT, typename PointLT>
class pcl::OrganizedEdgeBase< PointT, PointLT >

OrganizedEdgeBase, OrganizedEdgeFromRGB, OrganizedEdgeFromNormals, and OrganizedEdgeFromRGBNormals find 3D edges from an organized point cloud data.

Given an organized point cloud, they will output a PointCloud of edge labels and a vector of PointIndices. OrganizedEdgeBase accepts PCL_XYZ_POINT_TYPES and returns EDGELABEL_NAN_BOUNDARY, EDGELABEL_OCCLUDING, and EDGELABEL_OCCLUDED. OrganizedEdgeFromRGB accepts PCL_RGB_POINT_TYPES and returns EDGELABEL_NAN_BOUNDARY, EDGELABEL_OCCLUDING, EDGELABEL_OCCLUDED, and EDGELABEL_RGB_CANNY. OrganizedEdgeFromNormals accepts PCL_XYZ_POINT_TYPES with PCL_NORMAL_POINT_TYPES and returns EDGELABEL_NAN_BOUNDARY, EDGELABEL_OCCLUDING, EDGELABEL_OCCLUDED, and EDGELABEL_HIGH_CURVATURE. OrganizedEdgeFromRGBNormals accepts PCL_RGB_POINT_TYPES with PCL_NORMAL_POINT_TYPES and returns EDGELABEL_NAN_BOUNDARY, EDGELABEL_OCCLUDING, EDGELABEL_OCCLUDED, EDGELABEL_HIGH_CURVATURE, and EDGELABEL_RGB_CANNY.

Author
Changhyun Choi

Definition at line 57 of file organized_edge_detection.h.

Member Typedef Documentation

◆ ConstPtr

template<typename PointT , typename PointLT >
using pcl::OrganizedEdgeBase< PointT, PointLT >::ConstPtr = shared_ptr<const OrganizedEdgeBase<PointT, PointLT> >

Definition at line 69 of file organized_edge_detection.h.

◆ Ptr

template<typename PointT , typename PointLT >
using pcl::OrganizedEdgeBase< PointT, PointLT >::Ptr = shared_ptr<OrganizedEdgeBase<PointT, PointLT> >

Definition at line 68 of file organized_edge_detection.h.

Member Enumeration Documentation

◆ anonymous enum

template<typename PointT , typename PointLT >
anonymous enum
Enumerator
EDGELABEL_NAN_BOUNDARY 
EDGELABEL_OCCLUDING 
EDGELABEL_OCCLUDED 
EDGELABEL_HIGH_CURVATURE 
EDGELABEL_RGB_CANNY 

Definition at line 137 of file organized_edge_detection.h.

Constructor & Destructor Documentation

◆ OrganizedEdgeBase()

template<typename PointT , typename PointLT >
pcl::OrganizedEdgeBase< PointT, PointLT >::OrganizedEdgeBase ( )
inline

Constructor for OrganizedEdgeBase.

Definition at line 76 of file organized_edge_detection.h.

◆ ~OrganizedEdgeBase()

template<typename PointT , typename PointLT >
pcl::OrganizedEdgeBase< PointT, PointLT >::~OrganizedEdgeBase ( )
overridedefault

Destructor for OrganizedEdgeBase.

Member Function Documentation

◆ assignLabelIndices()

template<typename PointT , typename PointLT >
void pcl::OrganizedEdgeBase< PointT, PointLT >::assignLabelIndices ( pcl::PointCloud< PointLT > &  labels,
std::vector< pcl::PointIndices > &  label_indices 
) const
protected

Assign point indices for each edge label.

Parameters
[out]labelsa PointCloud of edge labels
[out]label_indicesa vector of PointIndices corresponding to each edge label

Definition at line 67 of file organized_edge_detection.hpp.

◆ compute()

template<typename PointT , typename PointLT >
void pcl::OrganizedEdgeBase< PointT, PointLT >::compute ( pcl::PointCloud< PointLT > &  labels,
std::vector< pcl::PointIndices > &  label_indices 
) const

Perform the 3D edge detection (edges from depth discontinuities)

Directions: 1 2 3 0 x 4 7 6 5 e.g.

Parameters
[out]labelsa PointCloud of edge labels
[out]label_indicesa vector of PointIndices corresponding to each edge label

direction y means we came from pixel with label y to the center pixel x

Definition at line 52 of file organized_edge_detection.hpp.

References pcl::PointCloud< PointT >::height, pcl::Label::label, pcl::PointCloud< PointT >::resize(), and pcl::PointCloud< PointT >::width.

◆ extractEdges()

template<typename PointT , typename PointLT >
void pcl::OrganizedEdgeBase< PointT, PointLT >::extractEdges ( pcl::PointCloud< PointLT > &  labels) const
protected

Perform the 3D edge detection (edges from depth discontinuities) and assign point indices for each edge label.

Parameters
[out]labelsa PointCloud of edge labels

Definition at line 86 of file organized_edge_detection.hpp.

References pcl::OrganizedEdgeBase< PointT, PointLT >::Neighbor::d_index, and pcl::PointCloud< PointT >::width.

◆ getDepthDisconThreshold()

template<typename PointT , typename PointLT >
float pcl::OrganizedEdgeBase< PointT, PointLT >::getDepthDisconThreshold ( ) const
inline

Get the tolerance in meters for the relative difference in depth values between neighboring points.

e.g. If a point has a depth (z) value of 2.0 meters, a neighboring point is discontinuous if its depth differs by > 2.0 * th.

Definition at line 104 of file organized_edge_detection.h.

References pcl::OrganizedEdgeBase< PointT, PointLT >::th_depth_discon_.

◆ getEdgeType()

template<typename PointT , typename PointLT >
int pcl::OrganizedEdgeBase< PointT, PointLT >::getEdgeType ( ) const
inline

Get the detecting edge types.

Definition at line 132 of file organized_edge_detection.h.

References pcl::OrganizedEdgeBase< PointT, PointLT >::detecting_edge_types_.

◆ getMaxSearchNeighbors()

template<typename PointT , typename PointLT >
int pcl::OrganizedEdgeBase< PointT, PointLT >::getMaxSearchNeighbors ( ) const
inline

Get the max search distance for deciding occluding and occluded edges.

Definition at line 118 of file organized_edge_detection.h.

References pcl::OrganizedEdgeBase< PointT, PointLT >::max_search_neighbors_.

◆ setDepthDisconThreshold()

template<typename PointT , typename PointLT >
void pcl::OrganizedEdgeBase< PointT, PointLT >::setDepthDisconThreshold ( const float  th)
inline

Set the tolerance in meters for the relative difference in depth values between neighboring points.

e.g. If a point has a depth (z) value of 2.0 meters, a neighboring point is discontinuous if its depth differs by > 2.0 * th.

Definition at line 96 of file organized_edge_detection.h.

References pcl::OrganizedEdgeBase< PointT, PointLT >::th_depth_discon_.

◆ setEdgeType()

template<typename PointT , typename PointLT >
void pcl::OrganizedEdgeBase< PointT, PointLT >::setEdgeType ( int  edge_types)
inline

◆ setMaxSearchNeighbors()

template<typename PointT , typename PointLT >
void pcl::OrganizedEdgeBase< PointT, PointLT >::setMaxSearchNeighbors ( const int  max_dist)
inline

Set the max search distance for deciding occluding and occluded edges.

Definition at line 111 of file organized_edge_detection.h.

References pcl::OrganizedEdgeBase< PointT, PointLT >::max_search_neighbors_.

Member Data Documentation

◆ detecting_edge_types_

template<typename PointT , typename PointLT >
int pcl::OrganizedEdgeBase< PointT, PointLT >::detecting_edge_types_
protected

The bit encoded value that represents edge types to detect.

Definition at line 176 of file organized_edge_detection.h.

Referenced by pcl::OrganizedEdgeBase< PointT, PointLT >::getEdgeType(), and pcl::OrganizedEdgeBase< PointT, PointLT >::setEdgeType().

◆ max_search_neighbors_

template<typename PointT , typename PointLT >
int pcl::OrganizedEdgeBase< PointT, PointLT >::max_search_neighbors_ {50}
protected

The max search distance for deciding occluding and occluded edges.

Definition at line 173 of file organized_edge_detection.h.

Referenced by pcl::OrganizedEdgeBase< PointT, PointLT >::getMaxSearchNeighbors(), and pcl::OrganizedEdgeBase< PointT, PointLT >::setMaxSearchNeighbors().

◆ num_of_edgetype_

template<typename PointT , typename PointLT >
const int pcl::OrganizedEdgeBase< PointT, PointLT >::num_of_edgetype_ = 5
static

Definition at line 138 of file organized_edge_detection.h.

◆ th_depth_discon_

template<typename PointT , typename PointLT >
float pcl::OrganizedEdgeBase< PointT, PointLT >::th_depth_discon_ {0.02f}
protected

The tolerance in meters for the relative difference in depth values between neighboring points (The default value is set for .02 meters and is adapted with respect to depth value linearly.

e.g. If a point has a depth (z) value of 2.0 meters, a neighboring point is discontinuous if its depth differs by > 2.0 * th.

Definition at line 170 of file organized_edge_detection.h.

Referenced by pcl::OrganizedEdgeBase< PointT, PointLT >::getDepthDisconThreshold(), and pcl::OrganizedEdgeBase< PointT, PointLT >::setDepthDisconThreshold().


The documentation for this class was generated from the following files: