41 #include <pcl/memory.h>
42 #include <pcl/pcl_macros.h>
43 #include <pcl/features/eigen.h>
44 #include <pcl/common/common_headers.h>
45 #include <pcl/point_representation.h>
53 #define NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE 10
77 const Narf& operator=(
const Narf& other);
85 extractFromRangeImageAndAddToList (
const RangeImage& range_image,
const Eigen::Vector3f& interest_point,
int descriptor_size,
86 float support_size,
bool rotation_invariant, std::vector<Narf*>& feature_list);
89 extractFromRangeImageAndAddToList (
const RangeImage& range_image,
float image_x,
float image_y,
int descriptor_size,
90 float support_size,
bool rotation_invariant, std::vector<Narf*>& feature_list);
94 int descriptor_size,
float support_size,
bool rotation_invariant, std::vector<Narf*>& feature_list);
97 extractForEveryRangeImagePointAndAddToList (
const RangeImage& range_image,
int descriptor_size,
float support_size,
98 bool rotation_invariant, std::vector<Narf*>& feature_list);
107 extractFromRangeImage (
const RangeImage& range_image,
const Eigen::Affine3f& pose,
int descriptor_size,
float support_size,
108 int surface_patch_world_size=NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE);
112 extractFromRangeImage (
const RangeImage& range_image,
float x,
float y,
int descriptor_size,
float support_size);
116 extractFromRangeImage (
const RangeImage& range_image,
const InterestPoint& interest_point,
int descriptor_size,
float support_size);
120 extractFromRangeImage (
const RangeImage& range_image,
const Eigen::Vector3f& interest_point,
int descriptor_size,
float support_size);
125 extractFromRangeImageWithBestRotation (
const RangeImage& range_image,
const Eigen::Vector3f& interest_point,
126 int descriptor_size,
float support_size);
133 getRotations (std::vector<float>& rotations, std::vector<float>& strengths)
const;
142 getRotatedVersions (
const RangeImage& range_image,
const std::vector<float>& rotations, std::vector<Narf*>& features)
const;
146 getDescriptorDistance (
const Narf& other)
const;
150 getNoOfBeamPoints ()
const {
return (static_cast<int> (pcl_lrint (std::ceil (0.5f *
float (surface_patch_pixel_size_))))); }
154 copyToNarf36 (
Narf36& narf36)
const;
158 saveBinary (
const std::string& filename)
const;
172 extractDescriptor (
int descriptor_size);
188 inline const Eigen::Vector3f&
191 inline Eigen::Vector3f&
194 inline const Eigen::Affine3f&
197 inline Eigen::Affine3f&
225 freeSurfacePatch () {
delete[] surface_patch_; surface_patch_=
nullptr; surface_patch_pixel_size_=0; }
254 deepCopy (
const Narf& other);
257 getBlurredSurfacePatch (
int new_pixel_size,
int blur_radius)
const;
261 saveHeader (std::ostream& file)
const;
264 loadHeader (std::istream& file)
const;
267 static const std::string
271 const static int VERSION = 1;
288 #undef NARF_DEFAULT_SURFACE_PATCH_PIXEL_SIZE
292 #include <pcl/features/impl/narf.hpp>
const float * getSurfacePatch() const
Getter (const) for the surface patch.
Eigen::Affine3f & getTransformation()
Getter for the 6DoF pose.
float & getSurfacePatchRotation()
Getter for the rotation of the surface patch.
void loadBinary(Eigen::MatrixBase< Derived > const &matrix, std::istream &file)
Read a matrix from an input stream.
int getNoOfBeamPoints() const
How many points on each beam of the gradient star are used to calculate the descriptor?
~FeaturePointRepresentation()
Empty destructor.
Eigen::Affine3f transformation_
RangeImage is derived from pcl/PointCloud and provides functionalities with focus on situations where...
const Eigen::Affine3f & getTransformation() const
Getter (const) for the 6DoF pose.
const float & getSurfacePatchWorldSize() const
Getter (const) for the world size of the surface patch.
int & getDescriptorSize()
Getter for the descriptor length.
int & getSurfacePatchPixelSize()
Getter for the pixel size of the surface patch (only one dimension)
float surface_patch_world_size_
const int & getSurfacePatchPixelSize() const
Getter (const) for the pixel size of the surface patch (only one dimension)
void copyToFloatArray(const PointT &p, float *out) const override
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
void saveBinary(const Eigen::MatrixBase< Derived > &matrix, std::ostream &file)
Write a matrix to an output stream.
PointRepresentation provides a set of methods for converting a point structs/object into an n-dimensi...
int surface_patch_pixel_size_
static const std::string getHeaderKeyword()
FeaturePointRepresentation(int nr_dimensions)
A point structure representing an interest point with Euclidean xyz coordinates, and an interest valu...
const Eigen::Vector3f & getPosition() const
Getter (const) for the position.
NARF (Normal Aligned Radial Features) is a point feature descriptor type for 3D data.
Eigen::Vector3f position_
const int & getDescriptorSize() const
Getter (const) for the descriptor length.
void setSurfacePatch(float *surface_patch)
Setter for the surface patch.
PointCloud represents the base class in PCL for storing collections of 3D points. ...
float & getSurfacePatchWorldSize()
Getter for the world size of the surface patch.
const float * getDescriptor() const
Getter (const) for the descriptor.
static int max_no_of_threads
The maximum number of openmp threads that can be used in this class.
const float & getSurfacePatchRotation() const
Getter (const) for the rotation of the surface patch.
float * getSurfacePatch()
Getter for the surface patch.
float surface_patch_rotation_
void setDescriptor(float *descriptor)
Setter for the descriptor.
A point structure representing the Narf descriptor.
Eigen::Vector3f & getPosition()
Getter for the position.
void freeSurfacePatch()
Method to erase the surface patch and free the memory.
float * getDescriptor()
Getter for the descriptor.