6
$\begingroup$

My apologies for another stats beginner question. This feels like reinventing the wheel, unfortunately I just can't find the answer myself. Googling "average densities classification" does not help me.

"classifying using histogram" brings up interesting pages, but too obscure for me.

I have to classify x, and find a probability that x is of Class 0 or Class 1.

I noticed that Class 0 and 1 have slightly different average densities:

here are some plots showing the average histograms for Class 0 (blue) and Class 1 (red):

enter image description here

Is there a way to use the histogram to classify new images?

Intuitively, the closer the histogram is to the average histogram of the class, the higher the probability to belong to that class.

I have tried using breaks of the histogram as feature, and this gives me some results, but I have a feeling I am taking the long way.

Is there any ready-made R/Python functions to classify data/images based on histogram?

$\endgroup$

1 Answer 1

2
$\begingroup$

In the paper you sited the histogram considered the three color values of each pixel. They used HSV instead of RGB. Here's a package which can do that transform, but probably get this working with RGB first.

Each bin of the histogram considered each possible combination of colors, not just a single one. Think of it as a 3D histogram. (Google "Color Histogram", I can't post any more links). They also used 16 bins, as quoted by the article:

"The number of bins per color component has been fixed to 16, and the dimension of each histogram is $16^3 = 4096$." (Third page, left column, almost at the bottom of the page)

You could also think of it as a three level histogram if that helps where the first level considers the first color, the second level considers the second color, and the third the third color.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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