JP2770318B2 - Automatic focus detection device - Google Patents

Automatic focus detection device

Info

Publication number
JP2770318B2
JP2770318B2 JP63118792A JP11879288A JP2770318B2 JP 2770318 B2 JP2770318 B2 JP 2770318B2 JP 63118792 A JP63118792 A JP 63118792A JP 11879288 A JP11879288 A JP 11879288A JP 2770318 B2 JP2770318 B2 JP 2770318B2
Authority
JP
Japan
Prior art keywords
block
defocus amount
focus
data
focus detection
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 - Lifetime
Application number
JP63118792A
Other languages
Japanese (ja)
Other versions
JPH0320706A (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.)
Minolta Co Ltd
Original Assignee
Minolta 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 Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP63118792A priority Critical patent/JP2770318B2/en
Publication of JPH0320706A publication Critical patent/JPH0320706A/en
Application granted granted Critical
Publication of JP2770318B2 publication Critical patent/JP2770318B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、複写体の光像を形成する結像光学系の焦点
調整状態を自動検出するカメラ等の光学装置の自動焦点
検出装置に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic focus detection device of an optical device such as a camera for automatically detecting a focus adjustment state of an imaging optical system for forming an optical image of a copy. It is.

〔従来の技術〕[Conventional technology]

従来から、被写体のほぼ同一部分に関する2つの光像
を、複数の光電変換素子の配列から成る一対の光電変換
素子アレイ上に導き、この光電変換素子アレイの出力を
演算して前記光電変換素子アレイ上の光像の相対的変位
を検出し、この検出結果から撮影レンズの焦点調整を行
う自動焦点検出装置がある。また、前記光電変換素子ア
レイの出力から複数のフィルタ手段(一次フィルタ手
段、二次フィルタ手段等)を用いて被写体像の特定の周
波数成分を複数個抽出し、これらの周波数成分に基づい
て演算を行って光像の相対的変位を検出し、撮影レンズ
の焦点調整を行う自動焦点検出装置がある(特開昭58−
87511号公報、特開昭59−142506号公報、特開昭60−151
607号公報、特開昭61−209413号公報参照)。
2. Description of the Related Art Conventionally, two light images related to substantially the same portion of a subject are guided onto a pair of photoelectric conversion element arrays each including an array of a plurality of photoelectric conversion elements, and an output of the photoelectric conversion element array is calculated to calculate the photoelectric conversion element array. There is an automatic focus detection device that detects the relative displacement of the upper light image and adjusts the focus of the photographing lens based on the detection result. Also, a plurality of specific frequency components of the subject image are extracted from the output of the photoelectric conversion element array using a plurality of filter means (primary filter means, secondary filter means, etc.), and an operation is performed based on these frequency components. There is an automatic focus detection device which detects the relative displacement of the light image and adjusts the focus of the taking lens (Japanese Patent Application Laid-Open No.
No. 87511, JP-A-59-142506, JP-A-60-151
607, JP-A-61-209413).

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

ところが、従来の自動焦点検出装置にあっては、各フ
ィルタ手段は被写体像の周波数成分を常に抽出してお
り、例えば、一次フィルタ手段により抽出された周波数
成分のみを用いて演算を行っても光像の相対的変位が検
出できるような場合でも、全フィルタ手段を作動させて
いた。したがって、前記相対的変位を検出までの時間が
かかるといった問題があった。また、抽出された周波数
成分のデータを記憶するRAM等のメモリを各フィルタ手
段ごとに必要とするので、メモリが多くいるといった問
題があった。
However, in the conventional automatic focus detection device, each filter means always extracts the frequency component of the subject image. For example, even if calculation is performed using only the frequency component extracted by the primary filter means, Even when the relative displacement of the image can be detected, all the filter means are operated. Therefore, there is a problem that it takes time to detect the relative displacement. Further, since a memory such as a RAM for storing data of the extracted frequency components is required for each filter means, there is a problem that the number of memories is large.

本発明は、一次フィルタ手段を用いて演算しても光像
の相対的変位が検出できないときに二次フィルタ手段を
作動させて光像の相対的変位を検出する自動焦点検出装
置を提供することを目的とする。
An object of the present invention is to provide an automatic focus detection device that activates a secondary filter means to detect a relative displacement of an optical image when a relative displacement of the optical image cannot be detected even when calculation is performed using the primary filter means. With the goal.

〔課題を解決するための手段〕[Means for solving the problem]

前記目的を達成するために、本発明は、第1の空間周
波数成分を抽出する一次フィルタ手段と、この抽出され
た空間周波数成分に基づいて焦点検出を行う第1の焦点
検出手段と、前記抽出された空間周波数成分から第2の
空間周波数成分を抽出する二次フィルタ手段と、この二
次フィルタ手段で抽出された空間周波数成分に基づいて
焦点検出を行う第2の焦点検出手段と、前記第1の焦点
検出手段で焦点検出不能と判定されたときに前記二次フ
ィルタ手段と第2の焦点検出手段とを作動させる判定手
段とを備えたものである。
In order to achieve the above object, the present invention provides primary filter means for extracting a first spatial frequency component, first focus detection means for performing focus detection based on the extracted spatial frequency component, Secondary filter means for extracting a second spatial frequency component from the extracted spatial frequency component, second focus detecting means for performing focus detection based on the spatial frequency component extracted by the secondary filter means, And determining means for operating the secondary filter means and the second focus detecting means when the focus detecting means determines that the focus cannot be detected.

〔作用〕[Action]

前記構成の自動焦点検出装置によれば、一次フィルタ
手段を用いても焦点が検出できないときに二次フィルタ
手段を作動させるので、一次フィルタ手段で抽出された
周波数成分のみで焦点が検出できる場合には、二次フィ
ルタ手段による周波数成分の抽出を行う時間を削減でき
る。また、二次フィルタ手段で抽出された周波数成分を
用いて焦点を検出するときには、一次フィルタ手段で抽
出された周波数成分のデータから二次フィルタ手段を用
いて周波数成分のデータを形成するので、データ作成処
理及び作成データのためのRAM等のメモリ容量が余分に
設けられる必要がなくなり、またデータ作成も迅速とな
る。
According to the automatic focus detection device having the above configuration, the secondary filter is operated when the focus cannot be detected even when the primary filter is used, so that the focus can be detected only with the frequency components extracted by the primary filter. Can reduce the time for extracting the frequency component by the secondary filter means. Further, when the focus is detected by using the frequency component extracted by the secondary filter means, since the frequency component data is formed by using the secondary filter means from the frequency component data extracted by the primary filter means, There is no need to provide an extra memory capacity such as a RAM for creation processing and creation data, and data creation is quick.

〔実施例〕〔Example〕

第1図は本発明に係る自動焦点検出装置を備えたカメ
ラの概略構成の一実施例を示す。自動焦点検出装置1は
撮影レンズ2と焦点検出手段3とデフォーカス量決定手
段4とレンズ位置検出手段5とレンズ駆動手段6と制御
手段7とから構成されている。この撮影レンズ2は被写
体8から発せられた光束9を焦点検出手段3に導くもの
である。焦点検出手段3は光電変換素子アレイ上(図示
せず)を有し、この光電変換素子アレイの出力を演算処
理して光電変換素子アレイ上の被写体8による光像の相
対的変位を検出するものである。
FIG. 1 shows an embodiment of a schematic configuration of a camera provided with an automatic focus detection device according to the present invention. The automatic focus detecting device 1 includes a photographing lens 2, focus detecting means 3, defocus amount determining means 4, lens position detecting means 5, lens driving means 6, and control means 7. The photographing lens 2 guides a light beam 9 emitted from the subject 8 to the focus detecting means 3. The focus detection means 3 has a photoelectric conversion element array (not shown), and calculates the output of the photoelectric conversion element array to detect a relative displacement of a light image by the subject 8 on the photoelectric conversion element array. It is.

また、デフォーカス量決定手段4は前記焦点検出手段
3から出力される変位検出信号に基づいて撮影レンズ2
のデフォーカス量を決定するものである。レンズ位置検
出手段5は撮影レンズ2の現在の位置を検出するもので
ある。レンズ駆動手段6は前記デフォーカス量決定手段
4のデフォーカス量信号に基づいて撮影レンズ2を駆動
するものである。制御手段7は、前記デフォーカス量に
対応する位置に撮影レンズ2が駆動されるようにレンズ
駆動手段6を制御するとともに、前記焦点検出手段3か
ら合焦信号が出力されたとき、撮影レンズ2の駆動を停
止させるものである。
Further, the defocus amount determining means 4 determines whether the photographing lens 2 is based on the displacement detection signal output from the focus detecting means 3.
Is determined. The lens position detecting means 5 detects the current position of the taking lens 2. The lens driving unit 6 drives the photographing lens 2 based on the defocus amount signal of the defocus amount determining unit 4. The control means 7 controls the lens driving means 6 so that the photographing lens 2 is driven to a position corresponding to the defocus amount, and when the focus detection means 3 outputs a focusing signal, the photographing lens 2 Is stopped.

第2図は前記焦点検出手段3の機構構成の一実施例を
示す。焦点検出手段3は主ミラー10とサブミラー11と焦
点検出光学系12とから構成されている。この主ミラー10
は撮影レンズ2を通過した光束9を図示しないファイン
ダ光学系とサブミラー11とに分岐させるものである。サ
ブミラー11は主ミラー10で分岐された光束9を、さらに
焦点検出光学系12とフィルタ面13とに分岐させるもので
ある。
FIG. 2 shows an embodiment of the mechanism configuration of the focus detecting means 3. The focus detecting means 3 includes a main mirror 10, a sub mirror 11, and a focus detecting optical system 12. This primary mirror 10
Is for splitting the light beam 9 passing through the taking lens 2 into a finder optical system (not shown) and a sub-mirror 11. The sub mirror 11 further splits the light beam 9 split by the main mirror 10 into a focus detection optical system 12 and a filter surface 13.

前記焦点検出光学系12は光電変換素子アレイ141,14
2、143とセパレータレンズ15と絞りマスク16とモジュー
ルミラー17とコンデンサレンズ181,182,183と視野絞り1
9とから構成されている。光電変換素子アレイ141,142,1
43は複数のCCD撮像素子等を配列したもので、セパレー
タレンズ15の焦点面14上のワンチップ上に形成されてい
る。セパレータレンズ15はセパレータレンズ対151,152,
153を有し、分岐された光束9を光電変換素子アレイ14
1,142,143に投影するものである。絞りマスク16は円形
あるいは長円形の開口部161,162,163を有し、セパレー
タレンズ15へ入力する光束9を限定するものである。モ
ジュールミラー17はコンデンサレンズ181,182、183を通
過した光束9をセパレータレンズ15へ導くものである。
視野絞り19は矩形開口部191,192,193を有するととも
に、焦点面近傍に配設され、焦点検出光学系12に入力さ
れる光束9の視野を限定するものである。
The focus detection optical system 12 is a photoelectric conversion element array 141, 14
2, 143, separator lens 15, aperture mask 16, module mirror 17, condenser lens 181, 182, 183 and field stop 1
It consists of nine. Photoelectric conversion element array 141, 142, 1
Reference numeral 43 denotes an arrangement of a plurality of CCD image pickup devices and the like, which are formed on one chip on the focal plane 14 of the separator lens 15. The separator lens 15 is a separator lens pair 151, 152,
153, and the split light beam 9 is supplied to the photoelectric conversion element array 14
1, 142, 143. The aperture mask 16 has circular or oblong openings 161, 162, and 163, and limits the light flux 9 input to the separator lens 15. The module mirror 17 guides the light flux 9 passing through the condenser lenses 181, 182, 183 to the separator lens 15.
The field stop 19 has rectangular openings 191, 192, and 193 and is disposed near the focal plane, and limits the field of view of the light beam 9 input to the focus detection optical system 12.

第3図は前記光電変換素子アレイ141,142,143の受光
部(以下、光電変換素子の受光部と蓄積部と転送部とを
含めてCCDという)を示している。この光電変換素子ア
レイ141は基準部141aと参照部141bと光電センサ141cと
からなり、同様に光電変換素子アレイ142は基準部142a
と参照部142bと光電センサ142cとからなり、光電変換素
子アレイ143は基準部143aと参照部143bと光電センサ143
cとからなる。前記光電センサ141c,142c,143cはそれぞ
れ基準部141a,142a,143aの一方の側部に長手方向に配設
され、受光量に応じた信号を出力するようになってい
る。そして、この受光量に応じた信号によりCCDの蓄積
部への蓄積時間を制御するようになっている。また、光
電変換素子アレイ141,142,143は、第4図に示すよう
に、ファインダ内の撮影画面20の中央部に位置する焦点
検出領域21,22,23(以下、それぞれ第1アイランド12,
第2アイランド22,第3アイランド23という)に投影さ
れる被写体8の光像に基づいて変位検出信号を出力する
ようになっている。
FIG. 3 shows a light receiving section of the photoelectric conversion element arrays 141, 142, 143 (hereinafter, referred to as a CCD including a light receiving section, a storage section, and a transfer section of the photoelectric conversion element). The photoelectric conversion element array 141 includes a reference part 141a, a reference part 141b, and a photoelectric sensor 141c. Similarly, the photoelectric conversion element array 142 includes a reference part 142a.
The photoelectric conversion element array 143 includes a reference portion 143a, a reference portion 143b, and a photoelectric sensor 143.
c. The photoelectric sensors 141c, 142c, and 143c are disposed on one side of the reference portions 141a, 142a, and 143a, respectively, in the longitudinal direction, and output signals according to the amount of received light. The accumulation time of the CCD in the accumulation unit is controlled by a signal corresponding to the amount of received light. As shown in FIG. 4, the photoelectric conversion element arrays 141, 142, and 143 are provided with focus detection areas 21, 22, and 23 (hereinafter, referred to as first islands 12 and 23, respectively) located at the center of the photographing screen 20 in the viewfinder.
The displacement detection signal is output based on the light image of the subject 8 projected on the second island 22 and the third island 23).

撮像画面20の中央部に点線で示された領域24は撮像者
に焦点検出を行っている領域を表示するものである。ま
た、表示部25は合焦時に点灯するものである。
An area 24 indicated by a dotted line in the center of the imaging screen 20 displays an area where focus detection is performed for the photographer. The display unit 25 is turned on when focusing is performed.

前記基準部141a,142a,143aの各画素数X、および参照
部141b,142b,143bの各画素数Yは、例えば、第3図に示
すように、光電変換素子アレイ141および光電変換素子
アレイ143ではそれぞれ基準部の画素数Xは34個で、参
照部の画素数Yは44個で構成され、光電変換素子アレイ
142では基準部の画素数Xは44個で、参照部の画素数Y
は52個で構成されるようになっている。
The number of pixels X of the reference portions 141a, 142a, 143a and the number of pixels Y of the reference portions 141b, 142b, 143b are, for example, as shown in FIG. In this example, the number of pixels X in the reference portion is 34, and the number of pixels Y in the reference portion is 44.
In 142, the number of pixels X in the reference portion is 44 and the number of pixels Y in the reference portion is Y
Consists of 52 pieces.

また、自動焦点検出装置1では基準部141a,142a,143a
の各画素のデータを複数のブロックに分割し、この分割
した各ブロックをそれぞれの参照部141b,142b、143bの
全てのデータと比較して焦点検出を行う。そして、各ブ
ロックでの焦点検出結果のうち、最も後ピンのデータを
前記の各アイランド21,22,23の焦点検出データとし、さ
らに各アイランド21,22,23の焦点検出データと撮影レン
ズ2の撮影倍率のデータとに基づいて撮影レンズ2を駆
動し、合焦させている。
In the automatic focus detection device 1, the reference portions 141a, 142a, 143a
Is divided into a plurality of blocks, and the divided blocks are compared with all the data of the reference units 141b, 142b, and 143b to perform focus detection. Then, among the focus detection results in each block, the data of the rearmost pin is used as the focus detection data of each of the islands 21, 22, and 23, and the focus detection data of each of the islands 21, 22, and The photographing lens 2 is driven based on the data of the photographing magnification to bring the lens into focus.

次いで、前記光電変換素子アレイ141,142,143からデ
フォーカス量(すなわち、デフォーカス量とは結像光学
系の予定焦点面と被写体像面との光軸方向のずれ量)を
検出する範囲(デフォーカス範囲)を求める手段につい
て第5図〜第7図を用いて説明する。
Next, a range (a defocus range) for detecting the amount of defocus (that is, the amount of defocus in the optical axis direction between the planned focal plane of the imaging optical system and the object image plane) from the photoelectric conversion element arrays 141, 142, and 143. Will be described with reference to FIGS. 5 to 7.

