点云关键点——(1)几种关键点提取

点云配准中,有时候点云数量太大,需要进行关键点提取,下面介绍几种点云pcl中点云关键点提取算法。

一、iss关键点提取
iss关键点的具体原理可以查看相关论文,下面主要参数设置如下:

   //iss关键点提取
    PointCloud::Ptr cloud_src_is(new PointCloud);
    //pcl::PointCloud::Ptr model_keypoint(new pcl::PointCloud());
    pcl::ISSKeypoint3D iss_det;
    pcl::search::KdTree::Ptr tree_1(new pcl::search::KdTree());

    double model_solution = 0.4;//参数小,采取的关键点多,论文中为500左右

    //参数设置
    iss_det.setSearchMethod(tree_1);
    iss_det.setSalientRadius(2.4);//
    iss_det.setNonMaxRadius(1.6);//
    iss_det.setThreshold21(0.975);
    iss_det.setThreshold32(0.975);
    iss_det.setMinNeighbors(5);
    iss_det.setNumberOfThreads(4);
    iss_det.setInputCloud(cloud_src_o);
    iss_det.compute(*cloud_src_is);

实验结果如下:

点云关键点——(1)几种关键点提取_第1张图片
在这里插入图片描述

二、sift关键点提取
因为sift关键点需要返回强度信息,所以开始时设置:

    template<>
    struct SIFTKeypointFieldSelector
    {
        inline float
            operator () (const PointXYZ &p) const
        {
            return p.z;
        }
    };
}

主要参数设置如下:

    //设定参数值
    const float min_scale = 0.002f; //the standard deviation of the smallest scale in the scale space
    const int n_octaves = 3;//尺度空间层数,小、关键点多
    const int n_scales_per_octave = 3;//the number of scales to compute within each octave
    const float min_contrast = 0.0001f;//根据点云,设置大小,越小关键点越多

    //sift关键点检测
    pcl::SIFTKeypoint sift_src;
    pcl::PointCloud result_src;
    pcl::search::KdTree::Ptr tree_src(new pcl::search::KdTree());
    sift_src.setSearchMethod(tree_src);
    sift_src.setScales(min_scale, n_octaves, n_scales_per_octave);
    sift_src.setMinimumContrast(min_contrast);
    sift_src.setInputCloud(cloud_src_o);
    sift_src.compute(result_src);

结果如下
点云关键点——(1)几种关键点提取_第2张图片

点云关键点——(1)几种关键点提取_第3张图片

具体实现代码放在下面链接:
https://download.csdn.net/download/weixin_43236944/11103022

你可能感兴趣的:(PCL点云学习)