PCL-描述子-USC
USC描述子建立
1.原始点云
变量声明,为了对场景和模型做匹配,设计了1,2两个变量。
pcl::PointCloud<PointType> cloud1, cloud2;
pcl::PointCloud<NormalType> cloud1_normals, cloud2_normals;
pcl::PointCloud<PointType> cloud1_keypoints, cloud2_keypoints;
pcl::PointCloud<pcl::UniqueShapeContext1960> cloud1_usc, cloud2_usc;
2.提取关键点
体素和均匀采样速度较快
void compute_filters_voxel_grid(float leaf_size)
{
pcl::VoxelGrid<PointType> voxel_grid;
voxel_grid.setLeafSize(leaf_size, leaf_size, leaf_size);
voxel_grid.setInputCloud(cloud1.makeShared());
voxel_grid.filter(cloud1_keypoints);
voxel_grid.