It has been proposed in this paper an idea of refining depth map obtained according to local stereo matching. Energy was calculated based on the entire image, meanwhile, energy minimization concept was adopted, and the area obtained according to color seg