harmonic_rotation — RESIDUE image op

• Datenarten: image2d × image2d → table

• Aufruf: 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' (die Implementierung direkt: import residue; residue.harmonic_rotation(image, reference, orders=(3, 4, 5), rings=((14, 24), (30, 40), (46, 56)), center=None, tol=0.05) -> 'dict'; aus dem Register: opsresidue.get("harmonic_rotation"))

Verwendung

Absolute Drehung von image gegenüber reference in der Ebene über volle 360 Grad -> dict.

> Die ausführliche Beschreibung unten ist der Originaltext — Zusammenfassung und Überschriften sind übersetzt.

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.

Referenzen (Beispieldaten, Literatur)

• Katalog der Beispieldaten (Download-URLs / Lizenzen) — 2-D nutzt skimage.data (BSD/Public Domain) plus synthetische Bilder, 3-D nennt Download-URLs echter Datenquellen (Stanford, PDS, …).

• Herkunft und Literatur der Operatoren — die Quellen der Forschung/Verfahren, auf denen diese Operatorfamilie beruht.

• Der kanonische Algorithmus (Autor, Jahr) und seine Anwendungen stehen im Familienleitfaden oben.

Ausführbare Beispiele (verifizierte Samples, die diesen Operator wirklich aufrufen)

• poc_residue_crt — py -3.11 examples/poc_residue_crt.py

Typkompatible Folge-Operatoren (nehmen table als Eingabe)

—

Gleiche Kategorie (image)

crt_displacement


*Provenance: residue.py — RESIDUE Operator-Registry. Diese Notiz wird von tools/opdocs.py md erzeugt (nicht von Hand bearbeiten).*

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