Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

adaptive (local) thresholding

Giving every pixel its own threshold, computed from its own local neighborhood, instead of one shared global value.

Adaptive (local) thresholding computes a per-pixel threshold T(x,y) = \bar f_{N(x,y)} - C, the mean of a local neighborhood N(x,y) around (x,y) minus a constant C, then classifies g(x,y)=255 if f(x,y)\le T(x,y) else 0. Because a pixel's own value is always part of its own neighborhood mean, the foreground-below-threshold polarity is required for the scheme to behave sensibly: in a flat region the mean equals the pixel's own value, so only a pixel sitting meaningfully BELOW its surroundings (by more than C) is ever flagged.

Read the full section →
Graph settings

Calculator