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
JP2663493B2 - Focus detection device - Google Patents
[go: Go Back, main page]

JP2663493B2 - Focus detection device - Google Patents

Focus detection device

Info

Publication number
JP2663493B2
JP2663493B2 JP8360288A JP8360288A JP2663493B2 JP 2663493 B2 JP2663493 B2 JP 2663493B2 JP 8360288 A JP8360288 A JP 8360288A JP 8360288 A JP8360288 A JP 8360288A JP 2663493 B2 JP2663493 B2 JP 2663493B2
Authority
JP
Japan
Prior art keywords
shift
line sensor
focus detection
determined
mode
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
JP8360288A
Other languages
Japanese (ja)
Other versions
JPH01254909A (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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP8360288A priority Critical patent/JP2663493B2/en
Publication of JPH01254909A publication Critical patent/JPH01254909A/en
Application granted granted Critical
Publication of JP2663493B2 publication Critical patent/JP2663493B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)

Description

【発明の詳細な説明】 「産業上の利用分野」 本発明は、CCD等複数の光電変換素子から成るライン
センサを用いた焦点検出装置に関する。
The present invention relates to a focus detection device using a line sensor including a plurality of photoelectric conversion elements such as a CCD.

「従来の技術」 CCD等複数の光電変換素子から成る光電変換素子のラ
インセンサを用いた焦点検出装置は、現在一眼レフレッ
クスカメラの自動焦点調節装置等で実現されている。
2. Description of the Related Art A focus detection device using a line sensor of a photoelectric conversion element including a plurality of photoelectric conversion elements such as a CCD is currently realized by an automatic focus adjustment device of a single-lens reflex camera.

従来のこの様な焦点検出装置としては、例えば第20図
に示すようなものがある。
FIG. 20 shows an example of such a conventional focus detection device.

すなわち、焦点検出装置は、対物レンズ100の後に配
置された光学手段110と、光学手段110で処理された被写
体光を受ける複数の光電変換素子から成るラインセンサ
120と、ラインセンサ120を制御する蓄積時間コントロー
ル手段130と、ラインセンサ120の出力を処理するA/Dコ
ンバータ140と、A/Dコンバータ140の出力を記憶するメ
モリ150と、メモリ150の記憶に基づき演算を行なう演算
手段160とから構成されている。
That is, the focus detection device is a line sensor including an optical unit 110 disposed after the objective lens 100 and a plurality of photoelectric conversion elements that receive subject light processed by the optical unit 110.
120, an accumulation time control means 130 for controlling the line sensor 120, an A / D converter 140 for processing the output of the line sensor 120, a memory 150 for storing the output of the A / D converter 140, and a storage for the memory 150. And an arithmetic means 160 for performing an arithmetic operation based on this.

そして、対物レンズ100による光像を光学手段110によ
ってラインセンサ120上に投影し、この投影された光像
の状態に基づいて対物レンズ100の焦点調節状態を検出
している。
Then, the optical image from the objective lens 100 is projected onto the line sensor 120 by the optical means 110, and the focus adjustment state of the objective lens 100 is detected based on the state of the projected optical image.

この焦点検出装置の動作は 蓄積時間コントロール手段130の制御によりラインセ
ンサ120はある時間だけ蓄積を行う。
In the operation of this focus detection device, the line sensor 120 performs accumulation for a certain time under the control of the accumulation time control means 130.

ラインセンサ120の出力をA/Dコンバータ140が所定の
Nビットのデジタル値に変換する。
The A / D converter 140 converts the output of the line sensor 120 into a predetermined N-bit digital value.

該Nビットのデジタル値をメモリ150に記憶する。The N-bit digital value is stored in the memory 150.

メモリ150に格納されたNビットのデジタル値に基づ
いて対物レンズ100の焦点調節状態を演算手段160が演算
する。
The calculation means 160 calculates the focus adjustment state of the objective lens 100 based on the N-bit digital value stored in the memory 150.

という具合に行われる。It is performed in such a manner.

ここでラインセンサ120の蓄積時間は、蓄積時間コン
トロール手段130により、被写体の輝度が高い時は短時
間に、被写体の輝度が低い時は長時間に設定され、ライ
ンセンサ120の出力がA/Dコンバータ140の分解能力であ
るNビットのダイナミックレンジに対してオーバーフロ
ーとなったり、非常に低いレベルにならないで適当なレ
ベルに収まる様にコントロールされる。
Here, the accumulation time of the line sensor 120 is set by the accumulation time control means 130 to a short time when the luminance of the subject is high, and to a long time when the luminance of the subject is low, and the output of the line sensor 120 is set to A / D. The resolution is controlled so as not to overflow the N-bit dynamic range, which is the resolution capability of the converter 140, or to fall within an appropriate level without becoming a very low level.

そして従来の技術では、A/Dコンバータ140は8ビット
のものを使用し、メモリ150も同じ8ビットにするのが
一般的である。
In the prior art, the A / D converter 140 generally uses an 8-bit A / D converter, and the memory 150 generally uses the same 8-bit.

「発明が解決しようとする課題」 しかしながら上記8ビットを基準とした従来の技術で
は、蓄積時間のみ被写体の輝度に対応すると限界が早く
来てしまい、より高度な撮影をするには限界がある。
[Problem to be Solved by the Invention] However, in the conventional technique based on the above-mentioned 8 bits, the limit comes earlier if only the accumulation time corresponds to the luminance of the subject, and there is a limit in performing more advanced shooting.

例えば写真の被写体の輝度は高い物でEv20以上、低い
物でEv1程度であり、今Ev1の被写体に対して蓄積時間が
400ms要したとするとEv20の被写体の時の蓄積時間は、4
00ms÷219≒760nsとなってしまうが、この様な短い蓄積
のコントロールは回路的に非常に困難である。
For example, the brightness of a subject in a photograph is higher than Ev20 for a high object and about Ev1 for a low object.
If it took 400ms, the storage time for an Ev20 subject would be 4
00 ms ÷ 2 19 ≒ 760 ns, but control of such a short accumulation is very difficult in terms of circuitry.

そこで第1図におけるラインセンサ120とA/Dコンバー
タ140との間に可変ゲインアンプを挿入してラインセン
サの出力を落して対応する事も考えられるが、回路規模
が拡大するのでボディスペースが非常に限られているカ
メラでは実装に関して不利であり、現実的でないという
問題点があった。
Therefore, it is conceivable to insert a variable gain amplifier between the line sensor 120 and the A / D converter 140 in FIG. 1 to reduce the output of the line sensor to cope with the problem. However, there is a problem in that a camera which is limited to the above is disadvantageous in terms of implementation and is not realistic.

本発明は上記のような従来の問題点に鑑みてなされた
ものであり、回路規模の拡大を供なわずにより高輝度の
被写体に対しても焦点検出を可能とする焦点検出装置を
提供することを目的としている。
The present invention has been made in view of the above-described conventional problems, and provides a focus detection device that can perform focus detection even on a high-luminance subject without increasing the circuit scale. It is an object.

「課題を解決するための手段」 上記目的を達成するための本発明の要旨とするところ
は、 複数の光電変換素子から成るラインセンサと、対物レ
ンズによる被写体の光像を前記ラインセンサ上へ投影す
る光学手段と、前記ラインセンサの複数の出力をMビッ
トのデジタル値に変換するA/Dコンバータと、前記A/Dコ
ンバータが出力するMビットのデジタル値からMビット
より小さいNビットのデジタル値を抽出するデータ処理
手段と、前記データ処理手段が抽出したNビットのデジ
タル値を記憶するメモリと、前記メモリ内の複数のNビ
ットのデジタル値に基づいて前記対物レンズの焦点状態
を演算する演算手段とを備え、前記データ処理手段は、
Mビットのデジタル値からNビットのデジタル値を抽出
する範囲を可変にすることを特徴とする焦点検出装置に
存する。
Means for Solving the Problems The gist of the present invention to achieve the above object is to project a light image of a subject by a line sensor including a plurality of photoelectric conversion elements and an objective lens onto the line sensor. An A / D converter for converting a plurality of outputs of the line sensor into an M-bit digital value; and an N-bit digital value smaller than M bits from the M-bit digital value output by the A / D converter. A memory for storing the N-bit digital value extracted by the data processing means, and a calculation for calculating the focus state of the objective lens based on the plurality of N-bit digital values in the memory Means, the data processing means,
A focus detection apparatus characterized in that a range for extracting an N-bit digital value from an M-bit digital value is made variable.

「作用」 焦点調節動作の大きな流れは次のとおりである。[Operation] The major flow of the focus adjustment operation is as follows.

対物レンズによる被写体の光像が光学手段によりライ
ンセンサ上へ投影され、ラインセンサは蓄積時間コント
ロール手段で蓄積時間を制御されながら複数の光電変換
素子から複数の出力をA/Dコンバータに出力し、A/Dコン
バータはこの出力をMビットのデジタル値に変換する。
The optical image of the object by the objective lens is projected onto the line sensor by the optical means, and the line sensor outputs a plurality of outputs from the plurality of photoelectric conversion elements to the A / D converter while controlling the accumulation time by the accumulation time control means, The A / D converter converts this output into an M-bit digital value.

