descriptor opmatrix → tableimport fullseye as fs; fs.ledger.contour_fourier_truncation_energy(spectrum, orders=None) (実装を直接呼ぶなら import fourierdesc; fourierdesc.contour_fourier_truncation_energy(spectrum, orders=None)、台帳から引くなら opsshape2d.get("contour_fourier_truncation_energy"))打ち切り次数ごとの予言される誤差(table)—— パーセバルの厳密式。
次数 K で打ち切った再構成 z^K について、標本上の二乗平均誤差は
mean|z - z^K|^2 = Σ_{|k| > K} |c_k|^2 に厳密に等しい。だから
再構成を 1 度もせずに「何項あれば何画素まで似るか」を先に言える。
★予言が厳密なのは、係数列が完全なときだけである(contour_fourier_complex
を n_harmonics=None で呼んだ場合)。打ち切った係数列を渡されると、
捨てられた側のエネルギーは知りようがないので、返る誤差は下界になる
—— 過小に見える誤差を「厳密」と言わないために、ここに書いておく。
返り値: dict(table)
“order”: 打ち切り次数 K の 1-D
“rms_error”: 予言される rms 誤差[入力の単位]
“energy_fraction”: 残した項が担うエネルギーの割合(0..1、単調増加)
“total_energy”: Σ_{k≠0} |c_k|^2(位置 c_0 を除いた形のエネルギー)
“k_max”: スペクトルが持つ最大次数
py -3.11 examples/poc_one_stroke_epicycles.pytable を入力に取れる)descriptor)elliptic_fourier · reconstruct · invariants · normalize · descriptor_distance · fourier_smooth · from_xld · contour_fourier_complex
Provenance: fourierdesc.py — SHAPE2D operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.