博客
关于我
【点云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/

你可能感兴趣的文章
Static--用法介绍
查看>>
ssm旅游信息管理系统的设计与实现bus56(程序+开题)
查看>>
order by rand()
查看>>
SSM(Spring+SpringMvc+Mybatis)整合开发笔记
查看>>
ViewHolder的改进写法
查看>>
Orderer节点启动报错解决方案:Not bootstrapping because of 3 existing channels
查看>>
org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException: Unexpected subelement profile
查看>>
sql查询中 查询字段数据类型 int 与 String 出现问题
查看>>
org.apache.commons.beanutils.BasicDynaBean cannot be cast to ...
查看>>
org.apache.dubbo.common.serialize.SerializationException: com.alibaba.fastjson2.JSONException: not s
查看>>
sqlserver学习笔记(三)—— 为数据库添加新的用户
查看>>
org.apache.http.conn.HttpHostConnectException: Connection to refused
查看>>
org.apache.ibatis.binding.BindingException: Invalid bound statement错误一例
查看>>
org.apache.ibatis.exceptions.PersistenceException:
查看>>
org.apache.ibatis.exceptions.TooManyResultsException: Expected one result (or null) to be returned
查看>>
org.apache.ibatis.type.TypeException: Could not resolve type alias 'xxxx'异常
查看>>
org.apache.poi.hssf.util.Region
查看>>
org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
查看>>
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /
查看>>
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugManifest'
查看>>