Adaptive (Local) Thresholding For AForge.NET. A brief comparison of Bradley’s and Sauvola’s method is available at a blog:Īltun Nazmi (2010). Since calculation of local mean and variance is the most time consuming operation performed by these two methods, Bradley’s method is effectively two times faster than Sauvola’s method. And that takes the same amount of time as calculation of the local mean. The calculation of variance reuses the result from the calculation of the local mean (E(X))^2 and just calculates E(X^2). And because the variance can be calculated using following formula for variance: Sauvola’s method calculates local mean and local variance, while Bradley’s method calculates just local mean. The advantage of this method is that the binarized images are subjectively almost as good as from Sauvola's method but the calculation is two times faster than Sauvola's method. Adaptive Thresholding Using the Integral Image. The detail description of the algorithm is available at:ĭerek Bradley, Gerhard Roth (2005). The brief idea of the algorithm is that every image's pixel is set to black if its brightness is T percent lower than the average brightness of the surrounding pixels in the window of the specified size, otherwise it is set to white.