import cv2

#Reading Image
img = cv2.imread('img46_gray_noise.png')

#Aplying filter
median = cv2.medianBlur(img,3)

#Showing image
cv2.imshow("Noised Image", img)
cv2.imshow("median", median)
cv2.waitKey()
cv2.destroyAllWindows()

#Save result
cv2.imwrite("denoised_image.png", median)