Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3377283B2 - Camera ranging device - Google Patents
[go: Go Back, main page]

JP3377283B2 - Camera ranging device - Google Patents

Camera ranging device

Info

Publication number
JP3377283B2
JP3377283B2 JP4881294A JP4881294A JP3377283B2 JP 3377283 B2 JP3377283 B2 JP 3377283B2 JP 4881294 A JP4881294 A JP 4881294A JP 4881294 A JP4881294 A JP 4881294A JP 3377283 B2 JP3377283 B2 JP 3377283B2
Authority
JP
Japan
Prior art keywords
data
distance measurement
gain
value
digital data
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.)
Expired - Fee Related
Application number
JP4881294A
Other languages
Japanese (ja)
Other versions
JPH07260476A (en
Inventor
伸介 伊藤
高秋 小谷
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 JP4881294A priority Critical patent/JP3377283B2/en
Publication of JPH07260476A publication Critical patent/JPH07260476A/en
Application granted granted Critical
Publication of JP3377283B2 publication Critical patent/JP3377283B2/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)

Description

【発明の詳細な説明】 【0001】 【産業上の利用分野】本発明は、アクティブ方式のカメ
ラ用測距装置に関するものである。 【0002】 【従来の技術】カメラに用いられているアクティブ式測
距装置は、被写体に向かって測距光を投光する投光部
と、投光部から一定の基線長だけ隔てて配置された受光
部と、受光部からの信号を処理する信号処理部とからな
る。投光部には一般に近赤外光を発光する発光ダイオー
ド(IRED)が利用され、そこからの近赤外光が測距
光として被写体に向かって投光される。測距光のうち、
被写体で反射された光は受光レンズを通って受光部に入
射する。受光部には、例えばPSD(Position Sensiti
ve Devise )が利用されており、その一対の出力端子に
は光の入射位置に対応した光電信号が現れる。そして、
この光電信号に基づいて信号処理部で三角測距演算を行
うことによって被写体までの距離を算出することができ
るから、これに対応して撮影レンズのピント位置を決め
ることができる。 【0003】PSDの一対の出力端子に現れる光電信号
の出力レベルは、被写体までの距離が近いときと遠いと
きとで変化するが、これらの光電信号の比をとることに
よって、その出力レベルに依存しない形でPSDに対す
る光の入射位置を検出することができる。ところが、上
記光電信号の出力レベルが低いままで両信号の比を求め
たときと、出力レベルが高いままで比を求めたときとで
は、検出精度にバラツキが出やすい。 【0004】また、PSDからの光電信号はアナログ量
であるため、これらの信号をデジタル量に変換してから
比を求めるのが通常であるが、出力レベルが低い光電信
号をそれぞれAD変換して比を求めた場合と、出力レベ
ルが高い光電信号をそれぞれAD変換して比を求めた場
合とでは、やはり演算の精度に差が出る。こうした不都
合を解消するために、特開平4−199013号公報記
載の測距装置では、PSDの出力端子にそれぞれのチャ
ンネルごとにゲインコントロール回路を含むアンプ系を
接続し、両チャンネルからの光電信号をAD変換したと
きに、各々のデジタルデータの大きさが一定の範囲の値
になるようにゲインコントロール回路にフィードバック
をかけて、各々の光電信号を同じ増幅率で増幅すること
が行われている。 【0005】さらに前記公報記載の測距装置では、ゲイ
ンコントロール回路のゲインを適切な範囲に設定し得な
いとき、例えばゲインコントロール回路のゲインを最小
値にしても各チャンネルから得られるデジタルデータが
大き過ぎる場合には、被写体が至近距離にあると判断し
て撮影レンズのピント合わせを行う。また、ゲインが最
大であるのにもかかわらずデジタルデータが小さ過ぎる
場合には、被写体がかなり遠方にあると判断して撮影レ
ンズのピント合わせを行う。そして、ゲイン決定後に各
チャンネルから得られたデジタルデータが適切な範囲に
ある場合には、測距光を複数回投光して実測距を行い、
得られたデジタルデータを元に測距演算を行って撮影レ
ンズのピント位置を決定するようになっている。 【0006】 【発明が解決しようとする課題】上記のように、ゲイン
コントール回路のゲインが適切な範囲に決められないと
きには、状況に応じて撮影レンズを至近距離にピント合
わせしたり、また無限遠あいは過焦点距離にピント合わ
せすることによって、無駄な実測距を行うことなく迅速
にピント合わせを行うことができる。ところが、ゲイン
決定処理によって適切なゲインが決められた後では、複
数回(例えば128回)の実測距が繰り返し実行され、
その過程で得られたデジタルデータを元に測距演算を行
って撮影レンズのピント合わせ位置を決めるため、測距
に要する時間がかかりすぎるという欠点があった。ま
た、こうした弊害を軽減するために実測距の繰り返し回
数を単に減らすのでは、測距精度が低下するという別の
問題が生じてくる。 【0007】本発明は上記事情を考慮してなされたもの
で、ゲイン決定後に実測距を行うにあたり、測距処理に
徒に時間をかけることなく、しかも測距精度を低下させ
ることがないカメラ用測距装置を提供することを目的と
する。 【0008】 【課題を解決するための手段】本発明は上記目的を達成
するために、ゲインコントロール回路のゲイン決定処理
時に各チャンネルからデジタルデータが得られることに
着目し、これらのデジタルデータについても測距演算に
利用するようにしたものである。すなわち、ゲイン決定
後に実測距を行って被写体に測距光をN回投光してチャ
ンネルごとに逐次デジタルデータを読み込み、適正に読
み込まれた複数のデジタルデータを元に測距演算を行っ
て撮影レンズのピント位置を決めるにあたり、ゲインの
決定処理を行う間に、実測距に用いるゲインのもとで各
チャンネルごとにP個のデジタルデータが読み込まれた
ときには、実測距時における測距光の投光回数をN−P
回に制限し、ゲイン決定処理のときに得られたP個のデ
ジタルデータを実測距時に得たデジタルデータと合わせ
て測距演算を行うようにしたものである。 【0009】上記によれば、実測距時の測距光の投光回
数をN−P回に減らしながらも、実質的にはN回の実測
距を行ったときと同じ個数分だけデジタルデータを読み
込むことができるから、測距精度を何ら低下させること
がない。 【0010】 【実施例】本発明を用いたカメラの電気的構成を概略的
に示した図2において、投光部2は測距光として近赤外
光を発するIRED3と、投光レンズ4とから構成さ
れ、投光レンズ4の光軸4aは撮影レンズ5の光軸5a
とほぼ平行となっている。IRED3からの測距光は、
投光レンズ4によって細径のビーム状になって撮影画面
の中央部に指向している。 【0011】受光部7は受光レンズ8とPSD9とから
構成され、受光レンズ8の光軸8aも撮影レンズ光軸5
aとほぼ平行になっている。PSD9は、入射光の光量
及び入射位置に応じた信号を各々の出力端子9a,9b
から出力する。図2から明らかなように、被写体S1ま
での距離が近いほどその反射光はPSD9の端子9b側
に入射することになるが、出力端子9a,9bからそれ
ぞれ得られる光電信号の和と差との比をとることによっ
て、入射光の光量に依存せずに入射位置に対応した信号
を得ることができる。なお、PSD9は水平方向に関し
ては識別作用をもっておらず、垂直方向での入射高さが
同じであれば、水平方向での入射位置が異なっても出力
端子9a,9bからの光電信号の和と差との比は等しく
なる。 【0012】IRED3はオートフォーカスIC12か
らの信号により、ドライバ11を介して発光制御され
る。オートフォーカスIC12は、マイクロコンピュー
タ14からのコマンドにしたがって予め決められた測距
シーケンスを実行し、ドライバ11を作動させる他に、
PSD9の出力端子9a,9bからの光電信号を増幅,
サンプルホールド処理してマイクロコンピュータ14に
入力する。 【0013】マイクロコンピュータ14にはADコンバ
ータ15が内蔵されており、オートフォーカスIC12
からチャンネルごとに入力されてくる光電信号を、アナ
ログ量からデジタル量に変換する。マイクロコンピュー
タ14は、こうしてチャンネルごとに入力された信号に
基づいて測距演算を行い、被写体までの距離に対応した
距離信号を算出する。そして、この距離信号に対応して
レンズ移動回路16を介してモータ17を駆動し、撮影
レンズ5は被写体距離に対応したセット位置に移動して
ピント合わせが行われる。 【0014】マイクロコンピュータ14には汎用型のも
のが使用され、測光回路19で検出されてからADコン
バータ20でデジタル変換された測光データも入力され
る。マイクロコンピュータ14は測光データに基づいて
最適露光条件を算出し、露出制御回路21を介してステ
ッピングモータ22を駆動し、プログラムシャッタ24
を前記最適露光条件が満足される絞り値,シャッタ速度
で開閉させる。また、撮影後にはフイルム移送回路25
によりフイルム給送モータ26を駆動してフイルム1コ
マ送りが行われる。 【0015】マイクロコンピュータ14には外部機器の
接続端子14aが設けられ、カメラの組立完了時に測距
テストを行って測距装置の作動を確認したり、さらには
的確な作動が行われるように各種の調節データを端末機
28からマイクロコンーピュータ14に入力するときに
用いられる。そして、端末機28から入力されたデータ
の一部は、測距処理の実行に必要なデータを格納するた
めのサブメモリとして用いられているEEPROM(El
ectrically Erasable Programable ROM )29に書き込
みあるいは消去することができる。 【0016】図1はオートフォーカスIC12及びマイ
クロコンピュータ14の構成を概略的に示している。P
SD9の出力端子9a,9bから出力される光電信号
は、それぞれチャンネルごとにプリアンプ30a,30
b、ゲインコントロール回路31a,31b、サンプル
ホールド回路32a,32b、バッファアンプ33a,
33b、メインアンプ34a,34bを経てマイクロコ
ンピュータ14のADコンバータ15に入力される。ま
た、オートフォーカスIC12は、さらに制御回路3
5,ゲインコントローラ36,サンプリングパルス発生
器37を含む。 【0017】プリアンプ30a,30bは出力端子9
a,9bからの光電流信号を電圧信号に変換する。ゲイ
ンコントロール回路31a,31bは、各々に入力され
た電圧信号を適当なゲインで増幅する。各々のゲインの
値はゲインコントローラ36によってチャンネルごとに
決められる。サンプルホールド回路32a,32bは、
サンプリングパルス発生器37からサンプリングパルス
が入力されたタイミングでゲインコントロール回路31
a,31bからの電圧信号をサンプルホールドする。ホ
ールドされた電圧信号は、バッファアンプ33a,33
bを経てメインアンプ34a,34bで一定のゲインの
もとで増幅される。 【0018】制御回路35はシリアルイン−パラレルア
ウトのシフトレジスタ(8ビット)を備えており、この
シフトレジスタには、シリアルデータパルス「AFS
D」によってマイクロコンピュータ14から送信されて
くる制御データが書き込まれる。この制御データは、ゲ
インデータ「GAIN」(5ビット),IRED選択デ
ータ「IRED」(2ビット),ON−OFFデータ
「SET」(1ビット)とからなり、ゲインデータはゲ
インコントローラ36によって読み取られ、ゲインコン
トロール回路31a,31bのゲインを決定するのに用
いられる。また、IRED選択データ及びON−OFF
データは、IRED3の点灯/消灯を決定する。 【0019】制御回路35にはさらにマイクロコンピュ
ータ14から制御パルス「AFLCK」が入力され、こ
の制御パルスは制御データのラッチやIRED3の発光
タイミングを決定するのに用いられる他、サンプリング
パルス発生器37にも送られ、サンプルホルード回路3
2a,32bによるデータのラッチタイミングを決定す
るのにも用いられる。 【0020】マイクロコンピュータ14は、CPU4
0,シリアルポート41,A/Dコンバータ15の他、
測距シーケンス実行用のメイン測距プログラムを格納し
たROM42及び測距シーケンス実行に際して得られる
データや各種フラグを一時的に格納するRAM43から
なる。シリアルポート41は、CPU40からのコマン
ドにより出力端子の切替えが行われ、前述したシリアル
データパルス「AFSD」あるいは制御パルス「AFL
CK」のいずれかを制御回路35に入力する。ADコン
バータ15は、オートフォーカスIC12のメインアン
プ34a,34bから送られてくるアナログ信号電圧を
その出力レベルに対応して8ビットのデジタル値(十進
数で0〜255を表す)に変換する。 【0021】図3は、制御回路35に用いられている8
ビットのシリアルイン−パラレルアウトのシフトレジス
タ45を概念的に示している。そしてD0〜D4の5ビ
ットには前述したゲインデータ「GAIN」、D5〜D
6の2ビットにはIRED選択データ「IRED」、D
7の1ビットにはON−OFFデータ「SET」がそれ
ぞれ割り当てられている。 【0022】D0〜D4の5ビットのゲインデータは、
「0」レベルから「31」レベルまでの値が異なるゲイ
ンを表すことができる。また、D5〜D6のIREDの
選択データは、撮影画面内の複数個所に各々測距光を投
光して複数箇所での測距を行うために例えば3個のIR
EDを用いたときに、いずれのIREDを発光させるか
を決めるためのものであるが、本実施例では一個のIR
ED3だけで測距を行うので、この2ビットのデータは
本来不要である。ただし、以下の説明では選択データ
「IRED」として「01」がセットされたときにIR
ED3が選択されたものとして説明する。 【0023】以下、本発明測距装置の基本的な測距処理
についてフローチャートを参照しながら説明する。カメ
ラのシャッタボタンの半押し操作が行われると、図4に
示したように、ROM42に格納されたメイン測距プロ
グラムがスタートし、まず調整モードか否かが判断され
る。調整モードは、カメラの組立が完了した後に、測距
装置が適正に作動するように、マイクロコンピュータ1
4の接続端子14aに接続した端末機28からの入力デ
ータをEEPROM29に書き込むモードであり、一般
ユーザには使用されることはない。 【0024】調整モード下ではテスト測距が行われ、測
距処理が適切に実行されるか否かの確認が行われる。テ
スト測距を行ったときに測距装置から得られる各種のデ
ータは端末機28にフィードバックされ、これらのデー
タを参照しながら、各種の調節データが決定される。こ
うして決定された調節データは、IRED3,PSD
9,各チャンネルのアンプ系等の電気的特性によってカ
メラごとに個体差があるが、テスト測距の結果を参照し
ながらその適切な値が決められ、端末機28からの指令
により、これらの調節データはEEPROM29に書き
込まれる。 【0025】通常の状態でユーザが使用する際には測距
処理が実行される。測距処理は、まず前述した調整モー
ドによりEEPROM29に書き込まれた調節データを
RAM43の所定エリアにストアしてから開始される。
続いて図5に示したように、オフセット値検出処理,ゲ
イン決定処理,実測距処理,被写体距離の逆数算出処理
が実行される。オフセット値検出処理では、IRED3
を点灯させずに出力端子9a,9bからどの程度の信号
ノイズが出力されているかを検出する目的で行われ、実
際の測距時(実測距)に得られたデータを補正するとき
に用いられる。なお、オフセット値を正確に検出するた
めに、出力端子9a,9bからはそれぞれ32回ずつデ
ジタルデータが取り込まれ、これらの平均値がオフセッ
ト値となる。 【0026】ゲイン決定処理は、実測距を行うときのア
ンプ系のゲインを適切な値に設定するためのもので、被
写体距離が遠くてPSD9からの光電信号の出力レベル
が小さくなるときには大きなゲイン値が設定される。実
測距処理では、基本的にはIRED3を例えば0.5秒
の間に128回繰り返し点灯させ、その都度ADコンバ
ータ15から得られるデジタルデータを測距データAF
D1,AFD2として読み込む。測距データはそれぞれ
加算された後に平均値がとられ、この平均値を元にして
測距演算を行って撮影レンズ5のセット位置が決定され
る。 【0027】図6はオフセット値検出処理を表すフロー
チャートである。オフセット検出処理時には、シフトレ
ジスタ45にゲインデータ「GAIN」,IRED選択
データ「IRED」,ON−OFFデータ「SET」が
セットされる。このときのゲインデータは、カメラごと
に個別的に決められた最小値「GAINMIN」となっ
ている。例えば「GAINMIN=8」であるときに
は、シフトレジスタ45には「01000000」(2
進数)が設定される。これにより、「GAIN=8」,
「IRED=00」,「SET=0」の各制御データが
設定される。 【0028】この制御データの設定は、図7のタイミン
グチャートに示したP1の時点、すなわち制御データの
送信後、制御パルスAFLCKがローレベルになったと
きにラッチされる。さらに上記制御データの送信後に
は、CPU24内の所定レジスタに「COUNT=3
2」がセットされる。 【0029】シフトレジスタ45にセットされた制御デ
ータの内、「GAIN=8」のデータはゲインコントロ
ーラ36を介してゲインコントロール回路31a,31
bに供給され、ゲインコントロール回路31a,31b
のゲインは各々「8」に設定される。なお、基本的には
ゲインの最大値「GAINMAX」の値は「31」、ゲ
インの最小値「GAINMIN」の値は「0」である
が、これらの値は図4のフローチャートに示した調整モ
ードの実行時に、PSD9以降のアンプ系に対応してそ
れぞれカメラごとに個別的な値としてEEPROM29
に書き込まれており、測距処理の開始時にはそれぞれE
EPROM29からRAM43にストアされている。 【0030】制御データの送信後、第1,第2チャンネ
ルからの光電信号はADコンバータ15でデジタルデー
タADDATAに変換され、チャンネルごとにマイクロ
コンピュータ14により読み込まれる。この読み込み処
理が行われるときには、図8のフローチャートに示した
ように、まず制御パルス「AFLCK」がローレベルに
される。その後、シリアルデータパルス「AFSD」が
ローレベルになり、実測距時では、次にハイレベルにな
ったタイミングP2でIRED3の点灯が行われる。な
お、オフセット値の検出時にはIRED3は非点灯のま
まである。 【0031】タイミングP2からΔT1経過するとシリ
アルデータパルス「AFSD」が再びハイレベルにな
る。このタイミングP3でサンプリングパルス発生器3
7からサンプルホールド回路32a,32bにサンプリ
ングパルスが送出され、ゲインコントロール回路31
a,31bからの光電信号がその波形のピークでホール
ドされる。そして、IRED3が点灯されたタイミング
P2から、各チャンネルの光電信号がピークに達するま
でのずれΔT1の値は、やはりPSD9以降のアンプ系
に対応してそれぞれカメラごとに異なっているのが通常
であるため、このΔT1の値もカメラごとに適切な値が
決められ、EEPROM29に「SHTIME」として
書き込まれている。 【0032】タイミングP2から一定時間ΔT2が経過
するとシリアルデータパルス「AFSD」がローレベル
になり、実測距時にはIRED3の発光停止のタイミン
グ信号として用いられる。タイミングP3でサンプルホ
ールドされた光電信号は、次にチャンネルごとに逐次A
Dコンバータ15でAD変換される。AD変換後のデジ
タルデータADDATAは、それぞれチャンネルごとの
測距デーAFD1,AFD2としてCPU40に読み込
まれる。 【0033】このとき、一方の測距データAFD2は入
力されたデジタル値そのままで読み込まれるが、他方の
測距データAFD1については補正係数「GPARA」
が乗算される。これにより、各チャンネルのゲインコン
トロール回路31a,31bのゲインを同じにしたまま
で、チャンネル間の誤差を補正することができるように
なる。したがって、ゲインコントロール回路31a,3
1bのゲインを個別に設定する不利を避けることができ
る。 【0034】こうして測距データAFD1,AFD2が
読み込まれた後、シリアルデータパルス「AFSD」,
制御パルス「AFLCK」の各々がハイレベルになり、
制御パルス「AFLCK」がハイレベルになってからΔ
T3経過した時点で1サイクルの測距データ読み込み処
理が完了する。 【0035】以上の繰り返しにより、各チャンネルごと
に32個の測距データAFD1,AFD2が得られる
が、これらはそれぞれチャンネルごとに加算され、読み
込み回数「32」で除算される。これによりチャンネル
ごとのオフセット値OFS1,OFS2が求められるこ
とになる。なお、オフセット値の検出処理を行ったとき
に、ADコンバータ15から出力されるデジタルデータ
ADDATAの値が一定の範囲に収まるように各チャン
ネルのアンプ系の回路定数が設定されている。したがっ
て、オフセット値の検出処理時にADコンバータ15か
ら出力されるデジタルデータADDATAの値が零やマ
イナスになることはない。 【0036】なお、後述するゲイン決定処理でも行われ
るように、上記のオフセット値検出処理時に、測距デー
タAFD1,AFD2を読み込むときにその値を監視
し、その値が小さ過ぎたり大き過ぎたりした場合にはオ
ーバーカウンタを1ずつインクリメントし、例えば32
回の読み込みの中でオーバーカウント値が「4」になっ
たときには、再度オフセット値検出処理をやり直すよう
にしてもよい。また、オーバーカウント値が「3」以下
であるときには、そのときの測距データを除いて平均値
を算出すればよい。 【0037】上記オフセット値検出処理の後には、図9
及び図10に示したゲイン決定処理が行われる。ゲイン
決定処理では、まず初期ゲインとしてEEPROM29
からRAM43に展開されている「GAINMIN」が
設定される。そして、RAM43上の「SUBCNT」
エリアにデータ「1」がセットされる他、RAM43あ
るいはCPU40内の適宜のレジスタに、ステップST
1で示した各データがセットされる。なお、ST1に挙
げたデータは以下の内容をもつ。 【0038】OVCNT : 各チャンネルごとに読み
取ったデータが過小あるいは過大であるときの読み込み
許容回数 AFADD : 各チャンネルごとに得られたデータを
加算し、オフセット値を減算した値 ADSUM1: 第1チャンネルのデータの加算値 ADSUM2: 第2チャンネルのデータの加算値 PRECNT: 同一ゲインでのデータ読み込み回数 UNDフラグ: 読み込みデータが過少のときにセット
されるフラグ OVフラグ : 読み込みデータが過大のときにセット
されるフラグ CNT : データ読み込み回数 【0039】ST1の初期セットの後、ゲインデータ
「GAINMIN」、IRED選択データ「01」、O
N−OFFデータ「1」とともに制御回路35内のシフ
トレジスタ45に送信される。そして、図7及び図8に
示したように、各チャンネルごとにデータの読み込みが
開始される。 【0040】各チャンネルごとに読み込まれた測距デー
タAFD1,AFD2の値が、標準的な範囲に属してい
るか否かがステップST2,ST3で判断される。これ
らの測距データは8ビットのデジタル値で表され、
「0」〜「255」の大きさをもつが、これらの値が基
準最小値「5」よりも小さいか、あるいは基準最大値
「230」よりも大きいかがチェックされる。このチェ
ックは、ゲインコントロール回路31a,31bに設定
したゲインが「GAINMIN」が適切かどうかを確認
するためのものである。そして、適切であると判断され
た場合には、各チャンネルごとの測距データAFD1,
AFD2は、それぞれ加算値ADSUM1,ADSUM
2としてRAM43に格納される。 【0041】データ読み込み回数「CNT」が「0」に
なったことが確認されると、「SUBCUT」の値
「1」が「PRECNT」として書き込まれ、図10の
処理に移行する。なお、初期設定において「CNT=
1」となっているから、ステップST4で「CNT≠
0」となったときはエラーであるから、再度データの読
み込み処理が行われる。 【0042】ST2において、測距データAFD1,A
FD2のいずれかの値が小さ過ぎると判断された場合に
は「UNDフラグ」がセットされる。そして、ST3で
測距データAFD1,AFD2のいずれかが大き過ぎる
と判断された場合と同様に、「OVCNT」から「−
1」の処理が行われる。初期設定において「OVCNT
=1」となっているから、通常ではこの処理によって
「OVCNT=0」となって「OVフラグ」のセット
後、図10の処理に移行するが、「OVCNT≠0」で
あるときにはエラーとなって、再度データの読み込み処
理が行われる。 【0043】図10の処理では、まずステップST5に
おいて「OVフラグ」の有無がチェックされる。「OV
フラグなし」の場合には、「ADSUM1」,「ADS
UM2」の値をそれぞれ「SUBCNT」で除算し、そ
の結果が新たな測距データ「AFD1」,「AFD2」
として保存される。ステップST6では、図示したよう
に「(AFD1+AFD2)−(OFS1+OFS2)
≧136」の判断が行われる。「OFS1」,「OFS
2」の値は前述したオフセット値の検出処理で既に求め
られている。 【0044】ST6では、第1,第2チャンネルから得
られた測距データ「AFD1」,「AFD2」の和の大
きさが、オフセット値の減算を行った後でも充分な大き
さがあるかどうかを確認している。後述するように測距
データ「AFD1」,「AFD2」は以後の測距演算に
用いられるが、演算精度を劣化させないためには、これ
らの和が「136」以上あった方が好ましいからであ
る。 【0045】ST6により、測距データ「AFD1」,
「AFD2」の和の大きさが、測距演算の実行に適切な
レベル以上であることが確認されると、ゲインコントロ
ール回路31a,31bのゲインはそのときの「GAI
N」の値(初期値「GAINMIN」)として決定さ
れ、図11に示した実測距処理に移行する。 【0046】ST6により、測距データ「AFD1」,
「AFD2」の和の大きさが不適切であることが確認さ
れると、後述する「GSNGフラグ」がセットされてい
ないことを条件に、「GAIN」の値変更が行われる。
「GAIN」の値は、「(AFD1+AFD2)−(O
FS1+OFS2)」の値Xに対応し、次表のゲインテ
ーブルにしたがって決定される。 【0047】 【表1】 【0048】このGAIN加算値を、それまでの「GA
IN」に加算した値が新たな「GAIN」となるが、ス
テップST7によってこの値が「GAINMAX」を越
えていた場合には図12の処理に移行する。「GAIN
MAX」以下のときには、この新たな「GAIN」を制
御データとしてシフトレジスタ45に送信する。さら
に、ステップST8では新たな「GAIN」の値が「G
AINMAX−16」、すなわちゲインのほぼ中間値よ
りも大きいか否かを判定し、小さい場合には図9に戻
って再びゲイン決定処理を行う。 【0049】一方、新たな「GAIN」の値がゲインの
ほぼ中間値よりも大きい場合には、「SUBCNT←
8」としてから図9のに戻ってゲイン決定を行う。こ
のように、新たなゲインの値が中間値よりも大きくなっ
たときにデータの読み込み回数を増やす理由は、ゲイン
が大きくなるとノイズ成分が増えるからである。 【0050】ST5により「OVフラグあり」と判断さ
れ、かつ「GAIN=GAINMIN」であることがス
テップST9で確認された場合は、カメラごとにEEP
ROM29に書き込まれたゲインの最大値「GAINM
AX」及び最小値「GAINMIN」に基づくゲイン設
定処理が、ノイズや外乱によって実行できないことを意
味している。そして、この場合には図12の処理に移行
する。 【0051】また、ST9により「GAIN≠GAIN
MIN」であることが確認されたときには「GSNGフ
ラグ」がセットされる。この「GSNGフラグ」は、設
定されているゲインが不適切なものであるときにセット
される。「GSNGフラグ」がセットされた後、「GA
IN←GAIN−1」として新たなゲインが設定され、
そのゲインのもとで図9のゲイン決定処理が再開され
る。 【0052】上記のゲイン決定処理を行う間に、ST6
により図11の処理に移行した場合には、そのときの
「GAIN」を用いて実測距処理が開始される。この実
測距処理においては、基本的にはIRED3を128回
繰り返し点灯させ、その都度測距データAFD1,AF
D2を読み込む。そして、ゲイン決定処理のときと同様
にこれらの値が適切な範囲に収まっているか否かが確認
される。適切な範囲の値であると、これらの測距データ
AFD1,AFD2は、それぞれゲイン決定処理のとき
から保存されていた「ADSUM1」,「ADSUM
2」にさらに加算される。そして、測距データの読み込
み回数「CNT」が「0」になると、図12に示した測
距演算処理に移行する。 【0053】ところで、図11のST10に示したよう
に、実測距時における測距データの読み込み回数「CN
T」は、「CNT←SUBCNT−PRECNT」によ
って制限される。「PRECNT」は、図9に示したよ
うに実測距に先立ってすでに行われたゲイン決定処理の
ときの測距データ読み込み回数となっている。したがっ
て、ゲイン決定処理にあたって8回の測距データの読み
込みが行われていた場合には、実測距時の測距データの
読み込み回数は120回となり、実測距の処理時間を短
縮することができる。 【0054】しかも前述したように、ゲイン決定処理時
に各チャンネルごとに得られた測距データは、「ADS
UM1」,「ADSUM2」として実測距が行われる間
も保存されているから、ゲイン決定処理時でのデータ読
み込み回数を通算すると「128」回となり、結果的に
基本的な実測距の回数が減ることはなく、測距精度が低
くなることはない。 【0055】実測距処理時の測距データAFD1,AF
D2の値が小さ過ぎた場合には、ゲイン決定処理のとき
と同様に「UNDフラグ」がセットされる。そして大き
過ぎた場合も含め、「OVCNT」が「1」ずつ減算さ
れる。この「OVCNT」の値はST10の初期設定に
よって「16」に設定されているから、測距データを
「CNT」回読み込んでゆく中で、測距データAFD
1,AFD2のいずれかが不適切な値であったとしても
「15」回までは許容され、実測距処理がそのまま継続
される。 【0056】「CNT」回の測距データの読み込みが完
了すると、図12に示したように、被写体距離の逆数を
求める演算が行われる。まず、「ADSUM1」,「A
DSUM2」に対してオフセット値「OFS1」,「O
FS2」による補正が行われるが、ゲイン決定処理時か
らのデータ読み込みの通算回数は128回であるので、
各オフセット値に128を乗算した値を「ADSUM
1」,「ADSUM2」から減算している。 【0057】続いて「ADSUM1」,「ADSUM
2」の加算データ「AFADD」と減算データ「AFD
IF」とが求められ、その比「AFRATIO」が求め
られる。次に、被写体距離の逆数「INV.LEN」が
算出される。この演算にあたっては、EEPROM29
からRAM43にストアされた係数「ADJ0」は「A
DJ1」が読み込まれる。これらの係数は、カメラの光
学特性によって適宜設定された値となっている。そし
て、こうして求められた被写体距離の逆数「INV.L
EN」はCPU40に入力され、これに基づいて撮影レ
ンズ5のピント位置が決められるようになる。なお、
「α」はカメラの個体差によらない一定値である。 【0058】図9のゲイン決定処理及び図10ないし図
11に示した実測距処理を実行する過程において、「G
AIN=GAINMIN」であるのにもかかわらず測距
データAFD1,AFD2が大き過ぎる値である場合に
は、PSD9に高輝度の光入射があり、被写体距離とし
ては至近距離であることに対応している。したがって、
図12に示したように「INV.LEN」の値として
「∞」を設定し、これにより撮影レンズ5のピント位置
は至近距離に適合した位置となり、近距離警告が行われ
る。 【0059】またゲイン決定処理の実行中、「AFD1
+AFD2」の値が適切なレベルに達しておらず、しか
もST7で新たに設定しようとした「GAIN」の値が
カメラごとに設定されているゲインの最大値「GAIN
MAX」を越える場合には、PSD9への光入射が極め
て微弱なものであることを意味している。この場合に
は、被写体距離が極めて遠方にあることを意味している
から、「INV.LEN」の値として「0」を設定し、
これにより撮影レンズ5のピント位置は無限遠撮影用の
位置に合わせられるようになる。 【0060】以上、図示した実施例にしたがって本発明
について説明してきたが、測距処理プログラムの部分的
改良や改変は適宜可能であり、さらにゲイン決定処理や
実測距時における測距データの繰り返し読み込み回数等
については、適宜設定することが可能である。また、最
終的に被写体距離の逆数を算出する代わりに、「AFR
ATIO」の値から撮影レンズ5のピント合わせ位置を
求めるようにしてもよい。さらに、本発明は1個のIR
ED3で測距するものだけでなく、例えばそれぞれ投光
方向が異なる3個のIREDを利用し、撮影画面の中央
とその左右の3箇所に各々測距光を投光して測距を行う
ようにしたものにも利用可能である。 【0061】 【発明の効果】上述したように、本発明の測距装置によ
れば、ゲイン決定処理の後に測距光を複数回投光してデ
ジタルデータを読み込む実測距を行うに際し、ゲイン決
定処理実行時に読み込んだデジタルデータを実測距まで
保存しておき、このデジタルデータを実測距処理にも利
用するようにしてあるから、実測距時における測距光の
投光及びデジタルデータの読み込み回数を減らすことが
でき、測距精度を低下させることなく、実測距の所要時
間を短縮することができる。
Description: BACKGROUND OF THE INVENTION The present invention relates to an active camera.
The present invention relates to a distance measuring device for a vehicle. 2. Description of the Related Art Active type measurement used in cameras
The distance device is a light projecting unit that emits distance measuring light toward the subject
And a light receiver placed at a fixed base line distance from the light emitter
Unit and a signal processing unit that processes signals from the light receiving unit.
You. The light emitting section generally emits near-infrared light.
(IRED) is used and near-infrared light from it is measured
The light is projected toward the subject as light. Of the ranging light,
The light reflected by the subject passes through the light-receiving lens and enters the light-receiving section.
Shoot. The light receiving unit includes, for example, a PSD (Position Sensiti).
ve Devise), and the pair of output terminals
Represents a photoelectric signal corresponding to the light incident position. And
Based on the photoelectric signal, the signal processing unit performs triangulation calculation.
To calculate the distance to the subject.
The focus position of the taking lens accordingly.
Can be A photoelectric signal appearing at a pair of output terminals of a PSD
The output level of the
However, the ratio of these photoelectric signals must be determined.
Therefore, the PSD is not affected by the output level.
Light incident position can be detected. However, above
Calculate the ratio of both signals while the output level of the photoelectric signal is low.
And when the ratio is determined while the output level is high.
, The detection accuracy tends to vary. [0004] The photoelectric signal from the PSD is an analog signal.
Therefore, after converting these signals into digital quantities,
The ratio is usually calculated, but the output level is low.
And the output level.
When the ratio is obtained by A / D converting each photoelectric signal with high
In the case, there is a difference in the accuracy of the operation. These inconveniences
Japanese Patent Laid-Open Publication No. 4-199013 discloses a method for solving the problem.
In the above distance measuring device, each channel is connected to the output terminal of the PSD.
Amplifier system including gain control circuit for each channel
Connected and A / D converted photoelectric signals from both channels.
When the size of each digital data is within a certain range,
Feedback to the gain control circuit so that
And amplify each photoelectric signal with the same amplification factor
Has been done. Further, in the distance measuring device described in the above publication, the gay
Control circuit gain in an appropriate range.
The gain of the gain control circuit
Digital data obtained from each channel
If it is too large, it is determined that the subject is
To focus the taking lens. Also, the gain is
Digital data is too small despite being large
In some cases, it is determined that the subject is
The focus of the lens is adjusted. After the gain is determined,
Digital data obtained from channels is in the proper range
In some cases, the distance measurement light is emitted multiple times to perform the actual distance measurement,
Performs ranging calculations based on the obtained digital data and
The focus position of the lens is determined. [0006] As described above, the gain
If the gain of the control circuit cannot be determined in an appropriate range
Focus the shooting lens at a close distance according to the situation.
Focus on the hyperfocal distance at infinity.
The distance without wasting the actual distance measurement.
Can be focused. However, the gain
After the appropriate gain is determined by the decision process,
Actual distance measurement is repeated several times (for example, 128 times),
Distance measurement is performed based on the digital data obtained in the process.
Distance to determine the focus position of the taking lens.
Has the disadvantage that it takes too much time. Ma
In addition, in order to reduce such adverse effects, repeat the actual distance measurement.
Simply reducing the number will reduce the accuracy of ranging.
Problems arise. The present invention has been made in view of the above circumstances.
In the actual distance measurement after the gain is determined,
Without having to spend too much time,
Aiming to provide a distance measuring device for cameras
I do. [0008] The present invention achieves the above object.
To determine the gain of the gain control circuit.
Sometimes digital data can be obtained from each channel
Focusing on these digital data for distance measurement calculation
It is intended to be used. That is, gain determination
After the actual distance measurement is performed, the distance measurement light is projected N times
Read digital data sequentially for each channel and read
Performs distance measurement based on multiple digital data
When determining the focus position of the shooting lens,
During the determination process, each
P digital data was read for each channel
Sometimes, the number of times of distance measurement light projection during actual distance measurement is NP
Times and the P data obtained in the gain determination process
Digital data combined with digital data obtained during actual distance measurement
In this case, the distance measurement calculation is performed. According to the above, the projection time of the distance measuring light at the time of actual distance measurement is obtained.
While reducing the number to NP times, practically N times actual measurement
Read the same amount of digital data as
Can reduce the distance measurement accuracy.
There is no. FIG. 1 is a schematic diagram showing an electric configuration of a camera using the present invention.
In FIG. 2 shown in FIG.
It comprises an IRED 3 that emits light and a light projecting lens 4.
The optical axis 4a of the projection lens 4 is
And it is almost parallel. The ranging light from IRED3 is
The shooting screen is converted into a small beam by the light-emitting lens 4.
The central part is oriented. The light receiving section 7 comprises a light receiving lens 8 and a PSD 9
The optical axis 8a of the light receiving lens 8 is also
It is almost parallel to a. PSD9 is the amount of incident light
And a signal corresponding to the incident position is output to each output terminal 9a, 9b.
Output from As is clear from FIG.
The closer the distance is, the more the reflected light is on the terminal 9b side of PSD9.
From the output terminals 9a and 9b.
By taking the ratio of the sum and difference of the obtained photoelectric signals,
The signal corresponding to the incident position without depending on the amount of incident light
Can be obtained. Note that PSD 9 is
Has no discriminating action, and the incident height in the vertical direction is
Output is the same even if the horizontal incident position is different
The ratio between the sum and difference of the photoelectric signals from the terminals 9a and 9b is equal.
Become. Is IRED3 an autofocus IC12?
Light emission control is performed through the driver 11 by these signals.
You. The auto focus IC 12 is a microcomputer
Distance measurement according to the command from the
In addition to running the sequence and activating the driver 11,
Amplify the photoelectric signals from the output terminals 9a and 9b of the PSD 9,
Sample and hold processing to microcomputer 14
input. The microcomputer 14 has an AD converter.
And the auto focus IC 12
The photoelectric signal input for each channel from
Convert from log amount to digital amount. Microcomputer
The signal 14 is applied to the signal thus input for each channel.
Based on distance calculation based on the distance to the subject
Calculate the distance signal. And in response to this distance signal
The motor 17 is driven via the lens moving circuit 16 to capture an image.
The lens 5 moves to the set position corresponding to the subject distance
Focusing is performed. The microcomputer 14 has a general-purpose type.
Is used, and after being detected by the photometric circuit 19, the AD converter
The photometric data converted by the converter 20 is also input.
You. The microcomputer 14 is based on the photometric data
The optimum exposure condition is calculated, and the
The program shutter 24 is driven by driving the
Is the aperture value and shutter speed at which the above optimum exposure conditions are satisfied.
To open and close. After the photographing, the film transfer circuit 25
The film feed motor 26 is driven by the
Feeding is performed. The microcomputer 14 has an external device
Connection terminal 14a is provided, and distance measurement is performed when camera assembly is completed.
Perform tests to confirm the operation of the distance measuring device,
Various adjustment data are stored in the terminal so that accurate operation can be performed.
When inputting to the microcomputer 14 from 28
Used. Then, the data input from the terminal 28
Some of them store the data needed to perform the ranging process.
EEPROM (El
Write to ectrically Erasable Programmable ROM) 29
Or can be deleted. FIG. 1 shows an autofocus IC 12 and a microcomputer.
1 schematically shows the configuration of a microcomputer 14. P
Photoelectric signals output from output terminals 9a and 9b of SD9
Are preamplifiers 30a, 30
b, gain control circuits 31a, 31b, sample
Hold circuits 32a, 32b, buffer amplifiers 33a,
33b, and through the main amplifiers 34a and 34b,
It is input to the AD converter 15 of the computer 14. Ma
The autofocus IC 12 further includes a control circuit 3
5, gain controller 36, sampling pulse generation
And a vessel 37. The preamplifiers 30a and 30b are connected to the output terminal 9
a, 9b is converted into a voltage signal. Gay
Control circuits 31a and 31b
The amplified voltage signal is amplified with an appropriate gain. Of each gain
The value is set for each channel by the gain controller 36.
I can decide. The sample and hold circuits 32a and 32b
Sampling pulse from sampling pulse generator 37
Gain control circuit 31 at the timing when
a and 31b are sampled and held. E
The cooled voltage signals are supplied to buffer amplifiers 33a, 33a.
b, the main amplifiers 34a, 34b
Amplified in the original. The control circuit 35 has a serial-in-parallel
Out shift register (8 bits)
The serial data pulse “AFS” is stored in the shift register.
D ”sent from the microcomputer 14
Incoming control data is written. This control data is
In-data "GAIN" (5 bits), IRED selection data
Data "IRED" (2 bits), ON-OFF data
“SET” (1 bit), and the gain data
Read by the in-controller 36 and gain control
Used to determine the gain of troll circuits 31a and 31b
You can. Also, IRED selection data and ON-OFF
The data determines whether the IRED 3 is turned on or off. The control circuit 35 further includes a microcomputer.
Control pulse “AFLCK” is input from the
Control pulses are used to latch control data and emit light from the IRED3.
Used to determine timing and sampling
The sample hold circuit 3 is also sent to the pulse generator 37.
2a and 32b determine data latch timing
It is also used for The microcomputer 14 includes a CPU 4
0, serial port 41, A / D converter 15,
Stores the main ranging program for executing the ranging sequence
ROM 42 and obtained at the time of executing the distance measurement sequence.
RAM 43 for temporarily storing data and various flags
Become. The serial port 41 is a command from the CPU 40.
The output terminal is switched by the
Data pulse “AFSD” or control pulse “AFL”
CK ”is input to the control circuit 35. AD Con
The bar 15 is a main antenna of the auto focus IC 12.
The analog signal voltage sent from the loops 34a and 34b is
An 8-bit digital value (decimal) corresponding to the output level
(Representing 0-255 by a number). FIG. 3 is a block diagram of the control circuit 35 used in the control circuit 35.
Bit serial in-parallel out shift register
FIG. And D0 to D4
The gain data “GAIN” described above, D5 to D
6 are IRED selection data "IRED" and D
ON-OFF data "SET" is in 1 bit of 7
Each has been assigned. The 5-bit gain data of D0 to D4 is
Gays with different values from "0" level to "31" level
Can be represented. In addition, IRED of D5 to D6
The selected data is projected at several locations in the shooting screen.
In order to perform distance measurement at a plurality of locations by light, for example, three IRs
Which IRED emits light when using ED
In this embodiment, one IR is determined.
Since the distance is measured only with ED3, this 2-bit data is
Essentially unnecessary. However, in the following explanation,
When "01" is set as "IRED", IR
Description will be made assuming that ED3 is selected. Hereinafter, a basic distance measuring process of the distance measuring apparatus of the present invention.
Will be described with reference to a flowchart. turtle
When the shutter button is pressed halfway,
As shown, the main distance measurement program stored in the ROM 42 is used.
Gram starts and it is first determined whether it is in the adjustment mode or not.
You. In the adjustment mode, the AF
The microcomputer 1 is used so that the device operates properly.
Input data from the terminal 28 connected to the connection terminal 14a
Data in the EEPROM 29.
It is not used by the user. In the adjustment mode, test distance measurement is performed,
It is determined whether or not the distance processing is properly performed. Te
Various data obtained from the ranging device when performing strike ranging
The data is fed back to the terminal 28, and these data are
Various adjustment data are determined with reference to the data. This
The adjustment data thus determined is IRED3, PSD
9, depending on the electrical characteristics of the amplifier system of each channel, etc.
Although there are individual differences among cameras, refer to the results of test ranging.
While the appropriate value is determined, the command from terminal 28
By writing these adjustment data in EEPROM 29,
Be included. When the user uses the device in a normal state, the distance is measured.
The processing is executed. In the distance measurement process, the adjustment mode
The adjustment data written to the EEPROM 29 by the
The processing is started after storing in a predetermined area of the RAM 43.
Subsequently, as shown in FIG.
In decision processing, actual distance measurement processing, reciprocal calculation processing of subject distance
Is executed. In the offset value detection processing, IRED3
How much signal from output terminals 9a and 9b without turning on
This is performed to detect whether noise is output.
When correcting data obtained during distance measurement (actual distance measurement)
Used for Note that it is necessary to accurately detect the offset value.
32 times each from the output terminals 9a and 9b.
Digital data is acquired and their average is offset.
Value. The gain determination process is performed when an actual distance measurement is performed.
This is to set the gain of the pump system to an appropriate value.
Output level of photoelectric signal from PSD9 due to long object distance
Becomes smaller, a larger gain value is set. Real
In the distance measurement process, basically, the IRED3 is set to, for example, 0.5 seconds.
During 128 times repeatedly, each time AD converter
The digital data obtained from the data
Read as D1 and AFD2. Each distance measurement data
After addition, the average is taken, and based on this average,
The set position of the taking lens 5 is determined by performing the distance measurement calculation.
You. FIG. 6 is a flowchart showing the offset value detection processing.
It is a chart. During offset detection processing,
Gain data "GAIN" and IRED selection for the register 45
Data "IRED", ON-OFF data "SET"
Set. The gain data at this time is
Becomes the minimum value "GAINMIN" determined individually
ing. For example, when "GAINMIN = 8"
Indicates that “01000000” (2
Base number) is set. As a result, “GAIN = 8”,
Each control data of "IRED = 00" and "SET = 0"
Is set. The setting of the control data is performed according to the timing shown in FIG.
At the point P1 shown in the chart, that is, the control data
After transmission, the control pulse AFLCK goes low.
Latched. After sending the above control data
Indicates that "COUNT = 3" is stored in a predetermined register in the CPU 24.
2 "is set. The control data set in the shift register 45
Data of “GAIN = 8” is the gain control
Gain control circuits 31a, 31
b and supplied to the gain control circuits 31a and 31b
Are set to “8”. Basically,
The maximum value of the gain “GAINMAX” is “31”,
The minimum value of GAINMIN is “0”
However, these values are adjusted in the adjustment mode shown in the flowchart of FIG.
At the time of executing the mode, it corresponds to the amplifier system after PSD9.
EEPROM 29 is used as an individual value for each camera.
At the start of the distance measurement process.
It is stored in the RAM 43 from the EPROM 29. After transmitting the control data, the first and second channels
The photoelectric signal from the
Is converted to ADDATA, and micro
It is read by the computer 14. This reading process
When the processing is performed, the processing shown in the flowchart of FIG.
First, the control pulse "AFLCK" goes low.
Is done. After that, the serial data pulse “AFSD”
It goes to low level, and then goes to high level during actual distance measurement.
At timing P2, the IRED 3 is turned on. What
When the offset value is detected, IRED3 remains off.
Up to. When ΔT1 has elapsed from timing P2, the serial
The data pulse “AFSD” goes high again.
You. At this timing P3, the sampling pulse generator 3
7 to the sample hold circuits 32a and 32b.
A tuning pulse is sent out and the gain control circuit 31
a, 31b, the photoelectric signal from the
Is executed. And the timing when IRED3 is turned on
From P2, until the photoelectric signal of each channel reaches the peak.
The value of the deviation ΔT1 is also the amplifier system after PSD9.
It is usually different for each camera corresponding to
Therefore, the value of ΔT1 is also an appropriate value for each camera.
Decided, "SHTIME" in EEPROM29
Has been written. A certain time ΔT2 has elapsed since timing P2
Then, the serial data pulse “AFSD” goes low.
When the actual distance measurement, the timing of stopping the emission of IRED3
It is used as a logging signal. At the timing P3, the sample
The filtered photoelectric signal is then sequentially A
AD conversion is performed by the D converter 15. Digi after AD conversion
Total data ADDATA is provided for each channel.
Read into CPU 40 as distance measurement data AFD1, AFD2
I will. At this time, one of the distance measurement data AFD2 is input.
The read digital value is read as is, but the other
The correction coefficient “GPARA” is used for the distance measurement data AFD1.
Is multiplied. This allows the gain control of each channel
With the gains of the troll circuits 31a and 31b kept the same
So that errors between channels can be corrected.
Become. Therefore, the gain control circuits 31a, 31
The disadvantage of setting the gain of 1b individually can be avoided
You. Thus, the distance measurement data AFD1 and AFD2 are
After reading, the serial data pulse "AFSD",
Each of the control pulses “AFLCK” becomes high level,
Δ after the control pulse “AFLCK” becomes high level
When T3 has elapsed, one cycle of ranging data read processing
Is completed. By repeating the above, for each channel
32 distance measurement data AFD1 and AFD2 are obtained
However, these are added for each channel,
It is divided by the number of embeddings “32”. This allows the channel
Offset values OFS1 and OFS2 for each
And When the offset value is detected
And the digital data output from the AD converter 15.
Set each channel so that the value of ADDATA falls within a certain range.
The circuit constants of the channel amplifier system are set. Accordingly
The AD converter 15 during the offset value detection processing.
If the value of the digital data ADDATA output from the
It cannot be negative. It should be noted that this is also performed in a gain determination process described later.
As described above, the distance measurement data
Monitor the values when reading AFD1 and AFD2
If the value is too small or too large,
The bar counter is incremented by one, for example, 32
The overcount value becomes "4" during the reading
If this happens, repeat the offset value detection process.
It may be. Also, the over count value is "3" or less
Is the average value excluding the distance measurement data at that time
May be calculated. After the offset value detection processing, FIG.
Then, the gain determination processing shown in FIG. 10 is performed. gain
In the determination processing, first, the EEPROM 29 is used as an initial gain.
"GAINMIN" developed in RAM43 from
Is set. Then, “SUBCNT” on the RAM 43
In addition to the data “1” being set in the area,
Alternatively, in an appropriate register in the CPU 40, the step ST
Each data indicated by 1 is set. In ST1,
The generated data has the following contents. OVCNT: Reading for each channel
Reading when the data taken is too small or too large
Allowable times AFADD: Data obtained for each channel
ADSUM1: Addition value of data of the first channel ADSUM2: Addition value of data of the second channel PRECNT: Number of times of reading data with the same gain UND flag: Set when reading data is too small
Flag OV flag: Set when the read data is excessive
Flag CNT: Number of times of data read After initial setting of ST1, gain data
"GAINMIN", IRED selection data "01", O
The shift in the control circuit 35 together with the N-OFF data "1"
Sent to the register 45. 7 and 8
As shown, reading data for each channel
Be started. Distance measurement data read for each channel
The values of AFD1 and AFD2 fall within the standard range.
It is determined in steps ST2 and ST3 whether or not they are present. this
These distance data are represented by 8-bit digital values,
It has a size of “0” to “255”, but these values are
Less than the sub-minimum value "5" or the reference maximum value
It is checked whether it is larger than “230”. This che
Is set in the gain control circuits 31a and 31b
Check if the gain is appropriate for "GAINMIN"
It is for doing. And is determined to be appropriate
In this case, the distance measurement data AFD1,
AFD2 has the added values ADSUM1 and ADSUM, respectively.
2 is stored in the RAM 43. The number of data readings “CNT” becomes “0”
When it is confirmed that it has become, the value of "SUBCUT"
“1” is written as “PRECNT”, and FIG.
Move on to processing. In the initial setting, “CNT =
1 ”, so“ CNT @
When it is set to “0”, it is an error, so read the data again.
An embedding process is performed. At ST2, the distance measurement data AFD1, A
If any value of FD2 is determined to be too small
Is set to the "UND flag". And in ST3
Either the distance measurement data AFD1 or AFD2 is too large
"OVCNT" is changed to "-"
1 "is performed. In the initial setting, "OVCNT
= 1 ”, so usually this process
"OVCNT = 0" and "OV flag" set
Thereafter, the processing shifts to the processing of FIG. 10, but with “OVCNT @ 0”
In some cases, an error occurs and the data
Is performed. In the process of FIG. 10, first, in step ST5,
The presence or absence of the "OV flag" is checked. "OV
In the case of "no flag", "ADSUM1", "ADS
UM2 ”is divided by“ SUBCNT ”.
Is the new distance measurement data “AFD1”, “AFD2”
Will be saved as In step ST6, as shown
To "(AFD1 + AFD2)-(OFS1 + OFS2)
≧ 136 ”is determined. “OFS1”, “OFS
The value of “2” has already been obtained by the offset value detection processing described above.
Have been. In ST6, the data is obtained from the first and second channels.
Of the sum of the measured distance data "AFD1" and "AFD2"
Is large enough even after offset value subtraction
Make sure you have it. Distance measurement as described later
The data "AFD1" and "AFD2" are used for the subsequent distance calculation.
It is used, but in order not to degrade the calculation accuracy,
It is preferable that the sum of them is "136" or more.
You. At ST6, the distance measurement data "AFD1",
The size of the sum of “AFD2” is appropriate for executing the distance measurement calculation.
If it is confirmed that the level is higher than
The gain of the rule circuits 31a and 31b is determined by the “GAI
N ”(initial value“ GAINMIN ”)
Then, the processing shifts to the actual distance measurement processing shown in FIG. At ST6, the distance measurement data "AFD1",
It was confirmed that the size of the sum of “AFD2” was inappropriate.
The “GSNG flag” described later is set.
On the condition that there is no change, the value of “GAIN” is changed.
The value of “GAIN” is “(AFD1 + AFD2) − (O
FS1 + OFS2) ”and the gain table in the following table.
Table according to the table. [Table 1] This GAIN addition value is converted to “GA”
The value added to “IN” becomes a new “GAIN”.
This value exceeds “GAINMAX” by step ST7.
If so, the processing moves to the processing in FIG. "GAIN
In the case of "MAX" or lower, this new "GAIN" is controlled.
The data is transmitted to the shift register 45 as control data. Further
In step ST8, the new value of “GAIN” is changed to “G
AINMAX-16 ”, that is, almost the middle value of the gain
It is determined whether the distance is greater than the threshold value.
The gain determination process is performed again. On the other hand, the new “GAIN” value
If the value is substantially larger than the intermediate value, “SUBCNT ←
8 "and returning to FIG. 9 to determine the gain. This
The new gain value is larger than the middle value.
The reason for increasing the number of data reads when
This is because the noise component increases as the value increases. At ST5, it is determined that "OV flag exists".
And that “GAIN = GAINMIN”
If confirmed in step ST9, EEP for each camera
The maximum gain value “GAINM” written in the ROM 29
AX ”and the minimum value“ GAINMIN ”
Means that normal processing cannot be performed due to noise or disturbance.
I taste. Then, in this case, the processing shifts to the processing of FIG.
I do. In ST9, "GAIN @ GAIN"
MIN ”is confirmed, then“ GSNG
Lag "is set. This “GSNG flag” is set
Set when the specified gain is inappropriate
Is done. After the “GSNG flag” is set, “GA
A new gain is set as "IN ← GAIN-1".
Under the gain, the gain determination process of FIG. 9 is restarted.
You. While performing the above gain determination processing, ST6
When the processing shifts to the processing of FIG.
Actual distance measurement processing is started using “GAIN”. This fruit
In the distance measurement process, basically, IRED3 is 128 times
It is turned on repeatedly, and each time the distance measurement data AFD1, AF
Read D2. Then, as in the case of the gain determination process
Check whether these values are within the appropriate range
Is done. If the values in the appropriate range are
AFD1 and AFD2 are used when the gain is determined.
"ADSUM1" and "ADSUM1"
2 ". And read the ranging data
When the count “CNT” becomes “0”, the measurement shown in FIG.
The process proceeds to distance calculation processing. By the way, as shown in ST10 of FIG.
In addition, the number of readings of the distance measurement data during the actual distance measurement, "CN
“T” is based on “CNT ← SUBCNT-PRECNT”.
Is restricted. "PRECNT" is shown in FIG.
The gain determination process that has already been performed prior to the actual distance measurement
The number of times the distance measurement data has been read. Accordingly
Read the distance measurement data eight times in the gain determination process
If the distance measurement data has been
The number of readings is 120, shortening the processing time of actual distance measurement.
Can be reduced. Further, as described above, during the gain determination process,
The ranging data obtained for each channel is shown in "ADS
UM1 ”and“ ADSUM2 ”during actual distance measurement
Data is also stored, so data can be read during the gain determination process.
When the total number of times of embedding is counted, it becomes "128" times. As a result,
The number of times of basic distance measurement does not decrease, and the distance measurement accuracy is low.
It won't be. Distance measurement data AFD1, AF during actual distance measurement processing
If the value of D2 is too small, the gain
Similarly, the "UND flag" is set. And big
“OVCNT” is decremented by “1”, even if it has passed.
It is. This “OVCNT” value is set to the initial setting of ST10.
Therefore, since it is set to "16", the distance measurement data
While reading "CNT" times, the distance measurement data AFD
Even if one of AFD2 and AFD2 is an inappropriate value
Up to "15" times are allowed, and the actual distance measurement processing continues
Is done. Reading of the distance measurement data of "CNT" times is completed.
Upon completion, the reciprocal of the subject distance is calculated as shown in FIG.
The required calculation is performed. First, “ADSUM1”, “A
DSUM2 ”and offset values“ OFS1 ”and“ O
FS2 "is performed.
Since the total number of times of reading these data is 128,
The value obtained by multiplying each offset value by 128 is referred to as “ADSUM
1 "and" ADSUM2 ". Subsequently, "ADSUM1", "ADSUM
2 "and the subtraction data" AFD "
IF ”and the ratio“ AFRATIO ”
Can be Next, the reciprocal of the subject distance “INV.LEN” is
Is calculated. In this calculation, the EEPROM 29
The coefficient “ADJ0” stored in the RAM 43 from “A”
DJ1 ”is read. These coefficients are
It is a value appropriately set according to the scientific characteristics. Soshi
Thus, the reciprocal of the subject distance thus obtained, “INV.L
EN ”is input to the CPU 40, and based on this,
The focus position of the lens 5 can be determined. In addition,
“Α” is a constant value that does not depend on individual differences between cameras. FIG. 9 shows the gain determination process and FIGS.
In the process of executing the actual distance measurement process shown in FIG.
AIN = GAINMIN "
When the data AFD1 and AFD2 are too large
Is a high-brightness light incident on PSD 9 and the subject distance
This corresponds to a close distance. Therefore,
As shown in FIG. 12, the value of “INV.LEN”
"∞" is set, and the focus position of the photographing lens 5 is set accordingly.
Is a position suitable for the close distance, and a short distance warning is issued.
You. During the execution of the gain determination process, “AFD1
+ AFD2 ”has not reached the appropriate level,
The value of "GAIN" that I tried to set newly in ST7
The maximum value of the gain set for each camera "GAIN
If "MAX" is exceeded, the incidence of light on PSD9 is extremely high
And it is weak. In this case
Means that the subject distance is extremely far
, Set “0” as the value of “INV.LEN”,
As a result, the focus position of the photographing lens 5 is set for infinity photographing.
Be able to adjust to the position. The present invention has been described with reference to the illustrated embodiment.
Has been described, but a part of the distance measurement program
Improvements and modifications are possible as appropriate.
The number of times the distance measurement data is read repeatedly during actual distance measurement
Can be set as appropriate. Also,
Instead of finally calculating the reciprocal of the subject distance, "AFR
ATIO ”to determine the focusing position of the taking lens 5
You may ask for it. Further, the present invention provides a single IR
Not only those that measure distance with the ED3,
Using three IREDs with different directions, the center of the shooting screen
And the distance measurement light is projected to each of the three places on the left and right sides to measure the distance
It is also possible to use it in such a way. As described above, according to the distance measuring apparatus of the present invention,
If the distance measurement light is projected multiple times after the gain
When performing actual ranging to read digital data,
Digital data read at the time of execution of fixed processing up to actual distance measurement
Save this digital data for actual distance measurement.
The distance measurement light during actual distance measurement.
Lighting and reading of digital data can be reduced
When the actual distance measurement is required without lowering the distance measurement accuracy
The time can be shortened.

【図面の簡単な説明】 【図1】オートフォーカスIC及びマイクロコンピュー
タの概略構成を示すブロック図である。 【図2】本発明を用いたカメラの概略図である。 【図3】制御データ格納用のシフトレジスタの概念図で
ある。 【図4】端末機接続時の調整モードの処理を示すフロー
チャートである。 【図5】測距プログラムの基本処理を示すフローチャー
トである。 【図6】オフセット値検出処理を示すフローチャサート
である。 【図7】制御データ送信及び測距データの読み込みの様
子を示すタイミングチャートである。 【図8】測距データ読み込み処理を示すフローチャート
である。 【図9】ゲイン決定処理の一部を示すフローチャートで
ある。 【図10】ゲイン決定処理の他の一部を示すフローチャ
ートである。 【図11】実測距処理を示すフローチャートである。 【図12】被写体距離の逆数算出処理を示すフローチャ
ートである。 【符号の説明】 2 投光部 3 IRED 5 撮影レンズ 9 PSD 12 オートフォーカスIC 14 マイクロコンピュータ 14a 接続端子 28 端末機 29 EEPROM 31a,31b ゲインコントロール回路 32a,32b サンプルホールド回路 42 ROM 43 RAM
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram showing a schematic configuration of an autofocus IC and a microcomputer. FIG. 2 is a schematic diagram of a camera using the present invention. FIG. 3 is a conceptual diagram of a shift register for storing control data. FIG. 4 is a flowchart showing a process in an adjustment mode when a terminal is connected. FIG. 5 is a flowchart showing basic processing of a distance measurement program. FIG. 6 is a flowchart illustrating an offset value detection process. FIG. 7 is a timing chart showing how control data is transmitted and distance measurement data is read. FIG. 8 is a flowchart showing distance measurement data reading processing. FIG. 9 is a flowchart showing a part of a gain determination process. FIG. 10 is a flowchart illustrating another part of the gain determination process. FIG. 11 is a flowchart showing actual distance measurement processing. FIG. 12 is a flowchart showing a process of calculating the reciprocal of a subject distance. [Description of Signs] 2 Projection unit 3 IRED 5 Photographing lens 9 PSD 12 Autofocus IC 14 Microcomputer 14a Connection terminal 28 Terminal 29 EEPROM 31a, 31b Gain control circuit 32a, 32b Sample hold circuit 42 ROM 43 RAM

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G01C 3/06 G02B 7/32 G03B 13/36 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G01C 3/06 G02B 7/32 G03B 13/36

