1. A method for detecting an object in a pair of stereo images acquired of a scene, where each stereo image include pixels, comprising the steps of: generating a cost volume from the pair of stereo images, wherein the cost volume includes matching costs for a range of disparity values, for each pixel, between the stereo images in the pair; determining feature vectors from sub-images in the cost volume using a feature function of the disparity values with a minimal accumulated cost within regions inside the sub-images; and applying a classifier to the feature vectors to detect whether the sub-images includes the object, wherein the steps are performed in a processor.