Euclid
Geometry Processing and Shape Analysis in C++
Euclid::SpinImage< Mesh > Class Template Reference

The spin image descriptor. More...

#include <SpinImage.h>

Public Types

using Vector_3 = Vector_3_t< Mesh >
 
using FT = FT_t< Mesh >
 

Public Member Functions

void build (const Mesh &mesh, const std::vector< Vector_3 > *vnormals=nullptr, FT resolution=0.0)
 Build up the necessary computational components. More...
 
template<typename Derived >
void compute (Eigen::ArrayBase< Derived > &spin_img, float bin_scale=1.0f, int image_width=16, float support_angle=90.0f)
 Compute the spin image descriptor for all vertices. More...
 

Public Attributes

const Mesh * mesh = nullptr
 The mesh being processed.
 
ProPtr< const std::vector< Vector_3 > > vnormals = nullptr
 The vertex normals.
 
FT resolution = 0.0
 The mesh resolution.
 

Detailed Description

template<typename Mesh>
class Euclid::SpinImage< Mesh >

Spin image is an image-based local shape descriptor. For every point on a mesh, an image is generated by projecting points onto the image plane within a local support.

Reference

Johnson A E, Hebert M. Using spin images for efficient object recognition in cluttered 3D scenes[J]. IEEE Transactions on pattern analysis and machine intelligence, 1999, 21(5): 433-449.

Member Function Documentation

template<typename Mesh >
void Euclid::SpinImage< Mesh >::build ( const Mesh &  mesh,
const std::vector< Vector_3 > *  vnormals = nullptr,
FT  resolution = 0.0 
)
Parameters
meshThe target mesh.
vnormalsThe precomputed vertex normals, default to nullptr and it'll be computed internally.
resolutionThe mesh resolution, i.e. avg. edge length. Default to 0.0 and it'll be computed internally.
template<typename Mesh >
template<typename Derived >
void Euclid::SpinImage< Mesh >::compute ( Eigen::ArrayBase< Derived > &  spin_img,
float  bin_scale = 1.0f,
int  image_width = 16,
float  support_angle = 90.0f 
)
Parameters
spin_imgThe output spin image for v.
bin_scaleMultiple of the mesh resolution, default to 1.0 which is equavalent to use the mesh resolution as bin size.
image_widthNumber of rows and columns for the image, default to
  1. bin_size * image_width equals to the actual image size in mesh coordinates.
support_angleMaximum support angle in degrees, default to 90.0 thus supporting vertices pointing in the same direction as v.

The documentation for this class was generated from the following files: