how do I interpret histogram output?
Hello everybody,
I'm looking at the example of the histogram from http://docs.opencv.org/doc/tutorials/imgproc/histograms/histogram_calculation/histogram_calculation.html
How should I interpret the histogram output vs the colors in the picture? It seems that the picture has mostly green, followed by brown, white, and blue. How does the histogram graph show that? Or is it a different histogram which does not break the image down into R/G/B channels that we need to look at?
oh, the colors in the 2nd image there are random and don't represent anything related to rgb. it's just for visualization. if you look at the image at the top, they're trying to show it for a 1channel image.
think of a histogram as a barchart with 1 bar for each possible intensity value in the [0 255] range, a simple array.
you walk through all pixels, and when you encounter the value 17, you just do like hist[17] += 1
the last 2 images at the bottom show an rgb image, and the 3 separate histogram curves, 1 for each color channel