Point Cloud Library (PCL)  1.6.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions
pcl::SACSegmentation< PointT > Class Template Reference

SACSegmentation represents the Nodelet segmentation class for Sample Consensus methods and models, in the sense that it just creates a Nodelet wrapper for generic-purpose SAC-based segmentation. More...

#include <pcl/segmentation/sac_segmentation.h>

Inheritance diagram for pcl::SACSegmentation< PointT >:
Inheritance graph
[legend]
Collaboration diagram for pcl::SACSegmentation< PointT >:
Collaboration graph
[legend]

Public Types

typedef pcl::PointCloud< PointTPointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef pcl::search::Search
< PointT >::Ptr 
SearchPtr
 
typedef SampleConsensus
< PointT >::Ptr 
SampleConsensusPtr
 
typedef SampleConsensusModel
< PointT >::Ptr 
SampleConsensusModelPtr
 
typedef PointIndices::Ptr PointIndicesPtr
 
typedef PointIndices::ConstPtr PointIndicesConstPtr
 

Public Member Functions

 SACSegmentation ()
 Empty constructor. More...
 
virtual ~SACSegmentation ()
 Empty destructor. More...
 
void setModelType (int model)
 The type of model to use (user given parameter). More...
 
int getModelType () const
 Get the type of SAC model used. More...
 
SampleConsensusPtr getMethod () const
 Get a pointer to the SAC method used. More...
 
SampleConsensusModelPtr getModel () const
 Get a pointer to the SAC model used. More...
 
void setMethodType (int method)
 The type of sample consensus method to use (user given parameter). More...
 
int getMethodType () const
 Get the type of sample consensus method used. More...
 
void setDistanceThreshold (double threshold)
 Distance to the model threshold (user given parameter). More...
 
double getDistanceThreshold () const
 Get the distance to the model threshold. More...
 
void setMaxIterations (int max_iterations)
 Set the maximum number of iterations before giving up. More...
 
int getMaxIterations () const
 Get maximum number of iterations before giving up. More...
 
void setProbability (double probability)
 Set the probability of choosing at least one sample free from outliers. More...
 
double getProbability () const
 Get the probability of choosing at least one sample free from outliers. More...
 
void setOptimizeCoefficients (bool optimize)
 Set to true if a coefficient refinement is required. More...
 
bool getOptimizeCoefficients () const
 Get the coefficient refinement internal flag. More...
 
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) More...
 
void getRadiusLimits (double &min_radius, double &max_radius)
 Get the minimum and maximum allowable radius limits for the model as set by the user. More...
 
void setSamplesMaxDist (const double &radius, SearchPtr search)
 Set the maximum distance allowed when drawing random samples. More...
 
void getSamplesMaxDist (double &radius)
 Get maximum distance allowed when drawing random samples. More...
 
void setAxis (const Eigen::Vector3f &ax)
 Set the axis along which we need to search for a model perpendicular to. More...
 
Eigen::Vector3f getAxis () const
 Get the axis along which we need to search for a model perpendicular to. More...
 
void setEpsAngle (double ea)
 Set the angle epsilon (delta) threshold. More...
 
double getEpsAngle () const
 Get the epsilon (delta) model angle threshold in radians. More...
 
virtual void segment (PointIndices &inliers, ModelCoefficients &model_coefficients)
 Base method for segmentation of a model in a PointCloud given by <setInputCloud (), setIndices ()> More...
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr const getInputCloud ()
 Get a pointer to the input point cloud dataset. More...
 
