contour_fourier_truncation_energy — SHAPE2D descriptor op

• Data kinds: matrix → table

• Call: import fullseye as fs; fs.ledger.contour_fourier_truncation_energy(spectrum, orders=None) (to call the implementation directly, import fourierdesc; fourierdesc.contour_fourier_truncation_energy(spectrum, orders=None); from the registry, opsshape2d.get("contour_fourier_truncation_energy"))

Usage

The predicted error for each truncation order (table) — Parseval's exact formula.

For the reconstruction z^K truncated at order K, the mean squared error over the samples is exactly equal to mean|z - z^K|^2 = Σ_{|k| > K} |c_k|^2. Hence you can say in advance "how many terms make it resemble to how many pixels" without doing the reconstruction even 1 time.

★The prediction is exact only when the coefficient sequence is complete (when contour_fourier_complex was called with n_harmonics=None). If a truncated coefficient sequence is passed, the energy of the discarded part cannot be known, so the returned error is a lower bound —— this is written here so that an error that looks too small is not called "exact".

Returns: dict (table)

"order": 1-D of truncation orders K

"rms_error": predicted rms error [units of the input]

"energy_fraction": fraction of energy carried by the kept terms (0..1, monotonically increasing)

"total_energy": Σ_{k≠0} |c_k|^2 (shape energy excluding the position c_0)

"k_max": the highest order the spectrum holds

Detailed usage guide

• shape_description_2d family guide

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_one_stroke_epicycles — py -3.11 examples/poc_one_stroke_epicycles.py

Ops the type connects to (they accept table as input)

from_xld

Same category (descriptor)

elliptic_fourier · reconstruct · invariants · normalize · descriptor_distance · fourier_smooth · from_xld · contour_fourier_complex


*Provenance: fourierdesc.py — SHAPE2D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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