sh_descriptor — 3D describe op

• Data kinds: voxel → descriptor

• Call: import fullseye as fs; fs.ledger.sh_descriptor(vol, L=8, nradii=12, ntheta=32, nphi=64, device='cpu') (to call the implementation directly, import match3d; match3d.sh_descriptor(vol, L=8, nradii=12, ntheta=32, nphi=64, device='cpu'); from the registry, ops3d.get("sh_descriptor"))

• GPU: this op has a GPU path (device="cuda")

Usage

The spherical-harmonic descriptor. Returns the SH band energy ‖f_l(r)‖ of concentric shells as (radius × frequency).

A line → surface lift of representing a 2D closed contour with 1D Fourier descriptors: a 3D closed surface is represented with SH, and the band energy is rotation invariant because rotation only mixes m within a band (Kazhdan 2003). All shells are sampled with grid_sample, inner products with a fixed SH basis → sum of squares per band. A global signature for retrieval/verification. Returns (nradii,L+1).

Honest disclosure (measured in the 2026-08-30 review): the spherical quadrature is a uniform θ×φ grid sum (not Gauss-Legendre), so the values are an approximation of the exact SH band energy (with the default 32×64, the l=4 self inner product is ~0.62 times the theoretical value, converging to 1 as resolution ↑). match_sh_descriptor uses L2 normalisation + cosine similarity, so it does not affect comparisons with the same ntheta/nphi, but using the absolute values as physical quantities or comparing across different resolution settings is not valid.

Arguments: vol is assumed to be a cube (N,N,N). Only the length N of axis 0 is used for the centre c = (N−1)/2 and coordinate normalisation, so for a non-cube the sample positions on axes 1,2 are distorted (there is no validation). Shell radii are nradii equal steps from 0.2·rmax to rmax = N/2 − 1 (voxel units), and each shell is sampled trilinearly on a ntheta × nphi (θ,φ) grid. L is the maximum degree. Returns (nradii, L+1) float32 numpy; [i, l] is the energy of degree l of the i-th shell (non-negative). Put the object at the centre of the volume (an off-centre object breaks rotation invariance; centre it first using the centroid from moment_axes). scipy's sph_harm_y/sph_harm is imported at call time.

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)

• sh_descriptor_retrieval — py -3.11 examples_3d/sh_descriptor_retrieval.py

• shape_descriptor — py -3.11 examples_3d/shape_descriptor.py

Ops the type connects to (they accept descriptor as input)

fuse_to_voxel · shape_distance

Same category (describe)

match_sh_descriptor


*Provenance: match3d.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.