Point Cloud Library (PCL)  1.9.1-dev
List of all members | Public Types | Public Member Functions | Protected Attributes
pcl::GroundPlaneComparator< PointT, PointNT > Class Template Reference

GroundPlaneComparator is a Comparator for detecting smooth surfaces suitable for driving. More...

#include <pcl/segmentation/ground_plane_comparator.h>

+ Inheritance diagram for pcl::GroundPlaneComparator< PointT, PointNT >:

Public Types

typedef Comparator< PointT >::PointCloud PointCloud
 
typedef Comparator< PointT >::PointCloudConstPtr PointCloudConstPtr
 
typedef pcl::PointCloud< PointNT > PointCloudN
 
typedef PointCloudN::Ptr PointCloudNPtr
 
typedef PointCloudN::ConstPtr PointCloudNConstPtr
 
typedef boost::shared_ptr< GroundPlaneComparator< PointT, PointNT > > Ptr
 
typedef boost::shared_ptr< const GroundPlaneComparator< PointT, PointNT > > ConstPtr
 
- Public Types inherited from pcl::Comparator< PointT >
typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr< Comparator< PointT > > Ptr
 
typedef boost::shared_ptr< const Comparator< PointT > > ConstPtr
 

Public Member Functions

 GroundPlaneComparator ()
 Empty constructor for GroundPlaneComparator. More...
 
 GroundPlaneComparator (boost::shared_ptr< std::vector< float > > &plane_coeff_d)
 Constructor for GroundPlaneComparator. More...
 
virtual ~GroundPlaneComparator ()
 Destructor for GroundPlaneComparator. More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide the input cloud. More...
 
void setInputNormals (const PointCloudNConstPtr &normals)
 Provide a pointer to the input normals. More...
 
PointCloudNConstPtr getInputNormals () const
 Get the input normals. More...
 
void setPlaneCoeffD (boost::shared_ptr< std::vector< float > > &plane_coeff_d)
 Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form. More...
 
void setPlaneCoeffD (std::vector< float > &plane_coeff_d)
 Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form. More...
 
const std::vector< float > & getPlaneCoeffD () const
 Get a pointer to the vector of the d-coefficient of the planes' hessian normal form. More...
 
virtual void setAngularThreshold (float angular_threshold)
 Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane. More...
 
virtual void setGroundAngularThreshold (float angular_threshold)
 Set the tolerance in radians for difference in normal direction between a point and the expected ground normal. More...
 
void setExpectedGroundNormal (Eigen::Vector3f normal)
 Set the expected ground plane normal with respect to the sensor. More...
 
float getAngularThreshold () const
 Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane. More...
 
void setDistanceThreshold (float distance_threshold, bool depth_dependent=false)
 Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) to the plane between neighboring points, to be considered part of the same plane. More...
 
float getDistanceThreshold () const
 Get the distance threshold in meters (d component of plane equation) between neighboring points, to be considered part of the same plane. More...
 
virtual bool compare (int idx1, int idx2) const
 Compare points at two indices by their plane equations. More...
 
- Public Member Functions inherited from pcl::Comparator< PointT >
 Comparator ()
 Empty constructor for comparator. More...
 
virtual ~Comparator ()
 Empty destructor for comparator. More...
 
virtual PointCloudConstPtr getInputCloud () const
 Get the input cloud this comparator operates on. More...
 

Protected Attributes

PointCloudNConstPtr normals_
 
boost::shared_ptr< std::vector< float > > plane_coeff_d_
 
float angular_threshold_
 
float road_angular_threshold_
 
float distance_threshold_
 
bool depth_dependent_
 
Eigen::Vector3f z_axis_
 
Eigen::Vector3f desired_road_axis_
 
- Protected Attributes inherited from pcl::Comparator< PointT >
PointCloudConstPtr input_
 

Detailed Description

template<typename PointT, typename PointNT>
class pcl::GroundPlaneComparator< PointT, PointNT >

GroundPlaneComparator is a Comparator for detecting smooth surfaces suitable for driving.

In conjunction with OrganizedConnectedComponentSegmentation, this allows smooth groundplanes / road surfaces to be segmented from point clouds.

Author
Alex Trevor

Definition at line 54 of file ground_plane_comparator.h.

Member Typedef Documentation

template<typename PointT , typename PointNT >
typedef boost::shared_ptr<const GroundPlaneComparator<PointT, PointNT> > pcl::GroundPlaneComparator< PointT, PointNT >::ConstPtr

Definition at line 65 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
typedef Comparator<PointT>::PointCloud pcl::GroundPlaneComparator< PointT, PointNT >::PointCloud

Definition at line 57 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
typedef Comparator<PointT>::PointCloudConstPtr pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudConstPtr

Definition at line 58 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
typedef pcl::PointCloud<PointNT> pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudN

Definition at line 60 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
typedef PointCloudN::ConstPtr pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudNConstPtr

Definition at line 62 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
typedef PointCloudN::Ptr pcl::GroundPlaneComparator< PointT, PointNT >::PointCloudNPtr

Definition at line 61 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
typedef boost::shared_ptr<GroundPlaneComparator<PointT, PointNT> > pcl::GroundPlaneComparator< PointT, PointNT >::Ptr

Definition at line 64 of file ground_plane_comparator.h.

Constructor & Destructor Documentation

template<typename PointT , typename PointNT >
pcl::GroundPlaneComparator< PointT, PointNT >::GroundPlaneComparator ( )
inline

Empty constructor for GroundPlaneComparator.

Definition at line 70 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
pcl::GroundPlaneComparator< PointT, PointNT >::GroundPlaneComparator ( boost::shared_ptr< std::vector< float > > &  plane_coeff_d)
inline

Constructor for GroundPlaneComparator.

Parameters
[in]plane_coeff_da reference to a vector of d coefficients of plane equations. Must be the same size as the input cloud and input normals. a, b, and c coefficients are in the input normals.

Definition at line 85 of file ground_plane_comparator.h.

template<typename PointT , typename PointNT >
virtual pcl::GroundPlaneComparator< PointT, PointNT >::~GroundPlaneComparator ( )
inlinevirtual

Destructor for GroundPlaneComparator.

Definition at line 99 of file ground_plane_comparator.h.

Member Function Documentation

template<typename PointT , typename PointNT >
virtual bool pcl::GroundPlaneComparator< PointT, PointNT >::compare ( int  idx1,
int  idx2 
) const
inlinevirtual

Compare points at two indices by their plane equations.

True if the angle between the normals is less than the angular threshold, and the difference between the d component of the normals is less than distance threshold, else false

Parameters
idx1The first index for the comparison
idx2The second index for the comparison

Implements pcl::Comparator< PointT >.

Definition at line 212 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::angular_threshold_, pcl::GroundPlaneComparator< PointT, PointNT >::depth_dependent_, pcl::GroundPlaneComparator< PointT, PointNT >::desired_road_axis_, pcl::GroundPlaneComparator< PointT, PointNT >::distance_threshold_, pcl::Comparator< PointT >::input_, pcl::GroundPlaneComparator< PointT, PointNT >::normals_, pcl::GroundPlaneComparator< PointT, PointNT >::road_angular_threshold_, and pcl::GroundPlaneComparator< PointT, PointNT >::z_axis_.

template<typename PointT , typename PointNT >
float pcl::GroundPlaneComparator< PointT, PointNT >::getAngularThreshold ( ) const
inline

Get the angular threshold in radians for difference in normal direction between neighboring points, to be considered part of the same plane.

Definition at line 182 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::angular_threshold_.

template<typename PointT , typename PointNT >
float pcl::GroundPlaneComparator< PointT, PointNT >::getDistanceThreshold ( ) const
inline

Get the distance threshold in meters (d component of plane equation) between neighboring points, to be considered part of the same plane.

Definition at line 201 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::distance_threshold_.

template<typename PointT , typename PointNT >
PointCloudNConstPtr pcl::GroundPlaneComparator< PointT, PointNT >::getInputNormals ( ) const
inline

Get the input normals.

Definition at line 122 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::normals_.

template<typename PointT , typename PointNT >
const std::vector<float>& pcl::GroundPlaneComparator< PointT, PointNT >::getPlaneCoeffD ( ) const
inline

Get a pointer to the vector of the d-coefficient of the planes' hessian normal form.

Definition at line 147 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::plane_coeff_d_.

template<typename PointT , typename PointNT >
virtual void pcl::GroundPlaneComparator< PointT, PointNT >::setAngularThreshold ( float  angular_threshold)
inlinevirtual

Set the tolerance in radians for difference in normal direction between neighboring points, to be considered part of the same plane.

Parameters
[in]angular_thresholdthe tolerance in radians

