write code for applying the median filter to the input image.
write code for applying the median filter to the input image.