Stereo Matching: Evaluation of Three Algorithms and Two Cost Functions