A/Dコンバータの出力はデータ処理手段で処理されて
Nビットのデジタル信号となり、この信号の複数のデジ
タル値はメモリに格納され、演算手段はメモリ内の複数
のデジタル値に基づいて対物レンズの焦点調節状態を検
出する。
The output of the A / D converter is processed by data processing means into an N-bit digital signal, a plurality of digital values of this signal are stored in a memory, and a calculating means operates the objective lens based on the plurality of digital values in the memory. The focus adjustment state is detected.

上記流れのなかで、データ処理手段は次のように動作
する。
In the above flow, the data processing means operates as follows.

被写体の輝度が高くてラインセンサの蓄積時間が所定
の蓄積時間よりも短くなると、A/DコンバータではNビ
ットを越える桁までの情報が処理される。
If the accumulation time of the line sensor is shorter than the predetermined accumulation time due to the high luminance of the subject, the A / D converter processes information up to a digit exceeding N bits.

そこで、データ処理手段は、A/Dコンバータが出力す
るMビットのデジタル値よりNビットを抽出し、メモリ
にはこのNビットのデジタル値が格納される。
Therefore, the data processing means extracts N bits from the M-bit digital value output from the A / D converter, and the memory stores the N-bit digital value.

このようにラインセンサの出力に基づきNビットのデ
ジタル値と演算手段が焦点検出演算を行う焦点検出装置
ではあるが、ラインセンサのアナログ出力をデジタル値
化するのにNビットより大きいMビットを処理するA/D
コンバータを使用することにより、NビットのA/Dコン
バータ使用時に比べて2(M-N)倍のダイナミックレンジを
有することになる。
As described above, the focus detection device in which the N-bit digital value and the calculating means perform the focus detection calculation based on the output of the line sensor, processes M bits larger than N bits to convert the analog output of the line sensor into a digital value. A / D
By using the converter, the dynamic range is 2 (MN) times as large as that when using the N-bit A / D converter.

したがって、最短蓄積時間が同じであればNビットの
A/Dコンバータ使用時よりも焦点検出可能な被写体輝度
を(M−N)段高くする事ができ、しかも焦点検出演算
はNビットのデータを用いるので従来と同程度のメモリ
領域,演算規模で済む。
Therefore, if the shortest accumulation time is the same, N bits
It is possible to raise the subject brightness (MN) steps that can detect focus compared to when the A / D converter is used, and since the focus detection calculation uses N-bit data, the same memory area and calculation scale as the conventional one can be used. I'm done.

「実施例」 以下、図面に基づき本発明の各種実施例を説明する。Hereinafter, various embodiments of the present invention will be described with reference to the drawings.

第1図〜第15図は本発明の第1実施例を説明する図で
ある。
1 to 15 are views for explaining a first embodiment of the present invention.

第1実施例は、ラインセンサの出力に基づき演算手段
が8ビットのデジタル値で焦点検出演算を行うものであ
り、A/Dコンバータには10ビットのものを用いたもので
ある。
In the first embodiment, the calculation means performs focus detection calculation with an 8-bit digital value based on the output of the line sensor, and a 10-bit A / D converter is used.

すなわち、第1図に示すように、焦点検出装置は、対
物レンズ100の後に配置された光学手段110と、光学手段
110で処理された被写体光を受ける複数の光電変換素子
から成るラインセンサ120と、ラインセンサ120を制御す
る蓄積時間コントロール手段130と、ラインセンサ120の
出力を10ビットのデジタル値に変換するA/Dコンバータ1
40と、A/Dコンバータ140の10ビットの出力を処理するデ
ータ処理手段170と、データ処理手段170で処理されて8
ビットとなった複数のデジタル値を記憶するメモリ150
と、メモリ150の記憶に基づき演算を行なう演算手段160
とから構成されている。
That is, as shown in FIG. 1, the focus detection device includes an optical unit 110 disposed after the objective lens 100, and an optical unit 110.
A line sensor 120 including a plurality of photoelectric conversion elements that receive the subject light processed by 110; an accumulation time control unit 130 that controls the line sensor 120; and an A / A that converts the output of the line sensor 120 into a 10-bit digital value. D converter 1
40, a data processing means 170 for processing the 10-bit output of the A / D converter 140, and 8 data processed by the data processing means 170.
Memory 150 for storing a plurality of bit-valued digital values
Operation means 160 for performing an operation based on the storage of the memory 150
It is composed of

蓄積時間コントロール手段130は、10ビットA/Dコンバ
ータ140によってデジタル値に変換されたラインセンサ1
20の各々に光電変換素子の出力の内で最大値を示す値が
10ビットのダイナミックレンジに対して1/8の値、つま
り10進数に直して1023に対し128となるようにラインセ
ンサ120の蓄積時間を制御するものである。
The accumulation time control means 130 is a line sensor 1 converted to a digital value by the 10-bit A / D converter 140.
The value indicating the maximum value among the outputs of the photoelectric conversion elements is
The accumulation time of the line sensor 120 is controlled so that the value becomes 1/8 with respect to the 10-bit dynamic range, that is, it becomes 128 with respect to 1023 in a decimal number.

データ処理手段170は10ビットのデジタル値を取り込
み、被写体の明るさを検出してその検出出力に応じて10
ビットのデジタル値に対し下位方向への桁シフトを行う
処理や、10ビットのデジタル値の内の下位8ビットを抽
出する機能を持つものである。
The data processing means 170 takes in a 10-bit digital value, detects the brightness of the subject, and
It has a function of shifting the digit of the bit digital value in the lower direction and extracting the lower 8 bits of the 10-bit digital value.

具体的には、被写体の輝度があまり高くないと検出さ
れた時には第3図〜第5図に示すようなシフト0モード
となり、ラインセンサ120の出力が第4図に示すように1
0ビットのダイナミックレンジに対し下位8ビット内に
収まる、つまり10進数に直して1023に対し255以内に収
まると判断された時は、下位方向への桁シフトは行わず
に第3図に示すように下位8ビットを抽出して、第5図
に示す様な8ビットの出力としてメモリ150に格納する
ものである。
Specifically, when it is detected that the brightness of the subject is not too high, the shift to the shift 0 mode as shown in FIGS. 3 to 5 is performed, and the output of the line sensor 120 becomes 1 as shown in FIG.
When it is determined that the dynamic range of 0 bits falls within the lower 8 bits, that is, converted to a decimal number and falls within 255 with respect to 1023, no digit shift is performed in the lower direction, as shown in FIG. The lower 8 bits are extracted and stored in the memory 150 as an 8-bit output as shown in FIG.

そして被写体輝度が高いと検出された時には第6図〜
第8図に示すシフト1モードとなり、ラインセンサ120
の蓄積時間が蓄積時間コントロール手段130の制御可能
な時間の範囲内である所定最短時間となってもラインセ
ンサ120の出力が第7図に示すように10ビットのダイナ
ミックレンジに対して下位8ビットには収まらずにさら
に1つ上位のビットにまで及ぶ場合、つまり10進数に直
して1023に対し255では収まらないが511には収まると判
断された場合は10ビットのデータを下位方向へ一回桁シ
フトして下位8ビットを抽出する、 つまり第6図に示す部分の8ビットを抽出する事によ
り、第8図に示す様な8ビットの出力としてメモリ150
に格納するものである。
When it is detected that the subject brightness is high, FIGS.
The shift 1 mode shown in FIG.
Even if the accumulation time is a predetermined minimum time within the controllable time of the accumulation time control means 130, as shown in FIG. If it does not fit in and goes to the next higher bit, that is, if it is converted to a decimal number and it does not fit in 255 for 1023, but it is determined to fit in 511, the 10-bit data is transferred once in the lower direction By extracting the lower 8 bits by shifting the digit, that is, by extracting the 8 bits of the portion shown in FIG. 6, the memory 150 is output as an 8-bit output as shown in FIG.
Is to be stored.

さらに被写体輝度が高いと検出された時には第9図〜
第11図に示すシフト2モードとなり、ラインセンサ120
の蓄積時間が上記最短時間となった時のラインセンサの
出力が第10図に示すように10ビットのダイナミックレン
ジに対して下位8ビットには収まらずさらに2つ上位で
ある最上位ビットまで及ぶ場合、つまり10進数に直して
1023に対して511では収まらないが1023には収まると判
断された場合は10ビットのデータを下位方向へ2回の桁
シフトを行い下位8ビットを抽出する、 つまり第9図に示す部分の8ビットを抽出する事によ
り第11図に示す様な8ビットの出力としてメモリ150へ
格納するものである。
Further, when it is detected that the subject brightness is high, FIGS.
The shift 2 mode shown in FIG.
As shown in FIG. 10, the output of the line sensor when the accumulation time becomes the shortest time does not fit in the lower 8 bits of the 10-bit dynamic range but extends to the upper 2 bits which are two higher. In other words, convert to decimal
If it does not fit in 1023 but does not fit in 511, but it is determined to fit in 1023, it shifts the 10-bit data two times in the lower direction and extracts the lower 8 bits. The bits are extracted and stored in the memory 150 as an 8-bit output as shown in FIG.

