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

SampleConsensusModel represents the base model class. More...

#include </build/pcl-HHAmE1/pcl-1.8.1+dfsg1/cuda/sample_consensus/include/pcl/cuda/sample_consensus/sac_model.h>

+ Inheritance diagram for pcl::cuda::SampleConsensusModel< Storage >:

Public Types

typedef PointCloudAOS< Storage > PointCloud
 
typedef PointCloud::Ptr PointCloudPtr
 
typedef PointCloud::ConstPtr PointCloudConstPtr
 
typedef boost::shared_ptr< SampleConsensusModelPtr
 
typedef boost::shared_ptr< const SampleConsensusModelConstPtr
 
typedef Storage< int >::type Indices
 
typedef boost::shared_ptr< typename Storage< int >::type > IndicesPtr
 
typedef boost::shared_ptr< const typename Storage< int >::type > IndicesConstPtr
 
typedef Storage< float >::type Coefficients
 
typedef boost::shared_ptr< CoefficientsCoefficientsPtr
 
typedef boost::shared_ptr< const CoefficientsCoefficientsConstPtr
 
typedef Storage< float4 >::type Hypotheses
 
typedef Storage< int >::type Samples
 

Public Member Functions

 SampleConsensusModel (const PointCloudConstPtr &cloud)
 Constructor for base SampleConsensusModel. More...
 
virtual ~SampleConsensusModel ()
 Destructor for base SampleConsensusModel. More...
 
virtual void getSamples (int &iterations, Indices &samples)=0
 Get a set of random data samples and return them as point indices. More...
 
virtual bool computeModelCoefficients (const Indices &samples, Coefficients &model_coefficients)=0
 Check whether the given index samples can form a valid model, compute the model coefficients from these samples and store them in model_coefficients. More...
 
virtual bool generateModelHypotheses (Hypotheses &h, int max_iterations)=0
 
virtual bool generateModelHypotheses (Hypotheses &h, Samples &s, int max_iterations)=0
 
virtual bool isSampleInlier (IndicesPtr &inliers_stencil, Samples &samples, unsigned int &i)
 
virtual int selectWithinDistance (const Coefficients &model_coefficients, float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil)=0
 Select all the points which respect the given model coefficients as inliers. More...
 
virtual int selectWithinDistance (const Hypotheses &h, int idx, float threshold, IndicesPtr &inliers, IndicesPtr &inliers_stencil)=0
 
virtual int selectWithinDistance (Hypotheses &h, int idx, float threshold, IndicesPtr &inliers_stencil, float3 &centroid)=0
 
virtual int countWithinDistance (const Coefficients &model_coefficients, float threshold)=0
 
virtual int countWithinDistance (const Hypotheses &h, int idx, float threshold)=0
 
int deleteIndices (const IndicesPtr &indices_stencil)
 
int deleteIndices (const Hypotheses &h, int idx, IndicesPtr &inliers, const IndicesPtr &inliers_delete)
 
virtual void setInputCloud (const PointCloudConstPtr &cloud)
 Provide a pointer to the input dataset. More...
 
PointCloudConstPtr getInputCloud () const
 Get a pointer to the input point cloud dataset. More...
 
IndicesPtr getIndices () const
 Get a pointer to the vector of indices used. More...
 
void setRadiusLimits (float min_radius, float max_radius)
 Set the minimum and maximum allowable radius limits for the model (applicable to models that estimate a radius) More...
 
void getRadiusLimits (float &min_radius, float &max_radius)
 Get the minimum and maximum allowable radius limits for the model as set by the user. More...
 
boost::shared_ptr< typename Storage< float4 >::type > getNormals ()
 
void setNormals (boost::shared_ptr< typename Storage< float4 >::type > normals)
 

Protected Attributes

PointCloudConstPtr input_
 A boost shared pointer to the point cloud data array. More...
 
boost::shared_ptr< typename Storage< float4 >::type > normals_
 
IndicesPtr indices_
 A pointer to the vector of point indices to use. More...
 
IndicesPtr indices_stencil_
 A pointer to the vector of point indices (stencil) to use. More...
 
