1. A distance measuring apparatus, comprising: a sensor data generating device which forms images of light from a distance measurement object on a pair of line sensors constituted by a plurality of light receiving elements, integrates signals obtained from the light receiving elements for each light receiving element to generate a pair of sensor data, and ends the integration when sensor data of selected areas set as the distance measurement area of the each line sensor satisfies predetermined integration end conditions; a sensor data acquiring device which divides the distance measurement area of the each line sensor into a plurality of divided areas, and acquires the sensor data of each divided area from the sensor data generating device; a distance measurement object distance calculating device which individually calculates the distances of the distance measurement object for each divided area according to the sensor data acquired by the sensor data acquiring device; and a distance measurement object distance determining device which determines the distance of the distance measurement object to be employed in focusing control according to the distances of the distance measurement object for each divided area calculated by the distance measurement object distance calculating device, wherein the sensor data acquiring device sets a plurality of the selected areas each constituted by one or more the divided areas in the distance measurement area, causes the sensor data generating device to start the integration for each selected area and performs in succession processing for acquiring the sensor data of the selected area from the sensor data generating device when the integration is ended, and performs processing for dividing and acquiring sensor data to acquire sensor data of each divided area.