博客
关于我
【点云StatisticalOutlierFilter】python-pcl:去除离群点
阅读量:204 次
发布时间:2019-02-28

本文共 779 字,大约阅读时间需要 2 分钟。

点云去除离群点

方法:使用K近邻方法进行点云处理,通过计算标准距离筛选离群点。具体实现如下:

原理:K近邻算法用于确定每个点的邻近点数,计算标准距离。设置离群点的标准为距离超过标准距离乘以系数后的点数。

结果:将点云分为内点和离群点两部分。通过设置参数,可选保存离群点或保留内点的点云文件。

官方示例效果表现为:通过去除柱子腿周围的离散点,显著清洁了点云数据。

注意:在实际应用中,点云密度较大时,效果可能会受到影响,建议根据具体需求调整参数。

import pcldef main():    # 加载点云数据    p = pcl.load("D:/tests/tutorials/table_scene_lms400.pcd")        # 初始化滤镜并设置参数    fil = p.make_statistical_outlier_filter()    fil.set_mean_k(50)  # 设置近邻点数    fil.set_std_dev_mul_thresh(1.0)  # 设置标准差倍数        # 过滤并保存内点    inlier_cloud = fil.filter()    pcl.save(inlier_cloud, "D:/tests/tutorials/table_scene_lms400_inliers.pcd")        # 设置保存离群点    fil.set_negative(True)    outlier_cloud = fil.filter()    pcl.save(outlier_cloud, "D:/tests/tutorials/table_scene_lms400_outliers.pcd")if __name__ == "__main__":    main()

转载地址:http://oaai.baihongyu.com/

你可能感兴趣的文章
Nmap端口扫描工具Windows安装和命令大全(非常详细)零基础入门到精通,收藏这篇就够了
查看>>
NMAP网络扫描工具的安装与使用
查看>>
NMF(非负矩阵分解)
查看>>
nmon_x86_64_centos7工具如何使用
查看>>
NN&DL4.1 Deep L-layer neural network简介
查看>>
NN&DL4.3 Getting your matrix dimensions right
查看>>
NN&DL4.8 What does this have to do with the brain?
查看>>
nnU-Net 终极指南
查看>>
No 'Access-Control-Allow-Origin' header is present on the requested resource.
查看>>
NO 157 去掉禅道访问地址中的zentao
查看>>
no available service ‘default‘ found, please make sure registry config corre seata
查看>>
no connection could be made because the target machine actively refused it.问题解决
查看>>
No Datastore Session bound to thread, and configuration does not allow creation of non-transactional
查看>>
No fallbackFactory instance of type class com.ruoyi---SpringCloud Alibaba_若依微服务框架改造---工作笔记005
查看>>
No Feign Client for loadBalancing defined. Did you forget to include spring-cloud-starter-loadbalanc
查看>>
No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
查看>>
No mapping found for HTTP request with URI [/logout.do] in DispatcherServlet with name 'springmvc'
查看>>
No module named 'crispy_forms'等使用pycharm开发
查看>>
No module named cv2
查看>>
No module named tensorboard.main在安装tensorboardX的时候遇到的问题
查看>>