// Interactive Blog Image Analysis & Computer Vision · 2026
Real depth sensors return noisy, cluttered clouds of 3D points. This project turns those clouds into a handful of clean geometric solids — superquadrics — even when the data is sharp-edged, overlapping, or 30% outliers. We extend the GAIR-RANSAC framework (STAG 2025) with six targeted changes that make it robust enough for real meshes and sensor data.
01 — Interactive · real fitted data
Everything below is real data from the project — measured point clouds rendered as dots, with the recovered superquadric surfaces overlaid. Drag to rotate, scroll to zoom, right-drag to pan. Switch scenes and layers with the controls.
02 — The problem
A superquadric is a single implicit equation with 11 parameters that can morph between spheres, ellipsoids, cubes, octahedra, cylinders and bipyramids. That makes it a compact, expressive vocabulary for describing the parts of an object — perfect for robotics, reverse engineering and scene understanding, where you want "three boxes and a cylinder", not a million raw points.
The catch is robustness. Real RealSense and Thingi10K data carry noise, outliers and overlapping structures. Plain least-squares fitting collapses: a single primitive stretches to swallow the whole scene, or sharp corners get rounded off. The GAIR-RANSAC framework casts inlier selection as a graph-cut labelling problem and solves it globally — but it was tuned for smooth, clean shapes. We push it into the hard regime.
Given an unordered set of noisy 3D points \(\mathcal{D}=\{\mathbf{x}_1,\dots,\mathbf{x}_n\}\), the goal is to recover a collection of primitives \(\{\theta_1,\dots,\theta_\kappa\}\) that explains the scene. Each primitive is a superquadric, defined implicitly in its canonical frame by the inside–outside function
where \(\Lambda=\{a_1,a_2,a_3,\varepsilon_1,\varepsilon_2\}\) collects the scale \((a_i)\) and shape \((\varepsilon_1,\varepsilon_2)\) parameters. A rigid transform \(T(\Gamma)\) with rotation and translation \(\Gamma\) places the primitive in the world frame, so each model carries 11 parameters, \(\theta=\Lambda\cup\Gamma\). A point with \(F<1\) lies inside the surface, \(F=1\) on it, and \(F>1\) outside — the shape exponents \(\varepsilon_1,\varepsilon_2\) sweep from ellipsoids \((\varepsilon\!\approx\!1)\) to boxes \((\varepsilon\!\to\!0)\) to pinched bipyramids \((\varepsilon\!>\!1)\).
03 — What we changed
Each change targets a specific failure mode we observed on real data.
|F−1| inlier gate close an exploit where a stretched superquadric with a large gradient norm fakes a low residual while badly missing the surface.| Component | Paper (GAIR-RANSAC) | Ours |
|---|---|---|
| Surface distance | (F−1)/‖∇F‖, unstable when sharp | radial residual (a₁a₂a₃)1/3(Fε/2−1) |
| Admissible ε | [0.3, 1.3] — smooth only | [0.1, 1.9] — sharp + smooth |
| Volume penalty | — | Solina (a₁a₂a₃)2/3 anti-needle term |
| Graph-cut rule | drop any C < τ edge | drop only if smooth on both sides + contact-face filter |
| MSS sampling | global K patches × 2 pts | local-K patches + SVD validity + PCA pose |
| Post-refinement | sequential remove-and-fit | competitive Chamfer reassignment + fission |
| Outlier handling | consensus threshold only | + density pre-filter |
04 — Method · the inner fit
Recovering the 11-parameter model \(\theta\) from a noisy patch needs a stable residual, careful sampling, and strict inlier gating. The baseline normalises the algebraic error by the surface gradient,
which is well-behaved for smooth shapes but blows up as \(\varepsilon\to 0\): at a cube edge the gradient vanishes and \(d_{\text{alg}}\) becomes unreliable, hiding sharp shapes from the optimiser.
We replace it with the Solina radial residual, which cancels the inner-exponent blow-up and stays well-conditioned across the whole admissible range \(\varepsilon\in[0.1,2.0]\):
To stop the optimiser from trivially driving \(d_{\text{rad}}\to 0\) by inflating the scales \(a_i\), we add an anti-needle volume penalty \(R_{\text{vol}}(\theta)=\lambda_{\text{size}}\,(a_1 a_2 a_3)^{2/3}\), with \(\lambda_{\text{size}}=0.05\).
|F−1| inlier gateA stretched superquadric with a very large \(\lVert\nabla F\rVert\) can fake a small \(d_{\text{alg}}\) for points physically far from its surface. We close this gradient-driven exploit with a strict second gate on the un-normalised implicit error:
A point is an inlier only if both the spatial distance and the implicit error are small.
Standard RANSAC scatters minimal sample sets (MSS) globally, so they routinely straddle two objects. We instead draw each MSS from a single seed patch and its graph neighbours, reject near-coplanar samples with an SVD rank check, and seed the optimiser with a rotation \(R_0\) from the PCA of the centred MSS — which converges in 2–3× fewer iterations on elongated shapes.
The baseline drops any graph edge whose endpoints have nearly antiparallel normals. That correctly splits a sphere–sphere joint, but it also shatters a single cube: at a corner three faces meet at right angles and the same rule fires. We make the rule adaptive by conditioning on each endpoint's local normal consistency,
close to \(1\) in smooth neighbourhoods and well below \(1\) near sharp features. An edge \((i,j)\) is cut only when pairwise coherency is low and both endpoints sit in smooth regions:
with \(C_{ij}=\tfrac{1}{2}(1+\mathbf{n}_i\cdot\mathbf{n}_j)\), \(\tau_C=0.5\), \(\tilde\tau_C=0.85\). The cube corner now survives (its own \(c_i\) is low) while the sphere–sphere joint is still cut — closing both failure modes at once.
05 — Method · the outer loop
To recover a whole scene \(\mathcal{H}=\{\theta_1,\dots,\theta_\kappa\}\), the single-primitive fitter is wrapped in a detect-and-remove loop, with a density pre-filter up front and two global rebalancing steps at the end.
Sparse outliers form structural "bridges" that merge disjoint objects into one connected component. We score each point by the number of neighbours within radius \(r_\rho\),
and drop it before graph construction if it lacks support, \(\;\rho(\mathbf{p})
A candidate \(\theta_k\) fitted on component \(C\) with inliers \(I_k\) is accepted only if it clears two gates. The Chamfer gate samples \(m=1000\) points \(S_k\) on the fitted surface and bounds the symmetric squared distance to the data:
The coverage gate rejects locally tight but unrepresentative fits via completeness, \(\;|I_k|/|C|\ge\tau_{\text{cov}}=0.7\), and a per-axis axial spread test in the canonical frame \(\tilde{\mathbf{p}}=R^\top(\mathbf{p}-\mathbf{t})\):
Sequential extraction is greedy: early models over-claim points or merge two touching objects into a "mixture fit". Two global post-steps fix this. Competitive reassignment re-labels every point to the nearest fitted surface (within \(\varepsilon\)) and refits each primitive on its rebalanced inlier set:
Primitive fission then 2-means–clusters each primitive's inliers and splits a suspected mixture-fit when both a bimodal-centre test and a spatial-gap test hold:
with centroids \(\mathbf{c}_1,\mathbf{c}_2\), principal spreads \(\sigma_1,\sigma_2\), and \(\beta_{\text{cent}}=2.5\), \(\beta_{\text{gap}}=3.0\).
06 — Results
Ground-truth labels and surfaces on the left, our extracted primitives on the right. The pipeline runs with one parameter set across every scene below.
Tuning the full pipeline meant searching \(\sim\!15\) hyper-parameters, so a Cartesian grid was prohibitive. We ran a 9-stage greedy grid search (exactly 126 configurations) over the 10 Thingi10K probe meshes, optimising the average symmetric Chamfer distance and carrying the best values forward at each stage. Two stages dominated: swapping in the radial residual cut Chamfer by 27% at fixed coverage, and tuning the MSS normal-angle threshold to \(75^\circ\) — which stops curved patches from fragmenting — gave a further 32% drop. The final defaults: radial residual, \(\lambda_w=0.3\), \(f_{\text{scale}}=0.5\), soft-L1 loss, \(\varepsilon=0.08\), \(\tau_C=0.5\), \(\tilde\tau_C=0.85\), \(n_{\text{at}}=75^\circ\), \(\lambda_{\text{size}}=0.05\).
| Shape ID | Chamfer (×10⁻³) | Inlier ratio | # Primitives |
|---|---|---|---|
| 1005276 | 2.91 | 0.857 | 3 |
| 131969 | 1.86 | 0.927 | 4 |
| 1344040 | 1.74 | 0.999 | 3 |
| 37384 | 1.92 | 0.821 | 3 |
| 39643 | 2.06 | 0.907 | 5 |
| 44102 | 2.86 | 0.725 | 1 |
| 488050 | 2.48 | 0.895 | 2 |
| 678267 | 2.34 | 0.963 | 2 |
| 90279 | 1.73 | 0.894 | 4 |
| Mean | 2.54 | 0.888 | — |
Remaining failure modes. Densely jointed scenes still force greedy "containment fits" across touching objects, tripping the coverage gate; and superquadrics are convex, so concave geometry needs several primitives. Both point to the same fix — replacing the greedy loop with a global multi-label graph cut, plus an MDL criterion to choose \(\kappa\) automatically.








07 — Why it matters
A gripper plans far better against "a cylinder here, a box there" than against a raw point cloud. Superquadrics give collision-friendly, graspable volumes.
Turn a 3D scan of a part into a small set of editable parametric solids — the first step from scan to manufacturable model.
Compact part-level abstractions are cheap to store, match and reason over for AR, mapping and simulation.
Holding one parameter set from clean data to 30% noise means it survives real RealSense captures, not just synthetic benchmarks.
Built on GAIR-RANSAC — Ferraris, Leveni, Baieri, Maggioli, Melzi & Magri, Smalltalk on Graphics (STAG) 2025 — and the classic superquadric recovery of Solina & Bajcsy (PAMI 1990).