Histogram equalization is the use of image processing to adjust the contrast of the image histogram,the central idea is to change the original image histogram from the more concentrated gray-scale range of gray scale range into all the uniform distribution.There is a shortcoming that gray-scale merging exists in traditional histogram equalization image enhancement.In order to retain more image detail,use a method retained a gray-level histogram equalization.In this method,use the measure of medium truth scale to determine to use histogram equalization which retains high gray level or histogram equalization which retains the low gray-level.The images that are treated with this method is better than the ones that are treated with traditional histogram equalization.