sh_descriptor — 3D describe op

• 資料種類:voxel → descriptor

• 呼叫: import fullseye as fs; fs.ledger.sh_descriptor(vol, L=8, nradii=12, ntheta=32, nphi=64, device='cpu')(要直接呼叫實作,import match3d; match3d.sh_descriptor(vol, L=8, nradii=12, ntheta=32, nphi=64, device='cpu');從台帳取用則 ops3d.get("sh_descriptor"))

• GPU:該運算子有 GPU 路徑(device="cuda")

用法

球諧描述子。以 (半徑 × 頻率) 回傳同心球殼的 SH 頻帶能量 ‖f_l(r)‖。

以 1D Fourier 描述子表示 2D 閉輪廓的 線→面提升:3D 閉曲面以 SH 表示,頻帶能量在旋轉下只是在頻帶內混合 m=旋轉不變(Kazhdan 2003)。以 grid_sample 取樣全部 shell,與固定 SH 基底做內積 → 各頻帶平方和。用於 retrieval/verification 的全域簽名。回傳值 (nradii,L+1)。

honest 揭露(2026-08-30 審查實測):球面求積為均勻 θ×φ 網格求和(不是 Gauss-Legendre), 因此值是 嚴格 SH 頻帶能量的近似(預設 32×64 下 l=4 的自內積為理論值的 ~0.62 倍,解析度↑時收斂到 1)。match_sh_descriptor 使用 L2 正規化+餘弦相似度,因此 不影響相同 ntheta/nphi 之間的比較,但不可將絕對值當作物理量使用,也不可在不同解析度設定之間比較。

引數:vol 以 立方體(N,N,N)為前提。中心 c = (N−1)/2 與座標正規化只使用軸 0 的長度 N, 因此非立方體時軸 1,2 的取樣位置會失真(沒有驗證)。shell 半徑為 0.2·rmax 〜 rmax = N/2 − 1 的 nradii 等分(voxel 單位),每個 shell 在 ntheta × nphi 的 (θ,φ) 網格上做 trilinear 取樣。L 為最大階數。回傳值 (nradii, L+1) float32 numpy,[i, l] 是第 i 個 shell 的 l 階能量(非負)。物體須置於 volume 中心(中心偏移會破壞旋轉不變性。請先以 moment_axes 的質心對中)。scipy 的 sph_harm_y/sph_harm 在呼叫時 import。

參考(範例資料、文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

• sh_descriptor_retrieval — py -3.11 examples_3d/sh_descriptor_retrieval.py

• shape_descriptor — py -3.11 examples_3d/shape_descriptor.py

型別可銜接的下一個運算子(可接受 descriptor 作為輸入)

fuse_to_voxel · shape_distance

同類別(describe)

match_sh_descriptor


*Provenance: match3d.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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