a distance measuring apparatus is provided which utilizes a light - section method capable of measuring both close objects and far away objects without adjusting the dynamic range of an imaging camera . the apparatus comprises : an image acquisition section for imaging reflected light which has been emitted from the apparatus , has passed through a slit , and has then been reflected off the surface of a target object ; an emission control section for controlling the emission time of the slit light during the time an image is being scanned by the image acquisition section , and for changing the intensity of the received light in the image acquisition section ; and a distance calculation section for calculating the distance to the object based on the image taken by the image acquisition section and a positional relationship between a light emission position of the slit light and an image position .