Point Cloud Library (PCL)  1.5.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions
pcl::SACSegmentationFromNormals< PointT, PointNT > Class Template Reference

SACSegmentationFromNormals represents the PCL nodelet segmentation class for Sample Consensus methods and models that require the use of surface normals for estimation. More...

#include <pcl/segmentation/sac_segmentation.h>

Inheritance diagram for pcl::SACSegmentationFromNormals< PointT, PointNT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::SACSegmentationFromNormals< PointT, PointNT >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef SACSegmentation
< PointT >::PointCloud 
PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef pcl::PointCloud< PointNT > PointCloudN
typedef PointCloudN::Ptr PointCloudNPtr
typedef PointCloudN::ConstPtr PointCloudNConstPtr
typedef SampleConsensus
< PointT >::Ptr 
SampleConsensusPtr
typedef SampleConsensusModel
< PointT >::Ptr 
SampleConsensusModelPtr
typedef
SampleConsensusModelFromNormals
< PointT, PointNT >::Ptr 
SampleConsensusModelFromNormalsPtr
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

Public Member Functions

 SACSegmentationFromNormals ()
 Empty constructor.
void setInputNormals (const PointCloudNConstPtr &normals)
 Provide a pointer to the input dataset that contains the point normals of the XYZ dataset.
PointCloudNConstPtr getInputNormals () const
 Get a pointer to the normals of the input XYZ point cloud dataset.
void setNormalDistanceWeight (double distance_weight)
 Set the relative weight (between 0 and 1) to give to the angular distance (0 to pi/2) between point normals and the plane normal.
double getNormalDistanceWeight () const
 Get the relative weight (between 0 and 1) to give to the angular distance (0 to pi/2) between point normals and the plane normal.
void setDistanceFromOrigin (const double d)
 Set the distance we expect a plane model to be from the origin.
double getDistanceFromOrigin () const
 Get the distance of a plane model from the origin.
void setModelType (int model)
 The type of model to use (user given parameter).
int getModelType () const
 Get the type of SAC model used.
SampleConsensusPtr getMethod () const
 Get a pointer to the SAC method used.
SampleConsensusModelPtr getModel () const
 Get a pointer to the SAC model used.
void setMethodType (int method)
 The type of sample consensus method to use (user given parameter).
int getMethodType () const
 Get the type of sample consensus method used.
void setDistanceThreshold (double threshold)
 Distance to the model threshold (user given parameter).
double getDistanceThreshold () const
 Get the distance to the model threshold.
void setMaxIterations (int max_iterations)
 Set the maximum number of iterations before giving up.
int getMaxIterations () const
 Get maximum number of iterations before giving up.
void setProbability (double probability)
 Set the probability of choosing at least one sample free from outliers.
double getProbability () const
 Get the probability of choosing at least one sample free from outliers.
void setOptimizeCoefficients (bool optimize)
 Set to true if a coefficient refinement is required.
bool getOptimizeCoefficients () const
 Get the coefficient refinement internal flag.
void setRadiusLimits (const double &min_radius, const double &max_radius)
 Set the minimum and maximum allowable radius limits for the model (applicable to models that estimate a radius)
void getRadiusLimits (double &min_radius, double &max_radius)
 Get the minimum and maximum allowable radius limits for the model as set by the user.
void setAxis (const Eigen::Vector3f &ax)
 Set the axis along which we need to search for a model perpendicular to.
Eigen::Vector3f getAxis () const
 Get the axis along which we need to search for a model perpendicular to.
void setEpsAngle (double ea)
 Set the angle epsilon (delta) threshold.
double getEpsAngle () const
 Get the epsilon (delta) model angle threshold in radians.
virtual void segment (PointIndices &inliers, ModelCoefficients &model_coefficients)
 Base method for segmentation of a model in a PointCloud given by <setInputCloud (), setIndices ()>
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset.
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset.
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data.
void setIndices (size_t row_start, size_t col_start, size_t nb_rows, size_t nb_cols)
 Set the indices for the points laying within an interest region of the point cloud.
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used.
const PointT & operator[] (size_t pos)
 Override PointCloud operator[] to shorten code.

Detailed Description

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

SACSegmentationFromNormals represents the PCL nodelet segmentation class for Sample Consensus methods and models that require the use of surface normals for estimation.

Definition at line 265 of file sac_segmentation.h.


Member Typedef Documentation

template<typename PointT , typename PointNT >
typedef SACSegmentation<PointT>::PointCloud pcl::SACSegmentationFromNormals< PointT, PointNT >::PointCloud

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 278 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
typedef PointCloud::ConstPtr pcl::SACSegmentationFromNormals< PointT, PointNT >::PointCloudConstPtr

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 280 of file sac_segmentation.h.

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

Definition at line 282 of file sac_segmentation.h.

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

Definition at line 284 of file sac_segmentation.h.

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

Definition at line 283 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
typedef PointCloud::Ptr pcl::SACSegmentationFromNormals< PointT, PointNT >::PointCloudPtr

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 279 of file sac_segmentation.h.

template<typename PointT>
typedef PointIndices::ConstPtr pcl::PCLBase< PointT >::PointIndicesConstPtr [inherited]
template<typename PointT>
typedef PointIndices::Ptr pcl::PCLBase< PointT >::PointIndicesPtr [inherited]
template<typename PointT , typename PointNT >
typedef SampleConsensusModelFromNormals<PointT, PointNT>::Ptr pcl::SACSegmentationFromNormals< PointT, PointNT >::SampleConsensusModelFromNormalsPtr

Definition at line 288 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
typedef SampleConsensusModel<PointT>::Ptr pcl::SACSegmentationFromNormals< PointT, PointNT >::SampleConsensusModelPtr

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 287 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
typedef SampleConsensus<PointT>::Ptr pcl::SACSegmentationFromNormals< PointT, PointNT >::SampleConsensusPtr

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 286 of file sac_segmentation.h.


Constructor & Destructor Documentation

template<typename PointT , typename PointNT >
pcl::SACSegmentationFromNormals< PointT, PointNT >::SACSegmentationFromNormals ( ) [inline]

Empty constructor.

Definition at line 291 of file sac_segmentation.h.


Member Function Documentation

template<typename PointT>
Eigen::Vector3f pcl::SACSegmentation< PointT >::getAxis ( ) const [inline, inherited]

Get the axis along which we need to search for a model perpendicular to.

Definition at line 190 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
double pcl::SACSegmentationFromNormals< PointT, PointNT >::getDistanceFromOrigin ( ) const [inline]

Get the distance of a plane model from the origin.

Definition at line 324 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::getDistanceThreshold ( ) const [inline, inherited]

Get the distance to the model threshold.

Definition at line 127 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::getEpsAngle ( ) const [inline, inherited]

Get the epsilon (delta) model angle threshold in radians.

Definition at line 200 of file sac_segmentation.h.

template<typename PointT>
IndicesPtr const pcl::PCLBase< PointT >::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 190 of file pcl_base.h.

template<typename PointT>
PointCloudConstPtr const pcl::PCLBase< PointT >::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointT , typename PointNT >
PointCloudNConstPtr pcl::SACSegmentationFromNormals< PointT, PointNT >::getInputNormals ( ) const [inline]

Get a pointer to the normals of the input XYZ point cloud dataset.

Definition at line 302 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::getMaxIterations ( ) const [inline, inherited]

Get maximum number of iterations before giving up.

Definition at line 137 of file sac_segmentation.h.

template<typename PointT>
SampleConsensusPtr pcl::SACSegmentation< PointT >::getMethod ( ) const [inline, inherited]

Get a pointer to the SAC method used.

Definition at line 103 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::getMethodType ( ) const [inline, inherited]

Get the type of sample consensus method used.

Definition at line 117 of file sac_segmentation.h.

template<typename PointT>
SampleConsensusModelPtr pcl::SACSegmentation< PointT >::getModel ( ) const [inline, inherited]

Get a pointer to the SAC model used.

Definition at line 107 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::getModelType ( ) const [inline, inherited]

Get the type of SAC model used.

Definition at line 99 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
double pcl::SACSegmentationFromNormals< PointT, PointNT >::getNormalDistanceWeight ( ) const [inline]

Get the relative weight (between 0 and 1) to give to the angular distance (0 to pi/2) between point normals and the plane normal.

Definition at line 314 of file sac_segmentation.h.

template<typename PointT>
bool pcl::SACSegmentation< PointT >::getOptimizeCoefficients ( ) const [inline, inherited]

Get the coefficient refinement internal flag.

Definition at line 157 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::getProbability ( ) const [inline, inherited]

Get the probability of choosing at least one sample free from outliers.

Definition at line 147 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::getRadiusLimits ( double &  min_radius,
double &  max_radius 
) [inline, inherited]

Get the minimum and maximum allowable radius limits for the model as set by the user.

Parameters:
[out]min_radiusthe resultant minimum radius model
[out]max_radiusthe resultant maximum radius model

Definition at line 176 of file sac_segmentation.h.

