A Countermeasure against Double Compression Based Image Forensic

Shen Wang, Xiamu NiuIEICE 2012 · DOI

Abstract: Compressing a JPEG image twice will greatly decrease the values of some of its DCT coefficients. This effect can be easily detected by statistics methods. To defend this forensic method, we establish a model to evaluate the security and image quality influenced by the re-compression. Base on the model, an optimized adjustment of the DCT coefficients is achieved by Genetic Algorithm. Results show that the traces of double compression are removed while preserving image quality.

Introduction: The Forensic Trace of Double Compression

In digital forensics, JPEG images often contain hidden evidence of their history. When an image is edited and re-saved—a process known as double compression—it leaves a distinct statistical signature. Specifically, the quantization process in the second compression creates periodic "gaps" or abnormalities in the histogram of Discrete Cosine Transform (DCT) coefficients. Forensic algorithms, such as the well-known Fridrich method, exploit these artifacts to detect manipulation.

Figure 1: Histograms of DCT coefficients for (a) single-compressed and (b) double-compressed images. The periodic gaps in (b) serve as a forensic fingerprint.

Proposed Countermeasure: Healing the Histogram

The authors propose a counter-forensic technique designed to "heal" these statistical abnormalities. The goal is to adjust the DCT coefficients of a double-compressed image so that its histogram matches the smooth distribution of a single-compressed original, thereby evading detection.

Dual-Objective Optimization

The challenge lies in balancing two conflicting goals:

  1. Security: Restoring the statistical distribution to a natural Laplacian shape to pass forensic tests (measured by Pearson’s chi-square test).
  2. Image Quality: Ensuring that changes to the coefficients do not introduce visible artifacts. The researchers utilized Watson’s perceptual error metric, which accounts for human vision sensitivities like luminance and contrast masking, rather than relying solely on simple metrics like PSNR.

Genetic Algorithm (GA) Optimization

To find the optimal set of coefficient adjustments, the paper employs a Genetic Algorithm. The GA treats the problem as an evolutionary process, where "chromosomes" represent potential adjustment strategies. Through iterative cycles of selection, crossover, and mutation over thousands of generations, the algorithm converges on a solution that fills the histogram gaps with minimal impact on visual fidelity.

Key Results and Evaluation

The algorithm was tested on the standard "walkbridge" grayscale image. The results demonstrate that the GA-based approach effectively removes the traces of double compression.

Figure 5: Comparison of images and DCT histograms for (a) single compression, (b) double compression, and (c) the proposed countermeasure. The GA successfully restores the smooth histogram shape in column (c).

As shown in Figure 5, the periodic gaps introduced by re-compression (column b) are successfully filled in the optimized version (column c). Quantitatively, the optimized image achieved a PSNR of 34.3 dB. While slightly lower than the 37.1 dB of a standard re-compressed image, the visual difference is negligible due to the integration of Watson's perceptual model. Most importantly, the resulting images met the security criteria ($\chi^2 < \chi^2_{0.05}$), effectively bypassing standard forensic detection tools.

Conclusion

This research provides a robust framework for counter-forensics in JPEG images. By framing the problem as a multi-objective optimization and leveraging Genetic Algorithms, the authors demonstrate that it is possible to mathematically "hide" the evidence of image manipulation while maintaining high perceptual quality. Future work will focus on improving algorithm stability and extending the method to color images and more complex compression scenarios.

Summary updated

Abstract

Compressing a JPEG image twice will greatly decrease the values of some of its DCT coefficients. This effect can be easily detected by statistics methods. To defend this forensic method, we establish a model to evaluate the security and image quality influenced by the re-compression. Base on the model, an optimized adjustment of the DCT coefficients is achieved by Genetic Algorithm. Results show that the traces of double compression are removed while preserving image quality.
BibTeX
@inproceedings{wang2012countermeasure,
  author = {Shen Wang and Xiamu Niu},
  title = {{A Countermeasure against Double Compression Based Image Forensic}},
  booktitle = {IEICE},
  year = {2012},
  doi = {10.1587/transinf.e95.d.2577},
}
Figure