Point Cloud Library (PCL)
1.3.1
|
Estimates spin-image descriptors in the given input points. More...
#include <pcl/features/spin_image.h>
Public Types | |
typedef Feature< PointInT, PointOutT >::PointCloudOut | PointCloudOut |
typedef pcl::PointCloud< PointNT > | PointCloudN |
typedef PointCloudN::Ptr | PointCloudNPtr |
typedef PointCloudN::ConstPtr | PointCloudNConstPtr |
typedef pcl::PointCloud< PointInT > | PointCloudIn |
typedef PointCloudIn::Ptr | PointCloudInPtr |
typedef PointCloudIn::ConstPtr | PointCloudInConstPtr |
typedef boost::shared_ptr < FeatureFromNormals< PointInT, PointNT, PointOutT > > | Ptr |
typedef boost::shared_ptr < const FeatureFromNormals < PointInT, PointNT, PointOutT > > | ConstPtr |
Public Member Functions | |
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. | |
void | setSupportAngle (double support_angle_cos) |
Sets the maximum angle for the point normal to get to support region. | |
void | setMinPointCountInNeighbourhood (unsigned int min_pts_neighb) |
Sets minimal points count for spin image computation. | |
void | setInputWithNormals (const PointCloudInConstPtr &input, const PointCloudNConstPtr &normals) |
Sets input cloud along with corresponding normals. | |
void | setSearchSurfaceWithNormals (const PointCloudInConstPtr &surface, const PointCloudNConstPtr &normals) |
Sets surface that is used to estimate descriptor. | |
void | setRotationAxis (const PointNT &axis) |
Sets single vector a rotation axis for all input points. | |
void | setInputRotationAxes (const PointCloudNConstPtr &axes) |
Sets array of vectors as rotation axes for input points. | |
void | useNormalsAsRotationAxis () |
Sets input normals as rotation axes (default setting). | |
void | setAngularDomain (bool is_angular=true) |
Sets/unsets flag for angular spin-image domain. | |
void | setRadialStructure (bool is_radial=true) |
Sets/unsets flag for radial spin-image structure. | |
void | setInputNormals (const PointCloudNConstPtr &normals) |
Provide a pointer to the input dataset that contains the point normals of the XYZ dataset. | |
PointCloudNConstPtr | getInputNormals () |
Get a pointer to the normals of the input XYZ point cloud dataset. |
Estimates spin-image descriptors in the given input points.
This class represents spin image descriptor. Spin image is a histogram of point locations summed along the bins of the image. A 2D accumulator indexed by a and b is created. Next, the coordinates (a, b) are computed for a vertex in the surface mesh that is within the support of the spin image (explained below). The bin indexed by (a, b) in the accumulator is then incremented; bilinear interpolation is used to smooth the contribution of the vertex. This procedure is repeated for all vertices within the support of the spin image. The resulting accumulator can be thought of as an image; dark areas in the image correspond to bins that contain many projected points. As long as the size of the bins in the accumulator is greater than the median distance between vertices in the mesh (the definition of mesh resolution), the position of individual vertices will be averaged out during spin image generation.
For further information please see:
Johnson, A. E., & Hebert, M. (1998). Surface Matching for Object Recognition in Complex 3D Scenes. Image and Vision Computing, 16, 635-651.
The class also implements radial spin images and spin-images in angular domain (or both).
typedef boost::shared_ptr< const FeatureFromNormals<PointInT, PointNT, PointOutT> > pcl::FeatureFromNormals::ConstPtr [inherited] |
typedef pcl::PointCloud<PointInT> pcl::SpinImageEstimation::PointCloudIn |
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 92 of file spin_image.h.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 94 of file spin_image.h.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 93 of file spin_image.h.
typedef pcl::PointCloud<PointNT> pcl::SpinImageEstimation::PointCloudN |
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 88 of file spin_image.h.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 90 of file spin_image.h.
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 89 of file spin_image.h.
typedef Feature<PointInT, PointOutT>::PointCloudOut pcl::SpinImageEstimation::PointCloudOut |
Reimplemented from pcl::FeatureFromNormals< PointInT, PointNT, PointOutT >.
Definition at line 86 of file spin_image.h.
typedef boost::shared_ptr< FeatureFromNormals<PointInT, PointNT, PointOutT> > pcl::FeatureFromNormals::Ptr [inherited] |
SpinImageEstimation::SpinImageEstimation | ( | unsigned int | image_width = 8 , |
double | support_angle_cos = 0.0 , |
||
unsigned int | min_pts_neighb = 0 |
||
) |
Constructs empty spin image estimator.
image_width | spin-image resolution, number of bins along one dimension |
support_angle_cos | minimal allowed cosine of the angle between the normals of input point and search surface point for the point to be retained in the support |
min_pts_neighb | min number of points in the support to correctly estimate spin-image. If at some point the support contains less points, exception is thrown |
Definition at line 57 of file spin_image.hpp.
PointCloudNConstPtr pcl::FeatureFromNormals::getInputNormals | ( | ) | [inline, inherited] |
void pcl::SpinImageEstimation::setAngularDomain | ( | bool | is_angular = true | ) | [inline] |
Sets/unsets flag for angular spin-image domain.
Angular spin-image differs from the vanilla one in the way that not the points are collected in the bins but the angles between their normals and the normal to the reference point. For further information please see Endres, F., Plagemann, C., Stachniss, C., & Burgard, W. (2009). Unsupervised Discovery of Object Classes from Range Data using Latent Dirichlet Allocation. In Robotics: Science and Systems. Seattle, USA.
is_angular | true for angular domain, false for point domain |
Definition at line 231 of file spin_image.h.
void pcl::SpinImageEstimation::setImageWidth | ( | unsigned int | bin_count | ) | [inline] |
Sets spin-image resolution.
bin_count | spin-image resolution, number of bins along one dimension |
Definition at line 114 of file spin_image.h.
void pcl::FeatureFromNormals::setInputNormals | ( | const PointCloudNConstPtr & | normals | ) | [inline, inherited] |
Provide a pointer to the input dataset that contains the point normals of the XYZ dataset.
In case of search surface is set to be different from the input cloud, normals should correspond to the search surface, not the input cloud!
normals | the const boost shared pointer to a PointCloud of normals. By convention, L2 norm of each normal should be 1. |
void pcl::SpinImageEstimation::setInputRotationAxes | ( | const PointCloudNConstPtr & | axes | ) | [inline] |
Sets array of vectors as rotation axes for input points.
Useful e.g. when one wants to use tangents instead of normals as rotation axes
axes | unit-length vectors that serves as rotation axes for the corresponding input points' reference frames |
Definition at line 201 of file spin_image.h.
void pcl::SpinImageEstimation::setInputWithNormals | ( | const PointCloudInConstPtr & | input, |
const PointCloudNConstPtr & | normals | ||
) | [inline] |
Sets input cloud along with corresponding normals.
Note that if no search surface is given explicitly, these points and normals are used to estimate the descriptor
input | the cloud that provides the query points where the descriptor is estimated |
normals | provides normals for input, they should be normalized |
Definition at line 157 of file spin_image.h.
void pcl::SpinImageEstimation::setMinPointCountInNeighbourhood | ( | unsigned int | min_pts_neighb | ) | [inline] |
Sets minimal points count for spin image computation.
min_pts_neighb | min number of points in the support to correctly estimate spin-image. If at some point the support contains less points, exception is thrown |
Definition at line 143 of file spin_image.h.
void pcl::SpinImageEstimation::setRadialStructure | ( | bool | is_radial = true | ) | [inline] |
Sets/unsets flag for radial spin-image structure.
Instead of rectangular coordinate system for reference frame polar coordinates are used. Binning is done depending on the distance and inclination angle from the reference point
is_radial | true for radial spin-image structure, false for rectangular |
Definition at line 241 of file spin_image.h.
void pcl::SpinImageEstimation::setRotationAxis | ( | const PointNT & | axis | ) | [inline] |
Sets single vector a rotation axis for all input points.
It could be useful e.g. when the vertical axis is known.
axis | unit-length vector that serves as rotation axis for reference frame |
Definition at line 187 of file spin_image.h.
void pcl::SpinImageEstimation::setSearchSurfaceWithNormals | ( | const PointCloudInConstPtr & | surface, |
const PointCloudNConstPtr & | normals | ||
) | [inline] |
Sets surface that is used to estimate descriptor.
This method is not mandatory. If it has not been called, the points and normals from setInputWithNormals() are used to estimate the descriptor Calling this method is tantamount to calling setSearchSurface() and setInputNormals() with the same parameters (note that setInputNormals() in fact sets surface normals)
surface | search surface used to estimate descriptor |
normals | provides normals for surface, they should be normalized |
Definition at line 174 of file spin_image.h.
void pcl::SpinImageEstimation::setSupportAngle | ( | double | support_angle_cos | ) | [inline] |
Sets the maximum angle for the point normal to get to support region.
support_angle_cos | minimal allowed cosine of the angle between the normals of input point and search surface point for the point to be retained in the support |
Definition at line 126 of file spin_image.h.
void pcl::SpinImageEstimation::useNormalsAsRotationAxis | ( | ) | [inline] |
Sets input normals as rotation axes (default setting).
Definition at line 213 of file spin_image.h.