1. A computer-implemented method, the method comprising: generating an estimation of a disparity map for a stereo pair of images based on multiple disparity assignments and a matching cost for each disparity assignment; and generating a final disparity map by refining the estimated disparity map.