1. A computer implemented method for detecting range of one or more objects in a scene comprising: detecting one or more objects from a set of images of the scene captured from one or more cameras; selecting images from the set of images containing the detected one or more objects; computing dense stereo for foreground objects of a current image and for distant background objects of the current image by comparing the current image with a first image from the selected images having a long baseline for distant background objects, resulting in a first composite image having range estimates obtained for the distant background objects, and comparing the current image with a second image from the selected images having a short baseline for foreground objects resulting in a second composite image having range estimates obtained for the foreground objects, wherein baseline is measurement of a separation distance between the current image and the first and second images.