Point Cloud Library (PCL)  1.14.1-dev
Classes | Functions
Module sample_consensus

Detailed Description

Overview

The pcl_sample_consensus library holds SAmple Consensus (SAC) methods like RANSAC and models like planes and cylinders. These can be combined freely in order to detect specific models and their parameters in point clouds.

Some of the models implemented in this library include: lines, planes, cylinders, and spheres. Plane fitting is often applied to the task of detecting common indoor surfaces, such as walls, floors, and table tops. Other models can be used to detect and segment objects with common geometric structures (e.g., fitting a cylinder model to a mug).

The following models are supported:

The following list describes the robust sample consensus estimators implemented:

By default, if you're not familiar with most of the above estimators and how they operate, use RANSAC to test your hypotheses.

Requirements

Classes

class  pcl::LeastMedianSquares< PointT >
 LeastMedianSquares represents an implementation of the LMedS (Least Median of Squares) algorithm. More...
 
class  pcl::MaximumLikelihoodSampleConsensus< PointT >
 MaximumLikelihoodSampleConsensus represents an implementation of the MLESAC (Maximum Likelihood Estimator SAmple Consensus) algorithm, as described in: "MLESAC: A new robust estimator with application to estimating image geometry", P.H.S. More...
 
class  pcl::MEstimatorSampleConsensus< PointT >
 MEstimatorSampleConsensus represents an implementation of the MSAC (M-estimator SAmple Consensus) algorithm, as described in: "MLESAC: A new robust estimator with application to estimating image geometry", P.H.S. More...
 
class  pcl::ProgressiveSampleConsensus< PointT >
 ProgressiveSampleConsensus represents an implementation of the PROSAC (PROgressive SAmple Consensus) algorithm, as described in: "Matching with PROSAC – Progressive Sample Consensus", Chum, O. More...
 
class  pcl::RandomSampleConsensus< PointT >
 RandomSampleConsensus represents an implementation of the RANSAC (RANdom SAmple Consensus) algorithm, as described in: "Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography", Martin A. More...
 
class  pcl::RandomizedMEstimatorSampleConsensus< PointT >
 RandomizedMEstimatorSampleConsensus represents an implementation of the RMSAC (Randomized M-estimator SAmple Consensus) algorithm, which basically adds a Td,d test (see RandomizedRandomSampleConsensus) to an MSAC estimator (see MEstimatorSampleConsensus). More...
 
class  pcl::RandomizedRandomSampleConsensus< PointT >
 RandomizedRandomSampleConsensus represents an implementation of the RRANSAC (Randomized RANdom SAmple Consensus), as described in "Randomized RANSAC with Td,d test", O. More...
 
class  pcl::SampleConsensus< T >
 SampleConsensus represents the base class. More...
 
class  pcl::SampleConsensusModel< PointT >
 SampleConsensusModel represents the base model class. More...
 
class  pcl::SampleConsensusModelFromNormals< PointT, PointNT >
 SampleConsensusModelFromNormals represents the base model class for models that require the use of surface normals for estimation. More...
 
class  pcl::SampleConsensusModelCircle2D< PointT >
 SampleConsensusModelCircle2D defines a model for 2D circle segmentation on the X-Y plane. More...
 
class  pcl::SampleConsensusModelCircle3D< PointT >
 SampleConsensusModelCircle3D defines a model for 3D circle segmentation. More...
 
class  pcl::SampleConsensusModelCone< PointT, PointNT >
 SampleConsensusModelCone defines a model for 3D cone segmentation. More...
 
class  pcl::SampleConsensusModelCylinder< PointT, PointNT >
 SampleConsensusModelCylinder defines a model for 3D cylinder segmentation. More...
 
class  pcl::SampleConsensusModelEllipse3D< PointT >
 SampleConsensusModelEllipse3D defines a model for 3D ellipse segmentation. More...
 
class  pcl::SampleConsensusModelLine< PointT >
 SampleConsensusModelLine defines a model for 3D line segmentation. More...
 
class  pcl::SampleConsensusModelNormalParallelPlane< PointT, PointNT >
 SampleConsensusModelNormalParallelPlane defines a model for 3D plane segmentation using additional surface normal constraints. More...
 
class  pcl::SampleConsensusModelNormalPlane< PointT, PointNT >
 SampleConsensusModelNormalPlane defines a model for 3D plane segmentation using additional surface normal constraints. More...
 
class  pcl::SampleConsensusModelNormalSphere< PointT, PointNT >
 SampleConsensusModelNormalSphere defines a model for 3D sphere segmentation using additional surface normal constraints. More...
 
class  pcl::SampleConsensusModelParallelLine< PointT >
 SampleConsensusModelParallelLine defines a model for 3D line segmentation using additional angular constraints. More...
 
