fit_ellipsoid — 3D robust_fit op

• Data kinds: points → primitive

• 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}.

Solves the general quadric xᵀA x + b·x + c = 0 under the constraint 4J − I² = 1, which guarantees an ellipsoid, as the generalised eigenproblem Sr v1 = λ C v1 (scipy.linalg.eig) (Li & Griffiths 2004). Each real eigenvector is reconstructed into an ellipsoid, and the one that can be reconstructed as positive definite (= a real ellipsoid) with the smallest residual RMS is adopted (the positive-definiteness check during reconstruction is itself the exact ellipsoid test). No initial value needed, deterministic, global solution. For numerical stability the point cloud is made dimensionless by its centroid and RMS radius before solving, and the parameters are mapped back to world coordinates.

Args:

points: (N,3) point cloud (at least 10 points). Defenceless against outliers (select inliers beforehand if needed).

Returns:

dict: {"center": (3,), "axes": (3, 3), "radii": (3,), "residual": float}.

The columns of axes are the principal axes (radius descending), radii the radii (descending), residual the

point-surface distance RMS of the Taubin approximation.

Raises:

ValueError: fail-closed on bad shape / too few points / no positive-definite ellipsoid solution (planar degeneracy,

non-ellipsoidal surface, insufficient coverage), etc.

Background guides (the physics and conventions behind this op)

• blas_threads_and_memory — Why matrix decompositions are slow — BLAS threads, caches, memory layout

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_ext — py -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.