第2図に示すように、シフトモードの切り換えの場合
に、シフト0モードとシフト1モード、シフト1モード
とシフト2モードの範囲が255ビット,512ビットの付近
で重なるよう設定されている。
As shown in FIG. 2, when the shift mode is switched, the ranges of the shift 0 mode and the shift 1 mode, and the shift 1 mode and the shift 2 mode are set so as to overlap around 255 bits and 512 bits.

これは処理値が境界の付近でふらついた時にシフトモ
ードが頻繁に切り換わってしまうのを防ぎ、安定したデ
ータ処理を行うようにヒステリシスを持たせているので
ある。以上、焦点検出装置をハードウェアにより構成し
た例を説明してきたが、次にこの焦点検出装置をマイク
ロコンピュータにより構成した例を説明する。
This is to prevent the shift mode from frequently switching when the processing value fluctuates near the boundary, and to provide hysteresis so as to perform stable data processing. The example in which the focus detection device is configured by hardware has been described above. Next, an example in which the focus detection device is configured by a microcomputer will be described.

次に第1図の焦点検出装置の蓄積時間コントロール手
段130とA/Dコンバータ140とデータ処理手段170とメモリ
150と演算手段160とをマイクロコンピュータにより構成
し、データ処理手段170は第12図〜第15図のフローチャ
ートの如く動作する。(データ処理手段170以外の構成
の動作はすでに公知の方法による。) これらのフローチャートにおいて、FLG(第1図のフ
ラグ設定部170e)は10ビットのデジタル値に対して何回
の下位方向シフトを行うかを示すフラグであり、FLG=
0の時は下位方向シフトは行わず(シフト0モード),F
LG=1の時は下位方向シフトを1回行い(シフト1モー
ド),FLG=2の時は2回の下位方向シフトを行う(シフ
ト2モード)。
Next, the accumulation time control means 130, the A / D converter 140, the data processing means 170, and the memory of the focus detection device shown in FIG.
The data processing means 170 operates as shown in the flowcharts of FIGS. 12 to 15. (The operation of the components other than the data processing means 170 is already performed by a known method.) In these flowcharts, the FLG (the flag setting unit 170e in FIG. 1) performs a number of downward shifts on the 10-bit digital value. FLG =
When 0, no lower shift is performed (shift 0 mode), and F
When LG = 1, the lower shift is performed once (shift 1 mode), and when FLG = 2, the lower shift is performed twice (shift 2 mode).

DATA(10)(第1図のデータ収納レジスタ170a)は10
ビットのA/Dコンバータ140により10ビットのデジタル値
化されたラインセンサ120の出力であり、これら複数のD
ATA(10)の内の最大値がMAX(10)(第1図の最大値メ
モリ170d)である。
DATA (10) (data storage register 170a in FIG. 1) is 10
The output of the line sensor 120, which is converted into a 10-bit digital value by the A / D converter 140,
The maximum value of ATA (10) is MAX (10) (maximum value memory 170d in FIG. 1).

Tsは今回のラインセンサ120の蓄積時間であり、このT
sに基づいて第1図の蓄積時間コントロール手段130はラ
インセンサ120の蓄積時間を制御する。
Ts is the accumulation time of the line sensor 120 this time, and this T
The storage time control means 130 of FIG. 1 controls the storage time of the line sensor 120 based on s.

PEAKは後述する所定値である。 PEAK is a predetermined value described later.

動作は第1図には図示されていないカメラのレリーズ
スイッチの半押し等により第12図ステップ1より開始す
る。最初に初期設定が行われ、FLG=0,PEAK=128,Ts=T
intと設定される(ステップ2,3)。Tintは第一回目の蓄
積時間であり、第2図のラインセンサ120内に設けられ
る被写体の輝度モニタ装置の出力に基づいて設定される
か、あるいは適当なる時間でも良い。
The operation is started from step 1 in FIG. 12 by half-pressing a release switch of a camera not shown in FIG. Initially, initial setting is performed, FLG = 0, PEAK = 128, Ts = T
Int is set (steps 2 and 3). Tint is the first accumulation time, and may be set based on the output of the luminance monitor of the subject provided in the line sensor 120 in FIG. 2, or may be an appropriate time.

続いてMAX(10)を0に設定して(ステップ4)、蓄
積時間コントロール手段130によりラインセンサ120の蓄
積が開始される(ステップ5)。蓄積が終了するとライ
ンセンサ120より各々の画素の出力が時系列的に出力さ
れる。
Subsequently, MAX (10) is set to 0 (step 4), and accumulation of the line sensor 120 is started by the accumulation time control means 130 (step 5). When the accumulation is completed, the output of each pixel is output in time series from the line sensor 120.

各々の画素の出力はまず10ビットA/Dコンバータ140に
より10ビットのデジタル値DATA(10)となり(ステップ
6,7)、続いてこのDATA(10)と前記MAX(10)との比較
(第1図の比較部170bで比較処理)が行われ(ステップ
8)、MAX(10)よりもDATA(10)が大きいと判定され
た時はMAX(10)としてDATA(10)が記憶(第1図の最
大値メモリ170dに記憶)される(ステップ9)。
The output of each pixel is first converted to a 10-bit digital value DATA (10) by the 10-bit A / D converter 140 (step
6, 7), and then the comparison of the DATA (10) with the MAX (10) (comparing process by the comparing unit 170b in FIG. 1) is performed (step 8), and the DATA (10) is compared with the MAX (10). ) Is large, DATA (10) is stored as MAX (10) (stored in the maximum value memory 170d in FIG. 1) (step 9).

次にFLGが0であるか否かを判定し(ステップ10)、
0と判定された場合はステップ14へ進み、DATA(10)の
内下位8ビットを抽出してメモリ150へ格納する。ステ
ップ10でFLGが0でないと判定された時はステップ11へ
進みDATA(10)を下位方向へのシフトを1回行う(下位
方向へのシフトを1回行う事はそのデータを1/2にする
事に相当する)。
Next, it is determined whether or not FLG is 0 (step 10),
If it is determined to be 0, the process proceeds to step 14, where the lower 8 bits of DATA (10) are extracted and stored in the memory 150. If it is determined in step 10 that FLG is not 0, the process proceeds to step 11 where data (10) is shifted once in the lower direction (shifting once in the lower direction halves the data by half). To do that).

