compression op• Data kinds: image2d → images
• Call: import fullseye as fs; fs.ledger.jpeg_ghost_map(image, qualities=None, block: 'int' = 16) -> 'list' (to call the implementation directly, import imgforensics; imgforensics.jpeg_ghost_map(image, qualities=None, block: 'int' = 16) -> 'list'; from the registry, opsimgforensics.get("jpeg_ghost_map"))
JPEG ghosts (Farid 2009). A series of re-compression residual maps over a quality sweep. images.
If a region has been compressed once at quality q0, recompressing at q = q0 makes the difference in that region a valley. If the whole image has the same q0 the valley appears everywhere, but if a part compressed at a different quality has been pasted in, only that region forms a valley at a different q.
The return is len(qualities) maps of (H, W) (squared differences smoothed with a block-square box mean). Reading the valley position per pixel is the job of jpeg_ghost_quality.
Pillow required (ImportError). Same reason as for error_level_map.
Measured (tests/test_imgforensics.py::test_jpeg_ghost_finds_the_pasted_quality, 192x192 with a 64x64 patch compressed at quality 60 pasted onto a quality-92 background, sweep 40..95 step 5):
the valley of the pasted region is at quality 60 (ground truth 60, error 0), the valley of the background at quality 95. The background comes out as 95 rather than 92 because the sweep goes in steps of 5 and does not include 92; valleys only appear among the swept qualities —— qualities finer than the step cannot be read.
• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).
• Operator provenance and references — the sources of the research/methods this op family came from.
• The canonical algorithm (author, year) and its uses are named in the family usage guide above.
• image_forensics_audit — py -3.11 examples/image_forensics_audit.py
• poc_forensics_roc — py -3.11 examples/poc_forensics_roc.py
images as input)sensor_fingerprint · jpeg_ghost_quality
compression)error_level_map · jpeg_quality_estimate · jpeg_ghost_quality
*Provenance: imgforensics.py — IMGFORENSICS operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.