🌐
University of Edinburgh
homepages.inf.ed.ac.uk › rbf › HIPR2 › adpthrsh.htm
Point Operations - Adaptive Thresholding
Common Names: Adaptive thresholding, Dynamic thresholding · Thresholding is used to segment an image by setting all pixels whose intensity values are above a threshold to a foreground value and all the remaining pixels to a background value.
🌐
PyImageSearch
pyimagesearch.com › home › blog › adaptive thresholding with opencv ( cv2.adaptivethreshold )
Adaptive Thresholding with OpenCV ( cv2.adaptiveThreshold ) - PyImageSearch
June 9, 2023 - Bottom: Using adaptive thresholding creates a much cleaner segmentation (image source). As we discussed earlier in this tutorial, one of the downsides of using simple thresholding methods is that we need to manually supply our threshold value, T.
People also ask

What is image thresholding in image processing?
Image thresholding in image processing is a technique that divides an image into regions based on pixel intensity, allowing for the extraction of important features and objects from the background.
🌐
encord.com
encord.com › home › blog › image thresholding in image processing
Image Thresholding in Image Processing | Encord
What are the types of thresholding in image processing?
The types of thresholding in image processing include global thresholding, adaptive thresholding, and techniques like Otsu's method that automatically determine optimal threshold values.
🌐
encord.com
encord.com › home › blog › image thresholding in image processing
Image Thresholding in Image Processing | Encord
What is the problem with thresholding in image processing?
A challenge with thresholding in image processing is selecting appropriate threshold values, particularly for complex images with varying lighting conditions or intricate backgrounds.
🌐
encord.com
encord.com › home › blog › image thresholding in image processing
Image Thresholding in Image Processing | Encord
🌐
Encord
encord.com › home › blog › image thresholding in image processing
Image Thresholding in Image Processing | Encord
November 5, 2024 - Adaptive thresholding adjusts locally, making it effective for varying lighting conditions. Otsu's Method and Applications: Otsu's method automatically determines optimal thresholds, especially useful for complex images.
🌐
Carleton University
people.scs.carleton.ca › ~roth › iit-publications-iti › docs › gerh-50002.pdf pdf
Adaptive Thresholding Using the Integral Image Derek Bradley∗
In this paper we focus on adaptively thresholding images from a live video stream. In order to maintain real-time · performance, the thresholding algorithm must be limited to a small constant number of iterations through each · image. Thresholding is often a sub-task that makes up part of a larger process.
🌐
OpenCV
docs.opencv.org › 4.13.0 › d7 › d4d › tutorial_py_thresholding.html
OpenCV: Image Thresholding
In the previous section, we used one global value as a threshold. But this might not be good in all cases, e.g. if an image has different lighting conditions in different areas. In that case, adaptive thresholding can help. Here, the algorithm determines the threshold for a pixel based on a small region around it.
🌐
TutorialsPoint
tutorialspoint.com › opencv › opencv_adaptive_threshold.htm
OpenCV - Adaptive Threshold
In OpenCV, you can perform Adaptive threshold operation on an image using the method adaptiveThreshold() of the Imgproc class.
🌐
Wikipedia
en.wikipedia.org › wiki › Thresholding_(image_processing)
Thresholding (image processing) - Wikipedia
November 12, 2025 - 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, ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-thresholding-techniques-using-opencv-set-2-adaptive-thresholding
Adaptive Thresholding using OpenCV - GeeksforGeeks
December 3, 2025 - Adaptive thresholding addresses ... threshold value for the whole image, adaptive thresholding calculates the threshold for small regions around each pixel....
Find elsewhere
🌐
MathWorks
mathworks.com › image processing toolbox › image segmentation and analysis › image segmentation
adaptthresh - Adaptive image threshold using local first-order statistics - MATLAB
Normalized locally adaptive thresholds, returned as a numeric matrix or numeric array of the same size as the input image or volume, I.
🌐
Medium
medium.com › @aryanrusia8 › thresholding-in-image-processing-understanding-global-otsu-and-adaptive-methods-d8ff312b3fa6
Thresholding in Image Processing: Understanding Global, Otsu and Adaptive Methods | by Aryan Rusia | Medium
November 28, 2025 - Otsu finds the threshold automatically, which is helpful when processing large batches of uniformly lit scans. But when the image includes shadows, faded handwriting, notebook lines or uneven brightness, the intensity ranges overlap too much and Otsu selects a value that looks mathematically correct but visually wrong. Adaptive Thresholding is the most dependable choice for real-world photos.
🌐
Medium
medium.com › @amit25173 › opencv-adaptive-threshold-fae667b91984
OpenCV Adaptive Threshold | by Amit Yadav | Medium
April 18, 2025 - The formula for Gaussian Adaptive Thresholding is: ... Weighted Sum of Local Region: Pixels closer to the center have a greater influence, making the threshold calculation more robust against noise and minor lighting variations. C: Again, this is the constant you subtract to adjust the threshold. Let’s say you’re processing an image where there’s a lot of fine detail, like a textured surface.
🌐
Medium
medium.com › featurepreneur › dive-deeper-into-opencvs-adaptive-thresholding-3f29dda8c908
Dive deeper into OpenCV’s Adaptive Thresholding | by Maximin Joshua | featurepreneur | Medium
December 1, 2021 - But this method doesn’t perform ... adaptive thresholding. Adaptive thresholding the threshold value for each pixel is determined individually based on a small region around it....
🌐
ScienceDirect
sciencedirect.com › topics › computer-science › local-adaptive-thresholding
Local Adaptive Thresholding - an overview | ScienceDirect Topics
Local Adaptive Thresholding is a technique used in image processing where thresholds are determined locally based on subimages or pixel neighborhoods, allowing for better segmentation results in images with varying background and object contrasts.
Top answer
1 of 3
25