template<typename PointT>
const PointT& pcl::PCLBase< PointT >::operator[] ( size_t  pos) [inline, inherited]

Override PointCloud operator[] to shorten code.

Note:
this method can be called instead of (*input_)[(*indices_)[pos]] or input_->points[(*indices_)[pos]]
Parameters:
posposition in indices_ vector

Definition at line 197 of file pcl_base.h.

template<typename PointT >
void pcl::SACSegmentation< PointT >::segment ( PointIndices inliers,
ModelCoefficients model_coefficients 
) [virtual, inherited]

Base method for segmentation of a model in a PointCloud given by <setInputCloud (), setIndices ()>

Parameters:
[in]inliersthe resultant point indices that support the model found (inliers)
[out]model_coefficientsthe resultant model coefficients

Definition at line 69 of file sac_segmentation.hpp.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setAxis ( const Eigen::Vector3f &  ax) [inline, inherited]

Set the axis along which we need to search for a model perpendicular to.

Parameters:
[in]axthe axis along which we need to search for a model perpendicular to

Definition at line 186 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
void pcl::SACSegmentationFromNormals< PointT, PointNT >::setDistanceFromOrigin ( const double  d) [inline]

Set the distance we expect a plane model to be from the origin.

Parameters:
[in]ddistance from the template plane modl to the origin

Definition at line 320 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setDistanceThreshold ( double  threshold) [inline, inherited]

Distance to the model threshold (user given parameter).

Parameters:
[in]thresholdthe distance threshold to use

Definition at line 123 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setEpsAngle ( double  ea) [inline, inherited]

Set the angle epsilon (delta) threshold.

Parameters:
[in]eathe maximum allowed difference between the model normal and the given axis in radians.

Definition at line 196 of file sac_segmentation.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 113 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 124 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const PointIndicesConstPtr indices) [inline, inherited]

Provide a pointer to the vector of indices that represents the input data.

Parameters:
indicesa pointer to the vector of indices that represents the input data.

Definition at line 135 of file pcl_base.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( size_t  row_start,
size_t  col_start,
size_t  nb_rows,
size_t  nb_cols 
) [inline, inherited]

Set the indices for the points laying within an interest region of the point cloud.

Note:
you shouldn't call this method on unorganized point clouds!
Parameters:
row_startthe offset on rows
col_startthe offset on columns
nb_rowsthe number of rows to be considered row_start included
nb_colsthe number of columns to be considered col_start included

Definition at line 151 of file pcl_base.h.

template<typename PointT>
virtual void pcl::PCLBase< PointT >::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Reimplemented in pcl::PCA< PointT >, and pcl::GeneralizedIterativeClosestPoint< PointT, PointT >.

Definition at line 103 of file pcl_base.h.

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

Provide a pointer to the input dataset that contains the point normals of the XYZ dataset.

Parameters:
[in]normalsthe const boost shared pointer to a PointCloud message

Definition at line 298 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setMaxIterations ( int  max_iterations) [inline, inherited]

Set the maximum number of iterations before giving up.

Parameters:
[in]max_iterationsthe maximum number of iterations the sample consensus method will run

Definition at line 133 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setMethodType ( int  method) [inline, inherited]

The type of sample consensus method to use (user given parameter).

Parameters:
[in]methodthe method type (check method_types.h)

Definition at line 113 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setModelType ( int  model) [inline, inherited]

The type of model to use (user given parameter).

Parameters:
[in]modelthe model type (check model_types.h)

Definition at line 95 of file sac_segmentation.h.

template<typename PointT , typename PointNT >
void pcl::SACSegmentationFromNormals< PointT, PointNT >::setNormalDistanceWeight ( double  distance_weight) [inline]

Set the relative weight (between 0 and 1) to give to the angular distance (0 to pi/2) between point normals and the plane normal.

Parameters:
[in]distance_weightthe distance/angular weight

Definition at line 309 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setOptimizeCoefficients ( bool  optimize) [inline, inherited]

Set to true if a coefficient refinement is required.

Parameters:
[in]optimizetrue for enabling model coefficient refinement, false otherwise

Definition at line 153 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setProbability ( double  probability) [inline, inherited]

Set the probability of choosing at least one sample free from outliers.

Parameters:
[in]probabilitythe model fitting probability

Definition at line 143 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setRadiusLimits ( const double &  min_radius,
const double &  max_radius 
) [inline, inherited]

Set the minimum and maximum allowable radius limits for the model (applicable to models that estimate a radius)

Parameters:
[in]min_radiusthe minimum radius model
[in]max_radiusthe maximum radius model

Definition at line 165 of file sac_segmentation.h.


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