Point Cloud Library (PCL)  1.14.1-dev
List of all members | Public Member Functions
pcl::cuda::MultiRandomSampleConsensus< Storage > Class Template Reference

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

#include </__w/1/s/cuda/sample_consensus/include/pcl/cuda/sample_consensus/multi_ransac.h>

+ Inheritance diagram for pcl::cuda::MultiRandomSampleConsensus< Storage >:
+ Collaboration diagram for pcl::cuda::MultiRandomSampleConsensus< Storage >:

Public Member Functions

 MultiRandomSampleConsensus (const SampleConsensusModelPtr &model)
 RANSAC (RAndom SAmple Consensus) main constructor. More...
 
 MultiRandomSampleConsensus (const SampleConsensusModelPtr &model, double threshold)
 RANSAC (RAndom SAmple Consensus) main constructor. More...
 
bool computeModel (int debug_verbosity_level=0)
 Compute the actual model and find the inliers. More...
 
void setMinimumCoverage (float percent)
 how much (in percent) of the point cloud should be covered? If it is not possible to find enough planes, it will stop according to the regular ransac criteria More...
 
void setMaximumBatches (int max_batches)
 Sets the maximum number of batches that should be processed. More...
 
void setIerationsPerBatch (int iterations_per_batch)
 Sets the maximum number of batches that should be processed. More...
 
std::vector< IndicesPtr > getAllInliers ()
 
std::vector< int > getAllInlierCounts ()
 
std::vector< float4 > getAllModelCoefficients ()
 Return the model coefficients of the best model found so far. More...
 
std::vector< float3 > getAllModelCentroids ()
 Return the model coefficients of the best model found so far. More...
 
- Public Member Functions inherited from pcl::cuda::SampleConsensus< Storage >
 SampleConsensus (const SampleConsensusModelPtr &model)
 Constructor for base SAC. More...
 
 SampleConsensus (const SampleConsensusModelPtr &model, float threshold)
 Constructor for base SAC. More...
 
virtual ~SampleConsensus ()=default
 Destructor for base SAC. More...
 
void setDistanceThreshold (float threshold)
 Set the distance to model threshold. More...
 
float 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 (float probability)
 Set the desired probability of choosing at least one sample free from outliers. More...
 
float getProbability ()
 Obtain the probability of choosing at least one sample free from outliers, as set by the user. More...
 
void getModel (Indices &model)
 Return the best model found so far. More...
 
IndicesPtr getInliers ()
 Return the best set of inliers found so far for this model. More...
 
IndicesPtr getInliersStencil ()
 
void getModelCoefficients (Coefficients &model_coefficients)
 Return the model coefficients of the best model found so far. More...
 

Additional Inherited Members

- Public Types inherited from pcl::cuda::SampleConsensus< Storage >
using Coefficients = typename Storage< float >::type
 
using CoefficientsPtr = shared_ptr< Coefficients >
 
using CoefficientsConstPtr = shared_ptr< const Coefficients >
 
using Ptr = shared_ptr< SampleConsensus >
 
using ConstPtr = shared_ptr< const SampleConsensus >
 
- Protected Attributes inherited from pcl::cuda::SampleConsensus< Storage >
SampleConsensusModelPtr sac_model_
 The underlying data model used (what is it that we attempt to search for). More...
 
Indices model_
 The model found after the last computeModel () as point cloud indices. More...
 
IndicesPtr inliers_
 The indices of the points that were chosen as inliers after the last call. More...
 
IndicesPtr inliers_stencil_
 
Coefficients model_coefficients_
 The coefficients of our model computed directly from the model found. More...
 
float probability_
 Desired probability of choosing at least one sample free from outliers. More...
 
int iterations_
 Total number of internal loop iterations that we've done so far. More...
 
float threshold_
 Distance to model threshold. More...
 
int max_iterations_
 Maximum number of iterations before giving up. More...
 

Detailed Description

template<template< typename > class Storage>
class pcl::cuda::MultiRandomSampleConsensus< Storage >

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.

Fischler and Robert C. Bolles, Comm. Of the ACM 24: 381–395, June 1981.

Author
Radu Bogdan Rusu

Definition at line 55 of file multi_ransac.h.

Constructor & Destructor Documentation

◆ MultiRandomSampleConsensus() [1/2]

template<template< typename > class Storage>
pcl::cuda::MultiRandomSampleConsensus< Storage >::MultiRandomSampleConsensus ( const SampleConsensusModelPtr &  model)
inline

RANSAC (RAndom SAmple Consensus) main constructor.

Parameters
modela Sample Consensus model

Definition at line 79 of file multi_ransac.h.

References pcl::cuda::SampleConsensus< Storage >::max_iterations_.

◆ MultiRandomSampleConsensus() [2/2]

template<template< typename > class Storage>
pcl::cuda::MultiRandomSampleConsensus< Storage >::MultiRandomSampleConsensus ( const SampleConsensusModelPtr &  model,
double  threshold 
)
inline

RANSAC (RAndom SAmple Consensus) main constructor.

Parameters
modela Sample Consensus model
thresholddistance to model threshold

Definition at line 93 of file multi_ransac.h.

References pcl::cuda::SampleConsensus< Storage >::max_iterations_.

Member Function Documentation

◆ computeModel()

template<template< typename > class Storage>
bool pcl::cuda::MultiRandomSampleConsensus< Storage >::computeModel ( int  debug_verbosity_level = 0)
virtual

Compute the actual model and find the inliers.

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

Implements pcl::cuda::SampleConsensus< Storage >.

◆ getAllInlierCounts()

template<template< typename > class Storage>
std::vector<int> pcl::cuda::MultiRandomSampleConsensus< Storage >::getAllInlierCounts ( )
inline

Definition at line 142 of file multi_ransac.h.

◆ getAllInliers()

template<template< typename > class Storage>
std::vector<IndicesPtr> pcl::cuda::MultiRandomSampleConsensus< Storage >::getAllInliers ( )
inline

Definition at line 139 of file multi_ransac.h.

◆ getAllModelCentroids()

template<template< typename > class Storage>
std::vector<float3> pcl::cuda::MultiRandomSampleConsensus< Storage >::getAllModelCentroids ( )
inline

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

Definition at line 155 of file multi_ransac.h.

◆ getAllModelCoefficients()

template<template< typename > class Storage>
std::vector<float4> pcl::cuda::MultiRandomSampleConsensus< Storage >::getAllModelCoefficients ( )
inline

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

Definition at line 147 of file multi_ransac.h.

◆ setIerationsPerBatch()

template<template< typename > class Storage>
void pcl::cuda::MultiRandomSampleConsensus< Storage >::setIerationsPerBatch ( int  iterations_per_batch)
inline

Sets the maximum number of batches that should be processed.

Every Batch computes up to max_iterations_ models and verifies them. If planes with a sufficiently high total inlier count are found earlier, the actual number of batch runs might be lower.

Definition at line 133 of file multi_ransac.h.

◆ setMaximumBatches()

template<template< typename > class Storage>
void pcl::cuda::MultiRandomSampleConsensus< Storage >::setMaximumBatches ( int  max_batches)
inline

Sets the maximum number of batches that should be processed.

Every Batch computes up to iterations_per_batch_ models and verifies them. If planes with a sufficiently high total inlier count are found earlier, the actual number of batch runs might be lower.

Definition at line 122 of file multi_ransac.h.

◆ setMinimumCoverage()

template<template< typename > class Storage>
void pcl::cuda::MultiRandomSampleConsensus< Storage >::setMinimumCoverage ( float  percent)
inline

how much (in percent) of the point cloud should be covered? If it is not possible to find enough planes, it will stop according to the regular ransac criteria

Definition at line 111 of file multi_ransac.h.


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