Multimedia Tools and Applications

, Volume 77, Issue 7, pp 7931–7953 | Cite as

Detecting median filtering via two-dimensional AR models of multiple filtered residuals

  • Jianquan Yang
  • Honglei Ren
  • Guopu Zhu
  • Jiwu Huang
  • Yun-Qing Shi


Median filtering, being an order statistic filtering, has been widely used in image denoising and recently also in image anti-forensics and anti-steganalysis. In the past few years, several methods have been developed for median filtering detection. However, it is still a challenging task to detect median filtering in JPEG compressed images. In this paper, we propose a novel method to solve this challenging task. We first generate median filtered residual (MFR), average filtered residual (AFR) and Gaussian filtered residual (GFR) by calculating the differences between an original image and its filtered images. Then, we propose to use two-dimensional autoregressive (2D-AR) model to characterize MFR, AFR and GFR separately, and further combine the 2D-AR coefficients of these three residuals into a set of features. Finally, the extracted feature set is fed into a support vector machine classifier for training and detection. Extensive experiments have demonstrated that compared with existing methods, the proposed one can achieve a considerable improvement in detecting median filtering in heavily compressed images.


Image forensics Median filtering detection Autoregressive (AR) model Filtered residual 



The authors appreciate the anonymous reviewers for their constructive comments. This work was supported in part by the National Natural Science Foundation of China under Grant 61572489 and Grant 61672554, and in part by the Youth Innovation Promotion Association of CAS under Grant 2015299.


  1. 1.
    Bas P, Filler T, Pevný T (2011) Break our steganographic system: the ins and outs of organizing BOSS Information hiding. Springer, Berlin, pp 59–70CrossRefGoogle Scholar
  2. 2.
    Bovik AC (1987) Streaking in median filtered images. IEEE Trans Acoust Speech Signal Process 35(4):493–503CrossRefzbMATHGoogle Scholar
  3. 3.
    Chen J, Kang X, Liu Y, Wang ZJ (2015) Median filtering forensics based on convolutional neural networks. IEEE Signal Process Lett 22(11):1849–1853CrossRefGoogle Scholar
  4. 4.
    Chen C, Ni J, Huang J (2013) Blind detection of median filtering in digital images: a difference domain based approach. IEEE Trans Image Process 22 (12):4699–4710MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Cao G, Zhao Y, Ni R, Yu L, Tian H (2010) Forensic detection of median filtering in digital images Proceedings IEEE Int. Conf. Multimedia and Expo, pp 89–94Google Scholar
  6. 6.
    Dang-Nguyen D-T, Gebru ID, Conotter V, Boato G, De Natale FGB (2013) Counter-forensics of median filtering Proceedings IEEE Int. Workshop on Multimedia Signal Processing, pp 260–265Google Scholar
  7. 7.
    Dirik AE, Memon N (2009) Image tamper detection based on demosaicing artifacts Proceedings IEEE Int. Conf. Image Processing, pp 1497–1500Google Scholar
  8. 8.
    Dang-Nguyen D-T, Pasquini C, Conotter V, Boato G (2015) RAISE: a raw images dataset for digital image forensics Proceedings 6th ACM Multimedia Systems Conference, pp 219–224Google Scholar
  9. 9.
    Fan Z, de Queiroz RL (2003) Identification of bitmap compression history: JPEG detection and quantizer estimation. IEEE Trans Image Process 12(2):230–235Google Scholar
  10. 10.
    Fan W, Wang K, Cayre F, Xiong Z (2015) Median filtered image quality enhancement and anti-forensics via variational deconvolution. IEEE Trans Inf Forensics Secur 10(5):1076–1091CrossRefGoogle Scholar
  11. 11.
    Farid H (2009) Image forgery detection. IEEE Signal Proc Mag 26:16–25CrossRefGoogle Scholar
  12. 12.
    Fontani M, Barni M (2012) Image tamper detection based on demosaicing artifacts Proceedings 20th European Signal Processing Conference, pp 1239–1243Google Scholar
  13. 13.
    Fridrich J, Kodovsky J (2012) Rich models for steganalysis of digital images. IEEE Trans Inf Forensics Secur 7(3):868–882CrossRefGoogle Scholar
  14. 14.
    Fu D, Shi YQ, Su W (2007) A generalized Benford’s law for JPEG coefficients and its applications in image forensics Proceedings SPIE, Electronic Imaging, Security and Watermarking of Multimedia Contents IX, vol 6505, pp 1L1–1L11Google Scholar
  15. 15.
    Furon T, Bas P (2008) Broken arrows. EURASIP J Inf Secur 2008, p 3Google Scholar
  16. 16.
    Gloe T, Böhme R The Dresden Image Database for benchmarking digital image forensics Proceedings 25th Symposium On Applied Computing (ACM SAC 2010), vol 2, pp 1585–1591Google Scholar
  17. 17.
    Gonzalez RC, Woods RE (2002) Digital image processing. Upper Saddle River NJ: Prentice-hallGoogle Scholar
  18. 18.
    Kang X, Li Y, Qu Z, Huang J (2012) Enhancing source camera identification performance with a camera reference phase sensor pattern noise. IEEE Trans Inf Forensics Secur 7(2):393–402CrossRefGoogle Scholar
  19. 19.
    Kang X, Stamm MC, Peng A, Liu KJR (2013) Robust median filtering forensics using an autoregressive model. IEEE Trans Inf Forensics Secur 8(9):1456–1468CrossRefGoogle Scholar
  20. 20.
    Kashyap RL (1984) Characterization and estimation of two-dimensional arma models. IEEE Trans Inf Theory 30(25):736–745MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Kee E, Farid H (2011) A perceptual metric for photo retouching. Proc Natl Acad Sci 108(50):19907–19912CrossRefGoogle Scholar
  22. 22.
    Kirchner M, Böhme R (2008) Hiding traces of resampling in digital images. IEEE Trans Inf Forensics Secur 3(4):582–592CrossRefGoogle Scholar
  23. 23.
    Kirchner M, Fridrich J (2010) On detection of median filtering in digital images Proceedings SPIE, Electronic Imaging, Media Forensics and Security II, vol 7541, pp 1–12Google Scholar
  24. 24.
    Lai Y-N, Gao T-G, Li J-X, Sheng G-R (2015) Forensic detection of median filtering in digital images using the coefficient-pair histogram of DCT value and LBP pattern Proceedings Int Conf Intelligent, pp 421–432Google Scholar
  25. 25.
    Lin Z, He J, Tang X, Tang C-K (2009) Fast, automatic and fine-grained tampered JPEG image detection via DCT coefficient analysis. Pattern Recogn 42 (11):2492–2501CrossRefzbMATHGoogle Scholar
  26. 26.
    Lukas J, Fridrich J, Goljan M (2006) Digital camera identification from sensor pattern noise. IEEE Trans Inf Forensics Secur 1(2):205–214CrossRefGoogle Scholar
  27. 27.
    (2002). Natural resources conservation service photo gallery,, United States Department of Agriculture
  28. 28.
    Pasquini C, Boato G, Alajlan N, De Natale FGB (2016) A deterministic approach to detect median filtering in 1D data. IEEE Trans Inf Forensics Secur 11 (7):1425–1437CrossRefGoogle Scholar
  29. 29.
    Pevný T, Bas P, Fridrich J (2010) Steganalysis by subtractive pixel adjacency matrix. IEEE Trans Inf Forensics Secur 5(2):215–224CrossRefGoogle Scholar
  30. 30.
    Piva A (2013) An overview on image forensics, ISRN Signal Processing, vol. 2013Google Scholar
  31. 31.
    Popescu AC, Farid H (2004) Exposing digital forgeries by detecting duplicated image regions, Dept Comput Sci, Dartmouth College, Tech Rep TR2004-515Google Scholar
  32. 32.
    Qiu X, Li H, Luo W, Huang J (2014) A universal image forensic strategy based on steganalytic model Proceedings 2nd ACM Workshop on Information hiding and multimedia security, pp 165–170Google Scholar
  33. 33.
    Rocha A, Scheirer W, Boult T, Goldenstein S (2011) Vision of the unseen: Current trends and challenges in digital image and video forensics. ACM Comput Surv 43(4):Article 26CrossRefGoogle Scholar
  34. 34.
    Schaefer G, Stich M (2004) UCID: An Uncompressed color image database Proceedings SPIE 5307, Storage and Retrieval Methods and Applications for Multimedia, vol 5307, pp 472–480Google Scholar
  35. 35.
    Stamm MC, Liu KJR (2011) Anti-forensics of digital image compression. IEEE Trans Inf Forensics Secur 6(3):1050–1065CrossRefGoogle Scholar
  36. 36.
    Wu Z-H, Stamm MC, Liu KJR (2013) Anti-forensics of median filtering Proceedings IEEE Int. Conf. acoustics, Speech, Signal Process, pp 3043–3047Google Scholar
  37. 37.
    Yuan H-D (2011) Blind forensics of median filtering in digital images. IEEE Trans Inf Forensics Secur 6(4):1335–1345CrossRefGoogle Scholar
  38. 38.
    Yang J, Xie J, Zhu G, Kwong S, Shi YQ (2014) An effective method for detecting double JPEG compression with the same quantization matrix. IEEE Trans Inf Forensics Secur 9(11):1933–1942CrossRefGoogle Scholar
  39. 39.
    Zhang Y, Li S, Wang S, Shi YQ (2014) Revealing the traces of median filtering using high-order local ternary patterns. IEEE Signal Process Lett 21(3):275–279CrossRefGoogle Scholar
  40. 40.
    Zeng H, Qin T, Kang X, Liu L (2014) Countering anti-forensics of median filtering Proceedings IEEE Int Conf acoustics, Speech, Signal Process, pp 2704–2708Google Scholar

Copyright information

© Springer Science+Business Media New York 2017

Authors and Affiliations

  1. 1.Shenzhen Institutes of Advanced TechnologyChinese Academy of SciencesShenzhenChina
  2. 2.Shenzhen College of Advanced TechnologyUniversity of Chinese Academy of SciencesShenzhenChina
  3. 3.State Key Laboratory of Information Security, Institute of Information EngineeringChinese Academy of SciencesBeijingChina
  4. 4.College of Information EngineeringShenzhen UniversityShenzhenChina
  5. 5.Department of Electrical and Computer EngineeringNew Jersey Institute of TechnologyNewarkUSA

Personalised recommendations