Skip to main content

Module primitives

Module primitives 

Source
Expand description

Shared primitives for the Duda-Frese (2018) localized Radon response — used by both RadonPeakRefiner (per-candidate subpixel refiner) and the whole-image radon_response_u8 path.

The module exists so the angular basis, the peak-fit, and the response-map box blur live in exactly one place. When the detector and refiner disagree on those primitives, they stop being comparable.

Enums§

PeakFitMode
Subpixel peak-fitting mode.

Constants§

ANGLES
Number of discrete ray angles. The paper samples {0, π/4, π/2, 3π/4}.
DIR_COS
cos α for the four ray angles, in order.
DIR_SIN
sin α for the four ray angles, in order.

Functions§

box_blur_inplace
Separable (2·radius+1)² box blur applied in place to a flat row-major w × h grid. scratch must match resp in length and is used as temporary storage. radius = 0 is a no-op.
fit_peak_frac
Fit the peak of three samples along one axis. Returns a fractional offset in [-0.5, 0.5] grid-steps from the middle sample.