pcl::SACSegmentationFromNormals< PointT, PointNT > Class Template Reference
Module segmentation

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 >:

## 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
Public Types inherited from pcl::SACSegmentation< PointT >
typedef pcl::PointCloud< PointT > | PointCloud
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
Public Types inherited from pcl::PCLBase< PointT >
typedef pcl::PointCloud< PointT > | PointCloud
typedef PointCloud::Ptr | PointCloudPtr
typedef PointCloud::ConstPtr | PointCloudConstPtr
typedef boost::shared_ptr< PointIndices > | PointIndicesPtr
typedef boost::shared_ptr< PointIndices const > | PointIndicesConstPtr

## Public Member Functions

| SACSegmentationFromNormals (bool random=false)
| Empty constructor. More...
void | setInputNormals (const PointCloudNConstPtr &normals)
| Provide a pointer to the input dataset that contains the point normals of the XYZ dataset. More...
PointCloudNConstPtr | getInputNormals () const
| Get a pointer to the normals of the input XYZ point cloud dataset. More...
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. More...
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. More...
void | setMinMaxOpeningAngle (const double &min_angle, const double &max_angle)
| Set the minimum opning angle for a cone model. More...
void | getMinMaxOpeningAngle (double &min_angle, double &max_angle)
| Get the opening angle which we need minumum to validate a cone model. More...
void | setDistanceFromOrigin (const double d)
| Set the distance we expect a plane model to be from the origin. More...
double | getDistanceFromOrigin () const
| Get the distance of a plane model from the origin. More...
Public Member Functions inherited from pcl::SACSegmentation< PointT >
| SACSegmentation (bool random=false)
| 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...
Public Member Functions inherited from pcl::PCLBase< PointT >
| PCLBase ()
| Empty constructor. More...
| PCLBase (const PCLBase &base)
| Copy constructor. More...
virtual | ~PCLBase ()
| Destructor. More...
virtual void | setInputCloud (const PointCloudConstPtr &cloud)
| Provide a pointer to the input dataset. More...
PointCloudConstPtr const | getInputCloud () const
| Get a pointer to the input point cloud dataset. More...
virtual void | setIndices (const IndicesPtr &indices)
| Provide a pointer to the vector of indices that represents the input data. More...
virtual void | setIndices (const IndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data. More...
virtual void | setIndices (const PointIndicesConstPtr &indices)
| Provide a pointer to the vector of indices that represents the input data. More...
virtual 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...
IndicesConstPtr const | getIndices () const
| Get a pointer to the vector of indices used. More...
const PointT & | operator[] (size_t pos) const
| Override PointCloud operator[] to shorten code. More...

## Protected Member Functions

virtual bool | initSACModel (const int model_type)
| Initialize the Sample Consensus model and set its parameters. More...
virtual std::string | getClassName () const
| Class get name method. More...
Protected Member Functions inherited from pcl::SACSegmentation< PointT >
virtual void | initSAC (const int method_type)
| Initialize the Sample Consensus method and set its parameters. More...
Protected Member Functions inherited from pcl::PCLBase< PointT >
bool | initCompute ()
| This method should get called before starting the actual computation. More...
bool | deinitCompute ()
| This method should get called after finishing the actual computation. More...

## Protected Attributes

PointCloudNConstPtr | normals_
| A pointer to the input dataset that contains the point normals of the XYZ dataset. More...
double | distance_weight_
| The relative weight (between 0 and 1) to give to the angular distance (0 to pi/2) between point normals and the plane normal. More...
double | distance_from_origin_
| The distance from the template plane to the origin. More...
double | min_angle_
| The minimum and maximum allowed opening angle of valid cone model. More...
double | max_angle_
Protected Attributes inherited from pcl::SACSegmentation< PointT >
SampleConsensusModelPtr | model_
| The model that needs to be segmented. More...
SampleConsensusPtr | sac_
| The sample consensus segmentation method. More...
int | model_type_
| The type of model to use (user given parameter). More...
int | method_type_
| The type of sample consensus method to use (user given parameter). More...
double | threshold_
| Distance to the model threshold (user given parameter). More...
bool | optimize_coefficients_
| Set to true if a coefficient refinement is required. More...
double | radius_min_
| The minimum and maximum radius limits for the model. More...
double | radius_max_
double | samples_radius_
| The maximum distance of subsequent samples from the first (radius search) More...
SearchPtr | samples_radius_search_
| The search object for picking subsequent samples using radius search. More...
double | eps_angle_
| The maximum allowed difference between the model normal and the given axis. More...
Eigen::Vector3f | axis_
| The axis along which we need to search for a model perpendicular to. More...
int | max_iterations_
| Maximum number of iterations before giving up (user given parameter). More...
double | probability_
| Desired probability of choosing at least one sample free from outliers (user given parameter). More...
bool | random_
| Set to true if we need a random seed. More...
Protected Attributes inherited from pcl::PCLBase< PointT >
PointCloudConstPtr | input_
| The input point cloud dataset. More...
IndicesPtr | indices_
| A pointer to the vector of point indices to use. More...
bool | use_indices_
| Set to true if point indices are used. More...
bool | fake_indices_
| If no set of indices are given, we construct a set of fake indices that mimic the input PointCloud. More...

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

## Member Typedef Documentation

## PointCloud

template<typename PointT , typename PointNT >

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

Definition at line 325 of file sac_segmentation.h.

## PointCloudConstPtr

template<typename PointT , typename PointNT >

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

Definition at line 327 of file sac_segmentation.h.

## PointCloudN

template<typename PointT , typename PointNT >

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

Definition at line 329 of file sac_segmentation.h.

## PointCloudNConstPtr

template<typename PointT , typename PointNT >

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

Definition at line 331 of file sac_segmentation.h.

## PointCloudNPtr

template<typename PointT , typename PointNT >

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

Definition at line 330 of file sac_segmentation.h.

## PointCloudPtr

template<typename PointT , typename PointNT >

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

Definition at line 326 of file sac_segmentation.h.

## SampleConsensusModelFromNormalsPtr

template<typename PointT , typename PointNT >

typedef SampleConsensusModelFromNormals<PointT, PointNT>::Ptr pcl::SACSegmentationFromNormals< PointT, PointNT >::SampleConsensusModelFromNormalsPtr

Definition at line 335 of file sac_segmentation.h.

## SampleConsensusModelPtr

template<typename PointT , typename PointNT >

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

Definition at line 334 of file sac_segmentation.h.

## SampleConsensusPtr

template<typename PointT , typename PointNT >

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

Definition at line 333 of file sac_segmentation.h.

## Constructor & Destructor Documentation

## SACSegmentationFromNormals()

template<typename PointT , typename PointNT >

pcl::SACSegmentationFromNormals< PointT, PointNT >::SACSegmentationFromNormals | ( | bool | random = `false` | ) |

inline

Empty constructor.

Parameters

  [in] | random | if true set the random seed to the current time, else set to 12345 (default: false)

Definition at line 340 of file sac_segmentation.h.

## Member Function Documentation

## getClassName()

template<typename PointT , typename PointNT >

virtual std::string pcl::SACSegmentationFromNormals< PointT, PointNT >::getClassName | ( |  | ) | const

inline protected virtual

Class get name method.

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 425 of file sac_segmentation.h.

## getDistanceFromOrigin()

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

## getInputNormals()

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

## getMinMaxOpeningAngle()

template<typename PointT , typename PointNT >

void pcl::SACSegmentationFromNormals< PointT, PointNT >::getMinMaxOpeningAngle | ( | double & | min_angle,
|  | double & | max_angle
| ) |  |

inline

Get the opening angle which we need minumum to validate a cone model.

Definition at line 385 of file sac_segmentation.h.

## getNormalDistanceWeight()

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

## initSACModel()

template<typename PointT , typename PointNT >

bool pcl::SACSegmentationFromNormals< PointT, PointNT >::initSACModel | ( | const int | model_type | ) |

protected virtual

Initialize the Sample Consensus model and set its parameters.

Parameters

  [in] | model_type | the type of SAC model that is to be used

Reimplemented from pcl::SACSegmentation< PointT >.

Definition at line 342 of file sac_segmentation.hpp.

References pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getAxis(), pcl::SampleConsensusModelCylinder< PointT, PointNT >::getAxis(), pcl::SampleConsensusModelCone< PointT, PointNT >::getAxis(), pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getDistanceFromOrigin(), pcl::SampleConsensusModelCylinder< PointT, PointNT >::getEpsAngle(), pcl::SampleConsensusModelCone< PointT, PointNT >::getEpsAngle(), pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::getEpsAngle(), pcl::SampleConsensusModelCone< PointT, PointNT >::getMinMaxOpeningAngle(), pcl::SampleConsensusModelFromNormals< PointT, PointNT >::getNormalDistanceWeight(), pcl::SampleConsensusModel< PointT >::getRadiusLimits(), pcl::SACMODEL_CONE, pcl::SACMODEL_CYLINDER, pcl::SACMODEL_NORMAL_PARALLEL_PLANE, pcl::SACMODEL_NORMAL_PLANE, pcl::SACMODEL_NORMAL_SPHERE, pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::setAxis(), pcl::SampleConsensusModelCylinder< PointT, PointNT >::setAxis(), pcl::SampleConsensusModelCone< PointT, PointNT >::setAxis(), pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::setDistanceFromOrigin(), pcl::SampleConsensusModelCylinder< PointT, PointNT >::setEpsAngle(), pcl::SampleConsensusModelCone< PointT, PointNT >::setEpsAngle(), pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >::setEpsAngle(), pcl::SampleConsensusModelFromNormals< PointT, PointNT >::setInputNormals(), pcl::SampleConsensusModelCone< PointT, PointNT >::setMinMaxOpeningAngle(), pcl::SampleConsensusModelFromNormals< PointT, PointNT >::setNormalDistanceWeight(), and pcl::SampleConsensusModel< PointT >::setRadiusLimits().

## setDistanceFromOrigin()

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] | d | distance from the template plane modl to the origin

