cv2.medianBlur
时间: 2023-10-28 20:50:52 浏览: 121
medianBlur.zip
cv2.medianBlur() is a function in the OpenCV library of Python programming language that performs median filtering on an image. It is used to reduce noise in an image by replacing each pixel value with the median value of its neighboring pixels. The median filter is a nonlinear filter that is commonly used in image processing to remove salt-and-pepper noise and preserve edges. The function takes an image as input and returns the filtered image as output. The syntax of the function is as follows:
cv2.medianBlur(src, ksize)
where:
- src: Input image
- ksize: Size of the kernel used for median filtering. It must be odd and positive.
阅读全文