I-229Compression Ghost Mapping
Creates multi-quality JPEG compression ghost maps to identify regions with mismatched compression histories. When a JPEG image is re-saved at a different quality level, previously compressed and freshly inserted regions respond differently — the ghost map visually highlights these inconsistencies as bright or dark regions.
Algorithm / Model
JPEG Ghost Detection via Multi-Quality Recompression Difference Mapping
How it works
The JPEG ghost technique exploits the idempotent property of JPEG compression: when a JPEG image is recompressed at the same quality level it was originally saved at, the difference between the original and recompressed versions is minimal (near-zero 'ghost'). At different quality levels, the difference is significant.The algorithm recompresses the suspect image at multiple JPEG quality levels (Q = 50, 55, 60, ..., 95) and computes the per-block squared difference between each recompressed version and the original. For each quality level, a 'ghost map' is generated showing the spatial distribution of recompression error. In single-compressed authentic images, the ghost map at the original quality level shows uniformly low values across the entire image.When a region has been spliced from a differently-compressed source, it will show a different minimum-ghost quality level than the rest of the image. The detector identifies these spatial inconsistencies: (1) Per-block ghost energy — the sum of squared differences in each 8×8 DCT block across all tested quality levels. (2) Per-block minimum-ghost quality — the quality level at which each block's ghost energy is minimized. (3) Consistency analysis — statistical testing (chi-square) for bimodal distribution in the minimum-ghost quality map, indicating multiple compression histories.
Technical Parameters
Quality range: Q = 50 to 95 (step 5)
Block size: 8×8 (JPEG DCT block)
Difference metric: sum of squared differences per block
Ghost threshold: block energy < 10% of mean
Consistency test: chi-square test on quality-level histogram
Visualization: heatmap of per-block ghost energy at detected quality
Block size: 8×8 (JPEG DCT block)
Difference metric: sum of squared differences per block
Ghost threshold: block energy < 10% of mean
Consistency test: chi-square test on quality-level histogram
Visualization: heatmap of per-block ghost energy at detected quality
Accuracy & Reliability
High — 78-90% accuracy for detecting double JPEG compression with different quality levels. Less effective when original and spliced sources share similar compression parameters.
Strengths
• Produces highly visual and interpretable forensic evidence — ghost maps clearly show manipulated regions
• Based on well-understood DCT/quantization mathematics with strong theoretical foundation
• Can determine the original compression quality level of both the host and spliced content
• Effective even when the spliced region has been carefully blended at the pixel level
• Based on well-understood DCT/quantization mathematics with strong theoretical foundation
• Can determine the original compression quality level of both the host and spliced content
• Effective even when the spliced region has been carefully blended at the pixel level
Limitations
• Only works on JPEG-compressed images — PNG, WebP, and other formats produce no ghosts
• Fails when both source and target share the same JPEG quality level
• High-quality compression (Q > 95) leaves very subtle traces that may be below detection threshold
• Social media platforms re-encode uploaded images, adding additional compression history that complicates analysis
• Fails when both source and target share the same JPEG quality level
• High-quality compression (Q > 95) leaves very subtle traces that may be below detection threshold
• Social media platforms re-encode uploaded images, adding additional compression history that complicates analysis
Use Case
Detecting image splicing through JPEG compression history inconsistency, identifying double JPEG compression (indicator of manipulation), forensic analysis of images constructed from multiple sources saved at different quality levels, and visual evidence generation for copyright and legal proceedings.