A new algorithm for image contrast enhancement based on the local property of gray value is proposed.In the 3D space consisting of image plane and gray value,we use the model of spring oscillator to carry on the modeling,and determine the parameters of this model.Then this algorithm is verified comparatively,and the results show that it is better than global histogram equalization and has a good contrast enhancement effect.In the end,an evaluable index of the enhanced effect is given.