42#include <pcl/filters/filter_indices.h>
43#include <pcl/search/search.h>
79 template<
typename Po
intT>
214 filter_name_ =
"StatisticalOutlierRemoval";
280#ifdef PCL_NO_PRECOMPILE
281#include <pcl/filters/impl/statistical_outlier_removal.hpp>
Iterator class for point clouds with or without given indices.
Filter represents the base filter class.
bool extract_removed_indices_
Set to true if we want to return the indices of the removed points.
const std::string & getClassName() const
Get a string representation of the name of this class.
std::string filter_name_
The filter name.
IndicesPtr removed_indices_
Indices of the points that are removed.
FilterIndices represents the base class for filters that are about binary point removal.
float user_filter_value_
The user given value that the filtered point dimensions should be set to (default = NaN).
bool keep_organized_
False = remove points (default), true = redefine points, keep structure.
bool negative_
False = normal filter behavior (default), true = inverted behavior.
PointCloudConstPtr input_
The input point cloud dataset.
IndicesPtr indices_
A pointer to the vector of point indices to use.
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
int getMeanK()
Get the number of points to use for mean distance estimation.
void applyFilter(Indices &indices) override
Abstract filter method for point cloud indices.
void applyFilter(PCLPointCloud2 &output) override
Abstract filter method for point cloud.
int mean_k_
The number of points to use for mean distance estimation.
KdTreePtr tree_
A pointer to the spatial search object.
double getStddevMulThresh()
Get the standard deviation multiplier threshold as set by the user.
virtual void generateStatistics(double &mean, double &variance, double &stddev, std::vector< float > &distances)
Compute the statistical values used in both applyFilter methods.
StatisticalOutlierRemoval(bool extract_removed_indices=false)
Empty constructor.
double std_mul_
Standard deviations threshold (i.e., points outside of will be marked as outliers).
void setMeanK(int nr_k)
Set the number of points (k) to use for mean distance estimation.
void setStddevMulThresh(double std_mul)
Set the standard deviation multiplier threshold.
StatisticalOutlierRemoval uses point neighborhood statistics to filter outlier data.
StatisticalOutlierRemoval(bool extract_removed_indices=false)
Constructor.
typename PointCloud::ConstPtr PointCloudConstPtr
typename pcl::search::Search< PointT >::Ptr SearcherPtr
shared_ptr< StatisticalOutlierRemoval< PointT > > Ptr
double getStddevMulThresh()
Get the standard deviation multiplier for the distance threshold calculation.
int getMeanK()
Get the number of nearest neighbors to use for mean distance estimation.
void applyFilter(Indices &indices) override
Filtered results are indexed by an indices array.
void applyFilterIndices(Indices &indices)
Filtered results are indexed by an indices array.
void setStddevMulThresh(double stddev_mult)
Set the standard deviation multiplier for the distance threshold calculation.
void setMeanK(int nr_k)
Set the number of nearest neighbors to use for mean distance estimation.
typename PointCloud::Ptr PointCloudPtr
typename FilterIndices< PointT >::PointCloud PointCloud
shared_ptr< pcl::search::Search< PointT > > Ptr
IndicesAllocator<> Indices
Type used for indices in PCL.
shared_ptr< ::pcl::PCLPointCloud2 > Ptr
shared_ptr< const ::pcl::PCLPointCloud2 > ConstPtr
A point structure representing Euclidean xyz coordinates, and the RGB color.