Skip to main content
Log in

In-camera JPEG compression detection for doubly compressed images

  • Published:
Multimedia Tools and Applications Aims and scope Submit manuscript

Abstract

An illicit photography work can be exposed by its unusual compression history. Our work aims at revealing the primary JPEG compression of a camera image especially when it has undergone an out-camera JPEG compression. The proposed method runs a recompression operator on a given image using a chosen software tool (MATLAB). We measure the JPEG error between the given image and the recompressed version in the Y, Cb and Cr color channels. The in-camera compression can be easily identified by drawing the JPEG error curves. In this paper a simple and high effective method is presented for automatically detecting the compression history of an image. For a doubly compressed image, the proposed method can give the historical compression sequence with the corresponding quality factors and determine whether the first compression is the in-camera compression. Experimental results, carried out on two datasets, show that the proposed method can yield satisfactory detection accuracy, over 96 % accuracy rate for in-camera compression and no false positives with a block size of 512 × 512. The proposed method has universality. It can be applied to multi-compression detection and is robust to different sources of out-camera compression, e.g. Adobe Photoshop. This makes it more practical compared to the previous methods of double compression.

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
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

References

  1. Bas FTP, Pevny T (2011) Break our steganographic system - the ins and outs of organizing BOSS. In: Proceeding Information Hiding Conference. pp 59–70

  2. Calvin H (2012) JPEGsnoop_v1_6_0. http://www.impulseadventure.com/photo/jpeg-snoop-options.html

  3. Chen SYC, Su W (2008) A machine learning based scheme for double jpeg compression detection. In: International conference on pattern recognition. pp 1–4

  4. Cox MMIJ, Bloom J (1999) Digital watermarking, 2002. Morgan Kaufmann

  5. Fan Z, de Queiroz R (2003) Identification of bitmap compression history: JPEG detection and quantizer estimation. IEEE Trans Image Process 12(2):230–235

    Article  Google Scholar 

  6. Farid H (2009) Exposing digital forgeries from JPEG ghosts. IEEE Trans Inf Forensic Secur 4(1):154–160

    Article  MathSciNet  Google Scholar 

  7. Fridrich GMJ, Hogea D (2003) Steganalysis of jpeg images: breaking the f5 algorithm. In: Information hiding. Springer, pp 310–323

  8. Fu SYD, Su W (2007) A generalized benford’s law for jpeg coefficients and its applications in image forensics. SPIE electronic imaging: security, steganography, and watermarking of multimedia contents

  9. Hamdy EMHRMS, Kahlifa E (2010) Quantization table estimation in JPEG images. Int J Adv Comput Sci Appl 1(6):17–23

    Google Scholar 

  10. Hamilton E (1992) JPEG file interchange format. http://www.jpeg.org/public/jfif.pdf

  11. He LZWLJ, Tang X (2006) Detecting doctored JPEG images via dct coefficient analysis. In: European conference on computer vision. pp 423–435

  12. Huang HJF, Shi Y (2010) Detecting double jpeg compression with the same quantization matrix. IEEE Trans Inf Forensic Secur 5(4):848–856

    Article  Google Scholar 

  13. Jain A (1989) Fundamentals of digital image processing. Prentice-Hall, Inc

  14. Katzenbeisser S, Petitolas F (2000) Information hiding techniques for steganography and digital watermaking. Taylor & Francis

  15. Kee JME, Farid H (2011) Digital image authentication from JPEG headers. IEEE Trans Inf Forensic Secur 99:1–1

    Google Scholar 

  16. Kormblum J (2008) Using jpeg quantization tables to identify imagery processed by software. In: Proceedings digital forensic workshop. ELSEVIER, pp 21–25

  17. Li SYB, Huang J (2008) Detecting doubly compressed jpeg images by using mode based first digit features. In: IEEE workshop on multimedia signal processing. pp 730–735

  18. Lin CMG, Chen Y (2011) A passive-blind forgery detection scheme based on content-adaptive quantization table estimation. IEEE Trans Circ Syst Vid Technol 99:1–1

    Google Scholar 

  19. Lin HJTXZ, Tang C (2009) Fast, automatic and fine-grained tampered jpeg image detection via dct coefficient analysis. Pattern Recog 42(11):2492–2501

    Article  MATH  MathSciNet  Google Scholar 

  20. Lukáš J, Fridrich J (2003) Estimation of primary quantization matrix in double compressed JPEG images. In: Proceedings digital forensic research workshop. pp 5–8

  21. Luo HJW, Qiu G (2010) Jpeg error analysis and its applications to digital image forensics. IEEE Trans Inf Forensic Secur 5(3):480–491

    Article  Google Scholar 

  22. Milani TMS, Tubaro S (2012) Discriminating multiple jpeg compression using first digit features. In: IEEE international conference on acoustics, speech, and signal processing

  23. Ng TT, Chang SF (2004) A model for image splicing. In: IEEE International Conference on Image Processing (ICIP)

  24. Pevnỳ T, Fridrich J (2008) Estimation of primary quantization matrix for steganalysis of double-compressed jpeg images. In: Proceedings SPIE, electronic imaging, security, forensics, steganography, and watermarking of multimedia contents X 6819:11

  25. Popescu A, Farid H (2005) Statistical tools for digital forensics. In: Information hiding. Springer, pp 395–407

  26. Robertson M, Stevenson R (2005) Dct quantization noise in compressed images. IEEE Trans Circ Syst Vid Technol 15(1):27–38

    Article  Google Scholar 

  27. Sutthiwan SYZHNTP, Su W (2011) Markovian rake transform for digital image tampering detection. In: Transactions on data hiding and multimedia security VI. pp 1–17

  28. Ye SQS, Chang E (2007) Detecting digital image forgeries by measuring inconsistencies of blocking artifact. In: IEEE international conference on multimedia and expo. pp 12–15

Download references

Acknowledgments

All authors thank Prof. Shi at New Jersey Institute of Technology and all members of his team for their generous help. We thank Dr. NG and Ramanpreet Singh Pahwa at A*STAR, Singapore, for their helpful discussions and valuable comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Rong Zhang.

Additional information

This work was supported in part by the National Natural Science Foundation of China (NSFC: 61170137, 61175026), Doctoral Fund of Ministry of Education of China (20103305 110002), Zhejiang Province Technology Innovation Team of China (New Generation of Mobile Internet Client Software, 2010R50009), Open Research Fund of Zhejiang First-foremost Key Subject-Information and Communications Engineering of China(XKXL1316). Also, this work is sponsored by K.C.Wong Magna Fund in Ningbo University.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Zhang, R., Wang, RD. In-camera JPEG compression detection for doubly compressed images. Multimed Tools Appl 74, 5557–5575 (2015). https://doi.org/10.1007/s11042-014-1868-7

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11042-014-1868-7

Keywords

Navigation