I would like to extract a color histogram out of a BufferedImage (Java). I don’t want to extract a separate histogram for red, green and blue, but I would like to have one histogram including all available colors (including a binning). It would be nice if the neighboring bins look similar to each other.
I don’t have an Idea how to define the bins, since colors are not one-dimensional. Another problem is the allocation of a color to its bin.
Does somebody have an idea or a library to realize it?
Best,
Michael
You can separately calculate histograms for red, green and blue and then find the mean of them and draw result grapic. Take a look at this article.
Or you can create a cube 3d histogram (each edge responces for one color). Here’s result of it (java).