estimate_normals — 3D curvature op

• 数据种类:points → normals

• 调用: import fullseye as fs; fs.ledger.estimate_normals(points, k=25)(要直接调用实现,import curvature3d; curvature3d.estimate_normals(points, k=25);从台账取用则 ops3d.get("estimate_normals"))

用法

统一朝外(远离邻域重心)的点云法线。→ (N,3)。

步骤(每个点,Python 循环): 用 cKDTree 取包含自身在内的 k+1 个邻域点(k 截断为 N-1),以查询点为原点的邻域坐标散布矩阵 local.T @ local 的最小特征向量作为法线(单位长度)。朝向为"与邻域质心的内积为正则翻转"= 统一到远离邻域质心的一侧。

• 邻域少于 5 个点的点返回固定值 (0, 0, 1)(未进行估计)。

• 朝向是局部启发式,对闭合凸形状朝外,但在开放曲面、薄板、凹部,相邻点之间的朝向可能不一致(不保证全局一致性)。若要全局统一,请通过 orient_normals,或从一开始就使用 estimate_oriented_normals。对于 organized 深度图像,normals_from_depth 以视点朝向且更快。

• 返回值为 float64 (N,3)。k 默认 25。确定性。

• 内部经过与 principal_curvatures 相同的计算(法线估计也会执行到二次曲面拟合),因此点数多时较慢。

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

• blas_threads_and_memory — 矩阵分解为何慢 —— BLAS 线程、缓存、内存布局

参考(示例数据、文献)

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

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

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

• cylinder_axis_metrology — py -3.11 examples_3d/cylinder_axis_metrology.py

• feature_register — py -3.11 examples_3d/feature_register.py

• oriented_normals — py -3.11 examples_3d/oriented_normals.py

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

icp_point2plane · compute_fpfh · shot_descriptor · fuse_to_voxel · reflect · refract · normal_consistency · ransac_cylinder

同类别(curvature)

principal_curvatures · mean_curvature · gaussian_curvature · shape_index


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

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