1. A method for determining a distance to an obstacle from a camera mounted to an automobile, the method comprising: tracking a plurality of image features across two or more successive images captured by the camera; when an average of a ground motion estimate is above a threshold, generating top-view images by transforming the camera images to appear to have been taken from above, and determining a ground motion estimate based on vertical motion of a plurality of the tracked image features that are in a lower half of the top-view images; identifying a plurality of the tracked plurality of image features as offground features based on the ground motion estimate and respective motion of the plurality of image features tracked across two or more of the top-view images, each of the plurality of identified off-ground features corresponding to at least a portion of an object above or below a ground surface; calculating for each of the plurality of off-ground features of the plurality of image features a distance from the portion of the object corresponding to the respective off-ground feature to the camera based on motion of the respective off-ground feature in the top-view image and the ground motion estimate.