2

I am trying to find a way to find out if python can help in identifying similar images and returns the one which is better in overall quality, clear, rich JPG. Are there any packages in python that help?

I have mentioned below a example to show what I mean. The two images are similar but vary in its quality. Any hints on how this can be qualitatively measured? Should I look at image size, color ranges etc?

Better one (Less sharpened and clear): http://www.lessaccent.com/i/blog/coke-can.jpg

Good but not better than the one above (more sharpness, increasing grains): http://images.sodahead.com/polls/002323967/371436027_CokeCan_answer_1_xlarge.jpeg

Prem Minister
  • 407
  • 2
  • 10
  • 20

1 Answers1

4

This is typically calculated taking some metric and a reference image. SSIM (see https://stackoverflow.com/a/13884956/1832154) tends to be a good for such comparison, and for your images (taking the first one as the reference image), SSIM gives a value of ~0.91 for the second image in relation to the reference one. In fact they are not that different, but the metric is reporting about 9% difference in structural similarity -- which seems an acceptable difference given the images.

Community
  • 1
  • 1
mmgp
  • 18,901
  • 3
  • 53
  • 80