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

你可能感兴趣的文章
NotImplementedError: Cannot copy out of meta tensor; no data! Please use torch.nn.Module.to_empty()
查看>>
NotImplementedError: Could not run torchvision::nms
查看>>
nova基于ubs机制扩展scheduler-filter
查看>>
Now trying to drop the old temporary tablespace, the session hangs.
查看>>
nowcoder—Beauty of Trees
查看>>
np.arange()和np.linspace()绘制logistic回归图像时得到不同的结果?
查看>>
np.power的使用
查看>>
NPM 2FA双重认证的设置方法
查看>>
npm build报错Cannot find module ‘webpack/lib/rules/BasicEffectRulePlugin‘解决方法
查看>>
npm build报错Cannot find module ‘webpack‘解决方法
查看>>
npm ERR! ERESOLVE could not resolve报错
查看>>
npm ERR! fatal: unable to connect to github.com:
查看>>
npm ERR! Unexpected end of JSON input while parsing near '...on":"0.10.3","direc to'
查看>>
npm ERR! Unexpected end of JSON input while parsing near ‘...“:“^1.2.0“,“vue-html-‘ npm ERR! A comp
查看>>
npm error Missing script: “server“npm errornpm error Did you mean this?npm error npm run serve
查看>>
npm error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”。要解决此问题,1) 安装
查看>>
npm install CERT_HAS_EXPIRED解决方法
查看>>
npm install digital envelope routines::unsupported解决方法
查看>>
npm install 卡着不动的解决方法
查看>>
npm install 报错 EEXIST File exists 的解决方法
查看>>