#include<pcl/point_types.h>#include<pcl/features/vfh.h>{pcl::PointCloud<pcl::PointXYZ>::Ptrcloud(newpcl::PointCloud<pcl::PointXYZ>);pcl::PointCloud<pcl::Normal>::Ptrnormals(newpcl::PointCloud<pcl::Normal>());...read,passinorcreateapointcloudwithnormals......(note:youcancreateasinglePointCloud<PointNormal>ifyouwant)...// Create the VFH estimation class, and pass the input dataset+normals to itpcl::VFHEstimation<pcl::PointXYZ,pcl::Normal,pcl::VFHSignature308>vfh;vfh.setInputCloud(cloud);vfh.setInputNormals(normals);// alternatively, if cloud is of type PointNormal, do vfh.setInputNormals (cloud);// Create an empty kdtree representation, and pass it to the FPFH estimation object.// Its content will be filled inside the object, based on the given input dataset (as no other search surface is given).pcl::search::KdTree<pcl::PointXYZ>::Ptrtree(newpcl::search::KdTree<pcl::PointXYZ>());vfh.setSearchMethod(tree);// Output datasetspcl::PointCloud<pcl::VFHSignature308>::Ptrvfhs(newpcl::PointCloud<pcl::VFHSignature308>());// Compute the featuresvfh.compute(*vfhs);// vfhs->points.size () should be of size 1*}