Skip to main content

adaptive_threshold

Function adaptive_threshold 

Source
pub fn adaptive_threshold(
    img: &GrayImage,
    kernel_size: usize,
    threshold: i32,
) -> GrayImage
Expand description

Applies Adaptive Thresholding using Stack Box Blur. Port of CV.adaptiveThreshold from the JS codebase.

kernel_size: Radius for the stack box blur (JS default: 2). threshold: Constant for comparison (JS default: 7).