Median filtering is often used to remove noise in images or other signals. The design idea is to check the samples in the input signal and judge whether it represents the signal, and use the observation window composed of odd samples to realize this function. The values in the observation window are sorted, and the median value in the middle of the observation window is used as the output. Then, discard the earliest value, get a new sample, and repeat the above calculation process.
Extended data:
Median filtering is a nonlinear signal processing technology based on sorting statistics theory, which can effectively suppress noise. The basic principle of median filtering is to replace the value of a point in a digital image or digital sequence with the median value of each point in a neighborhood of the point, so that the surrounding pixel values are close to the real value, thus eliminating isolated noise points. The method is to use a two-dimensional sliding template with a certain structure to sort the pixels in the panel according to the size of pixel values, and generate a monotonically rising (or falling) two-dimensional data sequence.
Baidu encyclopedia-median filtering