surface_fit opimage2d → image2dimport fullseye as fs; fs.ledger.background_flatten(image, degree=2) (実装を直接呼ぶなら import match3d; match3d.background_flatten(image, degree=2)、台帳から引くなら ops3d.get("background_flatten"))画像の低次曲面(照明ムラ)をフィット減算=シェーディング補正。→ flattened。
(H,W) 画像に x = 列、y = 行 で fit_poly_surface(degree)(既定 2 次)を当て、
image − fit を float64 で返す。出力は平均がほぼ 0 で 負の値を含む(表示・閾値化には
min を引くか定数を足す)。前景が広いと前景もフィットに引かれて削られる(前景を除いた点で
fit_poly_surface → eval_poly_surface で減算する方が安全)。
グレースケール 2-D のみ(3-D は失敗)。NaN があると lstsq が失敗する。
用途: 閾値化の前処理、polar_unwrap した円環画像の照明補正。
py -3.11 examples_3d/geometry_metrology.pyimage2d を入力に取れる)fuse_to_voxel · fit_poly_surface · eval_poly_surface · surface_form_error · polar_unwrap · fit_zernike · matcap_shade · antialias
surface_fit)fit_poly_surface · eval_poly_surface · surface_form_error
Provenance: match3d.py — 3D operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.