I-241JPEG Artifact Spectrum

Frequency Analysisimage2007

Analyzes spectral characteristics of JPEG compression artifacts for double-compression and AI post-processing detection.

JPEG Artifact Spectral Analysis
This method analyzes the spectral characteristics of JPEG compression artifacts to detect double compression, manipulation, and AI-generated content:1. DCT Coefficient Histogram Analysis: The image is decomposed into 8×8 blocks, and the DCT is applied to each block. For single-compressed JPEG images, the DCT coefficient histogram shows regular peaks at multiples of the quantization step size Q(u,v). The method analyzes all 64 DCT frequency positions and checks whether the histogram peaks align with the embedded quantization table. Misalignment indicates the image was decompressed and recompressed with a different quality factor.2. Double Quantization Detection: When a JPEG image is decompressed, modified, and recompressed, the DCT coefficients undergo double quantization. This creates periodic artifacts in the DCT histogram with a period equal to the primary quantization step Q1. The method detects these periodic perturbations using a DFT of the DCT histogram and identifies peaks at frequency 1/Q1, enabling estimation of the original (primary) quality factor.3. Blocking Artifact Spectrum: JPEG compression creates blocking artifacts at 8×8 block boundaries. The method computes a 1D power spectrum of the horizontal and vertical pixel differences at every 8th row/column. For manipulated regions within a JPEG image, blocking artifact intensity varies between authentic (consistent with the JPEG quality) and inserted (different blocking pattern) regions.4. Quantization Table Forensics: Each camera manufacturer and software uses characteristic quantization tables. The method extracts the 8×8 luminance and chrominance quantization tables from the JPEG header and compares them against a database of 1000+ known quantization tables. This identifies the software or camera that performed the last JPEG compression, which can reveal editing history.
DCT block size: 8×8 (JPEG standard)
DCT histogram bins: 2048 (coefficient range -1024 to 1023)

Double compression detection: DFT of DCT histogram

Quantization table database: 1000+ known tables

Blocking artifact measurement: power spectrum at f = 1/8

Minimum image size: 64×64 pixels
85–93% accuracy for double JPEG compression detection. Primary quality factor estimation accuracy within ±2 QF in 90% of cases. Quantization table matching achieves 92% software/camera identification. Blocking artifact analysis detects localized manipulation with F1-score of 0.84. Performance is specific to JPEG format.
• Double JPEG detection is one of the most reliable image forensic techniques
• Quantization table forensics provides camera/software identification

• Primary quality factor estimation enables processing history reconstruction

• Works even on heavily compressed images (low quality factors)

• Well-established with extensive validation across forensic benchmarks
• Only applicable to JPEG format — PNG, WebP, AVIF images cannot be analyzed
• Same-quality recompression (Q1 = Q2) leaves minimal double compression artifacts

• AI-generated images saved as JPEG show only single compression artifacts

• Very high quality factors (Q > 95) produce minimal quantization artifacts

• Some editing software uses non-standard quantization tables not in the database
Detecting double JPEG compression indicating image manipulation. Identifying the original JPEG quality before re-saving. Determining which software or camera performed the JPEG compression. Localizing tampered regions through inconsistent JPEG artifact analysis.