次にFLGが1であるか否かの判定を行い(ステップ1
2)、FLG=1と判定されるとステップ14へ進み、ステッ
プ11で下位方向へのシフトを1回行ったデータDATA(1
0)の内の下位8ビットを抽出してメモリ150へ格納す
る。
Next, it is determined whether or not FLG is 1 (step 1).
2) If it is determined that FLG = 1, the process proceeds to step 14, and in step 11, the data DATA (1
The lower 8 bits of (0) are extracted and stored in the memory 150.

ステップ12でFLG=1でないと判定された場合はFLG=
2であるという事でありステップ13へ進む。ステップ13
においてはDATA(10)に対し更にもう1回の下位方向へ
のシフトを行ってからステップ14へ進みDATA(10)の内
の下位8ビットを抽出してメモリ150へ格納する。
If it is determined in step 12 that FLG is not 1, FLG =
2 and go to step 13. Step 13
In step (1), the data (10) is shifted one more time in the lower direction, and then the process proceeds to step 14, where the lower 8 bits of the data (10) are extracted and stored in the memory 150.

ステップ14で10ビットのデジタル値であるDATA(10)
を8ビットのデータに変更しメモリ150に格納する処理
が終了すると次にステップ15へ進みステップ14で処理し
たDATA(10)が時系列的に発生するラインセンサ120の
画素出力の最後に出力されるデータであるか否かを判定
する。
DATA (10) that is a 10-bit digital value in step 14
Is changed to 8-bit data and stored in the memory 150. When the process is completed, the process proceeds to step 15 where DATA (10) processed in step 14 is output at the end of the pixel output of the line sensor 120 generated in time series. It is determined whether or not the data is data.

ここでDATA(10)が最後のデータではないと判定され
るとステップ6に戻り、次に出力されてくる画素出力に
対して前述と同様にA/D変換,データの下位方向シフ
ト,メモリ格納といった動作を行う。ステップ15でDATA
(10)が最後のデータであると判定された時はラインセ
ンサ120のすべての画素のデータがメモリ150に格納され
たという事になりA/D変換等の動作を終了しステップ16
へ進む。
If it is determined that DATA (10) is not the last data, the process returns to step 6, where A / D conversion, data lower-direction shift, and memory storage are performed on the next pixel output in the same manner as described above. Such an operation is performed. DATA in step 15
If it is determined that (10) is the last data, it means that the data of all the pixels of the line sensor 120 has been stored in the memory 150, and the operation such as A / D conversion is terminated.
Proceed to.

この時点ではラインセンサ120の複数の画素の中で最
大の値はMAX(10)として記憶されており、後に説明す
るステップ22ではこのMAX(10)に基づいて次回のライ
ンセンサ120の蓄積時間Tsが計算される。続いてFLGの値
を見て、FLG=0の時は第13図に示すステップ30より始
まるシフト0モードへ、FLG=1の時は第14図に示すス
テップ42より始まるシフト1モードへ、それ以外の時は
第15図に示すステップ49より始まるシフト2モードへそ
れぞれ分岐を行う。
At this point, the maximum value among the plurality of pixels of the line sensor 120 is stored as MAX (10), and in the step 22 described later, the next accumulation time Ts of the line sensor 120 is determined based on this MAX (10). Is calculated. Subsequently, looking at the value of FLG, when FLG = 0, it goes to the shift 0 mode starting from step 30 shown in FIG. 13, and when FLG = 1, it goes to the shift 1 mode starting from step 42 shown in FIG. In other cases, branching is made to the shift 2 mode starting from step 49 shown in FIG.

以後の動作についてはまず第13図に示すシフト0モー
ドの場合について説明する。
The subsequent operation will be described first in the case of the shift 0 mode shown in FIG.

第12図のステップ16でFLG=0と判定されると第13図
のステップ30へ進み、ステップ31で前記MAX(10)が下
位8ビットに収まっているか否かを判定する為にMAX(1
0)が256より小さいか否かを見て、MAX(10)が256より
小さいと判定されるとステップ32へ進み次にMAX(10)
が100より大きいか否かを判定する。
If FLG = 0 is determined in step 16 of FIG. 12, the process proceeds to step 30 of FIG. 13, and in step 31, MAX (1) is determined in order to determine whether or not the MAX (10) is within the lower 8 bits.
If it is determined whether MAX (10) is smaller than 256 by checking whether (0) is smaller than 256 or not, the process proceeds to step 32 and then MAX (10)
Is greater than or equal to 100.

ステップ32でMAX(10)が100より大きいと判定される
とメモリ150に格納されたラインセンサ120の出力に基づ
く焦点検出演算が演算手段160で行われ(ステップ3
4)、100以下であると判定された時は焦点検出は行わな
い。ここでMAX(10)が100以下の時に焦点検出演算を行
わないのは、ラインセンサ120の出力があまり小さいと
精度の高い焦点検出が行えない為である。
If it is determined in step 32 that MAX (10) is greater than 100, the focus detection calculation based on the output of the line sensor 120 stored in the memory 150 is performed by the calculation means 160 (step 3).
4) If it is determined to be 100 or less, focus detection is not performed. The reason why the focus detection calculation is not performed when MAX (10) is 100 or less is that accurate focus detection cannot be performed if the output of the line sensor 120 is too small.

ステップ32でMAX(10)が100以下であると判定される
とステップ33へ進み今回の蓄積時間Tsが最長蓄積時間Tm
axと等しいか否かを判定する。ここでTs=Tmaxであると
いう事は蓄積時間を最長としてもラインセンサ120の出
力が小さくて焦点検出演算ができないという事であるの
でTs=Tmaxと判定された場合は検出不能警告を発して
(ステップ39)、再び蓄積を行う為第12図ステップ21へ
ジャンプする(ステップ41)。
If it is determined in step 32 that MAX (10) is 100 or less, the process proceeds to step 33, where the current accumulation time Ts is set to the longest accumulation time Tm.
Determines whether it is equal to ax. Here, Ts = Tmax means that even if the accumulation time is the longest, the output of the line sensor 120 is small and focus detection calculation cannot be performed. Therefore, if Ts = Tmax is determined, a detection impossible warning is issued ( In step 39), the process jumps to step 21 in FIG. 12 to perform accumulation again (step 41).

ステップ33でTsがTmaxと等しくないと判定された場合
は第12図ステップ22で算出するTsを用いて次回の蓄積を
行えば焦点検出可能となる様なラインセンサ120の出力
が得られる可能性がある為、検出不能警告は発せずに次
回の蓄積を行うべく第12図ステップ21へジャンプする
(ステップ41)。
If it is determined in step 33 that Ts is not equal to Tmax, there is a possibility that the output of the line sensor 120 will be obtained so that focus detection can be performed by performing the next accumulation using Ts calculated in step 22 in FIG. Therefore, the process jumps to step 21 in FIG. 12 to perform the next accumulation without issuing an undetectable warning (step 41).

ステップ31でMAX(10)が256以上と判定された場合は
ラインセンサ120の出力が8ビットのダイナミックレン
ジに対してオーバーフローしてしまっているという事で
あるので焦点検出演算は行わずにステップ35へ進み今回
の蓄積時間Tsが最短蓄積時間Tmin(後述するように回路
が制御可能な最短蓄積時間)と等しいか否かを判定す
る。
If it is determined in step 31 that MAX (10) is 256 or more, it means that the output of the line sensor 120 has overflowed the 8-bit dynamic range. Then, it is determined whether or not the current accumulation time Ts is equal to the shortest accumulation time Tmin (the shortest accumulation time that can be controlled by the circuit as described later).

ここでTs≠Tminと判定された場合は第12図ステップ22
で算出するTsを用いて次回の蓄積を行えば焦点検出可能
となる様なラインセンサ120の出力を得る可能性がある
ので次回の蓄積を行うべく第12図ステップ21へジャンプ
する(ステップ41)。
If it is determined that Ts ≠ Tmin, step 22 in FIG.
If the next accumulation is performed by using the Ts calculated in step (1), there is a possibility that the output of the line sensor 120 that enables focus detection may be obtained. Therefore, the process jumps to step 21 in FIG. 12 to perform the next accumulation (step 41). .

ステップ35でTs=Tminと判定された場合は10ビットの
データに対して下位方向シフトを行わずに下位8ビット
を抽出するシフト0モードでは焦点検出不能であるとし
てFLGの値を変える事によりモードの変更を行う。
If it is determined in step 35 that Ts = Tmin, the focus is not detected in the shift 0 mode in which the lower 8 bits are extracted without performing the lower shift on the 10-bit data. Make changes.

まずステップ36でMAX(10)が512以上であるか否かを
判定し、MAX(10)が512より小さいと判定された場合は
次回に10ビットのデータに対して1回の下位方向シフト
を行うシフト1モードを採用する事により焦点検出が可
能となるとみなし、FLG=1とセットして(ステップ4
0)、次回の蓄積を行うべく第12図ステップ21へジャン
プする(ステップ41)。
First, in step 36, it is determined whether or not MAX (10) is greater than or equal to 512. If it is determined that MAX (10) is smaller than 512, one downward shift is performed next time on 10-bit data. Assuming that the focus detection becomes possible by adopting the shift 1 mode, FLG = 1 is set (step 4).
0), and jump to step 21 in FIG. 12 to perform the next accumulation (step 41).

ステップ36でMAX(10)が512以上と判定された時はシ
フト1モードでも焦点検出は不可能であるのでFLG=2
と設定しシフト2モードを採用する(ステップ37)。
If MAX (10) is determined to be 512 or more in step 36, FLG = 2 because focus detection is impossible even in the shift 1 mode.
And the shift 2 mode is adopted (step 37).

続いてステップ38でMAX(10)が1023と等しいか否か
を判定し、ここでMAX(10)が1023である時は蓄積時間
が最短となってもラインセンサ120のデータが10ビット
のダイナミックレンジをオーバーフローしてしまってい
る事を表わしているので検出不能警告を発して(ステッ
プ39)、次回の蓄積を行うべく第12図ステップ21へジャ
ンプする(ステップ41)。
Subsequently, in step 38, it is determined whether or not MAX (10) is equal to 1023. If MAX (10) is 1023, the data of the line sensor 120 is a 10-bit dynamic even if the accumulation time is the shortest. Since it indicates that the range has overflowed, an undetectable warning is issued (step 39), and the process jumps to step 21 in FIG. 12 to perform the next accumulation (step 41).

ステップ38でMAX(10)が1023と等しくないと判定さ
れれば次回の蓄積で焦点検出可能である様なラインセン
サ120の出力が得られる可能性があるので、検出不能警
告は発せずに次回の蓄積を行うべく第12図ステップ21へ
ジャンプする。
If it is determined in step 38 that MAX (10) is not equal to 1023, there is a possibility that the output of the line sensor 120 that can detect the focus in the next accumulation may be obtained. Jump to step 21 in FIG.

尚、シフト0モードのステップ31,32,35,36が第1図
の演算可不可判定部170fに対応している。
Steps 31, 32, 35, and 36 in the shift 0 mode correspond to the calculation possible / impossible determination section 170f in FIG.

次に第14図を用いてシフト1モードの場合の動作を説
明する。
Next, the operation in the shift 1 mode will be described with reference to FIG.

