Lably
Skip to content

Median filter

Non-linear digital filtering technique to remove noise

  • 6 min read
  • 7 chapters

Related on Lably

Through Digital image processing, Median and Moving average

Algorithm description

The main idea of the median filter is to run through the signal entry by entry, replacing each entry with the median of the entry and its neighboring entries. The idea is very similar to a moving average filter, which replaces each entry with the arithmetic mean of the entry and its neighbors. The pattern of neighbors is called the "window", which slides, entry by entry, over the entire signal. For one-dimensional signals, the most obvious window is just the first few preceding and following entries, whereas for two-dimensional (or higher-dimensional) data, the window must include all entries within a given radius or ellipsoidal or rectangular region (i.e., the median filter is not a separable filter).

Sign in to keep reading

6 more chapters are free with a Lably account.

More in From Lably lessons