Point Cloud Library (PCL)  1.14.1-dev
List of all members | Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
pcl::Narf Class Reference

NARF (Normal Aligned Radial Features) is a point feature descriptor type for 3D data. More...

#include <pcl/features/narf.h>

Classes

struct  FeaturePointRepresentation
 

Public Member Functions

 Narf ()
 Constructor. More...
 
 Narf (const Narf &other)
 Copy Constructor. More...
 
 ~Narf ()
 Destructor. More...
 
const Narfoperator= (const Narf &other)
 Assignment operator. More...
 
bool extractFromRangeImage (const RangeImage &range_image, const Eigen::Affine3f &pose, int descriptor_size, float support_size, int surface_patch_world_size=NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE)
 Method to extract a NARF feature from a certain 3D point using a range image. More...
 
bool extractFromRangeImage (const RangeImage &range_image, float x, float y, int descriptor_size, float support_size)
 Same as above, but determines the transformation from the surface in the range image. More...
 
bool extractFromRangeImage (const RangeImage &range_image, const InterestPoint &interest_point, int descriptor_size, float support_size)
 Same as above. More...
 
bool extractFromRangeImage (const RangeImage &range_image, const Eigen::Vector3f &interest_point, int descriptor_size, float support_size)
 Same as above. More...
 
bool extractFromRangeImageWithBestRotation (const RangeImage &range_image, const Eigen::Vector3f &interest_point, int descriptor_size, float support_size)
 Same as above, but using the rotational invariant version by choosing the best extracted rotation around the normal. More...
 
void getRotations (std::vector< float > &rotations, std::vector< float > &strengths) const
 
void getRotatedVersions (const RangeImage &range_image, const std::vector< float > &rotations, std::vector< Narf * > &features) const
 
float getDescriptorDistance (const Narf &other) const
 Calculate descriptor distance, value in [0,1] with 0 meaning identical and 1 every cell above maximum distance. More...
 
int getNoOfBeamPoints () const
 How many points on each beam of the gradient star are used to calculate the descriptor? More...
 
void copyToNarf36 (Narf36 &narf36) const
 Copy the descriptor and pose to the point struct Narf36. More...
 
void saveBinary (const std::string &filename) const
 Write to file. More...
 
void saveBinary (std::ostream &file) const
 Write to output stream. More...
 
void loadBinary (const std::string &filename)
 Read from file. More...
 
void loadBinary (std::istream &file)
 Read from input stream. More...
 
bool extractDescriptor (int descriptor_size)
 Create the descriptor from the already set other members. More...
 
const float * getDescriptor () const
 Getter (const) for the descriptor. More...
 
float * getDescriptor ()
 Getter for the descriptor. More...
 
const int & getDescriptorSize () const
 Getter (const) for the descriptor length. More...
 
int & getDescriptorSize ()
 Getter for the descriptor length. More...
 
const Eigen::Vector3f & getPosition () const
 Getter (const) for the position. More...
 
Eigen::Vector3f & getPosition ()
 Getter for the position. More...
 
const Eigen::Affine3f & getTransformation () const
 Getter (const) for the 6DoF pose. More...
 
Eigen::Affine3f & getTransformation ()
 Getter for the 6DoF pose. More...
 
const int & getSurfacePatchPixelSize () const
 Getter (const) for the pixel size of the surface patch (only one dimension) More...
 
int & getSurfacePatchPixelSize ()
 Getter for the pixel size of the surface patch (only one dimension) More...
 
const float & getSurfacePatchWorldSize () const
 Getter (const) for the world size of the surface patch. More...
 
float & getSurfacePatchWorldSize ()
 Getter for the world size of the surface patch. More...
 
const float & getSurfacePatchRotation () const
 Getter (const) for the rotation of the surface patch. More...
 
float & getSurfacePatchRotation ()
 Getter for the rotation of the surface patch. More...
 
const float * getSurfacePatch () const
 Getter (const) for the surface patch. More...
 
float * getSurfacePatch ()
 Getter for the surface patch. More...
 
void freeSurfacePatch ()
 Method to erase the surface patch and free the memory. More...
 
void setDescriptor (float *descriptor)
 Setter for the descriptor. More...
 
void setSurfacePatch (float *surface_patch)
 Setter for the surface patch. More...
 

Static Public Member Functions

static void extractFromRangeImageAndAddToList (const RangeImage &range_image, const Eigen::Vector3f &interest_point, int descriptor_size, float support_size, bool rotation_invariant, std::vector< Narf * > &feature_list)
 Add features extracted at the given interest point and add them to the list. More...
 