第12図ステップ18でFLG=1と判定されると第14図の
ステップ42へジャンプし、ステップ43でMAX(10)が512
以上か否かを判定する。
If it is determined in step 18 in FIG. 12 that FLG = 1, the process jumps to step 42 in FIG. 14, and in step 43, MAX (10) becomes 512
It is determined whether or not this is the case.

ステップ43でMAX(10)が512以上と判定された場合は
10ビットのデータを下位方向に1回シフトして下位8ビ
ットを抽出したデータが8ビットのダイナミックレンジ
に収まっていない事を意味するのでシフト2モードを採
用する為にFLG=2と設定し(ステップ46)第12図ステ
ップ21へジャンプして(ステップ48)次回の蓄積を行
う。
If MAX (10) is determined to be 512 or more in step 43
Since it means that the data obtained by shifting the 10-bit data once in the lower direction and extracting the lower 8 bits is not within the dynamic range of 8 bits, FLG = 2 is set to adopt the shift 2 mode ( Step 46) Jump to Step 21 in FIG. 12 (Step 48) to perform the next accumulation.

ステップ43でMAX(10)が512より小さいと判定された
時はステップ44へ進みMAX(10)が200より大きいか否か
を判定し、MAX(10)が200より大きいと判定された時は
メモリ150に格納されたラインセンサ120の出力に基づく
焦点検出演算を演算手段160で行う(ステップ45)。
When it is determined in step 43 that MAX (10) is smaller than 512, the process proceeds to step 44, where it is determined whether MAX (10) is larger than 200. When MAX (10) is determined to be larger than 200, The calculation means 160 performs a focus detection calculation based on the output of the line sensor 120 stored in the memory 150 (step 45).

ステップ44でMAX(10)が200以下の時は焦点検出演算
は行わずにステップ47でFLG=0に設定し、次回の蓄積
を行うべく第12図ステップ21へジャンプする。
If MAX (10) is 200 or less in step 44, the focus detection calculation is not performed and FLG = 0 is set in step 47, and the process jumps to step 21 in FIG. 12 to perform the next accumulation.

ここでMAX(10)が200以下の時には焦点検出を行わな
い理由はあまり小さいデータで焦点検出演算を行うと精
度が悪くなる為でありこの様な時はシフト0モードにし
た方が良いのでFLG=0と設定して次回の蓄積を行う。
Here, the reason why focus detection is not performed when MAX (10) is 200 or less is that if focus detection calculation is performed with very small data, accuracy deteriorates. In such a case, it is better to set to shift 0 mode. = 0 is set and the next accumulation is performed.

尚、シフト1モードのステップ43,44が第1図の演算
可不可判定部170fに対応している。
Steps 43 and 44 in the shift 1 mode correspond to the calculation possible / impossible determination section 170f in FIG.

次に第15図を用いてシフト2モードの時の動作を説明
する。
Next, the operation in the shift 2 mode will be described with reference to FIG.

第12図ステップ18でFLG=1ではないと判定されると
第15図のステップ49へジャンプし、ステップ50でMAX(1
0)が1023であるか否かを判定し、1023である時はライ
ンセンサ120の出力が10ビットのダイナミックレンジに
対してオーバーフローしている事になり焦点検出は不可
能なので検出不能警告を発し(ステップ57)第12図ステ
ップ21へジャンプし(ステップ56)次回の蓄積を行う。
If it is determined in step 18 in FIG. 12 that FLG is not 1, the process jumps to step 49 in FIG.
0) is 1023 or not, and when it is 1023, the output of the line sensor 120 has overflowed the 10-bit dynamic range and focus detection is impossible, so a detection impossible warning is issued. (Step 57) Jump to Step 21 in FIG. 12 (Step 56) to perform the next accumulation.

ステップ50でMAX(10)が1023と等しくないと判定さ
れた場合はラインセンサ120の出力が10ビットのダイナ
ミックレンジに収まっているので10ビットのデータを下
位方向に2回シフトして下位8ビットを抽出したデータ
も8ビットのダイナミックレンジに収まっている事にな
り、次にステップ51でMAX(10)が400より大きいと判定
されれば演算手段160で焦点検出演算を行う(ステップ5
2)。
If it is determined in step 50 that MAX (10) is not equal to 1023, the output of the line sensor 120 is within the 10-bit dynamic range, so the 10-bit data is shifted twice in the lower direction to lower 8 bits. Is also within the 8-bit dynamic range, and if it is determined in step 51 that MAX (10) is greater than 400, the focus detection calculation is performed by the calculation means 160 (step 5).
2).

ここでMAX(10)が400以下の時には焦点検出演算を行
わない理由は10ビットのダイナミックレンジで400以下
という事は10ビットのデータを下位方向へ2回のシフト
を行って下位8ビットを抽出したデータでは100以下で
あるという事であり、あまり小さいデータで焦点検出演
算を行うと高い精度の検出が行えない為であり、この様
な時はシフト1モードやシフト0モードにした方が良
い。
Here, when MAX (10) is 400 or less, the reason why focus detection calculation is not performed is that the dynamic range of 10 bits or less is 400 or less. The lower 8 bits are extracted by shifting the 10-bit data twice in the lower direction. In this case, it is less than 100, and if the focus detection calculation is performed with too small data, high-precision detection cannot be performed. In such a case, it is better to use the shift 1 mode or the shift 0 mode. .

そこでステップ51でMAX(10)が400以下と判定された
場合はFLG=1と設定し(ステップ53)ステップ54へ進
み、ステップ54でMAX(10)が200より大きいと判定され
た時は第12図ステップ21へジャンプして(ステップ56)
次回の蓄積を行い、ステップ54でMAX(10)が200以下で
あると判定された場合はシフト0モードを採用し、FLG
=0と設定して(ステップ55)次回の蓄積を行うべく第
12図ステップ21へジャンプする(ステップ56)。
Therefore, if it is determined in step 51 that MAX (10) is 400 or less, FLG = 1 is set (step 53), and the flow advances to step 54. If MAX (10) is determined to be larger than 200 in step 54, 12Jump to step 21 (step 56)
The next accumulation is performed, and if it is determined in step 54 that MAX (10) is 200 or less, the shift 0 mode is adopted and the FLG
= 0 (step 55) to execute the next accumulation.
Jump to step 21 in FIG. 12 (step 56).

尚、シフト2モードのステップ50,51が第1図の演算
可不可判定部170fに対応している。
Steps 50 and 51 in the shift 2 mode correspond to the calculation possible / impossible determination section 170f in FIG.

上記のように、第13図〜第15図に示す各モードにおい
て、前回に得られたラインセンサ120のデータが焦点検
出演算に適さない場合は焦点検出演算に適したラインセ
ンサ120のデータを得るべく再蓄積を行う。
As described above, in each mode shown in FIGS. 13 to 15, when the data of the line sensor 120 obtained last time is not suitable for the focus detection calculation, the data of the line sensor 120 suitable for the focus detection calculation is obtained. Re-accumulation is performed as needed.

すなわち、前記シフト0モード,シフト1モード,シ
フト2モードでラインセンサ120のデータが焦点検出演
算に適さないと判定された時はそれぞれ、第13図ステッ
プ41,第14図ステップ48,第15図ステップ56の動作により
第12図ステップ21へジャンプし再蓄積を行う。
That is, when it is determined that the data of the line sensor 120 is not suitable for the focus detection calculation in the shift 0 mode, the shift 1 mode, and the shift 2 mode, respectively, FIG. 13, step 41, FIG. 14, step 48, and FIG. By the operation in step 56, the process jumps to step 21 in FIG.

第12図のステップ21では、まずこれから行うラインセ
ンサ120の蓄積の時間Tsとして、前回の蓄積によって得
られたラインセンサ120の出力の最大値MAX(10)に基づ
いてステップ22で次回の蓄積時間Tsが計算される。
In step 21 of FIG. 12, first, as the time Ts of the accumulation of the line sensor 120 to be performed, the next accumulation time is determined in step 22 based on the maximum value MAX (10) of the output of the line sensor 120 obtained by the previous accumulation. Ts is calculated.

Tsは次回の蓄積時にMAX(10)が前記所定値PEAKとな
るように計算され、本実施例では前記所定値PEAKを128
としているので、Tsは次の式で求められる。
Ts is calculated so that MAX (10) becomes the predetermined value PEAK at the next accumulation, and in this embodiment, the predetermined value PEAK is set to 128.
Therefore, Ts is obtained by the following equation.

ここで被写体の輝度が非常に低い時は、(1)式で求
められるTsは非常に長い時間となっていしまうが、あま
りに蓄積時間が長いとレスポンスが悪くなったりライセ
ンサの各々の画素で発生する暗電流成分が多くなるなど
の理由により、ある所定の最長時間Tmaxを定め、(1)
式によって計算されたTsが上記Tmaxを越えた場合はTs=
Tmaxと設定する(ステップ23,24)。
Here, when the brightness of the subject is very low, Ts obtained by the equation (1) becomes a very long time. However, if the accumulation time is too long, the response becomes poor or occurs at each pixel of the licensor. For a reason such as an increase in the dark current component, a predetermined maximum time Tmax is determined, and (1)
When Ts calculated by the equation exceeds the above Tmax, Ts =
Tmax is set (steps 23 and 24).

逆に被写体が非常に明るい時は(1)式で求められる
Tsは非常に短い時間となるが、回路を構成する各素子の
遅延時間はマイクロコンピュータの最小実効時間などの
問題の為にあまり短い蓄積時間の制御は不可能である。
そこで制御可能な所定の最短時間Tminを定め、(1)式
で求められたTsがTminよりも小さい時はTs=Tminと設定
する(ステップ25,26)。
On the contrary, when the subject is very bright, it can be obtained by the formula (1).
Although Ts is a very short time, it is impossible to control the accumulation time too short due to problems such as the minimum effective time of the microcomputer for the delay time of each element constituting the circuit.
Therefore, a predetermined controllable minimum time Tmin is determined, and when Ts obtained by the equation (1) is smaller than Tmin, Ts = Tmin is set (steps 25 and 26).

そしてステップ4へ進み、ステップ4以下では前述と
同様に、データシフト,メモリ格納等の動作を行う。
Then, the process proceeds to step 4. In step 4 and subsequent steps, operations such as data shift and memory storage are performed as described above.

前に第2図について、各動作によるシフトモード切り
換えの際、シフト0モードとシフト1モード、シフト1
モードとシフト2モードの範囲を重ねてヒステリシスを
持たせてあることを説明してあるが、このヒステリシス
の幅は第14図ステップ44,第15図ステップ51,54における
MAX(10)と比較する数値で決まり、それぞれ255〜140,
511〜280,255〜140程度の値が望ましい。
Referring to FIG. 2 earlier, when the shift mode is switched by each operation, the shift 0 mode, the shift 1 mode, and the shift 1 mode are changed.
It is explained that the range of the mode and the shift 2 mode are overlapped to provide hysteresis, but the width of this hysteresis is determined by the steps 44 and 44 in FIG. 14 and the steps 51 and 54 in FIG.
Determined by the numerical value to be compared with MAX (10), 255 ~ 140, respectively
Values of about 511-280, 255-140 are desirable.

前述の第1実施例は通常の場合はシフト0モードのみ
とし、蓄積時間が所定の最短時間Tminになった時にMAX
(10)の値によってシフトモードを切り換えた。しかし
蓄積時間の短い時はノイズやラインセンサ120を構成す
る光電素子の残像等の影響が大きくなるので10ビットの
ダイナミックレンジの1/4のみを使用するシフト0モー
ドではS/N比が劣化し焦点検出演算の精度が落ちる可能
性がある。
In the first embodiment described above, only the shift 0 mode is normally used, and when the accumulation time reaches a predetermined minimum time Tmin, the maximum
The shift mode was switched according to the value of (10). However, when the accumulation time is short, the influence of noise and the afterimage of the photoelectric element constituting the line sensor 120 increases, so that the S / N ratio deteriorates in the shift 0 mode using only 1/4 of the 10-bit dynamic range. The accuracy of the focus detection calculation may be reduced.

そこで蓄積時間が最短時間Tminよりも長い所定の蓄積
時間以下となったらシフトモードを切り換えるようにし
た第2実施例を次に説明する。
Therefore, a second embodiment in which the shift mode is switched when the accumulation time becomes equal to or shorter than a predetermined accumulation time longer than the shortest time Tmin will be described below.

第2実施例のブロック構成は第1図に示す第1実施例
と同じである。
The block configuration of the second embodiment is the same as that of the first embodiment shown in FIG.

第16図に示すように、シフトモードの蓄積時間Tsによ
る切り換えはTmin=10μs,Ta=30μ,Tb=90μsとして
あるが、このようにシフト0モードとシフト1モードで
重なる部分、つまりTaとTbの間を適当に取る事によりヒ
ステリシスを持たせ、シフトモードの切り換わる境界で
不安定とならないようにしてある。
As shown in FIG. 16, the switching of the shift mode by the accumulation time Ts is Tmin = 10 μs, Ta = 30 μ, and Tb = 90 μs. As described above, the overlap between the shift 0 mode and the shift 1 mode, that is, Ta and Tb The hysteresis is provided by appropriately taking a time interval between the shift modes so as not to become unstable at the boundary where the shift mode is switched.

第2実施例の焦点検出装置をマイクロコンピュータで
構成した時のマイクロコンピュータの動作を第1実施例
の第12図を援用し、さらに第17図〜第19図のフローチャ
ートを用いて説明する。
The operation of the microcomputer when the focus detection device of the second embodiment is constituted by a microcomputer will be described with reference to FIG. 12 of the first embodiment and further with reference to the flowcharts of FIGS.

まず第12図ステップ1〜26は前述の第1実施例と同じ
なので省略する。
First, steps 1 to 26 in FIG. 12 are the same as those in the above-described first embodiment, and will not be described.

次にシフト0モード時の動作を第17図により説明す
る。
Next, the operation in the shift 0 mode will be described with reference to FIG.

第12図ステップ16でFLG=0と判定されると第17図の
ステップ30へ進み、ステップ58で前記MAX(10)が下位
8ビットに収まっているか否かを判定する為にMAX(1
0)が256より小さいか否かをみて、MAX(10)が256より
小さいと判定されるとステップ59へ進み次にMAX(10)
が100より大きいか否かを判定する。
If FLG = 0 is determined in step 16 in FIG. 12, the process proceeds to step 30 in FIG. 17, and in step 58, MAX (1) is determined in order to determine whether or not the MAX (10) is within the lower 8 bits.
If MAX (10) is determined to be smaller than 256 by checking whether (0) is smaller than 256 or not, the process proceeds to step 59 and then MAX (10)
Is greater than or equal to 100.

ステップ59でMAX(10)が100より大きいと判定される
とステップ62で今回の蓄積時間Tsが所定の蓄積時間Ta
(Ta>Tmin)より小さいか否かを判定し、Ts<Taでない
と判定された時はメモリ150に格納されたラインセンサ1
20の出力に基づく焦点検出演算が演算手段160で行われ
る(ステップ63)。
If it is determined in step 59 that MAX (10) is greater than 100, in step 62, the current accumulation time Ts is set to the predetermined accumulation time Ta.
(Ta> Tmin) is determined, and if Ts <Ta is not determined, the line sensor 1 stored in the memory 150 is determined.
The focus detection calculation based on the output of 20 is performed by the calculation means 160 (step 63).

ステップ62でTs<Taであると判定された時は前述の様
にノイズや残像等によりシフト0モードでは焦点検出に
不適当であると判断し焦点検出演算は行わず後述するス
テップ65へ進む。
If it is determined in step 62 that Ts <Ta, as described above, it is determined that the shift 0 mode is inappropriate for focus detection due to noise, afterimages, and the like, and the flow proceeds to step 65 described below without performing focus detection calculation.

ステップ59でMAX(10)が100以下であると判定される
と焦点検出演算は行わずにステップ60へ進む。ここでMA
X(10)が100以下の時に焦点検出演算を行わないのは、
ラインセンサ120の出力があまり小さいと精度の高い焦
点検出が行えない為である。
If it is determined in step 59 that MAX (10) is 100 or less, the flow proceeds to step 60 without performing the focus detection calculation. Here MA
The reason why the focus detection calculation is not performed when X (10) is 100 or less is
This is because if the output of the line sensor 120 is too small, accurate focus detection cannot be performed.

ステップ60では今回の蓄積時間Tsが前記最長蓄積時間
Tmaxと等しいか否かを判定する。ここでTs=Tmaxである
という事は蓄積時間を最長としてもラインセンサ120の
出力が小さくて焦点検出演算ができないという事である
のでTs=Tmaxと判定された場合は検出不能警告を発して
(ステップ61)、再び蓄積を行う為第12図ステップ21へ
ジャンプする(ステップ66)。
In step 60, the current accumulation time Ts is the longest accumulation time.
It is determined whether it is equal to Tmax. Here, Ts = Tmax means that even if the accumulation time is the longest, the output of the line sensor 120 is small and focus detection calculation cannot be performed. Therefore, if Ts = Tmax is determined, a detection impossible warning is issued ( Step 61), and jump to step 21 in FIG. 12 to store again (step 66).

ステップ60でTsがTmaxと等しくないと判定された場合
は第12図ステップ22で算出するようTsを用いて次回の蓄
積を行えば焦点検出可能となる様なラインセンサ120の
出力が得られる可能性がある為、検出不能警告は発せず
に次回の蓄積を行うべく第12図ステップ21へジャンプす
る(ステップ66)。
If it is determined in step 60 that Ts is not equal to Tmax, the output of the line sensor 120 can be obtained such that the focus can be detected by performing the next accumulation using Ts as calculated in step 22 in FIG. Therefore, the process jumps to step 21 in FIG. 12 to perform the next accumulation without issuing an undetectable warning (step 66).

