surface_fit op• 数据种类:image2d → measurement
• 调用: import fullseye as fs; fs.ledger.surface_form_error(height, degree=1)(要直接调用实现,import match3d; match3d.surface_form_error(height, degree=1);从台账取用则 ops3d.get("surface_form_error"))
• 经台账调用的返回值: fullseye.ledger.surface_form_error(...) 只返回声明的 out 类型 measurement 的值(底层函数还会返回辅助信息)。需要被丢弃的部分时,使用 fullseye.ledger.surface_form_error.raw(...),或直接调用 match3d.surface_form_error。
• 底层返回: (residual, rms, pv) → pv float
高度场 grid → 相对理想曲面(多项式)的残差=形状误差(平面度 deg1/球面度 deg2)。→ (residual, rms, pv)。
对 (H,W) 的高度场以 x = 列 index、y = 行 index 拟合 fit_poly_surface(degree), 返回 residual = height − fit。degree=1 为最小二乘平面(平面度=pv),degree=2 为 2 次曲面(球面的近似,不是真正的球)。返回值 (residual (H,W) float64, rms, pv),单位为高度的单位(横向为像素单位,因此倾斜系数为"高度/像素")。存在 NaN 时 lstsq 会失败(请先填补缺失)。非 2-D 的输入会在形状 unpack 时失败。
用途: 评估平面度、波纹度。background_flatten 是同一计算的"图像版"。点云的平面度用 fit_plane_3d 的 resid。
• blas_threads_and_memory — 矩阵分解为何慢 —— BLAS 线程、缓存、内存布局
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• geometry_metrology — py -3.11 examples_3d/geometry_metrology.py
measurement 作为输入)vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle
surface_fit)fit_poly_surface · eval_poly_surface · background_flatten
*Provenance: match3d.py — 3D 算子登记表。本条目由 tools/opdocs.py md 自动生成(请勿手工编辑)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.