Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python - Best way to find similar images in a directory

Here is the effect I am trying to achieve - Imagine a user submits an image, then a python script to cycle through each JPEG/PNG for a similar image in the current working directory.

Close to how Google image search works (when you submit your image and it returns similar ones). Should I use PIL or OpenCV?

Preferably using Python3.4 by the way, but Python 2.7 is fine.

Wilson

like image 988
WilsonKoder111 Avatar asked Nov 03 '14 11:11

WilsonKoder111


1 Answers

I mean, why not use both? It's trivial to convert PIL images into OpenCV images and vice-versa, and both have niche functions that can make your life easier. Pair them up with sklearn and numpy, and you're cooking with gas.

like image 78
v0rtex20k Avatar answered Sep 23 '22 18:09

v0rtex20k