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

你可能感兴趣的文章
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'
查看>>
org.hibernate.HibernateException: Unable to get the default Bean Validation factory
查看>>
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
查看>>
org.springframework.amqp.AmqpConnectException:java.net.ConnectException:Connection timed out:connect
查看>>
org.springframework.beans.factory.BeanDefinitionStoreException
查看>>
org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
查看>>
org.springframework.boot:spring boot maven plugin丢失---SpringCloud Alibaba_若依微服务框架改造_--工作笔记012
查看>>
SQL-CLR 类型映射 (LINQ to SQL)
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
查看>>
org.springframework.web.multipart.MaxUploadSizeExceededException: Maximum upload size exceeded
查看>>
org.tinygroup.serviceprocessor-服务处理器
查看>>
org/eclipse/jetty/server/Connector : Unsupported major.minor version 52.0
查看>>
org/hibernate/validator/internal/engine
查看>>