
Found this one on the internet, but mixes up images.

Modified the above version to compare colours separately (R, G, B). Sometimes it's better than the one above, sometimes it totally messed up.
Does anyone have any idea HOW I could compare images to get better results? Been googling for the past one or two hours, but didn't find anything that could be useful.
Edit: the colours are being detected correctly, it's just the "shape/object" on the image that doesn't get "recognized". Two images can have the same colour average, but one could be a picture of a cat, the other of a dog. The above script only check if the average colour matches.






