An Efficient Hardware-Oriented Stereo Matching Algorithm