Solved – Computing Image Similarity based on Color Distribution

clusteringdata miningimage processingsimilarities

Image Similarity based on Color Palette Distribution

I am trying to compute similarity between two images based on their color palette distribution, let's say I have two sets of key value pairs as follows,

Img1: {'Brown': 14, 'White': 13, 'Black': 40, 'Gray': 31}

Img2: {'Pink': 82, 'Brown': 8, 'White': 7}

Where the numbers denote the % of that color present in the image. What would be the best way to compute similarity on a scale of 0-100 between the two images?

Best Answer

Ya, pretty much agree with everyone here. The first thing you're going to want to do is transform to a perceptually uniform color space; for me, either HSL or LAB have worked the best, depending on the application.

From there, creating a color histogram for each image and comparing the histograms is probably the best way to go. Here's an interesting post on different methods for doing this: http://www.pyimagesearch.com/2014/07/14/3-ways-compare-histograms-using-opencv-python/