So Im looking at an image and trying to select one from a set of other images that is the most similar (least different).
Currently I simply look at the average difference between the RGB parts of each pixel, but this has a tendency of picking grey colors. If half the picture is white and the other is black, it's going select some grey shade even though there is no grey in the picture.
I'm assuming there are better algorithms to compare images or trying to achieve what I'm trying to do.
Note that the actual content of the image is not that interesting, just that the colors "look" similar.
For the record what Im trying to do is match someones clothing to a texture-file, if that makes any difference.
Any suggestions or points in the directions of some resources would be greatly appreciated.
EDIT: My solution was to remove the grey colors from the set I was selecting from and it worked pretty well, if anyone else have any better solutions feel free to post.