Real time correlation based stereo algorithm and application