Skip to main content

median_blur

Function median_blur 

Source
pub fn median_blur<T: PixelComponent, const CHANNELS: usize>(
    input: ImageView<'_, T, CHANNELS>,
    kernel_size: usize,
    border: BorderMode<T, CHANNELS>,
) -> VisionResult<Image<T, CHANNELS>>
Expand description

Applies a per-channel median filter with an odd square aperture. Uses the original f64 conversion/total ordering, selecting the median without fully sorting windows larger than 3x3. Large native images use bounded Rayon row bands; small/single-row/one-worker images and WASM retain caller execution.