This paper presents an ameliorated version of the Zitnick and Kanade stereo algorithm. The novelties in our algorithm are the use of a balanced correlation window, the use of a new factor in the calculation of initial matching values which expresses the possibility of matching between two pixels and a new iterative function for the refinement of the initial matching values. Experimental results are evaluated on synthetic and real images and a comparison of our results to those of many state-of-the-art methods, using the ground truth data supplied by the University of Tsukuba, is presented.