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::MaximumLikelihoodSampleConsensus< PointT > Class Template Reference

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

#include <pcl/sample_consensus/mlesac.h>

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

Public Types

typedef boost::shared_ptr
< SampleConsensus
Ptr
 
typedef boost::shared_ptr
< const SampleConsensus
ConstPtr
 

Public Member Functions

 MaximumLikelihoodSampleConsensus (const SampleConsensusModelPtr &model)
 MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor. More...
 
 MaximumLikelihoodSampleConsensus (const SampleConsensusModelPtr &model, double threshold)
 MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor. More...
 
bool computeModel (int debug_verbosity_level=0)
 Compute the actual model and find the inliers. More...
 
void setEMIterations (int iterations)
 Set the number of EM iterations. More...
 
int getEMIterations () const
 Get the number of EM iterations. More...
 
void setDistanceThreshold (double threshold)
 Set the distance to model threshold. More...
 
double getDistanceThreshold ()
 Get the distance to model threshold, as set by the user. More...
 
void setMaxIterations (int max_iterations)
 Set the maximum number of iterations. More...
 
int getMaxIterations ()
 Get the maximum number of iterations, as set by the user. More...
 
void setProbability (double probability)
 Set the desired probability of choosing at least one sample free from outliers. More...
 
double getProbability ()
 Obtain the probability of choosing at least one sample free from outliers, as set by the user. More...
 
void getRandomSamples (const boost::shared_ptr< std::vector< int > > &indices, size_t nr_samples, std::set< int > &indices_subset)
 Get a set of randomly selected indices. More...
 
void getModel (std::vector< int > &model)
 Return the best model found so far. More...
 
void getInliers (std::vector< int > &inliers)
 Return the best set of inliers found so far for this model. More...
 
void getModelCoefficients (Eigen::VectorXf &model_coefficients)
 Return the model coefficients of the best model found so far. More...
 

Detailed Description

template<typename PointT>
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.

Torr and A. Zisserman, Computer Vision and Image Understanding, vol 78, 2000.

Note
MLESAC is useful in situations where most of the data samples belong to the model, and a fast outlier rejection algorithm is needed.
Author
Radu Bogdan Rusu

Definition at line 55 of file mlesac.h.

Member Typedef Documentation

typedef boost::shared_ptr<const SampleConsensus> pcl::SampleConsensus< PointT >::ConstPtr
inherited

Definition at line 65 of file sac.h.

typedef boost::shared_ptr<SampleConsensus> pcl::SampleConsensus< PointT >::Ptr
inherited

Definition at line 61 of file sac.h.

Constructor & Destructor Documentation

template<typename PointT >
pcl::MaximumLikelihoodSampleConsensus< PointT >::MaximumLikelihoodSampleConsensus ( const SampleConsensusModelPtr &  model)
inline

MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor.

Parameters
[in]modela Sample Consensus model

Definition at line 73 of file mlesac.h.

template<typename PointT >
pcl::MaximumLikelihoodSampleConsensus< PointT >::MaximumLikelihoodSampleConsensus ( const SampleConsensusModelPtr &  model,
double  threshold 
)
inline

MLESAC (Maximum Likelihood Estimator SAmple Consensus) main constructor.

Parameters
[in]modela Sample Consensus model
[in]thresholddistance to model threshold

Definition at line 85 of file mlesac.h.

Member Function Documentation

template<typename PointT >
bool pcl::MaximumLikelihoodSampleConsensus< PointT >::computeModel ( int  debug_verbosity_level = 0)
virtual

Compute the actual model and find the inliers.

Parameters
[in]debug_verbosity_levelenable/disable on-screen debug information and set the verbosity level

Implements pcl::SampleConsensus< PointT >.

Definition at line 45 of file mlesac.hpp.

double pcl::SampleConsensus< PointT >::getDistanceThreshold ( )
inlineinherited

Get the distance to model threshold, as set by the user.

Definition at line 125 of file sac.h.

template<typename PointT >
int pcl::MaximumLikelihoodSampleConsensus< PointT >::getEMIterations ( ) const
inline

Get the number of EM iterations.

Definition at line 107 of file mlesac.h.

void pcl::SampleConsensus< PointT >::getInliers ( std::vector< int > &  inliers)
inlineinherited

Return the best set of inliers found so far for this model.

Parameters
[out]inliersthe resultant set of inliers

Definition at line 178 of file sac.h.

int pcl::SampleConsensus< PointT >::getMaxIterations ( )
inlineinherited

Get the maximum number of iterations, as set by the user.

Definition at line 135 of file sac.h.

void pcl::SampleConsensus< PointT >::getModel ( std::vector< int > &  model)
inlineinherited

Return the best model found so far.

Parameters
[out]modelthe resultant model

Definition at line 172 of file sac.h.

void pcl::SampleConsensus< PointT >::getModelCoefficients ( Eigen::VectorXf &  model_coefficients)
inlineinherited

Return the model coefficients of the best model found so far.

Parameters
[out]model_coefficientsthe resultant model coefficients

Definition at line 184 of file sac.h.

double pcl::SampleConsensus< PointT >::getProbability ( )
inlineinherited

Obtain the probability of choosing at least one sample free from outliers, as set by the user.

Definition at line 146 of file sac.h.

void pcl::SampleConsensus< PointT >::getRandomSamples ( const boost::shared_ptr< std::vector< int > > &  indices,
size_t  nr_samples,
std::set< int > &  indices_subset 
)
inlineinherited

Get a set of randomly selected indices.

Parameters
[in]indicesthe input indices vector
[in]nr_samplesthe desired number of point indices to randomly select
[out]indices_subsetthe resultant output set of randomly selected indices

Definition at line 158 of file sac.h.

void pcl::SampleConsensus< PointT >::setDistanceThreshold ( double  threshold)
inlineinherited

Set the distance to model threshold.

Parameters
[in]thresholddistance to model threshold

Definition at line 121 of file sac.h.

template<typename PointT >
void pcl::MaximumLikelihoodSampleConsensus< PointT >::setEMIterations ( int  iterations)
inline

Set the number of EM iterations.

Parameters
[in]iterationsthe number of EM iterations

Definition at line 103 of file mlesac.h.

void pcl::SampleConsensus< PointT >::setMaxIterations ( int  max_iterations)
inlineinherited

Set the maximum number of iterations.

Parameters
[in]max_iterationsmaximum number of iterations

Definition at line 131 of file sac.h.

void pcl::SampleConsensus< PointT >::setProbability ( double  probability)
inlineinherited

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

Parameters
[in]probabilitythe desired probability of choosing at least one sample free from outliers
Note
internally, the probability is set to 99% (0.99) by default.

Definition at line 142 of file sac.h.


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