For anyone interested in this area, the IEEE Transactions on Information Forensics and Security (TIFS) [1] is full of papers on the so-called area of image forensics -- the identification of processing that has been performed upon an image, including resampling, rotation, JPEG compression, block processing, and more.
Consequently, another hot research area is image anti-forensics -- the obfuscation of such operations to avoid detection. (Shameless self-promotion: one example paper on anti-forensics of JPEG compression can be found here [2].)
This is fantastic, and I was just wondering if something like existed a week ago. Sometimes I need to find the original picture of a thumbnail on the internet, so I use Google reverse image search to search for other sizes of my uploaded image. However, some websites simply upscale the low quality image in order to be at the top of the search results. I wonder if Google can use a technology like this to place those results on a lower ranking.
Interesting, is that how google rev img search works?
I was trying to find a usecase for this tech. I thought google maybe hashed files and searched thatway, but thumbnails dont always turn up results. I thought maybe they just used pagesource data or metadata to find the same pictures because it doesnt work on all images. Maybe this library can fix that
Regardless of how that process works, once Google scrapes an image, they can store some metadata similar to the output of your software, so that it may be used for sorting the much smaller set of images returned by the image similarity algorithm. The top result can then be deemed the "most original" image since it contains the most detail, and the webpage it was found on can get a boost of pagerank or something.
You can detect downsampling by looking at chroma frequencies. Bayer pattern color filters on cameras mean that color resolution is never going to be as high as pixel resolution (assuming 1:1 mapping of pixels to sensor pixels) and if you see chroma frequencies that are higher than 2x pixel densities, then you have some downsampling going on.
"Specifically, this project was born out of a yet-unpublished image deduplication framework, while attempting to identify whether duplicates were scaled versions of one another."
A humble but fun origin story for a very cool project.
Embarassing side-note: I've never made the mistake of trying to add an empty directory to a git repo before; if you tried and failed to build, it's been fixed.
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.
That'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:
Sure. 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.
You might be able to detect if downsampling is done incorrectly, since many programs just average the pixel values instead of the actual light intensity.
Does anyone know of something similar for automatic analysis of audio using the FFT? There are visual ways to do it, but it would be nice to have an automated script
Late reply but you can actually do this with the library as is. It's not designed for it so you'll have to use fftw yourself and call some borderline internal stuff, but it ought to work the same.
float* samples = ... //load audio samples here
int len = ...
fftwf_plan p = fftwf_plan_r2r_1d(len,samples,samples,FFTW_REDFT10,FFTW_ESTIMATE);
fftwf_execute(p);
RDResolution* res;
size_t count;
RDMethod* m = resdet_methods();
m->func(samples,len,1,1,&res,&count,12,m->threshold);
Consequently, another hot research area is image anti-forensics -- the obfuscation of such operations to avoid detection. (Shameless self-promotion: one example paper on anti-forensics of JPEG compression can be found here [2].)
[1] http://www.signalprocessingsociety.org/publications/periodic...
[2] http://www.mirlab.org/conference_papers/International_Confer...