Robust and automatic thresholding of gray level images has been commonly used in the field of pattern recognition and computer vision for objects detecting, tracking and recognizing. The Otsu scheme, a widely used image thresholding technique, provides approving results for segmenting a gray level image with only one modal distribution in gray level histogram. However, it provides poor results if the histogram of a gray level is non-bimodal. For enhancing the performance of the Otsu algorithm further, in this work, an improved median-based Otsu image thresholding algorithm is presented. Finally extensive tests are performed and the experiments show that our method obtain more satisfactory results than the original Otsu thresholding algorithm.