1. A range image generating apparatus comprising: a plurality of image pickup units having an optical system which forms images of subjects and image sensors which capture the images of the subjects formed by the optical system with two-dimensionally arrayed light receiving elements as electric signals; a first image capturing device which captures from each of the plurality of image pickup units an image of the subject formed by light in a first wavelength range as a first image; a second image capturing device which captures from at least one of the plurality of image pickup units an image of the subject formed by light in a second wavelength range as a second image; a first range image generating device which generates a first range image having values of pixels as distance data indicating a distance on the basis of a plurality of first images captured by the first image capturing device; a second range image generating device which generates a second range image having values of pixels as distance data indicating a distance on the basis of a second image captured by the second image capturing device; a third range image generating device which generates a third range image on the basis of the first range image and the second range image; and a recording device which records the third range image onto a recording medium.