# [−][src]Function opencv::imgproc::blur

`pub fn blur(    src: &dyn ToInputArray,     dst: &mut dyn ToOutputArray,     ksize: Size,     anchor: Point,     border_type: i32) -> Result<()>`

Blurs an image using the normalized box filter.

The function smooths an image using the kernel:

$\texttt{K} = \frac{1}{\texttt{ksize.width*ksize.height}} \begin{bmatrix} 1 & 1 & 1 & \cdots & 1 & 1 \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \dots \\ 1 & 1 & 1 & \cdots & 1 & 1 \\ \end{bmatrix}$

The call `blur(src, dst, ksize, anchor, borderType)` is equivalent to `boxFilter(src, dst, src.type(), ksize, anchor, true, borderType)`.

## Parameters

• src: input image; it can have any number of channels, which are processed independently, but the depth should be CV_8U, CV_16U, CV_16S, CV_32F or CV_64F.
• dst: output image of the same size and type as src.
• ksize: blurring kernel size.
• anchor: anchor point; default value Point(-1,-1) means that the anchor is at the kernel center.
• borderType: border mode used to extrapolate pixels outside of the image, see #BorderTypes. #BORDER_WRAP is not supported.