Skip to main content
Log in

Median Filtering: A New Insight

  • Published:
Journal of Mathematical Imaging and Vision Aims and scope Submit manuscript


Median filtering (MF) is a canonical image processing operation truly useful in many practical applications. The MF most appealing feature is its resistance to noise and errors in data, but because the method requires window values to be sorted it is computationally expensive. In this work, a new insight into MF capabilities based on the optimal breakdown value (BV) of the median is offered, and it is also shown that the BV-based versions of two of the most popular MF algorithms outperform their corresponding standard versions. A general framework for both the theoretical analysis and comparison of MF algorithms is presented in the process, which will hopefully contribute to a better understanding of the MF many subtle features. The introduced ideas are experimentally tested by using real and synthetic images.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others


  1. Available:


  1. Cormen, T.H., Stein, C., Rivest, R.L., Leiserson, C.E.: Introduction to Algorithms. McGraw-Hill, New York (2001)

    MATH  Google Scholar 

  2. Skiena, S.S.: The Algorithm Design Manual. Springer, London (2008)

    Book  MATH  Google Scholar 

  3. Tukey, J.: Exploratory Data Analysis. Addison-Wesley, Menlo Park (1977)

    MATH  Google Scholar 

  4. Maragos, P., Schafer, R.: Morphological filters—part II: their relations to median, order-statistic, and stack filters. IEEE Trans. Acoust. Speech Signal Process. 35, 1170–1184 (1987)

    Article  MathSciNet  Google Scholar 

  5. Pratt, W.K.: Digital Image Processing: PIKS Inside. Wiley, New York (2001)

    Book  MATH  Google Scholar 

  6. Eng, How-Lung, Ma, Kai-Kuang: Noise adaptive soft-switching median filter. IEEE Trans. Image Process. 10, 242–251 (2001)

    Article  MATH  Google Scholar 

  7. Nelson, T.R., Pretorius, D.H.: Three-dimensional ultrasound of fetal surface features. Ultrasound Obstet. Gynecol. 2, 166–174 (1992)

    Article  Google Scholar 

  8. Carayon, P., Portier, M., Dussossoy, D., Bord, A., Petitpretre, G., Canat, X., Le Fur, G., Casellas, P.: Involvement of peripheral benzodiazepine receptors in the protection of hematopoietic cells against oxygen radical damage. Blood 87, 3170–3178 (1996)

    Google Scholar 

  9. LeBas, T.P., Mason, D.C., Millard, N.C.: TOBI image processing: the state of the art. J. Ocean. Eng. 20, 85–93 (1995)

    Article  Google Scholar 

  10. Villar, S.A., Torcida, S., Acosta, G.G.: Un Enfoque Novedoso del Filtro de Mediana para el Suavizado de Señales Acústicas de Sonar de Barrido Lateral. Presented at the ARGENCON 2014, San Carlos de Bariloche-Neuquen-Argentina June 11 (2014)

  11. Chen, Zhao-Yan, Wang, Tong, Ma, Nan: Accurate baseline estimation for synthetic aperture radar-ground moving target indication systems based on co-registration and median filtering. Radar Sonar Navig. IET. 8, 607–615 (2014)

    Article  Google Scholar 

  12. Juhola, M., Katajainen, J., aRaita, T.: Comparison of algorithms for standard median filtering. IEEE Trans. Signal Process. 39, 204–208 (1991)

    Article  Google Scholar 

  13. Langsam, Y., Augenstein, J., Tenenbaum, A.: Data Structures Using C and C++. Prentice Hall, Englewood Cliffs (1995)

    MATH  Google Scholar 

  14. Corwin, E., Logar, A.: Sorting in linear time-variations on the bucket sort. J. Comput. Sci. Coll. 20, 197–202 (2004)

    Google Scholar 

  15. Thomas, C.H., Charles, L.E., Ronald, R.L., Clifford, S.: Introduction to Algorithms. MIT Press and McGraw-Hill, Cambridge (2001)

    MATH  Google Scholar 

  16. Tibshirani, R.J.: Fast Computation of the Median by Successive Binning (2008). ArXiv Prepr. arXiv:0806.3301

  17. Suomela, J.: Median Filtering is Equivalent to Sorting (2014). ArXiv Prepr. arXiv:1406.1717

  18. Huang, T., Yang, G., Tang, G.: A fast two-dimensional median filtering algorithm. IEEE Trans. Acoust. Speech Signal Process. 27, 13–18 (1979)

    Article  Google Scholar 

  19. Weiss, B.: Fast median and bilateral filtering. ACM Trans. Graph. 25, 519–526 (2006)

    Article  Google Scholar 

  20. Gil, J., Werman, M.: Computing 2-D min, median, and maxfilters. IEEE Trans. Pattern Anal. Mach. Intell. 15, 504–507 (1993)

    Article  Google Scholar 

  21. Perreault, S., Hebert, P.: Median filtering in constant time. IEEE Trans. Image Process. 16, 2389–2394 (2007)

    Article  MathSciNet  Google Scholar 

  22. Urbach, E.R., Wilkinson, M.H.F.: Efficient 2-D grayscale morphological transformations with arbitrary flat structuring elements. IEEE Trans. Image Process. 17, 1–8 (2008)

    Article  MathSciNet  Google Scholar 

  23. Alekseychuk, A.: Hierarchical recursive running median. In: 19th IEEE International Conference on Image Processing (ICIP 2012), Lake Buena Vista, Orlando, FL, USA, September 30– October 3, 2012, pp. 109–112 (2012)

  24. Huber, P.J.: Robust Statistics. Wiley, New York (1981)

    Book  MATH  Google Scholar 

  25. Kluge, W.: Abstract Computing Machines: A Lambda Calculus Perspective. Springer, Berlin (2005)

    MATH  Google Scholar 

  26. Diehl, S., Hartel, P., Sestoft, P.: Abstract machines for programming language implementation. Future Gener. Comput. Syst. 16, 739–751 (2000)

    Article  MATH  Google Scholar 

  27. Jaime, F.J., Hormigo, J., Villalba, J., Zapata, E.L.: New SIMD instructions set for image processing applications enhancement. In: 15th IEEE International Conference on Image Processing, 2008 (ICIP 2008), pp. 1396–1399 (2008)

  28. Alparone, L., Cappellini, V., Garzelli, A.: A coarse-to-fine algorithm for fast median filtering of image data with a huge number of levels. Signal Process. 39, 33–41 (1994)

    Article  MATH  Google Scholar 

  29. Acosta, G.G., Villar, S.A.: Accumulated CA-CFAR process in 2-D for online object detection from sidescan sonar data. IEEE J. Ocean. Eng. 40, 558–569 (2015)

    Article  Google Scholar 

  30. Villar, S.A., Acosta, G.G., Sousa, A.L., Rozenfeld, A.: Evaluation of an efficient approach for target tracking from acoustic imagery for the perception system of an autonomous underwater vehicle. J. Adv. Robot. Syst. InTech. 11, 1–13 (2014)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Sebastián A. Villar.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Villar, S.A., Torcida, S. & Acosta, G.G. Median Filtering: A New Insight. J Math Imaging Vis 58, 130–146 (2017).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: