JPH0320706A - Automatic focus detecting device - Google Patents

Automatic focus detecting device

Info

Publication number
JPH0320706A
JPH0320706A JP11879288A JP11879288A JPH0320706A JP H0320706 A JPH0320706 A JP H0320706A JP 11879288 A JP11879288 A JP 11879288A JP 11879288 A JP11879288 A JP 11879288A JP H0320706 A JPH0320706 A JP H0320706A
Authority
JP
Japan
Prior art keywords
defocus
focus detection
block
island
lens
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP11879288A
Other languages
Japanese (ja)
Other versions
JP2770318B2 (en
Inventor
Tokuji Ishida
石田 徳治
Masataka Hamada
正隆 浜田
Hiroshi Ueda
浩 上田
Toshio Norita
寿夫 糊田
Kenji Ishibashi
賢司 石橋
Noriyuki Okisu
宣之 沖須
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)

Abstract

PURPOSE:To detect relative displacement in a short time by performing focus detection by using a secondary filter means and a 2nd focus detecting means unless a focus is detected by a primary filter means and a 1st focus detecting means. CONSTITUTION:A central controller 26 controls the whole camera to calculate exposure, etc., and also extracts a 1st spatial frequency component by the primary filter means. The 1st focus detecting means performs focus detection according to the extracted spatial frequency component. Further, the secondary filter means extracts a 2nd spatial frequency component and the 2nd focus detecting means performs focus detection according to the extracted component. Then only when the 1st focus detecting means decides that focus detection is impossible, the secondary filter means and 2nd focus detecting means are put in operation. Consequently, when the 1st focus detecting means decides that focus detection is possible, the detection time can be shortened without operating the secondary filter means.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、被写体の光像を形成する結像光学系の焦点調
整状態を自IJJ検出するカメラ等の光学装置のび動焦
点検出装置に関するものである。
Detailed Description of the Invention (Field of Industrial Application) The present invention relates to a moving focus detection device for an optical device such as a camera that detects the focus adjustment state of an imaging optical system that forms an optical image of a subject. It is.

(従来の技術) 従来から、被写体のほぼ同一部分に関する2つの光像を
、複数の光電変換素子の配列から成る一対の光電変換素
子アレイ上に導き、この光電変換素子アレイの出力を演
算して前記光電変換素子アレイ上の光像の相対的変位を
検出し、この検出結果からlll彰レンズの焦点調整を
行う自動焦点検出装置がある。また、前記光電変換素子
アレイの出力から複数のフィルタ手段(一次フィルタ手
段、二次フィルタ手段等)を用いて被写体像の特定の周
波数成分を複数個抽出し、これらの周波数成分に基づい
て演樟を行って光像の相対的変位を検出し、搬彰レンズ
の焦点調整を行う自動焦点検出装置がある(特開昭58
−87511月公報、特開昭59−142506号公報
、特開昭60−151607号公報、特rM昭61−2
09413号公報参照〉。
(Prior Art) Conventionally, two optical images of almost the same part of a subject are guided onto a pair of photoelectric conversion element arrays consisting of a plurality of photoelectric conversion element arrays, and the outputs of the photoelectric conversion element arrays are calculated. There is an automatic focus detection device that detects the relative displacement of the optical image on the photoelectric conversion element array and adjusts the focus of a lens based on the detection result. Further, 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 a calculation is performed based on these frequency components. There is an automatic focus detection device that detects the relative displacement of an optical image by performing
-875 November Publication, JP-A-59-142506, JP-A-60-151607, Special rM Sho 61-2
See Publication No. 09413>.

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

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

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

〔課題を解決するだめの手段〕[Failure to solve the problem]

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

〔作用〕[Effect]

前記構成の自動魚点検出装詔によれば、一次フィルタ手
段を用いても焦点が検出できないときに二次フィルタ手
段を作動させるので、一次フィルタ手段で抽出された周
波数成分のみで焦点が検出できる場合には、二次フィル
タ手段による周波数成分の抽出を行う時間を削減できる
。また、二次フィルタ手段で抽出された周波数成分を用
いて焦点を検出するときには、一次フィルタ手段で抽出
された周波数成分のデータを記憶するRAM等のメモリ
に二次フィルタ手段で抽出された周波数成分のデータを
記憶させることができる。
According to the automatic fish point detection system having the above structure, the secondary filter is activated when the focus cannot be detected even with the use of the primary filter, so the focus can be detected using only the frequency components extracted by the primary filter. In this case, the time required for extracting frequency components by the secondary filter means can be reduced. In addition, when detecting a focus using the frequency components extracted by the secondary filter means, the frequency components extracted by the secondary filter means are stored in a memory such as a RAM that stores data of the frequency components extracted by the primary filter means. data can be stored.

(実施例) 第1図は本発明に係る自動焦点検出装置を備えたカメラ
の概略構或の一実施例を示す。自動焦点検出装111は
撮影レンズ2と焦点検出手段3とデフォーカス量決定手
段4とレンズ位置検出手段5とレンズ駆動手段6と制御
手段7とから構或されている。この撮影レンズ2は被写
体8から発せられた光束9を焦点検出千段3に導くもの
である。
(Embodiment) FIG. 1 shows an embodiment of the schematic structure of a camera equipped with an automatic focus detection device according to the present invention. The automatic focus detection device 111 is composed of a photographic lens 2, a focus detection means 3, a defocus amount determination means 4, a lens position detection means 5, a lens drive means 6, and a control means 7. This photographing lens 2 guides a light beam 9 emitted from a subject 8 to a focus detection stage 3.

焦点検出手段3は光電変換素子アレイ上(図示せず)を
有し、この光電変換素子アレイの出力を演埠処理して光
電変換素子アレイ上の被写体8による光嫌の相対的変位
を検出するものである。
The focus detection means 3 has a photoelectric conversion element array (not shown), and processes the output of the photoelectric conversion element array to detect the relative displacement of the light by the subject 8 on the photoelectric conversion element array. It is something.

また、デフォーカス量決定千段4は前記焦点検出千段3
から出力される変位検出信号に基づいて囮彰レンズ2の
デフォーカス量を決定するものである。レンズ位置検出
手段5は畷影レンズ2の現在の位置を検出するものであ
る。レンズ駆動手段6は前記デフォーカス量決定手段4
のデフォーカス量信号に基づいて搬彰レンズ2を駆動す
るものである。制御手段7は、前記デフォーカス潰に対
応する位置にm影レンズ2が駆動されるようにレンズ駆
動手段6をtilllllするとともに、前記焦点検?
手段3から合魚信号が出力されたとき、m彰レンズ2の
駆動を停止させるものである。
Furthermore, the defocus amount determining stage 4 is the focus detection stage 3.
The defocus amount of the decoy lens 2 is determined based on the displacement detection signal output from the decoy lens 2. The lens position detection means 5 is for detecting the current position of the shadow lens 2. The lens driving means 6 is the defocus amount determining means 4.
The carrier lens 2 is driven based on the defocus amount signal. The control means 7 tillllll the lens driving means 6 so that the m shadow lens 2 is driven to a position corresponding to the defocusing, and also performs the focus detection?
When the matching signal is output from the means 3, the driving of the m-photo 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 mechanical configuration of the focus detection stage 3. The focus detection stage 3 is composed of a main mirror 10, a mirror 11, and a focus detection optical system 12. This main mirror 10 branches the light beam 9 that has passed through the carrier lens 2 into a finder optical system and a sub-mirror 11 (not shown). The mirror 11 further branches the light beam 9 branched by the main mirror 10 to a focus detection optical system 12ε film surface 13.

前記焦点検出光学系12は光電変換素子アレイ141,
142.143とセバレータレンズ15と絞りマスク1
6とモジコ、一ルミラー17とコンデンサレンズ181
,182.183と視野絞り19tから構成されている
。光電変換素子アレイ141.142.143は複数の
ccom像素子等を配列したもので、セバレータレンズ
15の焦点而14上のワンチップ上に形成されている。
The focus detection optical system 12 includes a photoelectric conversion element array 141,
142.143 and separator lens 15 and aperture mask 1
6 and Mojico, 1 Lumirror 17 and Condenser Lens 181
, 182, 183 and a field stop 19t. The photoelectric conversion element arrays 141, 142, and 143 are arrays of a plurality of CCOM image elements, etc., and are formed on one chip above the focal point 14 of the separator lens 15.

セバレータレンズ15はセバレータレンズ対151,1
52.153を有し、分岐された光束9を光電変換素子
アレイ141,142.143に投影するものである。
The separator lens 15 is a separator lens pair 151,1
52.153, and projects the branched light beam 9 onto photoelectric conversion element arrays 141, 142.143.

絞りマスク16は円形あるいは長円形の開口部161,
162.163を有し、セパレータレンズ15へ入力す
る光束9を限定するものである。モジュールミラー17
はコンデンサレンズ181,182.183を通過した
光束9をセパレータレンズ15へ導くものである。視野
絞り19は矩形開口部191,192,193を有する
とともに、焦点面近傍に配設され、焦点検出光学系12
に入力される光束9の視野を限定するものである。
The aperture mask 16 has a circular or oval opening 161,
162.163, and limits the light flux 9 input to the separator lens 15. module mirror 17
is for guiding the light beam 9 that has passed through the condenser lenses 181, 182, and 183 to the separator lens 15. The field stop 19 has rectangular openings 191, 192, and 193, and is arranged near the focal plane, and is connected to the focus detection optical system 12.
This is to limit the field of view of the light beam 9 input to the.

第3図は前記光電嚢換素子アレイ141,142,14
3の受光部(以下、光電変換素子の受光部と蓄梢部と転
送部とを含めてCCDという)を示している。この光電
変換素子アレイ141は基準部141aと参照部141
bと光電センサ141Cとからなり、同様に光電変換素
子アレイ142は基準部142aと参照部142bと光
電センサ142Cとからなり、光電変換素子アレイ14
3は基準部143aと参照部143bと光電センサ14
3Cとからなる。前記光電センサ14LC.142c.
143cはそれぞれ基準部141a,142a.143
aの一方の側部に長手方向に配設され、受光看に応じた
信号を出力するようになっている。そして、この受光吊
に応じたイi月によりCODの′a積部への蓄積時間を
制御するようになっている。また、光電変換素子アレイ
141,142.143は、第4図に示すように、ファ
インダ内の撤影画面20の中央部に位置する魚点検出領
1121.22.23 <以下、それぞれ第1アイラン
ド21,第2アイランド22.第3アイランド23とい
う)に投影される被写体8の光像に基づいて変位検出信
号を出力するようになっている。
FIG. 3 shows the photoelectric conversion element array 141, 142, 14.
3 (hereinafter referred to as a CCD including the light receiving section, storage top, and transfer section of the photoelectric conversion element). This photoelectric conversion element array 141 includes a reference portion 141a and a reference portion 141.
Similarly, the photoelectric conversion element array 142 consists of a reference part 142a, a reference part 142b, and a photoelectric sensor 142C, and the photoelectric conversion element array 14
3 is a reference part 143a, a reference part 143b, and a photoelectric sensor 14
It consists of 3C. The photoelectric sensor 14LC. 142c.
143c are the reference parts 141a, 142a. 143
It is disposed in the longitudinal direction on one side of the lens a, and outputs a signal according to the light received. Then, the accumulation time of COD in the 'a' accumulation part is controlled by the month corresponding to the light receiving period. In addition, as shown in FIG. 4, the photoelectric conversion element arrays 141, 142, and 143 are connected to fish point detection areas 1121, 22, and 23, respectively, located in the center of the shadow removal screen 20 in the finder. 21, 2nd island 22. A displacement detection signal is output based on the optical image of the subject 8 projected onto the third island 23).

繍影画面20の中央部に点線で示された領域24は撮影
者に焦点検出を行っている領域を表示するものである。
An area 24 indicated by a dotted line in the center of the embroidery image screen 20 is for displaying to the photographer the area where focus detection is being performed.

また、表示部25は合焦時に点灯するものである。Further, the display section 25 lights up when the image is in focus.

前記基準部141a,142a,143aの各画素数X
、および参照部14lb,142b.143bの各画素
数Yは、例えば、第3図に示すように、光電変換素子ア
レイ141および光電変換素子アレイ143ではそれぞ
れ基準部の画素数Xは34個で、参照部の画素数Yは4
4個で構或され、光電変換素子アレイ142では基準部
の画素数Xは44個で、参照部の画素数Yは52個で構
戊されるようになっている。
The number of pixels in each of the reference portions 141a, 142a, and 143a
, and reference portions 14lb, 142b. For example, as shown in FIG. 3, in the photoelectric conversion element array 141 and the photoelectric conversion element array 143, the number of pixels Y in the reference part is 34, and the number Y of pixels in the reference part is 4.
In the photoelectric conversion element array 142, the number of pixels X in the reference part is 44, and the number Y of pixels in the reference part is 52.

また、自動焦点検出装圃1では基準部1 4 1 a.
142a.143aの各画素のデータを複数のブロック
に分割し、この分割した各ブロックをそれぞれの参照部
14lb,142b,143bの全てのデータと比較し
て焦点検出を行う。そして、各ブロックでの焦点検出結
果のうち、最も後ビンのデータを前記の各アイランド2
1.22.23の焦点検出データとし、さらに各アイラ
ンド21.22.23の焦点検出データとm彰レンズ2
の搬影倍率のデータとに基づいて緻影レンズ2を駆動し
、合焦させている。
Further, in the automatic focus detection device 1, the reference portion 1 4 1 a.
142a. The data of each pixel of 143a is divided into a plurality of blocks, and each divided block is compared with all the data of each reference section 14lb, 142b, 143b to perform focus detection. Then, among the focus detection results in each block, the data of the rearmost bin is used for each island 2.
The focus detection data of 1.22.23, and the focus detection data of each island 21.22.23 and m-sho lens 2.
Based on the data of the image transport magnification, the high-density lens 2 is driven and focused.

次いで、前記光電変換素子アレイ141,142,14
3からデフォーカス量(すなわら、デフォーカス昂とは
結像光学系の予定焦点面と被写体像面との光軸方向のず
れ出)を検出する範囲(デフォーカス範曲)を求める手
段について第5図〜第7図を用いて説明する。
Next, the photoelectric conversion element arrays 141, 142, 14
Regarding the means for determining the range (defocus range) for detecting the amount of defocus (i.e., the deviation in the optical axis direction between the intended focal plane of the imaging optical system and the image plane of the subject) from 3. This will be explained using FIGS. 5 to 7.

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

各アイランド21,22.23の基準部141a,14
2a.143aにおける前記数値は、第1アイランド2
1では30個、第2アイランド22では40個、第3ア
イランド23では301!!IIになる。また、参照部
14lb,142b.143bに対しても基準部141
a.142a.143aの差分データの数値と同様に求
められる。つまり、参照部14lb,142b.143
bの数値は、第1アイランド21では40個、第2アイ
ランド22では48個、第3アイランド23では40個
になる。
Reference parts 141a, 14 of each island 21, 22.23
2a. The numerical value in 143a is the first island 2
1 has 30 pieces, 2nd island 22 has 40 pieces, and 3rd island 23 has 301 pieces! ! Become II. Further, reference portions 14lb, 142b. 143b as well as the reference part 141
a. 142a. It is obtained in the same way as the numerical value of the difference data of 143a. That is, the reference portions 14lb, 142b. 143
The numerical value of b is 40 for the first island 21, 48 for the second island 22, and 40 for the third island 23.

次に、各アイランド21.22.23でのブロック分割
について説明する。すなわち、第1アイランド21では
、上端の差分データからK1(1〜20〉、κ1《11
〜30)の2つのブロックに分け、それぞれ第1ブロッ
クB11、第2ブロックBL2とする。第2アイランド
22では、左端の差分データからκ2(1〜20)、K
2(11〜30)、K2 ( 2 1〜40)の3つの
ブロックに分け、それぞれ第3ブロックBL3 、第4
ブロックB14、第5ブロックBL5とする。第3アイ
ランド23では、上端の差分データからK3(1〜20
)、K3(11〜30)の2つのブロックに分け、それ
ぞれ弟9プOツクBL9、第10ブロックBLIOとす
る。
Next, block division in each island 21, 22, and 23 will be explained. That is, in the first island 21, K1 (1 to 20>, κ1<<11
~30) are divided into two blocks, and are respectively referred to as a first block B11 and a second block BL2. In the second island 22, κ2 (1 to 20), K
2 (11-30), K2 (2 1-40), and the third block BL3 and the fourth block, respectively.
It is assumed that the block B14 and the fifth block BL5. In the third island 23, K3 (1 to 20
), K3 (11 to 30) are divided into two blocks, the younger brother 9 block BL9 and the 10th block BLIO.

さらに、第2アイランド22では、低周波成分でなる被
写体に合焦させるために抽出周波数を変えた差分データ
を検出し(第2の空間周波数成分抽出手段)、この差分
データを第6ブロックBL6、第7ブロックBL7およ
び第8ブロックBL8に分割して焦点検出データに用い
る。すなわら、基準部142aおよび参照部142bの
各画素のデータを、例えば、それぞれ7つ置きに差分を
とり、この差分データの隣接間の和を求め、この和のデ
ータを第6ブロックBL5にする。すなわら、差分デー
タ6のデータの数は、基準部142aでは36個、参照
部142bでは44個になり、第6ブロックBL5の和
のデータ数は、M準部142aでは35個、参照部14
2bでは43個になる。そして、この基準部142aの
35個の左側の25個を第7ブロックBL7とし、右側
の25個を第8ブロックBL8になる。
Furthermore, the second island 22 detects difference data with different extraction frequencies in order to focus on the subject consisting of low frequency components (second spatial frequency component extraction means), and uses this difference data to the 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 in the standard part 142a and the reference part 142b is differenced, for example, every seventh pixel, the sum of the difference data between adjacent pixels is found, and the data of this sum is sent to the sixth block BL5. do. In other words, the number of differential data 6 is 36 in the reference section 142a and 44 in the reference section 142b, and the total number of data in the sixth block BL5 is 35 in the M quasi-section 142a and 44 in the reference section 142b. 14
In 2b, there are 43 pieces. Of the 35 reference portions 142a, the 25 pieces on the left side are the seventh block BL7, and the 25 pieces on the right side are the eighth block BL8.

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

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

