When using thresholding method to segment an image, a fixed threshold is not suitable if the background is uneven. Here, we propose a new adaptive thresholding method using variational theory. The method requires only one parameter to be selected and the adaptive threshold surface can be found automatically from the original image.