1. A distance measuring apparatus comprising: a light source for emitting light; an image capturing unit for capturing an image of a subject based on the light emitted from the light source and reflected from the subject; a distance information converter for converting pixel values of pixels which are obtained by the image capturing unit when the image capturing unit captures the image of the subject, into distance information representing a distance up to the subject; an image capturing condition setting section for setting first image capturing conditions based on the distance information; and an image capture controller for controlling the light source and the image capturing unit to capture the image of the subject under the first image capturing conditions.