Blurs an image using the median filter.
cv2.medianBlur(src, ksize[, dst]) → dst
ksize
is 3 or 5, the image depth should be cv2.CV_8U
, cv2.CV_16U
, or cv2.CV_32F
, for larger aperture sizes, it can only be cv2.CV_8U
.ksize
indicates the size of the square kernel to be used by this filter, i.e. how large of a neighborhood to use surrounding each pixel.src
.
The function smoothes an image using the median filter with the ksize x ksize
aperture. Each channel of a multi-channel image is processed independently. In-place operation is supported.