void setIndices (const IndicesPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (const IndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
void setIndices (const PointIndicesConstPtr &indices)
 Provide a pointer to the vector of indices that represents the input data. More...
 
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. More...
 
IndicesPtr const getIndices ()
 Get a pointer to the vector of indices used. More...
 
const PointToperator[] (size_t pos)
 Override PointCloud operator[] to shorten code. More...
 

Detailed Description

template<typename PointT>
class pcl::SACSegmentation< PointT >

SACSegmentation represents the Nodelet segmentation class for Sample Consensus methods and models, in the sense that it just creates a Nodelet wrapper for generic-purpose SAC-based segmentation.

Author
Radu Bogdan Rusu

Definition at line 65 of file sac_segmentation.h.

Member Typedef Documentation

template<typename PointT>
typedef pcl::PointCloud<PointT> pcl::SACSegmentation< PointT >::PointCloud

Definition at line 74 of file sac_segmentation.h.

template<typename PointT>
typedef PointCloud::ConstPtr pcl::SACSegmentation< PointT >::PointCloudConstPtr

Definition at line 76 of file sac_segmentation.h.

template<typename PointT>
typedef PointCloud::Ptr pcl::SACSegmentation< PointT >::PointCloudPtr

Definition at line 75 of file sac_segmentation.h.

template<typename PointT>
typedef PointIndices::ConstPtr pcl::PCLBase< PointT >::PointIndicesConstPtr
inherited

Definition at line 79 of file pcl_base.h.

template<typename PointT>
typedef PointIndices::Ptr pcl::PCLBase< PointT >::PointIndicesPtr
inherited

Definition at line 78 of file pcl_base.h.

template<typename PointT>
typedef SampleConsensusModel<PointT>::Ptr pcl::SACSegmentation< PointT >::SampleConsensusModelPtr

Definition at line 80 of file sac_segmentation.h.

template<typename PointT>
typedef SampleConsensus<PointT>::Ptr pcl::SACSegmentation< PointT >::SampleConsensusPtr

Definition at line 79 of file sac_segmentation.h.

template<typename PointT>
typedef pcl::search::Search<PointT>::Ptr pcl::SACSegmentation< PointT >::SearchPtr

Definition at line 77 of file sac_segmentation.h.

Constructor & Destructor Documentation

template<typename PointT>
pcl::SACSegmentation< PointT >::SACSegmentation ( )
inline

Empty constructor.

Definition at line 83 of file sac_segmentation.h.

template<typename PointT>
virtual pcl::SACSegmentation< PointT >::~SACSegmentation ( )
inlinevirtual

Empty destructor.

Definition at line 92 of file sac_segmentation.h.

Member Function Documentation

template<typename PointT>
Eigen::Vector3f pcl::SACSegmentation< PointT >::getAxis ( ) const
inline

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

Definition at line 213 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::getDistanceThreshold ( ) const
inline

Get the distance to the model threshold.

Definition at line 130 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::getEpsAngle ( ) const
inline

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

Definition at line 223 of file sac_segmentation.h.

template<typename PointT>
IndicesPtr const pcl::PCLBase< PointT >::getIndices ( )
inlineinherited

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 ( )
inlineinherited

Get a pointer to the input point cloud dataset.

Definition at line 107 of file pcl_base.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::getMaxIterations ( ) const
inline

Get maximum number of iterations before giving up.

Definition at line 140 of file sac_segmentation.h.

template<typename PointT>
SampleConsensusPtr pcl::SACSegmentation< PointT >::getMethod ( ) const
inline

Get a pointer to the SAC method used.

Definition at line 106 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::getMethodType ( ) const
inline

Get the type of sample consensus method used.

Definition at line 120 of file sac_segmentation.h.

template<typename PointT>
SampleConsensusModelPtr pcl::SACSegmentation< PointT >::getModel ( ) const
inline

Get a pointer to the SAC model used.

Definition at line 110 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::getModelType ( ) const
inline

Get the type of SAC model used.

Definition at line 102 of file sac_segmentation.h.

template<typename PointT>
bool pcl::SACSegmentation< PointT >::getOptimizeCoefficients ( ) const
inline

Get the coefficient refinement internal flag.

Definition at line 160 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::getProbability ( ) const
inline

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

Definition at line 150 of file sac_segmentation.h.

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

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 179 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::getSamplesMaxDist ( double &  radius)
inline

Get maximum distance allowed when drawing random samples.

Parameters
[out]radiusthe maximum distance (L2 norm)

Definition at line 200 of file sac_segmentation.h.

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

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

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 71 of file sac_segmentation.hpp.

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

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 209 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setDistanceThreshold ( double  threshold)
inline

Distance to the model threshold (user given parameter).

Parameters
[in]thresholdthe distance threshold to use

Definition at line 126 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setEpsAngle ( double  ea)
inline

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 219 of file sac_segmentation.h.

template<typename PointT>
void pcl::PCLBase< PointT >::setIndices ( const IndicesPtr indices)
inlineinherited

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)
inlineinherited

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)
inlineinherited

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 
)
inlineinherited

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)
inlinevirtualinherited

Provide a pointer to the input dataset.

Parameters
cloudthe const boost shared pointer to a PointCloud message

Reimplemented in pcl::PCA< PointT >.

Definition at line 103 of file pcl_base.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setMaxIterations ( int  max_iterations)
inline

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 136 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setMethodType ( int  method)
inline

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

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

Definition at line 116 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setModelType ( int  model)
inline

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

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

Definition at line 98 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setOptimizeCoefficients ( bool  optimize)
inline

Set to true if a coefficient refinement is required.

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

Definition at line 156 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setProbability ( double  probability)
inline

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

Parameters
[in]probabilitythe model fitting probability

Definition at line 146 of file sac_segmentation.h.

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

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 168 of file sac_segmentation.h.

template<typename PointT>
void pcl::SACSegmentation< PointT >::setSamplesMaxDist ( const double &  radius,
SearchPtr  search 
)
inline

Set the maximum distance allowed when drawing random samples.

Parameters
[in]radiusthe maximum distance (L2 norm)

Definition at line 189 of file sac_segmentation.h.


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