A new stereo matching algorithm based on adaptive window