I do not think mine will be a complete answer, but I'll offer what I know and since this is a community edited site, I hope somebody will give a complimentary answer soon :)

Adaptive thresholding methods are those that do not use the same threshold throughout the whole image.

But, for some simpler usages, it is sometimes enough to just pick a threshold with a method smarter than the most simple iterative method. Otsu's method is a popular thresholding method that assumes the image contains two classes of pixels - foreground and background, and has a bi-modal histogram. It then attempts to minimize their combined spread (intra-class variance).

The simplest algorithms that can be considered truly adaptive thresholding methods would be the ones that split the image into a grid of cells and then apply a simple thresholding method (e.g. iterative or Otsu's method) on each cell treating it as a separate image (and presuming a bi-modal histogram). If a sub-image can not be thresholded good the threshold from one of the neighboring cells can be used.

Alternative approach to finding the local threshold is to statistically examine the intensity values of the local neighborhood of each pixel. The threshold is different for each pixel and calculated from it's local neighborhood (a median, average, and other choices are possible). There is an implementation of this kind of methods included in OpenCV library in the cv::adaptiveThresholding function.

I found another similar method called Bradley Local Thresholding. It also examines the neighborhood of each pixel, setting the brightnes to black if the pixels brightness is t percent lower than the average brightness of surrounding pixels. The corresponding paper can be found here.

This stackoverflow answer mentiones a local (adaptive) thresholding method called Niblack but I have not heard of it before.

Lastly, there is a method I have used in one of my previous smaller projects, called Image Thresholding by Variational Minimax Optimization. It is an iterative method, based on optimizing an energy function that is a nonlinear combination of two components. One component aims to calculate the threshold based on the position of strongest intensity changes in the image. The other component aims to smooth the threshold at the (object)border areas. It has proven fairly good on images of analog instruments (various shading and reflection from glass/plastic present), but required a careful choice of the number of iterations.

Late edit: Inspired by the comment to this answer. There is one more way I know of to work around uneven lighting conditions. I will write here about bright objects on a dark background, but the same reasoning can be applied if the situation is reverse. Threshold the white top-hat transform of the image with a constant threshold instead of the original image. A white top hat of an image is nothing but a difference between the image $f$ and it's opening $\gamma(f)$. As further explanation let me offer a quote from P. Soille: Morphological Image Analysis:

An opening of the original image with a large square SE removes all relevant image structures but preserves the illumination function. The white top-hat of the original image or subtraction of the illumination function from the original image outputs an image with a homogeneous illumination.

2 of 3
15

You can find a paper containing a comparison of a number of thresholding methods here:

  • M. Sezgin, B. Sankur - Survey over image thresholding techniques and quantitative performance evaluation, Journal of Electronic Imaging, 2004 - pdf

Here's another paper evaluating binarization methods:

  • P. Stathis, E. Kavallieratou and N. Papamarkos - An Evaluation Technique for Binarization Algorithms, Journal of Universal Computer Science, 2008, - pdf

The adaptive binarization method I have used in my last project uses integral images for fast computation of the threshold function used by the Sauvola method. The Sauvola method is described in:

  • J. Sauvola and M. Pietikainen, Adaptive document image binarization, Pattern Recognition 33, 2000. - pdf

The modification which uses integral images providing a 20-fold speedup (according to the paper) is described in this paper:

  • F. Shafait, D. Keysers, and T. M. Breuel, Efficient implementation of local adaptive thresholding techniques using integral images, Document Recognition and Retrieval XV, 2008 - pdf

These are just the papers I used when choosing the binarization method for my project (for finding text in images). I'm not an expert so I can't say which method is the best for which application.

🌐
IEEE Xplore
ieeexplore.ieee.org › document › 6993140
Adaptive thresholding: A comparative study | IEEE Conference Publication | IEEE Xplore
The simplest method to segment an image is thresholding. Using the thresholding method, segmentation of an image is done by fixing all pixels whose intensity values are more than the threshold to a foreground value.
🌐
ResearchGate
researchgate.net › publication › 269984781_Adaptive_thresholding_A_comparative_study
(PDF) Adaptive thresholding: A comparative study
July 10, 2014 - Such technique can be used to obtain binary images from grayscale images. The conventional thresholding techniques use a global threshold for all pixels, whereas adaptive thresholding changes the threshold value dynamically over the image.
🌐
LlamaIndex
llamaindex.ai › glossary › adaptive-thresholding
What is Adaptive Thresholding?
July 11, 2026 - Adaptive thresholding is an image processing technique that determines the threshold value for each pixel based on the characteristics of its surrounding local neighborhood, rather than applying one fixed value to the entire image.
🌐
ScienceDirect
sciencedirect.com › science › article › abs › pii › S1574954122000814
A two-stage adaptive thresholding segmentation for noisy low-contrast images - ScienceDirect
March 28, 2022 - A 2-stage adaptive thresholding approach is proposed. ... The new approach can segment plankton in noisy low contrast underwater images effectively. ... The new approach also performed well in text recognition for degraded ancient text document. Image recognition is the process of recognizing and classifying objects with machine learning algorithms.
🌐
Roboflow
blog.roboflow.com › home › what is thresholding in image processing? a guide.
What is Thresholding in Image Processing? A Guide. | Roboflow
June 23, 2026 - Unlike global thresholding, which uses a single threshold value for the entire image, adaptive thresholding calculates the threshold for smaller regions of the image, allowing for variations in lighting and contrast within the image.
🌐
scikit-image
scikit-image.org › docs › 0.12.x › auto_examples › segmentation › plot_threshold_adaptive.html
Adaptive Thresholding — skimage v0.12.2 docs
Here, we binarize an image using the threshold_adaptive function, which calculates thresholds in regions of size block_size surrounding each pixel (i.e. local neighborhoods).