static void extractFromRangeImageAndAddToList (const RangeImage &range_image, float image_x, float image_y, int descriptor_size, float support_size, bool rotation_invariant, std::vector< Narf * > &feature_list)
 Same as above. More...
 
static void extractForInterestPoints (const RangeImage &range_image, const PointCloud< InterestPoint > &interest_points, int descriptor_size, float support_size, bool rotation_invariant, std::vector< Narf * > &feature_list)
 Get a list of features from the given interest points. More...
 
static void extractForEveryRangeImagePointAndAddToList (const RangeImage &range_image, int descriptor_size, float support_size, bool rotation_invariant, std::vector< Narf * > &feature_list)
 Extract an NARF for every point in the range image. More...
 

Static Public Attributes

static int max_no_of_threads
 The maximum number of openmp threads that can be used in this class. More...
 

Protected Member Functions

void reset ()
 Reset al members to default values and free allocated memory. More...
 
void deepCopy (const Narf &other)
 Create a deep copy of other. More...
 
float * getBlurredSurfacePatch (int new_pixel_size, int blur_radius) const
 Get the surface patch with a blur on it. More...
 
void saveHeader (std::ostream &file) const
 Write header to output stream. More...
 
int loadHeader (std::istream &file) const
 Read header from input stream. More...
 

Static Protected Member Functions

static const std::string getHeaderKeyword ()
 

Protected Attributes

Eigen::Vector3f position_
 
Eigen::Affine3f transformation_
 
float * surface_patch_ {nullptr}
 
int surface_patch_pixel_size_ {0}
 
float surface_patch_world_size_ {0.0f}
 
float surface_patch_rotation_ {0.0f}
 
float * descriptor_ {nullptr}
 
int descriptor_size_ {0}
 

Static Protected Attributes

static const int VERSION = 1
 

Detailed Description

NARF (Normal Aligned Radial Features) is a point feature descriptor type for 3D data.

Please refer to pcl/features/narf_descriptor.h if you want the class derived from pcl Feature. See B. Steder, R. B. Rusu, K. Konolige, and W. Burgard Point Feature Extraction on 3D Range Scans Taking into Account Object Boundaries In Proc. of the IEEE Int. Conf. on Robotics &Automation (ICRA). 2011.

Author
Bastian Steder

Definition at line 65 of file narf.h.

Constructor & Destructor Documentation

◆ Narf() [1/2]

pcl::Narf::Narf ( )

Constructor.

◆ Narf() [2/2]

pcl::Narf::Narf ( const Narf other)

Copy Constructor.

◆ ~Narf()

pcl::Narf::~Narf ( )

Destructor.

Member Function Documentation

◆ copyToNarf36()

void pcl::Narf::copyToNarf36 ( Narf36 narf36) const
inline

◆ deepCopy()

void pcl::Narf::deepCopy ( const Narf other)
protected

Create a deep copy of other.

◆ extractDescriptor()

bool pcl::Narf::extractDescriptor ( int  descriptor_size)

Create the descriptor from the already set other members.

◆ extractForEveryRangeImagePointAndAddToList()

static void pcl::Narf::extractForEveryRangeImagePointAndAddToList ( const RangeImage range_image,
int  descriptor_size,
float  support_size,
bool  rotation_invariant,
std::vector< Narf * > &  feature_list 
)
static

Extract an NARF for every point in the range image.

◆ extractForInterestPoints()

static void pcl::Narf::extractForInterestPoints ( const RangeImage range_image,
const PointCloud< InterestPoint > &  interest_points,
int  descriptor_size,
float  support_size,
bool  rotation_invariant,
std::vector< Narf * > &  feature_list 
)
static

Get a list of features from the given interest points.

◆ extractFromRangeImage() [1/4]

bool pcl::Narf::extractFromRangeImage ( const RangeImage range_image,
const Eigen::Affine3f &  pose,
int  descriptor_size,
float  support_size,
int  surface_patch_world_size = NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE 
)

Method to extract a NARF feature from a certain 3D point using a range image.

pose determines the coordinate system of the feature, whereas it transforms a point from the world into the feature system. This means the interest point at which the feature is extracted will be the inverse application of pose onto (0,0,0). descriptor_size_ determines the size of the descriptor, support_size determines the support size of the feature, meaning the size in the world it covers

◆ extractFromRangeImage() [2/4]

bool pcl::Narf::extractFromRangeImage ( const RangeImage range_image,
const Eigen::Vector3f &  interest_point,
int  descriptor_size,
float  support_size 
)

Same as above.

◆ extractFromRangeImage() [3/4]

