Otsu method is one of the most successful methods for image thresholding. This paper proves that the objective function of Otsu method is equivalent to that of K-means method in multilevel thresholding . They are both based on a same criterion that minimizes the within-class variance. However, Otsu method is an exhaustive algorithm of searching the global optimal threshold, while K-means is a local optimal method. Moreover, K-means does not require computing a gray-level histogram before running, but Otsu method needs to compute a gray-level histogram firstly. Therefore, K-means can be more efficiently extended to multilevel thresholding method, two-dimensional thresholding method and three-dimensional method than Otsu method. This paper proved that the clustering results of K-means keep the order of the initial centroids with respect to one-dimensional data set. The experiments show that the k-means thresholding method performs well with less computing time than Otsu method does on three dimensional image thresholding.