A novel technique for disparity estimation based on block matching with a local adaptive window is introduced in this paper. In the proposed approach the size and shape of the reference window is calculated adaptively according to the degree of reliability of disparities estimated previously and the local variation of the disparity map. The performance of the method has been verified by computer simulations using synthetic data and several natural stereo sequences. Considerable improvements were obtained just in object borders or image areas that become occluded.