[][src]Function imageproc::filter::box_filter

pub fn box_filter(
    image: &GrayImage,
    x_radius: u32,
    y_radius: u32
) -> Image<Luma<u8>>

Convolves an 8bpp grayscale image with a kernel of width (2 * x_radius + 1) and height (2 * y_radius + 1) whose entries are equal and sum to one. i.e. each output pixel is the unweighted mean of a rectangular region surrounding its corresponding input pixel. We handle locations where the kernel would extend past the image's boundary by treating the image as if its boundary pixels were repeated indefinitely.