An image processing apparatus comprising: a processed-image generating unit configured to acquire an image around a vehicle picked up by a camera provided on the vehicle and generate a plurality of processed images by scaling the image picked up by the camera by a corresponding plurality of scale factors; a detection unit configured to scan each of the plurality of processed images by a frame having a predetermined size according to a detection object, determine likelihood at each scanning position using a dictionary of the detection object, detect a scan frame having likelihood higher than predetermined likelihood, the plurality of processed images being associated in advance with a corresponding plurality of image distances, each of the plurality of image distances being a predetermined estimated distance from the vehicle, normalize a size and position of the scan frame detected by the detection unit with respect to a reference image, and output a detection frame obtained by normalization of the scan frame detected by the detection unit; and a calculation unit configured to determine a determined estimated distance from the vehicle to the detection object according to an image distance associated with a processed image to which the scan frame detected by the detection unit belongs, and calculate and output, based on a history of determined estimated distances and on the plurality of image distances, a time until the vehicle and the detection object collide with each other, wherein each of the plurality of image distances is a distance estimated based on a relationship between each of the plurality of processed images and the reference image; and the calculation unit is configured to determine a plurality of effective distances from the determined estimated distances based on the history of the determined estimated distances and the plurality of image distances, store in a storage unit the plurality of effective distances in association with a corresponding plurality of acquisition times of the determined estimated distances corresponding to respective ones of the plurality of effective distances, determine a velocity of the detection object using effective distances out of the plurality of effective distances and the corresponding acquisition times, and calculate and output the time to collision using the velocity, and wherein the calculation unit is configured to designate a distance, obtained by substituting into a correction equation the image distance associated with the processed image to which the scan frame detected by the detection unit belongs, as a current determined estimated distance, the correction equation including a previous determined estimated distance; and the calculation unit further configured to designate ranges, obtained by giving predetermined latitude to each of the plurality of image distances, as existence ranges of each of the plurality of processed images, select the current determined estimated distance as the effective distance when the current determined estimated distance falls within an existence range of one processed image and the effective distance stored most recently falls outside the existence range of the one processed image or when the existence range of the one processed image lies between the current determined estimated distance and the previous determined estimated distance and the effective distance stored most recently falls outside the existence range of the one processed image, and store the selected current determined estimated distance as the effective distance in the storage unit in association with the acquisition time of the selected current determined estimated distance. a processed-image generating unit configured to acquire an image around a vehicle picked up by a camera provided on the vehicle and generate a plurality of processed images by scaling the image picked up by the camera by a corresponding plurality of scale factors; a detection unit configured to scan each of the plurality of processed images by a frame having a predetermined size according to a detection object, determine likelihood at each scanning position using a dictionary of the detection object, detect a scan frame having likelihood higher than predetermined likelihood, the plurality of processed images being associated in advance with a corresponding plurality of image distances, each of the plurality of image distances being a predetermined estimated distance from the vehicle, normalize a size and position of the scan frame detected by the detection unit with respect to a reference image, and output a detection frame obtained by normalization of the scan frame detected by the detection unit; and a calculation unit configured to determine a determined estimated distance from the vehicle to the detection object according to an image distance associated with a processed image to which the scan frame detected by the detection unit belongs, and calculate and output, based on a history of determined estimated distances and on the plurality of image distances, a time until the vehicle and the detection object collide with each other, wherein