第5図は第3図に示した各アイランド21,22、23に対
応する基準部141a,142a,143aを拡大して示したものであ
る。同図において、各基準部141a,142a,143aに示してい
る数値は、第3図に示した基準部141a,142a,143aの各画
素のデータをそれぞれ3つ置きに検出した差分(すなわ
ち、空間周波数成分)のデータ数を示している。また、
この差分データは、前記画素データから抽出(フィルタ
リング)された特定の空間周波数の成分を示している
(第1の空間周波数成分抽出手段)。なお、差分データ
は2つ、または1つ置きでもよい。ただし、前記空間周
波数成分は3つ置きにとったときと異なり、かつ、前記
数値も異なる。
FIG. 5 is an enlarged view of the reference portions 141a, 142a, and 143a corresponding to the islands 21, 22, and 23 shown in FIG. In the figure, the numerical values shown in each of the reference portions 141a, 142a, and 143a are the differences (that is, the space) in which the data of each pixel of the reference portions 141a, 142a, and 143a shown in FIG. (Frequency component). Also,
This difference data indicates a specific spatial frequency component extracted (filtered) from the pixel data (first spatial frequency component extracting means). The difference data may be two or one. However, the spatial frequency components are different from every third spatial frequency component, and the numerical values are also different.

各アイランド21,22,23の基準部141a,142a,143aにおけ
る前記数値は、第1アイランド21では30個、第2アイラ
ンド22では40個、第3アイランド23では30個になる。ま
た、参照部141b,142b,143bに対しても基準部141a,142a,
143aの差分データの数値と同様に求められる。つまり、
参照部141b,142b,143bの数値は、第1アイランド21では
40個、第2アイランド22では48個、第3アイランド23で
は40個になる。
The numerical values in the reference portions 141a, 142a, 143a of the islands 21, 22, 23 are 30 in the first island 21, 40 in the second island 22, and 30 in the third island 23. In addition, the reference parts 141a, 142a,
It is obtained in the same manner as the numerical value of the difference data of 143a. That is,
The numerical values of the reference portions 141b, 142b, 143b are
Forty, the second island 22 has 48, and the third island 23 has forty.

次に、各アイランド21,22,23でのブロック分割につい
て説明する。すなわち、第1アイランド21では、上端の
差分データからK1(1〜20)、K1(11〜30)の2つのブ
ロックに分け、それぞれ第1ブロックBL1、第2ブロッ
クBL2とする。第2アイランド22では、左端の差分デー
タからK2(1〜20)、K2(11〜30)、K2(21〜40)の3
つのブロックに分け、それぞれ第3ブロックBL3、第4
ブロックBL4、第5ブロックBL5とする。第3アイラン
ド23では、上端の差分データからK3(1〜20)、K3(11
〜30)の2つのブロックに分け、それぞれ第9ブロック
BL9、第10ブロックBL10とする。
Next, block division in each of the islands 21, 22, and 23 will be described. That is, the first island 21 is divided into two blocks of K1 (1 to 20) and K1 (11 to 30) from the difference data at the upper end, and these are referred to as a first block BL1 and a second block BL2, respectively. In the second island 22, three of K2 (1 to 20), K2 (11 to 30), and K2 (21 to 40) are obtained from the left end difference data.
Divided into three blocks, the third block BL3 and the fourth block, respectively.
Block BL4 and fifth block BL5. In the third island 23, K3 (1 to 20) and K3 (11
30) divided into two blocks, each of which is the ninth block
BL9 and the tenth block BL10.

さらに、第2アイランド22では、低周波成分でなる被
写体に合焦させるために抽出周波数を変えた差分データ
を検出し(第2の空間周波数成分抽出手段)、この差分
データを第6ブロックBL6、第7ブロックBL7および第
8ブロックBL8に分割して焦点検出データに用いる。す
なわち、基準部142aおよび参照部142bの各画素のデータ
を、例えば、それぞれ7つ置きに差分をとり、この差分
データの隣接間の和を求め、この和のデータを第6ブロ
ックBL6にする。すなわち、差分データ6のデータの数
は、基準部142aでは36個、参照部142bでは44個になり、
第6ブロックBL6の和のデータ数は、基準部142aでは35
個、参照部142bでは43個になる。そして、この基準部14
2aの35個の左側の25個を第7ブロックBL7とし、右側の
25個を第8ブロックBL8になる。
Further, the second island 22 detects difference data of which the extraction frequency has been changed in order to focus on a subject composed of low frequency components (second spatial frequency component extraction means), and converts the difference data into sixth block BL6, It is divided into a seventh block BL7 and an eighth block BL8 and used for focus detection data. That is, the data of each pixel of the reference unit 142a and the reference unit 142b is, for example, obtained every 7th difference, a sum between the adjacent difference data is obtained, and the sum data is used as a sixth block BL6. That is, the number of data of the difference data 6 is 36 in the reference unit 142a and 44 in the reference unit 142b.
The data number of the sum of the sixth block BL6 is 35 in the reference unit 142a.
And 43 in the reference section 142b. And this reference part 14
The 25 blocks on the left of the 35 blocks of 2a are referred to as a seventh block BL7,
The 25 blocks become the eighth block BL8.

なお、前述では差分の間隔を7つ置きにしたが、この
間隔は大きいほど低周波成分を抽出することができる。
つまり、差分の間隔を7つ置き以外の間隔にしてもよ
い。
In the above description, the intervals of the difference are set at seven intervals, but the larger the interval, the more low frequency components can be extracted.
That is, the intervals of the differences may be intervals other than every seven intervals.

この焦点検出手段では、基準部と参照部との光像が一
致したときの像間隔が所定の間隔よりも大きいときには
後ピン、小さいときには前ピン、所定の間隔では合焦と
なる。したがって、分割したブロックでのデフォーカス
範囲は各アイランド内で光学中心から離れたブロックほ
ど後ピン側を受け持つことになる。
In this focus detecting means, the rear focus is set when the image interval when the optical images of the reference portion and the reference portion match is larger than a predetermined interval, the front focus is set when the image interval is smaller than the predetermined interval, and the focus is set at the predetermined interval. Therefore, the defocus range in the divided blocks is such that the blocks farther from the optical center in each island cover the rear focus side.

第6図は第2アイランド22の基準部142aおよび参照部
142bを拡大して示しており、同図を用いてブロック分け
した第4ブロックBL4のデフォーカス範囲を説明する。
つまり、基準部142aの第4ブロックBL4の像と合焦する
には、参照部142bの中央に位置するブロックBL41、すな
わち参照部142bの左端より15番目から34番目に位置する
像のデータと第4ブロックBL4のデータK2(11〜30)と
が一致するときである。そして、これより像の一致が参
照部142bの左側になると前ピンとなり、前ピンの最大の
ずれデータ数(以下、ずれピッチという)は14個とな
る。一方、像の一致が参照部142bの右側になると後ピン
となり、後ピンの最大のずれピッチは14個となる。
FIG. 6 shows the reference portion 142a and the reference portion of the second island 22.
142b is shown in an enlarged manner, and the defocus range of the fourth block BL4 divided into blocks will be described with reference to FIG.
That is, in order to focus on the image of the fourth block BL4 of the reference unit 142a, the data of the block BL41 located at the center of the reference unit 142b, that is, the data of the image located at the 15th to 34th positions from the left end of the reference unit 142b and This is when the data K2 (11 to 30) of the four blocks BL4 match. When the image coincidence is on the left side of the reference portion 142b, the front pin is set, and the maximum number of shift data of the front pin (hereinafter, referred to as shift pitch) is 14. On the other hand, if the image coincides with the right side of the reference portion 142b, the rear focus is set, and the maximum shift pitch of the rear focus is 14 pieces.

また、第1アイランド21および第3アイランド23につ
いても同様である。すなわち、第7図に示すように、第
3ブロックBL3では、前ピン側ずれピッチが4個、後ピ
ン側ずれピッチが24個であり、第5ブロックBL5では、
前ピン側ずれピッチが24個、後ピン側ずれピッチが4個
である。また、第1ブロックBL1および第9ブロックBL
9では、前ピン側ずれチッピが5個、後ピン側ずれピッ
チが15個であり、第2ブロックBL2および第10ブロック
BL10では、前ピン側ずれピッチが15個、後ピン側ずれピ
ッチが5個である。さらに、第6ブロックBL6では、前
ピン側、後ピン側共にずれピッチが4個である。
The same applies to the first island 21 and the third island 23. That is, as shown in FIG. 7, in the third block BL3, the front pin side shift pitch is 4, and the rear pin side shift pitch is 24. In the fifth block BL5,
The front pin side shift pitch is 24, and the rear pin side shift pitch is 4. Also, the first block BL1 and the ninth block BL
In No. 9, the number of front pin side shift chips is 5, and the number of rear pin side shift pitches is 15, and the second block BL2 and the tenth block
In BL10, the front pin side shift pitch is 15, and the rear pin side shift pitch is 5. Further, in the sixth block BL6, there are four shift pitches on both the front pin side and the rear pin side.

第7ブロックBL7では、前ピン側ずれピッチが4個、
後ピン側ずれピッチが14個であり、第8ブロックBL8で
は、前ピン側ずれピッチが14個、後ピン側ずれピッチが
4個となるが、第6ブロックBL6とずれピッチが重複す
るので、第7ブロックBL7では、後ピン側の4個〜14個
のずれピッチを、第8ブロックBL8では、前ピン側の4
個〜14個のずれピッチをデフォーカス範囲にする。
In the seventh block BL7, the front-pin-side shift pitch is four,
The rear pin side shift pitch is 14, and in the eighth block BL8, the front pin side shift pitch is 14, and the rear pin side shift pitch is 4. However, since the shift pitch overlaps with the sixth block BL6, In the seventh block BL7, four to fourteen shift pitches on the rear pin side are used.
The defocus range is set to the shift pitches of 14 to 14 pieces.

第8図は、本発明に係る自動焦点検出装置をマイコン
を用いて構成したカメラの回路ブロックの一実施例を示
す。
FIG. 8 shows an embodiment of a camera circuit block in which the automatic focus detection device according to the present invention is configured using a microcomputer.

中央制御回路(以下、マイコンという)26はカメラ全
体の制御し、露出等を演算するとともに、第1空間周波
数成分を抽出し(一次フィルタ手段)、この抽出された
空間周波数成分に基づいて焦点検出を行い(第1の焦点
検出手段)、さらに前記抽出された空間周波数成分に基
づいて第2の空間周波数成分を抽出し(二次フィルタ手
段)、この二次フィルタ手段で抽出された空間周波数成
分に基づいて焦点検出を行い(第2の焦点検出手段)、
前記第1の焦点検出手段で焦点検出不能と判定されたと
きに前記二次フィルタ手段と第2の焦点検出手段とを作
動させる(判定手段)ものである。レンズ回路27はカメ
ラ本体(図示せず)に装着される撮影レンズ2(交換レ
ンズ)固有のデータをマイコン26に伝達するものであ
る。焦点検出データ出力回路28は第1図の焦点検出手段
3に対応するもので、光電変換素子アレイのアナログ出
力をデジタル出力に変換してマイコン26に伝達するもの
である。輝度検出回路29は撮影レンズ2を通過した光束
9を測定することにより被写体8の明るさを検出し、こ
の明るさに対応したアペックス値Bvoをマイコン26に伝
達するものである。フィルム感度読取回路30はフィルム
(図示せず)からフィルム感度を読取り、このフィルム
感度に対応したアペックス値Svをマイコン26に伝達す
るものである。
A central control circuit (hereinafter referred to as a microcomputer) 26 controls the entire camera, calculates exposure and the like, extracts a first spatial frequency component (primary filter means), and detects a focus based on the extracted spatial frequency component. (First focus detecting means), and a second spatial frequency component is extracted based on the extracted spatial frequency component (secondary filter means). The spatial frequency component extracted by the secondary filter means (Second focus detection means) based on
When the first focus detection means determines that the focus cannot be detected, the secondary filter means and the second focus detection means are operated (determination means). The lens circuit 27 transmits data specific to the photographing lens 2 (interchangeable lens) mounted on the camera body (not shown) to the microcomputer 26. The focus detection data output circuit 28 corresponds to the focus detection means 3 of FIG. 1, and converts an analog output of the photoelectric conversion element array into a digital output and transmits the digital output to the microcomputer 26. The luminance detecting circuit 29 detects the brightness of the subject 8 by measuring the light beam 9 passing through the photographing lens 2 and transmits an apex value Bvo corresponding to the brightness to the microcomputer 26. The film sensitivity reading circuit 30 reads the film sensitivity from a film (not shown) and transmits an apex value Sv corresponding to the film sensitivity to the microcomputer 26.

表示回路31は露出情報および撮影レンズ2の焦点状態
を表示するものである。エンコーダ32はレンズ駆動モー
タ33の回転量を検出し、後述のレンズ駆動制御回路34に
レンズ駆動モータ33の所定の回転量に応じたパルス数を
出力するものである。レンズ駆動制御回路34はマイコン
26からモータ駆動方向の信号およびモータ停止信号を入
力し、これらの信号に基づいてレンズ駆動モータ33の駆
動を制御するものである。
The display circuit 31 displays the exposure information and the focus state of the taking lens 2. The encoder 32 detects the rotation amount of the lens drive motor 33 and outputs a pulse number corresponding to a predetermined rotation amount of the lens drive motor 33 to a lens drive control circuit 34 described later. The lens drive control circuit 34 is a microcomputer
The motor drive direction signal and the motor stop signal are input from 26, and the drive of the lens drive motor 33 is controlled based on these signals.

また、マイコン26の内部にはカウンタが備えられてい
る。このカウンタは、撮影レンズ2の無限遠位置からの
繰り出し位置を検出するもので、前記パルス数に対して
カウントアップあるいはカウントダウンするようになっ
ている。また、後述の電源スイッチ(メインスイッチ)
SW1がオンされ、さらに、撮影レンズ2が駆動されて撮
影レンズ2が無限遠位置に繰り込まれたときには、前記
カウンタはリセットされるようになっている。
Further, a counter is provided inside the microcomputer 26. This counter detects the extension position of the photographing lens 2 from the infinity position, and counts up or down with respect to the pulse number. In addition, a power switch (main switch) described later
SW 1 is turned on, further, when being driven taking lens 2 is the taking lens 2 has been retracted to the infinity position, the counter is adapted to be reset.

電源電池35はマイコン26および後述のスイッチ類に直
接電力を供給し、それら以外の回路には後述の給電回路
36を介して電力を供給するものである。給電回路36はマ
イコン26からの制御信号に基づいてレンズ回路27、焦点
検出データ出力回路28等の回路に電力を供給するもので
ある。
The power supply battery 35 directly supplies power to the microcomputer 26 and switches described later, and the other circuits include a power supply circuit described later.
The power is supplied via 36. The power supply circuit 36 supplies power to circuits such as the lens circuit 27 and the focus detection data output circuit 28 based on a control signal from the microcomputer 26.

電源スイッチSW1は開閉操作されることによりカメラ
の動作を開始あるいは停止させるものである。ワンショ
ット回路37は、前記電源スイッチSW1の開閉操作に連動
して所定のパルスを発生させ、このパルスをマイコン26
に入力するものである。撮影準備スイッチSW2はレリー
ズスイッチ(図示せず)の操作により開閉されるもの
で、この撮影準備スイッチSW2がオンすると、焦点検出
動作が開始されるようになっている。リミットスイッチ
SW3は、撮影レンズ2が無限遠位置に繰り込まれたと
き、あるいは最先端まで繰り出されたときにオンするも
のである。選択スイッチSW4は、自動焦点調整モード
(以下、AFモードという)か、あるいは焦点検出表示モ
ード(以下、FAモードという)かを選択するもので、こ
の選択スイッチSW4をオンするとFAモードになり、オフ
するとAFモードになるものである。
Power switch SW 1 is intended to start or stop the operation of the camera by being opened and closed. One-shot circuit 37, in conjunction with the opening and closing of the power switch SW 1 generates a predetermined pulse, the pulse microcomputer 26
Is to be entered. Shooting preparation switch SW 2 is intended to be opened and closed by operation of the release switch (not shown), when the shooting preparation switch SW 2 is turned on, so that the focus detection operation is started. Limit switch
The SW 3 is turned on when the photographing lens 2 is retracted to an infinity position or when the photographing lens 2 is extended to the forefront. The selection switch SW 4 selects an automatic focus adjustment mode (hereinafter, referred to as AF mode) or a focus detection display mode (hereinafter, referred to as FA mode). When the selection switch SW 4 is turned on, the FA mode is set. When turned off, the camera enters AF mode.

次に、前記構成のカメラの動作について説明する。 Next, the operation of the camera having the above configuration will be described.

まず、電源スイッチSW1がオンされると、ワンショッ
ト回路37からマイコン26の割込入力端子INTOにパルスが
出力され、マイコン26は第9図に示した割り込み動作の
フローチャートを実行する。
First, the power switch SW 1 is once turned on, the one-shot circuit 37 outputs pulses to the interrupt input terminal INTO of the microcomputer 26, the microcomputer 26 executes the flowchart of the interrupt operation shown in FIG. 9.

