In most methods, the same threshold is applied to all the pixelpixels of an image. However, in some cases, it can be advantageous to apply a different threshold to different parts of the image, based on the local value of the pixels. This category of methods is called local or adaptive thresholding. They are particularly adapted to cases where images have inhomogeneous lighting, such as in the sudoku image on the right. In those cases, a neighborhood is defined and a threshold is computed for each pixel and its neighborhood. Many global thresholding methods can be adapted to work in a local way, but there are also methods developed specifically for local thresholding, such as the Niblack<ref>{{Cite book |first=Wayne |last=Niblack |url=http://worldcat.org/oclc/1244113797 |title=An introduction to digital image processing |date=1986 |publisher=Prentice-Hall International |isbn=0-13-480600-X |oclc=1244113797}}</ref> or the Bernsen algorithms.
Software such as [[ImageJ]] propose a wide range of automatic threshold methods, both [https://imagej.net/plugins/auto-threshold global] and [https://imagej.net/plugins/auto-local-threshold local].