Robust median filtering detection based on the difference of frequency residuals

  • Wenjie Li
  • Rongrong NiEmail author
  • Xiaolong Li
  • Yao ZhaoEmail author


Recently, the detection of median filtering (MF), which is a popular nonlinear denoising manipulation, has attracted extensive attention from researchers. Several detectors with satisfying performance have been developed, while most of them need to train proper classifiers and their performance may be degraded under JPEG compression. In this paper, a training-free MF detector with single-dimensional feature is proposed based on the difference of frequency residuals, which can solve the detection issue of median filtering images under JPEG post-processing. It is designed relying on the fact that when an image is median filtered over and over again, the frequency residual obtained from continuous two images monotonically decreases. The difference between the frequency residuals obtained from the first MF and the second MF is pretty large in an unfiltered test image, while it is relatively small if the test image is a median filtered one. Thus, the unfiltered and the median filtered images are distinguishable. Furthermore, a novel strategy combining unsharp masking (USM) sharpening is implemented to suppress the effect of image content and find a universal threshold which is utilized to classify two types of images. Experimental results show that the proposed method outperforms some state-of-the-art methods at the condition of a low false alarm rate, especially when the test images are in low quality and low resolution.


Digital image forensics Median filtering JPEG compression USM sharpening False alarm rate 



This work was supported in part by the National Key Research and Development of China (2018YFC0807306), National NSF of China (61672090, 61332012, 61532005), and Fundamental Research Funds for the Central Universities (2018JBZ001).


  1. 1.
    Bas P, Filler T, Pevný T. (2011) Break our steganographic system: The ins and outs of organizing BOSS. In: International workshop on information hidingGoogle Scholar
  2. 2.
    Bovik AC (1987) Streaking in median filtered images. IEEE Trans Acoust Speech Signal Process 35(4):493–503CrossRefGoogle Scholar
  3. 3.
    Cao G, Zhao Y, Ni R (2012) Forensic identification of resampling operators: a semi non-intrusive approach. Forensic Sci Int 216(1):29–36CrossRefGoogle Scholar
  4. 4.
    Cao G, Zhao Y, Ni R, Li X (2014) Contrast enhancement-based forensics in digital images. IEEE Trans Inf Forensics Secur 9(3):515–525CrossRefGoogle Scholar
  5. 5.
    Cao G, Zhao Y, Ni R, Yu L, Tian H (2010) Forensic detection of median filtering in digital images. In: IEEE international conference on multimedia and expoGoogle Scholar
  6. 6.
    Chang CC, Lin CJ (2011) Libsvm: a library for support vector machines. ACM Trans Intell Syst Technol 2(3):27:1–27:27CrossRefGoogle Scholar
  7. 7.
    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–4710MathSciNetCrossRefGoogle Scholar
  8. 8.
    Chen CC, Chen LY, Lin YJ (2017) Block sampled matching with region growing for detecting copy-move forgery duplicated regions. J Inf Hiding Multimed Signal Process 8(1):86–96CrossRefGoogle Scholar
  9. 9.
    Ferrara P, Bianchi T, Rosa AD, Piva A (2012) Image forgery localization via fine-grained analysis of cfa artifacts. IEEE Trans Inf Forensics Secur 7(5):1566–1577CrossRefGoogle Scholar
  10. 10.
    Gonzalez R, Woods R (2002) Digital image processing. Prentice Hall, Upper Saddle RiverGoogle Scholar
  11. 11.
    Huang F, Huang J, Shi YQ (2010) Detecting double JPEG compression with the same quantization matrix. IEEE Trans Inf Forensics Secur 5(4):848–856CrossRefGoogle Scholar
  12. 12.
    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
  13. 13.
    Kirchner M, Fridrich J (2010) On detection of median filtering in digital images. In: Proceedings SPIE, media forensics and security IIGoogle Scholar
  14. 14.
    Ma Y, Luo X, Li X, Bao Z, Zhang Y (2018) Selection of rich model steganalysis features based on decision rough set α-positive region reduction. IEEE Transactions on Circuits and Systems for Video Technology published onlineGoogle Scholar
  15. 15.
    Niu Y, Zhao Y, Ni R (2017) Robust median filtering detection based on local difference descriptor. Signal Process Image Commun 53:65–72CrossRefGoogle Scholar
  16. 16.
    Pevny T, Bas P, Fridrich J (2010) Steganalysis by subtractive pixel adjacency matrix. IEEE Trans Inf Forensics Secur 5(2):215–224CrossRefGoogle Scholar
  17. 17.
    Pevny T, Ker AD (2015) Towards dependable steganalysis. In: Proceedings SPIE, media watermarking, security, and forensicsGoogle Scholar
  18. 18.
    Schaefer G, Stich M (2003) UCID: An uncompressed color image database. In: Storage and retrieval methods and applications for multimediaGoogle Scholar
  19. 19.
    Tang H, Ni R, Zhao Y, Li X (2018) Median filtering detection of small-size image based on CNN. J Vis Commun Image Represent 51:162–168CrossRefGoogle Scholar
  20. 20.
    Yuan HD (2011) Blind forensics of median filtering in digital images. IEEE Trans Inf Forensics Secur 6(4):1335–1345CrossRefGoogle Scholar
  21. 21.
    Zhang Y, Li S, Wang S, Shi YQ (2014) Revealing the traces of median filtering using high-order local ternary patterns. IEEE Signal Precess Lett 21(3):275–279CrossRefGoogle Scholar
  22. 22.
    Zhang Y, Qin C, Zhang W, Liu F, Luo X (2018) On the fault-tolerant performance for a class of robust image steganography. Signal Process 146:99–111CrossRefGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Institute of Information ScienceBeijing Jiaotong UniversityBeijingChina
  2. 2.Beijing Key Laboratory of Advanced Information Science and Network TechnologyBeijingChina

Personalised recommendations