fit_ellipsoid — 3D robust_fit op

Data kinds: pointsprimitive

Call: import fullseye as fs; fs.ledger.fit_ellipsoid(points) -> 'dict' (to call the implementation directly, import fit_primitives_ext; fit_primitives_ext.fit_ellipsoid(points) -> 'dict'; from the registry, ops3d.get("fit_ellipsoid"))

Usage

Algebraically fit a triaxial ellipsoid of arbitrary pose to a point set and return `{center, axes, radii, residual}`.

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

一般二次曲面 `xᵀA x + b·x + c = 0 を、楕円体を保証する拘束 4J − I² = 1` の下で

一般化固有問題 `Sr v1 = λ C v1(scipy.linalg.eig`)として解く(Li & Griffiths 2004)。

各実固有ベクトルを楕円体へ復元し、正定値(= 実在する楕円体)へ復元でき残差 RMS が最小

のものを採用する(復元時の正定値検査そのものが厳密な楕円体判定)。初期値不要・決定論・

大域解。数値安定化のため点群を

重心と RMS 半径で無次元化してから解き、パラメータを world 座標へ戻す。

Args:

points: (N,3) 点群(最低 10 点)。外れ値には無防備(必要なら事前に inlier 選別)。

Returns:

dict: ``{"center": (3,), "axes": (3,3) 列=主軸(半径降順), "radii": (3,) 半径(降順),

"residual": float Taubin 近似の点-面距離 RMS}``。

Raises:

ValueError: 形状不正/点数不足/正定値な楕円体解が得られない(平面状の退化・

非楕円面・被覆不足)など fail-closed。

Background guides (the physics and conventions behind this op)

blas_threads_and_memory — 行列分解が遅い理由の知識 — BLAS スレッド・キャッシュ・メモリ配置

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.

Runnable examples (verified samples that actually call this op)

fit_primitives_extpy -3.11 examples_3d/fit_primitives_ext.py

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

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

Same category (robust_fit)

ransac_plane · ransac_sphere · ransac_line · ransac_cylinder · fit_cone · fit_torus


*Provenance: fit_primitives_ext.py — 3D 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.