superquadric_residual — 3D superquadric op

• Data kinds: points → measurement

• Call: import fullseye as fs; fs.ledger.superquadric_residual(points, a, eps, R, t) -> 'float' (implementation को सीधे call करना हो तो import superquadric; superquadric.superquadric_residual(points, a, eps, R, t) -> 'float', registry से लेना हो तो ops3d.get("superquadric_residual"))

उपयोग

Gross-Boult volume-corrected residual mean( (sqrt(a1 a2 a3)(F^eps1 - 1))^2 )।

inside_outside(points, a, eps, R, t) से हर point का inside-outside function F निकालता है, और हर point के residual r_i = sqrt(a1*a2*a3) * (F_i**eps1 - 1) की 2nd power का mean float के रूप में लौटाता है। surface पर के point का F=1 होता है, इसलिए residual 0 होता है, अंदर वाले का residual ऋणात्मक और बाहर वाले का धनात्मक होता है (2nd power लेने से sign मिट जाता है)। fit_superquadric जिस मात्रा को minimise करता है यह वही है, और लौटाए गए dict का residual भी यही मान है।

• points: (N,3) में reshape हो सकने वाला point cloud (world coordinates)।

• a: radius (a1,a2,a3)। eps: shape exponent (eps1,eps2) (F की गणना में दोनों, बाहरी F**eps1 में केवल eps1 इस्तेमाल होता है)।

• R/t: pose (X_body = R.T @ (X - t))। None हो तो identity rotation / origin।

संख्यात्मक सुरक्षा: F को [0, 1e12] में clip किया जाता है, और a1*a2*a3 को कम से कम 1e-12 तक बढ़ाकर फिर sqrt लिया जाता है (ताकि degenerate parameters पर inf/NaN न आए। surface के पास के मानों पर कोई असर नहीं)।

आयाम: sqrt(a1 a2 a3) लंबाई की 3/2 power है और F^eps1 - 1 आयामरहित है, इसलिए return value का आयाम लंबाई की 3 power है और यह point cloud के scale पर निर्भर करता है। अलग-अलग आकार के objects की तुलना के लिए उपयुक्त नहीं। यह असली point-surface Euclidean दूरी नहीं बल्कि radial दूरी का सन्निकटन (approximation) है, और outlier के सामने असुरक्षित है, जैसा कि module docstring में लिखा है।

संदर्भ (sample data, साहित्य)

• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।

• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• superquadric_fit — py -3.11 examples_3d/superquadric_fit.py

वे अगले ops जिनसे type जुड़ता है (measurement को input के रूप में लेते हैं)

vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle

इसी category के (superquadric)

fit_superquadric · sample_surface · inside_outside


*Provenance: superquadric.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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