Skip to content

JPEG Ghost

Definition

A visualisation technique introduced by Farid (2009) that reveals regions compressed at a quality factor different from the rest of the image. The image is repeatedly re-compressed at different quality factors and the pixel-wise difference from the original is computed. A pasted region that was originally saved at quality Q will show minimum difference when recompressed at Q, creating a visible ghost of its extent against the surrounding area.

Introduced by
Hany Farid, 2009
Detects
Regions saved at a different JPEG quality than the rest of the image
Method
Repeated recompression at varying quality factors, pixel-wise difference
Output
Visual map showing a ghosted outline of the pasted region

Common questions

Why does a pasted region show a minimum difference at its original quality factor?+

When a region is recompressed at the same quality factor it was originally saved at, the quantisation losses largely repeat rather than compound, so the pixel difference from the current image drops to a local minimum. Recompressing at any other quality factor introduces additional loss, so the difference rises, making the boundary of the pasted region visible.

Does JPEG ghost detection work on images that were never saved as JPEG more than once?+

No. The technique depends on a splice having been compressed at a different quality factor than its surrounding image and then resaved together, which only happens through at least one round of double compression. A single-generation JPEG with no forged splice will not show a meaningful ghost.

Related terms

Double JPEG Compression
The situation where an image has been JPEG-encoded, decoded to a bitmap, and then JPEG-encoded again. The second quantisation step leaves a...
Quantisation Table
A matrix of 64 integer divisors, one per DCT coefficient position, that controls how much each frequency component is rounded during JPEG...
Block Grid Phase
The horizontal and vertical offset of the 8x8 encoding grid relative to the image coordinate origin. A phase of (0,0) means the...
Blocking Artefacts
Visible rectangular discontinuities at 8x8 block boundaries, caused by independent quantisation of adjacent blocks. At splice boundaries, misaligned block grids produce a...
Blocking Artifact
A visual discontinuity at the boundary between two adjacent 8x8 blocks in a JPEG image, caused by independent quantisation of each block....
DCT (Discrete Cosine Transform)
The mathematical transformation applied to each 8x8 pixel block during JPEG compression, converting spatial pixel values into a set of frequency coefficients...
Discrete Cosine Transform (DCT)
A mathematical transform that expresses a block of pixel values as a sum of cosine functions at different frequencies. JPEG applies the...
Quality Factor
The 1-100 scale that most JPEG encoders expose to the user, controlling how aggressively the quantisation table rounds coefficients. The factor is...

Explained in these topics

Your journey to becoming a forensic professional starts here.

Practice with mock tests, learn from structured notes, and get your questions answered by a global forensic community, all in one place.