Reputation: 411
I have a database containing both the SD and HD version of same set of images. Problem is that their names are different from each other.
For example an image of a flower in SD has a name greatflower.png
and the same flower has HD version with the name bestflower.png
The challenge is to find a similarity between them. I have tried resizing the images to the same width and height and then pixel by pixel comparing them but the results are not accurate. I just want to have an answer in terms of yes or no after the algorithm is done performing comparison between a pair of images.
My question is which library of java or algorithm will perform a perfect image similarity analysis between an HD and SD version of the image ?
Thanking you all in anticipation :)
Upvotes: 1
Views: 279
Reputation: 10161
I would as a first step create color histograms of all images (for a reduced color-depth). Than you can use the histogram similarity to find candidates of same images.
In a second step I would resize both images to the same (quite small) size and than make a pixel by pixel comparison with little tolerance related to the colors. If more than 90% of the pixels are very similar, I would classify the images as being the same.
Upvotes: 1