2.2.2 Adaptive Thresholding

When the lighting is not uniform in an image, a global threshold (or pair of thresholds) does not work very well. The part of the wanted image that is too dark is changed to background (see previous example). To solve this a threshold (or pair of thresholds) is need which uses only local information. There are two main approaches to this: