40 #include <pcl/filters/filter_indices.h>
41 #include <pcl/ModelCoefficients.h>
44 #include <pcl/sample_consensus/model_types.h>
45 #include <pcl/sample_consensus/sac_model.h>
72 template <
typename Po
intT>
103 for (std::size_t i = 0; i < model_coefficients.
values.size (); i++)
116 for (std::size_t i = 0; i < mc.
values.size (); i++)
190 template <
typename T>
void
193 setThresholdFunction ([=, &instance] (
double threshold) {
return (instance.*thresh_function) (threshold); });
251 #ifdef PCL_NO_PRECOMPILE
252 #include <pcl/filters/impl/model_outlier_removal.hpp>
Filter represents the base filter class.
std::string filter_name_
The filter name.
FilterIndices represents the base class for filters that are about binary point removal.
ModelOutlierRemoval filters points in a cloud based on the distance between model and point.
typename SampleConsensusModel< PointT >::Ptr SampleConsensusModelPtr
Eigen::VectorXf model_coefficients_
The model coefficients.
void setInputNormals(const PointCloudNConstPtr normals_ptr)
Set the normals cloud.
std::function< bool(double)> threshold_function_
void applyFilterIndices(Indices &indices)
Filtered results are indexed by an indices array.
void setModelType(pcl::SacModel model)
Set the type of SAC model used.
float thresh_
The threshold used to separate outliers (removed_indices) from inliers (indices)
float getThreshold() const
Get the thresholdfunction.
pcl::SacModel model_type_
The type of model to use (user given parameter).
pcl::PointCloud< pcl::Normal >::Ptr PointCloudNPtr
double getNormalDistanceWeight() const
get the normal distance weight
pcl::PointCloud< pcl::Normal >::ConstPtr PointCloudNConstPtr
ModelOutlierRemoval(bool extract_removed_indices=false)
Constructor.
void applyFilter(Indices &indices) override
Filtered results are indexed by an indices array.
void setThresholdFunction(bool(T::*thresh_function)(double), T &instance)
Register a different threshold function.
pcl::ModelCoefficients getModelCoefficients() const
returns the models coefficients
PointCloudNConstPtr getInputNormals() const
Get the normals cloud.
void setNormalDistanceWeight(const double weight)
Set the normals distance weight.
SampleConsensusModelPtr model_
The model used to calculate distances.
void setThresholdFunction(std::function< bool(double)> thresh)
Register a different threshold function.
double normals_distance_weight_
pcl::SacModel getModelType() const
Get the type of SAC model used.
void setModelCoefficients(const pcl::ModelCoefficients &model_coefficients)
sets the models coefficients
PointCloudNConstPtr cloud_normals_
bool checkSingleThreshold(double value)
void setThreshold(float thresh)
Set the thresholdfunction.
typename PointCloud::Ptr PointCloudPtr
typename PointCloud::ConstPtr PointCloudConstPtr
PointCloud represents the base class in PCL for storing collections of 3D points.
shared_ptr< PointCloud< PointT > > Ptr
shared_ptr< const PointCloud< PointT > > ConstPtr
shared_ptr< SampleConsensusModel< PointT > > Ptr
IndicesAllocator<> Indices
Type used for indices in PCL.
std::vector< float > values
A point structure representing Euclidean xyz coordinates, and the RGB color.