eval_bspline_surface — 3D freeform op

• 数据种类:bspline_surface × image2d × image2d → image2d

• 调用: import fullseye as fs; fs.ledger.eval_bspline_surface(tck, x, y, grid=False)(要直接调用实现,import bspline_surf; bspline_surf.eval_bspline_surface(tck, x, y, grid=False);从台账取用则 ops3d.get("eval_bspline_surface"))

用法

评估已拟合的曲面 tck(bisplev)。两种模式:散点(默认)或网格。

Parameters

tck : list

fit_bspline_surface 返回的 [tx, ty, c, kx, ky]。

x, y : array_like

grid=False(默认):相同 shape 的散布/对应点。在各 (x[i], y[i]) 处求值,

返回与输入相同 shape 的 z(测量=各样本位置处的曲面高度)。

grid=True:将 x, y 视为升序的 1 维轴,在张量网格

(len(x), len(y)) 上求值(用于密集可视化、重采样)。

grid : bool

求值模式。曲面残差等逐点对应的比较用 False。

Returns

z : numpy.ndarray

grid=False 时与 x 同 shape,grid=True 时为 (len(x), len(y))。

Raises

ValueError

tck 不是曲面模型([tx,ty,c,kx,ky])时(包括曲线 tck / 多项式 dict),

或 x, y 的 shape 不一致、为空。

补充:

• grid=True 时在内部将 x, y 按升序排序后调用 bisplev,结果恢复为输入的顺序返回。因此 out[i, j] 始终是 (x[i], y[j]) 处的值,即使按降序传入轴也不会出错。

• grid=False 是逐点调用 bisplev 的 Python 循环,因此速度与点数成比例地变慢。大量点的求值尽可能改用 grid=True。

• 节点范围(拟合所用 x, y 的范围)之外为外推,其值不作保证。

• 返回值为 float64。grid=False 时与 x 同 shape(传入标量则为 0 维数组)。

• 典型:fit_bspline_surface → 本 op(重采样、可视化)。残差评估由 surface_residual 在内部调用本 op。

参考(示例数据、文献)

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

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

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

• bspline_freeform — py -3.11 examples_3d/bspline_freeform.py

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

fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · background_flatten · polar_unwrap · fit_zernike · matcap_shade

同类别(freeform)

fit_bspline_surface · surface_residual · fit_bspline_curve · eval_bspline_curve


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

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