1. A target recognition apparatus that measures a distance from a vehicle to a target, the target recognition apparatus comprising: two cameras that are mounted on the vehicle at positions at the same height above ground level, with a predetermined distance between the cameras; an image compressing unit that compresses an image in at least a lateral direction, for each of a left image and a right image that are input after the images are picked up simultaneously with the two cameras; a target detecting unit that detects both ends of the target in each of the left image and the right image, based on gradations of pixels in the images that have been compressed in at least a lateral direction; and a distance measuring unit that measures a distance to the target, based on a parallax of both detected ends of the target.