In this chapter, all the main concepts related to histograms have been reviewed. In this sense, we have seen what a histogram represents and how it can be calculated by using OpenCV, NumPy, and Matplotlib functions. Additionally, we have seen the difference between grayscale and color histograms, showing how to calculate and show both types. Histogram equalization is also an important factor when working with histograms, and we have seen how to perform histogram equalization to both grayscale and color images. Finally, a histogram comparison can also be very helpful in order to perform an image comparison. We have seen the four metrics OpenCV provides to measure the similarity between two histograms.
In connection with the next chapter, the main thresholding techniques (simple thresholding, adaptive thresholding, and Otsu's thresholding, among others) will be covered...