3 ms·
Could you do this over a sliding window and calculate a score for regions? That would let you see if something has been composited from up scaled images.
by joshu 11y ago
Could you do this over a sliding window and calculate a score for regions? That would let you see if something has been composited from up scaled images.
- 0x09 11y agoThat's exactly how it works. The example doesn't show more than one, but it will return multiple resolutions ranked with a confidence percent (the meaning of which depends on the method) as long as it's above a reasonable threshold. Usually multiple results are a misdetection -- for example heavily compressed JPEGs will mess it up pretty badly: $ convert Lenna.png -quality 50 Lenna.jpg $ resdet Lenna.jpg given: 512x512 best guess: 448x384 all width height 448 (77.49%) 384 (90.19%) 384 (66.99%) 448 (89.78%) 320 (60.68%) 320 (72.54%) 388 (55.92%) 256 (56.43%) 445 (55.49%) 345 (55.47%) 242 (55.06%) (the block-based nature of JPEG compression/quantization creates a similar zeroing effect along every 1/8 of the spectrum)
- joshu 11y agoSure. But I meant for each region, show the underlying resolution of that area. So like for FFT of a whole sample vs FFT of short periods to make a spectrogram.