In this tutorial, we will use cv2.medianBlur() to implement image media blur. You can learn how to do from this tutorial.
1.Read an image
import cv2 img = cv2.imread("pynoise.png")
2.Implement image median blur using cv2.medianBlur()
blur_image = cv2.medianBlur(img,5) cv2.imshow('Original Image', img) cv2.imshow('Blur Image', blur_image) cv2.waitKey(0)
In this tutorial, we will apply 50% noise in the original image for median blur.