PCL KdTree 最近邻 点 间距
发布时间
阅读量:
阅读量
#include <pcl/point_types.h>
#include <pcl/kdtree/kdtree_flann.h>
#include <iostream>
#include <vector>
#include <ctime>
#include <math.h>
int
main(int argc, char** argv)
{
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>());
cloud->width = 100;
cloud->height = 1;
cloud->resize(cloud->width * cloud->height);
for (std::size_t i = 0; i < cloud->size(); i++)
{
(*cloud)[i].x = 1024 * rand() / (RAND_MAX + 1.0f);
(*cloud)[i].y = 1024 * rand() / (RAND_MAX + 1.0f);
全部评论 (0)
还没有任何评论哟~
