Abstract Thresholding is a simple but effective technique for image segmentation. In this paper, a general locally adaptive thresholding method using neighborhood processing is presented. The method makes use of local image statistics of mean and variance within a variable neighborhood and two thresholds obtained from the global intensity distribution. It can thus take advantage of local thresholding and, at the same time, prevent over segmentation with the global image information. We also present a systematic method to calculate a combination coefficient of the mean and the variance based on global image information. Experiments on both optical character recognition (OCR) images and oil sand images demonstrate that this method provides superior image segmentation to existing thresholding methods for images that are severely degraded due to noise, poor illumination and shadow.