すなわち、マイコン26は撮影準備スイッチSW2のオン
による焦点検出動作を禁止し(ステップ#1)、この割
り込み動作が電源スイッチSW1のオンによるものか、オ
フによるものかをマイコン26の割込入力端子IP1に入力
された電圧により判定する(ステップ#2)。そして、
この入力電圧がハイ電圧であれば、ステップ#3〜#11
の処理を行わずに、レンズ回路27等への電力を停止し、
マイコン26は動作待機状態になる(ステップ#12,#1
3)。この入力電圧がロー電圧であれば、電源スイッチS
W1はオン状態と判定し、マイコン26内のカウンタの動作
を禁止し(ステップ#3)、フローチャートの実行に使
用するフラグ、およびマイコン26の出力端子類を初期セ
ットする(ステップ#4)。
That is, the microcomputer 26 prohibits the focus detection operation by the on the shooting preparation switch SW 2 (step # 1), or not this interruption operation due to the on power switch SW 1, or by off interrupt input of the microcomputer 26 The determination is made based on the voltage input to the terminal IP1 (step # 2). And
If this input voltage is a high voltage, steps # 3 to # 11
Without performing the processing of, the power to the lens circuit 27 and the like is stopped,
The microcomputer 26 enters an operation standby state (steps # 12 and # 1).
3). If this input voltage is a low voltage, the power switch S
W 1 determines the ON state, and prohibits the operation of the counter in the microcomputer 26 (Step # 3), the flag to be used for execution of the flowchart, and initially sets the output terminal such microcomputer 26 (Step # 4).

次いで、マイコン26の出力端子OP1をハイ電圧にして
レンズ回路27等の回路に電力を供給する(ステップ#
5)。次に、レンズ駆動制御回路34に撮影レンズ2の繰
り込み信号が入力され、撮影レンズ2は無限遠位置の方
向に繰り込まれる(ステップ#6)。そして、撮影レン
ズ2が無限遠位置に繰り込まれ、リミットスイッチSW3
がオンするのを待つ(ステップ#7)。ステップ#7で
リミットスイッチSW3がオンすると、撮影レンズ2の駆
動を停止させる(ステップ#8)。また、これに伴っ
て、マイコン26内のカウンタをリセットし、レンズ駆動
モータ33の回転量に応じたパルス数をカウントする(ス
テップ#9,#10)。そして、撮影準備スイッチSW2のオ
ンによる焦点検出動作の割り込みを許可する(ステップ
#11)。
Next, the output terminal OP1 of the microcomputer 26 is set to a high voltage to supply power to circuits such as the lens circuit 27 (step #
5). Next, the retraction signal of the photographing lens 2 is input to the lens drive control circuit 34, and the photographing lens 2 is retracted in the direction of the infinite position (step # 6). Then, the photographing lens 2 is retracted to the infinity position, and the limit switch SW 3
Is turned on (step # 7). When the limit switch SW 3 is turned on at step # 7, it stops the driving of the photographic lens 2 (step # 8). At the same time, the counter in the microcomputer 26 is reset, and the number of pulses according to the rotation amount of the lens drive motor 33 is counted (steps # 9 and # 10). Then, allow interruption of the focus detecting operation by the on shooting preparation switch SW 2 (step # 11).

そして、出力端子OP1をロー電圧にしてレンズ回路27
等への電力を停止し、撮影準備スイッチSW2等が押され
るまで動作を待機させる(ステップ#12,#13)。
Then, the output terminal OP1 is set to a low voltage to set the lens circuit 27.
It stops power to such, to wait the operation to the photographing preparation switch SW 2 and the like is depressed (step # 12, # 13).

また、前記ステップ#13の動作待機状態のときに撮影
準備スイッチSW2がオンされると、マイコン26は第10図
に示した割り込み動作のフローチャートを実行する。
The photographing preparation switch SW 2 when the operation waiting state of the step # 13 when it is turned on, the microcomputer 26 executes the flowchart of the interrupt operation shown in FIG. 10.

すなわち、マイコン26はフローチャートの実行に使用
するフラグ、およびマイコン26の出力端子類を初期セッ
トする(ステップ#21)。さらに、マイコン26内に設け
られたタイマをリセットし、次いで、このタイマをスタ
ートさせる(ステップ#22)。そして、焦点調整動作の
1回目であることを示すフラグAFSFをセットし(ステッ
プ#23)、出力端子OP1をハイ電圧にしてレンズ回路27
等に電力を供給する(ステップ#24)。次に、撮影レン
ズ2の焦点距離データ、開放絞り値およびデフォーカス
量等からレンズ駆動のためのパルス数に変換する係数等
よりなるデータをレンズ回路27から入力する(ステップ
#25)。そして、焦点検出データ出力回路28から差分デ
ータが入力され、この差分データを記憶する(ステップ
#26,#27)。次に、前述の各アイランド21,22,23のデ
フォーカス量が演算され、さらに露出演算が行われ、こ
れらの演算結果が表示回路31に表示される(ステップ#
28〜#30)。
That is, the microcomputer 26 initially sets flags used for execution of the flowchart and output terminals of the microcomputer 26 (step # 21). Further, the timer provided in the microcomputer 26 is reset, and then the timer is started (step # 22). Then, a flag AFSF indicating that this is the first focus adjustment operation is set (step # 23), and the output terminal OP1 is set to a high voltage to set the lens circuit 27.
And the like (Step # 24). Next, data including a coefficient for converting the focal length data of the photographing lens 2, the open aperture value, the defocus amount, and the like into a pulse number for driving the lens is input from the lens circuit 27 (step # 25). Then, difference data is input from the focus detection data output circuit 28, and the difference data is stored (steps # 26, # 27). Next, the defocus amounts of the above-mentioned islands 21, 22, and 23 are calculated, exposure calculation is performed, and the calculation results are displayed on the display circuit 31 (step #).
28 to # 30).

次に、FAモードか、AFモードかの判定を行い(ステッ
プ#31)、AFモードであれば、前記デフォーカス量から
撮影レンズ2の駆動量を算出し、これに基づいて撮影レ
ンズ2を駆動させる(ステップ#32)。一方、ステップ
#31でFAモードであれば、ステップ#32の処理を行わず
にステップ#34に移行する。ステップ#34では、撮影準
備スイッチSW2の開閉を判定する。そして、撮影準備ス
イッチSW2がオンであれば、フラグAFSFをリセットし
(ステップ#35)、ステップ#25に戻って、ステップ#
25からの処理を繰り返す。一方、ステップ#34で撮影準
備スイッチSW2がオフであれば、給電回路36をオフにし
てレンズ回路27等への電力を停止し(ステップ#36)、
撮影準備スイッチSW2等が押されるまで動作を待機させ
る(ステップ#37)。そして、撮影準備スイッチSW2
が押されると、第9図のフローチャートに移行する。
Next, it is determined whether the mode is the FA mode or the AF mode (step # 31). If the mode is the AF mode, the driving amount of the photographing lens 2 is calculated from the defocus amount, and the photographing lens 2 is driven based on the calculated amount. (Step # 32). On the other hand, if the mode is the FA mode in step # 31, the process proceeds to step # 34 without performing the process of step # 32. At step # 34, it determines the opening and closing of the shooting preparation switch SW 2. Then, if photographing preparation switch SW 2 is turned on, and resets the flag AFSF (step # 35), the process returns to step # 25, step #
Repeat the process from 25. On the other hand, if the shooting preparation switch SW 2 is turned off at step # 34, turns off the power supply circuit 36 stops power to the lens circuit 27 and the like (step # 36),
Shooting preparation switch SW 2 and the like to wait operation until pressed (step # 37). When the shooting preparation switch SW 2 and the like is depressed, the process proceeds to the flow chart of Figure 9.

次に、第10図のステップ#28に示した各アイランド2
1,22,23のデフォーカス量演算のサブルーチンについて
第11図〜第14図を用いて説明する。
Next, each island 2 shown in step # 28 of FIG.
The subroutine of the defocus amount calculation of 1, 22, and 23 will be described with reference to FIGS. 11 to 14.

第11図はアイランド21,22,23のデフォーカス量を第1
アイランド12(ステップ#41)、第2アイランド22(ス
テップ#41)、第3アイランド23(ステップ#41)の順
に演算することを示し、第12図〜第14図は各アイランド
21,22,23のデフォーカス量演算の具体的なフローチャー
トを示している。
FIG. 11 shows the defocus amounts of the islands 21, 22, and 23 as the first.
The calculation is performed in the order of the island 12 (step # 41), the second island 22 (step # 41), and the third island 23 (step # 41). FIG. 12 to FIG.
A specific flowchart of defocus amount calculation of 21, 22, and 23 is shown.

第12図は第1アイランド21のデフォーカス量演算(ス
テップ#41)のサブルーチンを示している。この第1ア
イランド21は、前述のように、第1ブロックBL1、第2
ブロックBL2に分けられ、これら各ブロックBL1、BL2
の各デフォーカス量をそれぞれ記憶する変数DF1,DF2に
所定値“−K"を記憶させる(ステップ#51、#52)。こ
の所定値“−K"は各ブロックBL1、BL2では、取り得な
いような前ピン状態の値であり、第1アイランド21で焦
点検出不能の場合(以下ローコンという)のデフォーカ
ス量として出力される。
FIG. 12 shows a subroutine for calculating the defocus amount of the first island 21 (step # 41). As described above, the first island 21 includes the first block BL1 and the second block BL1.
Block BL2, these blocks BL1, BL2
A predetermined value "-K" is stored in the variables DF1 and DF2 for storing the respective defocus amounts (steps # 51 and # 52). The predetermined value “−K” is a value of a front focus state that cannot be obtained in each of the blocks BL1 and BL2, and is output as a defocus amount when focus detection is not possible in the first island 21 (hereinafter referred to as low contrast). .

次に、第1アイランド21でのローコンの状態を示すフ
ラグLCF1をセットする(ステップ#53)。そして、第1
ブロックBL1の焦点状態(前ピン状態、後ピン状態、合
焦状態)の検出およびデフォーカス量DFを演算し(ステ
ップ#54)、この演算結果から焦点検出が可能であれ
ば、フラグLCF1をリセットし、求めたデフォーカス量DF
を第1ブロックBL1のデフォーカス量を記憶する変数DF
1に記憶させ(ステップ#55〜#57)、ステップ#58に
移行する。
Next, a flag LCF1 indicating the state of the low contrast in the first island 21 is set (step # 53). And the first
The focus state (front focus state, rear focus state, focus state) of the block BL1 is detected and the defocus amount DF is calculated (step # 54). If focus calculation is possible from the calculation result, the flag LCF1 is reset. And the calculated defocus amount DF
Is a variable DF that stores the defocus amount of the first block BL1.
1 (steps # 55 to # 57), and the process proceeds to step # 58.

一方、ステップ#55で焦点検出が不能と判断される
と、ステップ#56、#57の処理を行わずにステップ#58
に移行する。
On the other hand, if it is determined in step # 55 that focus detection cannot be performed, step # 58 is skipped without performing steps # 56 and # 57.
Move to

次に、第2ブロックBL2の焦点状態の検出およびデフ
ォーカス量DFを演算し、(ステップ#58)、この演算結
果から焦点検出が不能であれば、フラグLCF1がセットさ
れているかどうかを判断する。そして、フラグLCF1がリ
セットされているとき、すなわち、ステップ#55の判定
において焦点検出が不能とされたときには、ステップ#
62に移行する。また、ステップ#60でフラグLCF1がセッ
トされているときは、第11図に示すステップ#42の第2
アイランド22のデフォーカス量演算サブルーチン(第13
図)に移行する。
Next, the focus state of the second block BL2 is detected and the defocus amount DF is calculated (step # 58). If the focus result cannot be detected from the calculation result, it is determined whether the flag LCF1 is set. . Then, when the flag LCF1 is reset, that is, when the focus detection is disabled in the determination of step # 55, the process proceeds to step # 55.
Move to 62. If the flag LCF1 is set in step # 60, the second step # 42 shown in FIG.
Island 22 defocus amount calculation subroutine (13th
(Figure).

一方、ステップ#59で焦点検出が可能と判定される
と、ステップ#60の処理を行わずにステップ#62に移行
する。
On the other hand, if it is determined in step # 59 that focus detection is possible, the process proceeds to step # 62 without performing step # 60.

ステップ#62では、後述の平均処理ルーチンで使用す
るブロック間デフォーカス量ΔDFを決定する。次いで、
デフォーカス量DF1とデフォーカス量DF2との大小を判定
し、デフォーカス量の大きい方、すなわち、撮影レンズ
2(カメラ)に近い方の被写体のデフォーカス量を第1
アイランド21のデフォーカス量DFIS1とする。つまり、
デフォーカス量DF1がデフォーカス量DF2よりも大きいと
きは、デフォーカス量DF1を第1アイランド21のデフォ
ーカス量DFIS1とし、逆に、デフォーカス量DF2がデフォ
ーカス量DF1よりも大きいときは、デフォーカス量DF2を
第1アイランド21のデフォーカス量DFIS1とする(ステ
ップ#63〜#67)。
In step # 62, an inter-block defocus amount ΔDF used in an averaging processing routine described later is determined. Then
The magnitude of the defocus amount DF1 and the magnitude of the defocus amount DF2 are determined, and the larger the defocus amount, that is, the defocus amount of the subject closer to the photographing lens 2 (camera) is determined as the first defocus amount.
The defocus amount DFIS1 of the island 21 is set. That is,
When the defocus amount DF1 is larger than the defocus amount DF2, the defocus amount DF1 is set to the defocus amount DFIS1 of the first island 21, and conversely, when the defocus amount DF2 is larger than the defocus amount DF1, The focus amount DF2 is set as the defocus amount DFIS1 of the first island 21 (steps # 63 to # 67).

また、ステップ#64,#65でデフォーカス量DF1とデフ
ォーカス量DF2との差がブロック間デフォーカス量ΔDF
よりも小さいときは、デフォーカス量DF1とデフォーカ
ス量DF2との平均を行い、この平均値を第1アイランド2
1のデフォーカス量DFIS1とする(ステップ#68)。そし
て、ステップ#66,#67,#68の処理を終えると、第11図
のステップ#42に移行する。
In steps # 64 and # 65, the difference between the defocus amount DF1 and the defocus amount DF2 is the inter-block defocus amount ΔDF.
If smaller, the average of the defocus amount DF1 and the defocus amount DF2 is calculated.
The defocus amount DFIS1 is set to 1 (step # 68). Then, when the processes of steps # 66, # 67, and # 68 are completed, the process proceeds to step # 42 of FIG.

第13図は第2アイランド22のデフォーカス量演算のサ
ブルーチンを示す。
FIG. 13 shows a subroutine for calculating the defocus amount of the second island 22.

まず、第3ブロックBL3、第4ブロックBL4、第5ブ
ロックBL5の各デフォーカス量をそれぞれ記憶する変数
DF3,DF4,DF5に所定値“−K"をそれぞれ設定させ(ステ
ップ#71〜#73)、第2アイランド22でのローコンの状
態を示すフラグLCF2をセットする(ステップ#74)。そ
して、各ブロックBL3,BL4,BL5の焦点状態の検出および
デフォーカス量DFを演算する(ステップ#75,#79,#8
3)。すなわち、ステップ#75による第3ブロックBL3
のデフォーカス量DFの演算結果から焦点検出が可能であ
れば、フラグLCF2をリセットし、求めたデフォーカス量
DFを変数DF3に記憶させ(ステップ#76〜#78)、ステ
ップ#79に移行する。逆に、焦点検出が不能と判定され
ると、ステップ#77,#78の処理を行わずにステップ#7
9に移行する。
First, variables storing the defocus amounts of the third block BL3, the fourth block BL4, and the fifth block BL5, respectively.
A predetermined value "-K" is set in DF3, DF4 and DF5 (steps # 71 to # 73), and a flag LCF2 indicating the state of low contrast in the second island 22 is set (step # 74). Then, the focus state detection and the defocus amount DF of each block BL3, BL4, BL5 are calculated (steps # 75, # 79, # 8).
3). That is, the third block BL3 in step # 75
If the focus can be detected from the calculation result of the defocus amount DF, the flag LCF2 is reset, and the obtained defocus amount is calculated.
The DF is stored in the variable DF3 (steps # 76 to # 78), and the process proceeds to step # 79. Conversely, if it is determined that the focus detection cannot be performed, the processing in steps # 77 and # 78 is not performed and step # 7 is performed.
Move to 9.

第4ブロックBL4のデフォーカス量DFも同様に、ステ
ップ#79の演算結果から焦点検出が可能であれば、フラ
グCLF2をリセットし、デフォーカス量DFを変数DF4に記
憶させ(ステップ#80〜#82)、ステップ#83に移行す
る。逆に、焦点検出が不能と判定されると、ステップ#
81,#82の処理を行わずにステップ#83に移行する。
Similarly, for the defocus amount DF of the fourth block BL4, if the focus can be detected from the calculation result of step # 79, the flag CLF2 is reset, and the defocus amount DF is stored in the variable DF4 (steps # 80 to # 80). 82), proceed to step # 83. Conversely, if it is determined that focus detection is impossible, step #
The process proceeds to step # 83 without performing the processes of 81 and # 82.

第5ブロックBL5のデフォーカス量DFも同様に、ステ
ップ#83の演算結果から焦点検出が可能であれば、フラ
グLCF2をリセットし、デフォーカス量DFを変数DF5に記
憶させ(ステップ#84〜#86)、ステップ#87に移行す
る。逆に、焦点検出が不能と判定されると、ステップ#
85,#86の処理を行わずにステップ#87に移行する。
Similarly, for the defocus amount DF of the fifth block BL5, if the focus can be detected from the calculation result of step # 83, the flag LCF2 is reset, and the defocus amount DF is stored in the variable DF5 (steps # 84 to ##). 86), proceed to step # 87. Conversely, if it is determined that focus detection is impossible, step #
The process proceeds to step # 87 without performing the processes of 85 and # 86.

ステップ#87では、ローコンフラグLCF2がセットされ
ているかどうかを判定する。そして、フラグLCF2がセッ
トされていないとき、すなわち、ステップ#76,#80,#
84の判定においてそれぞれ焦点検出が不能とされたとき
には、後述の平均処理ルーチンで使用するブロック間デ
フォーカス量(平均処理幅)ΔDFを決定する(ステップ
#88)。次いで、各ブロックBL3,BL4,BL5の各デフォー
カス量DF3,DF4,DF5の大小を判定し、最も大きなデフォ
ーカス量MAXDFを抽出する(ステップ#89)。そして、
平均処理幅ΔDFよりも小さい他のブロックが存在しない
場合には、前記デフォーカス量MAXDFを第2アイランド2
2のデフォーカス量DFIS2とし(ステップ#90,#91)、
平均処理幅ΔDFよりも小さい他のブロックが1つ以上存
在する場合には、前記デフォーカス量MAXDFと平均処理
幅ΔDFよりも小さい他のブロックのデフォーカス量とだ
けで平均を行い(平均処理)、この平均値を第2アイラ
ンド22のデフォーカス量DFIS2とする(ステップ#9
2)。そして、ステップ#91,#92の処理を終えると、第
11図に示すステップ#43の第3アイランド23のデフォー
カス量演算サブルーチン(第14図)に移行する。
In step # 87, it is determined whether or not the low contrast flag LCF2 is set. When the flag LCF2 is not set, that is, in steps # 76, # 80, #
If it is determined that the focus detection cannot be performed in each of the determinations at 84, the defocus amount (average processing width) ΔDF between blocks used in the averaging processing routine described later is determined (step # 88). Next, the magnitude of each defocus amount DF3, DF4, DF5 of each block BL3, BL4, BL5 is determined, and the largest defocus amount MAXDF is extracted (step # 89). And
If there is no other block smaller than the average processing width ΔDF, the defocus amount MAXDF is set to the second island 2
Assuming a defocus amount DFIS2 of 2 (steps # 90 and # 91),
When one or more other blocks smaller than the average processing width ΔDF are present, averaging is performed using only the defocus amount MAXDF and the defocus amount of the other blocks smaller than the average processing width ΔDF (average processing). The average value is used as the defocus amount DFIS2 of the second island 22 (step # 9).
2). When the processing of steps # 91 and # 92 is completed,
The process proceeds to the defocus amount calculation subroutine (FIG. 14) for the third island 23 in step # 43 shown in FIG.

また、ステップ#87でフラグLCF2がセットされている
と判定されたときには、低周波成分でなる被写体に合焦
させるために3つ置きの差分データを7つ置きの差分デ
ータに再編成する(ステップ#93)。すなわち、例え
ば、画素のデータをl1,l2,…,ln,…とすると、2つ置
きの差分データは、dDn=l1−l5,…,l5−l9,…,ln−
ln+4,…となる。また、7つ置きの差分データはdDm=l
1−l9,…,lm−lm+8,…となる。この7つ置きの差分デ
ータdDmは3つ置きの差分データdDnの和を3つ置きに取
ることにより求められる。つまり、7つ置きの差分デー
タは、 dDm=dD1+dD5,…,dDm+dDm+4,… =l1−l5+l5−l9,…,ln-4−ln+ln−ln+4,… =l1−l9,…,ln-4−ln+4,… =l1−l9,…,lm−lm+8,… となる。ただし、n=m+4である。
When it is determined in step # 87 that the flag LCF2 is set, every third difference data is re-organized into every seventh difference data in order to focus on a subject having low frequency components (step # 87). # 93). That is, for example, l 1 the data of the pixel, l 2, ..., ln, ... and when the differential data 2 every is, dDn = l 1 -l 5, ..., l 5 -l 9, ..., ln-
ln +4 , ... The difference data of every seventh is dDm = 1
1 −l 9 ,..., Lm−lm +8,. Every seventh difference data dDm is obtained by taking the sum of every third difference data dDn. In other words, the difference data of 7 every is, dDm = dD 1 + dD 5 , ..., dDm + dDm +4, ... = l 1 -l 5 + l 5 -l 9, ..., l n-4 -ln + ln-ln +4, ... = L 1 -l 9 , ..., l n-4 -ln +4 , ... = l 1 -l 9 , ..., lm-lm +8 , ... Here, n = m + 4.

さらに、この差分データdDmの隣接間の和を取り、新
たなデータ列dDw(m)=dDm+dDm+1を演算し、これを
用いて第6ブロックBL6での焦点検出を行い、焦点状態
の検出およびデフォーカス量DFを演算し(ステップ#9
4)、焦点検出が可能であれば、フラグLCF2をリセット
し、第6ブロックBL6のデフォーカス量DF6を第2アイ
ランド22のデフォーカス量DFIS2として前記ステップ#4
3に移行する(ステップ#95〜#97)。一方、ステップ
#95で焦点検出が不能であれば、第7ブロックBL7での
焦点検出を行い、焦点状態の検出およびデフォーカス量
DFを演算し(ステップ#98)、焦点検出が可能であれば
(ステップ#99)、ステップ#96に戻って、フラグLCF2
をリセットし、第7ブロックBL7のデフォーカス量を第
2アイランド22のデフォーカス量DFIS2として前記ステ
ップ#43に移行する。一方、ステップ#99で焦点検出が
不能であれば、第8ブロックBL8での焦点検出を行い、
焦点状態の検出およびデフォーカス量DFを演算し(ステ
ップ#100)、焦点検出が可能であれば(ステップ#10
1)、ステップ#96に戻って、フラグLCF2をリセット
し、第8ブロックBL8のデフォーカス量を第2アイラン
ド22のデフォーカス量DFIS2として前記ステップ#43に
移行する。一方、ステップ#101で焦点検出が不能であ
れば、ステップ#96,#97の処理を行わずに前記ステッ
プ#43に移行する。
Further, the sum between the adjacent pieces of the difference data dDm is calculated, a new data sequence dDw (m) = dDm + dDm + 1 is calculated, and the focus is detected in the sixth block BL6 by using the calculated data. Calculate the defocus amount DF (Step # 9)
4) If the focus can be detected, the flag LCF2 is reset, and the defocus amount DF6 of the sixth block BL6 is set as the defocus amount DFIS2 of the second island 22 in the step # 4.
The process proceeds to step 3 (steps # 95 to # 97). On the other hand, if the focus cannot be detected in step # 95, the focus is detected in the seventh block BL7 to detect the focus state and the defocus amount.
DF is calculated (step # 98). If focus detection is possible (step # 99), the flow returns to step # 96 to set the flag LCF2.
Is reset, and the defocus amount of the seventh block BL7 is set as the defocus amount DFIS2 of the second island 22, and the routine goes to the step # 43. On the other hand, if focus detection is not possible in step # 99, focus detection is performed in the eighth block BL8,
The focus state detection and the defocus amount DF are calculated (step # 100), and if focus detection is possible (step # 10)
1) Returning to step # 96, the flag LCF2 is reset, and the defocus amount of the eighth block BL8 is set as the defocus amount DFIS2 of the second island 22, and the process proceeds to step # 43. On the other hand, if the focus cannot be detected in step # 101, the process proceeds to step # 43 without performing the processes of steps # 96 and # 97.

第14図は第3アイランド23のデフォーカス量演算(ス
テップ#43)のサブルーチンを示す。まず、第9ブロッ
クBL9、第10ブロックBL10の各デフォーカス量をそれぞ
れ記憶する変数DF9,DF10に所定値“−K"を記憶させる
(ステップ#111,#112)。次に、第3アイランド23で
のローコンの状態を示すフラグLCF3をセットする(ステ
ップ#113)。そして、第9ブロックBL9の焦点状態の
検出およびデフォーカス量DFを演算し(ステップ#11
4)、焦点検出が可能であれば、フラグLCF3をリセット
し、求めたデフォーカス量DFを第9ブロックBL9のデフ
ォーカス量DF9に記憶させる(ステップ#115〜117)。
一方、ステップ#115で焦点検出が不能と判定される
と、ステップ#116,#117の処理を行わずにステップ#1
18に移行する。
FIG. 14 shows a subroutine for calculating the defocus amount of the third island 23 (step # 43). First, a predetermined value “−K” is stored in variables DF9 and DF10 for storing the respective defocus amounts of the ninth block BL9 and the tenth block BL10 (steps # 111 and # 112). Next, a flag LCF3 indicating the state of the low contrast in the third island 23 is set (step # 113). Then, the focus state detection of the ninth block BL9 and the defocus amount DF are calculated (step # 11).
4) If the focus can be detected, the flag LCF3 is reset, and the obtained defocus amount DF is stored in the defocus amount DF9 of the ninth block BL9 (steps # 115 to # 117).
On the other hand, if it is determined in step # 115 that the focus detection cannot be performed, the process of steps # 116 and # 117 is not performed and step # 1 is performed.
Move to 18.

次に、第10ブロックBL10の焦点状態の検出およびデフ
ォーカス量DFを演算し(ステップ#118)、この演算結
果から焦点検出が不能であれば、フラグLCF3がセットさ
れているかどうかを判定する。そして、フラグLCF3がリ
セットされているとき、すなわち、ステップ#115の判
定において焦点検出が不能とされたときには、ステップ
#122に移行する。また、フラグLCF3がセットされてい
るときには、第10図に示すステップ#29の露出演算サブ
ルーチンに移行する(ステップ#119,#120)。一方、
ステップ#119で焦点検出が可能と判定されると、ステ
ップ#120の処理を行わずにステップ#112に移行する。
Next, the detection of the focus state of the tenth block BL10 and the defocus amount DF are calculated (step # 118). If the focus detection is not possible from this calculation result, it is determined whether or not the flag LCF3 is set. Then, when the flag LCF3 is reset, that is, when the focus detection is disabled in the determination in step # 115, the process proceeds to step # 122. When the flag LCF3 is set, the flow shifts to the exposure calculation subroutine of step # 29 shown in FIG. 10 (steps # 119 and # 120). on the other hand,
If it is determined in step # 119 that focus detection is possible, the process proceeds to step # 112 without performing step # 120.

ステップ#122では、後述の平均処理ルーチンのブロ
ック間デフォーカス量ΔDFを決定する。次いで、デフォ
ーカス量DF9とデフォーカス量DF10との大小を判定し、
デフォーカス量の大きい方を第3アイランド23のデフォ
ーカス量DFIS3とする(ステップ#123〜#127)。
In step # 122, an inter-block defocus amount ΔDF of an averaging processing routine described later is determined. Next, the magnitude of the defocus amount DF9 and the defocus amount DF10 are determined,
The larger defocus amount is defined as the defocus amount DFIS3 of the third island 23 (steps # 123 to # 127).

また、ステップ#124,#125でデフォーカス量DF9とデ
フォーカス量DF10との差が平均処理幅ΔDFよりも小さい
ときは、デフォーカス量DF9とデフォーカス量DF10との
平均を行い、この平均値を第3アイランド23のデフォー
カス量DFIS3とする(ステップ#128)。そして、ステッ
プ#126,#127,#128の処理を終えると、第10図のステ
ップ#29に移行する。
If the difference between the defocus amounts DF9 and DF10 is smaller than the average processing width ΔDF in steps # 124 and # 125, the defocus amounts DF9 and DF10 are averaged. Is the defocus amount DFIS3 of the third island 23 (step # 128). Then, when the processes of steps # 126, # 127, and # 128 are completed, the process proceeds to step # 29 in FIG.

次に、第10図のステップ#29に示した露出演算サブル
ーチンについて第15図を用いて説明する。
Next, the exposure calculation subroutine shown in step # 29 of FIG. 10 will be described with reference to FIG.

まず、輝度検出回路29から被写体8の明るさに対応し
た開放輝度値(アペックス値)BV0がマイコン26に入力
される(ステップ#131)。続いて、フィルム感度読取
回路30からフィルム感度に対応したフィルム感度値(ア
ペックス値)SVがマイコン26に入力される(ステップ
#132)。次いで、これら開放輝度値BV0と、フィルム
感度値SVと、第10図のステップ#27で予めマイコン26
に入力されている開放絞り値AV0との和より、露出値E
V(EV=BV0+SV+AV0)を演算する(ステップ#13
3)。
First, an open luminance value (apex value) BV0 corresponding to the brightness of the subject 8 is input from the luminance detection circuit 29 to the microcomputer 26 (step # 131). Subsequently, a film sensitivity value (apex value) SV corresponding to the film sensitivity is input from the film sensitivity reading circuit 30 to the microcomputer 26 (step # 132). Next, these open brightness value BV0, film sensitivity value SV, and microcomputer 26 are determined in advance in step # 27 of FIG.
The exposure value E is calculated from the sum of the open aperture value AV0 input to
V (EV = BV0 + SV + AV0) is calculated (step # 13)
3).

次に、前記露出値EVに基づいて制御絞り値AVおよび
シャッター速度TVを決定し(ステップ#134)、そのの
ち、第10図に示すステップ#30に移行する。
Next, the control aperture value AV and the shutter speed TV are determined based on the exposure value EV (step # 134), and thereafter, the process proceeds to step # 30 shown in FIG.

次に、第10図のステップ#32に示した撮影レンズ2の
駆動量を算出する処理について説明する。このステップ
#32の処理では、各アイランド21,22、23の各デフォー
カス量から被写体がどのように分布しているかをパター
ン分けし、このパターンごとに最適なデフォーカス量の
演算手順を選択して最適な撮影レンズ2の駆動量を得る
ようにしている。ここで、前記演算手順を選択する手段
について簡単に説明する。
Next, the process of calculating the drive amount of the photographing lens 2 shown in step # 32 of FIG. 10 will be described. In the process of step # 32, how the subject is distributed is divided into patterns based on the defocus amounts of the islands 21, 22, and 23, and an optimal defocus amount calculation procedure is selected for each pattern. Thus, an optimal driving amount of the photographing lens 2 is obtained. Here, the means for selecting the calculation procedure will be briefly described.

まず、FAモードかAFモードかの判定が行われる。そし
て、FAモードの場合では、第2アイランド22の測距を優
先し、第2アイランド22が測距可能であれば、第2アイ
ランド22のデフォーカス量DFIS2に基づいて撮影レンズ
2の駆動量を決定し、第2アイランド22が測距不可能で
あれば、最近接のアイランドのデフォーカス量に基づい
て撮影レンズ2の駆動量を決定する。つまり、FAモード
では、静止した被写体を中央にして撮影する場合が多
く、広い範囲での測距に基づいてデフォーカス量を求め
ると、どのアイランドを選択して表示しているのかが明
確でなくなるため、撮影画面の中央部の測距を行う第2
アイランド22のデフォーカス量DFIS2を優先することと
した。
First, it is determined whether the mode is the FA mode or the AF mode. In the case of the FA mode, the distance measurement of the second island 22 is prioritized. If the distance measurement of the second island 22 is possible, the driving amount of the photographing lens 2 is determined based on the defocus amount DFIS2 of the second island 22. If it is determined that the distance cannot be measured for the second island 22, the driving amount of the photographing lens 2 is determined based on the defocus amount of the nearest island. In other words, in the FA mode, shooting is often performed with a still subject in the center, and if the defocus amount is obtained based on ranging over a wide range, it is not clear which island is selected and displayed. To measure the distance in the center of the shooting screen,
The defocus amount DFIS2 of the island 22 is given priority.

一方、AFモードの場合では、各アイランド21,22、23
の被写体の内、いずれかの被写体8が焦点検出可能なと
きには、最近接になるアイランド、すなわちデフォーカ
ス量が最大になるアイランドのデフォーカス量、撮影レ
ンズ2の焦点距離データ、および被写体までの距離に基
づいて撮影倍率を演算し、この演算結果によってデフォ
ーカス量の演算手順を変えている。すなわち、基本的に
は、撮影倍率が大きければ、主被写体は撮影画面の中央
部に必ず存在するとして、第2アイランド22のデフォー
カス量DFIS2を優先する。また、撮影倍率が小さけれ
ば、背景を含んだ撮影になり、被写体までの距離分布の
ばらつきが大きいとし、さらに主被写体はカメラに近い
位置に存在することが多いので、距離分布の近い側を優
先する。この撮影倍率の判定の目安となる値と、この値
に基づいて演算手段を選択する手順の一例を第16図に示
す。
On the other hand, in the AF mode, the islands 21, 22, 23
When any one of the subjects 8 can detect the focus, the defocus amount of the closest island, that is, the island having the largest defocus amount, the focal length data of the photographing lens 2, and the distance to the subject Is calculated based on the calculation result, and the calculation procedure of the defocus amount is changed according to the calculation result. In other words, basically, if the shooting magnification is large, the main subject always exists at the center of the shooting screen, and the defocus amount DFIS2 of the second island 22 is prioritized. Also, if the shooting magnification is small, the shooting will include the background, and the distribution of the distance to the subject will be large, and the main subject is often located close to the camera. I do. FIG. 16 shows an example of a value used as a guide for determining the photographing magnification and a procedure for selecting a calculation means based on the value.

すなわち、例えば、AFモードの場合には、撮影レンズ
2の焦点距離fは35mmを境に演算手段を選択する。そし
て、焦点距離fが35mm以上、かつ、最近接アイランドの
撮影倍率βdfが所定の倍率βH(例えば、倍率1/25)よ
りも小さければ、最近接アイランドのデフォーカス量に
基づいて撮影レンズ2の駆動量を決定する。一方、撮影
倍率βdfが所定の倍率βHを越えると、第2アイランド2
2のデフォーカス量DFIS2を優先し、第2アイランド22が
測距不可能であれば、最近接ダイオードのデフォーカス
量に基づいて撮影レンズ2の駆動量を決定する。
That is, for example, in the case of the AF mode, the calculation means is selected when the focal length f of the photographing lens 2 is 35 mm. If the focal length f is equal to or greater than 35 mm and the imaging magnification βdf of the nearest island is smaller than a predetermined magnification βH (for example, 1/25), the photographic lens 2 is adjusted based on the defocus amount of the nearest island. Determine the drive amount. On the other hand, when the photographing magnification βdf exceeds the predetermined magnification βH, the second island 2
The defocus amount DFIS2 of 2 is prioritized, and if the distance measurement of the second island 22 is impossible, the drive amount of the photographing lens 2 is determined based on the defocus amount of the closest diode.

さらに、焦点距離fが35mm未満であれば、最近接アイ
ランドのデフォーカス量に基づいて撮影レンズ2の駆動
量を決定する。これは焦点距離fが短くなると、被写界
深度が深くなるので、距離分布において最近接アイラン
ドの被写体に焦点を合せても他のアイランドで検出され
た被写体をかなりの範囲まで被写界深度内に含むことが
できるからである。
Further, if the focal length f is less than 35 mm, the driving amount of the photographing lens 2 is determined based on the defocus amount of the nearest island. This is because, as the focal length f becomes shorter, the depth of field becomes deeper. Therefore, even if the object on the closest island is focused on in the distance distribution, the object detected on the other island is within a considerable range within the depth of field. Because it can be included in

また、FAモードの場合には、焦点距離fに関係なく、
第2アイランド22のデフォーカス量DFIS2を優先し、第
2アイランド22が測距不可能であれば、最近接アイラン
ドのデフォーカス量に基づいて撮影レンズ2の駆動量を
決定する。
In the case of the FA mode, regardless of the focal length f,
The defocus amount DFIS2 of the second island 22 is prioritized. If the second island 22 cannot be measured, the driving amount of the photographing lens 2 is determined based on the defocus amount of the closest island.

ここで、前述の撮影倍率βdfの算出手段について説明
する。
Here, the calculation means of the above-described photographing magnification βdf will be described.

この撮影倍率βdfは焦点距離fとカメラからの被写体
距離xとから下式のようになる。
The photographing magnification βdf is given by the following equation based on the focal length f and the subject distance x from the camera.

βdf=f/x 前記焦点距離fのデータは撮影レンズ2から入力され
るので、前記被写体距離xを求めると、撮影倍率βdfは
算出される。また、この被写体距離xは撮影レンズ2の
無限遠位置から被写体位置までのデフォーカス量DFxを
用いて、下式のように求められる。
βdf = f / x Since the data of the focal length f is input from the photographing lens 2, when the subject distance x is obtained, the photographing magnification βdf is calculated. The subject distance x is obtained by the following formula using the defocus amount DFx from the infinity position of the photographing lens 2 to the subject position.

x=f2/DFx ただし、撮影レンズ2は1枚の薄い理想レンズではな
く、主点が前後にあるとともに、焦点距離の変化によっ
てその主点が異なるので、上式から被写体距離xは近似
値として求められる。
x = f 2 / DFx However, since the photographing lens 2 is not a single thin ideal lens, the principal point is located at the front and back, and the principal point is different due to a change in the focal length, the subject distance x is an approximate value from the above equation. Is required.

一方、撮影レンズ2の無限遠位置から現在位置までの
デフォーカス量DFoは、マイコン25内部のカウンタに記
憶されているレンズ駆動モータ33の回転量(数)Nに応
じたパルス数か求められ、その関係は下式のようにな
る。
On the other hand, the defocus amount Dfo from the infinity position to the current position of the photographing lens 2 is obtained from the number of pulses corresponding to the rotation amount (number) N of the lens drive motor 33 stored in the counter inside the microcomputer 25, The relationship is as follows.

N=k・DFo ただし、係数kの値は前記パルス数等に基づいて定め
られる。
N = k · DFo where the value of the coefficient k is determined based on the number of pulses and the like.

上式より、デフォーカス量DFoは、 DFo=N/k となる。そして、撮影レンズ2の現在位置から被写体位
置までのデフォーカス量DFは、 DFx=DFo+DF となる。これらの式から被写体距離xは、 x=f2/DFx=f2/(N/k+DF) したがって、撮影倍率βdfは、 βdf=f/x=(N/k+DF)/f となる。
From the above equation, the defocus amount DFo is DFo = N / k. Then, the defocus amount DF from the current position of the taking lens 2 to the subject position is DFx = DFo + DF. Subject distance x from these equations, x = f 2 / DFx = f 2 / (N / k + DF) Therefore, imaging magnification Betadf becomes βdf = f / x = (N / k + DF) / f.

また、上式とは別に撮影倍率βdfは撮影レンズ2の現
在位置から被写体位置までの駆動量ΔN(ΔN=DF・
k)を用いて、 βdf=(N+ΔN)/f・k としても求められる。
Further, separately from the above equation, the photographing magnification βdf is the drive amount ΔN from the current position of the photographing lens 2 to the subject position (ΔN = DF ·
Using k), βdf = (N + ΔN) / f · k.

次に、平均処理を行うサブルーチンについて第2アイ
ランド22のフローチャート(第13図のステップ#88,#9
2)を例にして説明する。
Next, the subroutine for performing the averaging process will be described with reference to the flowchart of the second island 22 (steps # 88 and # 9 in FIG. 13).
This will be described using 2) as an example.

第13図のステップ#88の平均処理幅ΔDFは、第17図に
示すサブルーチンに従って求められる。まず、前回平均
処理が行われたかどうかをフラグWZF2により判定する
(ステップ#141)。すなわち、前回平均処理が行われ
ると、フラグWZF2はセットされる。そして、前回平均処
理が行われていれば、係数k1を“1.5"に設定し、前回平
均処理が行われなければ、係数k1を“1"に設定する(ス
テップ#142,#143)。係数k1を設定する理由は、測距
値のばらつきによって平均処理が行われたり、行われな
かったりすることを防ぐため、一度平均処理が行われた
場合は平均処理幅を広げて2回目以降も平均処理が行わ
れる可能性(確率)を高めるためである。
The average processing width ΔDF of step # 88 in FIG. 13 is obtained according to a subroutine shown in FIG. First, it is determined whether or not the previous averaging process has been performed by using the flag WZF2 (step # 141). That is, when the previous averaging process is performed, the flag WZF2 is set. Then, if the previous average processing is performed, set the coefficient k 1 "1.5", if the previous average processing is performed to set the coefficient k 1 "1" (step # 142, # 143) . Setting the coefficient k 1 reason, or averaging process is performed by variation of the distance measurement values, to prevent or not done, once the average processing performed when the second and subsequent spread Average treatment width This is also to increase the possibility (probability) of performing the averaging process.

次に、前回測距時に検出された撮影倍率βdfの判定が
行われ、撮影倍率βdfが“1/20"以上の場合には係数k2
を“1"に設定し、撮影倍率βdfが“1/20"から“1/50"の
場合には係数k2を“0.5"に設定し、撮影倍率βdfが“1/
50"以下の場合には係数k2を“0"に設定し(ステップ#1
45〜#149)、ステップ#150に移行する。前記係数k2
設定する理由は、撮影倍率βdfが高いと同一アイランド
内の複数ブロックに同一被写体で占められる可能性が高
くなるためである。
Next, the photographing magnification βdf detected at the time of the previous distance measurement is determined, and when the photographing magnification βdf is “1/20” or more, the coefficient k 2
Is set to “1”, and when the shooting magnification βdf is from “1/20” to “1/50”, the coefficient k 2 is set to “0.5” and the shooting magnification βdf is set to “1 /
"In the following cases the coefficient k 2" 50 0 "(step # 1
45 to # 149), and the process proceeds to step # 150. The reason for setting the coefficient k 2 is to possibly occupied by the same subject into a plurality of blocks in the same island as the shooting magnification βdf high increases.

次いで、ステップ#150で、撮影時の絞り値FNo.に基
づいて基準平均処理幅ΔDF1の設定を行う。つまり、撮
影時の絞り値FNo.と許容錯乱円直径εの積により求めら
れる焦点深度δを撮影された像の解像度を保存するため
の基準平均処理幅ΔDF1として設定される。
Next, in step # 150, a reference average processing width ΔDF1 is set based on the aperture value FNo. That is, the depth of focus δ obtained by the product of the aperture value FNo. At the time of photographing and the allowable confusion circle diameter ε is set as the reference average processing width ΔDF1 for storing the resolution of the photographed image.

そして、前記係数k1および係数k2をこの基準平均処理
幅ΔDF1に掛けることにより、平均処理幅ΔDFが決定さ
れ、さらにフラグWZF2がリセットされる(ステップ#15
1)。そののち、第13図に示すステップ#89に移行す
る。
Then, by multiplying the coefficient k 1 and the coefficient k 2 in the reference average processing width? Df1, averaging width ΔDF is determined, further flag WZF2 is reset (step # 15
1). Thereafter, the flow shifts to step # 89 shown in FIG.

また、前回平均処理が行われたかどうかを判定するた
めのフラグは、第1アイランド21および第3アイランド
23にもフラグWZF2と同様に有しており、前記平均処理が
行われると、フラグWZF2はセットされ、前回平均処理が
行われなければ、リセットされる。
The flag for determining whether or not the previous averaging process has been performed is determined by the first island 21 and the third island 21.
23 has the same flag as WZF2. When the averaging process is performed, the flag WZF2 is set. When the previous averaging process is not performed, the flag WZF2 is reset.

ここで、各ブロックのデフォーカス量の演算および焦
点検出不能判断について第3ブロックBL3を例(第13図
のステップ#75〜#78)にして第18図(a)を用いて説
明する。
Here, the calculation of the defocus amount of each block and the determination of the focus detection failure will be described with reference to FIG. 18 (a) using the third block BL3 as an example (steps # 75 to # 78 in FIG. 13).

まず、前ピン側ずれピッチが4個の位置(ずれピッチ
“−4")から後ピン側ずれピッチが24個の位置(ずれピ
ッチ“24")までのデフォーカス範囲において参照部142
bのデータをずらせながら(シフトさせながら)、各シ
フト位置における第3ブロックBL3のデータと参照部14
2bのデータとの相関関係H3(I)を求める(ステップ#
161)。
First, in the defocus range from the position where the front pin side shift pitch is four (shift pitch “−4”) to the position where the rear pin side shift pitch is 24 (shift pitch “24”), the reference unit 142
While shifting (shifting) the data of b, the data of the third block BL3 and the reference unit 14 at each shift position are shifted.
Find correlation H3 (I) with 2b data (step #
161).

この相関関係H3(I)は下式のようになる。 This correlation H3 (I) is expressed by the following equation.

ただし、K2は基準部142aの差分データ列を示し、S2は
参照部142bの差分データ列を示す。
Here, K2 indicates a difference data string of the reference unit 142a, and S2 indicates a difference data string of the reference unit 142b.

次いで、前述の各シフト位置における相関関係H3
(I)の内で最も相関の良い、すなわち、相関関係H3
(I)の値が最小になるシフト量IM(IM=MIN{H3
(I)})を抽出する(ステップ#162)。次に、相関
関係H3(I)の各点の値を用いて各ピッチ間の補間演算
を行う(ステップ#163)。
Next, the correlation H3 at each shift position described above
The best correlation among (I), that is, the correlation H3
The shift amount IM at which the value of (I) is minimized (IM = MIN3H3
(I)}) is extracted (step # 162). Next, an interpolation operation between each pitch is performed using the value of each point of the correlation H3 (I) (step # 163).

この補間演算により求めらる補間ピッチXMは下式のよ
うになる(特開昭60−247211号公報参照)。
The interpolation pitch XM obtained by this interpolation calculation is as shown in the following equation (see Japanese Patent Application Laid-Open No. 60-247211).

XM=IM+{H3(IM−1)−H3(IM+1)}/[MIN
{H3(IM−1),H3(IM+1)}−H3(IM)]/2 この補間演算を行う理由は、1個のピッチのずれをデ
フォーカス量に換算すると約1000μmと大きく、このピ
ッチ間を補うことにより精度の良い測距を行うためであ
る。
XM = IM + {H3 (IM-1) -H3 (IM + 1)} / [MIN
{H3 (IM-1), H3 (IM + 1)}-H3 (IM)] / 2 The reason for performing this interpolation operation is that when one pitch shift is converted into a defocus amount, it is as large as about 1000 μm. This is for performing accurate distance measurement by compensating for.

こうして求められた補間ピッチXMに光学系および光
電変換素子アレイのピッチ長で決定する係数αを掛けて
デフォーカス量DF(DF=XM・α)に換算する(ステッ
プ#164)。次いで、第3ブロックBL3のデータの持つ
コントラスト(明暗)値C(3)を基準部142aの隣接デ
ータの総和として求める(ステップ#165)。
The interpolation pitch XM obtained in this way is multiplied by a coefficient α determined by the pitch length of the optical system and the photoelectric conversion element array, and converted into a defocus amount DF (DF = XM · α) (step # 164). Next, the contrast (brightness / darkness) value C (3) of the data of the third block BL3 is obtained as the sum of adjacent data of the reference unit 142a (step # 165).

このコントラスト値C(3)は下式のようになる。 This contrast value C (3) is expressed by the following equation.

続いて相関関係H3(I)の最小値の補間値YMを求め
るとともに、この補間値YMとコントラスト値C(3)
との比の値R(3)を求める(ステップ#167)。
Subsequently, an interpolation value YM of the minimum value of the correlation H3 (I) is obtained, and the interpolation value YM and the contrast value C (3) are obtained.
Is obtained (step # 167).

これら補間YMと比の値R(3)とは下式のようにな
る。
The interpolation YM and the ratio value R (3) are expressed by the following equation.

YM=H3(IM)−|H3(IM−1)−H3(IM+1)|/2R
(3)=C(3)/YM こうして求められたコントラスト値C(3)および比
の値R(3)が共に設定値を満足した場合のみ焦点検出
可能とし、コントラスト値C(3)あるいは比の値R
(3)のいずれか一方でも満足しない場合には、焦点検
出不能とする(ローコン判定)。すなわち、まず、第3
ブロックBL3が前回のルーチン処理で焦点検出可能であ
ったかどうかの判定を、検出フラグNLB3を用いて行う
(ステップ#168)。これは前回焦点検出可能であった
場合に判定レベルの緩和を行い、焦点検出判定レベルぎ
りぎりの被写体に対し、焦点検出可能かどうかの判定が
不安定になることを防ぐためである。すなわち、焦点検
出判定レベルぎりぎりの被写体に対しては、判定レベル
Cth,Rthにそれぞれ所定値C1,R1を設定する(ステップ#
169)。
YM = H3 (IM)-| H3 (IM-1) -H3 (IM + 1) | / 2R
(3) = C (3) / YM Focus detection is possible only when both the contrast value C (3) thus obtained and the ratio value R (3) satisfy the set values, and the contrast value C (3) or the ratio Value of R
If either one of (3) is not satisfied, focus detection is disabled (low contrast determination). That is, first, the third
It is determined whether or not the block BL3 has been able to detect the focus in the previous routine processing by using the detection flag NLB3 (step # 168). This is to reduce the determination level when focus detection has been possible last time, and to prevent unstable determination of whether or not focus detection is possible for a subject at the very end of the focus detection determination level. In other words, the determination level is determined for the subject just before the focus detection determination level.
Set predetermined values C1 and R1 to Cth and Rth, respectively (step #
169).

そして、ステップ#168で前回焦点検出不能あるいは
一度目のルーチン処理、すなわち、検出フラグNLB3がリ
セットされている場合には、現在の撮影レンズ2の位置
での撮影を行った際の撮影倍率βLSの演算を行う(ステ
ップ#170)。
Then, in step # 168, if the focus cannot be detected last time or the first routine processing, that is, if the detection flag NLB3 has been reset, the photographing magnification βLS when photographing at the current position of the photographing lens 2 is performed. An operation is performed (step # 170).

この撮影倍率βLSは、前述の撮影倍率βdfの演算、す
なわち、βdf=(N/k+DF)/fのデフォーカス量DFに
“0"を代入して求める。
The photographing magnification βLS is obtained by calculating the above-described photographing magnification βdf, that is, by substituting “0” into the defocus amount DF of βdf = (N / k + DF) / f.

そして、この撮影倍率βLSと焦点距離fとの積を求
め、この積が所定値f/βth(例えば、300mmレンズの場
合βthは1/15以上)以上の場合には、判定レベルCth,Rt
hにそれぞれ所定値C1,R1よりも大きい所定値C4,R4を設
定する(ステップ#171,#172)。つまり、ステップ#1
69の場合に比べて判定レベルCth,Rthは厳しくなる。
Then, the product of the photographing magnification βLS and the focal length f is obtained. If the product is equal to or larger than a predetermined value f / βth (for example, βth is 1/15 or more for a 300 mm lens), the determination level Cth, Rt
The predetermined values C4 and R4 larger than the predetermined values C1 and R1 are set to h (steps # 171 and # 172). That is, step # 1
The determination levels Cth and Rth are stricter than in the case of 69.

前記ステップ#171で所定値f・βth未満の場合、第
3ブロックBL32の最大の局所コントラスト値CLthの演算
を行う(ステップ#173)。そして、局所コントラスト
値CLthが予め設定された所定値よりも大きければ、すな
わち後述のフラグCLがセットされていると、判定レベル
Cthに所定値C2を設定し、所定値よりも小さければ、す
なわちフラグCLがリセットされていると、判定レベルCt
hに所定値C3を設定する(ステップ#174〜#176)。た
だし、所定値C2,C3の関係は、C1<C2<C3<C4となるよ
うに予め設定されている。
If it is less than the predetermined value f · βth in step # 171, the maximum local contrast value CLth of the third block BL32 is calculated (step # 173). If the local contrast value CLth is larger than a predetermined value, that is, if a flag CL described later is set, the determination level
Cth is set to a predetermined value C2. If the value is smaller than the predetermined value, that is, if the flag CL is reset, the determination level Ct is set.
h is set to a predetermined value C3 (steps # 174 to # 176). However, the relationship between the predetermined values C2 and C3 is set in advance so that C1 <C2 <C3 <C4.

次いで、フラグAFSFがセットされているかどうかの判
定を行い、セットされていれば、判定レベルRthに所定
値R2を設定し、リセットされていれば、判定レベルRth
に所定値R3を設定する(ステップ#177〜#179)。ただ
し、所定値R2,R3の関係は、R1<R2<R3<R4となるよう
に予め設定されている。
Next, it is determined whether or not the flag AFSF is set. If the flag AFSF is set, a predetermined value R2 is set as the determination level Rth, and if the flag AFSF is reset, the determination level Rth
Is set to a predetermined value R3 (steps # 177 to # 179). However, the relationship between the predetermined values R2 and R3 is set in advance so that R1 <R2 <R3 <R4.

そして、前記判定レベルCth,Rthにそれぞれ所定値が
設定されたのち(ステップ#169,#172,#178,#17
9)、コントラスト値C(3)が判定レベルCthよりも大
きく、かつ、比の値R(3)が判定レベルRthよりも大
きいときには、検出フラグNLB3をセットし、コントラス
ト値C(3)あるいは比の値R(3)のいずれか一方で
も判定レベルCthあるいは判定レベルRthよりも小さいと
きには、検出フラグNLB3をリセットする(ステップ#18
0〜#182)。そののち、第13図のステップ#79以降に示
された第4ブロックBL4のデフォーカス量の演算および
焦点検出不能判断等の処理を行う。
After a predetermined value is set for each of the determination levels Cth and Rth (steps # 169, # 172, # 178, # 17)
9) When the contrast value C (3) is larger than the judgment level Cth and the ratio value R (3) is larger than the judgment level Rth, the detection flag NLB3 is set, and the contrast value C (3) or the ratio is set. Is smaller than the judgment level Cth or the judgment level Rth, the detection flag NLB3 is reset (step # 18).
0 to # 182). After that, processing such as calculation of the defocus amount of the fourth block BL4 and determination of the inability to detect the focus, which are shown after step # 79 in FIG. 13, are performed.

ここで、ステップ#172の所定値f・βth以上の場合
に判定レベルCth,Rthを厳しくした理由について説明す
る。
Here, the reason why the determination levels Cth and Rth are made stricter when the value is equal to or more than the predetermined value f · βth in step # 172 will be described.

なお、検出フラグNLB3は、各アイランドごとに、この
検出フラグNLBを設定し、この検出フラグNLBに基づいて
判定レベルの緩和を行うようにしてもよい。つまり、一
度合焦検出して大きなデフォーカス量を検出した場合、
レンズ駆動により、その像間隔が基本像間隔に近ずく。
そのため、基準部の像自体も、例えば、第4ブロック、
第5ブロックにあった像が、レンズ駆動により像間隔が
広がり第3ブロック、第4ブロックにシフトすることが
ある。この様なときは第3ブロックで焦点検出不能にな
る。そこで、各アイランドごとにローコンを示すフラグ
LCFを別のフラグLCFNに格納して、このフラグLCFNを検
出フラグNLBの代りにそれぞれのアイランドの測距時に
判定するようにしてもよい。
As the detection flag NLB3, the detection flag NLB may be set for each island, and the determination level may be relaxed based on the detection flag NLB. In other words, if the focus is detected once and a large defocus amount is detected,
By driving the lens, the image interval approaches the basic image interval.
Therefore, the image itself of the reference portion is also, for example, the fourth block,
The image in the fifth block may be shifted to the third block and the fourth block by expanding the image interval by driving the lens. In such a case, focus detection becomes impossible in the third block. Therefore, a flag indicating low contrast for each island
The LCF may be stored in another flag LCFN, and this flag LCFN may be determined at the time of distance measurement of each island instead of the detection flag NLB.

つまり、極めて大きなレンズ駆動範囲(レンズ繰り出
し量40mm以上)を有する長焦点レンズの場合、レンズ位
置が前記条件を満足するように高倍率、すなわち、レン
ズ繰り出し量が大きい場合でかなりの遠景、低倍率の被
写体に対して焦点検出しようとすると、この様な場合、
被写体の空間周波数成分はかなりの高周波成分を有し、
基準部142aあるいは参照部142bにおける像間隔が極めて
小さく、基準部142aと参照部142bとではまったく異なっ
た像が投影されることになる。さらに、低倍率であるた
め、まったく異なった被写体が投影されることになる。
この様なぼけ状態の場合には、光学系は極めて低周波成
分のみを通過させるので、通常は焦点検出不能となる。
ところが、第18図(b)に示すように、人物A,Bが並ん
でいるような場合、人物A,Bを区別する細部のデータ
(高周波成分)は光学系を通過しないので、基準部142a
と参照部142bとに投影される人物A,Bのそれぞれの像は
ほぼ同じ波形になり、人物Aの像と人物bの像とを誤っ
て判定し、焦点検出可能と判定する場合がある。
That is, in the case of a long focal length lens having an extremely large lens driving range (lens extension amount of 40 mm or more), a high magnification is set so that the lens position satisfies the above condition. If you try to detect the focus for the subject,
The spatial frequency component of the subject has a considerable high frequency component,
The image interval in the reference portion 142a or the reference portion 142b is extremely small, and a completely different image is projected between the reference portion 142a and the reference portion 142b. Further, since the magnification is low, a completely different subject is projected.
In such a blurred state, the optical system passes only an extremely low frequency component, so that focus detection cannot be normally performed.
However, as shown in FIG. 18 (b), when the persons A and B are arranged side by side, the data (high-frequency component) for distinguishing the persons A and B does not pass through the optical system.
Each of the images of the persons A and B projected on the reference portion 142b and the reference section 142b has substantially the same waveform, and the image of the person A and the image of the person b may be erroneously determined to determine that the focus can be detected.

一方、レンズ位置が無限遠状態で低倍率の場合に近
景、高倍率の被写体に対して焦点検出しようとすると、
この様な場合にも、光学系は極めて低周波成分のみを通
過させるので、細部のデータは通過しない。ところが、
高倍率であるため基準部142aあるいは参照部142bにおけ
る像間隔が極めて大きく、基準部142aと参照部142bとは
同じ被写体の異なった部分が投影されることになる。し
たがって、基準部142aと参照部142bとが異なった被写体
を投影されることはないので、判定レベルCth,Rthを厳
しくすることとした。
On the other hand, if the lens position is at infinity and the magnification is low, the focus is to be detected on a near-view, high-magnification subject.
Even in such a case, the optical system passes only very low frequency components, so that detailed data does not pass. However,
Since the magnification is high, the image interval in the reference portion 142a or the reference portion 142b is extremely large, and different portions of the same subject are projected on the reference portion 142a and the reference portion 142b. Therefore, since the reference portion 142a and the reference portion 142b do not project different subjects, the determination levels Cth and Rth are set to be strict.

また、前記ステップ#161およびステップ#165では、
第3ブロックBL3の相関関数H3(I)およびコントラス
ト値C(3)を演算したが、第19図に示すように、他の
ブロックBL1,BL2,BL4,BL5,BL9,BL10についても同様に求
めることができる。
Also, in step # 161 and step # 165,
The correlation function H3 (I) and the contrast value C (3) of the third block BL3 were calculated. As shown in FIG. 19, the other blocks BL1, BL2, BL4, BL5, BL9, and BL10 are similarly obtained. be able to.

次に、前記ステップ#173での局所コントラスト値CLt
hの演算について説明する。このステップ#173でのコン
トラスト値の判定レベルCthには、光電変換素子アレイ
等により発生するノイズ(雑音)量Cnoiseが重畳されて
いる。このノイズ量Cnoiseのノイズ自体の大きさは変ら
ないがノイズの波形がばらつくため、合焦検出に最低限
必要な真の被写体コントラスト値CMINは下式のように
なる。
Next, the local contrast value CLt in the step # 173
The operation of h will be described. A noise amount Cnoise generated by the photoelectric conversion element array or the like is superimposed on the contrast value determination level Cth in step # 173. Although the magnitude of the noise itself of the noise amount Cnoise does not change, the waveform of the noise varies, so that the minimum true subject contrast value CMIN required for focus detection is as follows.

Cth=CMIN+MAX{Cnoise} ただし、CMIN≪MAX{Cnoise} このため、ノイズ量Cnoiseが小さく、本来、焦点検出
可能にもかかわらず、コントラスト値が判定レベルCth
を越えないために焦点検出不能と判定される場合があ
る。そこで、最大のノイズ量Cnoiseが発生する時は、第
3ブロックBL3の各部でもノイズが存在すると予測され
るので、第3ブロックBL3の差分データごとに下式にし
たがってコントラスト限界の判定を行う。
Cth = CMIN + MAX {Cnoise} where CMIN {MAX} Cnoise} Therefore, the noise amount Cnoise is small, and the contrast value is determined to be the determination level Cth despite the fact that focus detection is originally possible.
, It may be determined that the focus cannot be detected. Therefore, when the maximum noise amount Cnoise occurs, it is predicted that noise also exists in each part of the third block BL3. Therefore, the contrast limit is determined for each difference data of the third block BL3 according to the following equation.

ただし、値Pは予め設定する所定値データ、“20"以
下の値から選択する。
However, the value P is selected from predetermined value data set in advance and a value equal to or less than “20”.

また、前記コントラスト限界の判定において、局所的
なコントラスト値が所定値を満足しているときには、コ
ントラスト値の判定レベルをノイズが小さな場合と同様
に判定することができる。つまり、コントラスト限界の
判定の手段は、第20図〜第22図に示されたように、複数
の判定ルーチンがある。すなわち、第20図の判定ルーチ
ンでは、例えば、第3ブロックBL3から7個の差分デー
タごとに細分したデータブロックを抽出し、このデータ
ブロックの内、1個のデータでも所定値CLth以上であれ
ば、トータルのコントラスト値の判定レベルを緩和する
ようになっている。
In the determination of the contrast limit, when the local contrast value satisfies a predetermined value, the determination level of the contrast value can be determined in the same manner as when the noise is small. That is, as shown in FIGS. 20 to 22, there are a plurality of determination routines for determining the contrast limit. That is, in the determination routine of FIG. 20, for example, a data block subdivided for every seven difference data from the third block BL3 is extracted, and if even one of the data blocks is equal to or more than a predetermined value CLth, In addition, the judgment level of the total contrast value is relaxed.

つまり、この判定ルーチンは、まず、フラグCLをリセ
ットするとともに、変数qをリセットする(ステップ#
191)。次いで、第3ブロックBL3のデータをデータK2
(1)からK2(8)までの差分データ(7個)よりなる
データブロック を抽出し、このデータブロックCLOCと所定値CLth1と比
較する(ステップ#192,#193)。そして、データブロ
ックCLOCの内、1個のデータでも所定値CLth1以上であ
れば、フラグCLをセットし(ステップ#194)、コント
ラスト値の判定レベルを緩和する。
That is, this determination routine first resets the flag CL and also resets the variable q (step #
191). Next, the data of the third block BL3 is replaced with the data K2
Data block consisting of (7) difference data from (1) to K2 (8) Is extracted, and this data block CLOC is compared with a predetermined value CLth1 (steps # 192 and # 193). If at least one of the data blocks CLOC is equal to or greater than the predetermined value CLth1, the flag CL is set (step # 194), and the contrast value determination level is relaxed.

一方、データブロックCLOCの各差分データが所定値C
Lth1未満であれば、変数qをインクリメントして第3ブ
ロックBL3のデータK2(2)からK2(9)までの差分デ
ータよりなるデータブロックCLOCを抽出し、このデー
タブロックCLOCと所定値CLth1と比較する(ステップ#
195,#193)。そして、データブロックCLOCの内、1個
のデータでも所定値CLth1以上か、あるいは第3ブロッ
クBL3のデータK2(13)からK2(20)までの差分データ
よりなるデータブロックCLOCを抽出されるまで続けら
れる(ステップ#192〜#196)。この結果、全てのデー
タブロックCLOCで所定値CLth1未満であれば、フラグCL
はリセットのままで第18図(a)のフローチャートに移
行する。
On the other hand, each difference data of the data block CLOC is a predetermined value C
If it is less than Lth1, the variable q is incremented to extract a data block CLOC including the difference data from the data K2 (2) to K2 (9) of the third block BL3, and compare this data block CLOC with a predetermined value CLth1. (Step #
195, # 193). Then, the data block CLOC continues until a single data is equal to or more than the predetermined value CLth1, or a data block CLOC including difference data from the data K2 (13) to K2 (20) of the third block BL3 is extracted. (Steps # 192 to # 196). As a result, if the value is less than the predetermined value CLth1 in all the data blocks CLOC, the flag CL
Shifts to the flowchart of FIG.

また、第21図では、ブロックのデータの最大値および
最小値を抽出し、これら最大値と最小値との差から局所
コントラストの有無を判定する。
In FIG. 21, the maximum value and the minimum value of the data of the block are extracted, and the presence or absence of local contrast is determined from the difference between the maximum value and the minimum value.

つまり、この判定ルーチンは、第3ブロックBL3のデ
ータK2(1〜20)から最大値[MAX{K2(j)}]およ
び最小値[MIN{K2(j)}]を抽出し、これら最大値
[MAX{K2(j)}]と最小値[MIN{K2(j)}]と
の差CLOC(CLOC=MAX{K2(j)}−MIN{K2
(j)})を求める(ステップ#201〜#203)。次い
で、フラグCLをリセットし(ステップ#204)、差CLOC
と所定値CLth2と比較する(ステップ#205)。そして、
所定値CLth2以上であれば、フラグCLをセットし(ステ
ップ#206)、コントラスト値の判定レベルを緩和す
る。一方、差CLOCが所定値CLth2未満であれば、フラグ
はリセットのままで第18図(a)のフローチャートに移
行する。
That is, this determination routine extracts the maximum value [MAX {K2 (j)}] and the minimum value [MIN {K2 (j)}] from the data K2 (1 to 20) of the third block BL3, and extracts these maximum values. The difference CLOC between [MAX {K2 (j)}] and the minimum value [MIN {K2 (j)}] (CLOC = MAX {K2 (j)}-MIN {K2
(J)}) is obtained (steps # 201 to # 203). Next, the flag CL is reset (step # 204), and the difference CLOC
Is compared with a predetermined value CLth2 (step # 205). And
If the value is equal to or larger than the predetermined value CLth2, the flag CL is set (step # 206), and the judgment level of the contrast value is relaxed. On the other hand, if the difference CLOC is less than the predetermined value CLth2, the flow shifts to the flowchart of FIG.

さらに、第22図では、ブロックのデータの内、所定レ
ベルより大きなデータが所定個数以上あるかどうかの判
定で局所コントラストの有無を判定する。
Further, in FIG. 22, the presence or absence of local contrast is determined by determining whether or not there is a predetermined number or more of data greater than a predetermined level among the data of the block.

つまり、この判定ルーチンは、まず、変数jを“1"に
セットし、変数CL1,CL2をリセットし、さらにフラグCL
をリセットする(ステップ#211)。次いで、第3ブロ
ックBL3のデータK2(1)と所定値CLth3を比較し、所
定値CLth3以上のとき、変数CL1に“1"を加え、次に、デ
ータK2(1)が所定値−CLth3以下のとき、変数CL2に
“1"を加える(ステップ#212〜#215)。そして、前記
変数CL1と変数CL2との積を求め、この積CL1・CL2が所定
値CLth4以上であれば、フラグCLをセットし(ステップ
#217)、コントラスト値の判定レベルを緩和する。一
方、積CL1・CL2が所定値CLth4未満であれば、変数jを
インクリメントし、第3ブロックBL3の全てのデータK2
(20)について、ステップ#212から#215までの処理を
行う(ステップ#212〜#219)。この結果、全てのデー
タの処理を終えても積CL1・CL2が所定値CLth4未満であ
れば、フラグCLはリセットのままで第18図(a)のフロ
ーチャートに移行する。
That is, in this determination routine, first, the variable j is set to "1", the variables CL1 and CL2 are reset, and the flag CL
Is reset (step # 211). Next, the data K2 (1) of the third block BL3 is compared with the predetermined value CLth3, and when the data K2 (1) is equal to or more than the predetermined value CLth3, "1" is added to the variable CL1. At this time, "1" is added to the variable CL2 (steps # 212 to # 215). Then, the product of the variable CL1 and the variable CL2 is obtained. If the product CL1 · CL2 is equal to or larger than the predetermined value CLth4, the flag CL is set (step # 217), and the judgment level of the contrast value is relaxed. On the other hand, if the product CL1 · CL2 is less than the predetermined value CLth4, the variable j is incremented, and all the data K2 of the third block BL3 are incremented.
With respect to (20), the processing of steps # 212 to # 215 is performed (steps # 212 to # 219). As a result, if the products CL1 and CL2 are less than the predetermined value CLth4 even after all the data have been processed, the flow shifts to the flowchart of FIG. 18A with the flag CL kept reset.

次に、第13図のステップ#92の平均処理ルーチンにつ
いて説明する。この平均処理ルーチンにはいくつかの処
理手段があり、それぞれの処理手段について第23図〜第
25図を用いて説明する。
Next, the averaging process routine in step # 92 of FIG. 13 will be described. This averaging processing routine has several processing means, and each processing means is shown in FIGS.
This will be described with reference to FIG.

第23図の平均処理ルーチンでは、第18図(a)のステ
ップ#165,#167で求められたコントラスト値C(3)
および比の値R(3)に基づいて重み関数W(I)を設
定し、この重み関数W(I)を用いて各ブロックのデフ
ォーカス量の加重平均を行うようになっている。なお、
この重み関数W(I)は、例えばコントラスト値C
(3)そのもの、あるいは比の値R(3)そのものとし
てもよい。すなわち、まず、変数Iを“3"にセットする
(ステップ#217)。そして、各ブロックBL3,BL4,BL5
の各デフォーカス量DF3,DF4,DF5の内の最も大きなデフ
ォーカス量MAXDFとデフォーカス量DF3との差を求め、こ
の差と平均処理幅ΔDFとを比較し、この差が平均処理幅
ΔDFを越えたときには、重み関数W(3)を“0"にす
る。そして、変数Iをインクリメントし、デフォーカス
量MAXDFとデフォーカス量DF4およびデフォーカス量DF5
との差を求め、この差と平均処理幅ΔDFとを比較し、こ
の差が平均処理幅ΔDFを越えたときは、重み関数W
(4)および重み関数W(5)を“0"にする(ステップ
#222〜#225)。つまり、各ブロックBL3,BL4,BL5の各
デフォーカス量DF3,DF4,DF5の内、平均処理幅ΔDF以内
のデフォーカス量を用いて平均処理を行う。次いで、前
述のように処理された重み関数W(I)を用いて加重平
均を行い、この平均値を第2アイランド22のデフォーカ
ス量DFIS2に設定する(ステップ#226)。
In the averaging process routine of FIG. 23, the contrast value C (3) obtained in steps # 165 and # 167 of FIG.
And a weighting function W (I) based on the ratio value R (3), and a weighted average of the defocus amount of each block is calculated using the weighting function W (I). In addition,
The weight function W (I) is, for example, a contrast value C
(3) itself or the ratio value R (3) itself may be used. That is, first, the variable I is set to "3" (step # 217). Then, each block BL3, BL4, BL5
The difference between the largest defocus amount MAXDF of the respective defocus amounts DF3, DF4, and DF5 and the defocus amount DF3 is obtained, and this difference is compared with the average processing width ΔDF. If it exceeds, the weight function W (3) is set to "0". Then, the variable I is incremented, and the defocus amount MAXDF, the defocus amount DF4, and the defocus amount DF5
Is calculated, and the difference is compared with the average processing width ΔDF. When the difference exceeds the average processing width ΔDF, the weight function W
(4) and the weight function W (5) are set to "0" (steps # 222 to # 225). That is, the averaging process is performed using the defocus amount within the average processing width ΔDF among the defocus amounts DF3, DF4, DF5 of the blocks BL3, BL4, BL5. Next, weighted averaging is performed using the weight function W (I) processed as described above, and this average value is set as the defocus amount DFIS2 of the second island 22 (step # 226).

つまり、デフォーカス量DFIS2は下式のようになる。 That is, the defocus amount DFIS2 is given by the following equation.

DFIS2={DF3・W(3)+DF4・W(4)+DF5・W
(5)}/(W(3)+W(4)+W(5)} そして、ワイドゾーンフラグWZF2をセットするステッ
プ#227)。そののち、第11図のステップ#43のデフォ
ーカス量演算サブルーチンに移行する。
DFIS2 = {DF3 · W (3) + DF4 · W (4) + DF5 · W
(5) {/ (W (3) + W (4) + W (5)}} Then, a step # 227 of setting the wide zone flag WZF2. After that, the flow shifts to the defocus amount calculation subroutine of step # 43 in FIG.

第24図の平均処理ルーチンでは、相関関数の内、最大
相関位置IMと、その前後の相関位置IM+1および相関位
置IM−1において複数のブロックを組み合せて相関関数
を再計算し、さらに再補間演算するようになっている。
すなわち、全てのブロックBL3,BL4,BL5が平均処理幅Δ
DFよりも小さいと(平均処理対象)、第2アイランド22
のデータK2(1〜40)で相関関数H3,4,5(IM),H3,4,5
(IM−1),H3,4,5(IM+1)を再計算し、さらに再補
間演算してこの値を第2アイランド22のデフォーカス量
DFIS2に設定する(ステップ#231,#232)。また、第3
ブロックBL3および第4ブロックBL4が平均処理幅ΔDF
よりも小さいと、データK2(1〜30)で相関関数H3,4
(IM),H3,4(IM−1),H3,4(IM+1)を再計算し、再
補間演算してこの値をデフォーカス量DFIS2に設定する
(ステップ#233,#234)。さらに、第4ブロックBL4
および第5ブロックBL5が平均処理幅ΔDFよりも小さい
と、データK2(11〜40)で相関関数H4,5(IM),H4,5(I
M−1),H4,5(IM+1)を再計算し、再補間演算してこ
の値をデフォーカス量DFIS2に設定する(ステップ#23
5,#236)。また、ステップ#235で、第3ブロックBL3
および第5ブロックBL5が平均処理幅ΔDFよりも小さい
と、ステップ#232に移行し、そして、ワイドゾーンフ
ラグWZF2をセットし(ステップ#237)、そののち、第1
1図のステップ#43のデフォーカス量演算サブルーチン
に移行する。
In the averaging processing routine shown in FIG. 24, the correlation function is recalculated by combining the maximum correlation position IM among the correlation functions, and a plurality of blocks at the preceding and succeeding correlation positions IM + 1 and IM-1. It is supposed to.
That is, all the blocks BL3, BL4, BL5 have an average processing width Δ
If smaller than DF (average processing target), the second island 22
Correlation function H3,4,5 (IM), H3,4,5 with data K2 (1-40)
(IM-1), H3,4,5 (IM + 1) are recalculated and reinterpolated, and this value is used as the defocus amount of the second island 22.
Set to DFIS2 (steps # 231 and # 232). Also, the third
Block BL3 and fourth block BL4 have an average processing width ΔDF
Is smaller than the data K2 (1 to 30), the correlation function H3,4
(IM), H3,4 (IM-1), H3,4 (IM + 1) are recalculated, reinterpolated, and this value is set as the defocus amount DFIS2 (steps # 233, # 234). Further, the fourth block BL4
If the fifth block BL5 is smaller than the average processing width ΔDF, the correlation function H4,5 (IM), H4,5 (I
M-1), H4,5 (IM + 1) are recalculated and reinterpolated to set this value as the defocus amount DFIS2 (step # 23).
5, # 236). In step # 235, the third block BL3
If the fifth block BL5 is smaller than the average processing width ΔDF, the process proceeds to step # 232, and the wide zone flag WZF2 is set (step # 237).
The process proceeds to the defocus amount calculation subroutine of step # 43 in FIG.

ここで、前述のステップ#232,#234,#236の相関関
数H3,4,5(IM),H3,4(IM),H4,5(IM)の演算式を示
す。
Here, the arithmetic expressions of the correlation functions H3,4,5 (IM), H3,4 (IM), H4,5 (IM) of the above-described steps # 232, # 234, # 236 are shown.

また、第25図の平均処理ルーチンでは、平均処理の対
象となる各ブロックの相関関数H(IM),H(IM−1),H
(IM+1)をそれぞれ加算し、この加算結果を用いて補
間演算以後の処理を行うようになっている。すなわち、
全てのブロックBL3,BL4,BL5が平均処理幅ΔDFよりも小
さいときに、相関関数H3,4,5(IM),H3,4,5(IM−1),
H3,4,5(IM+1)は下式のように計算する(ステップ#
241,#242)。
In the averaging processing routine of FIG. 25, the correlation functions H (IM), H (IM−1), H
(IM + 1) are added, and the processing after the interpolation calculation is performed using the addition result. That is,
When all the blocks BL3, BL4, BL5 are smaller than the average processing width ΔDF, the correlation functions H3,4,5 (IM), H3,4,5 (IM−1),
H3,4,5 (IM + 1) is calculated as follows (step #
241, # 242).

H3,4,5(IM−1)=H3(IM−1)+H4(IM−1)+H5
(IM−1) H3,4,5(IM)=H3(IM)+H4(IM)+H5(IM) H3,4,5(IM+1)=H3(IM+1)+H4(IM+1)+H5
(IM+1) また、第3ブロックBL3および第4ブロックBL4が平
均処理幅ΔDFよりも小さいときには、相関関数H3,4(I
M),H3,4(IM−1),H3,4(IM+1)は下式のように計
算する(ステップ#243,#244)。
H3,4,5 (IM-1) = H3 (IM-1) + H4 (IM-1) + H5
(IM-1) H3,4,5 (IM) = H3 (IM) + H4 (IM) + H5 (IM) H3,4,5 (IM + 1) = H3 (IM + 1) + H4 (IM + 1) + H5
(IM + 1) When the third block BL3 and the fourth block BL4 are smaller than the average processing width ΔDF, the correlation function H3,4 (I
M), H3,4 (IM-1), H3,4 (IM + 1) are calculated as in the following equations (steps # 243 and # 244).

H3,4(IM−1)=H3(IM−1)+H4(IM−1) H3,4(IM)=3(IM)+H4(IM) H3,4(IM+1)=H3(IM+1)+H4(IM+1) さらに、第4ブロックBL4および第5ブロックBL5が
平均処理幅ΔDFよりも小さいときには、相関関数H4,5
(IM),H4,5(IM−1),H4,5(IM+1)は下式のように
計算する(ステップ#245,#246)。
H3,4 (IM-1) = H3 (IM-1) + H4 (IM-1) H3,4 (IM) = 3 (IM) + H4 (IM) H3,4 (IM + 1) = H3 (IM + 1) + H4 (IM + 1) Further, when the fourth block BL4 and the fifth block BL5 are smaller than the average processing width ΔDF, the correlation function H4,5
(IM), H4,5 (IM-1), H4,5 (IM + 1) are calculated as follows (steps # 245 and # 246).

H4,5(IM−1)=H4(IM−1)+H5(IM−1) H4,5(IM)=H4(IM)+H5(IM) H4,5(IM+1)=H4(IM+1)+H5(IM+1) また、ステップ#245で、第3ブロックBL3および第
5ブロックBL5が平均処理幅ΔDFよりも小さいときに
は、相関関数H3,5(IM),H3,5(IM−1),H3,5(IM+
1)は下式のように計算する(ステップ#247)。
H4,5 (IM-1) = H4 (IM-1) + H5 (IM-1) H4,5 (IM) = H4 (IM) + H5 (IM) H4,5 (IM + 1) = H4 (IM + 1) + H5 (IM + 1) In step # 245, when the third block BL3 and the fifth block BL5 are smaller than the average processing width ΔDF, the correlation functions H3,5 (IM), H3,5 (IM−1), H3,5 (IM +
1) is calculated as shown below (step # 247).

H3,5(IM−1)=H3(IM−1)+H5(IM−1) H3,5(IM)=H3(IM)+H5(IM) H3,5(IM+1)=H3(IM+1)+H5(IM+1) そして、ステップ#242,#244,#246,#247の相関関
数の計算を終えると、再補間演算を行い、この値をデフ
ォーカス量DFIS2に設定する(ステップ#248)。つま
り、デフォーカス量DFIS2は下式のようになる。
H3,5 (IM-1) = H3 (IM-1) + H5 (IM-1) H3,5 (IM) = H3 (IM) + H5 (IM) H3,5 (IM + 1) = H3 (IM + 1) + H5 (IM + 1) After completing the calculation of the correlation functions in steps # 242, # 244, # 246, and # 247, re-interpolation is performed, and this value is set as the defocus amount DFIS2 (step # 248). That is, the defocus amount DFIS2 is given by the following equation.

DFIS2=α・IM+α・(1/2)・{H(IM−1)−H(IM
+1)}/[MIN{H(IM−1),H(IM+1)}−H(I
M)] そして、ワイドゾーンフラグWZF2をセットし(ステッ
プ#249)、そののち、第11図のステップ#43のデフォ
ーカス量演算サブルーチンを移行する。
DFIS2 = α ・ IM + α ・ (1/2) ・ {H (IM-1) -H (IM
+1)} / [MIN {H (IM−1), H (IM + 1)} − H (I
M)] Then, the wide zone flag WZF2 is set (step # 249), and thereafter, the process proceeds to the defocus amount calculation subroutine of step # 43 in FIG.

次に、第13図のステップ#93〜#95の第6ブロックBL
6のデフォーカス量演算サブルーチンについて第26図を
用いて説明する。
Next, the sixth block BL of steps # 93 to # 95 in FIG.
The defocus amount calculation subroutine No. 6 will be described with reference to FIG.

まず、ブロックBL3,BL4,BL5で用いた差分データ列K2
(j)およびS2(j)よりそれぞれ7つ置きに差分をと
り、この差分データの隣接間の和分データ列KW(j)お
よびSW(j)を求める(ステップ#251)。この和分デ
ータ列KW(j),SW(j)は第10図のステップ#26で入
力された差分データ列を用いて下式のようになる。
First, the difference data string K2 used in the blocks BL3, BL4, BL5
Differences are taken at every seventh from (j) and S2 (j), and the sum data strings KW (j) and SW (j) between adjacent differences are obtained (step # 251). The sum data strings KW (j) and SW (j) are expressed by the following equation using the difference data string input in step # 26 of FIG.

KW(m)=K2(m)+K2(m+1)+K2(m+4)+K2
(m+5) SW(l)=S2(l)+S2(l+1)+S2(l+4)+S2
(l+5) 次に、相関関数H6(I)を求め、相関関数H6(I)の
値が最小になるシフト量IM(IM=MIN{H6(I)})
を抽出する(ステップ#252,#253)。この相関関数H6
(I)は下式のようになる。
KW (m) = K2 (m) + K2 (m + 1) + K2 (m + 4) + K2
(M + 5) SW (l) = S2 (l) + S2 (l + 1) + S2 (l + 4) + S2
(L + 5) Next, the correlation function H6 (I) is obtained, and the shift amount IM at which the value of the correlation function H6 (I) is minimized (IM = MIN {H6 (I)})
Is extracted (steps # 252 and # 253). This correlation function H6
(I) is as follows.

ここで、上式のように基準部142aのデータ列から両端
のデータを除いて相関関数H6(I)を求めるのは、後述
の補間演算の際に最小シフト量IM近傍の相関関数H6(IM
−1),H6(I),H6(IM+1)のみを用いるのではな
く、相関関数H6(IM−2),H6(IM+2)をも用いるた
めに相関関数H6(IM−2),H6(IM+2)での参照部142
bのデータに対応する位置が大きくずれるのを補正する
ためである(特開昭60−47211号参照)。
Here, as described above, the correlation function H6 (I) is obtained by removing the data at both ends from the data string of the reference unit 142a because the correlation function H6 (IM) near the minimum shift amount IM at the time of the interpolation calculation described later.
-1), H6 (I), H6 (IM + 1), but also the correlation functions H6 (IM-2), H6 (IM + 2). Reference section 142)
This is for correcting a large deviation of the position corresponding to the data b (see Japanese Patent Application Laid-Open No. 60-47211).

ステップ#254では、これら相関関数H6(IM−2),H6
(IM−1),H6(IM+1),H6(IM+2)を求める。すな
ち、これらの式は、 となる。
In step # 254, these correlation functions H6 (IM-2), H6
(IM-1), H6 (IM + 1), H6 (IM + 2) are obtained. That is, these equations are Becomes

これら相関関数H6(IM−2),H6(IM−1),H6(IM+
1),H6(IM+2)を用いて補正演算を下式のように行
う(ステップ#255)。
These correlation functions H6 (IM-2), H6 (IM-1), H6 (IM +
1) A correction operation is performed using H6 (IM + 2) as in the following equation (step # 255).

XM=IM+{H6(IM−2)−H6(IM+2)}/[MIN
{H6(IM−2),H6(IM+2)}−MAX{H6(IM−1),H
6(IM+1)}]/2 前記補間ピッチXMに係数αを掛けてデフォーカス量DF
(DF=XM・α)に換算する(ステップ#256)。次い
で、第6ブロックBL6のデータの持つコントラスト値し
C(6)を下式のように求める(ステップ#257)。
XM = IM + {H6 (IM-2) -H6 (IM + 2)} / [MIN
{H6 (IM-2), H6 (IM + 2)}-MAX {H6 (IM-1), H
6 (IM + 1)}] / 2 The defocus amount DF is calculated by multiplying the interpolation pitch XM by a coefficient α.
(DF = XM · α) (step # 256). Next, the contrast value C (6) of the data of the sixth block BL6 is obtained as in the following equation (step # 257).

続いて相関関数H6(IM)の最小値の補間値YM1を求
め、この補間値YM1とコントラスト値C(6)とを用い
て比の値R(6)を下式のように求める(ステップ#25
8)。
Subsequently, an interpolation value YM1 of the minimum value of the correlation function H6 (IM) is obtained, and a ratio value R (6) is obtained by using the interpolation value YM1 and the contrast value C (6) as in the following equation (step #) twenty five
8).

YM1=MAX{H6(IM−1),H6(IM+1)}−{|H6(IM
−2)−H6(IM+2)|}/2 R(6)=C(6)/{YM1−OF} 次いで、判定レベルCth6,Rth6にそれぞれ所定値を設
定し、コントラスト値C(6)および比の値R(6)が
共に所定値を満足した場合のみ焦点検出可能とし、コン
トラスト値C(6)あるいは比の値R(6)のいずれか
一方でも満足しない場合には、焦点検出不能とする(ス
テップ#259,#260)。
YM1 = MAX {H6 (IM-1), H6 (IM + 1)}-{| H6 (IM
−2) −H6 (IM + 2) |} / 2 R (6) = C (6) / {YM1−OF} Then, predetermined values are set for the determination levels Cth6 and Rth6, respectively, and the contrast value C (6) and the ratio are set. When both the values R (6) satisfy the predetermined value, focus detection is possible. When either the contrast value C (6) or the ratio value R (6) is not satisfied, focus detection is disabled. (Steps # 259 and # 260).

そののち、第13図のフローチャートに移行し、ステッ
プ#96あるいはステップ#98の処理を行う。
After that, the flow shifts to the flowchart of FIG. 13 to perform the process of step # 96 or step # 98.

次に、ステップ#256の補間演算の手段について第27
図の例を用いて説明する。
Next, regarding the means of the interpolation calculation in step # 256,
This will be described with reference to the example of FIG.

まず、基準部142aのデータ列を“3,2,1,−1,−2,−3"
とし、参照部142bのデータ列を“4,3,2,1,−1,−2,−3,
−4"とすると、相関関数はH(0)=0,H(−1)=6H
(1)=6になる。ここで、参照部142bのデータ列にノ
イズが加わり、参照部142bのデータ列が“4,3,2,0,−1,
−1,−3,−4"に変化すると、相関関数はH(0)=2,H
(−1)=5.5,H(1)=6になり、合焦点、すなわ
ち、相関関数H(IM)に対するノイズの影響が最も大き
く、相関関数H(IM−1),H(IM+1)への影響は比較
的小さくなる。このため、相関関数H(IM)を用いず
に、相関関数H(IM)の前後の相関関数H(IM−2),H
(IM−1),H(IM+1),H(IM+2)を用いてノイズの
影響を小さくするようにしている。
First, the data string of the reference unit 142a is set to “3, 2, 1, −1, −2, −3”.
And the data string of the reference unit 142b is “4, 3, 2, 1, −1, −2, −3,
If -4 ", the correlation function is H (0) = 0, H (-1) = 6H
(1) = 6. Here, noise is added to the data sequence of the reference unit 142b, and the data sequence of the reference unit 142b is “4, 3, 2, 0, −1,
-1, -3, -4 ", the correlation function becomes H (0) = 2, H
(−1) = 5.5, H (1) = 6, the influence of noise on the focal point, that is, the correlation function H (IM) is the largest, and the correlation function H (IM−1), H (IM + 1) The effect is relatively small. Therefore, the correlation function H (IM-2), H before and after the correlation function H (IM) is used without using the correlation function H (IM).
The influence of noise is reduced using (IM-1), H (IM + 1), and H (IM + 2).

また、ステップ#258では、第18図(a)のような通
常の補間演算を行うと、オフセット量が生じるため、補
間値YM1からMAX{H6(IM−1),H6(IM+1)}と相関
関数H6(IM)との差OF1、あるいはMAX{H6(IM−2),
H6(IM+2)}とMAX{H6(IM−1),H6(IM+1)}
との差OF2、あるいはコントラスト値C(6)を引いた
値に基づいて設定した値OFを用いて比の値R(6)の演
算を行う。
In step # 258, when a normal interpolation operation as shown in FIG. 18 (a) is performed, an offset amount is generated, so that the interpolation value YM1 is correlated with MAX {H6 (IM-1), H6 (IM + 1)}. The difference OF1 from the function H6 (IM) or MAX {H6 (IM-2),
H6 (IM + 2)} and MAX {H6 (IM-1), H6 (IM + 1)}
The value of the ratio R (6) is calculated using the value OF2 set based on the difference OF2 from the difference or the value obtained by subtracting the contrast value C (6).

〔発明の効果〕〔The invention's effect〕

本発明は、二次フィルタ手段を用いて光像の相対的変
位を検出するときは、一次フィルタ手段で抽出されたデ
ータから二次フィルタ手段を用いて周波数成分のデータ
を形成するので、作成データを記憶させるRAM等のメモ
リの利用効率を図りながらデータ作成を迅速化できる。
According to the present invention, when the relative displacement of the light image is detected by using the secondary filter means, the data of the frequency component is formed by using the secondary filter means from the data extracted by the primary filter means. Data creation can be speeded up while increasing the efficiency of use of a memory such as a RAM for storing data.

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

第1図は本発明に係る自動焦点検出装置を備えたカメラ
の概略構成図、第2図は焦点検出手段の機構構成図、第
3図は光電変換素子アレイを示す図、第4図はファイン
ダ内の撮影画面の焦点検出領域を示す図、第5図は第1
アイランド〜第3アイランドに対応する基準部を拡大し
た図、第6図,第7図は各ブロックのデフォーカス範囲
を説明する図、第8図は本発明に係る自動焦点検出装置
をマイコンを用いて構成したカメラの回路ブロック図、
第9図,第10図はマイコンの割り込み動作のフローチャ
ート、第11図〜第14図は第1アイランド〜第3アイラン
ドのデフォーカス量演算のサブルーチンを示すフローチ
ャート、第15図は露出演算のサブルーチンを示すフロー
チャート、第16図はデフォーカス量の演算手段を選択す
る手順を説明する図、第17図は平均処理幅を求めるサブ
ルーチンを示すフローチャート、第18図(a)は第3ブ
ロックのデフォーカス量の演算および焦点検出不能判断
を説明する図、第18図(b)は人物が並んでいるような
場合に誤判定することを説明する図、第19図は各ブロッ
クの相関関数およびコントラスト値の演算を示す図、第
20図〜第22図はコントラスト限界の判定のサブルーチン
を示すフローチャート、第23図〜第25図は平均処理ルー
チンを示すフローチャート、第26図はデフォーカス量演
算サブルーチンを示すフローチャート、第27図は補間演
算の手段を説明する図である。 1…自動焦点検出装置、2…撮影レンズ、3…焦点検出
手段、4…デフォーカス量決定手段、5…レンズ位置検
出手段、6…レンズ駆動手段、7…制御手段、8…被写
体、21…第1アイランド、22…第2アイランド、23…第
3アイランド、26…マイコン、27…レンズ回路、28…焦
点検出データ出力回路、34…レンズ制御回路、35…電源
電池、36…給電回路、141a,142a,143a…基準部、141b、
142b,143b…参照部、BL1…第1ブロック、BL2…第2
ブロック、BL3…第3ブロック、BL4…第4ブロック、
BL5…第5ブロック、BL9…第9ブロック、BL10…第10
ブロック、SW1…電源スイッチ、SW2…撮影準備スイッ
チ、SW4…選択スイッチ。
FIG. 1 is a schematic configuration diagram of a camera provided with an automatic focus detection device according to the present invention, FIG. 2 is a configuration diagram of a focus detection unit, FIG. 3 is a diagram showing a photoelectric conversion element array, and FIG. FIG. 5 shows a focus detection area of a photographing screen in FIG.
FIGS. 6 and 7 are diagrams illustrating the defocus range of each block, and FIG. 8 is a diagram illustrating an automatic focus detection device according to the present invention using a microcomputer. Circuit block diagram of the camera configured
9 and 10 are flowcharts of the interrupt operation of the microcomputer, FIGS. 11 to 14 are flowcharts showing a subroutine of the defocus amount calculation of the first to third islands, and FIG. 15 is a subroutine of the exposure calculation. FIG. 16 is a diagram for explaining a procedure for selecting a calculating means of the defocus amount, FIG. 17 is a flowchart showing a subroutine for obtaining an average processing width, and FIG. 18 (a) is a defocus amount of the third block. FIG. 18 (b) is a diagram for explaining the calculation and the focus detection impossible determination, FIG. 18 (b) is a diagram for explaining erroneous determination when a person is lined up, and FIG. FIG.
20 to 22 are flowcharts showing a subroutine for determining the contrast limit, FIGS. 23 to 25 are flowcharts showing an averaging process routine, FIG. 26 is a flowchart showing a defocus amount calculation subroutine, and FIG. 27 is an interpolation FIG. 4 is a diagram for explaining means of calculation. DESCRIPTION OF SYMBOLS 1 ... Automatic focus detection device, 2 ... Photographing lens, 3 ... Focus detection means, 4 ... Defocus amount determination means, 5 ... Lens position detection means, 6 ... Lens drive means, 7 ... Control means, 8 ... Subject, 21 ... First island, 22 second island, 23 third island, 26 microcomputer, 27 lens circuit, 28 focus detection data output circuit, 34 lens control circuit, 35 power battery, 36 power supply circuit, 141a , 142a, 143a… Reference part, 141b,
142b, 143b: Reference part, BL1: First block, BL2: Second
Block, BL3: third block, BL4: fourth block,
BL5: Fifth block, BL9: Ninth block, BL10: Tenth
Block, SW 1 ... power switch, SW 2 ... shooting preparation switch, SW 4 ... selection switch.

フロントページの続き (72)発明者 上田 浩 大阪府大阪市東区安土町2丁目30番地 大阪国際ビル ミノルタカメラ株式会社 内 (72)発明者 糊田 寿夫 大阪府大阪市東区安土町2丁目30番地 大阪国際ビル ミノルタカメラ株式会社 内 (72)発明者 石橋 賢司 大阪府大阪市東区安土町2丁目30番地 大阪国際ビル ミノルタカメラ株式会社 内 (72)発明者 沖須 宣之 大阪府大阪市東区安土町2丁目30番地 大阪国際ビル ミノルタカメラ株式会社 内 (56)参考文献 特開 昭59−142506(JP,A) (58)調査した分野(Int.Cl.6,DB名) G02B 7/11Continuation of the front page (72) Inventor Hiroshi Ueda 2-30 Azuchicho, Higashi-ku, Osaka-shi, Osaka Inside Osaka International Building Minolta Camera Co., Ltd. Kokusai Building Minolta Camera Co., Ltd. (72) Kenji Ishibashi 2-30-30 Azuchicho, Higashi-ku, Osaka-shi, Osaka Osaka Kokusai Building Minolta Camera Co., Ltd. 30 Osaka International Building Minolta Camera Co., Ltd. (56) References JP-A-59-142506 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G02B 7/11

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】第1の空間周波数成分を抽出する一次フィ
ルタ手段と、この抽出された空間周波数成分に基づいて
焦点検出を行う第1の焦点検出手段と、前記抽出された
空間周波数成分から第2の空間周波数成分を抽出する二
次フィルタ手段と、この二次フィルタ手段で抽出された
空間周波数成分に基づいて焦点検出を行う第2の焦点検
出手段と、前記第1の焦点検出手段で焦点検出不能と判
定された時に前記二次フィルタ手段と第2の焦点検出手
段とを作動させる判定手段とを備えたことを特徴とする
自動焦点検出装置。
A first filter means for extracting a first spatial frequency component; a first focus detecting means for performing focus detection based on the extracted spatial frequency component; and a first filter means for detecting a focus based on the extracted spatial frequency component. A second filter means for extracting two spatial frequency components, a second focus detection means for performing focus detection based on the spatial frequency components extracted by the second filter means, and a focus by the first focus detection means. An automatic focus detection device comprising: a determination unit that activates the secondary filter unit and the second focus detection unit when it is determined that detection is impossible.
【請求項2】前記二次フィルタ手段は、前記一次フィル
タ手段に比べて低周波数成分を多く抽出するように設定
されていることを特徴とする請求項1記載の自動焦点検
出装置。
2. The automatic focus detection device according to claim 1, wherein said secondary filter means is set to extract more low frequency components than said primary filter means.
JP63118792A 1988-05-16 1988-05-16 Automatic focus detection device Expired - Lifetime JP2770318B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63118792A JP2770318B2 (en) 1988-05-16 1988-05-16 Automatic focus detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63118792A JP2770318B2 (en) 1988-05-16 1988-05-16 Automatic focus detection device

Related Child Applications (10)

Application Number Title Priority Date Filing Date
JP10089889A Division JP2671489B2 (en) 1989-04-20 1989-04-20 Focus detection device
JP10325589A Division JPH0215217A (en) 1989-04-21 1989-04-21 Focus detector
JP10325689A Division JPH0215218A (en) 1989-04-21 1989-04-21 Focus detecting device
JP10545689A Division JP2671490B2 (en) 1989-04-24 1989-04-24 Focus detection device
JP1105458A Division JP2770408B2 (en) 1989-04-24 1989-04-24 Focus detection device
JP1105457A Division JP2770407B2 (en) 1989-04-24 1989-04-24 Focus detection device
JP10859189A Division JP2671491B2 (en) 1989-04-26 1989-04-26 Focus detection device
JP10858989A Division JP2682132B2 (en) 1989-04-26 1989-04-26 Focus detection device
JP10859089A Division JPH02176610A (en) 1989-04-26 1989-04-26 Focus detector
JP1119762A Division JP2671493B2 (en) 1989-05-13 1989-05-13 Focus detection device

Publications (2)

Publication Number Publication Date
JPH0320706A JPH0320706A (en) 1991-01-29
JP2770318B2 true JP2770318B2 (en) 1998-07-02

Family

ID=14745215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63118792A Expired - Lifetime JP2770318B2 (en) 1988-05-16 1988-05-16 Automatic focus detection device

Country Status (1)

Country Link
JP (1) JP2770318B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS59142506A (en) * 1983-02-02 1984-08-15 Nippon Kogaku Kk <Nikon> Focus detecting device

Also Published As

Publication number Publication date
JPH0320706A (en) 1991-01-29

Similar Documents

Publication Publication Date Title
JP2605282B2 (en) Automatic focusing device
JP3070624B2 (en) Automatic focus detection device
JPH05297266A (en) Camera with focus sensing means and line-of-sight sensing means
JPH10311999A (en) Camera
US4994841A (en) Automatic focus detecting means
US5243375A (en) Automatic focus adjusting device for adjusting the focus of the main object to be photographed
US5144357A (en) Automatic focus detecting means
JP2770408B2 (en) Focus detection device
JP2770318B2 (en) Automatic focus detection device
JP2671489B2 (en) Focus detection device
JP4950634B2 (en) Imaging apparatus and imaging system
JP2682132B2 (en) Focus detection device
JP2671491B2 (en) Focus detection device
JP2770407B2 (en) Focus detection device
JP2671493B2 (en) Focus detection device
JP2671490B2 (en) Focus detection device
JP3224535B2 (en) Camera exposure control device
JPH0215217A (en) Focus detector
JPS63262611A (en) Automatic focusing device
JP2671421B2 (en) Distance detection device using focus detection device
JP3912853B2 (en) camera
JP2979417B2 (en) Multi-photometer
JPH06138378A (en) Camera provided with focus detecting means and line-of-sight detecting means
JP2671490C (en)
JP2018197812A (en) Imaging device, method for controlling the same, and program

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080417

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090417

Year of fee payment: 11

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090417

Year of fee payment: 11