Ideally, the intensity histogram of a simple grey-level scene will be bimodal. This figure shows the square from the previous section and its intensity histogram. We can see that it has two nice clear peaks, corresponding to the background and foreground objects.
To use the histogram for threshold selection, we threshold at the troughs of
the histogram. This image shows the result of thresholding the clamp image
at a value of 82.
Exercise:
Use the
to experiment with threshold selection using the graylevel histogram.
This simple global thresholding can be described as:
With local area thresholding the average is found in a local ( 3 by 3, 5 by 5 etc. ) window and this is used to modify the global threshold. Thresholding can also apply to colour pictures using the greatest distinguishing power of the red, green or blue values.