JPH055621A - Distance measuring method - Google Patents

Distance measuring method

Info

Publication number
JPH055621A
JPH055621A JP29362291A JP29362291A JPH055621A JP H055621 A JPH055621 A JP H055621A JP 29362291 A JP29362291 A JP 29362291A JP 29362291 A JP29362291 A JP 29362291A JP H055621 A JPH055621 A JP H055621A
Authority
JP
Japan
Prior art keywords
gain
distance
gain control
control amplifier
light
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP29362291A
Other languages
Japanese (ja)
Other versions
JP2641820B2 (en
Inventor
Takaaki Kotani
高秋 小谷
Seiji Takada
誠司 高田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP29362291A priority Critical patent/JP2641820B2/en
Publication of JPH055621A publication Critical patent/JPH055621A/en
Application granted granted Critical
Publication of JP2641820B2 publication Critical patent/JP2641820B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

PURPOSE:To enable highly accurate measurement of a distance by delaying a distance measuring sequence by more than a fixed time after a gain change of a gain control amplifier to operate the gain control amplifier in the optimum state. CONSTITUTION:Distance measuring light which is projected from 2 projection section 2 to be reflected on an object S1 is received with a photodetecting section 7. A distance-distance signal is calculated with a microcomputer 14 from an output of a gain control amplifier of an automatically focusing IC for amplifying the resulting output. At this point the level of an output signal of the gain control amplifier is monitored and adjusted when it is outside a specified range. In the changing of the gain, a time is set as required for the stabilization of the gain of the gain control amplifier and after the period set passes, the lighting of a projection section 2 is allowed so that an output of the gain control amplifier is sampled in stable state. Thus, higher distance accuracy is achieved without picking up an improper measuring data with unstable gain.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、写真カメラやスチルビ
デオカメラ等に用いられるアクティブタイプの測距方法
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an active type distance measuring method used in a photographic camera, a still video camera or the like.

【0002】[0002]

【従来の技術】最近のコンパクトカメラは、光学的三角
測量によって測距を行うアクティブタイプの測距装置が
多く用いられている。このアクティブタイプの測距装置
は、適当な基線長を保って投光部と受光部とを配置し、
この投光部から撮影シーンに向けて近赤外光を投光し、
被写体で反射した光を受光部で受光する。この受光部上
での反射光の入射位置は、被写体距離に応じて変化する
から、反射光の入射位置を電気的に調べることで被写体
距離を測定することができる。
2. Description of the Related Art In recent compact cameras, an active type distance measuring device for performing distance measurement by optical triangulation is often used. This active type distance measuring device arranges a light emitting unit and a light receiving unit while maintaining an appropriate base line length,
This projector emits near-infrared light toward the shooting scene,
The light reflected by the subject is received by the light receiving section. Since the incident position of the reflected light on the light receiving unit changes according to the subject distance, the subject distance can be measured by electrically checking the incident position of the reflected light.

【0003】前記投光部は、光源とこの光源からの測距
光をスポット光に変換するための投光レンズとから構成
され、また受光部は受光素子と受光レンズとから構成さ
れている。光源としては近赤外光を放出するLED(発
光ダイオード)が用いられ、受光素子としては半導体位
置検出器(PSD:Position Sensitive Detector )が
用いられている。PSDは2つの出力端子を備え、入射
光の強度と位置とに応じた2チャンネルの電流を出力す
る。この2チャンネルの電流、又はこれらに対応した2
つの電圧の比を求めることによって、反射光の入射位置
にのみ依存した信号を得ることができる。
The light projecting section comprises a light source and a light projecting lens for converting the distance measuring light from the light source into spot light, and the light receiving section comprises a light receiving element and a light receiving lens. An LED (light emitting diode) that emits near-infrared light is used as a light source, and a semiconductor position detector (PSD: Position Sensitive Detector) is used as a light receiving element. The PSD has two output terminals and outputs two channels of current depending on the intensity and position of incident light. Current of these 2 channels, or 2 corresponding to these
By determining the ratio of the two voltages, it is possible to obtain a signal that depends only on the incident position of the reflected light.

【0004】前記反射光の強度は、被写体の距離や反射
率によって大きく変化するから、PSDの出力信号が大
き過ぎたり小さ過ぎたりすることがある。こうした場合
に、2チャンネルの出力信号の比を用いても、測定精度
を安定に保つことができなくなる。そこで、PSDから
の2チャンネルの出力信号のレベルを適切な範囲に収め
るために、一対のゲインコントロールアンプが用いられ
る。PSDの各チャンネルの出力信号の大きさに応じ
て、各ゲインコントロールアンプを共通な最適ゲインに
設定してから測距を行えば、PSDの信号が適切なレベ
ルに増減されるから、被写体の遠近や反射率の変化にか
かわらず、測距精度を安定に維持することが可能とな
る。
Since the intensity of the reflected light largely changes depending on the distance and the reflectance of the object, the PSD output signal may be too large or too small. In such a case, even if the ratio of the output signals of two channels is used, the measurement accuracy cannot be kept stable. Therefore, a pair of gain control amplifiers are used to keep the levels of the output signals of the two channels from the PSD within an appropriate range. Depending on the magnitude of the output signal of each PSD channel, if the gain control amplifiers are set to a common optimum gain and then distance measurement is performed, the PSD signal is increased or decreased to an appropriate level. It becomes possible to maintain the ranging accuracy in a stable manner regardless of changes in the reflectance and the reflectance.

【0005】また、測距精度を更に向上させるために、
被写体に測距光を複数回投光し、各投光ごとにゲインコ
ントロールアンプの出力信号をマイクロコンピュータに
取り込み、これらの平均値から被写体距離を算出する方
法も知られている。更に、撮影シーン(撮影画面)内の
中央部だけでなく、その周辺部も含めた複数個所に測距
光を投光し、各測距点毎に被写体距離を測定するマルチ
ビームタイプのものがある。このマルチビームタイプで
は、各測距点毎に被写体距離が求まるから、予め決めた
優先順位に応じて1個の被写体距離を選択し、この被写
体距離に応じて撮影レンズをセットする。
In order to further improve the distance measurement accuracy,
A method is also known in which distance measuring light is projected onto a subject a plurality of times, the output signal of the gain control amplifier is taken into a microcomputer for each projection, and the subject distance is calculated from the average value of these. Furthermore, there is a multi-beam type that measures the subject distance at each distance measuring point by projecting the distance measuring light not only at the center of the shooting scene (shooting screen) but also at the peripheral area of the shooting area. is there. In this multi-beam type, since the subject distance is obtained for each distance measuring point, one subject distance is selected according to a predetermined priority order, and the taking lens is set according to this subject distance.

【0006】[0006]

【発明が解決しようとする課題】前記ゲインコントロー
ルアンプは、ゲイン変更が行われた場合に、その出力信
号が安定するのに、1.5〜2msec程度の時間が必
要である。この安定化時間の経過前ではゲインが不安定
な状態となっているので、この状態のゲインコントロー
ルアンプの出力信号を用いると、測距精度が低下するこ
とになる。また、ゲインコントロールアンプのゲインの
決定時に、蛍光灯からの近赤外光がPSDに入射する
と、このノイズ光を考慮してゲインが決められてしま
う。この場合には、最適値よりも低い値にゲインが設定
されるため、良好な測距を行うことができない。
The gain control amplifier requires about 1.5 to 2 msec for the output signal to stabilize when the gain is changed. Since the gain is in an unstable state before the stabilization time elapses, if the output signal of the gain control amplifier in this state is used, the distance measuring accuracy will be deteriorated. Further, when the near infrared light from the fluorescent lamp is incident on the PSD when the gain of the gain control amplifier is determined, the gain is determined in consideration of this noise light. In this case, since the gain is set to a value lower than the optimum value, good distance measurement cannot be performed.

【0007】また、測距光を複数回投光するタイプの測
距装置では、この投光中にゲインコントロールアンプの
出力信号が所定範囲を越えて飽和(オーバーフロー)す
ることがあり、これは測距中に被写体に対する照明条件
が変化した場合に生じる。高精度の測距を行うには、ゲ
インコントロールアンプのゲインを再調整してから測距
をやり直すのが望ましいが、蛍光灯の照明下での測距等
では次のような問題が生じる。
Further, in the distance measuring device of the type that projects the distance measuring light a plurality of times, the output signal of the gain control amplifier may saturate (overflow) beyond a predetermined range during the light projection. It occurs when the illumination condition for the subject changes during the distance. In order to perform distance measurement with high accuracy, it is desirable to readjust the gain of the gain control amplifier and then perform distance measurement again, but the following problems occur in distance measurement under the illumination of a fluorescent lamp.

【0008】周知のように、蛍光灯は商用周波数の2倍
の周波数で断続して点灯するが、商用周波数を60 HZ
とすると、図18の(A)に示した蛍光灯の点灯間隔F
1は、8.3msecとなる。そして、同図(B)に示
した測距光の投光間隔F2を1msecとし、18回の
投光で測距を行う場合には、そのうちの2回は必ず蛍光
灯の発光のピークに合致したタイミングで投光が行われ
ることになり、ゲインコントロールアンプからの出力信
号のレベルは所定範囲を越える結果となる。このため、
蛍光灯の照明下ではゲインの再調節−再測距を何回も繰
り返し、測距不能状態に陥ることになる。
[0008] As is well known, fluorescent lamps are lighted intermittently at twice the frequency of the commercial frequency, the commercial frequency 60 H Z
Then, the lighting interval F of the fluorescent lamp shown in FIG.
1 is 8.3 msec. When the projection distance F2 of the distance measuring light shown in FIG. 9B is set to 1 msec and the distance measurement is performed by projecting 18 times, two of them always match the peak of the light emission of the fluorescent lamp. The light is emitted at the timing, and the level of the output signal from the gain control amplifier exceeds the predetermined range. For this reason,
Under the illumination of a fluorescent lamp, the readjustment of gain and the re-ranging are repeated many times, resulting in a state in which the ranging cannot be performed.

【0009】本発明は、以上のような背景に鑑みてなさ
れたもので、ゲインコントロールアンプを適正な状態で
作動させることで、高精度の測距を行うことができる測
距方法を提供することを目的とするものである。
The present invention has been made in view of the above background, and provides a distance measuring method capable of performing highly accurate distance measurement by operating a gain control amplifier in an appropriate state. The purpose is.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、請求項1に記載した発明は、ゲインコントロールア
ンプのゲインの変更が行われた際には、それ以後に行わ
れる測距シーケンスを一定時間以上遅延させ、ゲインコ
ントロールアンプの安定化を待ってから測距シーケンス
を続行させるように構成したものである。請求項2に記
載した発明では、投光手段の作動を遅延させることで、
測距シーケンスの中断を行うようにしたものであり、こ
れは無駄な投光を防止する上で効果がある。
In order to achieve the above object, the invention described in claim 1 is such that when the gain of the gain control amplifier is changed, the distance measuring sequence to be performed thereafter is changed. It is configured such that the distance measuring sequence is continued after delaying for a certain time or more and waiting for the gain control amplifier to stabilize. According to the invention described in claim 2, by delaying the operation of the light projecting means,
The distance measurement sequence is interrupted, which is effective in preventing unnecessary light projection.

【0011】請求項3に記載した発明では、測距光をP
N回投光して1サイクルの測距を行う際に、ゲインコン
トロールアンプからの出力レベルが所定範囲外である回
数がCM回に達するまでの間は、ゲインコントロールア
ンプのゲインを変えずにそのまま測距を行うが、前記出
力レベルが所定範囲外になった回数がCM回に達すると
ゲインコントロールアンプのゲインを変更した後、再び
測距を繰り返すようにしたものである。ここで、CMの
値は、測距光の投光間隔をAT秒としたとき、CM≧A
T×PN×120から求まる。この式は、商用周波数6
0Hzの蛍光灯の点灯周期を考慮してCMの値を決めて
いるから、蛍光灯の断続的な点灯に鋭敏に反応して再測
距を繰り返し、測距不能状態に陥るという弊害をなくす
ことができる。
According to the third aspect of the invention, the distance measuring light is set to P
When emitting light N times and performing one-cycle distance measurement, the gain of the gain control amplifier remains unchanged until the number of times that the output level from the gain control amplifier is out of the predetermined range reaches CM times. Distance measurement is performed. When the number of times the output level is out of the predetermined range reaches CM times, the gain of the gain control amplifier is changed, and then the distance measurement is repeated. Here, the value of CM is CM ≧ A when the projection interval of the distance measuring light is AT seconds.
It can be obtained from T × PN × 120. This formula is for commercial frequency 6
Since the CM value is determined in consideration of the lighting cycle of the fluorescent lamp of 0 Hz, it is necessary to eliminate the adverse effect that the distance measurement is repeated in response to the intermittent lighting of the fluorescent lamp and the distance measurement is repeated. You can

【0012】請求項4に記載した発明は、ゲインコント
ロールアンプの出力信号が所定レベルを越えたときに
は、1msec〜5msecの時間経過後に、再び同じ
ゲインの値で出力信号を取り込み、この際に再びゲイン
コントロールアンプの出力信号が所定レベルを越えた場
合には、ゲインコントロールアンプの出力信号に基づく
距離データの算出を中止するようにしたものである。
According to a fourth aspect of the present invention, when the output signal of the gain control amplifier exceeds a predetermined level, the output signal is fetched again with the same gain value after a lapse of 1 msec to 5 msec, and at this time, the gain signal is gained again. When the output signal of the control amplifier exceeds a predetermined level, the calculation of the distance data based on the output signal of the gain control amplifier is stopped.

【0013】[0013]

【実施例】マルチビームタイプの測距装置の構成を示す
図1において、投光部2は光源部3と投光レンズ4とか
ら構成され、投光レンズ4の光軸4aは撮影レンズ5の
光軸5aとほぼ平行となっている。光源部3は、それぞ
れ近赤外光を発する3個のLED(発光ダイオード)3
a,3b,3cからなる。これらのLED3a〜3cは
水平に配列され、中央のLED3aは光軸4a上に、ま
たLED3b,3cはその左右にそれぞれ位置してお
り、撮影シーン内の3個所に向けて各々スポット状の測
距光を投光する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS In FIG. 1 showing the structure of a multi-beam type distance measuring device, a light projecting section 2 is composed of a light source section 3 and a light projecting lens 4, and an optical axis 4a of the light projecting lens 4 is of a photographing lens 5. It is substantially parallel to the optical axis 5a. The light source unit 3 includes three LEDs (light emitting diodes) 3 each emitting near infrared light.
It consists of a, 3b and 3c. These LEDs 3a to 3c are arranged horizontally, the central LED 3a is located on the optical axis 4a, and the LEDs 3b and 3c are located on the left and right thereof, respectively, and spot-shaped distance measurement is performed toward three points in the shooting scene. Project light.

【0014】受光部7は、受光レンズ8と、矩形状をし
たPSD9とから構成され、受光レンズ8の光軸8aは
撮影レンズ5の光軸5aとほぼ平行になっている。PS
D9は、その受光面に近赤外光だけを透過するフイルタ
10(図2参照)が貼ってあり、これを透過した入射光
の光量と、基線方向での入射位置に応じた信号を出力端
子9a,9bから出力する。被写体からの反射光は、被
写体距離が短いほど出力端子9b側に寄った位置に入射
する。
The light receiving section 7 comprises a light receiving lens 8 and a rectangular PSD 9, and the optical axis 8a of the light receiving lens 8 is substantially parallel to the optical axis 5a of the taking lens 5. PS
D9 has a filter 10 (see FIG. 2) that transmits only near-infrared light on its light-receiving surface, and outputs a signal according to the amount of incident light that has passed through this and the incident position in the baseline direction. Output from 9a and 9b. The reflected light from the subject enters a position closer to the output terminal 9b side as the subject distance is shorter.

【0015】また、被写体距離が短いほど、反射光の強
度が大きくなり、出力端子9a,9bからの信号の絶対
値も大きくなるが、これらの信号の和と差の比を求める
ことで、反射光の強度に依存せずにその入射位置にのみ
対応した信号を得ることができる。なお、PSD9は水
平方向に関しては識別作用をもっておらず、垂直方向で
の入射高さが同じであれば、水平方向での入射位置が異
なっても出力端子9a,9bからの出力信号の比は等価
なものとなる。
Further, the shorter the subject distance, the higher the intensity of the reflected light and the larger the absolute value of the signals from the output terminals 9a and 9b. However, by calculating the ratio of the sum and difference of these signals, the reflection A signal corresponding to only the incident position can be obtained without depending on the intensity of light. Note that the PSD 9 does not have a discriminating action in the horizontal direction, and if the incident height in the vertical direction is the same, the ratio of the output signals from the output terminals 9a and 9b is equal even if the incident position in the horizontal direction is different. It will be

【0016】LED3a〜3cは、オートフォーカスI
C12からの信号により、LEDドライバ11を介して
発光制御される。オートフォーカスIC12は、マイク
ロコンピュータ14からのコマンドにしたがって予め決
められた測距シーケンスを実行する。また、オートフォ
ーカスIC12は、PSD9の出力端子9a,9bから
の信号をそれぞれ増幅したり、サンプルホールド処理し
てマイクロコンピュータ14に送る。
The LEDs 3a to 3c have an autofocus I
Light emission is controlled via the LED driver 11 by a signal from C12. The autofocus IC 12 executes a predetermined distance measuring sequence according to a command from the microcomputer 14. Further, the autofocus IC 12 amplifies the signals from the output terminals 9a and 9b of the PSD 9, respectively, performs sample hold processing, and sends them to the microcomputer 14.

【0017】前記マイクロコンピュータ14としては汎
用型が用いられ、PSD9の出力端子9a,9bからそ
れぞれ出力された第1,第2チャンネルの信号をもとに
演算を行ない、各LED3a〜3c毎に距離データを算
出する。マイクロコンピュータ14は、3個の距離デー
タの中から最適なものを選択し、選択した距離データに
応じた個数の駆動パルスをレンズ位置制御回路15に送
る。このレンズ位置制御回路15は、ステッピングモー
タ15aを駆動して、距離データに応じた位置に撮影レ
ンズ5をセットする。
A general-purpose type is used as the microcomputer 14, and the calculation is performed based on the signals of the first and second channels output from the output terminals 9a and 9b of the PSD 9, respectively, and the distances are calculated for each of the LEDs 3a to 3c. Calculate the data. The microcomputer 14 selects the optimum one from the three pieces of distance data, and sends the lens position control circuit 15 the number of drive pulses corresponding to the selected distance data. The lens position control circuit 15 drives the stepping motor 15a to set the taking lens 5 at a position according to the distance data.

【0018】図2に示すように、マイクロコンピュータ
14は、CPU20,ROM21,RAM22,シリア
ルI/Oポート23,A/Dコンバータ24からなる。
CPU20は周知のように各種レジスタ及び論理演算回
路を内蔵しており、ROM21に書き込まれたシーケン
スプログラムにしたがって撮影シーケンスを実行する。
RAM22は、撮影シーケンスの実行中に得られる各種
のデータやフラグ等を一時的に格納する。
As shown in FIG. 2, the microcomputer 14 comprises a CPU 20, a ROM 21, a RAM 22, a serial I / O port 23 and an A / D converter 24.
As is well known, the CPU 20 incorporates various registers and a logical operation circuit, and executes a shooting sequence according to a sequence program written in the ROM 21.
The RAM 22 temporarily stores various data, flags and the like obtained during execution of the shooting sequence.

【0019】オートフォーカスIC12はワンチップの
ICで構成され、ロジック回路26と、ゲインコントロ
ーラ27と、PSD9の出力端子9a,9bから出力さ
れる第1,第2チャンネルの電流を電圧に変換するプリ
アンプ28a,28bと、ゲインコントロールアンプ2
9a,29bと、サンプルホールド回路30a,30b
と、バッファアンプ31a,31b等を有する。
The autofocus IC 12 is a one-chip IC and is a preamplifier for converting the currents of the first and second channels output from the logic circuit 26, the gain controller 27, and the output terminals 9a and 9b of the PSD 9 into voltage. 28a, 28b and gain control amplifier 2
9a and 29b and sample and hold circuits 30a and 30b
And buffer amplifiers 31a and 31b.

【0020】ゲインコントロールアンプ29a,29b
は、被写体が遠距離の場合に、PSD9に入射している
反射光の光量が低下し、出力端子9a,9bからの電流
の絶対値が小さくなることを考慮して設けられたもの
で、後述するゲインコントロール処理によって最適なゲ
インが与えられる。サンプルホールド回路30a,30
bは、ロジック回路26からのサンプリングパルスを受
けてゲインコントロールアンプ29a,29bで増幅さ
れた信号をサンプルホールドし、これらの信号をバッフ
ァアンプ31a,31bを介してマイクロコンピュータ
14のA/Dコンバータ24に送る。なお、ロジック回
路26は基本的にシリアルイン−パラレルアウトのシフ
トレジスタからなり、ゲインコントローラ27はそのシ
フトレジスタの所定ビット位置に設定されたゲインコン
トロールデータを読み出し、これに基づいてゲインコン
トロールアンプ29a,29bに共通な最適ゲインを設
定する。
Gain control amplifiers 29a, 29b
Is provided in consideration of the fact that the light amount of the reflected light incident on the PSD 9 decreases and the absolute value of the current from the output terminals 9a and 9b decreases when the subject is at a long distance. Optimal gain is given by the gain control process. Sample hold circuits 30a, 30
b receives the sampling pulse from the logic circuit 26 and samples and holds the signals amplified by the gain control amplifiers 29a and 29b, and these signals are buffered by the A / D converter 24 of the microcomputer 14 via the buffer amplifiers 31a and 31b. Send to. The logic circuit 26 is basically composed of a serial-in / parallel-out shift register, and the gain controller 27 reads the gain control data set at a predetermined bit position of the shift register, and based on this, the gain control amplifier 29a, The optimum gain common to 29b is set.

【0021】シリアルI/Oポート23は、前述したよ
うにCPU20からのパラレルコマンドデータをシリア
ルデータパルス(AFSD)に変換してロジック回路2
6に供給するとともに、このシリアルデータをシフトレ
ジスタに転送するための転送パルス(AFSCK),シ
フトレジスタからのパラレルデータのラッチやLED3
a〜3cの発光タイミング等を決定する制御パルス(A
FLCK)を出力する。また、オートフォーカスIC1
2から出力されるアナログ信号は、A/Dコンバータ2
4によってその信号電圧レベルに対応した7ビットのデ
ジタル信号(十進数で0〜127を表す)に変換され
る。
The serial I / O port 23 converts the parallel command data from the CPU 20 into a serial data pulse (AFSD) as described above, and the logic circuit 2
6, a transfer pulse (AFSCK) for transferring this serial data to the shift register, latching parallel data from the shift register, and the LED 3
a control pulse (A
FLCK) is output. Also, autofocus IC1
The analog signal output from 2 is the A / D converter 2
4 converts it into a 7-bit digital signal (representing 0 to 127 in decimal) corresponding to the signal voltage level.

【0022】図3は、ロジック回路26に用いられてい
る8ビットのシフトレジスタ33を概念的に示してい
る。「D0〜D4」の5ビットには、ゲインコントロー
ルデータ(GAIN)が、「D5〜D6」の2ビットに
はLED発光データ(LED)が、また「D7」のビッ
トにはLEDの発光/リセットの切換えデータ(SE
T)が割り当てられている。5ビットのゲインコントロ
ールデータは、「0」レベルから「31」レベルまでの
ゲインレベルを表すことができる。また、2ビットのL
ED発光データは、十進数で「0」,「1」,「2」,
「3」の4状態を表し、「0」のときにはLED3a〜
3cの全てを消灯し、「1」のときにはLED3aのみ
を発光し、「2」,「3」のときにはそれぞれLED3
b,LED3cを発光させる。
FIG. 3 conceptually shows an 8-bit shift register 33 used in the logic circuit 26. Gain control data (GAIN) is in 5 bits of "D0 to D4", LED light emission data (LED) is in 2 bits of "D5 to D6", and light emission / reset of LED is in the bit of "D7". Switching data (SE
T) is assigned. The 5-bit gain control data can represent gain levels from "0" level to "31" level. Also, 2 bits of L
The ED emission data are decimal numbers “0”, “1”, “2”,
It represents four states of "3", and when it is "0", the LEDs 3a to
All of 3c are turned off, when it is "1", only the LED 3a emits light, and when it is "2", "3", the LED 3 respectively
b, the LED 3c is caused to emit light.

【0023】基本的な測距シーケンスの手順を示す図4
において、オートフォーカスIC12のアンプ系のオフ
セット値を検出する処理、LED3a〜3cを順番に発
光させながら、そのときに得られるゲインコントロール
アンプ29a,29bの出力信号に応じて、そのゲイン
を最適値に決めるためのゲイン決定処理,このゲインの
もとで測定データを取り込み、各LED3a〜3c毎に
距離データを算出する測距処理,3個の距離データの中
から最適なものを選択する処理が順次に実行される。
FIG. 4 showing a procedure of a basic distance measuring sequence.
In the process of detecting the offset value of the amplifier system of the autofocus IC 12, the LEDs 3a to 3c are sequentially emitted, and the gain is set to the optimum value according to the output signals of the gain control amplifiers 29a and 29b obtained at that time. A gain determining process for determining, a distance measuring process for taking measurement data under this gain and calculating distance data for each LED 3a to 3c, and a process for selecting an optimum one from the three distance data are sequentially performed. To be executed.

【0024】次に、上記実施例の作用について図5ない
し図13を参照して説明する。図5に示すように、カメ
ラの電源スイッチが投入されると、RAM22内のデー
タ格納エリアが初期状態にリセットされる。次に、フイ
ルムの装填完了状態,レンズバリアの開放状態を表す各
種の外部データがRAM22内に読み込まれる。CPU
20は、これらの外部データに基づき、カメラが撮影待
機状態になっていると判定すると、シャッタボタンのロ
ックを解除する。
Next, the operation of the above embodiment will be described with reference to FIGS. As shown in FIG. 5, when the power switch of the camera is turned on, the data storage area in the RAM 22 is reset to the initial state. Next, various kinds of external data representing the loaded state of the film and the opened state of the lens barrier are read into the RAM 22. CPU
When the camera 20 determines that the camera is in the shooting standby state based on these external data, the shutter 20 unlocks the shutter button.

【0025】シャッタボタンを半押しすると、CPU2
0はオートフォーカスIC12に測距コマンドを出力す
る。オートフォーカスIC12は、投光部2を駆動して
スポット状の近赤外光を周期的に発生させ、これらを被
写体に向けて投光する。この被写体で反射された近赤外
光を受光部7で検出することにより、被写体距離が測定
される。この距離測定後に、CPU20は、測光コマン
ドを出力し、被写体輝度の測定を開始させる。得られた
被写体輝度と、フイルム感度信号とに基づいて露光演算
を行い、適正露光が得られる露出時間を算出し、RAM
22に格納する。露出演算後、CPU20はすでにRA
M22に格納されている距離データに対応した個数のク
ロックパルスをレンズ位置制御回路15に送る。これに
よりステッピングモータ15aが駆動され、撮影レンズ
5は距離データに応じたレンズ位置に繰り出される。
When the shutter button is pressed halfway, the CPU2
0 outputs a distance measurement command to the autofocus IC 12. The autofocus IC 12 drives the light projecting unit 2 to periodically generate spot-like near-infrared light, and projects the near-infrared light toward a subject. The object distance is measured by detecting the near-infrared light reflected by the object with the light receiving unit 7. After this distance measurement, the CPU 20 outputs a photometric command to start measurement of subject brightness. The exposure calculation is performed based on the obtained subject brightness and the film sensitivity signal, and the exposure time for obtaining the proper exposure is calculated.
It stores in 22. After the exposure calculation, the CPU 20 has already RA
The number of clock pulses corresponding to the distance data stored in M22 is sent to the lens position control circuit 15. As a result, the stepping motor 15a is driven, and the taking lens 5 is extended to the lens position according to the distance data.

【0026】シャッタボタンが全押しされると、RAM
22から読み出された露出時間データに応じて、プログ
ラムシャッタ(図示せず)が作動される。1コマの撮影
が終了すると、CPU20は、フイルム移送コマンドを
発生し、フイルム移送機構(図示せず)を作動させてフ
イルムを1コマ送りする。1コマ分のフイルム移送が完
了すると、CPU20はレンズ位置制御回路15にリセ
ット信号を送り、撮影レンズ5を初期位置に戻して1回
の撮影シーケンスが完了する。
When the shutter button is fully pressed, the RAM
A program shutter (not shown) is operated in accordance with the exposure time data read from 22. When the shooting of one frame is completed, the CPU 20 generates a film transfer command and operates a film transfer mechanism (not shown) to feed the film one frame. When the film transfer for one frame is completed, the CPU 20 sends a reset signal to the lens position control circuit 15, returns the taking lens 5 to the initial position, and one taking sequence is completed.

【0027】次に、測距シーケンスについて詳しく説明
する。測距シーケンスが開始されると、まず図6に示す
ように、オフセット値の検出処理が実行される。このオ
フセット値検出処理では、シフトレジスタ33の「D0
〜D7」の各ビットに、「01000000」がセット
される。これにより、「GAIN=8」,「LED=
0」,「SET=0」の各コマンドデータが設定され
る。このコマンドデータの設定は、図7のタイミングチ
ャートに示した時点P1、すなわち転送パルスAFSC
Kが8個のパルスを送出した後、制御パルスAFLCK
がローレベルになったタイミングで行われる。なお、シ
リアルデータパルスの転送は、転送パルスAFSCKの
立ち上がりによってシフトレジスタ33に順次に転送さ
れる。さらに上記コマンドデータの転送後には、CPU
20内の所定レジスタに「COUNT=8」がセットさ
れる。
Next, the distance measuring sequence will be described in detail. When the distance measuring sequence starts, first, as shown in FIG. 6, offset value detection processing is executed. In this offset value detection processing, “D0 of the shift register 33 is
"01000000" is set to each bit of "~ D7". As a result, "GAIN = 8" and "LED =
Each command data of "0" and "SET = 0" is set. This command data is set at the time point P1 shown in the timing chart of FIG. 7, that is, the transfer pulse AFSC.
After K has sent out 8 pulses, the control pulse AFLCK
Is performed at the timing when the level becomes low. The serial data pulse is sequentially transferred to the shift register 33 at the rising edge of the transfer pulse AFSCK. Furthermore, after transferring the above command data, the CPU
“COUNT = 8” is set in a predetermined register in 20.

【0028】シフトレジスタ33にセットされたコマン
ドデータのうち、「GAIN=8」のデータは、ゲイン
コントローラ27を介してゲインコントロールアンプ2
9a,29bに供給され、これらのゲインが初期値(最
低値)「8」に設定される。この実施例の測距装置で
は、増幅特性の直線性が保たれるように、「GAIN」
が「8」〜「31」の範囲内で使用しているが、この範
囲はカメラの仕様,LEDの発光量等によって適宜決め
られるものである。
Of the command data set in the shift register 33, the data of "GAIN = 8" is sent to the gain control amplifier 2 via the gain controller 27.
9a and 29b, and these gains are set to the initial value (minimum value) "8". In the distance measuring device of this embodiment, "GAIN" is set so that the linearity of the amplification characteristic is maintained.
Is used within the range of "8" to "31", but this range is appropriately determined according to the specifications of the camera, the light emission amount of the LED, and the like.

【0029】前記シリアルデータの転送後、第1,第2
チャンネルからの出力信号をサンプルホールドし、これ
をA/D変換したデジタル信号AFD1,AFD2がマ
イクロコンピュータ14に読み込まれる。この読込み処
理の手順は、図7のタイミングチャート及び図8のフロ
ーチャートに示すように、まず制御パルスAFLCKが
期間ΔT1の間ローレベルにされる。この制御パルスA
FLCKがローレベルとなってから、期間ΔT7が経過
した時点P2において、コマンドデータで決められたい
ずれか1つのLEDが発光する。そして、期間ΔT2後
にAFSDがハイレベルになるタイミングで、サンプル
ホールド回路30a,30bがゲインコントロールアン
プ29a,29bの出力をサンプルホールドする。さら
に期間ΔT3後のローレベルになる時点P3でLEDの
発光が停止する。また、期間ΔT4後にAFSDがハイ
レベルになったときに、サンプルホールド処理が終了す
る。
After the transfer of the serial data, first, second
Digital signals AFD1 and AFD2 obtained by sample-holding the output signal from the channel and A / D converting the sampled signal are read into the microcomputer 14. In the procedure of this reading process, as shown in the timing chart of FIG. 7 and the flowchart of FIG. 8, the control pulse AFLCK is first set to the low level during the period ΔT1. This control pulse A
At time P2 when the period ΔT7 has elapsed since FLCK goes low, any one of the LEDs determined by the command data emits light. Then, after the period ΔT2, the sample hold circuits 30a and 30b sample and hold the outputs of the gain control amplifiers 29a and 29b at the timing when the AFSD becomes high level. Further, the light emission of the LED is stopped at the time point P3 when it becomes the low level after the period ΔT3. Further, when AFSD becomes high level after the period ΔT4, the sample hold processing ends.

【0030】図7において、制御パルスAFLCKが期
間ΔT1の間にローレベルになっているが、これはLE
Dを点灯させるときのもので、「LED=0」のコマン
ドで行われるオフセット値の検出処理では、AFLCK
はハイレベルに保たれる。したがって、オフセット値の
検出処理では、LEDが消灯しており、またゲインコン
トロールアンプ29a,29bが「GAIN=8」にセ
ットされている。この状態で、ゲインコントロールアン
プ29a,29bの出力信号がサンプルホールド回路3
0a,30bにサンプルホールドされる。
In FIG. 7, the control pulse AFLCK is at the low level during the period ΔT1, which is LE.
When D is turned on, AFLCK is used in the offset value detection process performed by the command "LED = 0".
Is kept at a high level. Therefore, in the offset value detection process, the LED is turned off, and the gain control amplifiers 29a and 29b are set to "GAIN = 8". In this state, the output signals of the gain control amplifiers 29a and 29b are the sample and hold circuit 3
The samples are held at 0a and 30b.

【0031】AFSDがローレベルになった時点P3か
ら時間ΔT6が経過すると、サンプルホールド回路30
a,30bの出力信号は、バッファアンプ31a,31
bを介してA/Dコンバータ24で7ビットのデジタル
信号に変換され、これらが第1,第2チャンネルの測定
データAFD1,AFD2としてCPU20に順次取り
込まれ、そしてRAM22内の所定アドレスに格納され
る。
When time ΔT6 elapses from the time P3 when AFSD becomes low level, the sample hold circuit 30
The output signals of a and 30b are buffer amplifiers 31a and 31b.
It is converted into a 7-bit digital signal by the A / D converter 24 via b, and these are sequentially fetched into the CPU 20 as the measurement data AFD1 and AFD2 of the first and second channels, and stored at a predetermined address in the RAM 22. ..

【0032】他方、ゲイン決定処理及び測距処理では、
AFLCKがローレベルに維持されている期間ΔT1の
間で、指定されたLEDが1回点灯され、この点灯中に
ゲインコントロールアンプ29a,29bの出力信号
が、サンプルホールド回路30a,30bにサンプルホ
ールドされる。そして、LEDの点灯又は消灯にかかわ
らず、AFLCKのハイレベル期間ΔT5が経過した時
点で、1個の測定データの取込みサイクルが終了する。
On the other hand, in the gain determining process and the distance measuring process,
The designated LED is lit once during the period ΔT1 in which AFLCK is maintained at the low level, and the output signals of the gain control amplifiers 29a and 29b are sample-held by the sample-hold circuits 30a and 30b during this lit. It Then, regardless of whether the LED is turned on or off, at the time when the high level period ΔT5 of AFLCK elapses, the acquisition cycle of one measurement data ends.

【0033】オフセット値の検出処理では、測定データ
の取込みが8回行われ、測定データAFD1,AFD2
がそれぞれ8個ずつ得られる。これらの8個の測定デー
タはチャンネルごとに平均され、これらの平均値がオフ
セット値OF1,OF2として決定される。前述したよ
うに、オフセット値検出処理ではLEDが消灯している
から、オフセット値OF1,OF2は、PSD9に入射
する撮影シーンからのノイズ光,信号処理系のノイズ等
に起因している。
In the offset value detection process, the measurement data is fetched eight times, and the measurement data AFD1 and AFD2 are acquired.
You can get 8 each. These eight measurement data are averaged for each channel, and their average value is determined as the offset values OF1 and OF2. As described above, since the LED is turned off in the offset value detection processing, the offset values OF1 and OF2 are caused by noise light from the shooting scene incident on the PSD 9, noise of the signal processing system, and the like.

【0034】オフセット値検出処理の後は、ゲイン決定
処理及び測距処理が行われる。これらの処理はLED3
a〜3cについて個別に実行される。ゲイン決定処理は
図9のフローチャートにしたがって行われる。ゲイン決
定処理が開始されるときには、RAM22に設定された
「GFLAG」,「OVFLAG」,「GCOUNT」
が初期値「0」にセットされる。しかる後にシリアルポ
ート23からロジック回路26に新たなコマンドを表す
シリアルデータが転送され、AFLCKがローレベルに
なった時点P1で、シフトレジスタ33の各ビットには
「01000011」の2進データがセットされる。こ
れにより、「GAIN=8」,「LED=1」,「SE
T=1」のコマンドが設定され、LED3aのみが発光
可能状態になる。このコマンド設定後に、期間「ΔT2
+ΔT3」の間にLED3aを1回点灯させ、この点灯
中にサンプリング処理が行われる。その後、測定データ
AFD1,AFD2の読込み処理が行われる。なお、L
ED3a〜3cの点灯周期は、例えば1msである。
After the offset value detection processing, gain determination processing and distance measurement processing are performed. These processing is LED3
It is executed individually for a to 3c. The gain determination process is performed according to the flowchart of FIG. When the gain determination process is started, “GFLAG”, “OVFLAG”, and “GCOUNT” set in the RAM 22.
Is set to the initial value "0". Then, serial data representing a new command is transferred from the serial port 23 to the logic circuit 26, and at a time point P1 when AFLCK becomes low level, binary data “01000011” is set in each bit of the shift register 33. It As a result, “GAIN = 8”, “LED = 1”, “SE
The command “T = 1” is set, and only the LED 3a is in the light-emission enabled state. After this command is set, the period “ΔT2
The LED 3a is turned on once during "+ ΔT3", and the sampling process is performed during this turning on. Then, the reading process of the measurement data AFD1 and AFD2 is performed. Note that L
The lighting cycle of the EDs 3a to 3c is, for example, 1 ms.

【0035】ここで、ゲインの初期値設定や、ゲイン変
更が行われた場合には、ゲインコントロールアンプ29
a,29bの作動が安定した後に、測定データAFD
1,AFD2の読込み処理を行うために、測距シーケン
スの開始を所定時間遅らせる。すなわち、時点P1にお
いて、シフトレジスタ33にコマンドデータがセットさ
れて、ゲインコントロールアンプ29a,29bのゲイ
ンが設定されるが、ゲインコントロールアンプ29a,
29bのゲインが安定するまでに、約1.5〜2mse
cの時間を要する。そこで、期間ΔT0として2mse
cを設定し、この期間経過後にLED3aの点灯を許容
し、安定状態となったゲインコントロールアンプ29
a,29bの出力をサンプリングする。なお、ゲインを
一定に保ったまま、測定データAFD1,AFD2の取
込みを行う場合には、図7に示すようにΔT0が「0」
である。
Here, when the initial value of the gain is set or the gain is changed, the gain control amplifier 29
After stable operation of a and 29b, measurement data AFD
1, in order to perform the reading process of AFD2, the start of the distance measuring sequence is delayed by a predetermined time. That is, at the time point P1, command data is set in the shift register 33 and the gains of the gain control amplifiers 29a and 29b are set.
It takes about 1.5 to 2 mse until the gain of 29b stabilizes.
c takes time. Therefore, the period ΔT0 is set to 2 mse
c is set, and the LED 3a is allowed to light after this period has elapsed, and the gain control amplifier 29 is in a stable state.
The outputs of a and 29b are sampled. When the measurement data AFD1 and AFD2 are loaded with the gain kept constant, ΔT0 is “0” as shown in FIG.
Is.

【0036】図1に示すように、LED3aからの測距
光が主要被写体S1に照射されると、その反射光は受光
レンズ8を通ってPSD9に入射する。そして、このと
きにPSD9の両端子9a,9bから出力される信号
は、PSD9に入射した光の強度及び入射位置の情報を
含んでいる。これらの信号は、A/Dコンバータ24で
各々デジタル変換された後、測定データAFD1,AF
D2として取り込まれる。
As shown in FIG. 1, when the distance measuring light from the LED 3a is applied to the main subject S1, the reflected light passes through the light receiving lens 8 and is incident on the PSD 9. The signals output from both terminals 9a and 9b of the PSD 9 at this time include information on the intensity of light incident on the PSD 9 and the incident position. These signals are digitally converted by the A / D converter 24 and then measured data AFD1, AF
Captured as D2.

【0037】次に、CPU20は、測定データAFD
1,AFD2のいずれかが十進数で「127」に達して
いるか否かを判断する。AFD1,AFD2の値が「1
27」に達している場合には、そのいずれかが飽和状態
(オーバーフロー)であると判定される。この測定デー
タは極めて信頼性が薄いので、「GAIN=8」である
ことを確認した上で、「AFRESULTa←127」
(「AFRESULTa」については後述する)の処理
を行い、LED3aによる測距を終了する。この状態
は、画面中央の被写体がかなり接近した位置にあり、
「GAIN=8」でも反射光が強過ぎる場合である。
Next, the CPU 20 causes the measurement data AFD
It is determined whether any one of AFD1 and AFD2 has reached "127" in decimal. The values of AFD1 and AFD2 are "1.
When it reaches 27 ", it is determined that one of them is in a saturated state (overflow). Since this measurement data is extremely unreliable, after confirming that "GAIN = 8", "AFRESULTa ← 127"
(“AFRESULTa” will be described later), and the distance measurement by the LED 3a is completed. In this state, the subject in the center of the screen is very close,
Even when "GAIN = 8", the reflected light is too strong.

【0038】測定データAFD1,AFD2が飽和して
いない場合には、図10に示す手順で、各々の測定デー
タAFD1,AFD2から、加算測定データAFAD
D,減算測定データAFDIFの算出処理が行われる。
この処理では、ノイズ成分除去のために測定データAF
D1,AFD2に対してオフセット値OF1,OF2の
減算が行われる。また、オフセット値の減算処理の結果
が負の値になったときや、減算測定データAFDIFの
値が負の値になったときには、これらの値を「0」にし
て以後の演算を簡略化する。
When the measurement data AFD1 and AFD2 are not saturated, the addition measurement data AFAD is calculated from the respective measurement data AFD1 and AFD2 by the procedure shown in FIG.
Calculation processing of the D and subtraction measurement data AFDIF is performed.
In this process, the measurement data AF is used to remove the noise component.
The offset values OF1 and OF2 are subtracted from D1 and AFD2. Further, when the result of the subtraction processing of the offset value becomes a negative value, or when the value of the subtraction measurement data AFDIF becomes a negative value, these values are set to "0" to simplify the subsequent calculation. ..

【0039】次に、加算測定データAFADDについ
て、その値が「136」以上であるか否かが判断され
る。この値が「136」以上であるときには、測定デー
タAFD1,AFD2の各々の絶対値が以後の測距演算
を実行するのに適切な範囲にあると判定され、ゲインコ
ントロールアンプ29a,29bのゲインはそのときの
「GAIN」の値として決定される。そして、この「G
AIN」にセットしたままで、図11に示すように、L
ED3aによる測距処理が開始される。
Next, it is determined whether or not the value of the addition measurement data AFADD is "136" or more. When this value is equal to or greater than "136", it is determined that the absolute value of each of the measurement data AFD1 and AFD2 is within a range suitable for executing the subsequent distance measurement calculation, and the gains of the gain control amplifiers 29a and 29b are It is determined as the value of "GAIN" at that time. And this "G
As it is set to "AIN", as shown in FIG.
Distance measurement processing by the ED 3a is started.

【0040】一方、加算測定データAFADDの値が
「136」未満であるときには、そのときの「GAI
N」の値が不適切であったことを表す「GFLAG」が
「1」になっていないことを確認した上で、測定データ
AFD1,AFD2の絶対値を大きくするために、ゲイ
ンの変更が行われる。この変更後のゲインの値は、もと
の「GAIN」の値に、補正値「N」を加算したもので
あり、これがRAM22に書き込まれる。この補正値
「N」の値は、加算測定データAFADDの大きさに応
じて、次の表1に示すように設定されている。
On the other hand, when the value of the addition measurement data AFADD is less than "136", "GAI" at that time is calculated.
After confirming that "GFLAG" indicating that the value of "N" was inappropriate is not "1", the gain is changed to increase the absolute value of the measurement data AFD1 and AFD2. Be seen. The changed gain value is the original “GAIN” value plus the correction value “N” and is written in the RAM 22. The value of the correction value “N” is set as shown in Table 1 below according to the size of the addition measurement data AFADD.

【0041】[0041]

【表1】 [Table 1]

【0042】「GAIN」の値を変更は、新しいゲイン
を含むコマンドデータをシフトレジスタ33にセットす
ることで行われるが、この際にシフトレジスタ33の
「D0」〜「D4」のビットのデータだけが変化し、他
のビットに割り当てられるデータはそのままとなってい
る。そして、ゲインコントローラ26は新たな「GAI
N」の値にしたがってゲインコントロールアンプ29
a,29bのゲインを調節し、引続き同様の処理を繰り
返す。この繰返し処理においても、ゲイン変更のための
コマンド設定の後にはΔT0の遅延が行われ、ゲインコ
ントロールアンプ29a,29bの作動が安定してか
ら、再び測定データの取込みが続行される。この繰返し
処理時において、「GAIN>8」でオーバーフローす
ることがあるが、この場合には「GFLAG」を「1」
にセットしてから、「GAIN」の値が「1」だけ低く
設定し直される。
The value of "GAIN" is changed by setting command data including a new gain in the shift register 33. At this time, only the data of bits "D0" to "D4" of the shift register 33 is changed. Changes, and the data assigned to other bits remains unchanged. Then, the gain controller 26 uses the new “GAI
Gain control amplifier 29 according to the value of "N"
The gains of a and 29b are adjusted, and the same processing is repeated. Also in this repetitive process, after the command setting for changing the gain is delayed by ΔT0, the operation of the gain control amplifiers 29a and 29b is stabilized, and then the acquisition of the measurement data is continued again. During this iterative process, "GAIN>8" may overflow, but in this case, "GFLAG" is set to "1".
After being set to, the value of "GAIN" is set lower by "1".

【0043】「GAIN」の値が最大ゲインである「3
1」に達しても適切な絶対値を持った加算測定データA
FADDが得られないときには、被写体からの反射光が
極めて微弱、あるいはPSD9に戻ってきていない状態
である。この場合には被写体距離が極めて遠距離である
ことに対応しているから、後述する測距を行っても実益
がない。したがって、この場合には測距処理を行うこと
なく、「AFRESULTa←0」の処理が行われる。
The value of "GAIN" is "3" which is the maximum gain.
Addition measurement data A that has an appropriate absolute value even if it reaches 1 ”
When the FADD is not obtained, the reflected light from the subject is extremely weak or is not returned to the PSD 9. In this case, since the object distance corresponds to an extremely long distance, there is no practical benefit even if the distance measurement described below is performed. Therefore, in this case, the processing of "AFRESULTa ← 0" is performed without performing the distance measurement processing.

【0044】また、このゲイン決定処理におけるゲイン
の設定し直し回数RNは、ゲインの初期値IG,ゲイン
の最大値GM,最大補正値NMとから求まる。 RN=(GM−IG)÷NM この実施例では、GM=31,IG=NM=8であるか
ら、RN=2.9≒3となる。したがって、ゲインの設
定し直し回数RNは3回に制限され、「GCOUNT=
3」に達した場合には、そのときの「GAIN」が選択
され、ゲイン決定処理が終了する。この制限により、例
え被写体からの反射光の強度が変化して、測定データA
FD1,AFD2の値が変動したとしても、ゲイン決定
処理に時間を要することがなくなり、迅速にゲインを決
めることができる。しかも、ゲインの調節幅「31−
8」を、最大補正値「8」で除してゲイン調節の回数の
上限を決めているから、AFADDの値が極めて小さい
ような場合でも、ゲインの値を最大値「31」まで調節
することが可能となる。
The number of times of resetting of the gain RN in this gain determination processing is obtained from the initial gain value IG, the maximum gain value GM, and the maximum correction value NM. RN = (GM-IG) ÷ NM In this embodiment, GM = 31 and IG = NM = 8, so RN = 2.9≈3. Therefore, the number of times of resetting the gain RN is limited to 3 times, and “GCOUNT =
If the value reaches “3”, “GAIN” at that time is selected, and the gain determination process ends. Due to this limitation, the intensity of the reflected light from the subject changes, and the measured data A
Even if the values of FD1 and AFD2 change, the gain determination process does not take time, and the gain can be determined quickly. Moreover, the gain adjustment range "31-
8 "is divided by the maximum correction value" 8 "to determine the upper limit of the number of gain adjustments. Therefore, even when the value of AFADD is extremely small, the gain value should be adjusted to the maximum value" 31 ". Is possible.

【0045】上述のゲイン決定処理が終了すると、LE
D3aによる測距処理が開始される。図11及び図12
はこの測距処理手順を表している。この測距処理は、各
種の初期データをRAM22にセットしてから、LED
3aを18回点灯させ、その都度、AFD1,AFD2
を読み込む。そして、毎回のAFD1,AFD2の読み
込み時には、そのいずれかが飽和しているか、もしくは
その値が「15」未満で測定データの絶対値として不充
分なものであるかが判定され、これらに該当するときに
は不適切測距であることを表す「OVCOUNT」を
「1」ずつカウントアップしてゆく。この場合には、測
距光を再度投光して測定データの取込みをやり直す。
When the above gain determination processing is completed, LE
Distance measurement processing by D3a is started. 11 and 12
Represents the procedure of this distance measurement processing. In this distance measurement processing, after setting various initial data in the RAM 22, the LED
3a is turned on 18 times, and AFD1 and AFD2 each time
Read. Then, when reading AFD1 and AFD2 each time, it is determined whether either of them is saturated, or whether the value is less than “15” and the absolute value of the measured data is insufficient, and these are applicable. Occasionally, "OVCOUNT" indicating improper distance measurement is incremented by "1". In this case, the distance measuring light is projected again and the measurement data is read again.

【0046】ここで、「OVCOUNT」の上限値につ
いて説明する。この「OVCOUNT」の上限値が小さ
すぎると、偶然かつ瞬間的に被写体の照明条件が変化し
たような場合にも「OVFLAG」がセットされやすく
なり、後述する表2の「M」の値により距離データが求
められることになり、正確さに欠けるきらいがある。照
明条件が変化する場合の殆どは蛍光灯であり、これは商
用電源で駆動されるから、その2倍である120Hzを
考慮して、「OVCOUNT」の上限値CMは次式から
定められる。ここで、ATは測距光の投光間隔であり,
PNは投光回数である。 CM≧AT×PN×120
Here, the upper limit of "OVCOUNT" will be described. If the upper limit value of "OVCOUNT" is too small, "OVFLAG" is likely to be set even if the illumination condition of the subject changes accidentally and momentarily. There is a need for data, and it tends to lack accuracy. Most of the cases where the illumination conditions change are fluorescent lamps, which are driven by a commercial power source, so the upper limit value CM of “OVCOUNT” is determined from the following equation in consideration of 120 Hz, which is twice that. Where AT is the projection distance of the distance measuring light,
PN is the number of times of light projection. CM ≧ AT × PN × 120

【0047】この実施例では、測距光の投光間隔ATが
1msec、投光回数PNが18回であるから、これら
を上式に代入すると、次のようになる。 CM≧1×10-3×18×120=2.16 「OVCOUNT」は、整数であるから、上限値CMを
切り上げて「3」が得られる。この式から上限値CMを
設定すると、図23に示したように、測距光の投光のタ
イミングが蛍光灯の発光のピークと2回まで一致したと
しても、これに影響されずに測距を継続することができ
る。この場合には、1個の距離データを得るために、2
0回の投光が行われることになる。勿論、この「OVC
OUNT」となった2個の測定データは、測距演算に用
いられない。
In this embodiment, the projection distance AT of the distance measuring light is 1 msec and the number of projections PN is 18. Therefore, when these are substituted into the above equation, the following is obtained. CM ≧ 1 × 10 −3 × 18 × 120 = 2.16 Since “OVCOUNT” is an integer, the upper limit CM is rounded up to “3”. When the upper limit value CM is set from this equation, as shown in FIG. 23, even if the projection timing of the distance measuring light coincides with the emission peak of the fluorescent lamp up to twice, the distance measuring is performed without being affected by this. Can continue. In this case, to obtain one distance data, 2
The light will be emitted 0 times. Of course, this "OVC
The two pieces of measurement data that have become "OUNT" are not used in the distance measurement calculation.

【0048】「OVCOUNT」がカウントアップさ
れ、その結果「3」に達したときには、ゲイン決定処理
で決めたゲインの値が不適切であるものと判定し、「O
VFLAG」を「1」にセットした上で、「GAIN」
を「1」だけ低く再設定して最初から測距処理をやり直
す。この測距中でのゲイン変更は、前述したように、コ
マンドを再セットすることで行われるが、この場合にお
いてもLED3aの点灯前には時間ΔT0の遅延処理が
行われる。なお、複数の初期データをRAM22にセッ
トするための時間が、ΔT0以上の場合には、ΔT0タ
イマーによる遅延を省略することができる。
When "OVCOUNT" is counted up and reaches "3" as a result, it is determined that the gain value determined by the gain determination process is inappropriate, and "OVCOUNT" is determined.
Set "VFLAG" to "1" and then "GAIN"
Is set low by "1" and the ranging process is restarted from the beginning. The gain change during the distance measurement is performed by resetting the command as described above. In this case as well, the delay process of time ΔT0 is performed before the LED 3a is turned on. When the time for setting a plurality of initial data in the RAM 22 is ΔT0 or more, the delay by the ΔT0 timer can be omitted.

【0049】また、測距処理が何度も繰り返されること
を防止するために、一旦「OVFLAG」が「1」にセ
ットされた後に、再び「OVCOUNT」が「3」に達
したとき、すなわち「OVCOUNT」となった全回数
が「6」以上のときには、そのときの「GAIN」の値
に対応して「AFRESULTa」の値を「M」として
決定する。この決定時には、表2に示すテーブルが参照
される。
In order to prevent the distance measuring process from being repeated many times, when "OVFLAG" is once set to "1" and then "OVCOUNT" reaches "3" again, that is, " When the total number of times of "OVCOUNT" is "6" or more, the value of "AFRESULTa" is determined as "M" corresponding to the value of "GAIN" at that time. At the time of this determination, the table shown in Table 2 is referred to.

【0050】[0050]

【表2】 [Table 2]

【0051】上記のように、「OVCOUNT」の値が
「3」未満である場合には、引続きそのままのゲインで
測距が継続されることになる。しかし、後段での処理に
おいて、測定データAFD1,AFD2の中の最大値,
最小値の除去及び複数の測定データの平均化が行われる
から、測定データ中に2個程度のオーバーフローによる
異常データがあっても、測距演算においてはその影響は
ほとんど現れることはない。
As described above, when the value of "OVCOUNT" is less than "3", the distance measurement is continued with the same gain. However, in the later processing, the maximum value among the measurement data AFD1 and AFD2,
Since the minimum value is removed and a plurality of measurement data are averaged, even if there are two or more abnormal data in the measurement data, the influence thereof hardly appears in the distance measurement calculation.

【0052】各測定データAFD1,AFD2の取込み
を行う過程で、その中の最小値と最大値とを識別した上
で、AFD1,ADF2は各々「SUM1」,「SUM
2」として合計されてゆく。そして、18回の投光で得
た合計値「SUM1」,「SUM2」から、平均値の信
頼性を高めるために、AFD1,AFD2の各々の最大
値,最小値を減算した後、平均値の算出が行われる。な
お、測距精度が低下するが、最大値,最小値を除かずに
平均値を算出してもよく、この場合には除数が「18」
となる。
In the process of fetching the measurement data AFD1 and AFD2, the minimum value and the maximum value among them are discriminated, and the AFD1 and ADF2 are respectively "SUM1" and "SUM".
2 ”will be added up. Then, in order to increase the reliability of the average value, the maximum value and the minimum value of each of AFD1 and AFD2 are subtracted from the total values "SUM1" and "SUM2" obtained by projecting 18 times, and then the average value is calculated. Calculation is performed. Although the distance measurement accuracy is reduced, the average value may be calculated without removing the maximum value and the minimum value. In this case, the divisor is "18".
Becomes

【0053】こうしてチャンネルごとに得られた平均値
は、図10の処理にしたがって、オフセット値の補正の
後、加算測定データAFADD,減算測定データAFD
IFに変換される。そして、これらの比の値に「12
7」を乗じて、距離データ「AFRESULTa」を算
出し、LED3aによる測距処理が終了する。
The average value thus obtained for each channel is corrected for the offset value according to the processing of FIG. 10 and then the addition measurement data AFADD and the subtraction measurement data AFD are added.
Converted to IF. Then, the value of these ratios is set to "12
7 ”is multiplied to calculate the distance data“ AFRESULTa ”, and the distance measurement processing by the LED 3a ends.

【0054】引続き、LED3bを点灯させながら、ゲ
イン決定処理と測距処理とを行う。最後に、LED3c
のゲイン決定処理−距離測定処理を行う。これにより、
LED3b,LED3cに対して、「AFRESULT
b」,「AFRESULTc」の値がそれぞれ求められ
る。なお、平均値や距離データの算出では、割り算が行
われるが、この結果に対しては、切り捨て,切り上げ,
四捨五入等によって整数化される。
Subsequently, the gain determining process and the distance measuring process are performed while the LED 3b is turned on. Finally, LED3c
Gain determination process-distance measurement process. This allows
For the LEDs 3b and 3c, "AFRESULT
The values of "b" and "AFRESULTc" are obtained respectively. Note that division is performed in calculating the average value and distance data, but the results are rounded down, rounded up,
It is converted into an integer by rounding off.

【0055】図13に示すように、LED3aは撮影シ
ーン(撮影画面)40の中央部に設定した測距点SP1
に測距光を投光し、LED3b,3cは撮影シーン40
の周辺部に設定した測距点SP2,SP3に測距光を投
光する。この撮影シーン40では、測距点SP1が主要
被写体S1上に位置し、測距点SP2が主要被写体S2
上に位置する。したがって、「AFRESULTa」が
主要被写体S1までの距離、「AFRESULTb」が
背景被写体S2までの距離に対応した値を示し、さらに
「AFRESULTc」は測距光が反射されてきていな
いことから「0」(図9図参照)となっている。
As shown in FIG. 13, the LED 3a is used for the focus detection point SP1 set at the center of the shooting scene (shooting screen) 40.
The distance measuring light is projected onto the LED 3b, 3c, and the LEDs 3b and 3c
Distance measuring light is projected to the distance measuring points SP2 and SP3 set in the peripheral portion of. In this shooting scene 40, the focus detection point SP1 is located on the main subject S1, and the focus detection point SP2 is the main subject S2.
Located on top. Therefore, “AFRESULTa” indicates a value corresponding to the distance to the main subject S1, “AFRESULTb” indicates a value corresponding to the distance to the background subject S2, and “AFRESULTc” indicates “0” (because the distance measuring light is not reflected). (See FIG. 9).

【0056】マイクロコンピュータ14は、ROM21
に格納してあるプログラムに従い、「AFRESULT
a」が至近距離から5mまでの被写体距離に対応した値
であるかを確認し、これに該当する場合には「AFRE
SULTa」を最適距離データとして決定し、また該当
しない場合には「AFRESULTa」,「AFRES
ULTb」,「AFRESULTc」の中で最も近い被
写体距離に対応したものを最適距離データとして決定
し、測距シーケンスが完了する。
The microcomputer 14 has a ROM 21.
According to the program stored in "AFRESULT
Confirm that "a" is a value corresponding to the subject distance from the closest distance to 5 m, and if it corresponds to this, "AFRE
"SULTa" is determined as the optimum distance data, and if not applicable, "AFRESULTa", "AFRES"
The one corresponding to the shortest object distance among “ULTb” and “AFRESULTc” is determined as the optimum distance data, and the distance measuring sequence is completed.

【0057】こうして最適距離データが決定された後
は、レンズ位置制御回路15を介してステッピングモー
タ15aが駆動され、撮影レンズ5は最適距離データに
対応したレンズ位置にセットされる。なお、「AFRE
SULTa」,「AFRESULTb」,「AFRES
ULTc」の中から最適距離データを決定するためのア
ルゴリズムとしては、他に種々のものを選ぶことが可能
である。
After the optimum distance data is determined in this way, the stepping motor 15a is driven through the lens position control circuit 15, and the taking lens 5 is set at the lens position corresponding to the optimum distance data. In addition, "AFRE
SULTa ”,“ AFRESULTb ”,“ AFRES
Various other algorithms can be selected as the algorithm for determining the optimum distance data from the "ULTc".

【0058】以上の実施例では、ゲイン決定処理中に、
ゲインコントロールアンプ29a,29bの出力がほぼ
飽和している場合には、ゲインを「1」だけ下げて測定
をやりなおしている。室内撮影では、被写体が蛍光灯で
照明されていることが多いが、このようなシーンでは、
ゲインが適正であっても、蛍光灯のノイズ光によって、
ゲインコントロールアンプ29a,29bの出力が一時
的に飽和してしまうことがある。そこで、ゲイン決定処
理中に、ゲインコントロールアンプ29a,29bの出
力がほぼ飽和している場合には、「GAIN」を同じ値
のままで測定をやり直すとともに、このやり直しの際し
ては一定時間例えば1〜5msecだけ、測定データA
FD1,AFD2の取り込みを遅延させるのがよい。図
14〜図17は、この実施例を示すものである。なお、
この実施例では、測定データに8ビット(十進数で
「0」〜「255」)が割り当てられている。
In the above embodiment, during the gain determination process,
When the outputs of the gain control amplifiers 29a and 29b are almost saturated, the gain is decreased by "1" and the measurement is performed again. In indoor photography, the subject is often illuminated by a fluorescent lamp, but in such a scene,
Even if the gain is appropriate, due to the noise light of the fluorescent lamp,
The outputs of the gain control amplifiers 29a and 29b may be saturated temporarily. Therefore, when the outputs of the gain control amplifiers 29a and 29b are almost saturated during the gain determination process, the measurement is performed again with the same value of "GAIN", and at the time of the re-execution, for example, for a certain period of time. Measurement data A for only 1 to 5 msec
It is preferable to delay the uptake of FD1 and AFD2. 14 to 17 show this embodiment. In addition,
In this embodiment, 8 bits (decimal numbers "0" to "255") are assigned to the measurement data.

【0059】図14に示すように、ゲイン決定処理が開
始されるときには、「GSNGフラグ」がリセットさ
れ、「GCOUNT」が初期値「0」にセットされる。
また、図9に示す実施例と同様に、ゲインコントロール
アンプ29a,29bのゲインが初期値「8」にセット
され、また「LED=1」,「SET=1」の各コマン
ドの設定が行われ、LED3aのみが点灯可能状態とな
る。
As shown in FIG. 14, when the gain determination process is started, the "GSNG flag" is reset and "GCOUNT" is set to the initial value "0".
Further, similarly to the embodiment shown in FIG. 9, the gains of the gain control amplifiers 29a and 29b are set to the initial value "8", and the commands "LED = 1" and "SET = 1" are set. , Only the LED 3a can be turned on.

【0060】上記コマンド設定の後、前述したように、
期間ΔT0後にLED3aを「ΔT2+ΔT3」の期間
点灯しながら測定し、測定データAFD1,AFD2を
読み込む。これらのいずれかが、飽和値例えば16進数
で「F0」(十進数では「240」)に達しているか否
かが判断される。もし、いずれか1つが飽和値「F0」
以上である場合に、このときのゲインの値が初期値
「8」であることが確認されると、「AFRESULT
a←127」の処理を行う。
After setting the above command, as described above,
After the period ΔT0, the LED 3a is measured for a period of “ΔT2 + ΔT3” while being lit, and measurement data AFD1 and AFD2 are read. It is determined whether or not any of these has reached a saturation value, for example, "F0" in hexadecimal ("240" in decimal). If either one is the saturation value "F0"
In the above case, when it is confirmed that the gain value at this time is the initial value “8”, “AFRESULT
a ← 127 ”is performed.

【0061】また、ゲインの値が「9」以上のときに、
測定データAFD1,AFD2が飽和値になると、以前
に飽和状態になったことがないことを確認してから、G
SNGフラグをセットした後、2msecの時間遅延の
後に同じゲインの値のままで再度測定データAFD1,
AFD2の読み込みが実行される。そして、この測定デ
ータも飽和値に達している場合には、その時点のゲイン
の値から「1」を減算してゲインの値を決定し、ゲイン
決定処理を中止してそのまま測距処理に移行する。これ
により、ゲインコントロールアンプ29a,29bの飽
和状態の繰り返しに伴ってゲイン決定処理に時間がかか
るのを防ぐことができる。なお、ゲインの値が「9」以
上のときに、測定データADF1,AFD2の一方が飽
和値となるのは、ゲイン決定処理の最初ではなく、繰り
返しルーチンの中で発生する。
When the gain value is "9" or more,
When the measured data AFD1 and AFD2 reach the saturation value, confirm that the saturation state has never been reached before
After setting the SNG flag, the measurement data AFD1, again with the same gain value after a time delay of 2 msec.
The reading of AFD2 is executed. If the measured data also reaches the saturation value, "1" is subtracted from the gain value at that time to determine the gain value, the gain determination process is stopped, and the distance measurement process is directly performed. To do. As a result, it is possible to prevent the gain determination process from taking a long time due to the repetition of the saturated state of the gain control amplifiers 29a and 29b. It should be noted that when the gain value is "9" or more, one of the measurement data ADF1 and AFD2 becomes a saturation value not in the beginning of the gain determination process but in the repetitive routine.

【0062】同じゲインのままで再度測定データAFD
1,AFD2を取り込む際には、上述のように2mse
cの時間遅延が実行される。その理由は、ゲインコント
ロールアンプ29a,29bに重畳される蛍光灯ノイズ
が図17に示したような波形を示し、測定データAFD
1,AFD2の読み込みタイミングと蛍光灯の点灯とが
t1の時点で一致したとすると、蛍光灯によるノイズ成
分はΔx(1.5〜2msec程度)で示した期間だけ
残存するからである。したがって、少なくとも1mse
cの遅延により、ノイズ成分がマイナス側で極大になる
タイミングt2からずらして次の測定データAFD1,
AFD2を取り込むことによって、ノイズの影響が少な
い測定データAFD1,AFD2を得ることができる。
この2msecは、ΔT0タイマーで確保してもよい。
なお、完全にノイズ成分の影響を取り除くために、5m
sec程度の遅延時間が望ましいので、実用上は1〜5
msecの範囲内で適宜設定される。
Measured data AFD again with the same gain
1, when importing AFD2, 2mse as described above
A time delay of c is performed. The reason is that the fluorescent lamp noise superimposed on the gain control amplifiers 29a and 29b has a waveform as shown in FIG.
This is because if the reading timing of 1, AFD2 and the lighting of the fluorescent lamp match at time t1, the noise component due to the fluorescent lamp remains for a period indicated by Δx (about 1.5 to 2 msec). Therefore, at least 1 mse
Due to the delay of c, the next measurement data AFD1, which is shifted from the timing t2 when the noise component becomes maximum on the minus side
By taking in AFD2, it is possible to obtain measurement data AFD1 and AFD2 that are less affected by noise.
This 2 msec may be secured by the ΔT0 timer.
In addition, in order to completely remove the influence of the noise component, 5m
A delay time of about sec is desirable, so 1 to 5 is practically used.
It is set appropriately within the range of msec.

【0063】ゲインが初期値「8」の状態で測定データ
AFD1,AFD2が飽和値に達していない場合には、
これらの測定データに基づき、前述したように加算測定
データAFADD,減算測定データAFDIFの算出処
理が行われる。この加算測定データAFADDについ
て、その値が十進数の「136」以上であるか否かが判
断される。この値が「136」以上であるときには、加
算測定データAFADD1,AFADD2の値が以後の
測距演算の実行に適切なレベルにあると判定される。そ
して、ゲインコントロールアンプ29a,29bのゲイ
ンはそのときの「GAIN」の値(初期値「8」)とし
て決定され、引続きLED3aによる測距処理が実行さ
れることになる。
When the measurement data AFD1 and AFD2 have not reached the saturation value with the gain being the initial value "8",
Based on these measurement data, the calculation process of the addition measurement data AFADD and the subtraction measurement data AFDIF is performed as described above. With respect to this addition measurement data AFADD, it is determined whether the value is a decimal number “136” or more. When this value is equal to or greater than "136", it is determined that the values of the addition measurement data AFADD1 and AFADD2 are at appropriate levels for executing the distance measurement calculation thereafter. Then, the gains of the gain control amplifiers 29a and 29b are determined as the value of "GAIN" at that time (initial value "8"), and the distance measuring process by the LED 3a is subsequently executed.

【0064】一方、加算測定データAFADDの値が
「136」未満である場合には、前述したように、「G
AIN」の値に「N」を加算し、またゲイン決定処理の
度数を表す「GCOUNT」を「1」アップして同様の
処理を繰り返す。この繰り返し処理時に「GAIN>
8」で飽和値に達することがあるが、「GSNGフラ
グ」がセット状態にあると「GAIN←GAIN−1」
によってゲインを決定してから、測距処理が実行され
る。
On the other hand, when the value of the addition measurement data AFADD is less than "136", as described above, "G"
"N" is added to the value of "AIN", "GCOUNT" representing the frequency of the gain determination processing is increased by "1", and the same processing is repeated. "GAIN>"
The saturation value may be reached at "8", but when the "GSNG flag" is in the set state, "GAIN ← GAIN-1"
After the gain is determined by, the distance measuring process is executed.

【0065】上記によれば、ゲインコントロールアンプ
29a,29bが初期ゲイン「8」の状態で、測定デー
タAFD1,AFD2が飽和値になると、即座に距離デ
ータが至近距離に対応した値に決定され、また飽和値に
達していない場合でも、加算測定データAFADDが適
切なレベルであるときには、ゲインコントロールアンプ
29a,29bのゲインを初期ゲイン「8」にして測距
処理が実行される。このように、「GCOUNT」の値
が「1」までの間、すなわちゲインコントロール29
a,29bのゲインが小さい状態のときにはノイズの影
響も少ないから、早めにゲインを決定して測距処理を行
うのが有利である。
According to the above, when the measurement data AFD1 and AFD2 reach saturation values when the gain control amplifiers 29a and 29b have the initial gain of "8", the distance data is immediately determined to a value corresponding to the shortest distance, Even when the saturation value is not reached, when the addition measurement data AFADD is at an appropriate level, the gains of the gain control amplifiers 29a and 29b are set to the initial gain "8" and the distance measuring process is executed. Thus, while the value of “GCOUNT” is up to “1”, that is, the gain control 29
Since the influence of noise is small when the gains of a and 29b are small, it is advantageous to determine the gain early and perform the distance measurement processing.

【0066】一方、ゲイン決定の繰り返しルーチンを行
う間に「GCOUNT≧2」になり、ゲインの値がその
都度高く設定されてゆく場合には、図15に示したよう
に、「GCOUNT=6」に達するまで測定データAF
D1,AFD2を取り込み、これらを「SUM1」,
「SUM2」として順次に積算する。そして、「GCO
UNT=6」に達すると、積算された「SUM1」,
「SUM2」から各々のチャンネルの測定データAFD
1,AFD2の最大値を減算してから平均値が算出さ
れ、それぞれ「AFD1」,「AFD2」として置き換
えられる。
On the other hand, when “GCOUNT ≧ 2” is set during the repetition routine of the gain determination and the gain value is set higher each time, “GCOUNT = 6” as shown in FIG. Data AF until reaching
D1, AFD2 are taken in, these are "SUM1",
"SUM2" is added up sequentially. And, "GCO
When “UNT = 6” is reached, the accumulated “SUM1”,
Measurement data AFD of each channel from "SUM2"
1, the average value is calculated after subtracting the maximum value of AFD2, and replaced with "AFD1" and "AFD2", respectively.

【0067】こうして得られた測定データAFD1,A
FD2については、図10に示すように、オフセット補
正処理の後、加算測定データAFADD,減算測定デー
タAFDIFが算出される。そして、「AFADD≧1
36」が満足される場合に、「GCOUNT=2」のと
きのゲインを最適ゲインと決定し、そのまま測距処理に
移行する。なお、「AFADD≧136」が満足され
ず、しかもゲインコントロールアンプ29a,29bの
ゲインが最大値「31」を越えたときには、PSD9に
反射光が殆ど入射しないような遠距離に被写体が位置し
ている場合であるから、撮影レンズ5を無限遠にセット
するための距離データ「AFRESULT=0」を得、
この時点でLED3aによる測距が終了する。他方、ゲ
インが最大値「31」を越えない場合には、ゲイン設定
のための測定をやり直すために、「GSNGフラグ」を
リセットし、「GCOUNT=0」にする。
The measurement data AFD1, A thus obtained
For the FD2, as shown in FIG. 10, after the offset correction processing, the addition measurement data AFADD and the subtraction measurement data AFDIF are calculated. Then, “AFADD ≧ 1
When “36” is satisfied, the gain when “GCOUNT = 2” is determined as the optimum gain, and the distance measurement processing is directly performed. If "AFADD ≧ 136" is not satisfied and the gains of the gain control amplifiers 29a and 29b exceed the maximum value "31", the subject is located at such a long distance that almost no reflected light is incident on the PSD 9. Therefore, the distance data “AFRESULT = 0” for setting the taking lens 5 at infinity is obtained,
At this point, the distance measurement by the LED 3a ends. On the other hand, when the gain does not exceed the maximum value “31”, the “GSNG flag” is reset to “GCOUNT = 0” in order to perform the measurement for gain setting again.

【0068】このように、ゲインコントロールアンプ2
9a,29bのゲインが高く設定されるときには、測定
データAFD1,AFD2を複数個取り込み、これらの
平均値を考慮してゲインを決めることによって、ノイズ
の影響をほとんど受けずにゲイン設定を行うことができ
る。また、測定データAFD1,AFD2の積算値SU
M1,SUM2から平均値を算出する際には、AFD
1,AFD2の中の最大値を減算してある。したがっ
て、商用周波数の2倍の周波数で断続した発光を行う蛍
光灯の照明下で測定データAFD1,AFD2の取り込
みが行われ、図17に示したような周期的なノイズ成分
が測定データAFD1,AFD2に重畳されたとして
も、t=t1の時点で取り込まれた測定データAFD
1,AFD2については、これを平均値算出時に除くこ
とができ、適切なゲイン設定を行う上で非常に有効であ
る。もちろん、t=t2のようなアンダーシュートの時
点で取り込まれる測定データAFD1,AFD2も考慮
し、平均値を算出する前に測定データの最小値も積算値
SUM1,SUM2から減算しておくようにしてもよ
い。
In this way, the gain control amplifier 2
When the gains of 9a and 29b are set to be high, a plurality of measurement data AFD1 and AFD2 are taken in and the gain is determined in consideration of the average value of these, so that the gain can be set with little influence of noise. it can. In addition, the integrated value SU of the measurement data AFD1, AFD2
When calculating the average value from M1 and SUM2, AFD
1, the maximum value of AFD2 is subtracted. Therefore, the measurement data AFD1 and AFD2 are captured under the illumination of a fluorescent lamp that intermittently emits light at a frequency twice the commercial frequency, and the periodic noise components as shown in FIG. 17 cause the measurement data AFD1 and AFD2. Measurement data AFD captured at time t = t1
For 1 and AFD2, this can be eliminated when calculating the average value, which is very effective in setting an appropriate gain. Of course, the measurement data AFD1 and AFD2 taken at the time of undershoot such as t = t2 are also taken into consideration, and the minimum value of the measurement data is also subtracted from the integrated values SUM1 and SUM2 before calculating the average value. Good.

【0069】以上の処理によって「GAIN」の値が決
定されると、前記実施例と同様に、LED3aによる測
距処理が実行される。この測距処理では、図16に示す
ように、「OVCOUNT」が「3」未満であり、かつ
測定データが適正範囲を外れている場合には、確認のた
めにゲインの値をそのままに維持し、2msecの遅延
時間の後、再度測定データAFD1,AFD2が読み込
まれる。これにより、測距シーケンス中の測定データA
FD1,AFD2の読み込みタイミングが蛍光灯の点灯
タイミングと合致し、測定データが飽和値に達しても、
次の読み込みで正しい測定データを得ることができる。
このようにして18個の測定データAFD1,AFD2
を取り込み、図10に示す手順でAFADD,AFDI
Fが算出され、そして図12に示す手順で距離データ
「AFRESULT」が算出される。
When the value of "GAIN" is determined by the above processing, the distance measuring processing by the LED 3a is executed as in the above embodiment. In this distance measuring process, as shown in FIG. 16, when “OVCOUNT” is less than “3” and the measured data is out of the proper range, the gain value is maintained as it is for confirmation. After a delay time of 2 msec, the measurement data AFD1 and AFD2 are read again. As a result, the measurement data A in the ranging sequence
Even if the reading timing of FD1 and AFD2 matches the lighting timing of the fluorescent lamp and the measurement data reaches the saturation value,
The next reading will give the correct measurement data.
In this way, 18 pieces of measurement data AFD1, AFD2
Are captured, and AFADD and AFDI are processed by the procedure shown in FIG.
F is calculated, and the distance data "AFRESULT" is calculated by the procedure shown in FIG.

【0070】前記各実施例は、3個のLED3a〜3c
を用い、撮影シーン内の3個所を順次に測距するマルチ
ビームタイプであるが、測距点が1個のシングルビーム
タイプにも適用することができる。例えば、1個のLE
Dを用いて、スポット又は細長なスリット光を撮影シー
ンに投光してもよい。更には、この1個のLEDを1回
だけ発光させて測距を行ってもよい。
In each of the above embodiments, the three LEDs 3a to 3c are used.
Is a multi-beam type in which distances are sequentially measured at three points in a shooting scene, but the present invention can also be applied to a single-beam type having one distance measuring point. For example, one LE
D may be used to project a spot or an elongated slit light onto the shooting scene. Further, the distance may be measured by emitting light from this one LED only once.

【0071】また、カメラ姿勢に応じて投光部の姿勢を
変換し、地面に対して常に平行な方向に沿った複数の測
距点に対して投光してもよい。受光素子としてはCCD
イメージセンサー等を使用することができ、また光源と
しては閃光放電管,ランプ等を使用することができる。
更に、マイクロコンピュータ以外のロジック回路により
各種の制御を行わせることも可能である。
Further, the posture of the light projecting portion may be changed according to the posture of the camera, and the light may be projected onto a plurality of distance measuring points along the direction always parallel to the ground. CCD as the light receiving element
An image sensor or the like can be used, and a flash discharge tube, a lamp or the like can be used as a light source.
Furthermore, various controls can be performed by a logic circuit other than the microcomputer.

【0072】更に、オフセット値検出処理を省略した
り、測距処理手順を部分的に変更することも可能であ
る。また、LEDの点滅による電源消耗が無視できる程
度であれば、ゲイン設定後にLEDの点灯を時間ΔT0
だけ遅らせる代わりに、遅延期間内での不要な測定デー
タを捨ててもよい。
Furthermore, it is possible to omit the offset value detection processing or partially change the distance measurement processing procedure. If the power consumption due to the blinking of the LED is negligible, the LED is turned on for a time ΔT0 after the gain is set.
Instead of just delaying, unnecessary measurement data within the delay period may be discarded.

【0073】また、上記実施例ではゲインが高い値に設
定される場合にのみ最大値を減算してから測定データの
平均値を算出しているが、ゲイン決定の最初の段階、す
なわち初期ゲインで測定データを読み込むときにも複数
個の測定データを得、これらの中の最大値及び最小値、
あるいはその一方を除去してから、測定データの平均値
を算出してもよい。
In the above embodiment, the maximum value is subtracted and the average value of the measured data is calculated only when the gain is set to a high value. However, at the initial stage of gain determination, that is, at the initial gain. Even when reading measurement data, multiple measurement data are obtained, and the maximum and minimum values among these are
Alternatively, one of them may be removed and then the average value of the measurement data may be calculated.

【0074】[0074]

【発明の効果】上述したように、請求項1に記載した発
明によれば、ゲインコントロールアンプのゲイン変更が
あった場合には、そのゲインが安定する時間だけ遅らせ
てから、測定データを取り込むようにしているから、不
安定なゲインのもとで出力されてくる不適正な測定デー
タを取り込むことがなく、したがって測距精度を向上さ
せることができる。また、投光部の作動を遅らせること
で測定を遅延させれば、投光部を無駄に作動させずに済
み、電源の浪費を防ぐことができるという利点がある。
As described above, according to the first aspect of the invention, when the gain of the gain control amplifier is changed, the measured data is fetched after delaying the gain for a stable period. Therefore, incorrect measurement data output under an unstable gain is not taken in, and therefore the ranging accuracy can be improved. Further, if the measurement is delayed by delaying the operation of the light projecting unit, there is an advantage that the light projecting unit can be prevented from being uselessly operated and the waste of the power source can be prevented.

【0075】また、請求項3に記載した発明では、複数
回の投光で得た複数個の測定データにより測距演算を行
う際に、不適正な値を持った測定データの個数が一定回
数未満であるときにはそのまま測距を継続し、一定回数
に達した際にはゲインコントロールアンプのゲインを変
更して再測距を行うようにするとともに、前記一定回数
を測距光の投光間隔,その投光回数並びに蛍光灯の点灯
周期を考慮して設定したから、被写体に対する照明条件
の変化に対応してゲインを変更することが可能となり、
しかも蛍光灯の照明下でも測距不能になることはない。
According to the third aspect of the invention, the number of measurement data having an improper value is constant when the distance measurement operation is performed using a plurality of measurement data obtained by a plurality of light projections. When the distance is less than, the distance measurement is continued as it is, and when the fixed number of times is reached, the gain of the gain control amplifier is changed to perform the distance measurement again. Since the setting is made in consideration of the number of times the light is projected and the lighting cycle of the fluorescent lamp, it becomes possible to change the gain in response to changes in the illumination conditions for the subject.
Moreover, distance measurement does not become impossible even under the illumination of a fluorescent lamp.

【0076】更に、請求項4に記載した発明では、ゲイ
ンコントロールアンプのゲイン決定時や測距シーケンス
中のゲイン変更時に、ゲインコントロールアンプからの
出力信号が飽和状態となっている場合には、ゲインコン
トロールアンプに重畳されるノイズ成分の影響が軽減さ
れる1〜5msecの時間遅延の後、同じゲインの値の
もとで再度測定し、前記飽和状態が瞬間的なノイズに起
因するか否かを判別する。もし、この測定においても、
飽和状態が生じている場合には、ノイズの影響によるも
のではなく、定常的に出力信号が高いレベルにあると判
断して、ゲインコントロールアンプからの出力信号に基
づいて測距演算を行う通常の測距シーケンスとは別に、
その時点で即座に至近距離あるいは無限遠の距離データ
に定めるから、ゲインの決定や変更のために徒に測距時
間を長くせずに済み、効率的な測距処理を行う上で非常
に有効である。
Further, in the invention described in claim 4, when the output signal from the gain control amplifier is in a saturated state at the time of determining the gain of the gain control amplifier or changing the gain during the distance measurement sequence, After a time delay of 1 to 5 msec in which the influence of the noise component superimposed on the control amplifier is reduced, measurement is performed again under the same gain value to determine whether the saturation state is caused by instantaneous noise. Determine. Even in this measurement,
When saturation occurs, it is determined that the output signal is constantly at a high level, not due to the influence of noise, and normal distance measurement is performed based on the output signal from the gain control amplifier. Apart from the ranging sequence,
At that time, it is immediately set to the distance data at infinity or infinity, so there is no need to lengthen the distance measurement time for determining or changing the gain, which is very effective for efficient distance measurement processing. Is.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の方法を実施する測距装置の概略を示す
説明図である。
FIG. 1 is an explanatory diagram showing an outline of a distance measuring device for carrying out the method of the present invention.

【図2】オートフォーカスICの構成を示すブロック図
である。
FIG. 2 is a block diagram showing a configuration of an autofocus IC.

【図3】ロジック回路に用いられるシフトレジスタの概
念図である。
FIG. 3 is a conceptual diagram of a shift register used in a logic circuit.

【図4】測距シーケンスの概略を示すフローチャートで
ある。
FIG. 4 is a flowchart showing an outline of a distance measuring sequence.

【図5】撮影シーケンスを示すフローチャートである。FIG. 5 is a flowchart showing a shooting sequence.

【図6】オフセット値検出処理を示すフローチャートで
ある。
FIG. 6 is a flowchart showing offset value detection processing.

【図7】測定データの読込みタイミングを説明するタイ
ムチャートである。
FIG. 7 is a time chart illustrating the timing of reading measurement data.

【図8】測定データの読込み手順を示すフローチャート
である。
FIG. 8 is a flowchart showing a procedure for reading measurement data.

【図9】ゲイン決定処理を示すフローチャートである。FIG. 9 is a flowchart showing a gain determination process.

【図10】加算測定データ及び減算測定データの算出処
理手順を示すフローチャートである。
FIG. 10 is a flowchart showing a calculation processing procedure of addition measurement data and subtraction measurement data.

【図11】測距処理の前半を示すフローチャートであ
る。
FIG. 11 is a flowchart showing the first half of distance measurement processing.

【図12】測距処理の後半を示すフローチャートであ
る。
FIG. 12 is a flowchart showing the latter half of the distance measuring process.

【図13】測距シーンの一例を示す説明図である。FIG. 13 is an explanatory diagram showing an example of a distance measurement scene.

【図14】ゲイン決定処理の別の実施例の前半を示すフ
ローチャートである。
FIG. 14 is a flowchart showing the first half of another example of the gain determination process.

【図15】ゲイン決定処理の後半を示すフローチャート
である。
FIG. 15 is a flowchart showing the latter half of gain determination processing.

【図16】測距処理の別の実施例を示すフローチャート
である。
FIG. 16 is a flowchart showing another embodiment of distance measuring processing.

【図17】蛍光灯の点滅に伴って測定データに重畳され
るノイズ成分を示す波形図である。
FIG. 17 is a waveform diagram showing a noise component superimposed on the measurement data as the fluorescent lamp blinks.

【図18】蛍光灯の点灯周期と測距光の投光間隔との相
関を示すタイミングチャートである。
FIG. 18 is a timing chart showing the correlation between the lighting period of a fluorescent lamp and the projection interval of distance measuring light.

【符号の説明】[Explanation of symbols]

2 投光部 3a〜3c LED 5 撮影レンズ 7 受光部 9 PSD 14 マイクロコンピュータ 28a,28b プリアンプ 29a,29b ゲインコントロールアンプ 30a,30b サンプルホールド回路 31a,31b バッファアンプ SP1〜SP3 測距点 40 撮影シーン 2 Light projecting parts 3a to 3c LED 5 Photographing lens 7 Light receiving part 9 PSD 14 Microcomputer 28a, 28b Preamplifier 29a, 29b Gain control amplifier 30a, 30b Sample hold circuit 31a, 31b Buffer amplifier SP1 to SP3 Distance measuring point 40 Shooting scene

Claims (1)

【特許請求の範囲】 【請求項1】 被写体に向けて測距光を投光する投光手
段と、被写体から反射されてきた測距光を受光する受光
手段と、この受光手段の出力信号を増幅するゲインコン
トロールアンプと、このゲインコントロールアンプの出
力信号から距離信号を算出する演算手段とを備えた測距
装置において、前記ゲインコントロールアンプの出力信
号のレベルを監視し、そのレベルが所定範囲外の場合に
はゲインコントロールアンプのゲインを調整し、このゲ
インの変更が行われたときには、測距シーケンスの開始
を一定時間以上遅延させるようにしたことを特徴とする
測距方法。 【請求項2】 被写体に向けて測距光を投光する投光手
段と、被写体から反射されてきた測距光を受光する受光
手段と、この受光手段の出力信号を増幅するゲインコン
トロールアンプと、このゲインコントロールアンプの出
力信号から距離信号を算出する演算手段とを備えた測距
装置において、前記ゲインコントロールアンプの出力信
号のレベルを監視し、そのレベルが所定範囲外の場合に
はゲインコントロールアンプのゲインを調整し、このゲ
インの変更が行われたときには、前記投光手段の作動を
許容するための信号の発生を一定時間以上遅延させるよ
うにしたことを特徴とする測距方法。 【請求項3】 被写体に向けて測距光を投光する投光手
段と、被写体から反射されてきた測距光を受光する受光
手段と、この受光手段の出力信号を増幅するゲインコン
トロールアンプと、このゲインコントロールアンプの出
力信号から距離信号を算出する演算手段とを備えた測距
装置において、測距時に投光手段を投光間隔AT秒でP
N回発光させ、この測距中にゲインコントロールアンプ
の出力信号を監視し、この出力信号が所定レベル範囲外
となる回数がCM回に達したときには、ゲインコントロ
ールアンプのゲインを調節してから測距をやり直すとと
もに、前記CMの値を次式から定めたことを特徴とする
測距方法。 CM≧AT×PN×120 【請求項4】 被写体に向けて測距光を投光する投光手
段と、被写体から反射されてきた測距光を受光する受光
手段と、この受光手段の出力信号を増幅するゲインコン
トロールアンプと、このゲインコントロールアンプの出
力信号から距離信号を算出する演算手段とを備えた測距
装置において、前記ゲインコントロールアンプの出力信
号が所定レベルを越えたときには、1msec〜5ms
ecの時間経過後に、再び同じゲインの値で出力信号を
取り込み、この際に再びゲインコントロールアンプの出
力信号が所定レベルを越えた場合には、ゲインコントロ
ールアンプの出力信号に基づく距離信号の算出を中止す
ることを特徴とする測距方法。
Claim: What is claimed is: 1. A light projecting means for projecting distance measuring light to a subject, a light receiving means for receiving distance measuring light reflected from the subject, and an output signal of the light receiving means. In a range finder having a gain control amplifier for amplification and a calculation means for calculating a distance signal from the output signal of the gain control amplifier, the level of the output signal of the gain control amplifier is monitored and the level is out of a predetermined range. In this case, the gain of the gain control amplifier is adjusted, and when the gain is changed, the start of the distance measurement sequence is delayed by a predetermined time or more. 2. A light projecting means for projecting distance measuring light toward a subject, a light receiving means for receiving distance measuring light reflected from the subject, and a gain control amplifier for amplifying an output signal of the light receiving means. In a range finder having a calculation means for calculating a distance signal from the output signal of the gain control amplifier, the level of the output signal of the gain control amplifier is monitored, and if the level is out of a predetermined range, gain control is performed. A distance measuring method characterized by adjusting the gain of an amplifier and delaying the generation of a signal for allowing the operation of the light projecting means when the gain is changed. 3. A light projecting means for projecting distance measuring light toward a subject, a light receiving means for receiving distance measuring light reflected from the subject, and a gain control amplifier for amplifying an output signal of the light receiving means. In a distance measuring device having a calculating means for calculating a distance signal from the output signal of the gain control amplifier, the light emitting means is set to P at the light emitting interval AT seconds during distance measurement.
The light is emitted N times, the output signal of the gain control amplifier is monitored during the distance measurement, and when the number of times that this output signal is out of the predetermined level range reaches CM times, the gain of the gain control amplifier is adjusted and then measured. A distance measuring method characterized in that the distance is redone and the value of the CM is determined from the following equation. CM ≧ AT × PN × 120 5. A light projecting unit for projecting distance measuring light toward a subject, a light receiving unit for receiving the distance measuring light reflected from the subject, and an output signal of the light receiving unit. In a range finder having a gain control amplifier for amplifying the signal and a calculation means for calculating a distance signal from the output signal of the gain control amplifier, when the output signal of the gain control amplifier exceeds a predetermined level, 1 msec to 5 ms.
After elapse of time ec, the output signal is captured again with the same gain value. At this time, if the output signal of the gain control amplifier exceeds the predetermined level again, the distance signal is calculated based on the output signal of the gain control amplifier. Distance measurement method characterized by stopping.
JP29362291A 1990-10-20 1991-10-14 Distance measurement method Expired - Fee Related JP2641820B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29362291A JP2641820B2 (en) 1990-10-20 1991-10-14 Distance measurement method

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP28292090 1990-10-20
JP2-282920 1990-10-20
JP30797690 1990-11-14
JP2-307976 1990-11-14
JP2-410843 1990-12-14
JP41084390 1990-12-14
JP29362291A JP2641820B2 (en) 1990-10-20 1991-10-14 Distance measurement method

Publications (2)

Publication Number Publication Date
JPH055621A true JPH055621A (en) 1993-01-14
JP2641820B2 JP2641820B2 (en) 1997-08-20

Family

ID=27479290

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29362291A Expired - Fee Related JP2641820B2 (en) 1990-10-20 1991-10-14 Distance measurement method

Country Status (1)

Country Link
JP (1) JP2641820B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5722108A (en) * 1995-09-11 1998-03-03 Hitachi Construction Machinery Co., Ltd. Windshield wiper control device for construction machines
JP2008232800A (en) * 2007-03-20 2008-10-02 Ihi Corp Laser monitor
JP2008241535A (en) * 2007-03-28 2008-10-09 Ihi Corp Laser monitoring device
JP2013190378A (en) * 2012-03-15 2013-09-26 Omron Corp Optical sensor and setting method for sensitivity adjustment control
US9068754B2 (en) 2009-07-30 2015-06-30 Sharp Kabushiki Kaisha Cooking device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5722108A (en) * 1995-09-11 1998-03-03 Hitachi Construction Machinery Co., Ltd. Windshield wiper control device for construction machines
JP2008232800A (en) * 2007-03-20 2008-10-02 Ihi Corp Laser monitor
JP2008241535A (en) * 2007-03-28 2008-10-09 Ihi Corp Laser monitoring device
US9068754B2 (en) 2009-07-30 2015-06-30 Sharp Kabushiki Kaisha Cooking device
JP2013190378A (en) * 2012-03-15 2013-09-26 Omron Corp Optical sensor and setting method for sensitivity adjustment control

Also Published As

Publication number Publication date
JP2641820B2 (en) 1997-08-20

Similar Documents

Publication Publication Date Title
US5148211A (en) Stabilized range finder for use with an electronically controlled camera
JP2001177763A (en) Digital camera and its control method
JP2003114369A (en) Image pickup device
JP2641820B2 (en) Distance measurement method
JP3695380B2 (en) camera
US5386263A (en) Method and apparatus for rangefinding
JP4479036B2 (en) Strobe device
JPH0368928A (en) Automatic dimming controller for camera
JPH0690397A (en) Video camera and its focusing method
JP3090150B2 (en) Active distance measurement method
JP2003114374A (en) Image pickup device
JPH0667257A (en) Ttl automatic dimming controller
JP3075362B2 (en) Active distance measurement method
JP2934346B2 (en) Autofocus camera and adjustment method thereof
JP2528844B2 (en) Automatic focusing device
JPH04216406A (en) Active distance measuring method
JPH03126383A (en) Electronic still camera
JP2006243189A (en) Camera
JP2753132B2 (en) Distance measuring device
JP2647724B2 (en) Distance measuring device
JPH0675131B2 (en) Zone focus camera distance measuring device
JPH03135716A (en) Range finder
JPH04204811A (en) Active type distance measuring method
JP2609334B2 (en) Distance measuring device
JPH03276010A (en) Range finder

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees