mls_smooth — 3D preprocess op

• 数据种类:points → points

• 调用: import fullseye as fs; fs.ledger.mls_smooth(points, radius: 'float', order: 'int' = 2)(要直接调用实现,import pcl_filter; pcl_filter.mls_smooth(points, radius: 'float', order: 'int' = 2);从台账取用则 ops3d.get("mls_smooth"))

用法

把每个点投影到局部多项式曲面上以去噪(Moving Least Squares 平滑)。

对每个点收集半径 radius 内的邻域,用加权 PCA 估计局部平面(法线 n 与切平面的 2 个轴),对邻域的"切平面上坐标 (u,v) → 法线方向高度 h"用高斯加权最小二乘拟合 order 次的多项式曲面。关注点自身对应局部坐标的原点 (0,0), 因此沿法线方向移动拟合曲面在 (0,0) 处的高度(= 常数项), 投影到曲面上。能在保持面形状的同时只平滑传感器噪声。

Parameters

points : array_like, shape (N, 3)

输入点云。

radius : float

邻域球的半径(> 0)。局部曲面的支撑范围。

order : int

局部多项式的次数(默认 2)。项数为 (order+1)(order+2)/2。

Returns

ndarray, shape (N, 3)

平滑后的点云(保持顺序和点数)。邻域少于多项式项数的点保持原位。

Notes

这是近似方法。邻域数少于项数/局部平面退化的点不移动,保持原位(为避免在孔洞和边界处失控的安全措施)。radius <= 0 时 ValueError,空输入返回空。

背景知识指南(该算子背后的物理与约定)

• depth_sensors — 深度传感器知识 —— 测距原理、实机数值、缺测的表现

参考(示例数据、文献)

• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。

• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。

可运行的示例(实际调用该算子并已验证的样例)

• pcl_geodesic — py -3.11 examples_3d/pcl_geodesic.py

类型可衔接的下一个算子(可接受 points 作为输入)

points_to_voxel · gaussians_to_voxel · estimate_point_normals · to_points · match_points_ncc · match_pca · moment_axes · icp_point2point_3d

同类别(preprocess)

statistical_outlier_removal · radius_outlier_removal · voxel_grid_downsample · volume_downsample


*Provenance: pcl_filter.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.