Skip to main content

Module threshold

Module threshold 

Source
Expand description

Adaptive thresholding implementation. Adaptive thresholding and image binarization.

This module provides the first stage of the detection pipeline, converting grayscale input into binary images while adapting to local lighting conditions.

It features two primary implementations:

  1. Tile-based Thresholding: Blazing fast approach using local tile stats.
  2. Integral Image Thresholding: Per-pixel adaptive thresholding for small features.

Structs§

ThresholdEngine
Adaptive thresholding engine using tile-based stats.
TileStats
Statistics for a single tile.

Functions§

adaptive_threshold_gradient_window
Apply per-pixel adaptive threshold with gradient-based window sizing.
adaptive_threshold_integral
Apply per-pixel adaptive threshold using integral image.
apply_adaptive_threshold_fast
Fast adaptive threshold combining integral image approach with SIMD.
apply_adaptive_threshold_with_params
Adaptive threshold with custom parameters.
compute_integral_image
Compute integral image (cumulative sum) for fast box filter computation.
compute_threshold_map
Compute a map of local mean values.