40 #ifndef PCL_SPIN_IMAGE_H_
41 #define PCL_SPIN_IMAGE_H_
43 #include <pcl/point_types.h>
44 #include <pcl/features/feature.h>
87 template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
91 typedef boost::shared_ptr<SpinImageEstimation<PointInT, PointNT, PointOutT> >
Ptr;
92 typedef boost::shared_ptr<const SpinImageEstimation<PointInT, PointNT, PointOutT> >
ConstPtr;
122 double support_angle_cos = 0.0,
123 unsigned int min_pts_neighb = 0);
135 image_width_ = bin_count;
147 if (0.0 > support_angle_cos || support_angle_cos > 1.0)
149 throw PCLException (
"Cosine of support angle should be between 0 and 1",
150 "spin_image.h",
"setSupportAngle");
153 support_angle_cos_ = support_angle_cos;
164 min_pts_neighb_ = min_pts_neighb;
180 input_normals_ = normals;
191 rotation_axis_ = axis;
192 use_custom_axis_ =
true;
193 use_custom_axes_cloud_ =
false;
205 rotation_axes_cloud_ = axes;
207 use_custom_axes_cloud_ =
true;
208 use_custom_axis_ =
false;
215 use_custom_axis_ =
false;
216 use_custom_axes_cloud_ =
false;
271 PointNT rotation_axis_;
272 bool use_custom_axis_;
273 bool use_custom_axes_cloud_;
277 unsigned int image_width_;
278 double support_angle_cos_;
279 unsigned int min_pts_neighb_;
283 #ifdef PCL_NO_PRECOMPILE
284 #include <pcl/features/impl/spin_image.hpp>
287 #endif //#ifndef PCL_SPIN_IMAGE_H_
Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
Eigen::ArrayXXd computeSiForPoint(int index) const
Computes a spin-image for the point of the scan.
SpinImageEstimation(unsigned int image_width=8, double support_angle_cos=0.0, unsigned int min_pts_neighb=0)
Constructs empty spin image estimator.
void setImageWidth(unsigned int bin_count)
Sets spin-image resolution.
virtual ~SpinImageEstimation()
Empty destructor.
boost::shared_ptr< const PointCloud< PointT > > ConstPtr
void setInputNormals(const PointCloudNConstPtr &normals)
Provide a pointer to the input dataset that contains the point normals of the input XYZ dataset given...
boost::shared_ptr< const SpinImageEstimation< PointInT, PointNT, PointOutT > > ConstPtr
void setMinPointCountInNeighbourhood(unsigned int min_pts_neighb)
Sets minimal points count for spin image computation.
boost::shared_ptr< PointCloud< PointT > > Ptr
virtual bool initCompute()
initializes computations specific to spin-image.
void setInputRotationAxes(const PointCloudNConstPtr &axes)
Sets array of vectors as rotation axes for input points.
PointCloudN::Ptr PointCloudNPtr
boost::shared_ptr< SpinImageEstimation< PointInT, PointNT, PointOutT > > Ptr
void useNormalsAsRotationAxis()
Sets input normals as rotation axes (default setting).
void setRadialStructure(bool is_radial=true)
Sets/unsets flag for radial spin-image structure.
PointCloudIn::Ptr PointCloudInPtr
PointCloudIn::ConstPtr PointCloudInConstPtr
pcl::PointCloud< PointNT > PointCloudN
pcl::PointCloud< PointInT > PointCloudIn
Feature represents the base feature class.
A base class for all pcl exceptions which inherits from std::runtime_error.
void setRotationAxis(const PointNT &axis)
Sets single vector a rotation axis for all input points.
Estimates spin-image descriptors in the given input points.
void setSupportAngle(double support_angle_cos)
Sets the maximum angle for the point normal to get to support region.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
virtual void computeFeature(PointCloudOut &output)
Estimate the Spin Image descriptors at a set of points given by setInputWithNormals() using the surfa...
void setAngularDomain(bool is_angular=true)
Sets/unsets flag for angular spin-image domain.
PointCloudN::ConstPtr PointCloudNConstPtr