**Are you an EPFL student looking for a semester project?**

Work with us on data science and visualisation projects, and deploy your project as an app on top of Graph Search.

Concept# Median filter

Summary

The median filter is a non-linear digital filtering technique, often used to remove noise from an image or signal. Such noise reduction is a typical pre-processing step to improve the results of later processing (for example, edge detection on an image). Median filtering is very widely used in digital because, under certain conditions, it preserves edges while removing noise (but see the discussion below), also having applications in signal processing.
The main idea of the median filter is to run through the signal entry by entry, replacing each entry with the median of neighboring entries. 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 region (i.e. the median filter is not a separable filter).
To demonstrate, using a window size of three with one entry immediately preceding and following each entry, a median filter will be applied to the following simple one-dimensional signal:
x = (2, 3, 80, 6, 2, 3).
So, the median filtered output signal y will be:
y1 = med(2, 3, 80) = 3, (already 2, 3, and 80 are in the increasing order so no need to arrange them)
y2 = med(3, 80, 6) = med(3, 6, 80) = 6, (3, 80, and 6 are rearranged to find the median)
y3 = med(80, 6, 2) = med(2, 6, 80) = 6,
y4 = med(6, 2, 3) = med(2, 3, 6) = 3,
i.e. y = (3, 6, 6, 3).
In the example above, because there is no entry preceding the first value, the first value is repeated, as with the last value, to obtain enough entries to fill the window. This is one way of handling missing window entries at the boundaries of the signal, but there are other schemes that have different properties that might be preferred in particular circumstances:
Avoid processing the boundaries, with or without cropping the signal or image boundary afterwards,
Fetching entries from other places in the signal.

Official source

This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.

Related courses (2)

MSE-352: Introduction to microscopy + Laboratory work

Ce cours d'introduction à la microscopie a pour but de donner un apperçu des différentes techniques d'analyse de la microstructure et de la composition des matériaux, en particulier celles liées aux m

MICRO-511: Image processing I

Introduction to the basic techniques of image processing. Introduction to the development of image-processing software and to prototyping using Jupyter notebooks. Application to real-world examples in

Related publications (40)

Related concepts (6)

Gaussian noise

In signal processing theory, Gaussian noise, named after Carl Friedrich Gauss, is a kind of signal noise that has a probability density function (pdf) equal to that of the normal distribution (which is also known as the Gaussian distribution). In other words, the values that the noise can take are Gaussian-distributed. The probability density function of a Gaussian random variable is given by: where represents the grey level, the mean grey value and its standard deviation.

Edge-preserving smoothing

Edge-preserving smoothing or edge-preserving filtering is an technique that smooths away noise or textures while retaining sharp edges. Examples are the median, bilateral, guided, anisotropic diffusion, and Kuwahara filters. In many applications, e.g., medical or satellite imaging, the edges are key features and thus must be preserved sharp and undistorted in smoothing/denoising. Edge-preserving filters are designed to automatically limit the smoothing at “edges” in images measured, e.g., by high gradient magnitudes.

Total variation denoising

In signal processing, particularly , total variation denoising, also known as total variation regularization or total variation filtering, is a noise removal process (filter). It is based on the principle that signals with excessive and possibly spurious detail have high total variation, that is, the integral of the absolute is high. According to this principle, reducing the total variation of the signal—subject to it being a close match to the original signal—removes unwanted detail whilst preserving important details such as .

Related units (3)

Ontological neighbourhood

Related lectures (25)

Related people (14)

Explores image filtering techniques, including linear and nonlinear filters, for artifact removal and feature enhancement.

Explores image processing techniques such as contrast manipulation, enhancement, and sharpening using Fiji software.

Explores noise filtering, signal estimation, and signal-to-noise ratio optimization through Wiener-Khintchine theorem and power spectral density.

Julia Schmale, Andrea Baccarini, Ivo Fabio Beck, Hélène Paule Angot

The Pollution Detection Algorithm (PDA) is an algorithm to identify and flag periods of primary polluted data in remote atmospheric time series in five steps. The first and most important step identifies polluted periods based on the gradient (time-derivat ...

Julia Schmale, Andrea Baccarini, Ivo Fabio Beck, Hélène Paule Angot

This dataset contains a pollution flag in 1 min time resolution. It is derived by the pollution detection algorithm (PDA) based on the corrected particle number concentration data (DOI upcoming) measured during the year long MOSAiC expedition from October ...

Julia Schmale, Andrea Baccarini, Ivo Fabio Beck, Hélène Paule Angot

This dataset contains particle number concentrations and a pollution flag in 1 min time resolution. It is derived by the pollution detection algorithm (PDA, doi:10.5281/zenodo.5761101) based on the corrected particle number concentration data of the CPC377 ...