ResAIKit
Research Integrity Toolkit
Back to the encyclopedia
M9Image forensicsMicroscopyLayer 1 (Deterministic)

Resampling Detection

Detects whether an image was resized or rotated after capture, the geometric step a forger uses to make a pasted region fit. Interpolation makes the variance of the second derivative periodic, so the indicator reads the spread of that variance across blocks and the strength of a periodic peak in the directional second-derivative profile.

Technical description

Takes the Laplacian as the discrete second derivative and reads two signals. The primary signal is the coefficient of variation of the Laplacian variance over 8 by 8 blocks, block_cv = std(bv)/mean(bv), which widens when interpolation modulates the local roughness. The corroborating signal is periodicity: the mean absolute Laplacian along each axis is detrended, its real-FFT magnitude taken, the slow-trend bins dropped, and the largest remaining magnitude expressed as robust standard deviations above the median, peak_sigma = (max - median)/(1.4826 MAD). A block_cv above 0.22 adds 3 and above 0.20 adds 1; a peak_sigma above 6.0 adds 2. The score is min(5.0, 1.0 + 0.5 * units).

How it works

Layer 1 (deterministic): filters with the Laplacian, computes the coefficient of variation of the per-block second-derivative variance, and measures the periodic peak strength of the directional |Laplacian| profile via a 1D FFT. A widened block-variance CV (above 0.20, strongly above 0.22) and a clear periodic peak (sigma above 6.0) each add evidence units; the score is 0 with no evidence and min(5.0, 1.0 + 0.5 * units) otherwise.

Why this matters

Resizing and rotation are almost unavoidable when a region is taken from one image and made to fit another, so detecting resampling is a direct sign of geometric editing after capture. Interpolation imposes a fixed periodic correlation between pixels, which makes the variance of the second derivative periodic with the resampling factor. Combining fields of view, aligning panels, or matching magnifications all require resampling, while an honest single capture carries none of these traces, so the periodic interpolation fingerprint flags that the pixels were transformed.

Score thresholds

0-1
The second-derivative variance is uniform and aperiodic, consistent with an image that was not resampled
2-3
A widened second-derivative variance or a periodic interpolation peak, indicating likely resizing or rotation
4-5
Both a widened variance and a clear periodic interpolation peak, strong evidence of resampling

Limitations

The block-variance signal is content-dependent, so a genuinely textured image can raise the coefficient of variation without resampling, which is why the periodic peak is used as an independent corroborating cue. The peak is clearest for integer or simple rational factors and sharp content; a small fractional resize, heavy noise, or strong compression can hide it, and JPEG imposes its own 8-pixel periodicity. The thresholds are directional, and the screen returns a single global verdict rather than localizing a region. The general frequency-domain screen for synthetic-generation fingerprints is indicator I2; M9 is specific to the periodic interpolation trace of resizing and rotation in the second derivative.

References

  1. Popescu AC, Farid H. (2005). Exposing digital forgeries by detecting traces of resampling. IEEE Transactions on Signal Processing 53(2):758-767
  2. Gallagher AC. (2005). Detection of linear and cubic interpolation in JPEG compressed images. Proceedings of the 2nd Canadian Conference on Computer and Robot Vision (CRV'05)
  3. Mahdian B, Saic S. (2008). Blind authentication using periodic properties of interpolation. IEEE Transactions on Information Forensics and Security 3(3):529-538