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.