Image thresholding is a useful method in many image processing and computer vision applications. However, it is not always satisfactory in all applications because of non-uniform illuminations. Otsu's method has been widely used as the classical technique in real thresholding tasks. In this paper, we propose a novel method for adaptive local thresholding by applying Otsu's results. Based on simulated annealing, the proposed algorithm searches the optimal threshold for each partitioned subimage according to the quadtree data structure. It is also scale invariant for different object sizes. For reducing the computations, an improvement of Otsu?s method is also developed. Experimental results show the efficiency of the proposed method.