6#include <pcl/features/normal_3d.h>
7#include <pcl/keypoints/sift_keypoint.h>
8#include <pcl/features/fpfh.h>
9#include <pcl/features/vfh.h>
10#include <pcl/search/kdtree.h>
20estimateSurfaceNormals (
const PointCloudPtr & input,
float radius)
24 normal_estimation.setRadiusSearch (radius);
25 normal_estimation.setInputCloud (input);
27 normal_estimation.compute (*normals);
49detectKeypoints (
const PointCloudPtr & points,
const SurfaceNormalsPtr & ,
50 float min_scale,
int nr_octaves,
int nr_scales_per_octave,
float min_contrast)
54 sift_detect.setScales (min_scale, nr_octaves, nr_scales_per_octave);
55 sift_detect.setMinimumContrast (min_contrast);
56 sift_detect.setInputCloud (points);
58 sift_detect.compute (keypoints_temp);
78computeLocalDescriptors (
const PointCloudPtr & points,
const SurfaceNormalsPtr & normals,
79 const PointCloudPtr & keypoints,
float feature_radius)
83 fpfh_estimation.setRadiusSearch (feature_radius);
84 fpfh_estimation.setSearchSurface (points);
85 fpfh_estimation.setInputNormals (normals);
86 fpfh_estimation.setInputCloud (keypoints);
88 fpfh_estimation.compute (*local_descriptors);
90 return (local_descriptors);
102computeGlobalDescriptor (
const PointCloudPtr & points,
const SurfaceNormalsPtr & normals)
106 vfh_estimation.setInputCloud (points);
107 vfh_estimation.setInputNormals (normals);
109 vfh_estimation.compute (*global_descriptor);
111 return (global_descriptor);
128computeFeatures (
const PointCloudPtr & input)
132 features.
normals = estimateSurfaceNormals (input, 0.05);
133 features.
keypoints = detectKeypoints (input, features.
normals, 0.005, 10, 8, 1.5);
Iterator class for point clouds with or without given indices.
search::KdTree is a wrapper class which inherits the pcl::KdTree class for performing search function...
shared_ptr< pcl::search::Search< PointT > > Ptr
void copyPointCloud(const pcl::PointCloud< PointInT > &cloud_in, pcl::PointCloud< PointOutT > &cloud_out)
Copy all the fields from a given point cloud into a new point cloud.
LocalDescriptorsPtr local_descriptors
GlobalDescriptorsPtr global_descriptor
SurfaceNormalsPtr normals