Calculate histogram of Image
hist= cv_calchist(image,channels,mask,histsize,ranges)
Input Image for which histogram is needed
It is given in square brackets. It the index of channel for which we calculate histogram. For example, if input is grayscale image, its value is [0]. For color image, you can pass [0],[1] or [2] to calculate histogram of blue,green or red channel respectively.
Mask image. To find histogram of full image, it is given as “None”. But if you want to find histogram of particular region of image, you have to create a mask image for that and give it as mask
It takes argument as list. This represents our BIN count. Need to be given in square brackets. For full scale, we pass [256].
It takes argument as list This is our RANGE. Normally, it is [0,256].
hist is a 256x1 array, each value corresponds to number of pixels in that image with its corresponding pixel value.
Finding Histogram
For details in Histgram see : http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_imgproc/py_histograms/py_histogram_begins/py_histogram_begins.html