39#ifndef PCL_FEATURES_IMPL_GRSD_H_
40#define PCL_FEATURES_IMPL_GRSD_H_
42#include <pcl/features/grsd.h>
43#include <pcl/features/rsd.h>
45template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
int
64template <
typename Po
intInT,
typename Po
intNT,
typename Po
intOutT>
void
70 PCL_ERROR (
"[pcl::%s::computeFeature] A voxel cell width needs to be set!\n", getClassName ().
c_str ());
79 grid.setLeafSize (width_, width_, width_);
80 grid.setInputCloud (input_);
81 grid.setSaveLeafLayout (
true);
88 rsd.setSearchSurface (input_);
89 rsd.setInputNormals (normals_);
90 rsd.setRadiusSearch (std::max (search_radius_, std::sqrt (3.0) * width_ / 2));
96 std::transform(
radii->points.cbegin (),
radii->points.cend (),
types.begin (),
97 [](
const auto& point) {
99 return GRSDEstimation<PointInT, PointNT, PointOutT>::getSimpleType(point.r_min, point.r_max); });
106 std::vector<int> neighbors =
grid.getNeighborCentroidIndices ((*
cloud_downsampled)[idx], relative_coordinates_all_);
107 for (
const int &neighbor : neighbors)
120 for (
int i = 0; i <
NR_CLASS + 1; i++)
121 for (
int j = i; j <
NR_CLASS + 1; j++)
125#define PCL_INSTANTIATE_GRSDEstimation(T,NT,OutT) template class PCL_EXPORTS pcl::GRSDEstimation<T,NT,OutT>;
Iterator class for point clouds with or without given indices.
std::size_t size() const
Size of the range the iterator is going through.
typename Feature< PointInT, PointOutT >::PointCloudIn PointCloudIn
static int getSimpleType(float min_radius, float max_radius, double min_radius_plane=0.100, double max_radius_noise=0.015, double min_radius_cylinder=0.175, double max_min_radius_diff=0.050)
Get the type of the local surface based on the min and max radius computed.
void computeFeature(PointCloudOut &output) override
Estimate the Global Radius-based Surface Descriptor (GRSD) for a set of points given by <setInputClou...
typename Feature< PointInT, PointOutT >::PointCloudOut PointCloudOut
typename Feature< PointInT, PointOutT >::PointCloudInPtr PointCloudInPtr
shared_ptr< PointCloud< PointT > > Ptr