[][src]Function opencv::imgproc::median_blur

pub fn median_blur(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    ksize: i32
) -> Result<()>

Blurs an image using the median filter.

The function smoothes an image using the median filter with the inline formula aperture. Each channel of a multi-channel image is processed independently. In-place operation is supported.

Note: The median filter uses #BORDER_REPLICATE internally to cope with border pixels, see #BorderTypes

Parameters

  • src: input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U.
  • dst: destination array of the same size and type as src.
  • ksize: aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ...

See also

bilateralFilter, blur, boxFilter, GaussianBlur