JP2770408B2 - Focus detection device - Google Patents

Focus detection device

Info

Publication number
JP2770408B2
JP2770408B2 JP1105458A JP10545889A JP2770408B2 JP 2770408 B2 JP2770408 B2 JP 2770408B2 JP 1105458 A JP1105458 A JP 1105458A JP 10545889 A JP10545889 A JP 10545889A JP 2770408 B2 JP2770408 B2 JP 2770408B2
Authority
JP
Japan
Prior art keywords
block
focus detection
defocus amount
value
correlation value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1105458A
Other languages
Japanese (ja)
Other versions
JPH0215221A (en
Inventor
徳治 石田
正隆 浜田
賢司 石橋
寿夫 糊田
浩 上田
宣之 沖須
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Minolta Co Ltd
Original Assignee
Minolta Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Minolta Co Ltd filed Critical Minolta Co Ltd
Priority to JP1105458A priority Critical patent/JP2770408B2/en
Publication of JPH0215221A publication Critical patent/JPH0215221A/en
Application granted granted Critical
Publication of JP2770408B2 publication Critical patent/JP2770408B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、いわゆる位相差検出方式により撮影レンズ
の合焦位置からのデフォーカス量を算出する焦点検出装
置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a focus detection device that calculates a defocus amount from an in-focus position of a photographic lens by a so-called phase difference detection method.

〔従来の技術〕 従来、いわゆる位相差検出方式による焦点検出におい
ては、低輝度若しくは低コントラストの被写体に対して
算出された撮影レンズの合焦位置からのずれ量、すなわ
ちデフォーカス量の信頼性が低いために焦点検出不能と
なったり、焦点位置検出領域内の異なる被写体を誤検出
したりするのを防止し、焦点位置の検出精度及び検出速
度を向上させる種々の提案がされている。例えば特開昭
61-186917号公報には、焦点検出領域で受光される画像
信号が低コントラストのため、算出されるデフォーカス
量の信頼性が低い場合は、デフォーカス量を複数回算出
し、それらデフォーカス量の平均値を用いて撮影レンズ
を駆動し、焦点を自動調節するものが示されている。ま
た、特開昭61-55618号〜特開昭61-55620号公報には、焦
点検出領域を3つのブロックに分割して各ブロックのデ
フォーカス量を算出するとともにその撮影状況下での被
写界深度に対応するデフォーカス量の幅を算出し、上記
各ブロックのデフォーカス量相互の差を上記デフォーカ
ス量の幅と比較して各ブロックのデフォーカス量の全て
が上記被写界深度内であれば、上記各ブロックのデフォ
ーカス量の平均値を上記焦点検出領域のデフォーカス量
とし、いずれか1つでも上記被写界深度外であれば、合
焦不能として警告を発するか又は被写界深度内のデフォ
ーカス量の内、最近側の被写体に対するデフォーカス量
により撮影レンズを駆動させる(最近側の被写体に合焦
させる)ものが示されている。
[Prior Art] Conventionally, in focus detection by a so-called phase difference detection method, the reliability of a shift amount from a focusing position of a photographing lens calculated for a low-brightness or low-contrast subject, that is, a defocus amount is low. Various proposals have been made to prevent the focus from being undetectable due to the low temperature, and to prevent erroneous detection of a different subject in the focus position detection area, and to improve the focus position detection accuracy and detection speed. For example,
According to 61-186917, the image signal received in the focus detection area has low contrast, so when the reliability of the calculated defocus amount is low, the defocus amount is calculated a plurality of times, and the defocus amount is calculated. In this example, the photographing lens is driven by using the average value of (1) and the focus is automatically adjusted. Also, Japanese Patent Application Laid-Open Nos. 61-55618 to 61-55620 disclose a focus detection area divided into three blocks, calculate a defocus amount of each block, and obtain an image under the shooting condition. The width of the defocus amount corresponding to the depth of field is calculated, and the difference between the defocus amounts of the respective blocks is compared with the width of the defocus amount so that all the defocus amounts of the respective blocks are within the depth of field. In this case, the average value of the defocus amounts of the respective blocks is used as the defocus amount of the focus detection area. If at least one of the blocks is out of the depth of field, a warning is issued that focusing is impossible, or The figure shows that the photographing lens is driven (focused on the nearest object) based on the defocus amount for the nearest object among the defocus amounts within the depth of field.

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

ところで、上記特開昭61-186917号公報のものは、低
コントラストのためデフォーカス量に含まれる誤差の影
響を複数回のデフォーカス量の平均値を採ることにより
小さくし、焦点位置の検出精度を向上させるものであ
る。しかし、演算回数が多くなるので、焦点位置の検出
速度が遅くなる欠点がある。特に、焦点検出領域を複数
のブロックに分割し、各ブロックについてデフォーカス
量を算出するものでは不利である。
By the way, the method disclosed in Japanese Patent Application Laid-Open No. 61-186917 reduces the influence of an error included in the defocus amount due to low contrast by taking an average value of the defocus amount for a plurality of times, thereby improving the focus position detection accuracy. Is to improve. However, since the number of calculations is increased, there is a disadvantage that the detection speed of the focal position is reduced. In particular, it is disadvantageous to divide the focus detection area into a plurality of blocks and calculate the defocus amount for each block.

また、上記特開昭61-55618〜55620号公報のものは、
各ブロックの被写体が被写界深度内に入っているときは
それらの被写体の焦点距離の平均値に合焦するようにし
ている。しかし、被写体輝度の条件や受光画像のコント
ラスト状態等により焦点検出領域の各ブロックから検出
されるデフォーカス量がばらつくことがあり、上記のよ
うな単純平均を行う平均処理では好適な焦点検出となら
ない場合がある。また、低コントラスト状態では、各ブ
ロックで検出された焦点位置が合焦させたい被写体(主
被写体)とは異なる被写体であることがあり、このよう
な場合も好適な焦点検出とならない場合がある。
In addition, the above JP-A-61-55618-55620,
When the objects in each block are within the depth of field, the focus is adjusted to the average value of the focal lengths of those objects. However, the amount of defocus detected from each block in the focus detection area may vary depending on the condition of the subject luminance, the contrast state of the received light image, and the like, and the average processing for performing the simple averaging described above does not provide suitable focus detection. There are cases. Further, in the low contrast state, the focus position detected in each block may be a subject different from the subject to be focused (main subject), and in such a case, it may not be possible to perform suitable focus detection.

本発明は、上記課題に鑑みなされたもので、各ブロッ
クのデフォーカス量に平均処理を施し、焦点検出領域に
おける好適のデフォーカス量を迅速に算出する焦点検出
装置を提供することを目的とする。
The present invention has been made in view of the above problems, and has as its object to provide a focus detection device that performs an averaging process on a defocus amount of each block and quickly calculates a suitable defocus amount in a focus detection area. .

〔課題を解決するための手段〕 上記課題を解決するために、第1の焦点検出装置は、
焦点検出領域において撮影レンズの光軸を挟む、該撮影
レンズの第1と第2の部分をそれぞれ通過した被写体光
束から形成される第1と第2の画像をそれぞれ受光する
手段と、上記焦点検出領域を複数のブロックに分割した
各ブロックにおいて上記2つの画像信号を相互に比較し
て最小の相関値を算出する手段とを有し、該最小相関値
から2つの画像の相対的な間隔を検出して上記撮像レン
ズの合焦位置からのデフォーカス量を算出する焦点検出
装置において、上記各ブロックの最小相関値からデフォ
ーカス量演算処理の対象となるブロックを抽出する抽出
手段と、上記抽出された各ブロックにおいて上記画像信
号からコントラスト値を算出するコントラスト算出手段
と、上記抽出された各ブロックのデフォーカス量とコン
トラスト値とを加重平均して上記焦点検出領域のデフォ
ーカス量を算出する算出手段とを備えたものである。
[Means for Solving the Problems] In order to solve the above problems, a first focus detection device includes:
Means for intercepting the optical axis of the photographing lens in the focus detection area, respectively receiving first and second images formed from subject light fluxes respectively passing through the first and second portions of the photographing lens; Means for comparing the two image signals with each other in each block obtained by dividing the area into a plurality of blocks to calculate a minimum correlation value, and detecting a relative interval between the two images from the minimum correlation value A focus detection device that calculates a defocus amount from the in-focus position of the imaging lens to extract a block to be subjected to defocus amount calculation processing from a minimum correlation value of each block; In each block, a contrast calculating means for calculating a contrast value from the image signal, and a defocus amount and a contrast value of each of the extracted blocks are added. On average is obtained and a calculating means for calculating a defocus amount of the focus detection area.

また、第2の焦点検出装置は、焦点検出領域において
撮影レンズの光軸を挟む、該撮影レンズの第1と第2の
部分をそれぞれ通過した被写体光束から形成される第1
と第2の画像をそれぞれ受光する手段と、上記焦点検出
領域を複数のブロックに分割した各ブロックにおいて上
記2つの画像信号を相互に比較して最小の相関値を算出
する手段とを有し、該最小相関値から2つの画像の相対
的な間隔を検出して上記撮像レンズの合焦位置からのデ
フォーカス量を算出する焦点検出装置において、上記各
ブロックの最小相関値により重み値を設定する設定手段
と、上記各ブロックのデフォーカス量と上記重み値とを
加重平均して上記焦点検出領域のデフォーカス量を算出
する算出手段とを備えたものである。
Further, the second focus detection device includes a first focus detection area that sandwiches the optical axis of the taking lens and that is formed from a subject light beam that has passed through the first and second portions of the taking lens.
Means for receiving the second image and a second image, respectively, and means for comparing the two image signals in each block obtained by dividing the focus detection area into a plurality of blocks to calculate a minimum correlation value, In a focus detection device that detects a relative distance between two images from the minimum correlation value and calculates a defocus amount from a focus position of the imaging lens, a weight value is set based on a minimum correlation value of each block. Setting means; and calculating means for calculating a defocus amount of the focus detection area by performing a weighted average of the defocus amount of each block and the weight value.

また、第3の焦点検出装置は、上記第2の焦点検出装
置において、各ブロックの最小相関値から平均処理演算
の対象となるブロックを抽出する抽出手段を備え、抽出
されたブロックの最小相関値により上記焦点検出領域の
相関値を算出するようにしたものである。
Further, the third focus detection device is the same as the second focus detection device, further comprising an extraction unit that extracts a block to be subjected to an averaging process from the minimum correlation value of each block, wherein the minimum correlation value of the extracted block is Is used to calculate the correlation value of the focus detection area.

また、第4の焦点検出装置は、焦点検出領域において
撮影レンズの光軸を挟む、該撮影レンズの第1と第2の
部分をそれぞれ通過した被写体光束から形成される第1
と第2の画像をそれぞれ受光する手段と、上記焦点検出
領域を複数のブロックに分割した各ブロックにおいて上
記2つの画像信号を相互に比較して最小の相関値を算出
する手段とを有し、該最小相関値から2つの画像の相対
的な間隔を検出して上記撮像レンズの合焦位置からのデ
フォーカス量を算出する焦点検出装置において、上記各
ブロックの最小相関値同士及び該最小相関値に対応する
シフト位置から同一ピッチだけ前後に離れたシフト位置
における相関値同士をそれぞれ加算する加算手段と、上
記加算された相関値について補間演算を行い、上記焦点
検出領域におけるデフォーカス量を算出する算出手段と
を備えている。
Further, the fourth focus detection device includes a first focus detection device that sandwiches an optical axis of the photographing lens in the focus detection area and is formed from a subject light flux that has passed through the first and second portions of the photographing lens.
Means for receiving the second image and a second image, respectively, and means for comparing the two image signals in each block obtained by dividing the focus detection area into a plurality of blocks to calculate a minimum correlation value, In a focus detection device that detects a relative distance between two images from the minimum correlation value and calculates a defocus amount from a focus position of the imaging lens, a minimum correlation value between the blocks and the minimum correlation value Adding means for adding the correlation values at the shift positions separated by the same pitch back and forth from the shift position corresponding to the above, and performing an interpolation operation on the added correlation values to calculate a defocus amount in the focus detection area. Calculation means.

また、第5の焦点検出装置は、上記第4の焦点検出装
置において、各ブロックの最小相関値から上記相関値の
加算演算の対象となるブロックを抽出する抽出手段を備
え、抽出されたブロックの最小相関値により上記焦点検
出領域の相関値を算出するようにしたものである。
The fifth focus detection device may further include, in the fourth focus detection device, extraction means for extracting a block to be subjected to the addition operation of the correlation value from the minimum correlation value of each block. The correlation value of the focus detection area is calculated based on the minimum correlation value.

また、第6の焦点検出装置は、焦点検出領域において
撮影レンズの光軸を挟む、該撮影レンズの第1と第2の
部分をそれぞれ通過した被写体光束から形成される第1
と第2の画像をそれぞれ受光する手段と、上記焦点検出
領域を複数のブロックに分割した各ブロックにおいて上
記2つの画像信号を相互に比較して最小の相関値を算出
する手段とを有し、該最小相関値から2つの画像の相対
的な間隔を検出して上記撮像レンズの合焦位置からのデ
フォーカス量を算出する焦点検出装置において、上記各
ブロックの最小相関値から相関値の再演算の対象となる
ブロックを抽出する抽出手段と、上記抽出された各ブロ
ックを合せた領域を1つのブロックとして該ブロックに
おいて最小相関値を再演算する再演算手段と、該最小相
関値から上記焦点検出領域のデフォーカス量を算出する
算出手段とを備えたものである。
The sixth focus detection device may include a first focus detection region that sandwiches the optical axis of the photographing lens and that is formed from a subject light beam that has passed through the first and second portions of the photographing lens.
Means for receiving the second image and a second image, respectively, and means for comparing the two image signals in each block obtained by dividing the focus detection area into a plurality of blocks to calculate a minimum correlation value, In a focus detection device which detects a relative interval between two images from the minimum correlation value and calculates a defocus amount from a focus position of the imaging lens, a correlation value is recalculated from the minimum correlation value of each block. Extracting means for extracting a block to be subjected to the above, recalculating means for recalculating a minimum correlation value in the block by using an area obtained by combining the extracted blocks as one block, and detecting the focus from the minimum correlation value. Calculating means for calculating the defocus amount of the area.

〔作用〕[Action]

上記のように構成された第1の焦点検出装置において
は、焦点検出領域内の複数のブロックそれぞれにおいて
最小相関値が算出されるとともに該最小相関値からデフ
ォーカス量演算処理の対象となるブロックが抽出され
る。抽出された各ブロックについてデフォーカス量とコ
ントラスト値が算出され、各ブロックのデフォーカス量
とコントラスト値とを加重平均処理が行われる。そし
て、加重平均値から上記焦点検出領域のデフォーカス量
が算出される。
In the first focus detection device configured as described above, a minimum correlation value is calculated for each of a plurality of blocks in the focus detection area, and a block to be subjected to defocus amount calculation processing is determined from the minimum correlation value. Is extracted. A defocus amount and a contrast value are calculated for each extracted block, and a weighted average process is performed on the defocus amount and the contrast value of each block. Then, the defocus amount of the focus detection area is calculated from the weighted average value.

また、第2の焦点検出装置においては、焦点検出領域
内の各ブロックにおいて最小相関値とデフォーカス量が
算出される。そして最小相関値から各ブロックに対応す
る重み値が設定され、設定された各重み値と各ブロック
のデフォーカス量とから加重平均値が算出され、該加重
平均値から上記焦点検出領域のデフォーカス量が算出さ
れる。
In the second focus detection device, the minimum correlation value and the defocus amount are calculated for each block in the focus detection area. A weight value corresponding to each block is set from the minimum correlation value, a weighted average value is calculated from the set weight value and the defocus amount of each block, and the defocus of the focus detection area is calculated from the weighted average value. The amount is calculated.

また、第3の焦点検出装置においては、焦点検出領域
内の各ブロックおいて最小相関値が算出されると共にそ
の最小相関値から平均処理を行うブロックが算出され
る。また、算出されたブロックについてデフォーカス量
が算出されるとともに最小相関値から該ブロックに対応
する重み値が設定される。そして、上記各ブロックのデ
フォーカス量とその重み値とから加重平均値が算出さ
れ、該加重平均値から上記焦点検出領域のデフォーカス
量が算出される。
In the third focus detection device, a minimum correlation value is calculated in each block in the focus detection area, and a block for performing averaging processing is calculated from the minimum correlation value. Further, a defocus amount is calculated for the calculated block, and a weight value corresponding to the block is set from the minimum correlation value. Then, a weighted average value is calculated from the defocus amount of each block and its weight value, and the defocus amount of the focus detection area is calculated from the weighted average value.

また、第4の焦点検出装置においては、焦点検出領域
内の各ブロックおいて最小相関値とその最小相関値に対
応するシフト位置から同一ピッチだけ前後に離れたシフ
ト位置における相関値が算出され、各ブロックの最小相
関値同士とその最小相関値に対応するシフト位置から同
一方向に離れたシフト位置における相関値同士がそれぞ
れ加算され、新規の相関値が算出される。そして、これ
らの新規相関値の補間演算から最小相関値が算出され、
該最小相関値から上記焦点検出領域のデフォーカス量が
算出される。
Further, in the fourth focus detection device, in each block in the focus detection area, a minimum correlation value and a correlation value at a shift position separated by the same pitch back and forth from a shift position corresponding to the minimum correlation value are calculated, The minimum correlation values of each block and the correlation values at the shift positions separated in the same direction from the shift position corresponding to the minimum correlation value are respectively added, and a new correlation value is calculated. Then, the minimum correlation value is calculated from the interpolation calculation of these new correlation values,
The defocus amount of the focus detection area is calculated from the minimum correlation value.

また、第5の焦点検出装置においては、焦点検出領域
内の各ブロックおいて最小相関値が算出れると共に該最
小相関値から相関値の加算演算の対象となるブロックが
算出される。次に、算出された各ブロックについて最小
相関値に対応するシフト位置から同一ピッチだけ前後に
離れたシフト位置における相関値が算出され、最小相関
値同士とその最小相関値に対応するシフト位置から同一
方向に離れたシフト位置における相関値同士がそれぞれ
加算され、新規の相関値が算出される。そして、これら
の新規相関値の補間演算から最小相関値が算出され、該
最小相関値から上記焦点検出領域のデフォーカス量が算
出される。
Further, in the fifth focus detection device, a minimum correlation value is calculated in each block in the focus detection area, and a block to be subjected to the addition operation of the correlation value is calculated from the minimum correlation value. Next, for each of the calculated blocks, a correlation value at a shift position separated by the same pitch back and forth from the shift position corresponding to the minimum correlation value is calculated. The correlation values at the shift positions separated in the direction are added to each other, and a new correlation value is calculated. Then, the minimum correlation value is calculated from the interpolation calculation of these new correlation values, and the defocus amount of the focus detection area is calculated from the minimum correlation value.

また、第6の焦点検出装置においては、焦点検出領域
内の各ブロックにおいて最小相関値が算出され、該最小
相関値から相関値を再演算する対象となるブロックが算
出される。そして、算出されたブロックを合わせた1の
ブロックについて再度最小相関値が算出され、該最小相
関値から上記焦点検出領域のデフォーカス量が算出され
る。
In the sixth focus detection device, the minimum correlation value is calculated for each block in the focus detection area, and the block whose correlation value is to be recalculated is calculated from the minimum correlation value. Then, the minimum correlation value is calculated again for one block obtained by combining the calculated blocks, and the defocus amount of the focus detection area is calculated from the minimum correlation value.

〔実施例〕〔Example〕

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

また、ステップ#64,#65でデフォーカス量DF1とデフ
ォーカス量DF2との差が平均処理幅ΔDFよりも小さいと
きは、デフォーカス量DF1とデフォーカス量DF2との平均
を行い、この平均値を第1アイランド21のデフォーカス
量DFIS1とする(ステップ#68)。そして、ステップ#6
6,#67,#68の処理を終えると、第11図のステップ#42
に移行する。
If the difference between the defocus amounts DF1 and DF2 is smaller than the average processing width ΔDF in steps # 64 and # 65, the defocus amounts DF1 and DF2 are averaged, and the average value is calculated. Is the defocus amount DFIS1 of the first island 21 (step # 68). And step # 6
After completing the processing of 6, # 67 and # 68, step # 42 in FIG.
Move to

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

こうして求められた補間ピッチX Mに光学系および光
電変換素子アレイのピッチ長で決定する係数αを掛けて
デフォーカス量DF(DF=X M・α)に換算する(ステッ
プ#164)。
The interpolation pitch XM obtained in this way is multiplied by a coefficient α determined by the pitch length of the optical system and the photoelectric conversion element array, and converted into a defocus amount DF (DF = XM · α) (step # 164).

次いで、第3ブロックBL3のデータの持つコントラス
ト(明暗)値C(3)を基準部142aの隣接データの差の
総和として求める(ステップ#165)。
Next, the contrast (brightness / darkness) value C (3) of the data of the third block BL3 is obtained as the sum of the differences between the adjacent data of the reference unit 142a (step # 165).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

次に、本発明にかかる焦点検出装置の平均処理演算に
ついて第13図のステップ#92を例に説明する。この平均
処理演算にはいくつかの処理方法があり、それぞれの処
理方法について第23図〜第25図を用いて説明する。
Next, the averaging calculation of the focus detection device according to the present invention will be described by taking step # 92 in FIG. 13 as an example. There are several processing methods for the averaging processing, and each processing method will be described with reference to FIGS. 23 to 25.

第23図の平均処理ルーチンでは、第18図(a)のステ
ップ#165,#167で求められたコントラスト値C(3)
および比の値R(3)に基づいて重み関数W(I)を設
定し、この重み関数W(I)を用いて各ブロックのデフ
ォーカス量の加重平均を行うようになっている。なお、
この重み関数W(I)は、例えばコントラスト値C
(3)そのもの、あるいは比の値R(3)そのものとし
てもよい。
In the averaging process routine of FIG. 23, the contrast value C (3) obtained in steps # 165 and # 167 of FIG.
And a weighting function W (I) based on the ratio value R (3), and a weighted average of the defocus amount of each block is calculated using the weighting function W (I). In addition,
The weight function W (I) is, for example, a contrast value C
(3) itself or the ratio value R (3) itself may be used.

すなわち、まず、変数Iを“3"にセットする(ステッ
プ#217)。そして、各ブロックBL3,BL4,BL5の各デフォ
ーカス量DF3,DF4,DF5の内の最も大きなデフォーカス量M
AXDFとデフォーカス量DF3との差を求め、この差と平均
処理幅ΔDFとを比較し、この差が平均処理幅ΔDFを越え
たときには、重み関数W(3)を“0"にする。そして、
変数Iをインクリメントし、デフォーカス量MAXDFとデ
フォーカス量DF4およびデフォーカス量DF5との差を求
め、この差と平均処理幅ΔDFとを比較し、この差が平均
処理幅ΔDFを越えたときは、重み関数W(4)および重
み関数W(5)を“0"にする(ステップ#222〜#22
5)。つまり、各ブロックBL3,BL4,BL5の各デフォーカス
量DF3,DF4,DF5の内、平均処理幅ΔDF以内のデフォーカ
ス量を用いて平均処理を行う。次いで、前述のように処
理された重み関数W(I)を用いて加重平均を行い、こ
の平均値を第2アイランド22のデフォーカス量DFIS2に
設定する(ステップ#226)。
That is, first, the variable I is set to "3" (step # 217). Then, the largest defocus amount M among the respective defocus amounts DF3, DF4, DF5 of the blocks BL3, BL4, BL5.
The difference between AXDF and the defocus amount DF3 is obtained, and the difference is compared with the average processing width ΔDF. When the difference exceeds the average processing width ΔDF, the weight function W (3) is set to “0”. And
The variable I is incremented, the difference between the defocus amount MAXDF, the defocus amount DF4 and the defocus amount DF5 is determined, and this difference is compared with the average processing width ΔDF. When the difference exceeds the average processing width ΔDF, , The weight function W (4) and the weight function W (5) are set to “0” (steps # 222 to # 22).
Five). That is, the averaging process is performed using the defocus amount within the average processing width ΔDF among the defocus amounts DF3, DF4, and DF5 of the blocks BL3, BL4, and BL5. Next, weighted averaging is performed using the weight function W (I) processed as described above, and this average value is set as the defocus amount DFIS2 of the second island 22 (step # 226).

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

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

第24図の平均処理ルーチンでは、相関関数の内、最大
相関位置I Mと、その前後の相関位置I M+1および相関
位置I M−1において複数のブロックを組み合せて相関
関数を再計算し、さらに再補間演算するようになってい
る。すなわち、第13図のステップ#90で得られた平均処
理対象のブロック(以下、対象ブロックという)が全て
のブロックBL3,BL4,BL5であれば、第2アイランド22の
データK2(1〜40)で相関関数H3,4,5(I M),H3,4,5
(I M−1),H3,4,5(I M+1)を再計算し、さらに再
補間演算してこの値を第2アイランド22のデフォーカス
量DFIS2に設定する(ステップ#231,#232)。また、第
3ブロックBL3および第4ブロックBL4が対象ブロックで
あれば、データK2(1〜30)で相関関数H3,4(I M),H
3,4(I M−1),H3,4(I M+1)を再計算し、再補間演
算してこの値をデフォーカス量DFIS2に設定する(ステ
ップ#233,#234)。さらに、第4ブロックBL4および第
5ブロックBL5が対象ブロックであれば、データK2(11
〜40)で相関関数H4,5(I M),H4,5(I M−1),H4,5
(I M+1)を再計算し、再補間演算してこの値をデフ
ォーカス量DFIS2に設定する(ステップ#235,#236)。
また、ステップ#235で、第3ブロックBL3および第5ブ
ロックBL5が対象ブロックであれば、ステップ#232に移
行し、そして、ワイドゾーンフラグWZF2をセットし(ス
テップ#237)、そののち、第11図のステップ#43のデ
フォーカス量演算サブルーチンに移行する。
In the averaging processing routine shown in FIG. 24, the correlation function is recalculated by combining the maximum correlation position IM among the correlation functions, and a plurality of blocks at the preceding and following correlation positions IM + 1 and IM-1. It is designed to calculate. That is, if the blocks to be averaged (hereinafter referred to as target blocks) obtained in step # 90 in FIG. 13 are all the blocks BL3, BL4, BL5, the data K2 (1 to 40) of the second island 22 And the correlation function H3,4,5 (IM), H3,4,5
(IM-1), H3, 4, 5 (IM + 1) are recalculated, and reinterpolated, and this value is set as the defocus amount DFIS2 of the second island 22 (steps # 231 and # 232). Further, if the third block BL3 and the fourth block BL4 are target blocks, the correlation function H3,4 (IM), H is used for the data K2 (1 to 30).
3,4 (IM-1) and H3,4 (IM + 1) are recalculated and re-interpolated to set this value as the defocus amount DFIS2 (steps # 233 and # 234). Further, if the fourth block BL4 and the fifth block BL5 are target blocks, the data K2 (11
~ 40) and the correlation functions H4,5 (IM), H4,5 (IM-1), H4,5
(IM + 1) is recalculated and reinterpolated to set this value as the defocus amount DFIS2 (steps # 235 and # 236).
If it is determined in step # 235 that the third block BL3 and the fifth block BL5 are the target blocks, the process proceeds to step # 232, and the wide zone flag WZF2 is set (step # 237). The process proceeds to the defocus amount calculation subroutine of step # 43 in the figure.

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

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

H3,4,5(I M−1)=H3(I M−1)+H4(I M−1)+H
5(I M−1) また、第3ブロックBL3および第4ブロックBL4が対象
のブロックであれば、相関関数H3,4(I M),H3,4(I M
−1),H3,4(I M+1)は下式のように計算する(ステ
ップ#243,#244)。
H3,4,5 (IM-1) = H3 (IM-1) + H4 (IM-1) + H
5 (IM-1) If the third block BL3 and the fourth block BL4 are target blocks, the correlation functions H3,4 (IM), H3,4 (IM
-1), H3,4 (IM + 1) is calculated as in the following equation (steps # 243 and # 244).

H3,4(I M−1)=H3(I M−1)+H4(I M−1) H3,4(I M)=H3(I M)+H4(I M) H3,4(I M+1)=H3(I M+1)+H4(I M+1) さらに、第4ブロックBL4および第5ブロックBL5が対
象ブロックであれば、相関関数H4,5(I M),H4,5(I M
−1),H4,5(I M+1)は下式のように計算する(ステ
ップ#245,#246)。
H3,4 (IM-1) = H3 (IM-1) + H4 (IM-1) H3,4 (IM) = H3 (IM) + H4 (IM) H3,4 (IM + 1) = H3 (IM + 1) + H4 (IM + 1) Further, if the fourth block BL4 and the fifth block BL5 are target blocks, the correlation functions H4,5 (IM), H4,5 (IM
-1), H4,5 (IM + 1) are calculated as shown below (steps # 245 and # 246).

H4,5(I M−1)=H4(I M−1)+H5(I M−1) H4,5(I M)=H4(I M)+H5(I M) H4,5(I M+1)=H4(I M+1)+H5(I M+1) また、ステップ#245で、第3ブロックBL3および第5
ブロックBL5が対象ブロックであれば、相関関数H3,5(I
M),H3,5(I M-1),H3,5(I M+1)は下式のように計算する
(ステップ#247)。
H4,5 (IM-1) = H4 (IM-1) + H5 (IM-1) H4,5 (IM) = H4 (IM) + H5 (IM) H4,5 (IM + 1) = H4 (IM + 1) + H5 (I M + 1) In step # 245, the third block BL3 and the fifth block
If the block BL5 is the target block, the correlation function H3,5 (I
M), H3,5 (IM-1), H3,5 (IM + 1) are calculated as shown below (step # 247).

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

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

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

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

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

ここで、上式のように基準部142aのデータ列から両端
のデータを除いて相関関数H6(I)を求めるのは、後述
の補間演算の際に最小シフト量I M近傍の相関関数H6(I
M−1),H6(I M),H6(I M+1)を用いるのではな
く、相関関数H6(I M−2),H6(I M−1),H6(I M+
1),H6(I M+2)を用いるために相関関数H6(I M−
2),H6(I M+2)での参照部142bのデータに対応する
位置が大きくずれるのを補正するためである(特開昭60
-247211号参照)。
Here, the correlation function H6 (I) is obtained by removing the data at both ends from the data sequence of the reference unit 142a as in the above equation, when the correlation function H6 (I
Instead of using M-1), H6 (IM), H6 (IM + 1), the correlation functions H6 (IM-2), H6 (IM-1), H6 (IM +
1) In order to use H6 (IM + 2), the correlation function H6 (IM−
2) This is for correcting a large shift of the position corresponding to the data of the reference portion 142b at H6 (IM + 2).
-247211).

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

これら相関関数H6(I M−2),H6(I M−1),H6(I
M+1),H6(I M+2)を用いて補間演算を下式のよう
に行う(ステップ#255)。
These correlation functions H6 (IM-2), H6 (IM-1), H6 (I
M + 1) and H6 (IM + 2) are used to perform an interpolation operation as in the following equation (step # 255).

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

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

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

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

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

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

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

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

以上説明したように、本発明では、焦点検出領域の各
ブロックのコントラスト値、もしくは最小相関値により
設定される重み値と、各ブロックのデフォーカス量との
加重平均によりこの焦点検出領域のデフォーカス量を算
出するようにしたので、各ブロックにおいて算出される
デフォーカス量の誤差が平均化され、被写体輝度のバラ
ツキによる各ブロックのデフォーカス量のバラツキが低
減でき、被写界深度内の主被写体に対して好適の焦点位
置を安定して検出することができる。更に、加重平均処
理の対象とするブロックを最小相関値をもとに抽出する
ことで、信頼性の高いデータのみを用いてデフォーカス
量が算出され、更に信頼性のある検出が可能となる。
As described above, in the present invention, the defocus of this focus detection area is determined by the weighted average of the contrast value or the minimum correlation value of each block in the focus detection area and the defocus amount of each block. Since the amount is calculated, the error of the defocus amount calculated in each block is averaged, the variation of the defocus amount of each block due to the variation of the subject brightness can be reduced, and the main subject within the depth of field can be reduced. , A suitable focus position can be detected stably. Furthermore, by extracting the block to be subjected to the weighted averaging process based on the minimum correlation value, the defocus amount is calculated using only highly reliable data, so that more reliable detection is possible.

また、焦点検出領域の各ブロックの最小相関値同士と
その最小相関値に対応するシフト位置から同一ピッチだ
け前後に離れたシフト位置における相関値同士をそれぞ
れ加算して生成した3種類の相関値から補間演算により
最小相関値を算出し、該最小相関値から焦点検出領域の
デフォーカス量を算出するようにしたので、上記と同様
に最小相関値から算出されるデフォーカス量の誤差が平
均化され、被写体輝度のばらつきによる各ブロックのデ
フォーカス量のばらつきが低減でき、被写界深度内の主
被写体に対して好適の焦点位置を安定して検出すること
ができる。
Also, the three types of correlation values generated by adding the minimum correlation values of each block of the focus detection area and the correlation values at shift positions separated by the same pitch back and forth from the shift position corresponding to the minimum correlation value are generated. Since the minimum correlation value is calculated by interpolation and the defocus amount of the focus detection area is calculated from the minimum correlation value, errors in the defocus amount calculated from the minimum correlation value are averaged in the same manner as described above. In addition, it is possible to reduce the variation in the defocus amount of each block due to the variation in the luminance of the subject, and to stably detect a suitable focus position for the main subject within the depth of field.

また、各ブロックのデフォーカス量から所定の焦点距
離内にある被写体の焦点を検出しているブロックを算出
し、それらのブロック全体を1のブロックとして再度、
最小相関値を算出し、その最小相関値から焦点検出領域
のデフォーカス量を算出するようにしたので、被写体輝
度のばらつきによる各ブロックのデフォーカス量のばら
つきを低減し、焦点検出領域で得られた複数の遠近競合
する被写体から主被写体を検出してその被写体に対する
好適の焦点位置を安定して検出することができる。
In addition, a block that detects the focus of a subject within a predetermined focal length is calculated from the defocus amount of each block, and the entire block is regarded as one block again.
Since the minimum correlation value is calculated and the defocus amount of the focus detection area is calculated from the minimum correlation value, the variation of the defocus amount of each block due to the variation of the subject brightness is reduced, and the focus detection area is obtained. The main subject can be detected from the plurality of subjects competing for perspective, and a suitable focus position for the subject can be stably detected.

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

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

フロントページの続き (72)発明者 石橋 賢司 大阪府大阪市中央区安土町2丁目3番13 号 大阪国際ビル ミノルタカメラ株式 会社内 (72)発明者 糊田 寿夫 大阪府大阪市中央区安土町2丁目3番13 号 大阪国際ビル ミノルタカメラ株式 会社内 (72)発明者 上田 浩 大阪府大阪市中央区安土町2丁目3番13 号 大阪国際ビル ミノルタカメラ株式 会社内 (72)発明者 沖須 宣之 大阪府大阪市中央区安土町2丁目3番13 号 大阪国際ビル ミノルタカメラ株式 会社内 (56)参考文献 特開 昭62−187829(JP,A) 特開 昭59−68713(JP,A) 特開 昭61−269106(JP,A) (58)調査した分野(Int.Cl.6,DB名) G02B 7/11Continued on the front page (72) Inventor Kenji Ishibashi 2-3-3 Azuchicho, Chuo-ku, Osaka-shi, Osaka Osaka International Building Minolta Camera Co., Ltd. (72) Inventor Toshio Kaida 2 Azuchicho, Chuo-ku, Osaka-shi, Osaka No. 3-13 Osaka International Building Minolta Camera Co., Ltd. (72) Inventor Hiroshi Ueda 2-3-13 Azuchicho, Chuo-ku, Osaka-shi, Osaka Osaka International Building Minolta Camera Co., Ltd. (72) Inventor Noriyuki Okisu Osaka International Building Minolta Camera Co., Ltd. 2-3-3 Azuchicho, Chuo-ku, Osaka City, Osaka (56) References JP-A-62-187829 (JP, A) JP-A-59-68713 (JP, A) 61-269106 (JP, A) (58) Fields investigated (Int. Cl. 6 , DB name) G02B 7/11

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】焦点検出領域において撮影レンズの光軸を
挟む、該撮影レンズの第1と第2の部分をそれぞれ通過
した被写体光束から形成される第1と第2の画像をそれ
ぞれ受光する手段と、上記焦点検出領域を複数のブロッ
クに分割した各ブロックにおいて上記2つの画像信号を
相互に比較して最小の相関値を算出する手段とを有し、
該最小相関値から2つの画像の相対的な間隔を検出して
上記撮像レンズの合焦位置からのデフォーカス量を算出
する焦点検出装置において、 上記各ブロックの最小相関値からデフォーカス量演算処
理の対象となるブロックを抽出する抽出手段と、 上記抽出された各ブロックにおいて上記画像信号からコ
ントラスト値を算出するコントラスト算出手段と、 上記抽出された各ブロックのデフォーカス量とコントラ
スト値とを加重平均して上記焦点検出領域のデフォーカ
ス量を算出する算出手段と を備えたことを特徴とする焦点検出装置。
1. A means for receiving first and second images formed from a light beam of a subject passing through first and second portions of a taking lens, respectively, sandwiching an optical axis of the taking lens in a focus detection area. And means for calculating the minimum correlation value by comparing the two image signals with each other in each block obtained by dividing the focus detection area into a plurality of blocks,
A focus detection device that detects a relative distance between two images from the minimum correlation value and calculates a defocus amount from a focus position of the imaging lens, wherein a defocus amount calculation process is performed from the minimum correlation value of each block. Extraction means for extracting a target block of the above; contrast calculation means for calculating a contrast value from the image signal in each of the extracted blocks; and a weighted average of the defocus amount and the contrast value of each of the extracted blocks Calculating means for calculating the defocus amount of the focus detection area.
【請求項2】焦点検出領域において撮影レンズの光軸を
挟む、該撮影レンズの第1と第2の部分をそれぞれ通過
した被写体光束から形成される第1と第2の画像をそれ
ぞれ受光する手段と、上記焦点検出領域を複数のブロッ
クに分割した各ブロックにおいて上記2つの画像信号を
相互に比較して最小の相関値を算出する手段とを有し、
該最小相関値から2つの画像の相対的な間隔を検出して
上記撮像レンズの合焦位置からのデフォーカス量を算出
する焦点検出装置において、 上記各ブロックの最小相関値により重み値を設定する設
定手段と、 上記各ブロックのデフォーカス量と上記重み値とを加重
平均して上記焦点検出領域のデフォーカス量を算出する
算出手段と を備えたことを特徴とする焦点検出装置。
2. A means for receiving a first image and a second image formed from a subject light beam passing through a first portion and a second portion of the taking lens, respectively, sandwiching an optical axis of the taking lens in a focus detection area. And means for calculating the minimum correlation value by comparing the two image signals with each other in each block obtained by dividing the focus detection area into a plurality of blocks,
In a focus detection device for calculating a defocus amount from a focus position of the imaging lens by detecting a relative interval between two images from the minimum correlation value, a weight value is set based on a minimum correlation value of each block. A focus detection device comprising: a setting unit; and a calculation unit that calculates a defocus amount of the focus detection area by performing a weighted average of a defocus amount of each block and the weight value.
【請求項3】上記各ブロックの最小相関値から平均処理
演算の対象となるブロックを抽出する抽出手段を備えた
ことを特徴とする請求項2に記載の焦点検出装置。
3. The focus detection device according to claim 2, further comprising an extraction unit for extracting a block to be subjected to an averaging process from the minimum correlation value of each block.
【請求項4】焦点検出領域において撮影レンズの光軸を
挟む、該撮影レンズの第1と第2の部分をそれぞれ通過
した被写体光束から形成される第1と第2の画像をそれ
ぞれ受光する手段と、上記焦点検出領域を複数のブロッ
クに分割した各ブロックにおいて上記2つの画像信号を
相互に比較して最小の相関値を算出する手段とを有し、
該最小相関値から2つの画像の相対的な間隔を検出して
上記撮像レンズの合焦位置からのデフォーカス量を算出
する焦点検出装置において、 上記各ブロックの最小相関値同士及び該最小相関値に対
応するシフト位置から同一ピッチだけ前後に離れたシフ
ト位置における相関値同士をそれぞれ加算する加算手段
と、 上記加算された相関値について補間演算を行い、上記焦
点検出領域におけるデフォーカス量を算出する算出手段
と を備えたことを特徴とする焦点検出装置。
4. A means for receiving first and second images formed by subject light beams passing through first and second portions of the photographing lens, respectively, sandwiching the optical axis of the photographing lens in the focus detection area. And means for calculating the minimum correlation value by comparing the two image signals with each other in each block obtained by dividing the focus detection area into a plurality of blocks,
A focus detection device that detects a relative distance between two images from the minimum correlation value and calculates a defocus amount from a focus position of the imaging lens; and a minimum correlation value between the blocks and the minimum correlation value. Adding means for respectively adding the correlation values at the shift positions separated by the same pitch before and after from the shift position corresponding to, and performing an interpolation operation on the added correlation values to calculate a defocus amount in the focus detection area. A focus detection device comprising: a calculation unit.
【請求項5】上記各ブロックの最小相関値から上記相関
値の加算演算の対象となるブロックを抽出する抽出手段
を備えたことを特徴とする請求項4に記載の焦点検出装
置。
5. The focus detection device according to claim 4, further comprising an extraction unit for extracting a block to be subjected to the addition operation of the correlation value from a minimum correlation value of each of the blocks.
【請求項6】焦点検出領域において撮影レンズの光軸を
挟む、該撮影レンズの第1と第2の部分をそれぞれ通過
した被写体光束から形成される第1と第2の画像をそれ
ぞれ受光する手段と、上記焦点検出領域を複数のブロッ
クに分割した各ブロックにおいて上記2つの画像信号を
相互に比較して最小の相関値を算出する手段とを有し、
該最小相関値から2つの画像の相対的な間隔を検出して
上記撮像レンズの合焦位置からのデフォーカス量を算出
する焦点検出装置において、 上記各ブロックの最小相関値から相関値の再演算の対象
となるブロックを抽出する抽出手段と、 上記抽出された各ブロックを合せた領域を1つのブロッ
クとして該ブロックにおいて最小相関値を再演算する再
演算手段と、 該最小相関値から上記焦点検出領域のデフォーカス量を
算出する算出手段とを備えたことを特徴とする焦点検出
装置。
6. A means for receiving a first image and a second image formed from a subject light beam passing through a first portion and a second portion of the photographing lens, respectively, sandwiching the optical axis of the photographing lens in the focus detection area. And means for calculating the minimum correlation value by comparing the two image signals with each other in each block obtained by dividing the focus detection area into a plurality of blocks,
A focus detection device that calculates a defocus amount from a focus position of the imaging lens by detecting a relative interval between two images from the minimum correlation value, and recalculates a correlation value from the minimum correlation value of each block. Extraction means for extracting a block to be subjected to the above, recalculation means for recalculating a minimum correlation value in the block with an area obtained by combining the extracted blocks as one block, and detecting the focus from the minimum correlation value. A focus detection device comprising: a calculation unit configured to calculate a defocus amount of an area.
JP1105458A 1989-04-24 1989-04-24 Focus detection device Expired - Lifetime JP2770408B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1105458A JP2770408B2 (en) 1989-04-24 1989-04-24 Focus detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1105458A JP2770408B2 (en) 1989-04-24 1989-04-24 Focus detection device

Related Parent Applications (1)

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

Publications (2)

Publication Number Publication Date
JPH0215221A JPH0215221A (en) 1990-01-18
JP2770408B2 true JP2770408B2 (en) 1998-07-02

Family

ID=14408141

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1105458A Expired - Lifetime JP2770408B2 (en) 1989-04-24 1989-04-24 Focus detection device

Country Status (1)

Country Link
JP (1) JP2770408B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3278433B2 (en) * 2001-02-13 2002-04-30 オリンパス光学工業株式会社 Distance measuring device
JP5063268B2 (en) * 2007-09-13 2012-10-31 キヤノン株式会社 Imaging apparatus and control method thereof
JP2013093565A (en) 2011-10-07 2013-05-16 Semiconductor Energy Lab Co Ltd Semiconductor device
JP5464285B2 (en) * 2013-01-18 2014-04-09 リコーイメージング株式会社 Focus detection device
GB2541041B (en) 2016-01-07 2018-05-09 Imagination Tech Ltd Focus statistics

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5968713A (en) * 1982-10-13 1984-04-18 Minolta Camera Co Ltd Device for automatically adjusting focal point of camera
JP2572372B2 (en) * 1985-05-23 1997-01-16 株式会社ニコン Focus detection device
JPS62187829A (en) * 1986-02-14 1987-08-17 Minolta Camera Co Ltd Automatic focus detecting device for camera

Also Published As

Publication number Publication date
JPH0215221A (en) 1990-01-18

Similar Documents

Publication Publication Date Title
US5517274A (en) Automatic focusing apparatus of a camera
JP2605282B2 (en) Automatic focusing device
JPS62229213A (en) Photographic lens barrel
US4905032A (en) Automatic focus detecting device
US5243375A (en) Automatic focus adjusting device for adjusting the focus of the main object to be photographed
JP2770408B2 (en) Focus detection device
JPH08262552A (en) Camera capable of displaying distance information
US6636699B2 (en) Focus detection device and distance measurement device
US5144357A (en) Automatic focus detecting means
JP2682132B2 (en) Focus detection device
JP2770407B2 (en) Focus detection device
JP2671491B2 (en) Focus detection device
JP2671489B2 (en) Focus detection device
JP2770318B2 (en) Automatic focus detection device
JP4950634B2 (en) Imaging apparatus and imaging system
JP2671490B2 (en) Focus detection device
JP2671493B2 (en) Focus detection device
JPH0215217A (en) Focus detector
JP2979417B2 (en) Multi-photometer
JPH06138378A (en) Camera provided with focus detecting means and line-of-sight detecting means
JP3374526B2 (en) Camera ranging device
JP2671490C (en)
JP2671421B2 (en) Distance detection device using focus detection device
JP2921868B2 (en) Camera exposure control device
JP3117793B2 (en) Focus adjustment 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