ステップ58でMAX(10)が256以上と判定された場合は
ラインセンサ120の出力が8ビットのダイナミックレン
ジに対してオーバーフローしてしまっている事であるの
で焦点検出演算は行わずにステップ64へ進み今回の蓄積
時間Tsが所定の蓄積時間Ta(Ta>Tmin)より小さいか否
かを判定する。
If it is determined in step 58 that MAX (10) is 256 or more, it means that the output of the line sensor 120 has overflowed the 8-bit dynamic range, and the flow advances to step 64 without performing the focus detection calculation. It is determined whether the current accumulation time Ts is shorter than a predetermined accumulation time Ta (Ta> Tmin).

ここでTs<Taではないと判定された場合は第12図ステ
ップ22で算出するTsを用いて次回の蓄積を行えば焦点検
出可能となる様なラインセンサ120の出力を得る可能性
があるので次回の蓄積を行うべく第12図ステップ21へジ
ャンプする(ステップ66)。
Here, if it is determined that Ts <Ta is not satisfied, there is a possibility that an output of the line sensor 120 that enables focus detection if the next accumulation is performed using Ts calculated in step 22 in FIG. The process jumps to step 21 in FIG. 12 to perform the next accumulation (step 66).

ステップ64、又はステップ62でTs<Taと判定された場
合は10ビットのデータに対して下位方向シフトを行わず
に下位8ビットを抽出するシフト0モードでは焦点検出
不能あるいは不適当であるとして、次回よりシフト1モ
ードに切り換えるように、FLG=1,PEAK=256と設定して
(ステップ65)、次回の蓄積を行うべく第12図ステップ
21へジャンプする(ステップ66)。
If it is determined in step 64 or 62 that Ts <Ta, it is determined that focus detection is impossible or inappropriate in the shift 0 mode in which the lower 8 bits are extracted without performing the lower shift on the 10-bit data. FLG = 1 and PEAK = 256 are set so as to switch to the shift 1 mode from the next time (step 65).
Jump to 21 (step 66).

ステップ65でPEAK256に設定するのは、シフト0モー
ドでPEAK=128でありシフト1モードでこの値に相当す
るのは2倍の256であるからである。
The reason why PEAK256 is set in step 65 is that PEAK = 128 in the shift 0 mode and that the value of 256 is doubled in the shift 1 mode.

次に第18図を用いてシフト1モードの場合の動作を説
明する。
Next, the operation in the shift 1 mode will be described with reference to FIG.

第12図のステップ18でFLG=1と判定されると第18図
のステップ42へジャンプし、ステップ67でMAX(10)が5
12以上か否かを判定する。
If it is determined in step 18 in FIG. 12 that FLG = 1, the process jumps to step 42 in FIG. 18, and in step 67, MAX (10) becomes 5
It is determined whether it is 12 or more.

ステップ67でMAX(10)が512より小さいと判定された
時はステップ68へ進み、Tsが所定の蓄積時間Tb(Tb>Ta
>Tmin)より大きいか否かを判定する。ステップ68でTs
>Tbであると判定された時は前述のノイズや残像等の影
響が無視できると判定しシフト0モードに戻す為にFLG
=0,PEAK=128と設定し(ステップ69)、次回の蓄積を
行うべく第12図ステップ21へジャンプする。
If it is determined in step 67 that MAX (10) is smaller than 512, the process proceeds to step 68, where Ts is equal to a predetermined accumulation time Tb (Tb> Ta).
> Tmin). Ts in step 68
When it is determined that Tb is greater than Tb, it is determined that the effects of the above-described noise and afterimages can be ignored, and FLG is used to return to the shift 0 mode.
= 0, PEAK = 128 (step 69), and jump to step 21 in FIG. 12 to perform the next accumulation.

ステップ68でTs>Tbでないと判定された時はステップ
70へ進みMAX(10)200より大きいか否かを判定し、MAX
(10)が200より大きいと判定された時はメモリ150に格
納されたラインセンサ120の出力に基づく焦点検出演算
を演算手段160で行う(ステップ71)。
If it is determined in step 68 that Ts> Tb, then step
Go to 70 and determine if it is greater than MAX (10) 200,
When it is determined that (10) is larger than 200, the calculation means 160 performs a focus detection calculation based on the output of the line sensor 120 stored in the memory 150 (step 71).

ステップ70でMAX(10)が200以下の時は焦点検出演算
は行わずに、次回の蓄積を行うべく第12図ステップ21へ
ジャンプする。
If MAX (10) is 200 or less in step 70, the focus detection calculation is not performed, and the process jumps to step 21 in FIG. 12 to perform the next accumulation.

ステップ67でMAX(10)が512以上であると判定された
場合は、10ビットのデータを右へ1回シフトして下位8
ビットを抽出したデータが8ビットのダイナミックレン
ジに収まっていない事を意味するので焦点検出演算は行
わずステップ72へ進む。
If it is determined in step 67 that MAX (10) is 512 or more, the 10-bit data is shifted once to the right to
Since it means that the data from which the bits have been extracted are not within the dynamic range of 8 bits, the flow proceeds to step 72 without performing the focus detection calculation.

ステップ72ではTsが最短時間Tminと等しいか否かを判
定し、Ts=Tminと判定された時はシフト2モードに切り
換える為にFLG=2と設定しステップ74へ進み次回の蓄
積を行う。ステップ72でTsがTminと等しくないと判定さ
れた時はTs<Tminであることを意味し、この時はシフト
モードの切り換えは行わずにステップ74へ進み、次回の
蓄積を行う。
In step 72, it is determined whether or not Ts is equal to the shortest time Tmin. When it is determined that Ts = Tmin, FLG = 2 is set to switch to the shift 2 mode, and the flow proceeds to step 74 to perform the next accumulation. When it is determined in step 72 that Ts is not equal to Tmin, it means that Ts <Tmin. In this case, the process proceeds to step 74 without switching the shift mode, and the next accumulation is performed.

次に第19図を用いてシフト2モードの時の動作を説明
する。
Next, the operation in the shift 2 mode will be described with reference to FIG.

第12図のステップ18でFLG=1でないと判定されると
第19図のステップ49へジャンプし、ステップ75でMAX(1
0)が1023であるか否かを判定し、1023である時はライ
ンセンサ120の出力が10ビットのダイナミックレンジに
対してオーバーフローしている事になり焦点検出は不可
能なので検出不能警告を発し(ステップ80)第12図ステ
ップ21へジャンプし(ステップ78)次回の蓄積を行う。
If it is determined in step 18 of FIG. 12 that FLG is not 1, jump to step 49 of FIG.
0) is 1023 or not, and when it is 1023, the output of the line sensor 120 has overflowed the 10-bit dynamic range and focus detection is impossible, so a detection impossible warning is issued. (Step 80) Jump to Step 21 in FIG. 12 (Step 78) to perform the next accumulation.

ステップ75でMAX(10)が1023と等しくないと判定さ
れた場合はラインセンサ120の出力が10ビットのダイナ
ミックレンジに収まっているので10ビットのデータを下
位方向に2回シフトして下位8ビットを抽出したデータ
も8ビットのダイナミックレンジに収まっている事にな
り、次にステップ76でMAX(10)が400より大きいと判定
されれば演算手段160で焦点検出演算を行う(ステップ7
9)。
If it is determined in step 75 that MAX (10) is not equal to 1023, since the output of the line sensor 120 is within the dynamic range of 10 bits, the 10-bit data is shifted twice in the lower direction to lower 8 bits. Is also within the 8-bit dynamic range, and if it is determined in step 76 that MAX (10) is greater than 400, the focus detection calculation is performed by the calculation means 160 (step 7).
9).

ここでMAX(10)が400以下の時には焦点検出演算を行
わない理由は10ビットのダイナミックレンジで400以下
という事は10ビットのデータを下位方向へ2回のシフト
を行って下位8ビットを抽出したデータでは100以下で
あるという事であり、あまり小さいデータで焦点検出演
算を行うと高い精度の検出が行えない為であり、この様
な時はシフト1モードにした方が良い。
Here, when MAX (10) is 400 or less, the reason why focus detection calculation is not performed is that the dynamic range of 10 bits or less is 400 or less. The lower 8 bits are extracted by shifting the 10-bit data twice in the lower direction. In this case, the data is less than 100, and if the focus detection calculation is performed with too small data, it is not possible to perform high-precision detection. In such a case, it is better to use the shift 1 mode.

そこでステップ76でMAX(10)が400以下と判定された
場合はFLG=1と設定し(ステップ77)ステップ78へ進
み、次回の蓄積を行う。
Therefore, if it is determined in step 76 that MAX (10) is 400 or less, FLG = 1 is set (step 77), and the flow advances to step 78 to perform the next accumulation.

上記のように、前記実施例では10ビットのデジタル値
よりも8ビットのデジタル値を抽出するので、1つのデ
ジタル値に対してメモリは1バイトで済み、ラインセン
サの画素数が200画素であったとしても必要なメモリ領
域は従来の焦点検出装置の場合と同じ200バイトで済
む。
As described above, in the above-described embodiment, an 8-bit digital value is extracted from a 10-bit digital value. Therefore, only one byte of memory is required for one digital value, and the number of pixels of the line sensor is 200 pixels. Even so, the required memory area is 200 bytes, which is the same as in the case of the conventional focus detection device.

