fit_circle_xld — SHAPE2D descriptor op

• Data kinds: contour → table

• Call: import fullseye as fs; fs.ledger.fit_circle_xld(contour, method='geometric') (to call the implementation directly, import fourierdesc; fourierdesc.fit_circle_xld(contour, method='geometric'); from the registry, opsshape2d.get("fit_circle_xld"))

• GPU: none (CPU reference implementation only)

Usage

Fit a circle to each XLD contour and return its centre row, column and radius (table).

> The detailed description below is the original text — the summary and the headings are translated.

HALCON fit_circle_contour_xld の Row / Column / Radius にあたる。進化 op の hx_fit_circle_contour は残差(正規化 feature)しか返さないので、輪郭から 位置と大きさを読むのはこちら。座標は XLD と同じ (row, col)、単位は画素。

method は "geometric"(既定。点から円までの距離の二乗和を Levenberg--Marquardt で最小化、Chernov & Lesort 2005 = measure.fit_circle_geometric) か "algebraic"(Kåsa / Coope の代数的最小二乗 = measure.fit_circle。短い円弧では半径が小さく偏る)。返す dict の row・col・radius・rms (点の動径残差の二乗平均平方根)・n_points は輪郭の並び順の list で、n_contours が当てた本数、n_skipped が点が 3 個未満で飛ばした本数、method が使った方法。

空の入力(contour が 0 要素 = 輪郭が 1 本も無い)は ValueError。拒否(ValueError): XLD の dict({"shape", "cs"})でない、未知の method、点が 3 個以上ある輪郭が 1 本も無い、非有限の座標、点が一直線に並ぶ(円が決まらない)。

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)

• fit_circle_xld_bore — py -3.11 examples/fit_circle_xld_bore.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.