class  pcl::SampleConsensusModelParallelPlane< PointT >
 SampleConsensusModelParallelPlane defines a model for 3D plane segmentation using additional angular constraints. More...
 
class  pcl::SampleConsensusModelPerpendicularPlane< PointT >
 SampleConsensusModelPerpendicularPlane defines a model for 3D plane segmentation using additional angular constraints. More...
 
class  pcl::SampleConsensusModelPlane< PointT >
 SampleConsensusModelPlane defines a model for 3D plane segmentation. More...
 
class  pcl::SampleConsensusModelRegistration< PointT >
 SampleConsensusModelRegistration defines a model for Point-To-Point registration outlier rejection. More...
 
class  pcl::SampleConsensusModelRegistration2D< PointT >
 SampleConsensusModelRegistration2D defines a model for Point-To-Point registration outlier rejection using distances between 2D pixels. More...
 
class  pcl::SampleConsensusModelSphere< PointT >
 SampleConsensusModelSphere defines a model for 3D sphere segmentation. More...
 
class  pcl::SampleConsensusModelStick< PointT >
 SampleConsensusModelStick defines a model for 3D stick segmentation. More...
 
class  pcl::SampleConsensusModelTorus< PointT, PointNT >
 SampleConsensusModelTorus defines a model for 3D torus segmentation. More...
 

Functions

template<typename Point >
double pcl::pointToPlaneDistanceSigned (const Point &p, double a, double b, double c, double d)
 Get the distance from a point to a plane (signed) defined by ax+by+cz+d=0. More...
 
template<typename Point >
double pcl::pointToPlaneDistanceSigned (const Point &p, const Eigen::Vector4f &plane_coefficients)
 Get the distance from a point to a plane (signed) defined by ax+by+cz+d=0. More...
 
template<typename Point >
double pcl::pointToPlaneDistance (const Point &p, double a, double b, double c, double d)
 Get the distance from a point to a plane (unsigned) defined by ax+by+cz+d=0. More...
 
template<typename Point >
double pcl::pointToPlaneDistance (const Point &p, const Eigen::Vector4f &plane_coefficients)
 Get the distance from a point to a plane (unsigned) defined by ax+by+cz+d=0. More...
 

Function Documentation

◆ pointToPlaneDistance() [1/2]

template<typename Point >
double pcl::pointToPlaneDistance ( const Point &  p,
const Eigen::Vector4f &  plane_coefficients 
)
inline

#include <pcl/sample_consensus/sac_model_plane.h>

Get the distance from a point to a plane (unsigned) defined by ax+by+cz+d=0.

Parameters
pa point
plane_coefficientsthe normalized coefficients (a, b, c, d) of a plane

Definition at line 125 of file sac_model_plane.h.

References pcl::pointToPlaneDistanceSigned().

◆ pointToPlaneDistance() [2/2]

template<typename Point >
double pcl::pointToPlaneDistance ( const Point &  p,
double  a,
double  b,
double  c,
double  d 
)
inline

#include <pcl/sample_consensus/sac_model_plane.h>

Get the distance from a point to a plane (unsigned) defined by ax+by+cz+d=0.

Parameters
pa point
athe normalized a coefficient of a plane
bthe normalized b coefficient of a plane
cthe normalized c coefficient of a plane
dthe normalized d coefficient of a plane

Definition at line 114 of file sac_model_plane.h.

References pcl::pointToPlaneDistanceSigned().

◆ pointToPlaneDistanceSigned() [1/2]

template<typename Point >
double pcl::pointToPlaneDistanceSigned ( const Point &  p,
const Eigen::Vector4f &  plane_coefficients 
)
inline

#include <pcl/sample_consensus/sac_model_plane.h>

Get the distance from a point to a plane (signed) defined by ax+by+cz+d=0.

Parameters
pa point
plane_coefficientsthe normalized coefficients (a, b, c, d) of a plane

Definition at line 100 of file sac_model_plane.h.

◆ pointToPlaneDistanceSigned() [2/2]

template<typename Point >
double pcl::pointToPlaneDistanceSigned ( const Point &  p,
double  a,
double  b,
double  c,
double  d 
)
inline

#include <pcl/sample_consensus/sac_model_plane.h>

Get the distance from a point to a plane (signed) defined by ax+by+cz+d=0.

Parameters
pa point
athe normalized a coefficient of a plane
bthe normalized b coefficient of a plane
cthe normalized c coefficient of a plane
dthe normalized d coefficient of a plane

Definition at line 89 of file sac_model_plane.h.

Referenced by pcl::pointToPlaneDistance(), and pcl::ExtractPolygonalPrismData< PointT >::segment().