Point Cloud Library (PCL)  1.3.1
Public Types | Public Member Functions
pcl::SACSegmentation Class 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:
Inheritance graph
[legend]
Collaboration diagram for pcl::SACSegmentation:
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
typedef PointIndices::Ptr PointIndicesPtr
typedef PointIndices::ConstPtr PointIndicesConstPtr

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

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

Member Typedef Documentation

Reimplemented from pcl::PCLBase< PointT >.

Reimplemented in pcl::SACSegmentationFromNormals.

Definition at line 68 of file sac_segmentation.h.

Reimplemented from pcl::PCLBase< PointT >.

Reimplemented in pcl::SACSegmentationFromNormals.

Definition at line 70 of file sac_segmentation.h.

Reimplemented from pcl::PCLBase< PointT >.

Reimplemented in pcl::SACSegmentationFromNormals.

Definition at line 69 of file sac_segmentation.h.

Reimplemented in pcl::SACSegmentationFromNormals.

Definition at line 73 of file sac_segmentation.h.

Reimplemented in pcl::SACSegmentationFromNormals.

Definition at line 72 of file sac_segmentation.h.


Constructor & Destructor Documentation

pcl::SACSegmentation::SACSegmentation ( ) [inline]

Empty constructor.

Definition at line 76 of file sac_segmentation.h.

virtual pcl::SACSegmentation::~SACSegmentation ( ) [inline, virtual]

Empty destructor.

Definition at line 85 of file sac_segmentation.h.


Member Function Documentation

Eigen::Vector3f pcl::SACSegmentation::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.

double pcl::SACSegmentation::getDistanceThreshold ( ) [inline]

Get the distance to the model threshold.

Definition at line 122 of file sac_segmentation.h.

double pcl::SACSegmentation::getEpsAngle ( ) [inline]

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

Definition at line 196 of file sac_segmentation.h.

IndicesPtr const pcl::PCLBase::getIndices ( ) [inline, inherited]

Get a pointer to the vector of indices used.

Definition at line 171 of file pcl_base.h.

PointCloudConstPtr const pcl::PCLBase::getInputCloud ( ) [inline, inherited]

Get a pointer to the input point cloud dataset.

Definition at line 99 of file pcl_base.h.

int pcl::SACSegmentation::getMaxIterations ( ) [inline]

Get maximum number of iterations before giving up.

Definition at line 132 of file sac_segmentation.h.

SampleConsensusPtr pcl::SACSegmentation::getMethod ( ) [inline]

Get a pointer to the SAC method used.

Definition at line 98 of file sac_segmentation.h.

int pcl::SACSegmentation::getMethodType ( ) [inline]

Get the type of sample consensus method used.

Definition at line 112 of file sac_segmentation.h.

SampleConsensusModelPtr pcl::SACSegmentation::getModel ( ) [inline]

Get a pointer to the SAC model used.

Definition at line 102 of file sac_segmentation.h.

int pcl::SACSegmentation::getModelType ( ) [inline]

Get the type of SAC model used.

Definition at line 94 of file sac_segmentation.h.

bool pcl::SACSegmentation::getOptimizeCoefficients ( ) [inline]

Get the coefficient refinement internal flag.

Definition at line 152 of file sac_segmentation.h.

double pcl::SACSegmentation::getProbability ( ) [inline]

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

Definition at line 142 of file sac_segmentation.h.

void pcl::SACSegmentation::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_radiusthe resultant minimum radius model
max_radiusthe resultant maximum radius model

Definition at line 172 of file sac_segmentation.h.

const PointT& pcl::PCLBase::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 178 of file pcl_base.h.

void pcl::SACSegmentation::segment ( PointIndices inliers,
ModelCoefficients model_coefficients 
) [virtual]

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

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

Definition at line 71 of file sac_segmentation.hpp.

void pcl::SACSegmentation::setAxis ( const Eigen::Vector3f &  ax) [inline]

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

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

Definition at line 182 of file sac_segmentation.h.

void pcl::SACSegmentation::setDistanceThreshold ( double  threshold) [inline]

Distance to the model threshold (user given parameter).

Parameters:
thresholdthe distance threshold to use

Definition at line 118 of file sac_segmentation.h.

void pcl::SACSegmentation::setEpsAngle ( double  ea) [inline]

Set the angle epsilon (delta) threshold.

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

Definition at line 192 of file sac_segmentation.h.

void pcl::PCLBase::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 105 of file pcl_base.h.

void pcl::PCLBase::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 116 of file pcl_base.h.

void pcl::PCLBase::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 132 of file pcl_base.h.

virtual void pcl::PCLBase::setInputCloud ( const PointCloudConstPtr cloud) [inline, virtual, inherited]

Provide a pointer to the input dataset.

Parameters:
cloudthe const boost shared pointer to a PointCloud message

Definition at line 95 of file pcl_base.h.

void pcl::SACSegmentation::setMaxIterations ( int  max_iterations) [inline]

Set the maximum number of iterations before giving up.

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

Definition at line 128 of file sac_segmentation.h.

void pcl::SACSegmentation::setMethodType ( int  method) [inline]

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

Parameters:
methodthe method type (check method_types.h)

Definition at line 108 of file sac_segmentation.h.

void pcl::SACSegmentation::setModelType ( int  model) [inline]

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

Parameters:
modelthe model type (check model_types.h)

Definition at line 90 of file sac_segmentation.h.

void pcl::SACSegmentation::setOptimizeCoefficients ( bool  optimize) [inline]

Set to true if a coefficient refinement is required.

Parameters:
optimizetrue for enabling model coefficient refinement, false otherwise

Definition at line 148 of file sac_segmentation.h.

void pcl::SACSegmentation::setProbability ( double  probability) [inline]

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

Parameters:
probabilitythe model fitting probability

Definition at line 138 of file sac_segmentation.h.

void pcl::SACSegmentation::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_radiusthe minimum radius model
max_radiusthe maximum radius model

Definition at line 161 of file sac_segmentation.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines