superquadric op• 資料種類:points → measurement
• 呼叫: import fullseye as fs; fs.ledger.superquadric_residual(points, a, eps, R, t) -> 'float'(要直接呼叫實作,import superquadric; superquadric.superquadric_residual(points, a, eps, R, t) -> 'float';從台帳取用則 ops3d.get("superquadric_residual"))
Gross-Boult 體積修正殘差 mean( (sqrt(a1 a2 a3)(F^eps1 - 1))^2 )。
用 inside_outside(points, a, eps, R, t) 求出各點的內外函數 F,將逐點殘差 r_i = sqrt(a1*a2*a3) * (F_i**eps1 - 1) 的 2 次方平均值以 float 回傳。表面上的點 F=1,因此殘差為 0,內側為負、外側為正的殘差(取 2 次方後符號消失)。與 fit_superquadric 最小化的量相同,回傳 dict 中的 residual 也是這個值。
• points: 可 reshape 為 (N,3) 的點雲(world 座標)。
• a: 半徑 (a1,a2,a3)。eps: 形狀指數 (eps1,eps2)(計算 F 時兩者都用,外層的 F**eps1 只用 eps1)。
• R/t: 位姿(X_body = R.T @ (X - t))。None 表示單位旋轉 / 原點。
數值保護:F 截斷到 [0, 1e12],a1*a2*a3 提升到 1e-12 以上後再取 sqrt (為了在退化參數下不出現 inf/NaN。對表面附近的值沒有影響)。
因次:sqrt(a1 a2 a3) 是長度的 3/2 次方,F^eps1 - 1 無因次,因此回傳值具有長度 3 次方的因次,取決於點雲的尺度。不適合比較大小不同的物體。它不是真正的點-表面歐氏距離而是徑向距離近似,並且對離群值毫無防禦,這些如模組 docstring 所述。
• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。
• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。
• superquadric_fit — py -3.11 examples_3d/superquadric_fit.py
measurement 作為輸入)vol_gaussian_psf · fuse_to_voxel · fresnel_reflectance · snell_angle
superquadric)fit_superquadric · sample_surface · inside_outside
*Provenance: superquadric.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.