Point Cloud Library (PCL)  1.3.1
Public Types | Public Member Functions
pcl::SpinImageEstimation Class Reference

Estimates spin-image descriptors in the given input points. More...

#include <pcl/features/spin_image.h>

Inheritance diagram for pcl::SpinImageEstimation:
Inheritance graph
[legend]
Collaboration diagram for pcl::SpinImageEstimation:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

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).

Author:
Roman Shapovalov, Alexander Velizhev

Member Typedef Documentation

typedef boost::shared_ptr< const FeatureFromNormals<PointInT, PointNT, PointOutT> > pcl::FeatureFromNormals::ConstPtr [inherited]

Definition at line 290 of file feature.h.

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.

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.

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]

Definition at line 289 of file feature.h.


Constructor & Destructor Documentation

SpinImageEstimation::SpinImageEstimation ( unsigned int  image_width = 8,
double  support_angle_cos = 0.0,
unsigned int  min_pts_neighb = 0 
)

Constructs empty spin image estimator.

Parameters:
image_widthspin-image resolution, number of bins along one dimension
support_angle_cosminimal 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_neighbmin 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.


Member Function Documentation

PointCloudNConstPtr pcl::FeatureFromNormals::getInputNormals ( ) [inline, inherited]

Get a pointer to the normals of the input XYZ point cloud dataset.

Definition at line 312 of file feature.h.

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.

Parameters:
is_angulartrue 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.

Parameters:
bin_countspin-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!

Parameters:
normalsthe const boost shared pointer to a PointCloud of normals. By convention, L2 norm of each normal should be 1.

Definition at line 308 of file feature.h.

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

Parameters:
axesunit-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

Parameters:
inputthe cloud that provides the query points where the descriptor is estimated
normalsprovides 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.

Parameters:
min_pts_neighbmin 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

Parameters:
is_radialtrue 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.

Parameters:
axisunit-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)

Parameters:
surfacesearch surface used to estimate descriptor
normalsprovides 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.

Parameters:
support_angle_cosminimal 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.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines