Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Median Filter Algorithm

Numerical Algorithm

The median filter is a nonlinear algorithm for removing noise from a digital image or signal while preserving its edges better than a simple averaging filter would. It slides a small window, commonly three by three pixels, across the image, and at each position it replaces the center pixel's value with the median of all the values inside that window rather than their average, which makes an isolated pixel whose value is wildly out of line with its neighbors get replaced outright rather than merely diluted into the result. This behavior makes the median filter especially effective against salt and pepper noise, in which some pixels are corrupted to pure black or pure white at random, and a 1979 paper by Huang, Yang and Tang describing a fast two dimensional implementation helped establish the technique as a practical, routinely used tool in image processing.

Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.