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, wherein generating the disparity map estimation comprises: segmenting the stereo images; determining if each segment is doubtful or un-doubtful, wherein a doubtful segment does not comprise a block of pixels greater than n d ×n d blocks; for each doubtful segment, defining a window W s as pixels (i,j) where a distance between each pixel (i,j) and the doubtful segment is less than n d ; calculating a matching cost for both doubtful and un-doubtful segments wherein the matching cost calculation for a doubtful segment is based on the window W s and the matching cost calculation for an un-doubtful segment is not based on the window W s ; determining disparity candidates based on a matching cost minimum of the doubtful and un-doubtful segments; assigning the disparity candidates to one of a plurality of segment classifications based on the matching cost minimum of the doubtful and un-doubtful segments; and generating a final disparity map by refining the estimated disparity map.