unsigned int nr_indices_in_stencil_
 number of indices left in indices_stencil_ More...
 
float radius_min_
 The minimum and maximum radius limits for the model. More...
 
float radius_max_
 
thrust::minstd_rand rngl_
 Linear-Congruent random number generator engine. More...
 

Detailed Description

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

SampleConsensusModel represents the base model class.

All sample consensus models must inherit from this class.

Definition at line 88 of file sac_model.h.

Member Typedef Documentation

◆ Coefficients

template<template< typename > class Storage>
typedef Storage<float>::type pcl::cuda::SampleConsensusModel< Storage >::Coefficients

Definition at line 102 of file sac_model.h.

◆ CoefficientsConstPtr

template<template< typename > class Storage>
typedef boost::shared_ptr<const Coefficients> pcl::cuda::SampleConsensusModel< Storage >::CoefficientsConstPtr

Definition at line 104 of file sac_model.h.

◆ CoefficientsPtr

template<template< typename > class Storage>
typedef boost::shared_ptr<Coefficients> pcl::cuda::SampleConsensusModel< Storage >::CoefficientsPtr

Definition at line 103 of file sac_model.h.

◆ ConstPtr

template<template< typename > class Storage>
typedef boost::shared_ptr<const SampleConsensusModel> pcl::cuda::SampleConsensusModel< Storage >::ConstPtr

Definition at line 96 of file sac_model.h.

◆ Hypotheses

template<template< typename > class Storage>
typedef Storage<float4>::type pcl::cuda::SampleConsensusModel< Storage >::Hypotheses

Definition at line 106 of file sac_model.h.

◆ Indices

template<template< typename > class Storage>
typedef Storage<int>::type pcl::cuda::SampleConsensusModel< Storage >::Indices

Definition at line 98 of file sac_model.h.

◆ IndicesConstPtr

template<template< typename > class Storage>
typedef boost::shared_ptr<const typename Storage<int>::type> pcl::cuda::SampleConsensusModel< Storage >::IndicesConstPtr

Definition at line 100 of file sac_model.h.

◆ IndicesPtr

template<template< typename > class Storage>
typedef boost::shared_ptr<typename Storage<int>::type> pcl::cuda::SampleConsensusModel< Storage >::IndicesPtr

Definition at line 99 of file sac_model.h.

◆ PointCloud

template<template< typename > class Storage>
typedef PointCloudAOS<Storage> pcl::cuda::SampleConsensusModel< Storage >::PointCloud

Definition at line 91 of file sac_model.h.

◆ PointCloudConstPtr

template<template< typename > class Storage>
typedef PointCloud::ConstPtr pcl::cuda::SampleConsensusModel< Storage >::PointCloudConstPtr

Definition at line 93 of file sac_model.h.

◆ PointCloudPtr

template<template< typename > class Storage>
typedef PointCloud::Ptr pcl::cuda::SampleConsensusModel< Storage >::PointCloudPtr

Definition at line 92 of file sac_model.h.

◆ Ptr

template<template< typename > class Storage>
typedef boost::shared_ptr<SampleConsensusModel> pcl::cuda::SampleConsensusModel< Storage >::Ptr

Definition at line 95 of file sac_model.h.

◆ Samples

template<template< typename > class Storage>
typedef Storage<int>::type pcl::cuda::SampleConsensusModel< Storage >::Samples

Definition at line 108 of file sac_model.h.

Constructor & Destructor Documentation

◆ SampleConsensusModel()

template<template< typename > class Storage>
pcl::cuda::SampleConsensusModel< Storage >::SampleConsensusModel ( const PointCloudConstPtr cloud)
inline

Constructor for base SampleConsensusModel.

Parameters
cloudthe input point cloud dataset

Definition at line 119 of file sac_model.h.

◆ ~SampleConsensusModel()

template<template< typename > class Storage>
virtual pcl::cuda::SampleConsensusModel< Storage >::~SampleConsensusModel ( )
inlinevirtual

Destructor for base SampleConsensusModel.

Definition at line 144 of file sac_model.h.

Member Function Documentation

◆ computeModelCoefficients()

template<template< typename > class Storage>
virtual bool pcl::cuda::SampleConsensusModel< Storage >::computeModelCoefficients ( const Indices samples,
Coefficients model_coefficients 
)
pure virtual

Check whether the given index samples can form a valid model, compute the model coefficients from these samples and store them in model_coefficients.

Pure virtual.

Parameters
samplesthe point indices found as possible good candidates for creating a valid model, stored on the device
model_coefficientsthe computed model coefficients

Implemented in pcl::cuda::SampleConsensusModel1PointPlane< Storage >, and pcl::cuda::SampleConsensusModelPlane< Storage >.

◆ countWithinDistance() [1/2]

template<template< typename > class Storage>
virtual int pcl::cuda::SampleConsensusModel< Storage >::countWithinDistance ( const Coefficients model_coefficients,
float  threshold 
)
pure virtual

◆ countWithinDistance() [2/2]

template<template< typename > class Storage>
virtual int pcl::cuda::SampleConsensusModel< Storage >::countWithinDistance ( const Hypotheses h,
int  idx,
float  threshold 
)
pure virtual

◆ deleteIndices() [1/2]

template<template< typename > class Storage>
int pcl::cuda::SampleConsensusModel< Storage >::deleteIndices ( const IndicesPtr indices_stencil)

◆ deleteIndices() [2/2]

template<template< typename > class Storage>
int pcl::cuda::SampleConsensusModel< Storage >::deleteIndices ( const Hypotheses h,
int  idx,
IndicesPtr inliers,
const IndicesPtr inliers_delete 
)

◆ generateModelHypotheses() [1/2]

template<template< typename > class Storage>
virtual bool pcl::cuda::SampleConsensusModel< Storage >::generateModelHypotheses ( Hypotheses h,
int  max_iterations 
)
pure virtual

◆ generateModelHypotheses() [2/2]

template<template< typename > class Storage>
virtual bool pcl::cuda::SampleConsensusModel< Storage >::generateModelHypotheses ( Hypotheses h,
Samples s,
int  max_iterations 
)
pure virtual

◆ getIndices()

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensusModel< Storage >::getIndices ( ) const
inline

Get a pointer to the vector of indices used.

Definition at line 288 of file sac_model.h.

◆ getInputCloud()

template<template< typename > class Storage>
PointCloudConstPtr pcl::cuda::SampleConsensusModel< Storage >::getInputCloud ( ) const
inline

Get a pointer to the input point cloud dataset.

Definition at line 269 of file sac_model.h.

◆ getNormals()

template<template< typename > class Storage>
boost::shared_ptr<typename Storage<float4>::type> pcl::cuda::SampleConsensusModel< Storage >::getNormals ( )
inline

Definition at line 336 of file sac_model.h.

◆ getRadiusLimits()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensusModel< Storage >::getRadiusLimits ( float &  min_radius,
float &  max_radius 
)
inline

Get the minimum and maximum allowable radius limits for the model as set by the user.

Parameters
min_radiusthe resultant minimum radius model
max_radiusthe resultant maximum radius model

Definition at line 327 of file sac_model.h.

◆ getSamples()

template<template< typename > class Storage>
virtual void pcl::cuda::SampleConsensusModel< Storage >::getSamples ( int &  iterations,
Indices samples 
)
pure virtual

Get a set of random data samples and return them as point indices.

Pure virtual.

Parameters
iterationsthe internal number of iterations used by SAC methods
samplesthe resultant model samples, stored on the device

Implemented in pcl::cuda::SampleConsensusModel1PointPlane< Storage >, and pcl::cuda::SampleConsensusModelPlane< Storage >.

◆ isSampleInlier()

template<template< typename > class Storage>
virtual bool pcl::cuda::SampleConsensusModel< Storage >::isSampleInlier ( IndicesPtr inliers_stencil,
Samples samples,
unsigned int &  i 
)
inlinevirtual

Definition at line 171 of file sac_model.h.

◆ selectWithinDistance() [1/3]

template<template< typename > class Storage>
virtual int pcl::cuda::SampleConsensusModel< Storage >::selectWithinDistance ( const Coefficients model_coefficients,
float  threshold,
IndicesPtr inliers,
IndicesPtr inliers_stencil 
)
pure virtual

Select all the points which respect the given model coefficients as inliers.

Pure virtual.

Parameters
model_coefficientsthe coefficients of a model that we need to compute distances to
thresholda maximum admissible distance threshold for determining the inliers from the outliers
inliersthe resultant model inliers
inliers_stencil

Implemented in pcl::cuda::SampleConsensusModel1PointPlane< Storage >, and pcl::cuda::SampleConsensusModelPlane< Storage >.

◆ selectWithinDistance() [2/3]

template<template< typename > class Storage>
virtual int pcl::cuda::SampleConsensusModel< Storage >::selectWithinDistance ( const Hypotheses h,
int  idx,
float  threshold,
IndicesPtr inliers,
IndicesPtr inliers_stencil 
)
pure virtual

◆ selectWithinDistance() [3/3]

template<template< typename > class Storage>
virtual int pcl::cuda::SampleConsensusModel< Storage >::selectWithinDistance ( Hypotheses h,
int  idx,
float  threshold,
IndicesPtr inliers_stencil,
float3 &  centroid 
)
pure virtual

◆ setInputCloud()

template<template< typename > class Storage>
virtual void pcl::cuda::SampleConsensusModel< Storage >::setInputCloud ( const PointCloudConstPtr cloud)
virtual

Provide a pointer to the input dataset.

Parameters
cloudthe const boost shared pointer to a PointCloud message

◆ setNormals()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensusModel< Storage >::setNormals ( boost::shared_ptr< typename Storage< float4 >::type >  normals)
inline

Definition at line 339 of file sac_model.h.

◆ setRadiusLimits()

template<template< typename > class Storage>
void pcl::cuda::SampleConsensusModel< Storage >::setRadiusLimits ( float  min_radius,
float  max_radius 
)
inline

Set the minimum and maximum allowable radius limits for the model (applicable to models that estimate a radius)

Parameters
min_radiusthe minimum radius model
max_radiusthe maximum radius model

Definition at line 314 of file sac_model.h.

Member Data Documentation

◆ indices_

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensusModel< Storage >::indices_
protected

A pointer to the vector of point indices to use.

Definition at line 354 of file sac_model.h.

◆ indices_stencil_

template<template< typename > class Storage>
IndicesPtr pcl::cuda::SampleConsensusModel< Storage >::indices_stencil_
protected

A pointer to the vector of point indices (stencil) to use.

Definition at line 356 of file sac_model.h.

◆ input_

template<template< typename > class Storage>
PointCloudConstPtr pcl::cuda::SampleConsensusModel< Storage >::input_
protected

A boost shared pointer to the point cloud data array.

Definition at line 350 of file sac_model.h.

◆ normals_

template<template< typename > class Storage>
boost::shared_ptr<typename Storage<float4>::type> pcl::cuda::SampleConsensusModel< Storage >::normals_
protected

Definition at line 351 of file sac_model.h.

◆ nr_indices_in_stencil_

template<template< typename > class Storage>
unsigned int pcl::cuda::SampleConsensusModel< Storage >::nr_indices_in_stencil_
protected

number of indices left in indices_stencil_

Definition at line 358 of file sac_model.h.

◆ radius_max_

template<template< typename > class Storage>
float pcl::cuda::SampleConsensusModel< Storage >::radius_max_
protected

Definition at line 363 of file sac_model.h.

◆ radius_min_

template<template< typename > class Storage>
float pcl::cuda::SampleConsensusModel< Storage >::radius_min_
protected

The minimum and maximum radius limits for the model.

Applicable to all models that estimate a radius.

Definition at line 363 of file sac_model.h.

◆ rngl_

template<template< typename > class Storage>
thrust::minstd_rand pcl::cuda::SampleConsensusModel< Storage >::rngl_
protected

Linear-Congruent random number generator engine.

Definition at line 366 of file sac_model.h.


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