41#include <pcl/features/feature.h>
73 template <
typename Po
intInT,
typename Po
intOutT = GASDSignature512>
108 view_direction_ =
dir;
117 shape_half_grid_size_ =
shgs;
128 shape_hists_size_ =
shs;
143 const Eigen::Matrix4f&
191 std::vector<Eigen::VectorXf> &
hists);
202 Eigen::Matrix4f transform_;
205 Eigen::Vector3f view_direction_;
208 std::size_t shape_half_grid_size_;
211 std::size_t shape_hists_size_;
218 computeAlignmentTransform ();
228 copyShapeHistogramsToOutput (
const std::size_t
grid_size,
230 const std::vector<Eigen::VectorXf> &
hists,
255 template <
typename Po
intInT,
typename Po
intOutT = GASDSignature984>
293 color_half_grid_size_ =
chgs;
302 color_hists_size_ =
chs;
328 std::size_t color_half_grid_size_;
331 std::size_t color_hists_size_;
344 copyColorHistogramsToOutput (
const std::size_t
grid_size,
346 std::vector<Eigen::VectorXf> &
hists,
359#ifdef PCL_NO_PRECOMPILE
360#include <pcl/features/impl/gasd.hpp>
Iterator class for point clouds with or without given indices.
Feature represents the base feature class.
const std::string & getClassName() const
Get a string representation of the name of this class.
pcl::PointCloud< PointOutT > PointCloudOut
double search_radius_
The nearest neighbors search radius for each point.
int k_
The number of K nearest neighbors to use for each point.
std::string feature_name_
The feature name.
PointCloudInConstPtr surface_
An input point cloud describing the surface that is to be used for nearest neighbors estimation.
GASDColorEstimation estimates the Globally Aligned Spatial Distribution (GASD) descriptor for a given...
void setColorHistsInterpMethod(const HistogramInterpolationMethod interp)
Set the color histograms interpolation method.
void setColorHistsSize(const std::size_t chs)
Set the color histograms size (number of bins in the hue histogram for each cell of the 3D regular gr...
void setColorHalfGridSize(const std::size_t chgs)
Set the color half grid size.
GASDColorEstimation(const Eigen::Vector3f &view_direction=Eigen::Vector3f(0.0f, 0.0f, 1.0f), const std::size_t shape_half_grid_size=3, const std::size_t shape_hists_size=1, const std::size_t color_half_grid_size=2, const std::size_t color_hists_size=12, const HistogramInterpolationMethod shape_interp=INTERP_NONE, const HistogramInterpolationMethod color_interp=INTERP_NONE)
Constructor.
GASDEstimation estimates the Globally Aligned Spatial Distribution (GASD) descriptor for a given poin...
std::size_t pos_
Current position of output descriptor point cloud.
GASDEstimation(const Eigen::Vector3f &view_direction=Eigen::Vector3f(0.0f, 0.0f, 1.0f), const std::size_t shape_half_grid_size=4, const std::size_t shape_hists_size=1, const HistogramInterpolationMethod shape_interp=INTERP_TRILINEAR)
Constructor.
float max_coord_
Normalization factor with respect to axis-aligned bounding cube centered on the origin.
void computeFeature(PointCloudOut &output) override
Estimate GASD descriptor.
void setShapeHistsSize(const std::size_t shs)
Set the shape histograms size.
void setShapeHistsInterpMethod(const HistogramInterpolationMethod interp)
Set the shape histograms interpolation method.
PointCloudIn shape_samples_
Point cloud aligned to the canonical coordinate system.
float hist_incr_
Normalized sample contribution with respect to the total number of points in the cloud.
const Eigen::Matrix4f & getTransform() const
Returns the transformation aligning the point cloud to the canonical coordinate system.
void setShapeHalfGridSize(const std::size_t shgs)
Set the shape half grid size.
void compute(PointCloudOut &output)
Overloaded computed method from pcl::Feature.
void addSampleToHistograms(const Eigen::Vector4f &p, const float max_coord, const std::size_t half_grid_size, const HistogramInterpolationMethod interp, const float hbin, const float hist_incr, std::vector< Eigen::VectorXf > &hists)
add a sample to its respective histogram, optionally performing interpolation.
void setViewDirection(const Eigen::Vector3f &dir)
Set the view direction.
IndicesPtr indices_
A pointer to the vector of point indices to use.
HistogramInterpolationMethod
Different histogram interpolation methods.
@ INTERP_NONE
no interpolation
@ INTERP_QUADRILINEAR
quadrilinear interpolation
@ INTERP_TRILINEAR
trilinear interpolation