もし10ビットのデジタル値のままメモリへ格納しよう
とすると1つのデジタル値に対して2バイトのメモリ領
域が必要となるので例えばラインセンサ120の画素数が2
00画素であったとすると400バイトものメモリ領域が必
要となる。
If the digital value of 10 bits is to be stored in the memory, a memory area of 2 bytes is required for one digital value.
If it is 00 pixels, a memory area of 400 bytes is required.

以上で説明した第1,第2実施例では右方向シフトを行
わないシフト0モードを通常使用し、被写体輝度が高く
なるにつれ、シフト1モード,シフト2モードと切り換
えたが、通常においてシフト1モードを使用し、被写体
輝度が高ければシフト2モードを使用し、被写体輝度が
低い時にはシフト0モードを使用するというシフトモー
ドを切り換えるようにしてもよい。
In the first and second embodiments described above, the shift 0 mode in which the rightward shift is not performed is normally used, and the mode is switched between the shift 1 mode and the shift 2 mode as the subject luminance increases. The shift mode may be switched such that the shift 2 mode is used when the subject brightness is high, and the shift 0 mode is used when the subject brightness is low.

なお本実施例では前回のセンサの蓄積時間とその時の
センサの出力の内で最大値を示す値に基づいて次の蓄積
によって得られるセンサの出力に対するシフトモードを
設定していたが、例えばセンサの近傍に設置されたモニ
ターフォトダイオードの出力に基づいて最適なシフトモ
ードを予想して設定する方法を用いていもよい。
In this embodiment, the shift mode for the sensor output obtained by the next accumulation is set based on the value indicating the maximum value of the previous sensor accumulation time and the sensor output at that time. A method of predicting and setting an optimal shift mode based on the output of a monitor photodiode installed in the vicinity may be used.

「発明の効果」 本発明に係る焦点検出装置によれば、データ処理を行
う回路が、A/Dコンバータの出力するMビットのデジタ
ル値からのNビットのデジタル値を抽出する範囲を可変
にしたので、回路規模の拡大を供なわずにより高輝度の
被写体に対しても確実な焦点検出が可能となる。しかも
演算規模メモリ容量とも従来と同程度で済む。
[Effects of the Invention] According to the focus detection device of the present invention, the circuit that performs data processing makes the range in which the N-bit digital value is extracted from the M-bit digital value output from the A / D converter variable. Therefore, reliable focus detection can be performed even on a high-luminance subject without increasing the circuit scale. In addition, the operation scale memory capacity can be about the same as the conventional one.

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

第1図〜第15図は本発明の第1実施例を示しており、第
1図は焦点検出装置の構成ブロック図、第2図はモード
切換時におけるA/Dコンバータの出力の最大値の基準値
を示す線図、第3図〜第5図は、順にシフト0モードに
おけるA/Dコンバータのデジタル出力、ラインセンサの
出力、メモリへの出力を示す説明図、第6図〜第8図は
同じくシフト1モード、第9図〜第11図は同じくシフト
2モードを示し、第12図〜第15図は動作を示すフロー
図、第16図〜第19図は第2実施例を示し、第16図はモー
ド切換時における蓄積時間の基準値を示す線図、第17図
〜第19図は動作を示すフロー図、第20図は従来の焦点検
出装置の構成ブロック図である。 100……対物レンズ、110……光学手段 120……ラインセンサ 130……蓄積時間コントロール手段 140……A/Dコンバータ 150……メモリ、160……演算手段 170……データ処理手段
1 to 15 show a first embodiment of the present invention. FIG. 1 is a block diagram showing the configuration of a focus detection device, and FIG. 2 is a diagram showing the maximum value of the output of an A / D converter at the time of mode switching. 3 to 5 are explanatory diagrams showing the digital output of the A / D converter, the output of the line sensor, and the output to the memory in the shift 0 mode in order, and FIGS. 6 to 8. 9 also shows the shift 1 mode, FIGS. 9 to 11 show the same shift 2 mode, FIGS. 12 to 15 show flowcharts showing the operation, FIGS. 16 to 19 show the second embodiment, FIG. 16 is a diagram showing a reference value of the accumulation time at the time of mode switching, FIGS. 17 to 19 are flowcharts showing the operation, and FIG. 100 objective lens 110 optical means 120 line sensor 130 storage time control means 140 A / D converter 150 memory 160 arithmetic means 170 data processing means

Claims (3)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】複数の光電変換素子から成るラインセンサ
と、 対物レンズによる被写体の光像を前記ラインセンサ上へ
投影する光学手段と、 前記ラインセンサの複数の出力をMビットのデジタル値
に変換するA/Dコンバータと、 前記A/Dコンバータが出力するMビットのデジタル値か
らMビットより小さいNビットのデジタル値を抽出する
データ処理手段と、 前記データ処理手段が抽出したNビットのデジタル値を
記憶するメモリと、 前記メモリ内の複数のNビットのデジタル値に基づいて
前記対物レンズの焦点状態を演算する演算手段とを備
え、 前記データ処理手段は、Mビットのデジタル値からNビ
ットのデジタル値を抽出する範囲を可変にすることを特
徴とする焦点検出装置。
1. A line sensor comprising a plurality of photoelectric conversion elements, an optical unit for projecting a light image of a subject by an objective lens onto the line sensor, and converting a plurality of outputs of the line sensor into M-bit digital values. An A / D converter, an N-bit digital value extracted from the M-bit digital value output from the A / D converter, and an N-bit digital value extracted from the M-bit digital value. And a calculating means for calculating a focus state of the objective lens based on a plurality of N-bit digital values in the memory, wherein the data processing means converts the M-bit digital value into N-bit digital values. A focus detection device, wherein a range for extracting a digital value is made variable.
【請求項2】前記抽出する範囲は、前記A/Dコンバータ
の出力値に基づくことを特徴とする請求項1記載の焦点
検出装置。
2. The focus detection device according to claim 1, wherein the range to be extracted is based on an output value of the A / D converter.
【請求項3】前記データ処理手段におけるMビットのデ
ジタル値からNビットのデジタル値の抽出は、前記A/D
コンバータの出力値に応じてMビットデータを所定回数
下位側へシフトし、前記シフトしたMビットの下位Nビ
ットを抽出することを特徴とする請求項2記載の焦点検
出装置。
3. The method according to claim 1, wherein the extracting of the N-bit digital value from the M-bit digital value in the data processing means is performed by the A / D converter.
3. The focus detection device according to claim 2, wherein the M-bit data is shifted to the lower side by a predetermined number of times in accordance with the output value of the converter, and the lower N bits of the shifted M bits are extracted.
JP8360288A 1988-04-05 1988-04-05 Focus detection device Expired - Fee Related JP2663493B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8360288A JP2663493B2 (en) 1988-04-05 1988-04-05 Focus detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8360288A JP2663493B2 (en) 1988-04-05 1988-04-05 Focus detection device

Publications (2)

Publication Number Publication Date
JPH01254909A JPH01254909A (en) 1989-10-11
JP2663493B2 true JP2663493B2 (en) 1997-10-15

Family

ID=13807031

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8360288A Expired - Fee Related JP2663493B2 (en) 1988-04-05 1988-04-05 Focus detection device

Country Status (1)

Country Link
JP (1) JP2663493B2 (en)

Also Published As

Publication number Publication date
JPH01254909A (en) 1989-10-11

Similar Documents

Publication Publication Date Title
US6583820B1 (en) Controlling method and apparatus for an electronic camera
JP3221967B2 (en) Imaging device
WO2005125185A1 (en) Imaging device
US8035729B2 (en) Imaging apparatus and program thereof
JP2663493B2 (en) Focus detection device
US7283171B2 (en) Image pickup apparatus with external device
JPH09274224A (en) Stroboscopic device
US6657672B1 (en) Flash device, control method and control apparatus for the same, and image pickup apparatus
US10594912B2 (en) Flash band determination device for detecting flash band, method of controlling the same, storage medium, and image pickup apparatus
JP2014165676A (en) Signal processing device and imaging device
JP2003304417A (en) Imaging system
JP2001021961A (en) Imaging device and control method thereof
JP4717229B2 (en) Imaging apparatus and white balance processing method thereof
JP5169542B2 (en) Electronic camera
US4762987A (en) Automatic focusing system with correlation-determined disabling
JP4813839B2 (en) Exposure control method and imaging apparatus
JP3510063B2 (en) Exposure control device for still video camera
JPH0743803A (en) Camera-shake preventing device
JP3788997B2 (en) Image signal processing device
JP3955144B2 (en) Ranging device
US5963252A (en) Photometry device that detects and compensates for an inversion abnormality
JPH1164919A (en) Image pickup device
US5565954A (en) Range finder for passive-type autofocusing device
KR970006547B1 (en) Auto-focusing system for camcorder
JP4670764B2 (en) Electronic camera

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees