Median Filter
A Median Filter is a non-linear digital filtering technique used to remove noise from images. It works by replacing each pixel's value with the median value of the pixels in its neighborhood. This method is particularly effective for reducing salt-and-pepper noise, which consists of random bright and dark pixels.
The filter operates by sliding a window over the image, typically a square shape, and calculating the median of the pixel values within that window. This process preserves edges better than linear filters, making it a popular choice in image processing applications, such as in medical imaging and photography.