Claims (1)

(57)【特許請求の範囲】 【請求項1】 被写体に測距光を投光してその反射光を
受光素子で受け、その入射位置に対応して受光素子の一
対の出力端子から出力される光電信号をそれぞれデジタ
ル変換するとともに、これらのデジタルデータが所定範
囲の値となるように前記出力端子にそれぞれ接続された
ゲインコントロール回路のゲインを決定し、かつこの決
定されたゲインのもとでは前記各デジタルデータを加算
した値が一定値以上のときには測距光の投光を繰り返し
N回行って各デジタルデータを逐次読み込む実測距を行
い、この実測距により得られたデジタルデータに基づい
て測距演算を行って撮影レンズのピント合わせ位置を決
定するようにしたカメラ用測距装置において、 前記ゲインコントロール回路のゲインを決定する際に各
チャンネルごとに得られたP個のデジタルデータを保存
しておくとともに、実測距時の測距光の投光回数をN−
P回にしてデジタルデータの読み込みを行い、かつ実測
距で得られたデジタルデータと前記保存されたデジタル
データとを加算して前記測距演算に用いるようにしたこ
とを特徴とするカメラ用測距装置。
(57) [Claim 1] Distance measuring light is projected on a subject, the reflected light is received by a light receiving element, and output from a pair of output terminals of the light receiving element corresponding to the incident position. Each of the photoelectric signals is digitally converted, and the gains of the gain control circuits respectively connected to the output terminals are determined so that the digital data has a value within a predetermined range, and under the determined gains, When the value obtained by adding the digital data is equal to or more than a certain value, actual distance measurement is performed by repeating the projection of the distance measuring light N times to sequentially read each digital data, and measuring based on the digital data obtained by the actual distance measurement. In a camera distance measuring apparatus which determines a focusing position of a photographing lens by performing a distance calculation, each channel is determined when a gain of the gain control circuit is determined. In addition to storing P digital data obtained for each channel, the number of times the distance measuring light is projected during actual distance measurement is set to N-
A digital distance measuring means for reading the digital data in P times and adding the digital data obtained by actual distance measurement and the stored digital data to use in the distance measurement calculation; apparatus.
JP4881294A 1994-03-18 1994-03-18 Camera ranging device Expired - Fee Related JP3377283B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4881294A JP3377283B2 (en) 1994-03-18 1994-03-18 Camera ranging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4881294A JP3377283B2 (en) 1994-03-18 1994-03-18 Camera ranging device

Publications (2)

Publication Number Publication Date
JPH07260476A JPH07260476A (en) 1995-10-13
JP3377283B2 true JP3377283B2 (en) 2003-02-17

Family

ID=12813627

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4881294A Expired - Fee Related JP3377283B2 (en) 1994-03-18 1994-03-18 Camera ranging device

Country Status (1)

Country Link
JP (1) JP3377283B2 (en)

Also Published As

Publication number Publication date
JPH07260476A (en) 1995-10-13

Similar Documents

Publication Publication Date Title
US5148211A (en) Stabilized range finder for use with an electronically controlled camera
US20010004271A1 (en) Digital camera and method of controlling the same
US6351606B1 (en) Electronic camera, method for detecting obstruction to electronic flash and method for correcting exposure level
US7145602B2 (en) Exposure control method for digital camera
US4700225A (en) Method and apparatus for testing pattern of a printed circuit board
USRE35652E (en) Object distance detecting apparatus
JPH0534585A (en) Distance measuring device
JP3377283B2 (en) Camera ranging device
US5257060A (en) Autofocus camera and a method of regulating the same
EP1437583A1 (en) Illuminance calibrating method of illuminator; controller and calibrating program of the illuminator
US6614509B2 (en) Distance measuring apparatus
JP3408310B2 (en) Camera ranging device
JP2641820B2 (en) Distance measurement method
US5386263A (en) Method and apparatus for rangefinding
JP2574189B2 (en) Camera ranging device
KR101044941B1 (en) Auto focus device and method using light source
JP3090150B2 (en) Active distance measurement method
JP3075362B2 (en) Active distance measurement method
JP2609333B2 (en) Distance measuring device
JP2675671B2 (en) Active distance measuring method
JP4639518B2 (en) Flash control device and camera system
US20250264326A1 (en) Three-dimensional shape measurement device and three-dimensional shape measurement method
JP2609334B2 (en) Distance measuring device
JPH03276010A (en) Range finder
JP4289382B2 (en) Monitoring device and imaging device.

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 5

Free format text: PAYMENT UNTIL: 20071206

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 5

Free format text: PAYMENT UNTIL: 20071206

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081206

Year of fee payment: 6

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 6

Free format text: PAYMENT UNTIL: 20081206

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091206

Year of fee payment: 7

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101206

Year of fee payment: 8

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 8

Free format text: PAYMENT UNTIL: 20101206

FPAY Renewal fee payment (prs date is renewal date of database)

Year of fee payment: 9

Free format text: PAYMENT UNTIL: 20111206

LAPS Cancellation because of no payment of annual fees