Definition at line 156 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::angular_threshold_.

template<typename PointT , typename PointNT >
void pcl::GroundPlaneComparator< PointT, PointNT >::setDistanceThreshold ( float  distance_threshold,
bool  depth_dependent = false 
)
inline

Set the tolerance in meters for difference in perpendicular distance (d component of plane equation) to the plane between neighboring points, to be considered part of the same plane.

Parameters
[in]distance_thresholdthe tolerance in meters (at 1m)
[in]depth_dependentwhether to scale the threshold based on range from the sensor (default: false)

Definition at line 192 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::depth_dependent_, and pcl::GroundPlaneComparator< PointT, PointNT >::distance_threshold_.

template<typename PointT , typename PointNT >
void pcl::GroundPlaneComparator< PointT, PointNT >::setExpectedGroundNormal ( Eigen::Vector3f  normal)
inline

Set the expected ground plane normal with respect to the sensor.

Pixels labeled as ground must be within ground_angular_threshold radians of this normal to be labeled as ground.

Parameters
[in]normalThe normal direction of the expected ground plane.

Definition at line 174 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::desired_road_axis_.

template<typename PointT , typename PointNT >
virtual void pcl::GroundPlaneComparator< PointT, PointNT >::setGroundAngularThreshold ( float  angular_threshold)
inlinevirtual

Set the tolerance in radians for difference in normal direction between a point and the expected ground normal.

Parameters
[in]angular_thresholdthe

Definition at line 165 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::road_angular_threshold_.

template<typename PointT , typename PointNT >
virtual void pcl::GroundPlaneComparator< PointT, PointNT >::setInputCloud ( const PointCloudConstPtr cloud)
inlinevirtual

Provide the input cloud.

Parameters
[in]cloudthe input point cloud.

Reimplemented from pcl::Comparator< PointT >.

Definition at line 106 of file ground_plane_comparator.h.

References pcl::Comparator< PointT >::input_.

template<typename PointT , typename PointNT >
void pcl::GroundPlaneComparator< PointT, PointNT >::setInputNormals ( const PointCloudNConstPtr normals)
inline

Provide a pointer to the input normals.

Parameters
[in]normalsthe input normal cloud.

Definition at line 115 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::normals_.

template<typename PointT , typename PointNT >
void pcl::GroundPlaneComparator< PointT, PointNT >::setPlaneCoeffD ( boost::shared_ptr< std::vector< float > > &  plane_coeff_d)
inline

Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.

a, b, and c are provided by the normal cloud.

Parameters
[in]plane_coeff_da pointer to the plane coefficients.

Definition at line 131 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::plane_coeff_d_.

template<typename PointT , typename PointNT >
void pcl::GroundPlaneComparator< PointT, PointNT >::setPlaneCoeffD ( std::vector< float > &  plane_coeff_d)
inline

Provide a pointer to a vector of the d-coefficient of the planes' hessian normal form.

a, b, and c are provided by the normal cloud.

Parameters
[in]plane_coeff_da pointer to the plane coefficients.

Definition at line 140 of file ground_plane_comparator.h.

References pcl::GroundPlaneComparator< PointT, PointNT >::plane_coeff_d_.

Member Data Documentation

template<typename PointT , typename PointNT >
float pcl::GroundPlaneComparator< PointT, PointNT >::angular_threshold_
protected
template<typename PointT , typename PointNT >
bool pcl::GroundPlaneComparator< PointT, PointNT >::depth_dependent_
protected
template<typename PointT , typename PointNT >
Eigen::Vector3f pcl::GroundPlaneComparator< PointT, PointNT >::desired_road_axis_
protected
template<typename PointT , typename PointNT >
float pcl::GroundPlaneComparator< PointT, PointNT >::distance_threshold_
protected
template<typename PointT , typename PointNT >
PointCloudNConstPtr pcl::GroundPlaneComparator< PointT, PointNT >::normals_
protected
template<typename PointT , typename PointNT >
boost::shared_ptr<std::vector<float> > pcl::GroundPlaneComparator< PointT, PointNT >::plane_coeff_d_
protected
template<typename PointT , typename PointNT >
float pcl::GroundPlaneComparator< PointT, PointNT >::road_angular_threshold_
protected
template<typename PointT , typename PointNT >
Eigen::Vector3f pcl::GroundPlaneComparator< PointT, PointNT >::z_axis_
protected

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