Point Cloud Library (PCL)
1.10.1
|
41 #include <pcl/features/feature.h>
43 #include <pcl/point_cloud.h>
75 template <
typename Po
intInT,
typename Po
intOutT = GASDSignature512>
90 GASDEstimation (
const Eigen::Vector3f &view_direction = Eigen::Vector3f (0.0f, 0.0f, 1.0f),
91 const std::size_t shape_half_grid_size = 4,
92 const std::size_t shape_hists_size = 1,
94 view_direction_ (view_direction),
95 shape_half_grid_size_ (shape_half_grid_size),
96 shape_hists_size_ (shape_hists_size),
97 shape_interp_ (shape_interp)
110 view_direction_ = dir;
119 shape_half_grid_size_ = shgs;
130 shape_hists_size_ = shs;
139 shape_interp_ = interp;
145 const Eigen::Matrix4f&
188 const float max_coord,
189 const std::size_t half_grid_size,
192 const float hist_incr,
193 std::vector<Eigen::VectorXf> &hists);
204 Eigen::Matrix4f transform_;
207 Eigen::Vector3f view_direction_;
210 std::size_t shape_half_grid_size_;
213 std::size_t shape_hists_size_;
220 computeAlignmentTransform ();
230 copyShapeHistogramsToOutput (
const std::size_t grid_size,
231 const std::size_t hists_size,
232 const std::vector<Eigen::VectorXf> &hists,
257 template <
typename Po
intInT,
typename Po
intOutT = GASDSignature984>
275 const std::size_t shape_half_grid_size = 3,
276 const std::size_t shape_hists_size = 1,
277 const std::size_t color_half_grid_size = 2,
278 const std::size_t color_hists_size = 12,
281 GASDEstimation<PointInT, PointOutT> (view_direction, shape_half_grid_size, shape_hists_size, shape_interp),
282 color_half_grid_size_ (color_half_grid_size),
283 color_hists_size_ (color_hists_size),
284 color_interp_ (color_interp)
295 color_half_grid_size_ = chgs;
304 color_hists_size_ = chs;
313 color_interp_ = interp;
330 std::size_t color_half_grid_size_;
333 std::size_t color_hists_size_;
346 copyColorHistogramsToOutput (
const std::size_t grid_size,
347 const std::size_t hists_size,
348 std::vector<Eigen::VectorXf> &hists,
361 #ifdef PCL_NO_PRECOMPILE
362 #include <pcl/features/impl/gasd.hpp>
This file defines compatibility wrappers for low level I/O functions.
shared_ptr< Feature< PointInT, PointOutT > > Ptr
float hist_incr_
Normalized sample contribution with respect to the total number of points in the cloud.
void setShapeHalfGridSize(const std::size_t shgs)
Set the shape half grid size.
GASDEstimation estimates the Globally Aligned Spatial Distribution (GASD) descriptor for a given poin...
std::size_t pos_
Current position of output descriptor point cloud.
void compute(PointCloudOut &output)
Overloaded computed method from pcl::Feature.
void setColorHistsInterpMethod(const HistogramInterpolationMethod interp)
Set the color histograms interpolation method.
void setShapeHistsInterpMethod(const HistogramInterpolationMethod interp)
Set the shape histograms interpolation method.
shared_ptr< const Feature< PointInT, PointOutT > > ConstPtr
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.
const Eigen::Matrix4f & getTransform() const
Returns the transformation aligning the point cloud to the canonical coordinate system.
void setShapeHistsSize(const std::size_t shs)
Set the shape histograms size.
double search_radius_
The nearest neighbors search radius for each point.
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.
float max_coord_
Normalization factor with respect to axis-aligned bounding cube centered on the origin.
quadrilinear interpolation
void computeFeature(PointCloudOut &output) override
Estimate GASD descriptor.
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...
int k_
The number of K nearest neighbors to use for each point.
GASDColorEstimation estimates the Globally Aligned Spatial Distribution (GASD) descriptor for a given...
pcl::PointCloud< PointOutT > PointCloudOut
void setViewDirection(const Eigen::Vector3f &dir)
Set the view direction.
HistogramInterpolationMethod
Different histogram interpolation methods.
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.
std::string feature_name_
The feature name.
void setColorHalfGridSize(const std::size_t chgs)
Set the color half grid size.
PointCloudIn shape_samples_
Point cloud aligned to the canonical coordinate system.
boost::shared_ptr< T > shared_ptr
Alias for boost::shared_ptr.
Feature represents the base feature class.