Definition at line 395 of file sac_segmentation.h.

## setInputNormals()

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] | normals | the const boost shared pointer to a PointCloud message

Definition at line 354 of file sac_segmentation.h.

## setMinMaxOpeningAngle()

template<typename PointT , typename PointNT >

void pcl::SACSegmentationFromNormals< PointT, PointNT >::setMinMaxOpeningAngle | ( | const double & | min_angle,
|  | const double & | max_angle
| ) |  |

inline

Set the minimum opning angle for a cone model.

Parameters

  min_angle | the opening angle which we need minumum to validate a cone model.
  max_angle | the opening angle which we need maximum to validate a cone model.

Definition at line 377 of file sac_segmentation.h.

## setNormalDistanceWeight()

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_weight | the distance/angular weight

Definition at line 365 of file sac_segmentation.h.

## Member Data Documentation

## distance_from_origin_

template<typename PointT , typename PointNT >

double pcl::SACSegmentationFromNormals< PointT, PointNT >::distance_from_origin_

protected

The distance from the template plane to the origin.

Definition at line 411 of file sac_segmentation.h.

## distance_weight_

template<typename PointT , typename PointNT >

double pcl::SACSegmentationFromNormals< PointT, PointNT >::distance_weight_

protected

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

## max_angle_

template<typename PointT , typename PointNT >

double pcl::SACSegmentationFromNormals< PointT, PointNT >::max_angle_

protected

Definition at line 415 of file sac_segmentation.h.

## min_angle_

template<typename PointT , typename PointNT >

double pcl::SACSegmentationFromNormals< PointT, PointNT >::min_angle_

protected

The minimum and maximum allowed opening angle of valid cone model.

Definition at line 414 of file sac_segmentation.h.

## normals_

template<typename PointT , typename PointNT >

PointCloudNConstPtr pcl::SACSegmentationFromNormals< PointT, PointNT >::normals_

protected

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

Definition at line 403 of file sac_segmentation.h.

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

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/segmentation/include/pcl/segmentation/sac_segmentation.h
- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/segmentation/include/pcl/segmentation/impl/sac_segmentation.hpp