40 #include <pcl/filters/filter.h>
53 template<
typename Po
intT>
65 using Vector = Eigen::Matrix<float, Eigen::Dynamic, 1>;
69 using Ptr = shared_ptr<SamplingSurfaceNormal<PointT> >;
70 using ConstPtr = shared_ptr<const SamplingSurfaceNormal<PointT> >;
162 operator () (
const int& p0,
const int& p1)
165 return (cloud[p0].x < cloud[p1].x);
167 return (cloud[p0].y < cloud[p1].y);
169 return (cloud[p0].z < cloud[p1].z);
180 findXYZMaxMin (
const PointCloud& cloud, Vector& max_vec, Vector& min_vec);
193 partition (
const PointCloud& cloud,
const int first,
const int last,
194 const Vector min_values,
const Vector max_values,
195 std::vector<int>& indices,
PointCloud& outcloud);
205 samplePartition (
const PointCloud& data,
const int first,
const int last,
206 std::vector<int>& indices,
PointCloud& outcloud);
214 findCutVal (
const PointCloud& cloud,
const int cut_dim,
const int cut_index);
223 computeNormal (
const PointCloud& cloud, Eigen::Vector4f &normal,
float& curvature);
233 Eigen::Matrix3f &covariance_matrix,
234 Eigen::Vector4f ¢roid);
243 solvePlaneParameters (
const Eigen::Matrix3f &covariance_matrix,
244 float &nx,
float &ny,
float &nz,
float &curvature);
248 #ifdef PCL_NO_PRECOMPILE
249 #include <pcl/filters/impl/sampling_surface_normal.hpp>
Filter represents the base filter class.
shared_ptr< Filter< PointT > > Ptr
shared_ptr< const Filter< PointT > > ConstPtr
std::string filter_name_
The filter name.
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
SamplingSurfaceNormal divides the input space into grids until each grid contains a maximum of N poin...
void setSample(unsigned int sample)
Set maximum number of samples in each grid.
void setSeed(unsigned int seed)
Set seed of random function.
unsigned int getSample() const
Get the value of the internal sample parameter.
void setRatio(float ratio)
Set ratio of points to be sampled in each grid.
float getRatio() const
Get the value of the internal ratio parameter.
void applyFilter(PointCloud &output) override
Sample of point indices into a separate PointCloud.
SamplingSurfaceNormal()
Empty constructor.
float ratio_
Ratio of points to be sampled in each grid.
unsigned int getSeed() const
Get the value of the internal seed parameter.
unsigned int sample_
Maximum number of samples in each grid.
unsigned int seed_
Random number seed.