bool pcl::Narf::extractFromRangeImage ( const RangeImage range_image,
const InterestPoint interest_point,
int  descriptor_size,
float  support_size 
)

Same as above.

◆ extractFromRangeImage() [4/4]

bool pcl::Narf::extractFromRangeImage ( const RangeImage range_image,
float  x,
float  y,
int  descriptor_size,
float  support_size 
)

Same as above, but determines the transformation from the surface in the range image.

◆ extractFromRangeImageAndAddToList() [1/2]

static void pcl::Narf::extractFromRangeImageAndAddToList ( const RangeImage range_image,
const Eigen::Vector3f &  interest_point,
int  descriptor_size,
float  support_size,
bool  rotation_invariant,
std::vector< Narf * > &  feature_list 
)
static

Add features extracted at the given interest point and add them to the list.

◆ extractFromRangeImageAndAddToList() [2/2]

static void pcl::Narf::extractFromRangeImageAndAddToList ( const RangeImage range_image,
float  image_x,
float  image_y,
int  descriptor_size,
float  support_size,
bool  rotation_invariant,
std::vector< Narf * > &  feature_list 
)
static

Same as above.

◆ extractFromRangeImageWithBestRotation()

bool pcl::Narf::extractFromRangeImageWithBestRotation ( const RangeImage range_image,
const Eigen::Vector3f &  interest_point,
int  descriptor_size,
float  support_size 
)

Same as above, but using the rotational invariant version by choosing the best extracted rotation around the normal.

Use extractFromRangeImageAndAddToList if you want to enable the system to return multiple features with different rotations.

◆ freeSurfacePatch()

void pcl::Narf::freeSurfacePatch ( )
inline

Method to erase the surface patch and free the memory.

Definition at line 226 of file narf.h.

◆ getBlurredSurfacePatch()

float* pcl::Narf::getBlurredSurfacePatch ( int  new_pixel_size,
int  blur_radius 
) const
protected

Get the surface patch with a blur on it.

◆ getDescriptor() [1/2]

float* pcl::Narf::getDescriptor ( )
inline

Getter for the descriptor.

Definition at line 181 of file narf.h.

◆ getDescriptor() [2/2]

const float* pcl::Narf::getDescriptor ( ) const
inline

Getter (const) for the descriptor.

Definition at line 178 of file narf.h.

Referenced by pcl::Narf::FeaturePointRepresentation::copyToFloatArray().

◆ getDescriptorDistance()

float pcl::Narf::getDescriptorDistance ( const Narf other) const
inline

Calculate descriptor distance, value in [0,1] with 0 meaning identical and 1 every cell above maximum distance.

Definition at line 46 of file narf.hpp.

References descriptor_, descriptor_size_, and pcl::L1_Norm().

◆ getDescriptorSize() [1/2]

int& pcl::Narf::getDescriptorSize ( )
inline

Getter for the descriptor length.

Definition at line 187 of file narf.h.

◆ getDescriptorSize() [2/2]

const int& pcl::Narf::getDescriptorSize ( ) const
inline

Getter (const) for the descriptor length.

Definition at line 184 of file narf.h.

◆ getHeaderKeyword()

static const std::string pcl::Narf::getHeaderKeyword ( )
inlinestaticprotected

Definition at line 272 of file narf.h.

◆ getNoOfBeamPoints()

int pcl::Narf::getNoOfBeamPoints ( ) const
inline

How many points on each beam of the gradient star are used to calculate the descriptor?

Definition at line 151 of file narf.h.

References pcl_lrint.

◆ getPosition() [1/2]

Eigen::Vector3f& pcl::Narf::getPosition ( )
inline

Getter for the position.

Definition at line 193 of file narf.h.

◆ getPosition() [2/2]

const Eigen::Vector3f& pcl::Narf::getPosition ( ) const
inline

Getter (const) for the position.

Definition at line 190 of file narf.h.

◆ getRotatedVersions()

void pcl::Narf::getRotatedVersions ( const RangeImage range_image,
const std::vector< float > &  rotations,
std::vector< Narf * > &  features 
) const

◆ getRotations()

void pcl::Narf::getRotations ( std::vector< float > &  rotations,
std::vector< float > &  strengths 
) const

◆ getSurfacePatch() [1/2]

float* pcl::Narf::getSurfacePatch ( )
inline

Getter for the surface patch.

Definition at line 223 of file narf.h.

◆ getSurfacePatch() [2/2]

const float* pcl::Narf::getSurfacePatch ( ) const
inline

Getter (const) for the surface patch.

Definition at line 220 of file narf.h.

