Are there any methods/algorithms for comparing images with exactly the same context but different resolutions (and some slight data differences due to resizing and jpeg recompression)?

I.e. Recognizing if an 1024x768 32bit TIFF and 800x600 16bit JPEG both were produced from the same source.
Posted on 2006-02-09 08:31:31 by arafel
You might try using a feature detection algorithm that finds the corners or edges of the object in the image.  The SUSAN algorithms come to mind.

Spara
Posted on 2006-02-09 08:51:37 by Sparafusile
Thanks, Spara.

Found lots of material about SUSAN and related algorithms. Though, I didn't find anything explaining how to apply found edges/corners for image comparing.

My foggy guess is to get position (relative to the image borders) of an edge in original image, check a particular diapason in second image where same edge could exist. Compare all edges and decide upon percentage of similar 'places' whenever the images are visually similar.
Am I on the right lane?
Posted on 2006-02-09 16:23:11 by arafel
What I used SUSAN for is image matching in a panoramic image stitcher. I adjust the settings of the SUSAN algorithm (light/geometric thresholds) until most of the points were within a given range. Then I compared points on one image to the points on the others for matches. Then I'd create a transformation matrix and mutate the images onto eachother.

You, on the other hand, have a much simpler problem. Since you're dealing with the same image (granted the different compression/resizing/file formats may make slight variations) the points that the SUSAN algorithm finds should match almost perfectly (I'm talking light intensity and dx/dy values).  You can then find a set of these points and compare the ratio of the x,y positions. If the images are the same then they should have the same ration of x-pos to y-position.

Spara
Posted on 2006-02-09 18:05:13 by Sparafusile
Ahh, now everything is clear. Thanks again :)
Posted on 2006-02-09 18:39:17 by arafel
btw, I'd resize both images to a fixed smaller size. The shrinking ratio will be a controller/adjustment on comparison treshold. After that I'd reduce the bits per pixel (24bpp -> 16bpp, 12bpp or 8bpp). Finally, array-comparison on both shrinked images.

SmallWidth = min(Image1Width,Image2Width)
SmallHeight= min(Image1Height,Image2Height)
shr SmallWidth,1 ; reduce on purpose
shr SmallHeight,1
SmallImage1 = ResizeBilinear(Image1,SmallWidth,SmallHeight)
SmallImage2 = ResizeBilinear(Image2,SmallWidth,SmallHeight)
invoke ArrayCmp,SmallImage1.bits,SmallImage2.bits,SmallImageSize
Posted on 2006-03-24 17:46:59 by Ultrano
I have a problem with your method, Ultrano, although it may be my lack of understanding of the ArrayCmp function.

If you encode the exact same image in a lossy format (JPG for example) and then compare it, as you suggest, to the same image encoded in a lossless format (BMP for example) you will not get an exact math. Along the same lines: if both images are encoded exactly the same, but one is resized using any one of the many resampling functions, you will not be able to compare them byte by byte and get an exact match.

If ArrayCmp doesn't return a boolean value for "exactly the same or not", but rather a number indicating the amount of simmilarity between the two arrays then it might work. I don't think that's how it behaves though.

Spara
Posted on 2006-06-16 12:20:32 by Sparafusile

... After that I'd reduce the bits per pixel (24bpp -> 16bpp, 12bpp or 8bpp)...

This BPP reduction acts as a fast threshold when comparing later.
Posted on 2006-06-16 13:36:45 by Ultrano