A new criterion for multilevel thresholding is proposed. The criterion is based on the consideration of two factors. The first one is the discrepancy between the thresholded and original images and the second one is the number of bits required to represent the thresholded image. Based on a new maximum correlation criterion for bilevel thresholding, the discrepancy is defined and then a cost function that takes both factors into account is proposed for multilevel thresholding. By minimizing the cost function, the classification number that the gray-levels should be classified and the threshold values can be determined automatically. In addition, the cost function is proven to possess a unique minimum under very mild conditions. Computational analyses indicate that the number of required mathematical operations in the implementation of our algorithm is much less than that of maximum entropy criterion. Finally, simulation results are included to demonstrate their effectiveness.