freeform op• Datenarten: image2d × image2d × image2d → bspline_surface
• Aufruf: import fullseye as fs; fs.ledger.fit_bspline_surface(x, y, z, kx=3, ky=3, smooth=None) (die Implementierung direkt: import bspline_surf; bspline_surf.fit_bspline_surface(x, y, z, kx=3, ky=3, smooth=None); aus dem Register: ops3d.get("fit_bspline_surface"))
Passt per kleinster Quadrate eine (standardmäßig bikubische) B-Spline-Fläche an verstreute (x, y, z) an (bisplrep).
> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.
Parameters
----------
x, y, z : array_like
同数の散布サンプル座標と高さ。任意形状で与えてよく内部で 1 次元化する。
kx, ky : int
x/y 方向の B スプライン次数(1=線形, 3=三次)。点数が (kx+1)*(ky+1) に
満たない場合は自動で下げる(縮退回避)。
smooth : float or None
平滑化係数 s。None は点数ベースの自動値(`_auto_surface_smooth`)。
0.0 で全点通過(補間寄り=過適合しやすい)、大きいほど滑らか。
Returns
-------
tck : list
`[tx, ty, c, kx, ky]`。eval_bspline_surface / surface_residual に渡す。
Raises
------
ValueError
点数が線形曲面にすら足りない(m<4)、x/y/z の長さ不一致、非有限値、
あるいは共線・重複による FITPACK 縮退で近似が得られない場合。
補足(実装の裏取り):
• 座標系は自由: x, y は任意の平面座標(row/col でも実寸でも可)、z は高さ。3 配列は `ravel` で 1 次元化するので格子入力でも散布入力でも同じに扱う。
• 次数の自動降格は `(kx+1)*(ky+1) > m の間、大きい方(同点なら kx)を 1 ずつ下げ、両方 1 になったら止まる。降格は例外でなく無言で行われるので、実際の次数は返り値 tck[3], tck[4]` で確認できる。
• `smooth=None の自動値は max(0, m - sqrt(2m))(FITPACK の推奨)。z のノイズ分散が 1 相当という前提の式なので、z の単位が小さく残差二乗和が小さいデータでは過平滑になりやすい。その場合は明示的に小さい smooth` を渡す。
• FITPACK の警告(反復打ち切り等)は握り潰して tck を返す。例外はすべて `ValueError に翻訳し、係数が空のときも ValueError`。
• 決定論的(乱数なし)。
• 後段は `eval_bspline_surface(評価)と surface_residual(逸脱量)。大域的な低次のうねりだけで良ければ fit_poly_surface / eval_poly_surface` があるが、tck と多項式 dict は互換でない。
• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).
• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.
• bspline_freeform — py -3.11 examples_3d/bspline_freeform.py
bspline_surface als Eingabe)fuse_to_voxel · eval_bspline_surface · surface_residual
freeform)eval_bspline_surface · surface_residual · fit_bspline_curve · eval_bspline_curve
*Provenance: bspline_surf.py — 3D Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.