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

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

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

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

    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);

实验结果如下:

iss关键点
在这里插入图片描述

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

    template<>
    struct SIFTKeypointFieldSelector<PointXYZ>
    {
        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<pcl::PointXYZ, pcl::PointWithScale > sift_src;
    pcl::PointCloud<pcl::PointWithScale> result_src;
    pcl::search::KdTree<pcl::PointXYZ>::Ptr tree_src(new pcl::search::KdTree<pcl::PointXYZ>());
    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);

结果如下
sift

在这里插入图片描述

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

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小修勾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值