I am a beginner in Python and tried hard to find an answer here before I ask this question. I have different designs that have a couple of photos, and I want to compare their hamming distances. But I don't wanna compare the images of same design file which are located in the same folder. I make the comparison based on a library called Imagehash. After comparing the different combination of images, I want to keep the ones with the highest hamming distance score. Let me explain what I want with a simple example:
In folder table there are three images: table_1.jpg, table_2.jpg, table_3.jpg In folder chair two images: chair_1.jpg, chair_2.jpg
What I want to get is the file path of the files(which I can do) to, later on, use Image.open() and imagehash.phash functions. Combinations should look like this:
(table_1.jpg, chair_1.jpg), (table_1.jpg, chair_2.jpg), (table_2.jpg, chair_1.jpg ), (table_2.jpg, chair_2.jpg), (table_3.jpg, chair_1.jpg), (table_3.jpg, chair_2.jpg)
Then I have to split after "_", and use groupby and itemgetter, I guess