Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

pcl::SACSegmentation< PointT > Class Template Reference
[Module segmentation]

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]

List of all members.

Public Types

typedef pcl::PointCloud< PointT > PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef SampleConsensus
< PointT >::Ptr 
SampleConsensusPtr
typedef SampleConsensusModel
< PointT >::Ptr 
SampleConsensusModelPtr

Public Member Functions

 SACSegmentation ()
 Empty constructor.
virtual ~SACSegmentation ()
 Empty destructor.
void setModelType (int model)
 The type of model to use (user given parameter).
int getModelType ()
 Get the type of SAC model used.
SampleConsensusPtr getMethod ()
 Get a pointer to the SAC method used.
SampleConsensusModelPtr getModel ()
 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 ()
 Get the type of sample consensus method used.
void setDistanceThreshold (double threshold)
 Distance to the model threshold (user given parameter).
double getDistanceThreshold ()
 Get the distance to the model threshold.
void setMaxIterations (int max_iterations)
 Set the maximum number of iterations before giving up.
int getMaxIterations ()
 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 ()
 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 ()
 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 ()
 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 ()
 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 ()>

Protected Member Functions

virtual bool initSACModel (const int model_type)
 Initialize the Sample Consensus model and set its parameters.
virtual void initSAC (const int method_type)
 Initialize the Sample Consensus method and set its parameters.
virtual std::string getClassName () const
 Class get name method.

Protected Attributes

SampleConsensusModelPtr model_
 The model that needs to be segmented.
SampleConsensusPtr sac_
 The sample consensus segmentation method.
int model_type_
 The type of model to use (user given parameter).
int method_type_
 The type of sample consensus method to use (user given parameter).
double threshold_
 Distance to the model threshold (user given parameter).
bool optimize_coefficients_
 Set to true if a coefficient refinement is required.
double radius_min_
 The minimum and maximum radius limits for the model.
double radius_max_
double eps_angle_
 The maximum allowed difference between the model normal and the given axis.
Eigen::Vector3f axis_
 The axis along which we need to search for a model perpendicular to.
int max_iterations_
 Maximum number of iterations before giving up (user given parameter).
double probability_
 Desired probability of choosing at least one sample free from outliers (user given parameter).

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


Member Typedef Documentation

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

Reimplemented from pcl::PCLBase< PointT >.

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 68 of file sac_segmentation.h.

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

Reimplemented from pcl::PCLBase< PointT >.

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 70 of file sac_segmentation.h.

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

Reimplemented from pcl::PCLBase< PointT >.

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 69 of file sac_segmentation.h.

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

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 73 of file sac_segmentation.h.

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

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 72 of file sac_segmentation.h.


Constructor & Destructor Documentation

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

Empty constructor.

Definition at line 76 of file sac_segmentation.h.

template<typename PointT>
virtual pcl::SACSegmentation< PointT >::~SACSegmentation (  )  [inline, virtual]

Empty destructor.

Definition at line 85 of file sac_segmentation.h.


Member Function Documentation

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

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

Definition at line 186 of file sac_segmentation.h.

template<typename PointT>
virtual std::string pcl::SACSegmentation< PointT >::getClassName (  )  const [inline, protected, virtual]

Class get name method.

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 253 of file sac_segmentation.h.

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

Get the distance to the model threshold.

Definition at line 122 of file sac_segmentation.h.

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

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

Definition at line 196 of file sac_segmentation.h.

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

Get maximum number of iterations before giving up.

Definition at line 132 of file sac_segmentation.h.

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

Get a pointer to the SAC method used.

Definition at line 98 of file sac_segmentation.h.

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

Get the type of sample consensus method used.

Definition at line 112 of file sac_segmentation.h.

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

Get a pointer to the SAC model used.

Definition at line 102 of file sac_segmentation.h.

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

Get the type of SAC model used.

Definition at line 94 of file sac_segmentation.h.

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

Get the coefficient refinement internal flag.

Definition at line 152 of file sac_segmentation.h.

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

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

Definition at line 142 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:
min_radius the resultant minimum radius model
max_radius the resultant maximum radius model

Definition at line 172 of file sac_segmentation.h.

template<typename PointT >
void pcl::SACSegmentation< PointT >::initSAC ( const int  method_type  )  [protected, virtual]

Initialize the Sample Consensus method and set its parameters.

Parameters:
method_type the type of SAC method to be used

Definition at line 238 of file sac_segmentation.hpp.

template<typename PointT >
bool pcl::SACSegmentation< PointT >::initSACModel ( const int  model_type  )  [protected, virtual]

Initialize the Sample Consensus model and set its parameters.

Parameters:
model_type the type of SAC model that is to be used

Reimplemented in pcl::SACSegmentationFromNormals< PointT, PointNT >.

Definition at line 128 of file sac_segmentation.hpp.

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:
inliers the resultant point indices that support the model found (inliers)
model_coefficients the resultant model coefficients

Definition at line 70 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:
ax the axis along which we need to search for a model perpendicular to

Definition at line 182 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:
threshold the distance threshold to use

Definition at line 118 of file sac_segmentation.h.

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

Set the angle epsilon (delta) threshold.

Parameters:
ea the maximum allowed difference between the model normal and the given axis in radians.

Definition at line 192 of file sac_segmentation.h.

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

Set the maximum number of iterations before giving up.

Parameters:
max_iterations the maximum number of iterations the sample consensus method will run

Definition at line 128 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:
method the method type (check method_types.h)

Definition at line 108 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:
model the model type (check model_types.h)

Definition at line 90 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:
optimize true for enabling model coefficient refinement, false otherwise

Definition at line 148 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:
probability the model fitting probability

Definition at line 138 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:
min_radius the minimum radius model
max_radius the maximum radius model
Todo:
change this to set limits on the entire model

Definition at line 161 of file sac_segmentation.h.


Member Data Documentation

template<typename PointT>
Eigen::Vector3f pcl::SACSegmentation< PointT >::axis_ [protected]

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

Definition at line 243 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::eps_angle_ [protected]

The maximum allowed difference between the model normal and the given axis.

Definition at line 240 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::max_iterations_ [protected]

Maximum number of iterations before giving up (user given parameter).

Definition at line 246 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::method_type_ [protected]

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

Definition at line 228 of file sac_segmentation.h.

template<typename PointT>
SampleConsensusModelPtr pcl::SACSegmentation< PointT >::model_ [protected]

The model that needs to be segmented.

Definition at line 219 of file sac_segmentation.h.

template<typename PointT>
int pcl::SACSegmentation< PointT >::model_type_ [protected]

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

Definition at line 225 of file sac_segmentation.h.

template<typename PointT>
bool pcl::SACSegmentation< PointT >::optimize_coefficients_ [protected]

Set to true if a coefficient refinement is required.

Definition at line 234 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::probability_ [protected]

Desired probability of choosing at least one sample free from outliers (user given parameter).

Definition at line 249 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::radius_max_ [protected]

Definition at line 237 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::radius_min_ [protected]

The minimum and maximum radius limits for the model.

Applicable to all models that estimate a radius.

Definition at line 237 of file sac_segmentation.h.

template<typename PointT>
SampleConsensusPtr pcl::SACSegmentation< PointT >::sac_ [protected]

The sample consensus segmentation method.

Definition at line 222 of file sac_segmentation.h.

template<typename PointT>
double pcl::SACSegmentation< PointT >::threshold_ [protected]

Distance to the model threshold (user given parameter).

Definition at line 231 of file sac_segmentation.h.


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