38 #ifndef PCL_FILTERS_SAMPLING_SURFACE_NORMAL_H_
39 #define PCL_FILTERS_SAMPLING_SURFACE_NORMAL_H_
41 #include <pcl/filters/filter.h>
54 template<
typename Po
intT>
66 typedef typename Eigen::Matrix<float, Eigen::Dynamic, 1> Vector;
70 typedef boost::shared_ptr< SamplingSurfaceNormal<PointT> >
Ptr;
71 typedef boost::shared_ptr< const SamplingSurfaceNormal<PointT> >
ConstPtr;
163 operator () (
const int& p0,
const int& p1)
166 return (cloud.points[p0].x < cloud.points[p1].x);
168 return (cloud.points[p0].y < cloud.points[p1].y);
170 return (cloud.points[p0].z < cloud.points[p1].z);
181 findXYZMaxMin (
const PointCloud& cloud, Vector& max_vec, Vector& min_vec);
194 partition (
const PointCloud& cloud,
const int first,
const int last,
195 const Vector min_values,
const Vector max_values,
196 std::vector<int>& indices,
PointCloud& outcloud);
206 samplePartition (
const PointCloud& data,
const int first,
const int last,
207 std::vector<int>& indices,
PointCloud& outcloud);
215 findCutVal (
const PointCloud& cloud,
const int cut_dim,
const int cut_index);
224 computeNormal (
const PointCloud& cloud, Eigen::Vector4f &normal,
float& curvature);
234 Eigen::Matrix3f &covariance_matrix,
235 Eigen::Vector4f ¢roid);
244 solvePlaneParameters (
const Eigen::Matrix3f &covariance_matrix,
245 float &nx,
float &ny,
float &nz,
float &curvature);
249 #ifdef PCL_NO_PRECOMPILE
250 #include <pcl/filters/impl/sampling_surface_normal.hpp>
253 #endif //#ifndef PCL_FILTERS_SAMPLING_SURFACE_NORMAL_H_
std::string filter_name_
The filter name.
PointCloud::ConstPtr PointCloudConstPtr
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
unsigned int getSeed() const
Get the value of the internal seed parameter.
boost::shared_ptr< PointCloud< PointT > > Ptr
void applyFilter(PointCloud &output)
Sample of point indices into a separate PointCloud.
float ratio_
Ratio of points to be sampled in each grid.
PointCloud::Ptr PointCloudPtr
void setSeed(unsigned int seed)
Set seed of random function.
SamplingSurfaceNormal divides the input space into grids until each grid contains a maximum of N poin...
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.
SamplingSurfaceNormal()
Empty constructor.
unsigned int seed_
Random number seed.
Filter represents the base filter class.
boost::shared_ptr< const SamplingSurfaceNormal< PointT > > ConstPtr
unsigned int sample_
Maximum number of samples in each grid.
unsigned int getSample() const
Get the value of the internal sample parameter.
void setSample(unsigned int sample)
Set maximum number of samples in each grid.
boost::shared_ptr< SamplingSurfaceNormal< PointT > > Ptr