Point Cloud Library (PCL)  1.7.0
Public Types | Public Member Functions | Protected Types | Protected Member Functions
pcl::StatisticalOutlierRemoval< PointT > Class Template Reference

StatisticalOutlierRemoval uses point neighborhood statistics to filter outlier data. More...

#include <pcl/filters/statistical_outlier_removal.h>

+ Inheritance diagram for pcl::StatisticalOutlierRemoval< PointT >:

List of all members.

Public Types

typedef boost::shared_ptr
< StatisticalOutlierRemoval
< PointT > > 
Ptr
typedef boost::shared_ptr
< const
StatisticalOutlierRemoval
< PointT > > 
ConstPtr

Public Member Functions

 StatisticalOutlierRemoval (bool extract_removed_indices=false)
 Constructor.
void setMeanK (int nr_k)
 Set the number of nearest neighbors to use for mean distance estimation.
int getMeanK ()
 Get the number of nearest neighbors to use for mean distance estimation.
void setStddevMulThresh (double stddev_mult)
 Set the standard deviation multiplier for the distance threshold calculation.
double getStddevMulThresh ()
 Get the standard deviation multiplier for the distance threshold calculation.

Protected Types

typedef FilterIndices< PointT >
::PointCloud 
PointCloud
typedef PointCloud::Ptr PointCloudPtr
typedef PointCloud::ConstPtr PointCloudConstPtr
typedef pcl::search::Search
< PointT >::Ptr 
SearcherPtr

Protected Member Functions

void applyFilter (PointCloud &output)
 Filtered results are stored in a separate point cloud.
void applyFilter (std::vector< int > &indices)
 Filtered results are indexed by an indices array.
void applyFilterIndices (std::vector< int > &indices)
 Filtered results are indexed by an indices array.

Detailed Description

template<typename PointT>
class pcl::StatisticalOutlierRemoval< PointT >

StatisticalOutlierRemoval uses point neighborhood statistics to filter outlier data.

The algorithm iterates through the entire input twice: During the first iteration it will compute the average distance that each point has to its nearest k neighbors. The value of k can be set using setMeanK(). Next, the mean and standard deviation of all these distances are computed in order to determine a distance threshold. The distance threshold will be equal to: mean + stddev_mult * stddev. The multiplier for the standard deviation can be set using setStddevMulThresh(). During the next iteration the points will be classified as inlier or outlier if their average neighbor distance is below or above this threshold respectively.
The neighbors found for each query point will be found amongst ALL points of setInputCloud(), not just those indexed by setIndices(). The setIndices() method only indexes the points that will be iterated through as search query points.

For more information:

Definition at line 81 of file statistical_outlier_removal.h.


Member Typedef Documentation

template<typename PointT>
typedef boost::shared_ptr< const StatisticalOutlierRemoval<PointT> > pcl::StatisticalOutlierRemoval< PointT >::ConstPtr

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 92 of file statistical_outlier_removal.h.

template<typename PointT>
typedef FilterIndices<PointT>::PointCloud pcl::StatisticalOutlierRemoval< PointT >::PointCloud [protected]

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 84 of file statistical_outlier_removal.h.

template<typename PointT>
typedef PointCloud::ConstPtr pcl::StatisticalOutlierRemoval< PointT >::PointCloudConstPtr [protected]

Reimplemented from pcl::Filter< PointT >.

Definition at line 86 of file statistical_outlier_removal.h.

template<typename PointT>
typedef PointCloud::Ptr pcl::StatisticalOutlierRemoval< PointT >::PointCloudPtr [protected]

Reimplemented from pcl::Filter< PointT >.

Definition at line 85 of file statistical_outlier_removal.h.

template<typename PointT>
typedef boost::shared_ptr< StatisticalOutlierRemoval<PointT> > pcl::StatisticalOutlierRemoval< PointT >::Ptr

Reimplemented from pcl::FilterIndices< PointT >.

Definition at line 91 of file statistical_outlier_removal.h.

template<typename PointT>
typedef pcl::search::Search<PointT>::Ptr pcl::StatisticalOutlierRemoval< PointT >::SearcherPtr [protected]

Definition at line 87 of file statistical_outlier_removal.h.


Constructor & Destructor Documentation

template<typename PointT>
pcl::StatisticalOutlierRemoval< PointT >::StatisticalOutlierRemoval ( bool  extract_removed_indices = false) [inline]

Constructor.

Parameters:
[in]extract_removed_indicesSet to true if you want to be able to extract the indices of points being removed (default = false).

Definition at line 98 of file statistical_outlier_removal.h.

References pcl::Filter< PointT >::filter_name_.


Member Function Documentation

template<typename PointT >
void pcl::StatisticalOutlierRemoval< PointT >::applyFilter ( PointCloud output) [protected, virtual]

Filtered results are stored in a separate point cloud.

Parameters:
[out]outputThe resultant point cloud.

Implements pcl::Filter< PointT >.

Definition at line 48 of file statistical_outlier_removal.hpp.

References pcl::copyPointCloud(), pcl::PointCloud< PointT >::is_dense, and pcl::PointCloud< PointT >::points.

template<typename PointT>
void pcl::StatisticalOutlierRemoval< PointT >::applyFilter ( std::vector< int > &  indices) [inline, protected, virtual]

Filtered results are indexed by an indices array.

Parameters:
[out]indicesThe resultant indices.

Implements pcl::FilterIndices< PointT >.

Definition at line 168 of file statistical_outlier_removal.h.

References pcl::StatisticalOutlierRemoval< PointT >::applyFilterIndices().

template<typename PointT >
void pcl::StatisticalOutlierRemoval< PointT >::applyFilterIndices ( std::vector< int > &  indices) [protected]

Filtered results are indexed by an indices array.

Parameters:
[out]indicesThe resultant indices.

Definition at line 73 of file statistical_outlier_removal.hpp.

Referenced by pcl::StatisticalOutlierRemoval< PointT >::applyFilter().

template<typename PointT>
int pcl::StatisticalOutlierRemoval< PointT >::getMeanK ( ) [inline]

Get the number of nearest neighbors to use for mean distance estimation.

Returns:
The number of points to use for mean distance estimation.

Definition at line 120 of file statistical_outlier_removal.h.

template<typename PointT>
double pcl::StatisticalOutlierRemoval< PointT >::getStddevMulThresh ( ) [inline]

Get the standard deviation multiplier for the distance threshold calculation.

The distance threshold will be equal to: mean + stddev_mult * stddev. Points will be classified as inlier or outlier if their average neighbor distance is below or above this threshold respectively.

Parameters:
[in]stddev_multThe standard deviation multiplier.

Definition at line 142 of file statistical_outlier_removal.h.

template<typename PointT>
void pcl::StatisticalOutlierRemoval< PointT >::setMeanK ( int  nr_k) [inline]

Set the number of nearest neighbors to use for mean distance estimation.

Parameters:
[in]nr_kThe number of points to use for mean distance estimation.

Definition at line 111 of file statistical_outlier_removal.h.

template<typename PointT>
void pcl::StatisticalOutlierRemoval< PointT >::setStddevMulThresh ( double  stddev_mult) [inline]

Set the standard deviation multiplier for the distance threshold calculation.

The distance threshold will be equal to: mean + stddev_mult * stddev. Points will be classified as inlier or outlier if their average neighbor distance is below or above this threshold respectively.

Parameters:
[in]stddev_multThe standard deviation multiplier.

Definition at line 131 of file statistical_outlier_removal.h.


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