geometry op• 数据种类:points → primitive
• 调用: import fullseye as fs; fs.ledger.fit_line_3d(points)(要直接调用实现,import match3d; match3d.fit_line_3d(points);从台账取用则 ops3d.get("fit_line_3d"))
点群 → 最小二乘直线(过重心,方向=最大主轴)。返回 (point, direction)。
返回 (N,3) 点云(非数值或列数不为 3 则 ValueError,不足 2 点也 ValueError)的质心 c 和散布矩阵 (P−c)ᵀ(P−c) 最大特征值的特征向量(使正交距离平方和最小的直线。不是 z=f(x) 型回归)。direction 为单位向量,符号任意(取决于 eigh。若要统一方向,按 (P[-1] − P[0]) @ direction 的符号翻转)。只有 2 点时为通过这 2 点的直线。点呈平面状分布时,最大轴只是“最长的方向”, 不一定是直线(不返回残差,请用 distance_point_line 确认)。对离群值敏感(稳健做法用 ransac_line)。仅限 3-D(2-D 点则 ValueError)。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py
primitive 作为输入)fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment
geometry)line_from_2points · plane_from_3points · angle_3points · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line
*Provenance: match3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.