[][src]Function opencv::imgproc::box_filter

pub fn box_filter(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    ddepth: i32,
    ksize: Size,
    anchor: Point,
    normalize: bool,
    border_type: i32
) -> Result<()>

Blurs an image using the box filter.

The function smooths an image using the kernel:

block formula

where

block formula

Unnormalized box filter is useful for computing various integral characteristics over each pixel neighborhood, such as covariance matrices of image derivatives (used in dense optical flow algorithms, and so on). If you need to compute pixel sums over variable-size windows, use #integral.

Parameters

  • src: input image.
  • dst: output image of the same size and type as src.
  • ddepth: the output image depth (-1 to use src.depth()).
  • ksize: blurring kernel size.
  • anchor: anchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
  • normalize: flag, specifying whether the kernel is normalized by its area or not.
  • borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes

See also

blur, bilateralFilter, GaussianBlur, medianBlur, integral

C++ default parameters

  • anchor: Point(-1,-1)
  • normalize: true
  • border_type: BORDER_DEFAULT