Design of Stereo Vision Processor: from algorithm to hardware implementation