A distance-measuring system comprising: a plurality of light sources including at least a first light source and a second light source that emit light; a light source controller that controls, for each light source, timing and an emission period at which and during which the plurality of light sources (101, 102) alternately emit light; an imager having pixels that exposes to reflection light emitted by the plurality of light sources (101, 102) and reflected by a subject at times and for exposure periods that are set individually for each of the plurality of light sources, and generates a plurality of distance images, one for each light source, for the reflection light in emission ranges to which light is emitted by the plurality of light sources (101, 102), based on a quantity of electric charge of the reflection light, the distance images each indicating a distance to the subject for the respective light source; a reliability level output unit that outputs a reliability level for the distance for each of the plurality of distance images (101, 102); and an image compositor that composites the plurality of distance images generated for the reflection light, wherein the plurality of light sources (101, 102) emit light at different angles relative to an optical axis of the imager so as to each have a different emission range, the emission ranges of the plurality of light sources (101, 102) partially overlap in a common emission range, and the image compositor exclusively selects pixels to be composited from the plurality of distance images for an outside of the common emission range, determines pixels to be composited based on the reliability level for the common emission range, and generates a composite distance image, characterized in that the reliability level output unit includes a light source priority table that defines a priority of each of the plurality of light sources (101, 102) for each of distance ranges, and compares distance information indicating a distance for each pixel of the plurality of distance images with a value of the light source priority table, and selects and outputs the reliability level. a plurality of light sources including at least a first light source and a second light source that emit light; a light source controller that controls, for each light source, timing and an emission period at which and during which the plurality of light sources (101, 102) alternately emit light; an imager having pixels that exposes to reflection light emitted by the plurality of light sources (101, 102) and reflected by a subject at times and for exposure periods that are set individually for each of the plurality of light sources, and generates a plurality of distance images, one for each light source, for the reflection light in emission ranges to which light is emitted by the plurality of light sources (101, 102), based on a quantity of electric charge of the reflection light, the distance images each indicating a distance to the subject for the respective light source; a reliability level output unit that outputs a reliability level for the distance for each of the plurality of distance images (101, 102); and an image compositor that composites the plurality of distance images generated for the reflection light, wherein the plurality of light sources (101, 102) emit light at different angles relative to an optical axis of the imager so as to each have a different emission range, the emission ranges of the plurality of light sources (101, 102) partially overlap in a common emission range, and the image compositor exclusively selects pixels to be composited from the plurality of distance images for an outside of the common emission range, determines pixels to be composited based on the reliability level for the common emission range, and generates a composite distance image, characterized in that the reliability level output unit includes a light source priority table that defines a priority of each of the plurality of light sources (101, 102) for each of distance ranges, and compares distance information indicating a distance for each pixel of the plurality of distance images with a value of the light source priority table, and selects and outputs the reliability level.