Patent ID: 7880866

Claim:
A distance measuring device comprising: a light emitting section for emitting intensity-modulated light being modulated with a constant cycle; a light receiving section for receiving reflected modulated light from the subject when the subject is illuminated by the modulated light emitted from the light emitting section to obtain, from the reflected modulated light, each of a first detection signal, a second detection signal, a third detection signal and a fourth detection signal at each π/2 phase of the modulated light; a determining section for calculating a first sum of the first detection signal and the third detection signal and a second sum of the second detection signal and the fourth detection signal obtained by the light receiving section and determining whether or not a difference between the first sum and the second sum is smaller than a set value; and a distance calculating section for detecting a phase difference between the modulated light and the reflected modulated light based on the four types of detection signals obtained by the light receiving section and calculating a distance to the subject, if it is determined by the determining section that the difference between the first sum and the second sum is smaller than the set value, wherein the light receiving section comprises first light receiving elements for obtaining the first detection signal, second light receiving elements for obtaining the second detection signal, third light receiving elements for obtaining the third detection signal, and fourth light receiving elements for obtaining the fourth detection signal, and obtains the four types of detection signals from the light receiving elements as one frame image, the determining section determines whether or not the difference between the first sum and the second sum is smaller than the set value using the four types of detection signals obtained for each block formed by the four types of light receiving elements in the one frame image, and the distance calculating section calculates the distance for each block.