摘要 |
PURPOSE:To prevent the occurrence of bad influence such as the runaway of a program, and to increase the efficiency of processing by processing in such a way that when the measured data are negative, zero is substituted, in the case where a distance measurement is calculated on the basis of measured data represented by the binary digits of a prescribed bit number. CONSTITUTION:The near infrared rays emitted from the LED 3a to 3c of a light- projecting part 2 are projected in turn on three places inside a photographing picture surface through a projecting lens 4. The optical axis of the lens 4 is approximately parallel to the optical axis 5a of a photographing lens 5. A light-receiving part 7 is made up of a light-receiving lens 8 and a PSD 9, and the optical axis 8a of the lens 8 is approximately parallel to the optical axis 5a. As a subject approaches the lens 8, the reflected light from the subject is incident on the output terminal 9b side of the PSD 9. The outputs from the output terminals 9a, 9b is input into an IC 12, and the output thereof is input into a MCPU 14, and a distance signal is calculated from the ratio of the sum of the digital values of the outputs of the terminals 9a, 9b to the difference of the digital values. When the distance measuring data represented by digital data become negative, the distance-measuring calculation is carried out by substituting zero. |