◆ getSurfacePatchPixelSize() [1/2]

int& pcl::Narf::getSurfacePatchPixelSize ( )
inline

Getter for the pixel size of the surface patch (only one dimension)

Definition at line 205 of file narf.h.

◆ getSurfacePatchPixelSize() [2/2]

const int& pcl::Narf::getSurfacePatchPixelSize ( ) const
inline

Getter (const) for the pixel size of the surface patch (only one dimension)

Definition at line 202 of file narf.h.

◆ getSurfacePatchRotation() [1/2]

float& pcl::Narf::getSurfacePatchRotation ( )
inline

Getter for the rotation of the surface patch.

Definition at line 217 of file narf.h.

◆ getSurfacePatchRotation() [2/2]

const float& pcl::Narf::getSurfacePatchRotation ( ) const
inline

Getter (const) for the rotation of the surface patch.

Definition at line 214 of file narf.h.

◆ getSurfacePatchWorldSize() [1/2]

float& pcl::Narf::getSurfacePatchWorldSize ( )
inline

Getter for the world size of the surface patch.

Definition at line 211 of file narf.h.

◆ getSurfacePatchWorldSize() [2/2]

const float& pcl::Narf::getSurfacePatchWorldSize ( ) const
inline

Getter (const) for the world size of the surface patch.

Definition at line 208 of file narf.h.

◆ getTransformation() [1/2]

Eigen::Affine3f& pcl::Narf::getTransformation ( )
inline

Getter for the 6DoF pose.

Definition at line 199 of file narf.h.

◆ getTransformation() [2/2]

const Eigen::Affine3f& pcl::Narf::getTransformation ( ) const
inline

Getter (const) for the 6DoF pose.

Definition at line 196 of file narf.h.

◆ loadBinary() [1/2]

void pcl::Narf::loadBinary ( const std::string &  filename)

Read from file.

◆ loadBinary() [2/2]

void pcl::Narf::loadBinary ( std::istream &  file)

Read from input stream.

◆ loadHeader()

int pcl::Narf::loadHeader ( std::istream &  file) const
protected

Read header from input stream.

◆ operator=()

const Narf& pcl::Narf::operator= ( const Narf other)

Assignment operator.

◆ reset()

void pcl::Narf::reset ( )
protected

Reset al members to default values and free allocated memory.

◆ saveBinary() [1/2]

void pcl::Narf::saveBinary ( const std::string &  filename) const

Write to file.

◆ saveBinary() [2/2]

void pcl::Narf::saveBinary ( std::ostream &  file) const

Write to output stream.

◆ saveHeader()

void pcl::Narf::saveHeader ( std::ostream &  file) const
protected

Write header to output stream.

◆ setDescriptor()

void pcl::Narf::setDescriptor ( float *  descriptor)
inline

Setter for the descriptor.

Definition at line 231 of file narf.h.

◆ setSurfacePatch()

void pcl::Narf::setSurfacePatch ( float *  surface_patch)
inline

Setter for the surface patch.

Definition at line 234 of file narf.h.

Member Data Documentation

◆ descriptor_

float* pcl::Narf::descriptor_ {nullptr}
protected

Definition at line 284 of file narf.h.

Referenced by copyToNarf36(), and getDescriptorDistance().

◆ descriptor_size_

int pcl::Narf::descriptor_size_ {0}
protected

Definition at line 285 of file narf.h.

Referenced by copyToNarf36(), and getDescriptorDistance().

◆ max_no_of_threads

int pcl::Narf::max_no_of_threads
static

The maximum number of openmp threads that can be used in this class.

Definition at line 82 of file narf.h.

◆ position_

Eigen::Vector3f pcl::Narf::position_
protected

Definition at line 278 of file narf.h.

◆ surface_patch_

float* pcl::Narf::surface_patch_ {nullptr}
protected

Definition at line 280 of file narf.h.

◆ surface_patch_pixel_size_

int pcl::Narf::surface_patch_pixel_size_ {0}
protected

Definition at line 281 of file narf.h.

◆ surface_patch_rotation_

float pcl::Narf::surface_patch_rotation_ {0.0f}
protected

Definition at line 283 of file narf.h.

◆ surface_patch_world_size_

float pcl::Narf::surface_patch_world_size_ {0.0f}
protected

Definition at line 282 of file narf.h.

◆ transformation_

Eigen::Affine3f pcl::Narf::transformation_
protected

Definition at line 279 of file narf.h.

Referenced by copyToNarf36().

◆ VERSION

const int pcl::Narf::VERSION = 1
staticprotected

Definition at line 275 of file narf.h.


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