Point Cloud Library (PCL)  1.14.0-dev
List of all members | Public Types | Public Member Functions | Protected Attributes
pcl::cuda::SampleConsensus< Storage > Class Template Referenceabstract

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

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

Public Types

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 >
 

Public Member Functions

 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...
 
virtual bool computeModel (int debug_verbosity_level=0)=0
 Compute the actual model. 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...
 

Protected Attributes

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

Definition at line 50 of file sac.h.

Member Typedef Documentation

◆ Coefficients

template<template< typename > class Storage>
using pcl::cuda::SampleConsensus< Storage >::Coefficients = typename Storage<float>::type

Definition at line 64 of file sac.h.

◆ CoefficientsConstPtr

template<template< typename > class Storage>
using pcl::cuda::SampleConsensus< Storage >::CoefficientsConstPtr = shared_ptr <const Coefficients>

Definition at line 66 of file sac.h.

◆ CoefficientsPtr

template<template< typename > class Storage>
using pcl::cuda::SampleConsensus< Storage >::CoefficientsPtr = shared_ptr <Coefficients>

Definition at line 65 of file sac.h.

◆ ConstPtr

template<template< typename > class Storage>
using pcl::cuda::SampleConsensus< Storage >::ConstPtr = shared_ptr<const SampleConsensus>

Definition at line 69 of file sac.h.

◆ Ptr

template<template< typename > class Storage>
using pcl::cuda::SampleConsensus< Storage >::Ptr = shared_ptr<SampleConsensus>

Definition at line 68 of file sac.h.

Constructor & Destructor Documentation

◆ SampleConsensus() [1/2]

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

Constructor for base SAC.

Parameters
modela Sample Consensus model

Definition at line 74 of file sac.h.

◆ SampleConsensus() [2/2]

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

Constructor for base SAC.

Parameters
modela Sample Consensus model
thresholddistance to model threshold

Definition at line 83 of file sac.h.

◆ ~SampleConsensus()

template<template< typename > class Storage>
virtual pcl::cuda::SampleConsensus< Storage >::~SampleConsensus ( )
virtualdefault

Destructor for base SAC.

Member Function Documentation

◆ computeModel()

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

Compute the actual model.

Pure virtual.

Implemented in pcl::cuda::RandomSampleConsensus< Storage >, and pcl::cuda::MultiRandomSampleConsensus< Storage >.

◆ getDistanceThreshold()

template<template< typename > class Storage>
float pcl::cuda::SampleConsensus< Storage >::getDistanceThreshold ( )
inline

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

Definition at line 99 of file sac.h.

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

◆ getInliers()

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensus< Storage >::getInliers ( )
inline

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

Definition at line 155 of file sac.h.

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

◆ getInliersStencil()

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensus< Storage >::getInliersStencil ( )
inline

Definition at line 160 of file sac.h.

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

◆ getMaxIterations()

template<template< typename > class Storage>
int pcl::cuda::SampleConsensus< Storage >::getMaxIterations ( )
inline

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

Definition at line 109 of file sac.h.

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

◆ getModel()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensus< Storage >::getModel ( Indices &  model)
inline

Return the best model found so far.

Parameters
modelthe resultant model

Definition at line 148 of file sac.h.

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

◆ getModelCoefficients()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensus< Storage >::getModelCoefficients ( Coefficients model_coefficients)
inline

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

Parameters
model_coefficientsthe resultant model coefficients

Definition at line 166 of file sac.h.

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

◆ getProbability()

template<template< typename > class Storage>
float pcl::cuda::SampleConsensus< Storage >::getProbability ( )
inline

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

Definition at line 124 of file sac.h.

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

◆ setDistanceThreshold()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensus< Storage >::setDistanceThreshold ( float  threshold)
inline

Set the distance to model threshold.

Parameters
thresholddistance to model threshold

Definition at line 95 of file sac.h.

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

◆ setMaxIterations()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensus< Storage >::setMaxIterations ( int  max_iterations)
inline

Set the maximum number of iterations.

Parameters
max_iterationsmaximum number of iterations

Definition at line 105 of file sac.h.

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

◆ setProbability()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensus< Storage >::setProbability ( float  probability)
inline

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

Parameters
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 118 of file sac.h.

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

Member Data Documentation

◆ inliers_

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensus< Storage >::inliers_
protected

The indices of the points that were chosen as inliers after the last call.

Definition at line 179 of file sac.h.

Referenced by pcl::cuda::SampleConsensus< Storage >::getInliers().

◆ inliers_stencil_

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensus< Storage >::inliers_stencil_
protected

Definition at line 180 of file sac.h.

Referenced by pcl::cuda::SampleConsensus< Storage >::getInliersStencil().

◆ iterations_

template<template< typename > class Storage>
int pcl::cuda::SampleConsensus< Storage >::iterations_
protected

Total number of internal loop iterations that we've done so far.

Definition at line 189 of file sac.h.

◆ max_iterations_

template<template< typename > class Storage>
int pcl::cuda::SampleConsensus< Storage >::max_iterations_
protected

◆ model_

template<template< typename > class Storage>
Indices pcl::cuda::SampleConsensus< Storage >::model_
protected

The model found after the last computeModel () as point cloud indices.

Definition at line 176 of file sac.h.

Referenced by pcl::cuda::SampleConsensus< Storage >::getModel().

◆ model_coefficients_

template<template< typename > class Storage>
Coefficients pcl::cuda::SampleConsensus< Storage >::model_coefficients_
protected

The coefficients of our model computed directly from the model found.

Definition at line 183 of file sac.h.

Referenced by pcl::cuda::SampleConsensus< Storage >::getModelCoefficients().

◆ probability_

template<template< typename > class Storage>
float pcl::cuda::SampleConsensus< Storage >::probability_
protected

Desired probability of choosing at least one sample free from outliers.

Definition at line 186 of file sac.h.

Referenced by pcl::cuda::SampleConsensus< Storage >::getProbability(), and pcl::cuda::SampleConsensus< Storage >::setProbability().

◆ sac_model_

template<template< typename > class Storage>
SampleConsensusModelPtr pcl::cuda::SampleConsensus< Storage >::sac_model_
protected

The underlying data model used (what is it that we attempt to search for).

Definition at line 173 of file sac.h.

◆ threshold_

template<template< typename > class Storage>
float pcl::cuda::SampleConsensus< Storage >::threshold_
protected

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