harmonic_rotation — RESIDUE image op

• Data kinds: image2d × image2d → table

• Call: import fullseye as fs; fs.ledger.harmonic_rotation(image, reference, orders=(3, 4, 5), rings=((14, 24), (30, 40), (46, 56)), center=None, tol=0.05) -> 'dict' (implementation को सीधे call करना हो तो import residue; residue.harmonic_rotation(image, reference, orders=(3, 4, 5), rings=((14, 24), (30, 40), (46, 56)), center=None, tol=0.05) -> 'dict', registry से लेना हो तो opsresidue.get("harmonic_rotation"))

उपयोग

reference के सापेक्ष image का 360 degrees पर absolute in-plane rotation -> dict।

> नीचे का विस्तृत विवरण मूल text में है — सारांश और headings का अनुवाद हो चुका है।

A feature with n-fold symmetry (n lobes, n holes, n slots) tells the rotation only modulo 360/n degrees: its order-n circular harmonic has phase n*theta. Features of several orders, each ambiguous alone, fix theta uniquely whenever the orders have no common divisor (3 and 4: 360 / gcd = 360). This op samples each annulus rings[i] (radii in px around center, default the image centre), takes the order orders[i] angular Fourier coefficient of image and reference, and solves the angle by residue_crt with the coefficient amplitudes as weights.

Returns {"angle_deg", "per_order_deg", "residual_deg", "margin", "suspect", "amplitude"}. angle_deg is counter-clockwise on screen (rows down) — the convention of scipy.ndimage.rotate — in [0, 360). suspect is the index of the ring whose residual is worst relative to its period (or -1 if all are within tol) — a smudged, occluded or broken feature shows up there before it corrupts the angle. With >= 3 orders and only one corrupted, residue_fault_locate gives a hard decision; this op keeps the soft one.

Rotate greyscale images (interpolate, then threshold if needed): rotating a binary mask with nearest-neighbour sampling roughens the edges and biases the harmonics.

संदर्भ (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 के स्रोत।

• Algorithm का मानक स्रोत (लेखक, वर्ष) और उपयोग ऊपर की family usage guide में दिए गए हैं।

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

• poc_residue_crt — py -3.11 examples/poc_residue_crt.py

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

—

इसी category के (image)

crt_displacement


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

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