This paper describes a new median filter algorithm optimized for real-time performance in smart cameras with embedded processors. As in the JPEG and MPEG compression algorithms, each frame of the video stream is first partitioned into a regular array of non-overlapping square blocks. The median value for each block is then computed and compared with corresponding values of neighboring blocks. If the magnitude of the difference does not exceed a threshold, the output value for all the pixels in the block is set to the median value. Otherwise, the output value for each pixel in the block is computed as the median value within a window of the same size centered at this pixel. We describe variations for binary and grayscale images. The algorithm has been implemented and tested in an embedded single-board-computer (SBC) with no hardware acceleration, as a component of a Visual Sensor Network (VSN) system for real-time indoor person detection and tracking. In this system, where the SBCs have the additional overhead of decoding JPEG frames from IP cameras, our new algorithm is 5 to 20 times faster than the traditional algorithms for typical window sizes. We expect further speedups to frame-rate performance on smart cameras with embedded image sensors and reconfigurable hardware.
[1]
Ali M. Reza,et al.
FPGA implementation of a nonlinear two dimensional fuzzy filter
,
1999,
1999 IEEE International Conference on Acoustics, Speech, and Signal Processing. Proceedings. ICASSP99 (Cat. No.99CH36258).
[2]
Thomas S. Huang,et al.
A fast two-dimensional median filtering algorithm
,
1979
.
[3]
M. Braga,et al.
Exploratory Data Analysis
,
2018,
Encyclopedia of Social Network Analysis and Mining. 2nd Ed..
[4]
Patrenahalli M. Narendra,et al.
A Separable Median Filter for Image Noise Smoothing
,
1981,
IEEE Transactions on Pattern Analysis and Machine Intelligence.
[5]
Antonios Gasteratos,et al.
A new content based median filter
,
2004,
2004 12th European Signal Processing Conference.
[6]
Sartaj Sahni,et al.
Efficient serial and parallel algorithms for median filtering
,
1991,
IEEE Trans. Signal Process..
[7]
Alfred V. Aho,et al.
The Design and Analysis of Computer Algorithms
,
1974
.
[8]
Anup Basu,et al.
Algorithms and hardware for efficient image smoothing
,
1987,
Comput. Vis. Graph. Image Process..