The median filter replaces the value of a pixel by the median of the gray
levels in the neighborhood of that pixel.