pub fn sample_grid_generic<S: DecodingStrategy>(
img: &ImageView<'_>,
arena: &Bump,
detection: &Detection,
decoder: &(impl TagDecoder + ?Sized),
) -> Option<S::Code>Expand description
Sample the bit grid from the image using the homography and decoder points.
Uses bilinear interpolation for sampling and a spatially adaptive threshold (based on min/max stats of the grid) to determine bit values.
§Parameters
min_contrast: Minimum contrast range for Otsu-based classification. Default is 20.0. Lower values (e.g., 10.0) improve recall on small/blurry tags.
This computes the intensities at sample points and the adaptive thresholds, then delegates to the strategy to produce the code.
§Panics
Panics if the number of sample points exceeds MAX_BIT_COUNT.