An image histogram is a type of histogram that reflects the tonal distribution of the image, plotting the number of pixels for each tonal value. The number of pixels for each tonal value is also called frequency. Therefore, a histogram for a grayscale image with intensity values in the range [0, K-1] would contain exactly K entries. For example, in the case of 8-bit grayscale images, K = 256 (28 = 256), and hence, the intensity values are in the range [0, 255]. Each entry of the histogram is defined as follows:
For example, h(80) = number of pixels with intensity 80.
In the next screenshot, you can see that the image (left) has 7 distinct gray levels. The gray levels are: 30, 60, 90, 120, 150, 180 and 210. The histogram (right) shows how many times (frequency) each tonal value appears in the image. In this case, as each region is 50 x...