Euclid
Geometry Processing and Shape Analysis in C++
|
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. | |
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.
void Euclid::SpinImage< Mesh >::build | ( | const Mesh & | mesh, |
const std::vector< Vector_3 > * | vnormals = nullptr , |
||
FT | resolution = 0.0 |
||
) |
mesh | The target mesh. |
vnormals | The precomputed vertex normals, default to nullptr and it'll be computed internally. |
resolution | The mesh resolution, i.e. avg. edge length. Default to 0.0 and it'll be computed internally. |
void Euclid::SpinImage< Mesh >::compute | ( | Eigen::ArrayBase< Derived > & | spin_img, |
float | bin_scale = 1.0f , |
||
int | image_width = 16 , |
||
float | support_angle = 90.0f |
||
) |
spin_img | The output spin image for v. |
bin_scale | Multiple of the mesh resolution, default to 1.0 which is equavalent to use the mesh resolution as bin size. |
image_width | Number of rows and columns for the image, default to
|
support_angle | Maximum support angle in degrees, default to 90.0 thus supporting vertices pointing in the same direction as v. |