Now, consider thresholding the following image of ants.
Why? Let’s say for some purpose of detecting or tracking these insects! It seems simple right? The ants are dark, the background is light, so segmentation should be simple using thresholding right? Let’s look at the histogram.
Not… so… inspiring – right? One huge peak biased to the light end of the intensity spectrum, and likely associated with the background. The ants are on the other end -and not very distinct. Local or global threshold?
Here are some of the best approaches. First, for classical reasons, Otsu – which extracts the ants, but also some of their shadows. The other global method, Minimum Error extracts each of the ants nicely, but there are holes in the ants body, likely attributable to reflections. From a local thresholding perspective, Souvola extracts the outlines of the ants, and Phansalkar’s algorithm (a modification of Sauvola’s threshold which deals better with low contrast images) produces a result somewhere between Minimum-Error and Sauvola.