I-212JPEG Quantization Table Analysis
Analyzes JPEG quantization table values for manufacturer fingerprinting and double-compression detection (Fan & de Queiroz, 2003).
Algorithm / Model
Quantization Table Forensics
How it works
This method examines the 8×8 quantization tables embedded in JPEG files to identify the source software/camera and detect recompression:\n\n1. Quantization Table Extraction: The luminance (Y) and chrominance (Cb, Cr) quantization tables are extracted from the JPEG file header (DQT marker segment). Each table contains 64 values corresponding to the quantization step sizes for each DCT frequency component. The standard JPEG tables from Annex K of ISO/IEC 10918-1 are scaled by a quality factor Q, where Q(u,v) = round(S(u,v) × α) with α determined by the quality setting.\n\n2. Source Identification via Table Matching: Different cameras, smartphones, and image editing software use distinct quantization tables. The method maintains a database of known quantization tables from major manufacturers (Canon, Nikon, Sony, Apple, Samsung, Adobe Photoshop, GIMP, etc.). The extracted table is compared against the database using normalized L2 distance. An exact match identifies the encoding source with high confidence.\n\n3. Quality Factor Estimation: For standard JPEG tables, the quality factor Q (1–100) can be reverse-engineered from the quantization values. The method uses the relationship between the standard table S and actual table T: if T(0,1) = round(S(0,1) × (200 - 2Q) / 200) for Q ≥ 50, or T(0,1) = round(S(0,1) × 50 / Q) for Q < 50. Non-standard tables (e.g., from Photoshop) are flagged and matched to their specific source.\n\n4. Double Compression Detection: When an image is saved as JPEG, edited, then re-saved, the quantization tables from the second save overwrite the first. However, the DCT coefficient distribution retains artifacts from the primary quantization. The method analyzes the histogram of DCT coefficients: for single compression with step Q, coefficients cluster at multiples of Q. For double compression (Q1 then Q2), a characteristic comb-like pattern appears with periodicity related to Q1/Q2.
Technical Parameters
Quantization table size: 8×8 (64 values per table)\nTable count: 2–4 per JPEG (luminance + chrominance)\nDatabase size: 1500+ known quantization tables\nQuality factor range: 1–100\nMatching threshold: L2 distance < 0.01 for exact match\nMinimum file size: valid JPEG with DQT marker
Accuracy & Reliability
94% source identification accuracy when table exists in database. Quality factor estimation within ±1 for standard tables (99% accuracy). Double compression detection: 88–92% accuracy with < 5% false positive rate. Non-standard table detection: 96% precision.
Strengths
• Quantization tables provide a reliable camera/software fingerprint\n• Quality factor estimation is deterministic for standard tables\n• Double compression detection is mathematically well-founded\n• Analysis requires only JPEG header — extremely fast (< 1ms)\n• Non-destructive analysis preserves the original file
Limitations
• Only works with JPEG format — not applicable to PNG, WebP, HEIF\n• Some cameras use identical quantization tables (e.g., same JPEG library)\n• Re-saving at the same quality factor reduces double compression artifacts\n• AI-generated images saved as JPEG show standard tables from the saving software\n• Stripped metadata (e.g., social media uploads) may remove DQT markers in rare cases
Use Case
Identifying which camera or software created/last saved a JPEG image. Detecting double JPEG compression indicating post-capture editing. Estimating original JPEG quality factor for processing history analysis. Forensic authentication of JPEG images in legal contexts.