A new local cost function is proposed in this paper based on the linear relationship assumption between the values of the color components and the intensity component in each local image window,then a new quadratic objective function is derived from it and the globally optimal chrominance values can be computed by solving a sparse linear system of equations.Through the colorization experiments on various test images,it is confirmed that the colorized images obtained by our proposed method have more vivid colors and sharper boundaries than those obtained by the traditional method.The peak signal to noise ratio(PSNR) of the colorized images and the average estimation error of the chrominance values relative to the original images also show that our proposed method gives more precise estimation than the traditional method.