Image Compression has two main forensic applications.

Double Compression

This indicates if an image has been compressed multiple times. This may not be down to forgery, and can be accidental.

Following quantisation, we can represent the values of the DCT coefficients in a histogram. This histogram will be normally distributed, with ranges based on the quantisation factor.

For single compression (with factor 3), we may have:

If the image is quantised again, with a different factor, periodic peaks or empty bins may be present:

JPEG Ghost

JPEG Ghosts can be used to identify forged images and localise the forged regions.

We utilise the properties of double compression, namely that when considering the Sum of Squared Differences between the original unquantised image and the quantised image (following dequantisation), eg:

Hence, ,

We have that an image quantised by the same (or a multiple of the other) factor have a difference in SSD of 0.

For a general image, in the pixel domain, we can calculate the quantisation error (averaged across the three colour channels) after compression at quality as such:

The difference image is first spatially averaged across a b × b pixel region and normalised to account for fluctuations in frequency differences across the image. Hence, we have: