2

Do you know any python library or script that return percent of similarity between two images ?( If you suggest a module please say what function do this work)

I want to write a script like google image search that get an image and search for similar pictures.

thank you!

Vahid Kharazi
  • 5,723
  • 17
  • 60
  • 103
  • 1
    There may be something that can help you in this thread: (http://stackoverflow.com/questions/1819124/image-comparison-algorithm) – ChrisProsser Jul 26 '13 at 12:36

1 Answers1

2

If you can somehow transfer images to matrices (2D arrays) you can calculate eigenvalues using any maths library (I believe numpy can do that). Images with closer eigenvalues mostly look similar.

Firstly, you need to convert your images to two dimensinal arrays. (For example by storing the rgb value of pixel x,y in twodimarray[x][y], see this )

Than you can calculate the eigenvalue of this matrix (In the Wikipedia article on Eigenvalues there is more information about eigenvalues, applications section in link can be more interesting for you) using numpy as explained here) Lastly, googling eigenvalues and image recognation could give you further ideas.

Community
  • 1
  • 1
Ali Rasim Kocal
  • 528
  • 3
  • 14