42 #include <pcl/features/eigen.h>
43 #include <pcl/common/common_headers.h>
44 #include <pcl/point_representation.h>
52 #define NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE 10
76 const Narf& operator=(
const Narf& other);
84 extractFromRangeImageAndAddToList (
const RangeImage& range_image,
const Eigen::Vector3f& interest_point,
int descriptor_size,
85 float support_size,
bool rotation_invariant, std::vector<Narf*>& feature_list);
88 extractFromRangeImageAndAddToList (
const RangeImage& range_image,
float image_x,
float image_y,
int descriptor_size,
89 float support_size,
bool rotation_invariant, std::vector<Narf*>& feature_list);
93 int descriptor_size,
float support_size,
bool rotation_invariant, std::vector<Narf*>& feature_list);
96 extractForEveryRangeImagePointAndAddToList (
const RangeImage& range_image,
int descriptor_size,
float support_size,
97 bool rotation_invariant, std::vector<Narf*>& feature_list);
106 extractFromRangeImage (
const RangeImage& range_image,
const Eigen::Affine3f& pose,
int descriptor_size,
float support_size,
107 int surface_patch_world_size=NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE);
111 extractFromRangeImage (
const RangeImage& range_image,
float x,
float y,
int descriptor_size,
float support_size);
115 extractFromRangeImage (
const RangeImage& range_image,
const InterestPoint& interest_point,
int descriptor_size,
float support_size);
119 extractFromRangeImage (
const RangeImage& range_image,
const Eigen::Vector3f& interest_point,
int descriptor_size,
float support_size);
124 extractFromRangeImageWithBestRotation (
const RangeImage& range_image,
const Eigen::Vector3f& interest_point,
125 int descriptor_size,
float support_size);
132 getRotations (std::vector<float>& rotations, std::vector<float>& strengths)
const;
141 getRotatedVersions (
const RangeImage& range_image,
const std::vector<float>& rotations, std::vector<Narf*>& features)
const;
145 getDescriptorDistance (
const Narf& other)
const;
149 getNoOfBeamPoints ()
const {
return (static_cast<int> (pcl_lrint (ceil (0.5f *
float (surface_patch_pixel_size_))))); }
153 copyToNarf36 (
Narf36& narf36)
const;
157 saveBinary (
const std::string& filename)
const;
171 extractDescriptor (
int descriptor_size);
187 inline const Eigen::Vector3f&
190 inline Eigen::Vector3f&
193 inline const Eigen::Affine3f&
196 inline Eigen::Affine3f&
224 freeSurfacePatch () {
delete[] surface_patch_; surface_patch_=NULL; surface_patch_pixel_size_=0; }
253 deepCopy (
const Narf& other);
256 getBlurredSurfacePatch (
int new_pixel_size,
int blur_radius)
const;
260 saveHeader (std::ostream& file)
const;
263 loadHeader (std::istream& file)
const;
266 static const std::string
270 const static int VERSION = 1;
285 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
287 #undef NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE
291 #include <pcl/features/impl/narf.hpp>
293 #endif //#ifndef PCL_NARF_H_
float surface_patch_world_size_
float & getSurfacePatchWorldSize()
Getter for the world size of the surface patch.
Eigen::Affine3f & getTransformation()
Getter for the 6DoF pose.
float * getSurfacePatch()
Getter for the surface patch.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
const float & getSurfacePatchWorldSize() const
Getter (const) for the world size of the surface patch.
const float * getDescriptor() const
Getter (const) for the descriptor.
void setSurfacePatch(float *surface_patch)
Setter for the surface patch.
const Eigen::Vector3f & getPosition() const
Getter (const) for the position.
int & getDescriptorSize()
Getter for the descriptor length.
void saveBinary(const Eigen::MatrixBase< Derived > &matrix, std::ostream &file)
Write a matrix to an output stream.
float & getSurfacePatchRotation()
Getter for the rotation of the surface patch.
FeaturePointRepresentation(int nr_dimensions)
const Eigen::Affine3f & getTransformation() const
Getter (const) for the 6DoF pose.
A point structure representing the Narf descriptor.
void setDescriptor(float *descriptor)
Setter for the descriptor.
int getNoOfBeamPoints() const
How many points on each beam of the gradient star are used to calculate the descriptor?
Eigen::Affine3f transformation_
const float * getSurfacePatch() const
Getter (const) for the surface patch.
static int max_no_of_threads
The maximum number of openmp threads that can be used in this class.
void loadBinary(Eigen::MatrixBase< Derived > const &matrix, std::istream &file)
Read a matrix from an input stream.
PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...
static const std::string getHeaderKeyword()
Eigen::Vector3f & getPosition()
Getter for the position.
float * getDescriptor()
Getter for the descriptor.
const int & getSurfacePatchPixelSize() const
Getter (const) for the pixel size of the surface patch (only one dimension)
Eigen::Vector3f position_
const float & getSurfacePatchRotation() const
Getter (const) for the rotation of the surface patch.
int surface_patch_pixel_size_
RangeImage is derived from pcl/PointCloud and provides functionalities with focus on situations where...
virtual void copyToFloatArray(const PointT &p, float *out) const
NARF (Normal Aligned Radial Features) is a point feature descriptor type for 3D data.
const int & getDescriptorSize() const
Getter (const) for the descriptor length.
virtual ~FeaturePointRepresentation()
Empty destructor.
int & getSurfacePatchPixelSize()
Getter for the pixel size of the surface patch (only one dimension)
float surface_patch_rotation_
A point structure representing an interest point with Euclidean xyz coordinates, and an interest valu...
void freeSurfacePatch()
Method to erase the surface patch and free the memory.