0
$\begingroup$

This is a sentence from this article :

Color similarity: Computing a 25-bin histogram for each channel of an image, concatenating them together, and obtaining a final descriptor that is 25×3=75-d. Color similarity of any two regions is measured by the histogram intersection distance.

But I don't understand it. Can someone explain with an example?

$\endgroup$
2
$\begingroup$

If you have two images, you first start to make histograms of the values (0-255) in the three color channels (red, green, and blue). In the article 25 bins are used, meaning that the values are assigned to one of 25 ranges. The second step is to then concatenate the the three single channel histograms to one histogram for the full image. Since each image channel histogram has 25 bins, the concatenates histogram will have 75 bins (and thus is of length 75). When you do this for both images you want to compare you will now have two histograms. To get a similarity score you compute the intersection of the two histograms, i.e. the percentage of overlap. The following link from the article provides a more visual explanation on this.

$\endgroup$
2
  • $\begingroup$ 'In the article 25 bins are used, meaning that the values are assigned to one of 25 ranges.'. So, on the x-axis it would be like: 0 - 10.2 , 10.2 - 20.4, 20.4 - 30.6. And so if a pixel's channel's value is 15.0, then it would be placed into the 10.2 - 20.4 category? $\endgroup$ – user105282 Mar 3 at 13:12
  • $\begingroup$ That is correct, have a look at the numpy.histogram function, which can do this automatically for you. $\endgroup$ – Oxbowerce Mar 3 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.