Stereo inverse perspective mapping: theory and applications