The following table describes the different types of simple image thresholding operations that have been made available by the OpenCV developers:
Threshold Type |
Threshold Function |
|
|
|
|
|
|
|
|
|
|
|
Uses the Otsu's method to compute the optimal threshold value |
The flag representing the last thresholding method-Otsu's method is a little different (slightly more complicated) than the others. It relies on Image Histograms, our topic of discussion for the next chapter. For those of you who know what histograms are, the Otsu's method essentially assumes that the histogram for the image consists of two peaks-one corresponding to the background (black) and the other for the foreground (white). The computational steps in the algorithm try to come up with a threshold value that best separates the two peaks in the image histogram. We won't be discussing...