Applying a simple median filter.

There are, of course, as we will see, more advanced filters.

However, not that even a simple median filter can do, rather effective job.

This is true especially, for ? Well, you guess it.

In [12]:
blurred1 = cv2.medianBlur(noisy_image1, 3)
cv2.imshow('Median filter - Gaussian noise',blurred1)
cv2.waitKey()
cv2.imwrite("Median filter - Gaussian noise.jpg",blurred1)

blurred2 = cv2.medianBlur(noisy_image2, 3)
cv2.imshow('Median filter - Uniform noise',blurred2)
cv2.waitKey()
cv2.imwrite("Median filter - Uniform noise.jpg",blurred2)

blurred3 = cv2.medianBlur(noisy_image3, 3)
cv2.imshow('Median filter - Impuls noise',blurred3)
cv2.waitKey()
cv2.imwrite("Median filter - Impuls noise.jpg",blurred3)
Out[12]:
True