In this paper, we formulate the image matting as one of solving energy minimization problems. Our approach has the following advantages. First, the matte estimation is modeled using an energy function as a MRF optimization problem. Second, the energy function combines the gradient of the matte, the gradient of the color and statistical sampling together to achieve global optimization. Third, the matte is directly reconstructed by solving energy equations. Experimental results show that our method is efficient to extract high quality mattes for foregrounds with complex natural images.