A Robust Algorithm for the Digital Stereo Matching