第6図は第2アイランド22の基準部142aおよび参
照部142bを拡大して示しており、同図を用いてブロ
ック分けした第4ブロックBL4のデフォーカス範囲を
説明する。つまり、基準部142aの第41OツクBL
4の像と合焦するには、参照部142bの中央に位置す
るブロックBL41、すなわち参照部142bの左端よ
り15′#1目から34番目に位置する像のデータと第
4ブロックB[4のデータK2(11〜30)とが一致
するときである。そして、これより像の一致が参照部1
42bの左側になると前ビンとなり、前ビンの最大のず
れデータ数〈以下、ずれピッチという〉は14個となる
。一方、像の一致が参照部142bの右側になると後ピ
ンとむり、後ビンの煽大のずれピッチは14個となる。
FIG. 6 shows an enlarged view of the reference portion 142a and the reference portion 142b of the second island 22, and the defocus range of the fourth block BL4, which is divided into blocks, will be explained using this figure. In other words, the 41st Ock BL of the reference part 142a
In order to focus on the image No. 4, the data of the block BL41 located at the center of the reference section 142b, that is, the image located 34th from 15'#1 from the left end of the reference section 142b, and the data of the image No. 4 of the fourth block B[4] are used. This is when the data K2 (11 to 30) match. From this, the image matches the reference part 1.
The left side of 42b is the previous bin, and the maximum number of deviation data (hereinafter referred to as deviation pitch) of the previous bin is 14. On the other hand, when the images coincide on the right side of the reference portion 142b, the rear is out of focus, and the deviation pitch of the rear bin becomes 14.

また、第1アイランド21および第3アイランド23に
ついても同様である。すなわち、第7図に示すように、
第3ブロックBL3では、前ビン側ずれピッチが4個、
後ビン側ずれピッチが24個であり、第570ツクBL
5では、前ビン側ずれピッチが24個、後ビン側ずれピ
ッチが4個である。
The same applies to the first island 21 and the third island 23. That is, as shown in Figure 7,
In the third block BL3, there are 4 front bin side deviation pitches,
The rear bin side shift pitch is 24 pieces, and the 570th Tsuku BL
In No. 5, there are 24 pitches deviating from the front bin side and 4 pitches deviating from the rear bin side.

また、第1ブロックBLlおよび第9ブロックBL9で
は、前ビン側ずれピッチが5個、後ビン側ずれピッチが
15個であり、第2ブロックBL2および第10ブロッ
クBL10では、前ビン側ずれピッチが15個、後ビン
側ずれビッヂが5個である。さらに、第6ブロック8m
5では、前ビン側、後ビン側共にずれピッチが4個であ
る。
Furthermore, in the first block BLl and the ninth block BL9, the front bin side deviation pitch is 5 pieces and the rear bin side deviation pitch is 15 pieces, and in the second block BL2 and the tenth block BL10, the front bin side deviation pitch is There are 15 bits, and 5 bits are off to the rear bin side. Furthermore, the 6th block 8m
5, the shift pitch is 4 on both the front bin side and the rear bin side.

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

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

中央制御回路(以下、マイコンという〉26はカメラ全
体の制御し、露出等を演算するとともに、第1の空間周
波数成分を抽出し(一次フィルタ手段)、この抽出され
た空間周波数成分に基づいて焦点検出を行い(第1の焦
点検出手段)、さらに前記抽出された空間周波数成分に
基づいて第2の空間周波数成分を抽出し(二次フィルタ
手段)、この二次フィルタ手段で抽出された空間周波数
成分に基づいて焦点検出を行い(第2の焦点検出手段)
、前記第1の焦点検出手段で焦点検出不能と判定された
ときに前記二次フィルタ手段と第2の焦点検出手段とを
作動させる(判定手段〉ものである。レンズ回路27は
カメラ本体く図示せず)に装肴される撮影レンズ2(交
換レンズ)固有のデータをマイコン26に伝達するもの
である。焦点検出データ出力回路28は第1図の焦点検
出千段3に対応するもので、光電変換素子アレイのアナ
ログ出力をデジタル出力に変換してマイコン26に伝達
するものである。輝度検出回路29は随彰レンズ2を通
過した光束9を測定することにより被写体8の明るさを
検出し、この明るさに対応したアベックスIBvoをマ
イコン26に伝達するものである。フィルム感度読取回
路30はフィルム(図示せず〉からフィルム感度を読取
り、このフィルム感度に対応したアベックス値Svをマ
イコン26に伝達するものである。
A central control circuit (hereinafter referred to as a microcomputer) 26 controls the entire camera, calculates exposure, etc., extracts the first spatial frequency component (primary filter means), and adjusts the focus based on the extracted spatial frequency component. detection (first focus detection means), further extracting a second spatial frequency component based on the extracted spatial frequency component (secondary filter means), and extracting a second spatial frequency component based on the extracted spatial frequency component (secondary filter means). Focus detection is performed based on the component (second focus detection means)
, when it is determined that the focus cannot be detected by the first focus detection means, the secondary filter means and the second focus detection means are activated (determination means).The lens circuit 27 is connected to the camera body. This is to transmit data specific to the photographing lens 2 (interchangeable lens) mounted on the camera (not shown) to the microcomputer 26. The focus detection data output circuit 28 corresponds to the focus detection stage 3 in FIG. The brightness detection circuit 29 detects the brightness of the subject 8 by measuring the luminous flux 9 that has passed through the Zuisho lens 2, and transmits the abex IBvo corresponding to this brightness to the microcomputer 26. The film sensitivity reading circuit 30 reads the film sensitivity from a film (not shown) and transmits an abex value Sv corresponding to the film sensitivity to the microcomputer 26.

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

また、マイコン26の内部にはカウンタが備えられてい
る。このカウンタは、Wi影レンズ2の無限達位置から
の繰り出し位置を検出するもので、前記パルス数に対し
てカウントアップあるいはカウントダウンするようにな
っている。また、後述の電源スイッチ(メインスイッチ
)SW1がオンざれ、さらに、緻彰レンズ2が駆動され
て緻彰レンズ2が無限遠位置に繰り込まれたときには、
前記カウンタはリセットされるようになっている。
Additionally, a counter is provided inside the microcomputer 26. This counter detects the extended position of the Wi shadow lens 2 from the infinite position, and is designed to count up or down with respect to the number of pulses. Further, when the power switch (main switch) SW1, which will be described later, is turned on, and the photographic lens 2 is driven and the photographic lens 2 is retracted to the infinity position,
The counter is adapted to be reset.

電源電池35はマイコン26および後述のスイッチ類に
直接電力を供給し、それら以外の回路には後述の給電回
路36を介して電力を供給するものである。給電回路3
6はマイコン26からの制御信号に基づいてレンズ回路
27、焦点検出データ出力回路28等の回路に電力を供
給するものである。
The power supply battery 35 directly supplies power to the microcomputer 26 and switches described below, and supplies power to other circuits via a power supply circuit 36 described later. Power supply circuit 3
Reference numeral 6 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に入ノJするものである。磯彰準備スイッチSW
2はレリーズスイッヂ(図示せず)の操作により開閉さ
れるもので、この撤影準備スイッチSW2がオンすると
、焦点検出動作が開始されるようになっている。リミッ
トスイッチSW3は、II!l彰レンズ2が無限遠位置
に繰り込まれたとき、あるいは最先端まで繰り出された
ときにオンするものである。選択スイッチSW4は、自
動焦点調整モード(以下、AFモードという)か、ある
いは焦点検出表示モード《以下、FAモードという)か
を選択するもので、この選択スイッチSW4をオンする
とFAモードになり、オフするとAFモードになるもの
である。
The power switch SW1 starts or stops the operation of the camera when opened or closed. The one-shot circuit 37 generates a predetermined pulse in conjunction with the opening/closing operation of the power switch SW1, and inputs this pulse to the microcomputer 26. Akira Iso preparation switch SW
2 is opened and closed by operating a release switch (not shown), and when this removal preparation switch SW2 is turned on, a focus detection operation is started. Limit switch SW3 is II! This is turned on when the lens 2 is retracted to an infinity position or extended to the most extreme position. The selection switch SW4 is used to select automatic focus adjustment mode (hereinafter referred to as AF mode) or focus detection display mode (hereinafter referred to as FA mode).When this selection switch SW4 is turned on, it becomes FA mode, and when it is turned off. Then the camera will enter AF mode.

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

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

すなわち、マイコン26は搬彰準備スイッチSW2のオ
ンによる焦点検出動作を禁止しくステップ#1)、この
割り込み動作が電源スイッチSW1のオンによるものか
、オフによるものかをマイコン26の割込入力端子IP
1に入力された電圧により判定する(ステップ#2)。
In other words, the microcomputer 26 prohibits the focus detection operation due to the turning on of the focus preparation switch SW2 (step #1), and determines whether this interrupt operation is due to the turning on or turning off of the power switch SW1 via the interrupt input terminal IP of the microcomputer 26.
The determination is made based on the voltage input to step #1 (step #2).

そして、この入力電圧がハイ電圧であれば、ステップ#
3〜#11の処理を行わずに、レンズ回2827等への
電力を停止し、マイコン26は動作待機状態になる(ス
テップ#12,#13)。この入力電圧がロ−m圧であ
れば、電源スイッチSWtはオン状態と判定し、マイコ
ン26内のカウンタの動作を禁止しくステップ#3)、
フロ−チャートの実行に使用するフラグ、およびマイコ
ン26の出力端子類を初明セットする(ステップ#4)
And if this input voltage is high voltage, step #
Without performing the processes 3 to #11, power to the lens circuit 2827 and the like is stopped, and the microcomputer 26 enters an operation standby state (steps #12 and #13). If this input voltage is low-m voltage, the power switch SWt is determined to be on, and the operation of the counter in the microcomputer 26 is prohibited (step #3).
Set the flags used to execute the flowchart and the output terminals of the microcomputer 26 (Step #4)
.

次いで、マイコン26の出力端子OP1をハイ電庄にし
てレンズ回路27等の回路に電力を供給する(ステップ
#5〉。次に、レンズ駆動1,I1御回路34に躍影レ
ンズ2の繰り込み信弓が入力され、搬彰レンズ2は無限
遠位置の方向に繰り込まれる(ステップ#6)。そして
、la影レンズ2が無限遠位置に繰り込まれ、リミット
スイッチSW3がオンするのを待つ(ステップ#7)。
Next, the output terminal OP1 of the microcomputer 26 is set to high voltage to supply power to circuits such as the lens circuit 27 (step #5>). The bow is input, and the carrying lens 2 is retracted toward the infinity position (step #6).Then, the LA shadow lens 2 is retracted to the infinity position, and wait for the limit switch SW3 to be turned on ( Step #7).

ステップ#7でリミットスイッチS W 3がオンする
と、酎彰レンズ2の駆動を停止させる(ステップ#8)
When the limit switch SW 3 is turned on in step #7, the driving of the Chusho lens 2 is stopped (step #8)
.

また、これに伴って、マイコン26内のカウンタをリセ
ットし、レンズ駆動モータ33の回転蕎に応じたパルス
数をカウントする(ステップ#9,#10)。そして、
撮影準備スイッチSW2のオンによる焦点検出動作の割
り込みを=1可する(ステップ#11)。
Along with this, a counter in the microcomputer 26 is reset to count the number of pulses corresponding to the rotation rate of the lens drive motor 33 (steps #9 and #10). and,
Interruption of the focus detection operation by turning on the photographing preparation switch SW2 is enabled (=1) (step #11).

そして、出力端子OP1をロー電圧にしてレンズ回路2
7等への電力を停止し、撮影準備スイッチSW2等が押
されるまで動作を持機させる(ステップ#12.#13
)。
Then, the output terminal OP1 is set to a low voltage and the lens circuit 2
7, etc., and keep them in operation until the shooting preparation switch SW2, etc. is pressed (steps #12 and #13).
).

また、前記ステップ#13の動作待機状態のときに餓彰
*IfiスイッチSW2がオンされると、マイコン26
は第10図に示した割り込み動作のフローチャートを実
行する。
Furthermore, if the starvation*Ifi switch SW2 is turned on during the operation standby state in step #13, the microcomputer 26
executes the interrupt operation flowchart shown in FIG.

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

次に、FAモードか、AFモードかの判定を行い(ステ
ップ#31),AFモードであれば、前記デフォーカス
愚から戯影レンズ2の駆動鼠を算11』シ、これに基づ
いてm影レンズ2を駆動させる《ステップ#32〉。一
方、ステップ#31でFAモードであれば、ステップ#
32の処理を行わずにステップ#34に移行する。ステ
ップ#34では、m影準備スイッチSW2の開閉を判定
する。
Next, it is determined whether it is the FA mode or the AF mode (step #31), and if it is the AF mode, calculate the driving position of the picture lens 2 from the defocus lens, and based on this, m Drive the lens 2 <<Step #32>>. On the other hand, if it is FA mode in step #31, step #
The process moves to step #34 without performing the process of step #32. In step #34, it is determined whether the m-shadow preparation switch SW2 is open or closed.

そして、譲彰準備スイッヂSW2がオンであれば、フラ
グAFSFをリセットし(ステップ#35)、ステップ
#25に戻って、ステップ#25からの処理を繰り返す
。一方、ステップ#34で撮影準備スイッチSW2がオ
フであれば、給電回路36をオフにしてレンズ回路27
等への電力を停止し《ステップ#36) 、llffl
彰準備スイッヂSW2等が押されるまで動作を待機させ
る(ステップ#37)。そして、緻影準備スイッチSW
2等が押されると、第9図のフローチャートに移行する
If the concession preparation switch SW2 is on, the flag AFSF is reset (step #35), the process returns to step #25, and the processing from step #25 is repeated. On the other hand, if the photographing preparation switch SW2 is off in step #34, the power supply circuit 36 is turned off and the lens circuit 27 is turned off.
etc. [Step #36], llffl
The operation is kept on standby until the light preparation switch SW2 or the like is pressed (step #37). And the detailed image preparation switch SW
When 2 etc. is pressed, the process moves to the flowchart shown in FIG.

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

第11図は各アイランド21.22.23のデフォーカ
ス量を第1アイランド21(ステップ#41)、第2ア
イランド22(ステップ#41)、第3アイランド23
(ステップ#41)の順に演粋することを示し、第12
図〜第14図は各アイランド21.22.23のデフォ
ーカス量WAnの具体的なフローチャートを示している
FIG. 11 shows the defocus amount of each island 21, 22, 23 for the first island 21 (step #41), the second island 22 (step #41), and the third island 23.
(Step #41).
Figures 1 to 14 show specific flowcharts of the defocus amount WAn for each island 21, 22, and 23.

第12図は第1アイランド21のデフォーカス量演棹(
ステップ#41)のサブルーチンを示している。この第
1アイランド21は、前述のように、第170ックB[
1、第270ツクBL2に分けられ、これら各ブロック
BL1 、BL2の各デフォーカス聞をそれぞれ記憶す
る変数DFI , DF2に所定値“一K”を記憶させ
る(ステップ#51、#52)。この所定値“一K”は
各ブロックBL1 、BL2では、取り得ないような前
ビン状態の蛸であり、第1アイランド21で焦点検出不
能の場合(以下、O−コンという)のデフォーカス量と
して出力される。
Figure 12 shows the defocus amount calculation for the first island 21 (
The subroutine of step #41) is shown. As mentioned above, this first island 21 is located at the 170th island B[
1 and 270th block BL2, and a predetermined value "1K" is stored in variables DFI and DF2 that respectively store the defocus times of these blocks BL1 and BL2 (steps #51 and #52). This predetermined value "1K" is a front bin state that cannot be obtained in each block BL1 and BL2, and is the defocus amount when the focus cannot be detected in the first island 21 (hereinafter referred to as O-con). Output.

次に、第1アイランド21での0−コンの状態を示すフ
ラグLCF1をセットする(ステップ#53)。そして
、第1ブロックBL1の焦点状R(舶ビン状態、後ビン
状態、合焦状態〉の検出およびデフォーカスfiDFを
演粋し(ステップ#54)、この演葬結果から焦点検出
が可能であれば、フラグLCF1をリセットし、求めた
デフォーカスIDFを第1ブロックBL1のデフォーカ
ス場を記憶する変数DFIに記憶させ(ステップ#55
〜#57)、ステップ#58に移行する。
Next, a flag LCF1 indicating the 0-con state in the first island 21 is set (step #53). Then, the detection of the focal state R (ship bin state, rear bin state, in-focus state) of the first block BL1 and the defocus fiDF are extracted (step #54), and it is possible to detect the focal point from this result. For example, the flag LCF1 is reset and the obtained defocus IDF is stored in the variable DFI that stores the defocus field of the first block BL1 (step #55).
~#57), then proceed to step #58.

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

次に、第2ブロックBL2の焦点状態の検出およびデフ
ォーカスIIIDFを演算しくステップ#58〉、この
演算結果から焦点検出が不能であれば、フラグLCFI
がセットされているかどうかを判定する。
Next, step #58> detects the focus state of the second block BL2 and calculates the defocus IIIDF. If focus detection is impossible from this calculation result, the flag LCFI is
Determine if is set.

そして、フラグLCF1がリセットされているとき、す
なわち、ステップ#55の判定において焦点検出が不能
とされたときには、ステップ#62に移行する。また、
ステップ#60でフラグLCFIがセットされていると
きは、第11図に示すステップ#42の第2アイランド
22のデフォーカス場演算ザブルーチン(第13図)に
移行する。
Then, when the flag LCF1 is reset, that is, when focus detection is determined to be impossible in the determination at step #55, the process moves to step #62. Also,
When the flag LCFI is set in step #60, the process moves to the defocus field calculation subroutine (FIG. 13) for the second island 22 in step #42 shown in FIG.

一方、ステップ#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 the process in step #60.

ステップ#62では、後述の平均処理ルーチンで使用す
るブロック間デフォーカス邑ΔOFを決定する。次いで
、デフォーカスffi DF1とデフォーカスffl 
DF2との大小を判定し、デフォーカス蟻の大きい方、
すなわち、撤彰レンズ2(カメラ)に近い方の被写体の
デフォーカス邑を第1アイランド21のデフォーカス量
θFIS1とする。つまり、デフォーカスIDFIがデ
フォーカスffi DF2よりも大きいときは、デフォ
ーカス11 0FIを第1アイランド21のデフォーカ
ス!lIDFIS1とし、逆に、デフォーカスffi 
DF2がデフォーカス@ OF1よりも大きいときは、
デフォーカス量ロ「2を第1アイランド21のデフォー
カスtflDFls1とする(ステップ#63〜#67
). また、ステップ#64.#65でデフォーカス潰DF1
とデフォーカスII DF2との差がブロック間デフォ
ーカス量ΔOFよりも小さいとぎは、デフォーカスao
f1とデフォーカスはDF2との平均を行い、この平均
植を第1アイランド21のデフォーカスflOFIS1
とする(ステップ#68)。そして、ステップ#66.
#67,#6Bの処理を終えると、第11図のステップ
#42に移行する。
In step #62, an inter-block defocus value ΔOF to be used in an average processing routine to be described later is determined. Next, defocus ffi DF1 and defocus ffl
Determine the size of DF2 and select the larger defocused ant,
That is, the defocus value of the subject closer to the withdrawal lens 2 (camera) is set as the defocus amount θFIS1 of the first island 21. In other words, when the defocus IDFI is larger than the defocus ffi DF2, the defocus 11 0FI is the defocus of the first island 21! lIDFIS1, conversely, defocus ffi
When DF2 is larger than defocus @OF1,
Defocus amount 2 is set as defocus tflDFls1 of first island 21 (steps #63 to #67
). Also, step #64. #65 defocus DF1
and defocus II DF2 is smaller than inter-block defocus amount ΔOF, defocus ao
f1 and defocus are averaged with DF2, and this average is calculated as the defocus flOFIS1 of the first island 21.
(Step #68). And step #66.
After completing the processing in #67 and #6B, the process moves to step #42 in FIG. 11.

第13図は第2アイランド22のデフォーカス1?jl
lllのサブルーチンを示す。
Figure 13 shows defocus 1 of the second island 22? jl
llll subroutine is shown.

まず、第3ブロックBL3、第41Oツク814、第5
ブロックBL5の各デフォーカス量をそれぞれ記憶する
変数DF3 , DF4 , DF5に所定埴“一K 
I1をそれぞれ設定させ(ステップ#71〜#73)、
第2アイランド22でのローコンの状態を示すフラグL
CF2をセットする(ステップ#74).そして、各ブ
ロック8L3 , BL4 , BL5の焦点状態の検
出およびデフォーカスffiDFを演算する(ステップ
#75.#79.#83)。すなわち、ステップ#75
による第3ブロックBL3のデフォーカス量DFの演算
結果から焦点検出が可能であれば、フラグLCF2をリ
セットし、求めたデフォーカス量DFを変数DF3に記
憶させ(ステップ#76〜#78)、ステップ#79に
移行する。逆に、焦点検出が不能と判定されると、ステ
ップ#77.#78の処理を行わずにステップ#79に
移行する.第410ツクBL4のデフォーカスflDF
も同様に、ステップ#79の演算結果から焦点検出が可
能であれば、フラグLCF2をリセットし、デフォーカ
スIDFを変数DF4に記憶させ(ステップ#80〜#
82) 、ステップ#83に移行する。逆に、焦点検出
が不能と判定されると、ステップ#81,#82の処理
を行わずにステップ#83に移行する。
First, the third block BL3, the 41st block 814, the 5th block BL3,
Variables DF3, DF4, and DF5 that store each defocus amount of block BL5 are set to a predetermined value.
Set I1 (steps #71 to #73),
Flag L indicating the state of low contrast at the second island 22
Set CF2 (step #74). Then, the focus state detection and defocus ffiDF of each block 8L3, BL4, and BL5 are calculated (steps #75, #79, and #83). That is, step #75
If focus detection is possible from the calculation result of the defocus amount DF of the third block BL3 by Move to #79. Conversely, if it is determined that focus detection is impossible, step #77. Proceed to step #79 without performing the process in #78. Defocus flDF of 410th Tsuku BL4
Similarly, if focus detection is possible from the calculation result in step #79, the flag LCF2 is reset and the defocus IDF is stored in the variable DF4 (steps #80 to #
82), proceed to step #83. Conversely, if it is determined that focus detection is impossible, the process proceeds to step #83 without performing steps #81 and #82.

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

ステップ#87では、ローコンフラグLCF2がヒット
されているかどうかを判定する。そして、フラグLCF
2がセットされていないとき、すなわち、ステップ#7
6.#80,#84の判定においてそれぞれ焦点検出が
不能とされたときには、後述の平均処理ルーチンで使用
するブロック間デフォーカス量(平均処理幅)ΔDFを
決定する(ステップ#88)。次いで、各ブロックBL
3 , BL4 ,BL5の各デフォーカス量DF3 
, DF4 , DF5の大小を判定し、最も大きなデ
フォーカスlfi }IAXDFを抽出する(ステップ
#89)。そして、平均処理幅ΔDFよりも小さい他の
ブロックが存在しない場合には、前記デフォーカスII
 HAXDFを第2アイランド22のデフォーカスlD
FIs2としくステップ#90.#91),平均処理幅
ΔDFよりも小さい他のブロックが1つ以上存在する場
合には、前記デフォーカス蓬HAXDFと平均処理幅Δ
OFよりも小さい他のブロックのデフォーカス量とだけ
で平均を行い(平均処理〉、この平均値を第2アイラン
ド22のデフォーカスl[lFIs2とする(ステップ
#92)。そして、ステップ#91,#92の処理を終
えると、第11図に示すステップ#43の第3アイラン
ド23のデフォーカス潰演算サブルーチン(第14図)
に移行する。
In step #87, it is determined whether the low contrast flag LCF2 has been hit. And flag LCF
2 is not set, i.e. step #7
6. When focus detection is determined to be impossible in each of the determinations in #80 and #84, an inter-block defocus amount (average processing width) ΔDF to be used in an average processing routine to be described later is determined (step #88). Next, each block BL
3, BL4, BL5 each defocus amount DF3
, DF4, and DF5 are determined, and the largest defocus lfi}IAXDF is extracted (step #89). Then, if there is no other block smaller than the average processing width ΔDF, the defocus II
Defocus ID of the second island 22 with HAXDF
Step #90 as FIs2. #91), if there is one or more other blocks smaller than the average processing width ΔDF, the defocus HAXDF and the average processing width Δ
Average is performed only with the defocus amounts of other blocks smaller than OF (average processing), and this average value is set as defocus l[lFIs2 of the second island 22 (step #92). Then, step #91, After completing the process in #92, the defocus calculation subroutine for the third island 23 in step #43 shown in FIG. 11 (FIG. 14)
to move to.

また、ステップ#87でフラグLCF2がセットされて
いると判定されたときには、低周波成分でなる被写体に
合焦させるために3つ置きの差分データを7つ置きの差
分データに再fST1iする(ステップ#93)。すな
わち、例えば、画素のデータを見1.空2.・・・,党
n,・・・とすると、3つ置きの差分データは、d[)
n −Qt−Q5, ・・・ Q5−Qta.・・・,
fln−Qn+*.・・・となる。また、7つ?きの差
分データはdQm =Qt−(1g.・・・,Qm−Q
働+8,・・・となる。この7つ置きの差分データdD
mは3つ置きの差分データdDnの和を3つ置きに取る
ことにより求められる。つまり、7つ置きの差分データ
は、 d[)m − dD+◆dDs.・・・,dD市+d[
)m+4,・・・−Q1−1!s +Q5 −419 
.−. Qn−4−an +Qn −Qn+4 , −
・・=Q1−Q9.−.Qn−< −Qn4< .−=
冨Q1−Qta .・・・. Q1 −Q+!+8 .
・・・となる。ただし、n=I+4である。
Furthermore, when it is determined in step #87 that the flag LCF2 is set, fST1i is re-processed from every third difference data to every seventh difference data in order to focus on the subject consisting of low frequency components (step #87). #93). That is, for example, when looking at pixel data, 1. Sky 2. ..., party n, ..., the difference data for every third party is d[)
n -Qt-Q5, ... Q5-Qta. ...,
fln-Qn+*. ...becomes... Seven again? The difference data is dQm =Qt-(1g....,Qm-Q
Work +8,... This difference data dD every 7th
m is obtained by taking the sum of every third difference data dDn. In other words, the difference data for every 7th position is d[)m - dD+◆dDs. ..., dD city + d[
)m+4,...-Q1-1! s +Q5 -419
.. −. Qn-4-an +Qn-Qn+4, -
...=Q1-Q9. −. Qn-<-Qn4<. −=
Tomi Q1-Qta.・・・. Q1 -Q+! +8.
...becomes... However, n=I+4.

さらに、この差分データdDaの隣接間の和を取り、新
たなデータ列dD!+(m)= dDI +d■m+1
を演算し、これを用いて第6ブロックBL6での焦点検
出を行い、焦点状蟻の検出およびデフォーカスffiD
Fを演算しくステップ#94)、焦点検出が可能であれ
ば、フラグLCF2をリセットし、第6ブロックBL6
のデフォーカスil DF6を第2アイランド22のデ
フォーカスlDFIs2として藺記ステップ#43に移
行する(ステップ#95〜#97)一方、ステップ#9
5で焦点検出が不能であれば、第7ブロックBL7での
焦点検出を行い、焦点状態の検出およびデフォーカス吊
DFを演算し(ステップ#98)、焦点検出が可能であ
れば(スtツプ#99)、ステップ#96に戻って、フ
ラグLCr2をリセットし、第7ブロックBL7のデフ
ォーカス吊を第2アイランド22のデフォーカスffi
 OFIS2として前記ステップ#43に移行する。
Furthermore, the sum of adjacent difference data dDa is calculated to create a new data string dD! +(m)=dDI +d■m+1
is calculated and used to perform focus detection in the sixth block BL6 to detect focal ant and defocus ffiD
To calculate F, step #94), if focus detection is possible, reset the flag LCF2 and start the sixth block BL6.
The defocus IL DF6 of the second island 22 is set as the defocus IDFIs2 of the second island 22, and the process moves to Step #43 (Steps #95 to #97). On the other hand, Step #9
If focus detection is not possible in step #5, focus detection is performed in the seventh block BL7, detection of the focus state and calculation of defocus suspension DF (step #98), and if focus detection is possible (step #98) step #99), returns to step #96, resets the flag LCr2, and changes the defocus suspension of the seventh block BL7 to the defocus ffi of the second island 22.
As OFIS2, the process moves to step #43.

一方、ステップ#99で焦点検出が不能であれば、第8
ブロックBL8での焦点検出を行い、焦点状態の検出お
よびデフォーカス量DFを演算し(ステップ#100)
、焦点検出が可能であれば《ステップ#1 01 ) 
,ステップ#96に戻って、フラグLCF2をリセット
し、第8ブロックBL8のデフォーカス邑を第2アイラ
ンド22のデフォーカス蓬DFIS2として前記ステッ
プ#43に移行する。一方、ステップ#101で焦点検
出が不能であれば、ステップ#96.#97の処理を行
わずに前記ステップ#43に移行する。
On the other hand, if focus detection is not possible in step #99, the eighth
Focus detection is performed in block BL8, and the focus state is detected and the defocus amount DF is calculated (step #100).
, if focus detection is possible 《Step #1 01)
, returns to step #96, resets the flag LCF2, sets the defocus area of the eighth block BL8 as the defocus area DFIS2 of the second island 22, and proceeds to step #43. On the other hand, if focus detection is not possible in step #101, step #96. The process proceeds to step #43 without performing the process in #97.

第14図は第3アイランド23のデフォーカス量演算(
ステップ#43)のサブルーチンを示す。
FIG. 14 shows the calculation of the defocus amount of the third island 23 (
The subroutine of step #43) is shown.

まず、第9ブロックBL9、第10ブロックBL10の
各デフォーカスはをそれぞれ記憶する変数OF9.0F
10に所定値II  K #lを記憶させる(ステップ
#111.#112)。次に、第3アイランド23での
ローコンの状態を示すフラグ10『3をセットする(ス
テップ#1 13)。そして、第9ブロック819の焦
点状態の検出およびデフォーカス煩DFを演算し(ステ
ップ#114)、焦点検出が可能であれば、フラグl.
cF3をリセットし、求めたデフォーカスffiDFを
第9ブ0ックBL9のデフォーカスffi DF9に記
憶させる(ステップ#115〜#117)。一方、スデ
ップ#115で焦点検出が不能と判定されると、ステッ
プ#116.#117の処理を行わずにステップ#11
8に移行する。
First, each defocus of the 9th block BL9 and the 10th block BL10 is a variable OF9.0F that stores .
The predetermined value II K #l is stored in the memory 10 (steps #111 and #112). Next, the flag 10 indicating the low contrast state at the third island 23 is set to ``3'' (step #1 13). Then, the focus state detection and defocus DF of the ninth block 819 are calculated (step #114), and if focus detection is possible, flag l.
cF3 is reset, and the obtained defocus ffiDF is stored in the defocus ffiDF9 of the ninth book BL9 (steps #115 to #117). On the other hand, if it is determined in step #115 that focus detection is impossible, step #116. Step #11 without performing the process #117
Move to 8.

次に、第10ブロックBLIOの焦点状態の検出および
デフォーカスWiDFを演算し《ステップ#.118)
、この演算結果から焦点検出が不能であれば、フラグL
CF3がセットされているかどうかを判定する。そして
、フラグLCF3がリセットされているとき、すなわち
、ステップ#115の判定において焦点検出が不能とさ
れたときには、ステップ#122に移行する。また、フ
ラグLCF3がセットされているときには、第10図に
示すステップ#29の露出演尊サブルーチンに移行する
(ステップ#119.#120)。一方、ステップ#1
19で焦点検出が可能と判定されると、ステップ#12
0の処理を行わずにステップ#122に移行する。
Next, detect the focus state of the 10th block BLIO and calculate the defocus WiDF <<Step #. 118)
, If focus detection is impossible from this calculation result, flag L is set.
Determine whether CF3 is set. Then, when the flag LCF3 has been reset, that is, when focus detection is determined to be impossible in the determination at step #115, the process moves to step #122. If the flag LCF3 is set, the process moves to the exposure subroutine of step #29 shown in FIG. 10 (steps #119 and #120). Meanwhile, step #1
If it is determined in step #19 that focus detection is possible, step #12
The process moves to step #122 without performing the 0 process.

ステップ#122では、後述の平均処理ルーチンのブロ
ック間デフォーカス邑ΔDFを決定する.次いで、デフ
ォーカスIt DF9とデフォーカスffiDF10と
の大小を判定し、デフォーカス場の大きい方を第3アイ
ランド23のデフォーカスfi DFIS3とする(ス
テップ#123〜#127).また、ステップ#1 2
4.#1 25でデフォーカスffiO「9とデフォー
カスI DEIOとの差が平均処理幅ΔDFよりも小さ
いときは、デフォーカス量DF9とデフォーカスli 
DFIOとの平均を行い、この平均値を第3アイランド
23のデフォーカスfiDFIS3とする(ステップ#
128>。そして、ステップ#1 26.#1 27,
#1 28の処理を終えると、第10図のステップ#2
9に移行する。
In step #122, an inter-block defocus value ΔDF for an average processing routine to be described later is determined. Next, the magnitude of the defocus It DF9 and the defocus ffiDF10 is determined, and the larger defocus field is set as the defocus fi DFIS3 of the third island 23 (steps #123 to #127). Also, step #1 2
4. #1 25 defocus ffiO "If the difference between 9 and defocus I DEIO is smaller than the average processing width ΔDF, defocus amount DF9 and defocus li
DFIO is averaged and this average value is set as the defocus fiDFIS3 of the third island 23 (step #
128>. And step #1 26. #1 27,
#1 After completing the process of 28, step #2 in Figure 10
Move to 9.

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

まず、illff検出回路29から被写体8の明るさに
対応した開放Xi度値{アベックス+l!!)BVOが
マイコン26に入力される(ステップ#131)。
First, the illff detection circuit 29 detects the open Xi degree value {Avex+l!} corresponding to the brightness of the subject 8. ! ) BVO is input to the microcomputer 26 (step #131).

続いて、フィルム感度読取回路30からフィルム感度に
対応したフィルム感度1iti(アベックス埴)Svが
マイコン26に入力される(ステップ#132).次イ
テ、これら開放tli rU fIB vOと、フィル
ム感度msvと、第10図のステップ#27で予めマイ
コン26に入力されている開放絞りinAvOトノ和よ
リ、露出(aEV  (EV −3VO4−SV +A
VO)を演締する(ステップ#133)。
Subsequently, film sensitivity 1iti (Avex-Hani) Sv corresponding to the film sensitivity is input from the film sensitivity reading circuit 30 to the microcomputer 26 (step #132). Next, from the sum of these open aperture tli rU fIB vO, film sensitivity msv, and open aperture inAvO which has been input into the microcomputer 26 in advance in step #27 of FIG. 10, the exposure (aEV (EV -3VO4-SV +A
VO) (step #133).

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

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

まず、FAモードかAFモードかの判定が行われる。そ
して、FAモードの場合では、第2アイランド22の測
距を侵先し、第2アイランド22が測距可能であれば、
第2アイランド22のデフォーカスIDFIS2に基づ
いて織彰レンズ2の駆動量を決定し、第2アイランド2
2が測距不可能であれば、最近接のアイランドのデフォ
ーカス吊に基づいてl影レンズ2の駆動量を決定する。
First, it is determined whether the mode is FA mode or AF mode. In the case of FA mode, if the distance measurement of the second island 22 is performed first, and the second island 22 is capable of distance measurement,
The driving amount of the Oriaki lens 2 is determined based on the defocus IDFIS2 of the second island 22, and the second island 2
2, the amount of drive of the L shadow lens 2 is determined based on the defocusing distance of the nearest island.

つまり、FAモードでは、静止した被写体を中央にして
撮影する場合が多く、広い範囲での測距に基づいてデフ
ォーカス量を求めると、どのアイランドを選択して表示
しているのかが明確でなくなるため、戯影画面の中央部
の測距を行う第2アイランド22のデフォーカスlDF
Is2を優先することとした。
In other words, in FA mode, shots are often taken with a stationary subject in the center, and if the amount of defocus is calculated based on distance measurement over a wide range, it becomes unclear which island is selected and displayed. Therefore, the defocus lDF of the second island 22 performs distance measurement in the center of the play screen.
We decided to give priority to Is2.

一方、AFモードの場合では、各アイランド21.22
.23の被写体の内、いずれかの被写体8が焦点検出可
能なときには、最近接になるアイランド、すなわちデフ
ォーカス壜がa大になるアイランドのデフォーカス檄、
搬影レンズ2の焦点距離データ、および被写体までの距
離に基づいてIli!彰倍率を演算し、この演粋IiI
i宋によってデフォーカス隠の演算手順を変えている。
On the other hand, in the case of AF mode, each island 21.22
.. When any one of the 23 subjects 8 can be detected in focus, the defocus of the nearest island, that is, the island whose defocus bottle is a size,
Based on the focal length data of the projection lens 2 and the distance to the subject, Ili! Calculate the prize magnification and calculate this performance IiI
The calculation procedure for defocusing was changed depending on the Song Dynasty.

すなわら、基本的には、m彰倍率が大きければ、主被写
体は囮影画面の中央部に必ず存在するとして、第2アイ
ランド22のデフォーカスlfiDFIs2を侵先する
That is, basically, if the m-photo magnification is large, it is assumed that the main subject always exists in the center of the decoy image, and the defocus lfiDFIs2 of the second island 22 is invaded.

また、搬彰倍率が小さければ、背晴を含んだVPl影に
なり、被写体までの距離分布のばらつきが大きいとし、
さらに主被写体はカメラに近い位置に存在することが多
いので、距離分布の近い側を優先する。この搬影倍率の
判定の目安となる鎖と、この値に基づいて演算手段を選
沢する手順の一例を第16図に示す。
In addition, if the carrying magnification is small, the VPL shadow will include the clear sky, and the dispersion of the distance distribution to the subject will be large.
Furthermore, since the main subject is often located close to the camera, priority is given to the closer side of the distance distribution. FIG. 16 shows an example of a chain that serves as a standard for determining the projection magnification and a procedure for selecting a calculation means based on this value.

すなわち、例えば、AFモードの場合には、撮影レンズ
2の焦点距111fは35IluIを境に演算手段を選
択する。そして、焦点距111fが35amよりも大き
く、かつ、最近接アイランドの議彰倍率βdrが所定の
倍率βH (例えば、倍″$1/25)よりも小さけれ
ば、最近接アイランドのデフォーカス恐に基づいて搬彰
レンズ2の駆vJmを決定する。
That is, for example, in the case of the AF mode, the calculation means is selected with the focal length 111f of the photographic lens 2 at 35IluI. If the focal length 111f is larger than 35 am and the magnification βdr of the nearest island is smaller than a predetermined magnification βH (for example, the magnification “$1/25”), based on the fear of defocus of the nearest island, Determine the driving force vJm of the carrier lens 2.

一方、搬彰倍率βd『が所定の倍率βHを越えると、第
2アイランド22のデフォーカス!tDF1s2を優先
し、第2アイランド22が測距不可能であれば、最近接
アイランドのデフォーカス量に基づいて撮影レンズ2の
駆動量を決定する。
On the other hand, when the carrying magnification βd exceeds the predetermined magnification βH, the second island 22 is defocused! Priority is given to tDF1s2, and if distance measurement is not possible for the second island 22, the driving amount of the photographing lens 2 is determined based on the defocus amount of the nearest island.

さらに、焦点距@1が35am未満であれば、最近接ア
イランドのデフォーカス出に基づいて纜彰レンズ2の駆
動吊を決定する・。これは焦点距離fが短くなると、被
写界深度が深くなるので、距離分布において最近接アイ
ランドの被写体に焦点を合せても他のアイランドで検出
された被写体をかなりの範囲まで被写界深度内に含むこ
とができるからである。
Furthermore, if the focal length @1 is less than 35 am, the driving position of the brightening lens 2 is determined based on the defocus output of the nearest island. This is because as the focal length f becomes shorter, the depth of field becomes deeper, so even if you focus on the subject on the nearest island in the distance distribution, objects detected on other islands will be within the depth of field to a considerable extent. This is because it can be included in

また、FAモードの場合には、焦点距111fに関係な
く、第2アイランド22のデフォーカスIDEls2を
優先し、釦2アイランド22が測距不可能であれば、最
近接アイランドのデフォーカス程に基づいて囮影レンズ
2の駆動堡を決定する。
In addition, in the case of FA mode, priority is given to the defocus IDEls2 of the second island 22 regardless of the focal length 111f, and if distance measurement is not possible for the button 2 island 22, it is based on the defocus degree of the nearest island. Then, the drive point of the decoy lens 2 is determined.

ここで、前述の撮影倍率βdfの算出手段について説明
する。
Here, the above-mentioned means for calculating the imaging magnification βdf will be explained.

このI影倍率βdfは焦点距lIl[Ifとカメラから
の被写体距離Xとから下式のようになる。
This I shadow magnification βdf is expressed by the following formula from the focal length lIl [If and the subject distance X from the camera.

βdf− f / x 前記焦点距wifのデータは@影レンズ2から入力され
るので、前記被写体距wixを求めると、蹟彰倍率βd
fは算出される。また、この被写体距離Xは撮影レンズ
2の無限遠位置から被′与体位1dまでのデフォーカス
量DFxを用いて、下式のように求められる。
βdf- f/x Since the data of the focal length wif is input from @shadow lens 2, when the object distance wix is calculated, the focal length wif is calculated as follows:
f is calculated. Further, this object distance X can be determined using the defocus amount DFx from the infinity position of the photographing lens 2 to the object position 1d as shown in the following equation.

x−f2/DFx ただし、m影レンズ2は1枚の薄い理想レンズではなく
、主点が前後にあるとともに、焦点距離の変化によって
その主点が異なるので、上式から被写体距離Xは近似直
として求められる。
x-f2/DFx However, the m-shadow lens 2 is not a single thin ideal lens, but has principal points at the front and back, and the principal points differ depending on the change in focal length, so from the above equation, the subject distance It is required as.

一方、IN彰レンズ2の無限遠位置から現在位置までの
デフォーカス恐DFoは、マイコン26内部のカウンタ
に記憶されているレンズ駆動モータ33の回転恐(数〉
Nに応じたパルス数から求められ、その関係は下式のよ
うになる。
On the other hand, the defocusing fear DFo from the infinity position to the current position of the IN photo lens 2 is determined by the rotational fear (number) of the lens drive motor 33 stored in the counter inside the microcomputer 26.
It is determined from the number of pulses corresponding to N, and the relationship is as shown in the following equation.

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

上式より、デフォーカスIOFoは、 DFo −N/k となる。そして、搬影レンズ2の現在位霞から被写体位
置までのデフォーカスflDFは、DFx −DFo 
+[) F となる。これらの式から被写体距離Xは、x−f’ /
DFx−f2/ (N/k+DF)したがって、撮影倍
率βdfは、 βdf−f/x−  (N/k+DF)/fとなる。
From the above equation, the defocus IOFo is DFo -N/k. Then, the defocus flDF from the current position of the projection lens 2 to the subject position is DFx −DFo
+ [) F. From these formulas, the subject distance X is x-f'/
DFx-f2/ (N/k+DF) Therefore, the imaging magnification βdf is βdf-f/x- (N/k+DF)/f.

また、上式とは別に随彰倍率βIHは廁影レンズ2の現
在位置から被写体位匿までの駆動量ΔN〈ΔN−DF−
k)を用いて、 βdr−(N+ΔN>/f−k としても求められる。
In addition to the above formula, the Zuisho magnification βIH is the driving amount ΔN〈ΔN-DF-
k), it can also be obtained as βdr−(N+ΔN>/f−k).

次に、平均処理を行うサブルーチンについて第2アイラ
ンド22の70−ヂャート(第13図のステップ#88
.#92)を例にして説明する。
Next, regarding the subroutine that performs the averaging process, the 70-diagram of the second island 22 (step #88 in FIG.
.. #92) will be explained as an example.

第13図のステップ#88の平均処1!I!輻ΔD「は
、第17図に示すサブルーチンに従って求められる。ま
ず、前回平均処理が行われたかどうかを7ラグW2F2
により判定する(ステップ#141)。
Average step #88 in Figure 13 1! I! Radiation ΔD is determined according to the subroutine shown in FIG.
(Step #141).

すなわち、前回平均処理が行われると、フラグーlF2
はセットされる。そして、前回平均処理が行われていれ
ば、係数k1を“1.5″に設定し、前回平均処理が行
われなければ、係数k1を゛゜1”に設定する(ステッ
プ#142,#143).係数k1を設定する理由は、
測距値のばらつきによって平均処理が行われたり、行わ
れなかつたりすることを防ぐため、−m平均処理が行わ
れた場合は平均処理幅を広げて2回目以降も平均処理が
行われる可能性(確率〉を高めるためである。
That is, when the previous averaging process is performed, the flag lF2
is set. Then, if the averaging process was performed last time, the coefficient k1 is set to "1.5", and if the previous averaging process was not performed, the coefficient k1 is set to "1" (steps #142, #143). .The reason for setting the coefficient k1 is
In order to prevent averaging processing from being performed or not performed due to variations in distance measurement values, if -m averaging processing is performed, the averaging processing width may be widened and averaging processing may be performed from the second time onwards. (This is to increase the probability).

次に、前回測距時に検出された撮影倍率β(Hの判定が
行われ、Ill形倍率βdfが“1/20”以上の場合
には係数k2を“1″に設定し、四彰倍率βdfが“1
/20″から“1/50”の場合には係数k2を″0.
5″に設定し、lI!彰倍率βdfが“1/50”以下
の場合には係数k2を″0″に設定し(ステップ#14
5〜#149)、ステップ#150に移行する。前記係
数k2を設定する理巾は、lI!影倍率βd『が高いと
同一アイランド内の複数ブロックに同一被写体で占めら
れる可能性が高くなるためである。
Next, the shooting magnification β (H) detected during the previous distance measurement is determined, and if the Ill type magnification βdf is “1/20” or more, the coefficient k2 is set to “1”, and the four-shot magnification βdf is is “1”
/20" to "1/50", the coefficient k2 is set to "0.
5", and if the lI! award magnification βdf is less than "1/50", the coefficient k2 is set to "0" (step #14
5 to #149), the process moves to step #150. The margin for setting the coefficient k2 is lI! This is because when the shadow magnification βd' is high, there is a high possibility that the same subject will occupy multiple blocks within the same island.

次いで、ステップ#150で、II影時の絞り植FNo
.に基づいて基準平均処理幅ΔDFIの設定を行う。つ
まり、廠影時の絞り@ FNo.と許容錯乱円直径εの
積により求められる焦点深度δを撮影された像の解像度
を保存するための基準平均処理幅ΔDFIとして設定さ
れる。
Next, in step #150, the aperture implantation FNo.
.. The reference average processing width ΔDFI is set based on the following. In other words, the aperture @FNo. The depth of focus δ, which is obtained by multiplying by the allowable diameter of the circle of confusion ε, is set as the reference average processing width ΔDFI for preserving the resolution of the photographed image.

そして、前記係数k1および係数k2をこの基準平均処
理幅ΔDFIに働けることにより、平均処理幅ΔDFが
決定され、さらにフラグーl「2がリセットされる(ス
テップ#151)。そののち、第13図に示すステップ
#89に移行する。
Then, by applying the coefficient k1 and the coefficient k2 to the reference average processing width ΔDFI, the average processing width ΔDF is determined, and the flag 12 is reset (step #151). The process moves to step #89 shown in FIG.

また、前回平均処理が行われたかどうかを判定するため
のフラグは、第1アイランド21および第3アイランド
23にもフラグlIllF2と同様に有しており、前回
平均処理が行われると、フラグーZF2はセットされ、
前回平均処理が行われなければ、リセットされる。
In addition, the first island 21 and the third island 23 also have a flag for determining whether or not the previous averaging process was performed, similar to the flag IIllF2, and when the previous averaging process is performed, the flag ZF2 is set,
If the previous averaging process was not performed, it is reset.

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

まず、前ビン側ずれピッチが4glの位胃(ずれピッチ
″−4″)から後ビン側ずれピッチが24個の位置くず
れピッチ“24” )までのデフA −カス範囲におい
て参照部142bのデータをずらせながらくシフトさせ
ながら〉、各シフト位置における第3ブロックBL3の
データと参照部142bのデータとの相[fl数口3(
I)を求める(ステップ#1 61 )。
First, data of the reference part 142b in the differential A-waste range from the front bin side shift pitch of 4gl (shift pitch ``-4'') to the rear bin side shift pitch of 24 positions (shift pitch "24"). The phase of the data of the third block BL3 and the data of the reference section 142b at each shift position [fl several 3 (
I) (step #1 61 ).

この相rMrM数H3(1)は下式のようになる。This phase rMrM number H3(1) is expressed by the following formula.

1−13([)− (  I K2(1)−32(5+
I)  l + l K2(20)−82(24”I)
  l )/2+Σ1κ2(j)−S2(4−j+1)
J+2 ただし、K2S.tl準部142aの差分データ列を示
し、S2は参照部142bの差分データ列を示す。
1-13([)-(I K2(1)-32(5+
I) l + l K2(20)-82(24”I)
l)/2+Σ1κ2(j)-S2(4-j+1)
J+2 However, K2S. The difference data string of the tl quasi section 142a is shown, and S2 shows the difference data string of the reference section 142b.

次いで、前述の各シフト位置における相関関数8 3(
1)の内で最も相関の良い、すなわち、相OQOQ数H
 3(1)の値が最小になるシフトffilH  (I
H−MIN(l−13(1)) )を抽出する(ステッ
プ#162)。次に、相関関数8 3(1)の各点の値
を用いて各ビクチ間の補間演算を行う(ステップ#16
3)。
Next, the correlation function 83(
1) with the best correlation, that is, the phase OQOQ number H
The shift ffilH (I
H-MIN(l-13(1)) ) is extracted (step #162). Next, interpolation calculation between each bit is performed using the value of each point of the correlation function 83(1) (step #16
3).

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

XH  −  I  M  +  (  H3(IN−
1)−83(Il4+1))/ [  MIN{ H 
3(IN−1)計1 3(IN.1))− 8 3(I
N)1/ 2この補間演算を行う理由は、1個のピッチ
のずれをデフォーカス恐に換詐すると約1 000μm
と大きく、このピッチ間を補うことによりtllfの良
い測距を行うためである。
XH − I M + (H3(IN−
1)-83(Il4+1))/[MIN{H
3 (IN-1) total 1 3 (IN.1)) - 8 3 (I
N) 1/2 The reason for performing this interpolation calculation is that if one pitch deviation is converted into a defocus error, it will be approximately 1,000 μm.
This is because distance measurement with good tllf can be performed by compensating for this pitch gap.

こうして求められた補間ビッチXHに光学系および光電
変換素子アレイのピッチ長で決定する係数αを掛けてデ
フォーカスIDF (DF−XHα)に換算する《ステ
ップ#164)。次いで、第3ブロックBL3のデータ
の持つコントラスト(明m>値C《3》をM1部142
aの隣接データの総和として求める(ステップ# i6
 5 ) ,このコントラストIC<3)は下式のよう
になる。
The thus obtained interpolation pitch XH is multiplied by a coefficient α determined by the pitch length of the optical system and the photoelectric conversion element array to convert it into defocus IDF (DF-XHα) <<Step #164). Next, the contrast (light m>value C<3>) of the data of the third block BL3 is calculated in the M1 section 142.
Find it as the sum of adjacent data of a (step #i6
5), this contrast IC<3) is expressed by the following formula.

求めるとともに、この補間値YHとコントラスト値C〈
3)との比のlaR(3)を求める(ステップ#167
)。
At the same time, this interpolation value YH and contrast value C〈
Find the ratio laR(3) with 3) (step #167
).

これら補11sillYHと比のIIR(3)とは下式
のようになる。
These complements 11sillYH and the ratio IIR(3) are as shown in the following equation.

YH  − }{3(IN)−1  83(IN−1)
−83(IH+1)  l /2R(3)−C(3)/
YH こうして求められたフントラストl+1G(3)および
比のIR(3)が共に設定領を満足した場合のみ焦点検
出可能とし、コントラストIIc(3)あるいは比のf
fiR(3)のいずれか一方でも満足しない場合には、
焦点検出不能とする(ローコン判定)。すなわち、まず
、第3ブロックBL3が前回のルーチン処理で焦点検出
可能であったかどうかの判定を、検出フラグNLB3を
用いて行う(ステップ#168)。これは前回焦点検出
可能であった場合に判定レベルの緩和を行い、焦点検出
判定レベルぎりぎりの被写体に対し、焦点検出可能かど
うかの判定が不安定になることを防ぐためである。すな
わち、焦点検出判定レベルぎりぎりの被写体に対しては
、判定レベルCth,Rthにそれぞれ所定111c1
.R1を設定する(ステップ#169). そして、ステップ#168で餉回焦点検出不能あるいは
一度目のルーチン処理、すなわち、検出フラグNLB3
がリセットされている場合には、現在の搬影レンズ2の
位四での撮影を行った際の1&影倍率βtSの演算を行
う(スデップ#1 70)。
YH - }{3(IN)-1 83(IN-1)
-83(IH+1) l /2R(3)-C(3)/
YH Focus detection is possible only when both the contrast IIc(3) or the ratio f
If either fiR(3) is not satisfied,
Make focus detection impossible (low contrast judgment). That is, first, it is determined whether the focus of the third block BL3 was detectable in the previous routine processing using the detection flag NLB3 (step #168). This is to reduce the determination level when focus detection was possible last time, and to prevent the determination of whether focus detection is possible from becoming unstable for a subject whose focus detection determination level is at the very edge. That is, for a subject at the very edge of the focus detection judgment level, the judgment levels Cth and Rth are each set to a predetermined value of 111c1.
.. Set R1 (step #169). Then, in step #168, if the focus cannot be detected or the first routine processing is performed, that is, the detection flag NLB3
If it has been reset, 1&shadow magnification βtS is calculated when photographing is performed using the current projection lens 2 (step #1 70).

この胤影倍率βLSは、前述のIffi影佑率β(Hの
演算、すなわち、β+H− (N/k+OF)/f  
のデフォーカスfiDFに“O”を代入して求める。
This seed shadow magnification βLS is calculated by the above-mentioned Iffi influence ratio β(H, that is, β+H− (N/k+OF)/f
It is obtained by substituting "O" into the defocus fiDF of .

そして、このIl影倍率βLSと焦点距離fとの積を求
め、この積が所定(ifif・βth(例えば、300
imレンズの場合βthは1715以上)以上の場合に
は、判定レベルCth,Rthにそれぞれ所定値C1.
R1よりも大きい所定lI!IC4.R4を設定する(
ステップ#1 71,#1 72)。つまり、ステップ
#169の場合に比べて判定レベルC th,Rthは
厳しくなる。
Then, the product of this Il shadow magnification βLS and the focal length f is calculated, and this product is a predetermined value (ifif·βth (for example, 300
(in the case of an im lens, βth is 1715 or more), the determination levels Cth and Rth are each set to a predetermined value C1.
A predetermined lI greater than R1! IC4. Set R4 (
Step #1 71, #1 72). In other words, the determination levels C th and Rth are stricter than in the case of step #169.

前記ステップ#171で所定(if・βth未満の場合
、第3ブロックBL3の最大の局所コントラストill
 CLthの演算を行う(ステップ#1 73)。そし
て、局所コントラスト{ficLthが予め設定された
所定植よりも大きければ、すなわち後述のフラグOLが
セットされていると、判定レベルcthに所定値C2を
設定し、所定値よりも小さければ、すなわちフラグCL
がリセットされていると、判定レベルcthに所定11
1c3を設定する(ステップ#174〜#176)。た
だし、所定iflG2.03の関係は、CI <02<
03<04  となるように予め設定されている。
In step #171, if the maximum local contrast ill of the third block BL3 is less than the predetermined value (if
CLth is calculated (step #1 73). Then, if the local contrast {ficLth is larger than the predetermined planting set in advance, that is, if the flag OL described later is set, a predetermined value C2 is set for the determination level cth, and if it is smaller than the predetermined value, that is, the flag OL is set. C.L.
is reset, the determination level cth is set to a predetermined value of 11.
1c3 is set (steps #174 to #176). However, the relationship for the predetermined iflG2.03 is CI <02<
It is set in advance so that 03<04.

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

そして、前記判定レベルCth,Rthにそれぞれ所定
値が設定されたのち(ステップ#169.#1 72.
#1 7B.#1 79)、コントラスト埴C(3)が
判定レベルcthよりも大きく、かつ、比の値R(3)
が判定レベルRthよりも大きいときには、検出フラグ
旧13をセットし、コントラストi1G(3)あるいは
比のIR(3)のいずれか一方でも判定レベルcthあ
るいは判定レベルRthよりも小さいときには、検出フ
ラグNIB3をリセットする(ステップ#180〜91
82)。そののち、第13図のステップ#79以降に示
された第4ブロックBL4のデフォーカス量の演算およ
び焦点検出不能判断等の処理を行う。
After predetermined values are set for the determination levels Cth and Rth, respectively (steps #169. #1 72.
#1 7B. #1 79), contrast level C(3) is greater than judgment level cth, and ratio value R(3)
is larger than the judgment level Rth, the detection flag old 13 is set, and when either the contrast i1G (3) or the ratio IR (3) is smaller than the judgment level cth or the judgment level Rth, the detection flag NIB3 is set. Reset (Steps #180-91
82). Thereafter, processing such as calculation of the defocus amount of the fourth block BL4 and determination of focus detection failure shown in step #79 and subsequent steps in FIG. 13 are performed.

ここで、ステップ#172の所定fif・βth以上の
場合に判定レベルcth, Rthtlnしくした理由
について説明する。
Here, the reason why the determination levels cth and Rthtln are set when the value is equal to or greater than the predetermined fif·βth in step #172 will be explained.

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

つまり、極めて大きなレンズ駆動範囲(レンズ繰り出し
f140as以上)を有する長焦点レンズの場合、レン
ズ位置が前記条件を満足するように高倍率、すなわち、
レンズ繰り出し量が大きい場合でかなりの遠景、低倍率
の被写体に対して焦点検出しようとすると、この様な場
合、空間周波数成分はかなりの高周波成分を有し、基準
部142aあるいは参照部142bにおける像間隔が極
めて小さく、基準部142aと参照部142bとではま
ったく異なった像が投影されることに・なる。さらに、
低倍率であるため、まったく異なった被写体が投影され
ることになる。この様なぼけ状態の場合には、光学系は
極めて低周波成分のみを通過させるので、通常は焦点検
出不能となる。ところが、第18図(b)に示すように
、人物A.Bが並んでいるような場合、人物A.Bを区
別する細部のデータ(高周波成分)は光学系を通過しな
いわで、基準aB142aと参照部142bとに投影さ
れる人物A.Bのそれぞれの像はほぼ同じ波形になり、
人物Aの像と人物bの伽とを誤って判定し、焦点検出可
能と判定する場合がある。
In other words, in the case of a long focal length lens with an extremely large lens drive range (lens extension f140as or more), the lens position must be set at high magnification to satisfy the above conditions.
When trying to detect focus on a subject with a considerable distance and low magnification when the amount of lens extension is large, in such a case, the spatial frequency component has a considerable high frequency component, and the image at the reference part 142a or reference part 142b is The interval is extremely small, and completely different images are projected on the reference portion 142a and the reference portion 142b. moreover,
Due to the low magnification, a completely different subject will be projected. In such a blurred state, the optical system passes only extremely low frequency components, so it is usually impossible to detect the focus. However, as shown in FIG. 18(b), the person A. If B is lined up, person A. The detailed data (high frequency components) for distinguishing the person A.B does not pass through the optical system. Each image of B has almost the same waveform,
There are cases where the image of person A and the pagoda of person b are erroneously determined, and it is determined that the focus can be detected.

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

また、前記ステップ#161およびステップ#165で
は、第3ブロックBL3の相lm関数口3(I)および
コントラスト(flG(3)を演算したが、第19図に
示すように、他のブロックBL1 , BL2 ,BL
4 , BL5 . BL9 , BLI Oについて
も同様に求めることができる。
Further, in steps #161 and #165, the phase lm function port 3(I) and the contrast (flG(3)) of the third block BL3 were calculated, but as shown in FIG. BL2, BL
4, BL5. BL9 and BLIO can be similarly determined.

次に、前記ステップ#173での局所コントラストlI
icuhの演算について説明する。このステップ#17
3でのコントラスト値の判定レベルcthには、光電変
換素子アレイ等により発生するノイズ(M音) ml 
C noiseが重畳されている。このノイズl C 
noiseのノイズ自体の大きさは変らないがノイズの
波形がばらつくため、合焦検出に最低限必要な真の被写
体コントラスト(lfIcHINは下式のようになる。
Next, the local contrast lI in step #173 is
The calculation of icuh will be explained. This step #17
The contrast value judgment level cth in step 3 includes noise (M sound) generated by the photoelectric conversion element array, etc. ml
C noise is superimposed. This noise l C
Although the size of the noise itself does not change, the waveform of the noise varies, so the minimum true object contrast (lfIcHIN) required for focus detection is as shown in the following formula.

C th− Ct41N + MAX ( Cnois
e )ただし、CMIN <MAX ( Cnoise
 )このため、ノイズflcnoiseが小さく、本来
、焦点検出可能にもかかわらず、コントラスト艙が判定
レベルcthを越えないために焦点検出不能と判定され
る場合がある。そこで、最大のノイズ量Cnoiseが
発生する時は、第31OツクBL3の各部でもノイズが
存在すると予測されるので、第3ブロックBL3の差分
データごとに下式にしたがつてコントラスト限界の判定
を行う。
C th- Ct41N + MAX (Cnois
e) However, CMIN < MAX (Cnoise
) For this reason, even though the noise flcnoise is small and focus detection is originally possible, it may be determined that focus detection is impossible because the contrast level does not exceed the determination level cth. Therefore, when the maximum amount of noise Cnoise occurs, it is predicted that noise also exists in each part of the 31st block BL3, so the contrast limit is determined for each difference data of the third block BL3 according to the following formula. .

P Σ l  K(j+q)−K(j+q+1)   l 
 ≧ CHIN  +MAX{Cno♂ se )・P/20 ただし、埴Pは予め設定する所定値で、“20″以下の
値から選択する。
P Σ l K(j+q)−K(j+q+1) l
≧ CHIN +MAX {Cno♂ se )・P/20 However, P is a predetermined value set in advance, and is selected from values of “20” or less.

また、粕記コントラスト限界の判定において、局所的な
コントラスト埴が所定値を満足しているときには、コン
トラスト値の判定レベルをノイズが小さな場合と同様に
判定することができる。つまり、コントラスト限界の判
定の手段は、第20図〜第22図に示されたように、複
数の判定ルーチンがある。すなわら、′第20図の判定
ルーチンでは、例えば、第3ブロックBL3から7個の
差分データごとに細分したデータブロックを抽出し、こ
のデータブロツクの内、1個のデータで6所定@ CL
thl以上であれば、トータルのコントラスト傭の判定
レベルを緩和するようになっている。
Further, in determining 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 way as when the noise is small. In other words, the means for determining the contrast limit includes a plurality of determination routines, as shown in FIGS. 20 to 22. That is, in the determination routine shown in FIG. 20, for example, a data block subdivided into 7 pieces of differential data is extracted from the third block BL3, and 6 predetermined @ CL data blocks are extracted from the third block BL3.
If the contrast is greater than or equal to thl, the determination level of the total contrast is relaxed.

つまり、この判定ルーチンは、まず、フラグCLをリセ
ットするとともに、変数qをリセットする〈ステップ#
191)。次いで、第3ブロックBL3のデータをデー
タK2(1)からK2 ( 8 )までの差分データ(
7個)よりなるデータプロックC出し、このデータブロ
ックc tocと所定IICLth1と比較する(ステ
ップ#192.#193)。そして、データブロックc
 tocの内、1[1のデータでも所定植cttht以
上であれば、フラグCLをセットし(ステップ#194
)、コントラスト値の判定レベルを緩和する。
In other words, this determination routine first resets the flag CL and resets the variable q <step #
191). Next, the data of the third block BL3 is converted into the difference data from data K2 (1) to K2 (8) (
7) is output, and this data block c toc is compared with a predetermined IICLth1 (steps #192 and #193). and data block c
If even the data of 1[1 in toc is greater than or equal to the predetermined planting cttht, the flag CL is set (step #194
), the contrast value judgment level is relaxed.

一方、データブロックC LOCの各差分データが所定
l CLth1未満であれば、変数qをインクリメント
して第31OツクBL3のデータK2 ( 2 ”)か
らK2 ( 9 )までの差分データよりなるデータブ
ロックC LOCを抽出し、このデータブロックc t
ocと所定@ CLthlと比較する(ステップ#19
5.#193)。そして、データブロックC LOCの
内、1個のデータでも所定11 CLth1以上か、あ
るいは第3ブロック8L3のデータK2 ( 1 3 
)からK2(20)までの差分データよりなるデータブ
ロック℃(OCを抽出されるまで続けられる(ステップ
#192〜#1 96)。この結果、全てのデータブロ
ックc tocで所定I CLthl未満であれば、フ
ラグOLはリセットのままで第18図(a)のフローチ
ャートに移行する。
On the other hand, if each differential data of the data block CLOC is less than the predetermined value lCLth1, the variable q is incremented and the data block C consisting of the differential data from data K2 (2'') to K2 (9) of the 31st block BL3 is created. Extract the LOC and extract this data block c t
oc and the predetermined @CLthl (step #19
5. #193). Then, even one piece of data in the data block C LOC is equal to or greater than a predetermined 11 CLth1, or the data K2 ( 1 3
) to K2 (20) continues until the data block C (OC) is extracted (steps #192 to #1 96). As a result, if all data blocks c toc are less than the predetermined I CLthl. For example, the flag OL remains reset and the process moves to the flowchart of FIG. 18(a).

また、第21図では、ブロックのデータの最大値および
最小値を抽出し、これら最大伯と最小値との差から局所
コントラストの有無を判定する。
Further, in FIG. 21, the maximum value and 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ブロックB[3のデ
ータK2(1〜20>から最大値[ M AX(K2(
j)}]および最小値[MIN(K2(j))]を抽出
し、これら最大m [M AX{K2(m ] ト!小
1lIII[ M IN(K2(m ] と(D差ct
Oc  ( CIOC =MAX{K2(j)} −M
 IN(K2(j)) )を求める(ステップ#201
〜#203〉。次いで、フラグCLをリセットしくステ
ップ#204> 、差C LOCと所定hl CLth
2と比較する(ステップ#205)。そして、所定{1
71cLth2以上であれば、フラグCしをセットしく
ステップ#206) 、コントラスト値の判定レベルを
緩和する。一方、差C LOCが所定1fi CLth
2未満であれば、フラグCLはリセットのままで第18
図(a)のフローチャートに移行する。
In other words, this determination routine is calculated from the data K2(1 to 20> of the third block B[3) to the maximum value [MAX(K2(
j)}] and the minimum value [MIN(K2(j))], and extract these maximum m [MAX{K2(m] t!small1lIII[MIN(K2(m) and (D difference ct
Oc ( CIOC = MAX {K2(j)} −M
Find IN(K2(j)) (step #201
〜#203〉. Next, step #204> to reset the flag CL, the difference CLOC and the predetermined HL CLth
2 (step #205). Then, the predetermined {1
If it is 71cLth2 or more, flag C is set (step #206), and the determination level of the contrast value is relaxed. On the other hand, the difference C LOC is a predetermined 1fi CLth
If it is less than 2, the flag CL remains reset and the 18th
The process moves to the flowchart shown in FIG.

さらに、第22図では、ブロックのデータの内、所定レ
ベルより大きなデータが所定個数以上あるかどうかの判
定で局所コントラストの有無を判定する。
Furthermore, 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 in the block.

つまり、この判定ルーチンは、まず、変敗jを“1′に
セットし、変数CL1 , CL2をリセットし、さら
にフラグCLをリセットする(ステップ#211)。次
いで、第3ブロック8L3のデータK2〈1)と所定@
 ctth3ヲ比較シ、所定艙CLth3 以上のとき
、変数CL1に“1′′を加え、次に、データκ2(1
)が所定値一CLth3以下のとき、変数CL2に“1
′を加える(ステップ#212〜#215)。そして、
前記変数CL1と変数CL2との積を求め、この積CL
I ・CL2が所定値CLth4以上であれば、フラグ
CLをセットしくステップ#21 7)、コントラスト
埴の判定レベルを緩和する。一方、lficL1 ・C
L2 カ所定i1cLth4 所定IIcLth2 未
満テあれば、変数jをインクリメントし、第3プロツク
BL3の全てのデータK2 ( 2 0 >について、
ステップ#212から#215までの処理を行う(ステ
ップ#212〜#219)。この結果、全てのデータの
処理を終えても積CL1  ・CL2が所定1ific
Lth4未満であれば、フラグCLはリセットのままで
第18図(a)の70−チャートに移行する。
That is, this determination routine first sets the change/failure j to "1', resets the variables CL1 and CL2, and further resets the flag CL (step #211). Next, the data K2 of the third block 8L3 1) and prescribed @
Compare ctth3, and when the predetermined range is CLth3 or above, add "1'' to variable CL1, and then data κ2 (1
) is less than the predetermined value - CLth3, the variable CL2 is set to “1”.
' (steps #212 to #215). and,
The product of the variable CL1 and the variable CL2 is calculated, and this product CL
If I.CL2 is greater than or equal to the predetermined value CLth4, the flag CL is set in step #217), and the contrast level determination level is relaxed. On the other hand, lficL1・C
If L2 is less than the predetermined i1cLth4 and the predetermined IIcLth2, the variable j is incremented, and for all the data K2 (2 0 > of the third block BL3),
The processes from steps #212 to #215 are performed (steps #212 to #219). As a result, even after processing all data, the products CL1 and CL2 remain at the predetermined 1ific.
If it is less than Lth4, the flag CL remains reset and the process moves to the 70-chart in FIG. 18(a).

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

第23図の平均処理ルーヂンでは、弟18図(a)のス
テップ#165.#167で求められたコントラストI
I!IC(3)および比の値R(3)に基づいて重み閏
数W(1)を設定し、この重み閏数W(1)を用いて各
ブロックのデフォーカス憬の加重平均を行うようになっ
ている。すなわち、まず、変数1を“3″にセットする
(ステップ#21 7).そして、各ブロックBL3 
, BL4 , BL5の各デフォーカスfliDF3
 , DF4 , DF5の内の最も大きなデフォーカ
ス量HAXDFとデフォーカスffiDF3との差を求
め、この差と平均処理幅ΔDFとを比較し、この差が平
均処理幅ΔD「を越えたときには、重み閏敗W(3)を
“0”にする。そして、変filをインクリメントし、
デフォーカスl HAXDFとデフォーカスII DF
4およびデフォーカスIIDF5との差を求め、この差
と平均処理幅ΔD「とを比較し、この差が平均処理幅八
〇Fを越えたときは、重み閏数W(4〉および重み閏数
W(5)を“0′゛にする(ステップ#222〜#22
5)。
In the averaging processing routine in FIG. 23, step #165. Contrast I found in #167
I! A weighted leap number W(1) is set based on IC(3) and the ratio value R(3), and this weighted leap number W(1) is used to perform a weighted average of the defocus values of each block. It has become. That is, first, variable 1 is set to "3" (step #217). And each block BL3
, BL4, BL5 each defocus fliDF3
, DF4, DF5, the difference between the largest defocus amount HAXDF and defocus ffiDF3 is calculated, and this difference is compared with the average processing width ΔDF. If this difference exceeds the average processing width ΔD, the weighting step is Set defeat W (3) to “0”. Then, increment variable fil,
Defocus L HAXDF and Defocus II DF
4 and defocus IIDF5, and compare this difference with the average processing width ΔD. If this difference exceeds the average processing width 80F, the weighted leap number W(4> and the weighted leap number Set W(5) to “0′” (Steps #222 to #22
5).

つまり、各ブロックBL3 , BL4 , BL5の
各デフォーカス恐DF3 , DF4 , DF5の内
、平均処理幅ΔDF以内のデフォーカス量を用いて平均
処理を行う.次いで、前述のように処理された重み関数
W(1)を用いて加重平均を行い、この平均値を第2ア
イランド22のデフォーカス壜ロFIS2に設定する(
ステップ#226>. つまり、デフォーカスlDFls2は下式のようになる
That is, average processing is performed using defocus amounts within the average processing width ΔDF among the defocus amounts DF3, DF4, and DF5 of each block BL3, BL4, and BL5. Next, weighted averaging is performed using the weighting function W(1) processed as described above, and this average value is set in the defocus bottle FIS 2 of the second island 22 (
Step #226>. In other words, the defocus lDFls2 is as shown in the following equation.

DFIS2 −(DF3・W (3)+DF4 ・W(
4)◆(lF5 ・W (5))/  (W (3)+
W (4)−W (5))そして、ワイドゾーンフラグ
御IF2をセットする(ステップ#227)。そののち
、第11図のステップ#43のデフォーカス噛演算サブ
ルーチンに移行する。
DFIS2 −(DF3・W (3)+DF4・W(
4)◆(lF5 ・W (5))/ (W (3)+
W (4)-W (5)) Then, the wide zone flag control IF2 is set (step #227). Thereafter, the process moves to the defocus calculation subroutine of step #43 in FIG.

第24図の平均処理ルーチンでは、相関間数の内、最大
相関位置IMと、その前後の相関位置11441および
相関位2f I M−1において複数のブロックを組み
合せて相lIl関数を再計算し、ざらに再補間演搾する
ようになっている。すなわち、全てのブロックBL3 
. BL4 . BL5が平均処理幅ΔDFよりも小さ
いと(平均処理対象)、第2アイランド22のデータK
2(1〜40)で相関閏数口3,4.5(IN). H
3,4.5(1M−1), H3,4.5(IH+1)
ヲ再ffiOし、ざらに再補間演鋒してこの値を第2ア
イランド22のデフォーカス量DFIs2に設定する《
ステップ#231.#232)。また、第3ブロックB
L3および第4ブロックBL4が平均処浬幅ΔDFより
も小さいと、データK2(1〜30)で相関関数83.
4( I M). H3,4( I M−1). H3
.4( I M+1.)を再計算し、再補間演算してこ
の植をデフォーカス量DFIS2に設定する(ステップ
#233.9234)。さらに、第470ツクBL4お
よび第5ブロックBL5が平均処理幅ΔDFよりも小さ
いと、データK2(11〜40)で相m図数8 4.5
( 1 14). H 4.5(l H−1),口4.
5(I旧1)を再計算し、再補間演算してこの値をデフ
ォーカスffiDFIs2に設定する(ステップ#23
5.#236>。また、ステップ#235で、第3ブロ
ックBL3および第5ブロックBL5が平均処理幅ΔD
Fよりも小さいと、ステップ#232に移行し、そして
、ワイドゾーンフラグ141F2をセットし(ステップ
#237>、そののち、第11図のステップ#43のデ
フォーカス量演算サブルーチンに移行する。
In the average processing routine shown in FIG. 24, a plurality of blocks are combined at the maximum correlation position IM, the correlation positions 11441 before and after it, and the correlation position 2f I M-1 among the number of correlations, and the phase lIl function is recalculated, Rough re-interpolation is now performed. That is, all blocks BL3
.. BL4. If BL5 is smaller than the average processing width ΔDF (average processing target), the data K of the second island 22
2 (1 to 40) and the correlation leap number is 3,4.5 (IN). H
3,4.5 (1M-1), H3,4.5 (IH+1)
Re-ffiO, roughly re-interpolate and set this value as the defocus amount DFIs2 of the second island 22.
Step #231. #232). Also, the third block B
When L3 and the fourth block BL4 are smaller than the average processing width ΔDF, the data K2 (1 to 30) has a correlation function of 83.
4 (IM). H3,4 (IM-1). H3
.. 4(IM+1.), re-interpolation is performed, and this set is set as the defocus amount DFIS2 (step #233.9234). Furthermore, if the 470th block BL4 and the fifth block BL5 are smaller than the average processing width ΔDF, the phase m figure number 8 4.5 with data K2 (11 to 40)
(1 14). H 4.5 (l H-1), Mouth 4.
5 (I old 1), re-interpolate and set this value to defocus ffiDFIs2 (step #23
5. #236>. In addition, in step #235, the third block BL3 and the fifth block BL5 have an average processing width ΔD
If it is smaller than F, the process moves to step #232, and the wide zone flag 141F2 is set (step #237>, and then the process moves to the defocus amount calculation subroutine of step #43 in FIG. 11).

ここで、前述のステップ#232.#234,#236
の相閏関数H3,4.5( I N). 83.4( 
I M).口4,5( I H)の演算式を示す。
Here, step #232 described above. #234, #236
The reciprocal function H3, 4.5( I N). 83.4(
IM). The calculation formula for ports 4 and 5 (IH) is shown.

口3.4。5( I M)− 8 3,5( I N)
− (  l K2(1)−82(5+ 1 14) 
l + l K2(4G)−32(44+ I N) 
l )/2+Σ1κ2(J)−32(4+j+ [ H
) H3.4(IN)−(  l K2(1)−32(5+
 IN)l + l K2(3)−32(4+j+I 
M) ト14   5(IN)−(   I  K2(11)
−s2(15+IN)l   +  l  K27q l)42(4+j+ l H) また、第25図の平均処理ルーチンでは、平均処理の対
象となる各ブロックの相関関数日(1M).口(114
−1).口(IM+1)をそれぞれ加算し、この加粋結
果を用いて補間演算以後の処理を行うようになっている
。すなわち、全てのブロックBL3 ,BL4 , B
L5が平均5111理幅ΔDFよりも小さいときに、相
[10関数8 3,4.5( I N).口3,4.5
( I N−1),ト13,4.5( I H◆1)は
下式のように計埠する(ステップ#241,#242)
Mouth 3.4.5 (IM) - 8 3,5 (IN)
- (l K2(1)-82(5+1 14)
l + l K2(4G)-32(44+IN)
l)/2+Σ1κ2(J)-32(4+j+[H
) H3.4(IN)-(l K2(1)-32(5+
IN)l + l K2(3)-32(4+j+I
M) 14 5(IN)-(I K2(11)
-s2(15+IN)l+lK27ql)42(4+j+lH) Also, in the averaging processing routine of FIG. 25, the correlation function day (1M) of each block to be averaged is calculated. Mouth (114
-1). The numbers (IM+1) are added together, and the summation result is used to perform processing subsequent to the interpolation calculation. That is, all blocks BL3, BL4, B
When L5 is smaller than the average width ΔDF, the phase [10 function 8 3, 4.5 ( I N). mouth 3,4.5
(I N-1), G13, 4.5 (I H◆1) are calculated as shown in the formula below (Steps #241, #242)
.

H 3,4.5( I  N−1) 一 ト{3( I
  N−1) 十 114(  I  M−1)+ 1
−1 5(IN−1) H3.4,S([1)−H3([14)+H4(IN)
+85([H)H3,4.5( I N+1)− 8 
3( I H+1)+ 8 4( I N+1)十口5
(1M+1) また、第310ックBL3および第4ブロックBL4が
平均処理幅ΔDFよりも小さいときには、相関関数83
,4( [ 14). H3.4( I N−1). 
H3,4( [ M◆1)は下式のように計titる(
ステップ#243,#244). H3,4( I  H−1)− 83( 1  14−
 1)+ 84(I  M−1)口 3.4(  I 
 H) 一 113(IN)+84(I  M)H3,
4(IH+1)−83(IM+1)十84(IM+1)
さらに、第410ツクBL4および第5ブロックBL5
が平均処理幅ΔDFよりも小さいときには、相関関数8
4.5( I M), H4,S( [ 14−1),
 H4,5( I H◆1》は下式のように計算する《
ステップ#245.#246)。
H 3,4.5( I N-1) 1 to {3( I
N-1) 114 (I M-1) + 1
-1 5(IN-1) H3.4,S([1)-H3([14)+H4(IN)
+85([H)H3,4.5(IN+1)-8
3 ( I H + 1) + 8 4 ( I N + 1) ten mouths 5
(1M+1) Moreover, when the 310th block BL3 and the 4th block BL4 are smaller than the average processing width ΔDF, the correlation function 83
, 4 ([ 14). H3.4 (IN-1).
H3,4 ([M◆1) is calculated as the following formula (
Steps #243, #244). H3,4( I H-1)- 83( 1 14-
1) + 84 (I M-1) mouth 3.4 (I
H) 1 113 (IN) + 84 (IM) H3,
4 (IH+1) - 83 (IM+1) 184 (IM+1)
Furthermore, the 410th block BL4 and the 5th block BL5
is smaller than the average processing width ΔDF, the correlation function 8
4.5(IM), H4,S([14-1),
H4,5 (I H◆1》 is calculated as below formula《
Step #245. #246).

H 4.5( I N−1)− 8 4( 1 14−
1)+ 8 5( I N−1)H4,5(114)−
84(IN)+LI5(IN)H  4,5(  I 
 N+1)=  8  4(  I  M+1)+  
8  5(l  H+1)また、ステップ#245で、
第3ブロックBL3および第5ブロックBL5が平均処
理暢ΔOFよりも小さいときには、相関関数83.5(
IN). H3,5(I N−1). H 3,5( 
I H◆1)は千式のように計算する《ステップ#24
7>。
H 4.5 (IN-1) - 8 4 ( 1 14-
1)+8 5(IN-1)H4,5(114)-
84(IN)+LI5(IN)H 4,5(I
N+1)=8 4(I M+1)+
8 5(l H+1) Also, in step #245,
When the third block BL3 and the fifth block BL5 are smaller than the average processing efficiency ΔOF, the correlation function 83.5 (
IN). H3,5(IN-1). H 3,5(
I H◆1) is calculated like a thousand expressions《Step #24
7>.

口3、5( I M−1)一口3( 1 14−1)+
 8 5( I N−1)H3,5(114)−83(
IN)+85(IM)H3.5(Il4◆1)−  H
  3(  1  M+1)  十 口 5(  1 
 N+1)そして、ステップ#242,#244,#2
46,#247の相f1l関数の計算を終えると、再補
閤演輝を行い、この餡をデフォーカス量DFIS2に設
定する(ステップ#248)。つまり、デフォーカス量
DFIS2は下式のようになる。
Mouth 3, 5 (I M-1) Mouth 3 (1 14-1) +
8 5(IN-1)H3,5(114)-83(
IN)+85(IM)H3.5(Il4◆1)-H
3( 1 M+1) 10 mouths 5( 1
N+1) and steps #242, #244, #2
After completing the calculation of the phase f1l function in steps #46 and #247, re-compensation is performed and this value is set as the defocus amount DFIS2 (step #248). In other words, the defocus amount DFIS2 is expressed by the following formula.

DFIS2−α− !H +α・ (H(  IM−1
)一口(  1M+1))/[ MIN(H( IN−
1).口( IM+1))− H (IN)]/ 2 そして、ワイドゾーンフラグーZF2をセットし(ステ
ップ#249) 、そののち、第11図のステップ#4
3のデフォーカス恐演算サブルーチンに移行する。
DFIS2-α-! H +α・(H( IM-1
) Bite ( 1M+1)) / [ MIN(H( IN-
1). (IM+1)) - H (IN)]/2 Then, set the wide zone flag ZF2 (step #249), and then step #4 in Figure 11.
The process moves to the defocus calculation subroutine No. 3.

次に、第13図のステップ#93〜#95の弟6ブロッ
クBL6のデフォーカス最演算サブルーチンについて第
26図を用いて説明する。
Next, the defocus maximum calculation subroutine for the younger six blocks BL6 in steps #93 to #95 in FIG. 13 will be explained using FIG. 26.

まず、ブロックBL3 , BL4 , BL5で用い
た差分データ列κ2(j)および32(j)よりそれぞ
れ7つ置きに差分をとり、この差分データの隣接間の和
分データ列KW(j)およびSW(j)を求める(ステ
ップ#251)。この和分データ列κ旧j) . 31
4(j)は第10図のステップ#26で入力された差分
データ列を用いて下式のようになる。
First, differences are taken every seventh difference data string κ2(j) and 32(j) used in blocks BL3, BL4, and BL5, respectively, and summation data strings KW(j) and SW between adjacent ones of this difference data are calculated. (j) is found (step #251). This summation data string κ old j). 31
4(j) is expressed as below using the differential data string input in step #26 of FIG.

K14(m)一K2(m)+K2(一◆1)+K2(鴎
+4)+K2(m◆5)S旧1) −32(+)+82
(++1)482(+44)+32(++5)次に、相
nlI関数口G(I)を求め、相関関数8 6([)の
鎖が最小になるシフト11M  (114 −MIX(
H6(1)) )を抽出する(ステップ#252,#2
53)。この相l1Illl!l@口6(I)は下式の
ようになる。
K14 (m) - K2 (m) + K2 (1 ◆ 1) + K2 (Seagull + 4) + K2 (m ◆ 5) S old 1) -32 (+) + 82
(++1)482(+44)+32(++5) Next, find the phase nlI function mouth G(I) and shift 11M (114 −MIX(
H6(1)) ) is extracted (steps #252, #2
53). This phase l1Illll! l@mouth 6 (I) is as shown in the following formula.

口6(1)−(   l  κW(2)−Sl4(6◆
夏)   l  +  l  KW(34)−S旧38
+I)l)/2+Σ1問(j)−SW(4+j+1)J
t3 ここで、上式のように基準部142aのデータ列から両
端のデータを除いて相Il1gQ数H 6(1)を求め
るのは、後述の補間演算の際に最小シフトffiIM′
iL傍の相[11関数口G(IN−1). H6(1)
. H6(II4+1)のみを用いるのではなく、相関
関数8 6( I N−2).H Ei( I M+2
)をも用いるために相III III数8 6( I 
H−2),H 6( I H+2)での参照部142b
のデータに対応する位置が大きくずれるのを補正するた
めである(特fli1昭60−24721 1MIIM
t)。
口6(1)-(l κW(2)-Sl4(6◆
summer) l + l KW (34)-S old 38
+I)l)/2+Σ1 question (j)-SW(4+j+1)J
t3 Here, obtaining the phase Il1gQ number H6(1) by removing the data at both ends from the data string of the reference section 142a as in the above equation is done by using the minimum shift ffiIM' during the interpolation calculation described later.
The phase near iL [11 function mouth G (IN-1). H6 (1)
.. Instead of using only H6(II4+1), we use the correlation function 86(I N-2). H Ei(I M+2
) to also use phase III III number 8 6 ( I
H-2), reference part 142b at H6 (I H+2)
This is to correct the large deviation of the position corresponding to the data of
t).

ステップ#254では、これら相関関数ト16(IH−
2),口6( I M−1). H 6( I M+1
1,口6( l H+2)を求める。すなわち,これら
の式は、 1↓ となる。
In step #254, these correlation functions T16 (IH-
2), Mouth 6 (IM-1). H 6(I M+1
1. Find mouth 6 (l H+2). In other words, these equations become 1↓.

これら相圓関数11 6( I M−2). H 6(
 I M−1),口6([H+1),口6( I M+
2)を用いて補間演算を下式のように行う(ステップ#
255)。
These correlative functions 11 6 (I M-2). H 6 (
I M-1), mouth 6 ([H+1), mouth 6 (I M+
2) to perform interpolation calculation as shown below (step #
255).

Xl4−IM+(口6( I N−2)− 8 6( 
1 M+2))/[ M IN(  H  6(  l
  H−2).   H  6(  l  M+2))
−M AX  {  11 6( IN−1). H6
(IN◆1))1/2前記補間ビッチXHに係数αをl
}けてデフォーカスIDF (OF−XH ・a) に
t*it6 (ステップ#256)。次いで、第6ブロ
ックBL6のデータの持つコントラストfaG(6)を
下式のように求める(ステップ#257)。
Xl4-IM+(口6(IN-2)-86(
1 M+2))/[ M IN( H 6( l
H-2). H 6( l M+2))
-M AX { 11 6 (IN-1). H6
(IN◆1)) 1/2 Add coefficient α to the interpolation bit XH
} and then defocus IDF (OF-XH ・a) at t*it6 (step #256). Next, the contrast faG(6) of the data of the sixth block BL6 is determined using the following formula (step #257).

続いて相fl11!I数口6(114)の最小値の補間
fli Y 81を求め、この補間iQ’/81とコン
トラストi[c(6)とを用いて比のliIR(6)を
下式のように求める(ステップ#258)。
Next is Aifl11! Find the interpolation fli Y 81 of the minimum value of I number 6 (114), and use this interpolation iQ'/81 and the contrast i [c (6) to find the ratio liIR (6) as shown in the following formula ( Step #258).

YH1=MAX(H6(IN−1). H6(IHrl
)) − ( IHe(  I  M−2)−  86
(  1  M+2)  l  )  /  2R (
6)−C (6)/ (YHI−OF)次いで、判定レ
ベルCth6 , Rth6にそれぞれ所定埴を設定し
、コントラストIC(6)および比のlifiR(6)
が共に所定値をm足した場合のみ焦点検出可能とし、コ
ントラストfilG(6)あるいは比のIR (6)の
いずれか一方でも満足しない場合には、焦点検出不能と
する(ステップ#259.#260)。
YH1=MAX(H6(IN-1).H6(IHrl
)) - (IHe(IM-2)-86
( 1 M + 2) l ) / 2R (
6)-C (6)/ (YHI-OF) Next, set a predetermined value for each of the judgment levels Cth6 and Rth6, and set the contrast IC (6) and the ratio lifiR (6).
Focus detection is enabled only when both are added to a predetermined value by m, and if either contrast filG (6) or ratio IR (6) is not satisfied, focus detection is disabled (steps #259 and #260). ).

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

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

まず、基準部142aのデータ列を“3.2,1.−1
.−2.−3”とし、参照部142bのデータ列を“4
.3.2.1,−1.−2.−3.一4″とすると、相
1司関数は口(0)−0.口(−1)−6.8(1)−
6になる。ここで、参照部142bのデータ1fi1に
ノイズが加わり、参照部142bのデータ列が“4.3
.2.O.−1.−1.−3.−4” に変化スルト、
相na関数ハH(0)−2.8(−1)−5.5.8(
1)−6になり、合焦点、すなわち、相関関数}1(I
N)に対するノイズの影響が最も大きく、相IIIIl
Q数H( 114−1). H ( IN◆1)への彰
IIは比較的小さくなる。このため、相関関数H(IN
)が周朋的な関数でない限り、相関関数H(IN)を用
いずに、相関関数H(IN)の前後の相閏閏敗H ( 
I H−2). H( 1 14−1). H ( 1
 1481), H ( I N+2)を用いてノイズ
の影響を小さくするようにしている。
First, the data string of the reference section 142a is set to "3.2, 1.-1".
.. -2. -3" and the data string of the reference section 142b is "4".
.. 3.2.1, -1. -2. -3. -4'', the phase 1 function is ku (0) - 0.ku (-1) - 6.8 (1) -
It becomes 6. Here, noise is added to the data 1fi1 of the reference section 142b, and the data string of the reference section 142b becomes "4.3".
.. 2. O. -1. -1. -3. Surt changed to -4”,
Phase na function H(0)-2.8(-1)-5.5.8(
1)-6, and the focused point, that is, the correlation function}1(I
The influence of noise on phase III is the greatest
Q number H (114-1). Akira II to H (IN◆1) becomes relatively small. Therefore, the correlation function H(IN
) is not a regular function, without using the correlation function H(IN), we can calculate the relative deviations H (
IH-2). H (1 14-1). H (1
1481) and H (IN+2) to reduce the influence of noise.

また、ステップ#259では、第18図(a)のような
通常の補間演算を行うと、オフセット潰カ生シルタメ、
補@ifl Y M1カらM AX ( H 6( I
 N−1),H 6( 1 )441))と相関関数口
6(1+4)とのp!OF1、アルイハMAX ( H
6( 1 14−2). H6( I M+2))とM
AX( H 6( I H−1).116(目H◆1)
}との差OF2、あるいはコントラストIC(6)を引
いた植に基づいて設定したimlOFを用いて比の値R
(6)の演算を行う。
In addition, in step #259, when a normal interpolation calculation as shown in FIG. 18(a) is performed, the offset
Supplementary @ ifl Y M1 to M AX ( H 6 ( I
p! between N-1), H 6(1)441)) and the correlation function 6(1+4). OF1, Aruiha MAX (H
6 (1 14-2). H6 (I M+2)) and M
AX(H 6(I H-1).116(eye H◆1)
}, or the ratio value R using imlOF set based on the contrast IC (6) subtracted.
Perform the calculation in (6).

〔発明の効果〕〔Effect of the invention〕

本発明は、一次フィルタ手段を用いても光命の相対的変
位が検出できないときに二次フィルタ手段を作動させる
ので、一次フィルタ手段を用いるのみで、光像の相対的
変位の検出ができるときには、相対的変位の検出を短時
間で行うことができる。また、二次フィルタ手段を用い
て光像の相対的変位を検出するときには、一次フィルタ
手段は動作を停止し、一次フィルタ手段で抽出されたデ
ータを記憶するRAM等のメモリに二次フィルタ手段で
抽出された周波数成分のデータを記憶させるので、RA
M等のメモリの利用効率の向上を図ることができる。
The present invention operates the secondary filter means when the relative displacement of the optical image cannot be detected even by using the primary filter means, so when it is possible to detect the relative displacement of the optical image only by using the primary filter means. , relative displacement can be detected in a short time. Further, when detecting the relative displacement of the optical image using the secondary filter means, the primary filter means stops its operation, and the secondary filter means stores the data extracted by the primary filter means in a memory such as a RAM. Since the extracted frequency component data is stored, the RA
It is possible to improve the utilization efficiency of memory such as M.

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

第1図は本発明に係る自動焦点検出装釘を備えたカメラ
の概略構成図、第2図は焦点検出手段の機構構成図、第
3図は光電変換素子アレイを示す図、第4図はファイン
ダ内の腸影画面の焦点検出領域を示す図、第5図は第1
アイランド〜第3アイランドに対応する襲準部を拡大し
た図、第6図.第7図は各70ックのデフォーカス範囲
を説明する図、第8図は本発明に係る自動焦点検出装置
をマイコンを用いて構或したカメラの回路ブロック図、
第9図.第10図はマイコンの割り込み動作のフローチ
ャート、第11図〜第14図は第1アイランド〜第3ア
イランドのデフォーカス壇演算のサブルーチンを示すフ
a−チャート、第15図は露出演輝のサブルーチンを示
すフローチャート、第16図はデフォーカス量の演棹手
段を選択する手順を説明する図、第17図は平均処理幅
を求めるサブルーチンを示すフローチャート、第18図
(a)は第3ブロックのデフォーカス置の演算および焦
点検出不能判断を説明する図、第18図(b)は人物が
並んでいるような場合に誤判定することを説明する図、
第19図は各ブロックの相関圓数およびコントラスト植
の演算を示す図、第20図〜第22図はコントラスト限
界の判定のサブルーチンを示すフローチャート、第23
図〜第25図は平均処理ルーチンを示すフローチャート
、第26図はデフォーカス怨演算サブルーチンを示すフ
ローチャート、第27図は補間演算の手段を説明する図
である。 1・・・自動焦点検出装置、2・・・撮影レンズ、3・
・・焦点検出手段、4・・・デフォーカス穏決定手段、
5・・・レンズ位置検出手段、6・・・レンズ駆動手段
、7・・・IIIIII手段、8・・・被写体、21・
・・第1アイランド、22・・・第2アイランド、23
・・・第3アイランド、26・・・マイコン、27・・
・レンズ回路、28・・・焦点検出データ出力回路、3
4・・・レンズiIIJIl1回路、35 −・・1t
 II電池、3 6−・・給電回路、141a,142
a,143a−1Sel1部、14lb.142b,1
43b・・・参照部、BL1・・・第17ロック、BL
2−・・第2プOツク、BL3・・・第3プ0ツク、B
L4・・・第4ブロック、BL5−・・第5ブ0ツク、
BL9−・・第9ブロック、8LiO・・・第10ブロ
ック、SW1”・N源スイッチ、SW2・・・鴎彰準備
スイッチ、SW4・・・選択スイッチ。
Fig. 1 is a schematic configuration diagram of a camera equipped with an automatic focus detection nail according to the present invention, Fig. 2 is a mechanical configuration diagram of the focus detection means, Fig. 3 is a diagram showing a photoelectric conversion element array, and Fig. 4 is a viewfinder. Figure 5 shows the focus detection area of the intestinal shadow screen in Figure 1.
Figure 6 is an enlarged view of the assault area corresponding to islands ~ 3rd island. FIG. 7 is a diagram illustrating the defocus range of each 70 points, and FIG. 8 is a circuit block diagram of a camera configured with an automatic focus detection device according to the present invention using a microcomputer.
Figure 9. Fig. 10 is a flowchart of the interrupt operation of the microcomputer, Figs. 11 to 14 are flowcharts showing the subroutine for calculating the defocus stage for the first to third islands, and Fig. 15 is a subroutine for the exposure lighting. 16 is a diagram explaining the procedure for selecting a defocus amount calculation means, FIG. 17 is a flowchart illustrating a subroutine for calculating the average processing width, and FIG. FIG. 18(b) is a diagram explaining the calculation of the position and the determination that the focus cannot be detected; FIG.
FIG. 19 is a diagram showing the calculation of the correlation circle and contrast set for each block, FIGS. 20 to 22 are flowcharts showing the subroutine for determining the contrast limit, and FIG.
25 to 25 are flowcharts showing the average processing routine, FIG. 26 is a flowchart showing the defocus calculation subroutine, and FIG. 27 is a diagram explaining the interpolation calculation means. 1...Automatic focus detection device, 2...Photographing lens, 3.
... Focus detection means, 4... Defocus mode determining means,
5... Lens position detection means, 6... Lens drive means, 7... IIIIII means, 8... Subject, 21.
...First island, 22...Second island, 23
...Third island, 26...Microcomputer, 27...
・Lens circuit, 28...Focus detection data output circuit, 3
4... Lens iIIJIl1 circuit, 35 -...1t
II battery, 3 6-...power supply circuit, 141a, 142
a, 143a-1Sel1 part, 14lb. 142b,1
43b...Reference part, BL1...17th lock, BL
2-...2nd push, BL3...3rd push, B
L4...4th block, BL5-...5th block,
BL9--9th block, 8LiO-10th block, SW1''/N source switch, SW2... Ooaki preparation switch, SW4... selection switch.

Claims (1)

【特許請求の範囲】[Claims] 1、第1の空間周波数成分を抽出する一次フィルタ手段
と、この抽出された空間周波数成分に基づいて焦点検出
を行う第1の焦点検出手段と、前記抽出された空間周波
数成分に基づいて第2の空間周波数成分を抽出する二次
フィルタ手段と、この二次フィルタ手段で抽出された空
間周波数成分に基づいて焦点検出を行う第2の焦点検出
手段と、前記第1の焦点検出手段で焦点検出不能と判定
されたときに前記二次フィルタ手段と第2の焦点検出手
段とを作動させる判定手段とを備えたことを特徴とする
自動焦点検出装置。
1. A first-order filter means for extracting a first spatial frequency component, a first focus detection means for performing focus detection based on the extracted spatial frequency component, and a second-order filter means for performing focus detection based on the extracted spatial frequency component. a second-order filter means for extracting a spatial frequency component, a second focus detection means for performing focus detection based on the spatial frequency component extracted by the second-order filter means, and a second focus detection means for performing focus detection by the first focus detection means. An automatic focus detection device comprising: determination means for operating the secondary filter means and the second focus detection means when it is determined that the secondary filter means and the second focus detection means are disabled.
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
JP10325689A Division JPH0215218A (en) 1989-04-21 1989-04-21 Focus detecting device
JP10325589A Division JPH0215217A (en) 1989-04-21 1989-04-21 Focus detector
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
JP10858989A Division JP2682132B2 (en) 1989-04-26 1989-04-26 Focus detection device
JP10859189A Division JP2671491B2 (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 true JPH0320706A (en) 1991-01-29
JP2770318B2 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)

Citations (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

Patent Citations (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
JP2770318B2 (en) 1998-07-02

Similar Documents

Publication Publication Date Title
US20040042780A1 (en) Auto focusing system
JP2605282B2 (en) Automatic focusing device
US4994841A (en) Automatic focus detecting means
US5212514A (en) Camera having a focus detecting optical system
US4910545A (en) Finder optical system
US5144357A (en) Automatic focus detecting means
JPH0320706A (en) Automatic focus detecting device
JP2018031969A (en) Imaging apparatus and control method thereof
JP4935380B2 (en) Image tracking device and imaging device
JP2770408B2 (en) Focus detection device
JPH0215217A (en) Focus detector
US5166718A (en) Finder optical system
JPH02217813A (en) Focus detecting device
JPH0215218A (en) Focus detecting device
JP2671489B2 (en) Focus detection device
JPH01289905A (en) Camera and camera body
JP2671490B2 (en) Focus detection device
JP2868459B2 (en) Camera with automatic focus detection device
JP4532169B2 (en) Focus detection device
JP2671491B2 (en) Focus detection device
US5495312A (en) Camera exposure calculation device dependent on type of scene to be photographed and focus condition detecting device dependent on camera attitude
JPH02176610A (en) Focus detector
JP3076753B2 (en) Distance measuring device with auxiliary light emitting device for camera
JPH0215220A (en) Focus detecting device
JP3106613B2 (en) Camera exposure calculation device

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