I'm trying to make a program that will identify Minecraft blocks based on an image. I currently have an image being cut up in 16x16 images and being compared to the texture files which should be identical. I can't seem to find a good solution to comparing the images. I've tried openCV and Pillow, haven't been able to get one that is accurate. Just looking for any suggestions.
Asked
Active
Viewed 73 times
0
-
What happens if you open the files with `open`? – Josh Clark Apr 17 '20 at 20:32
-
@Josh I have the texture files saved in a folder, but the 16x16 cut image isn't been saved. It just gets cut and then compared to each texture until it finds a match. – Geekster Apr 17 '20 at 20:43
-
Just a suggestion. Could look at cosine similarity algorithm. Gives you a score of how similar two vectors are. An image could be flattened to a vector. Let me know if you need more info. – MarcusRenshaw Apr 17 '20 at 21:23
-
1You can do template matching or you can use structural similarity index (ssim from skimage) – fmw42 Apr 17 '20 at 21:30
-
@MarcusRenshaw It looks a little out of my level right now, but I'll definitely keep it in mind. Thanks for the suggestion. – Geekster Apr 17 '20 at 22:12
-
@fmw42 I tried the SSIM it worked great, thanks! – Geekster Apr 17 '20 at 22:12