JPH04235512A - Focus detecting device having grouping function - Google Patents

Focus detecting device having grouping function

Info

Publication number
JPH04235512A
JPH04235512A JP3023654A JP2365491A JPH04235512A JP H04235512 A JPH04235512 A JP H04235512A JP 3023654 A JP3023654 A JP 3023654A JP 2365491 A JP2365491 A JP 2365491A JP H04235512 A JPH04235512 A JP H04235512A
Authority
JP
Japan
Prior art keywords
focus detection
defocus amount
group
focus
area
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.)
Pending
Application number
JP3023654A
Other languages
Japanese (ja)
Inventor
Shigeyuki Uchiyama
内山 重之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP3023654A priority Critical patent/JPH04235512A/en
Publication of JPH04235512A publication Critical patent/JPH04235512A/en
Pending legal-status Critical Current

Links

Landscapes

  • Measurement Of Optical Distance (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

PURPOSE:To provide a focus detecting device having a grouping function by which the result of steady focus detection can be obtained. CONSTITUTION:A focus detecting device is provided with a photographing optical system 1 for forming a subject image on a predetermined plane, a focus detecting means 2 to detect the defocus quantity of the image face of the photographing optical system 1 to the fixed face in each of plural focus detecting domains set within a photographing image plane, a weight setting means 3 to set reference defocus quantity and then a weighting coefficient in each of the focus detecting domains on a difference between the defocus quantity in the plural focus detecting domains and the reference defocus quantity, a grouping means 4 to arrange the plural focus detecting domains into plural groups on the weighting coefficient for calculating the defocus quantity of each group, and an optimal defocus quantity selecting means 5 to select the optimal defocus quantity on which the subject image to be focused is expected to have been formed among plural groups of the defocus quantities.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はカメラなどの焦点検出装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a focus detection device for a camera or the like.

【0002】0002

【従来の技術】撮影画面内に設定された複数の焦点検出
領域ごとのデフォーカス量に基づいて複数のグループに
分類し、これらのグループの中から合焦すべき被写体像
が形成されていると予想されるグループを選択し、この
グループに属する焦点検出領域のデフォーカス量に基づ
いて最適デフォーカス量を算出するグループ化機能を有
する焦点検出装置が、知られている(特開平2−178
641号公報参照)。
[Prior Art] A camera classifies a plurality of focus detection areas into a plurality of groups based on the amount of defocus for each of a plurality of focus detection areas set within a photographic screen, and forms a subject image to be focused on from among these groups. A focus detection device is known that has a grouping function that selects an expected group and calculates an optimal defocus amount based on the defocus amount of focus detection areas belonging to this group (Japanese Patent Laid-Open No. 2-178).
(See Publication No. 641).

【0003】この種の焦点検出装置では、複数の焦点検
出領域をグループ化する時に、デフォーカス軸上におい
て所定の幅のゾーンを設定し、ある焦点検出領域のデフ
ォーカス量を中心とする所定幅のゾーンの中に他の焦点
検出領域のデフォーカス量が含まれる場合、その領域を
同一グループと判定する。すなわち、基準となるデフォ
ーカス量とある領域のデフォーカス量との差の絶対値が
所定値以下であれば、その領域はそのグループに属する
ものとし、所定値より大きければその領域は同一グルー
プに属さないものとする。次に、グループ化処理によっ
て作られた複数のグループの中から、撮影者の意図して
いる被写体を補捉している可能性が高い一つのグループ
を選択し、選択された最適グループに属する焦点検出領
域のデフォーカス量に基づいて、全体として最適なデフ
ォーカス量DEFXを演算する。
In this type of focus detection device, when a plurality of focus detection areas are grouped, a zone of a predetermined width is set on the defocus axis, and a zone of a predetermined width centered at the defocus amount of a certain focus detection area is set. If the defocus amount of another focus detection area is included in the zone, that area is determined to be in the same group. In other words, if the absolute value of the difference between the reference defocus amount and the defocus amount of a certain area is less than or equal to a predetermined value, that area is considered to belong to that group, and if it is larger than the predetermined value, that area is considered to belong to the same group. shall not belong. Next, from among the multiple groups created by the grouping process, one group that is likely to capture the subject intended by the photographer is selected, and the focus that belongs to the selected optimal group is An overall optimal defocus amount DEFX is calculated based on the defocus amount of the detection area.

【0004】0004

【発明が解決しようとする課題】しかしながら、上述し
た従来の焦点検出装置では、基準となるデフォーカス量
とある領域のデフォーカス量との差の絶対値が所定値近
傍にあって、焦点検出ごとに所定値以下になったり所定
値を越えたりすると、その領域は同一グループに属した
り属さなかったりする。その結果、同一グループに属す
るか属さないかで最適デフォーカス量の演算結果が大き
く異なり、焦点検出結果が不安定になるという問題があ
る。本発明の目的は、安定な焦点検出結果が得られるグ
ループ化機能を有する焦点検出装置を提供することにあ
る。
[Problems to be Solved by the Invention] However, in the conventional focus detection device described above, the absolute value of the difference between the reference defocus amount and the defocus amount in a certain area is close to a predetermined value, and the If the value becomes less than or exceeds a predetermined value, the area may or may not belong to the same group. As a result, the calculation result of the optimum defocus amount differs greatly depending on whether the object belongs to the same group or not, and there is a problem that the focus detection result becomes unstable. An object of the present invention is to provide a focus detection device having a grouping function that allows stable focus detection results to be obtained.

【0005】[0005]

【課題を解決するための手段】クレーム対応図である図
1に対応づけて本発明を説明すると、本発明は、被写体
像を所定面上に形成するための撮影光学系1と、撮影画
面内に設定された複数の焦点検出領域ごとに、所定面に
対する撮影光学系1の像面のデフォーカス量を検出する
焦点検出手段2と、基準となるデフォーカス量を設定し
、複数の焦点検出領域のデフォーカス量と基準デフォー
カス量との差に基づいて各焦点検出領域ごとの重み付け
係数を設定する重み設定手段3と、重み付け係数に基づ
いて複数の焦点検出領域を複数のグループにまとめ、各
グループのデフォーカス量を算出するグループ化手段4
と、複数のグループのデフォーカス量の中から合焦すべ
き被写体像が形成されていると予想される最適デフォー
カス量を選択する最適デフォーカス量選択手段5とを備
えることにより、上記目的が達成される。
[Means for Solving the Problems] The present invention will be explained with reference to FIG. 1, which is a diagram corresponding to the claims. The focus detection means 2 detects the amount of defocus of the image plane of the photographing optical system 1 with respect to a predetermined plane for each of the plurality of focus detection areas set in . weight setting means 3 for setting a weighting coefficient for each focus detection area based on the difference between the defocus amount and the reference defocus amount; Grouping means 4 for calculating group defocus amount
and an optimum defocus amount selection means 5 for selecting an optimum defocus amount at which a subject image to be focused is expected to be formed from among the defocus amounts of a plurality of groups, the above object can be achieved. achieved.

【0006】[0006]

【作用】重み設定手段3は、基準となるデフォーカス量
を設定し、焦点検出手段2により検出された複数の焦点
検出領域のデフォーカス量と基準デフォーカス量との差
に基づいて各焦点検出領域ごとの重み付け係数を設定し
、グループ化手段4は、これらの重み付け係数に基づい
て複数の焦点検出領域を複数のグループにまとめ、各グ
ループのデフォーカス量を算出する。そして、最適デフ
ォーカス量選択手段5は、複数のグループのデフォーカ
ス量の中から合焦すべき被写体像が形成されていると予
想される最適デフォーカス量を選択する。
[Operation] The weight setting means 3 sets a reference defocus amount, and each focus is detected based on the difference between the defocus amount of the plurality of focus detection areas detected by the focus detection means 2 and the reference defocus amount. A weighting coefficient is set for each area, and the grouping means 4 groups the plurality of focus detection areas into a plurality of groups based on these weighting coefficients, and calculates the amount of defocus for each group. Then, the optimum defocus amount selection means 5 selects the optimum defocus amount that is expected to form a subject image to be focused from among the defocus amounts of the plurality of groups.

【0007】[0007]

【実施例】図1により、一実施例のグループ化機能を有
する焦点検出装置の概要を説明する。撮影光学系1は、
被写体からの光束を所定面上に結像し、被写体像を形成
する。さらに一部の光束は、公知の焦点検出光学系,イ
メージセンサー,マイクロコンピュータ(以下、CPU
と呼ぶ)などから構成される焦点検出手段2へ導かれ、
焦点検出手段2は、図2に示すように、撮影画面9に設
定された複数の焦点検出領域AREA(i)(i=1〜
f(図2ではf=8))に対応するイメージセンサーか
らの被写体像データに基づいて公知の焦点検出演算を行
ない、焦点検出領域ごとのデフォーカス量DEF(i)
を算出する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Referring to FIG. 1, an outline of a focus detection device having a grouping function according to an embodiment will be explained. The photographing optical system 1 is
A light beam from a subject is focused on a predetermined plane to form a subject image. Furthermore, some of the light flux is transmitted to a known focus detection optical system, an image sensor, a microcomputer (hereinafter referred to as CPU).
) is guided to the focus detection means 2 consisting of
As shown in FIG. 2, the focus detection means 2 detects a plurality of focus detection areas AREA(i) (i=1 to
Based on the subject image data from the image sensor corresponding to f (f=8 in FIG. 2)), a known focus detection calculation is performed to determine the defocus amount DEF(i) for each focus detection area.
Calculate.

【0008】重み設定手段3は、後述するグループ化手
法にしたがって基準となるデフォーカス量を設定し、各
焦点検出領域のデフォーカス量DEF(i)とこの基準
デフォーカス量との差に基づいて各焦点検出領域ごとの
重み付け係数H(i)を設定する。グループ化手段4は
、重み付け係数H(i)に基づいて複数の焦点検出領域
を複数のグループにまとめ、各グループのデフォーカス
量GDEF(j)(j=1〜e)を算出する。そして、
最適デフォーカス量選択手段5は、後述する選択手法に
したがって複数のグループのデフォーカス量GDEF(
j)の中から、合焦すべき被写体像が形成されていると
予想される最適デフォーカス量DEFXを選択する。
[0008] The weight setting means 3 sets a reference defocus amount according to a grouping method to be described later, and calculates the reference defocus amount based on the difference between the defocus amount DEF(i) of each focus detection area and this reference defocus amount. A weighting coefficient H(i) is set for each focus detection area. The grouping means 4 groups a plurality of focus detection areas into a plurality of groups based on the weighting coefficient H(i), and calculates a defocus amount GDEF(j) (j=1 to e) for each group. and,
The optimum defocus amount selection means 5 selects defocus amounts GDEF(
From j), select the optimum defocus amount DEFX that is expected to form a subject image to be focused.

【0009】図3により、本発明に係る焦点検出装置を
レンズ交換型一眼レフカメラに適用した実施例の構成を
説明する。カメラボディ20には、交換可能なレンズ鏡
筒10がマウントされ、このレンズ鏡筒10を装着した
状態で、被写体から到来する撮影光束は、撮影レンズ1
1を通ってカメラボディ20内のメインミラー21へ導
かれ、一部の光束はこのメインミラー21により反射さ
れて不図示のファインダーへ導かれ、他の一部の光束は
、メインミラー21を通過してサブミラー22により反
射され、焦点検出用光束としてAFモジュール23へ導
かれる。
The configuration of an embodiment in which the focus detection device according to the present invention is applied to a single-lens reflex camera with interchangeable lenses will be explained with reference to FIG. An interchangeable lens barrel 10 is mounted on the camera body 20, and with this lens barrel 10 attached, the photographing light flux coming from the subject is transmitted to the photographing lens 10.
1 and is guided to the main mirror 21 inside the camera body 20, a part of the light flux is reflected by this main mirror 21 and guided to a finder (not shown), and another part of the light flux passes through the main mirror 21. The light is then reflected by the sub-mirror 22 and guided to the AF module 23 as a focus detection light beam.

【0010】AFモジュール23は、図4に示すように
視野マス70,フィールドレンズ27および2対の再結
像レンズ28A,28B、38A,38Bからなる焦点
検出光学系24と、2対の受光部29A,29B、39
A,39BからなるCCD等のイメージセンサー25と
から構成される。撮影レンズ11の射出瞳16に含まれ
る光軸17に対して対称な2対の領域18A,18B、
19A,19Bをそれぞれ通る光束は、図2に示す焦点
検出領域全体に対応した開口形状を有する視野マス70
に結像され、被写体の1次像が形成される。さらに一部
の光束は、フィールドレンズ27および2対の再結像レ
ンズ28A,28B、38A,38Bによりイメージセ
ンサー25の2対の受光部29A,29B、39A,3
9B上に導かれ、2対の二次像が形成される。そして、
これらの二次像の相対的位置関係を検出することにより
、撮影画面9上に設定された複数の焦点検出領域ごとの
デフォ−カス量を検出する。
As shown in FIG. 4, the AF module 23 includes a focus detection optical system 24 consisting of a field mass 70, a field lens 27, and two pairs of reimaging lenses 28A, 28B, 38A, and 38B, and two pairs of light receiving sections. 29A, 29B, 39
It is composed of an image sensor 25 such as a CCD consisting of A and 39B. two pairs of regions 18A, 18B symmetrical with respect to the optical axis 17 included in the exit pupil 16 of the photographic lens 11;
The light beams passing through 19A and 19B respectively pass through a field mass 70 having an aperture shape corresponding to the entire focus detection area shown in FIG.
A primary image of the subject is formed. Further, some of the light beams are transferred to the two pairs of light receiving sections 29A, 29B, 39A, 3 of the image sensor 25 by the field lens 27 and the two pairs of reimaging lenses 28A, 28B, 38A, 38B.
9B, and two pairs of secondary images are formed. and,
By detecting the relative positional relationship of these secondary images, the amount of defocus for each of the plurality of focus detection areas set on the photographing screen 9 is detected.

【0011】図5にイメージセンサー25上での受光素
子の配置を示す。受光部29A,29Bはそれぞれn個
の受光素子Ap,Bp(p=1〜n)から成り、撮影レ
ンズ11が合焦状態にある時、対応する各一対の受光素
子(A1とB1、A2とB2、…)の出力が等しくなる
ように配置されている。また、受光部39A,39Bは
それぞれm個(m<n)の受光素子Cq,Dq(q=1
〜m)から成り、撮影レンズ11が合焦状態にある時、
対応する各一対の受光素子(C1とD1、C2とD2…
)の出力が等しくなるように配置されている。受光部2
9A,29B、39A,39Bを形成する受光素子は、
フォトダイオード等の電荷蓄積型素子から構成されてお
り、イメージセンサー25上の照度に応じた時間だけ電
荷蓄積を行って、受光素子出力信号を後述の焦点検出演
算に適した出力レベルに制御する。
FIG. 5 shows the arrangement of light receiving elements on the image sensor 25. The light receiving sections 29A and 29B each consist of n light receiving elements Ap and Bp (p=1 to n), and when the photographic lens 11 is in the focused state, each of the corresponding pairs of light receiving elements (A1 and B1, A2 and B2,...) are arranged so that their outputs are equal. Furthermore, the light receiving sections 39A and 39B each have m light receiving elements Cq and Dq (m<n) (q=1
-m), when the photographic lens 11 is in focus,
Each pair of corresponding light receiving elements (C1 and D1, C2 and D2...
) are arranged so that their outputs are equal. Light receiving section 2
The light receiving elements forming 9A, 29B, 39A, 39B are:
It is composed of a charge storage type element such as a photodiode, and stores charge for a time corresponding to the illuminance on the image sensor 25, and controls the light receiving element output signal to an output level suitable for focus detection calculation described later.

【0012】次に図3に示すセンサー制御部26は、A
FCPU(オートフォーカス用CPU)30のポートP
4からの電荷蓄積開始および終了指令を受け取り、指令
に応じた制御信号をイメージセンサー25に与えること
によりイメージセンサー25の電荷蓄積時間を制御する
。また転送クロック信号等をイメージセンサー25に与
え、受光素子出力信号を時系列的にAFCPU30に転
送するとともに、受光素子出力信号の転送開始に同期し
た同期信号をAFCPU30のポートP4に送る。AF
CPU30は、この信号に同期して内蔵したA/Dコン
バ−タによりポートP3に入力する受光素子出力信号の
A/D変換を開始し、受光素子数に応じたA/D変換デ
ータを得る。A/D変換が終了すると、得られたデータ
に対して後述するデータ処理を行いデフォ−カス量を求
める。すなわち、図1に示す焦点検出手段2,重み設定
手段3,グループ化手段4,最適デフォ−カス量選択手
段5のそれぞれの動作は、AFCPU30で後述する制
御プログラムを実行することにより実現される。
Next, the sensor control section 26 shown in FIG.
Port P of FCPU (autofocus CPU) 30
The charge accumulation time of the image sensor 25 is controlled by receiving charge accumulation start and end commands from the image sensor 25 and providing control signals corresponding to the instructions to the image sensor 25. Further, a transfer clock signal or the like is given to the image sensor 25, and the light receiving element output signal is transferred to the AFCPU 30 in time series, and a synchronization signal synchronized with the start of transfer of the light receiving element output signal is sent to the port P4 of the AFCPU 30. AF
In synchronization with this signal, the CPU 30 starts A/D conversion of the light-receiving element output signal input to the port P3 using the built-in A/D converter, and obtains A/D conversion data corresponding to the number of light-receiving elements. When the A/D conversion is completed, the obtained data is subjected to data processing, which will be described later, to determine the defocus amount. That is, the respective operations of the focus detection means 2, the weight setting means 3, the grouping means 4, and the optimum defocus amount selection means 5 shown in FIG.

【0013】AFCPU30は、ポートP5を介してA
F表示装置40を制御し、選択された最適デフォ−カス
量に応じて前ピン状態を示す表示部41、合焦状態を示
す表示部42、後ピン状態を示す表示部43、焦点検出
不能状態を示す表示部44のいずれかを点灯させる。ま
たAFCPU30は、ポートP2を介して最適デフォ−
カス量の符号に対応した駆動信号を出力し、AFモータ
50を制御する。これによってAFモータ50は、ボデ
ィー伝達系51およびレンズ伝達系12を介して撮影レ
ンズ11を合焦点に駆動する。このAFモータ50の駆
動量は、ボディ伝達系51を介してフォトインタラプタ
などのエンコーダ52へ伝達され、エンコーダ52によ
りパルス信号に変換されてポートP1を介してAFCP
U30へフィードバックされる。AFCPU30は、こ
のフィードバックパルス信号に基づいてAFモータ50
の駆動量、すなわち撮影レンズ11の位置制御を行う。 なお、撮影レンズ11などに関する情報は、レンズ鏡筒
10に設けられたレンズCPU13からポートP6を介
してAFCPU30へ伝送される。
[0013] The AFCPU 30 connects AFC via port P5.
A display section 41 that controls the F display device 40 and indicates a front focus state according to the selected optimal defocus amount, a display section 42 that indicates a focus state, a display section 43 that indicates a rear focus state, and a focus detection impossible state. Lights up one of the display sections 44 indicating . In addition, the AFCPU 30 outputs the optimal default via port P2.
A drive signal corresponding to the sign of the amount of debris is output to control the AF motor 50. Thereby, the AF motor 50 drives the photographing lens 11 to the in-focus point via the body transmission system 51 and the lens transmission system 12. The driving amount of the AF motor 50 is transmitted to an encoder 52 such as a photointerrupter via a body transmission system 51, converted into a pulse signal by the encoder 52, and transmitted to the AFCP via port P1.
Feedback is given to U30. The AFCPU 30 controls the AF motor 50 based on this feedback pulse signal.
The amount of drive, that is, the position of the photographing lens 11 is controlled. Note that information regarding the photographic lens 11 and the like is transmitted from the lens CPU 13 provided in the lens barrel 10 to the AFCPU 30 via port P6.

【0014】焦点検出モード選択装置80は、自動また
は手動により選択された焦点検出モード(中央重点、至
近優先、信頼度優先、合焦優先など)の情報をポートP
7を介してAFCPU30へ伝送し、AFCPU30は
これらの情報に基づいて焦点検出処理を行なう。
The focus detection mode selection device 80 transmits information on the automatically or manually selected focus detection mode (center weighted, close-up priority, reliability priority, focus priority, etc.) to the port P.
7 to the AFCPU 30, and the AFCPU 30 performs focus detection processing based on this information.

【0015】次に、AFCPU30の内部で行われる複
数の領域に対する焦点検出処理,重み付け処理,グルー
プ化処理および最適デフォ−カス量選択処理の詳細につ
いて説明する。 〈焦点検出処理〉 まず図6,図7を用いて焦点検出処理について説明する
。AFCPU30によりA/D変換された受光素子Ap
,Bp(p=1〜n)およびCq,Dq(q=1〜m)
の出力データを、ap,bp(p=1〜n)およびcq
,dq(q=1〜m)とする。なお、出力データap,
bpと出力データcp,dpに対しては同様の処理を行
なうので、出力データap,bpについてのみ説明する
。まず、受光素子出力データap,bpに対して(1)
式に示す相関演算を行ない、各焦点検出領域ごとに相関
量C(i,L)を求める。   C(i,L)=Σ|a(r+L)−b(r)|  
               ・・・(1)ここで、
Lは、整数であり一対の受光素子出力データの受光素子
のピッチを単位とした相対的シフト量(ずらし量)、 
 は、すべての焦点検出領域iに関する総和を示す。ま
たパラメータrのとる範囲は、シフト量Lおよび焦点検
出領域iに応じて適宜決定される。
Next, details of focus detection processing, weighting processing, grouping processing, and optimum defocus amount selection processing for a plurality of regions performed within the AFCPU 30 will be explained. <Focus Detection Process> First, the focus detection process will be described using FIGS. 6 and 7. Light receiving element Ap converted from A/D by AFCPU30
, Bp (p=1~n) and Cq, Dq (q=1~m)
The output data of ap, bp (p=1 to n) and cq
, dq (q=1 to m). Note that the output data ap,
Since similar processing is performed on bp and output data cp, dp, only the output data ap, bp will be explained. First, for the light receiving element output data ap, bp, (1)
The correlation calculation shown in the equation is performed to obtain the correlation amount C(i,L) for each focus detection area. C(i,L)=Σ|a(r+L)−b(r)|
...(1) Here,
L is an integer and is a relative shift amount (shift amount) of the pair of light receiving element output data in units of the pitch of the light receiving elements;
represents the summation for all focus detection areas i. Further, the range of the parameter r is determined as appropriate depending on the shift amount L and the focus detection area i.

【0016】上記(1)式におけるパラメータrのとる
範囲を、図6に示す受光素子出力データap,bpのマ
トリックス行列上で決定する。シフト量Lを−2〜+2
の範囲に設定した時、太線で囲まれた領域が相関演算の
対象となる受光素子出力データの組合せを示す。例えば
シフト量Lが0の場合、(1)式のパラメータrのとる
範囲は焦点検出領域iごとに次式のようになる。   i=1の時    r=1〜w   i=2の時    r=w+1〜x  i=3の時
    r=x+1〜y  i=4の時    r=y
+1〜z  i=5の時    r=z+1〜n   
                         
・・・(2)
The range of the parameter r in the above equation (1) is determined on the matrix of the light receiving element output data ap, bp shown in FIG. Shift amount L from -2 to +2
When the range is set to , the area surrounded by the thick line indicates the combination of light-receiving element output data to be subjected to the correlation calculation. For example, when the shift amount L is 0, the range of the parameter r in equation (1) is as shown in the following equation for each focus detection area i. When i=1: r=1~w When i=2: r=w+1~x When i=3: r=x+1~y When i=4: r=y
+1~z When i=5 r=z+1~n

...(2)

【0017】各焦点検出領域において、受
光素子出力データの相関が最も高いシフト量xm(i)
は、本出願人が特開昭60−37513号公報に開示し
た3点内挿法を(1)式の演算結果に適用することによ
り求められる。   xm(i)=x+D(i)/SLOP(i)   
             ・・・(3)(3)式にお
けるDおよびSLOPは、離散的に求められた相関量C
(i,L)の最小値がシフト量L=xにおいて得られる
とすると、次式で求められる。   D(i)=(C(i,x−1)−C(i,x+1)
)/2    ・・・(4)  SLOP(i)=MA
X(C(i,x+1)−C(i,x),       
                   C(i,x−
1)−C(i,x))・・・(5)
In each focus detection area, the shift amount xm(i) with the highest correlation of the light receiving element output data
is obtained by applying the three-point interpolation method disclosed in Japanese Unexamined Patent Publication No. 60-37513 by the present applicant to the calculation result of equation (1). xm(i)=x+D(i)/SLOP(i)
...(3) D and SLOP in equation (3) are the discretely calculated correlation amount C
Assuming that the minimum value of (i, L) is obtained at the shift amount L=x, it is determined by the following equation. D(i)=(C(i,x-1)-C(i,x+1)
)/2...(4) SLOP(i)=MA
X(C(i,x+1)−C(i,x),
C(i, x-
1)-C(i,x))...(5)

【0018】また、
各焦点検出領域ごとのデフォ−カス量DEF(i)は、
(3)式で求めたシフト量xm(i)に基づいて次式に
より求められる。   DEF(i)=KX(i)×PY(i)×xm(i
)+CZ(i)                  
                         
               ・・・(6)(6)式
において、PY(i)は焦点検出領域ごとの受光素子の
並び方向のピッチであり、領域ごとの値がAFCPU3
0に記憶される。KX(i)は、図4に示す焦点検出光
学系24の構成によって焦点検出領域ごとに決定される
係数であり、領域ごとの値がAFCPU30に記憶され
る。CZ(i)は領域ごとのオフセット値であり、撮影
光学系1の収差量(レンズCPU13に記憶される)と
、ボディ20に対するAFモジュール23の位置調整状
態によって決定される補正値(ボディごとに不図示のE
EPROMに記憶される)とからなる。
[0018] Also,
The defocus amount DEF(i) for each focus detection area is
It is determined by the following formula based on the shift amount xm(i) determined by formula (3). DEF(i)=KX(i)×PY(i)×xm(i
)+CZ(i)

...(6) In equation (6), PY(i) is the pitch in the arrangement direction of the light receiving elements for each focus detection area, and the value for each area is
Stored as 0. KX(i) is a coefficient determined for each focus detection area by the configuration of the focus detection optical system 24 shown in FIG. 4, and the value for each area is stored in the AFCPU 30. CZ(i) is an offset value for each area, and is a correction value determined by the amount of aberration of the photographing optical system 1 (stored in the lens CPU 13) and the position adjustment state of the AF module 23 with respect to the body 20 (for each body). E not shown
(stored in EPROM).

【0019】また、(5)式で求めたパラメータSLO
P(i)は、被写体像のコントラストに概ね比例した量
であって、その値が大きいほど相関量C(i,L)の極
小値付近のへこみが深く、相関が大きい。従って、求め
られたデフォ−カス量DEF(i)の信頼性が高い。な
お、極小値xm(i)が見つからずデフォ−カス量DE
F(i)が定まらなかった場合や、デフォ−カス量DE
F(i)は求ったがSLOP(i)が小さく信頼性が低
い場合は、焦点検出不能と判定してデフォ−カス量DE
F(i)=∞とする。
[0019] Also, the parameter SLO obtained by equation (5)
P(i) is an amount roughly proportional to the contrast of the subject image, and the larger the value, the deeper the depression near the minimum value of the correlation amount C(i, L), and the larger the correlation. Therefore, the reliability of the obtained defocus amount DEF(i) is high. Note that the minimum value xm(i) is not found and the defocus amount DE
When F(i) is not determined or when the defocus amount DE
Although F(i) has been found, if SLOP(i) is small and unreliable, it is determined that focus cannot be detected and the defocus amount DE is
Let F(i)=∞.

【0020】図7は、上述の焦点検出処理を示すフロー
チャートである。まずステップS1で、i=1として焦
点検出領域を初期化し、続くステップS2で、焦点検出
領域AREA(i)で相関演算を行い、相関量C(i,
L)を求める。ステップS3では、3点内挿法によりx
m(i),SLOP(i)を求め、ステップS4で、x
m(i)が求められたかどうかを判定し、求められた時
はステップS5へ進み、求められなかった時はステップ
S7に進む。求められた時はステップS5で、SLOP
(i)が所定値TSを越えているかどうか、すなわち信
頼性があるかどうかをを判定し、所定値TSを越えてい
る時はステップS6へ進み、そうでない時はステップS
7へ進む。ステップS6で、デフォ−カス量DEF(i
)を求めてステップS8へ進む。一方ステップS7では
、焦点検出不能と判定してDEF(i)=∞とし、ステ
ップS8へ進む。ステップS8では、焦点検出領域番号
iをインクリメントし、続くステップS9で、i=9、
すなわちすべての焦点検出領域に対して焦点検出処理を
行なったかどうかを判定し、終了したらステップS10
へ進んでグループ化処理を行ない、終了していなければ
ステップS2へ戻る。
FIG. 7 is a flowchart showing the above-mentioned focus detection process. First, in step S1, the focus detection area is initialized with i=1, and in the subsequent step S2, a correlation calculation is performed in the focus detection area AREA(i), and the correlation amount C(i,
Find L). In step S3, x
Find m(i) and SLOP(i), and in step S4, x
It is determined whether m(i) has been determined. If m(i) has been determined, the process proceeds to step S5; if not, the process proceeds to step S7. When requested, in step S5, SLOP
It is determined whether (i) exceeds a predetermined value TS, that is, whether it is reliable. If it exceeds the predetermined value TS, the process proceeds to step S6; otherwise, step S
Proceed to step 7. In step S6, the defocus amount DEF(i
) and proceeds to step S8. On the other hand, in step S7, it is determined that focus detection is impossible, DEF(i)=∞, and the process proceeds to step S8. In step S8, the focus detection area number i is incremented, and in the subsequent step S9, i=9,
That is, it is determined whether the focus detection process has been performed on all focus detection areas, and when the process is completed, step S10 is performed.
The process proceeds to step S2 to perform the grouping process, and if it has not been completed, the process returns to step S2.

【0021】なお上記説明では、図2に示した十字形の
焦点検出領域を8分割して、各領域のデフォ−カス量を
検出したが、検出領域の形や分割数は上記実施例に限定
されない。また、検出領域を互いにオーバーラップさせ
たり、領域境界を被写体像の強度分布に応じて変更する
ようにしてもよい。
In the above explanation, the cross-shaped focus detection area shown in FIG. 2 is divided into eight parts, and the defocus amount of each area is detected. However, the shape of the detection area and the number of divisions are limited to the above embodiment. Not done. Furthermore, the detection areas may overlap each other, or the area boundaries may be changed depending on the intensity distribution of the subject image.

【0022】<重み付け処理およびグループ化処理>次
に、重み付け処理およびグループ化処理について説明す
る。まず、基準となるデフォーカス量を設定し、この基
準デフォーカス量とある領域のデフォーカス量との差の
絶対値を求める。さらに、この差の絶対値に応じて0〜
1の重み付け係数を設定し、信頼度を示すパラメータS
LOP(i)と重み付け係数とによって加重加算平均を
行う。例えば、図2に示す8つの焦点検出領域のデフォ
ーカス量DEF(1),DEF(2),・・・,DEF
(8)とすると、グループのデフォーカス量GDEFと
グループの信頼度を示すパラメータGSLOPは次式に
より求められる。   GDEF={DEF(1)*SLOP(1)*H(
1)            +DEF(2)*SLO
P(2)*H(2)+・・・            
+DEF(8)*SLOP(8)*H(8)}    
        /{SLOP(1)*H(1)+SL
OP(2)*H(2)+・・            
+SLOP(8)*H(8)}           
       ・・・(7)  GSLOP=SLOP
(1)*H(1)+SLOP(2)*H(2)+・・・
            +SLOP(8)*H(8)
                    ・・・(8
)      ここで、H(i)は重み付け係数である
<Weighting Process and Grouping Process> Next, the weighting process and grouping process will be explained. First, a reference defocus amount is set, and the absolute value of the difference between this reference defocus amount and the defocus amount of a certain area is determined. Furthermore, depending on the absolute value of this difference, 0 to
A weighting coefficient of 1 is set and a parameter S indicating reliability is set.
Weighted averaging is performed using LOP(i) and weighting coefficients. For example, the defocus amount DEF(1), DEF(2),...,DEF of the eight focus detection areas shown in FIG.
(8), the group defocus amount GDEF and the parameter GSLOP indicating the reliability of the group are determined by the following equation. GDEF={DEF(1)*SLOP(1)*H(
1) +DEF(2)*SLO
P(2)*H(2)+...
+DEF(8)*SLOP(8)*H(8)}
/{SLOP(1)*H(1)+SL
OP(2)*H(2)+...
+SLOP(8)*H(8)}
...(7) GSLOP=SLOP
(1)*H(1)+SLOP(2)*H(2)+...
+SLOP(8)*H(8)
...(8
) Here, H(i) is a weighting coefficient.

【0023】ここで図8により、重み付け係数H(i)
の設定方法を説明する。基準となるデフォーカス量とあ
る領域のデフォーカス量との差の絶対値が、例えば図に
示すように、70μm以下の時は重み付け係数を1とし
、140um以上の時は重み付け係数を0とし、さらに
70μm〜140μmの時は重み付け係数を1から0に
直線的に変化させる。つまり差の絶対値をdDとすると
、その領域kの重み付け係数H(k)は、  dD≦7
0          ・・・  H(k)=1  7
0<dD<140  ・・・  H(k)=1−(dD
−70)/70  140≦dD        ・・
・  H(k)=0                
・・・(9)となる。このようにすると、例えば差の絶
対値が140μm付近でばらついても、重み付け係数H
(i)が小さいのでグループのデフォーカス量GDEF
とパラメータGSLOPに与える影響は少なく、それら
の値GDEF,GSLOPは安定する。
Here, according to FIG. 8, the weighting coefficient H(i)
Explain how to set up. For example, as shown in the figure, when the absolute value of the difference between the reference defocus amount and the defocus amount of a certain area is 70 μm or less, the weighting coefficient is set to 1, and when it is 140 μm or more, the weighting coefficient is set to 0. Further, when the distance is 70 μm to 140 μm, the weighting coefficient is changed linearly from 1 to 0. In other words, if the absolute value of the difference is dD, the weighting coefficient H(k) for the area k is dD≦7
0...H(k)=1 7
0<dD<140...H(k)=1-(dD
-70)/70 140≦dD ・・
・H(k)=0
...(9). In this way, even if the absolute value of the difference varies around 140 μm, the weighting coefficient H
Since (i) is small, the group defocus amount GDEF
and the parameter GSLOP are small, and their values GDEF and GSLOP are stable.

【0024】なお、上述した従来の焦点検出装置では、
図9に示すように差の絶対値が100μm以下の時は重
み付け係数H(i)を1に設定し、それより大きい時は
0に設定したのと同じである。従って、焦点検出ごとに
差の絶対値が100μm附近でばらつくと、重み付け係
数H(i)が1または0となり、算出されるデフォーカ
ス量GDEFおよびパラメータGSLOPの値に大きな
影響があった。つまり従来の方法では、「グループに属
す」と「属さない」の2つの状態のみであったのに対し
、本発明では「グループに少し属している」、「グルー
プに半分属している」、「グループにかなり属している
」という中間の状態が存在する。
[0024] In the above-mentioned conventional focus detection device,
As shown in FIG. 9, when the absolute value of the difference is less than 100 μm, the weighting coefficient H(i) is set to 1, and when it is larger than that, it is the same as setting it to 0. Therefore, if the absolute value of the difference varies around 100 μm for each focus detection, the weighting coefficient H(i) becomes 1 or 0, which has a large effect on the calculated defocus amount GDEF and the value of the parameter GSLOP. In other words, in the conventional method, there were only two states: "belongs to a group" and "does not belong", whereas in the present invention, "belongs to a group a little", "belongs half to a group", " There is an intermediate state in which the individual is quite part of the group.

【0025】なお、重み付け係数H(i)の他の設定方
法として、図10に示すような三角形でもよいし、図1
1に示すように重み付け係数H(i)が曲線的に変化す
るようにしてもよい。なお以下では、基準デフォーカス
量との差の絶対値を算出して重み付け係数H(i)を設
定し、同一グループか否かを判定する処理をグループ判
定と呼ぶ。
Note that as another method of setting the weighting coefficient H(i), a triangle as shown in FIG. 10 may be used, or a triangle as shown in FIG.
As shown in FIG. 1, the weighting coefficient H(i) may vary in a curved manner. Note that hereinafter, the process of calculating the absolute value of the difference from the reference defocus amount, setting the weighting coefficient H(i), and determining whether or not they are in the same group will be referred to as group determination.

【0026】次に、第1のグループ化処理例を説明する
。このグループ化処理は、各焦点検出領域のデフォーカ
ス量DEF(i)を順次基準デフォーカス量とし、この
基準デフォーカス量に基づいて他の焦点検出領域のグル
ープ判定を行なって各領域ごとの重み付け係数H(i)
を求め、(7)式によってグループのデフォーカス量G
DEF(j)を算出する。このグループ化処理方法によ
れば、例えば図2に示す8つの焦点検出領域に対して、
焦点検出可能と判定された焦点検出領域の数だけグルー
プが形成される。
Next, a first example of grouping processing will be explained. In this grouping process, the defocus amount DEF(i) of each focus detection area is sequentially set as a reference defocus amount, and based on this reference defocus amount, other focus detection areas are grouped and weighted for each area. Coefficient H(i)
Find the group defocus amount G using equation (7).
Calculate DEF(j). According to this grouping processing method, for example, for the eight focus detection areas shown in FIG.
Groups are formed by the number of focus detection areas determined to be focus detectable.

【0027】図12は、この第1のグループ化処理例を
示すフローチャートである。まずステップS21におい
て、グループの番号jを1にリセットし、続くステップ
S22で、j番目のグループのデフォーカス量GDEF
(j)を無限とする。ステップS23では、焦点検出領
域jのデフォーカス量DEF(j)が無限であるか否か
、すなわち焦点検出不能かどうかを判定し、焦点検出不
能であれば焦点検出領域jを基準とするグループ形成は
できないのでステップS32へ進み、そうでなければス
テップS24へ進む。ステップS24では、焦点検出領
域jの重み付け係数H(j)を1に設定する。次にステ
ップS25で、焦点検出領域番号iを1にリセットし、
続くステップS26で、焦点検出領域番号iとグループ
番号jが等しいか否かを判定する。等しい場合はグルー
プ判定の必要がないのでステップS30へ進み、そうで
なければステップS27へ進む。
FIG. 12 is a flowchart showing an example of this first grouping process. First, in step S21, the group number j is reset to 1, and in the subsequent step S22, the defocus amount GDEF of the j-th group is
Let (j) be infinite. In step S23, it is determined whether the defocus amount DEF(j) of the focus detection area j is infinite, that is, whether the focus cannot be detected. If the focus cannot be detected, a group is formed using the focus detection area j as a reference. Since this is not possible, the process advances to step S32; otherwise, the process advances to step S24. In step S24, the weighting coefficient H(j) of the focus detection area j is set to 1. Next, in step S25, the focus detection area number i is reset to 1,
In the following step S26, it is determined whether the focus detection area number i and the group number j are equal. If they are equal, there is no need for group determination and the process advances to step S30; otherwise, the process advances to step S27.

【0028】ステップS27では、焦点検出領域iのデ
フォーカス量DEF(i)が無限であるかどうかを判定
し、無限であれば焦点検出領域iでは焦点検出不能であ
り、どのグループにも属さないのでステップS30へ進
み、無限でなければステップS28へ進む。ステップS
28では、グループjの基準となるデフォーカス量DD
EF(j)と焦点検出領域iのデフォーカス量DEF(
i)との差の絶対値dDを算出する。さらにステップS
29では、差の絶対値dDに基づいて上述したように重
み付け係数H(i)を決定する。
In step S27, it is determined whether the defocus amount DEF(i) of the focus detection area i is infinite, and if it is infinite, the focus detection area i cannot detect the focus and does not belong to any group. Therefore, the process proceeds to step S30, and if it is not infinite, the process proceeds to step S28. Step S
28, the defocus amount DD serving as the reference for group j
EF(j) and the defocus amount DEF(
Calculate the absolute value dD of the difference from i). Further step S
In step 29, the weighting coefficient H(i) is determined as described above based on the absolute value dD of the difference.

【0029】ステップS30で、焦点検出領域番号iが
8であるかどうかを判定し、8であればすべての焦点検
出領域でグループ判定を終了したのでステップS31へ
進み、そうでなければグループ判定を終えていない焦点
検出領域があり、ステップS34へ進んで焦点検出領域
番号iをインクリメントし、ステップS26へ戻る。ス
テップS31において、(7)式により焦点検出領域1
〜8のデフォーカス量DEF(1)〜DEF(8)を加
重加算平均してグループjのデフォーカス量GDEF(
j)を算出する。ステップS32で、グループ番号が8
かどうか、すなわちすべてのグループのデフォーカス量
GDEF(j)を算出終了したかどうかを判定し、終了
していればプログラムの実行を終了し、そうでなければ
ステップS33へ進む。ステップS33で、グループ番
号jをインクリメントしてステップS22へ戻る。
In step S30, it is determined whether or not the focus detection area number i is 8. If it is 8, it means that group determination has been completed in all focus detection areas, and the process proceeds to step S31. If not, group determination is completed. There is a focus detection area that has not been completed, so the process proceeds to step S34, where the focus detection area number i is incremented, and the process returns to step S26. In step S31, focus detection area 1 is determined by equation (7).
The defocus amount GDEF (
Calculate j). In step S32, the group number is 8.
In other words, it is determined whether calculation of the defocus amount GDEF(j) for all groups has been completed. If it has been completed, execution of the program is ended, and if not, the process advances to step S33. In step S33, the group number j is incremented and the process returns to step S22.

【0030】次に第2のグループ化処理例を説明する。 このグループ化処理は、人物などの同一被写体は空間的
に連続しており、デフォーカス量が大きく異なる焦点検
出領域を挟んで存在しないので、グループ判定に際して
領域が隣接しているという条件を満たす時、グループ判
定を行う(ただし後述する例では、間に焦点検出不能な
領域を挟んでいてもグル−プ判定を行うようにしている
)。また、上記第1のグループ化処理例では、すべての
焦点検出領域の重み付け係数H(i)を決定した後に、
各領域のデフォーカス量DEF(i),パラメータSL
OP(i)および重み付け係数H(i)に基づいて一度
にグループのデフォーカス量GDEF(j)を算出した
が、この第2のグループ化処理例では、焦点検出領域番
号順にグループ判定を行ない、グループのデフォーカス
量GDEF(j)およびパラメータGSLOP(j)と
、隣接する次の領域のデフォーカス量DEF(i)およ
びパラメータSLOP(i)とに基づいて、次式により
新たなグループのデフォーカス量GDEF(j)および
パラメータGSLOP(j)を算出する。   GDEF(j)={DEF(i)*SLOP(i)
*HD+                  GDE
F(j)*SLOP(j)*HG}/        
          {SLOP(i)*HD+SLO
P(j)*HG}                 
                         
              ・・・(10)  GS
LOP(j)=SLOP(i)*HD+GSLOP(j
)*HG                     
                         
          ・・・(11)ここで、HDは、
隣接する次の焦点検出領域のデフォーカス量DEF(i
)に対する重み付け係数であり、HGは、グループのデ
フォーカス量GDEF(j)に対する重み付け係数であ
る。これらの重み付け係数HD,HGは、グループのパ
ラメータGSLOP(j)と焦点検出領域のパラメータ
SLOP(i)との大きい方の重み付け係数を1とし、
小さい方の重み付け係数は上述した図8により決定する
Next, a second example of grouping processing will be explained. In this grouping process, the same subjects such as people are spatially continuous and do not exist across focus detection areas with greatly different defocus amounts, so when determining groups, the condition that the areas are adjacent is met. , group determination is performed (however, in the example described later, group determination is performed even if there is an area in between where focus cannot be detected). In addition, in the first grouping process example, after determining the weighting coefficients H(i) of all focus detection areas,
Defocus amount DEF(i) of each area, parameter SL
Although the group defocus amount GDEF(j) was calculated at once based on OP(i) and the weighting coefficient H(i), in this second grouping processing example, group determination is performed in the order of focus detection area numbers, Based on the defocus amount GDEF(j) and parameter GSLOP(j) of the group, and the defocus amount DEF(i) and parameter SLOP(i) of the next adjacent area, defocus the new group using the following formula. Calculate the quantity GDEF(j) and the parameter GSLOP(j). GDEF(j)={DEF(i)*SLOP(i)
*HD+GDE
F(j)*SLOP(j)*HG}/
{SLOP(i)*HD+SLO
P(j)*HG}

...(10) GS
LOP(j)=SLOP(i)*HD+GSLOP(j
)*HG

...(11) Here, HD is
Defocus amount DEF(i
), and HG is a weighting coefficient for the group defocus amount GDEF(j). For these weighting coefficients HD and HG, the larger weighting coefficient of the group parameter GSLOP(j) and the focus detection area parameter SLOP(i) is set to 1,
The smaller weighting coefficient is determined according to FIG. 8 described above.

【0031】図13,図14は、第2のグループ化処理
例を示すフローチャートである。ステップS41におい
て、グループ番号j,焦点検出領域番号iおよびフラグ
flagを初期設定する。フラグflagは、図2に示
す焦点検出領域の焦点検出状態を示し、1の時は焦点検
出可能な領域が存在しないことを示し、0の時は焦点検
出可能な領域が存在してグループ形成中であることを示
す。ステップS42で、焦点検出領域iのデフォーカス
量DEF(i)が無限であるかどうかを判定し、無限で
あれば焦点検出不能であるから図14のステップS49
へ進み、そうでなければステップS43へ進む。ステッ
プS43では、フラグflagが1であるかどうかを判
定する。1であれば、現在の焦点検出領域番号iよりも
小さい番号の領域で、焦点検出可能な領域が存在しなか
ったことを示し、現在の焦点検出領域iのデフォーカス
量DEF(i)を基準としてグループ形成を開始するた
めステップS52へ進み、0であれば、現在の焦点検出
領域番号iよりも小さい番号の領域で焦点検出可能な領
域が存在し、現在グループ形成中であるからグループ判
定を行なうためステップS44へ進む。
FIGS. 13 and 14 are flowcharts showing a second example of grouping processing. In step S41, group number j, focus detection area number i, and flag flag are initialized. The flag flag indicates the focus detection state of the focus detection area shown in FIG. 2. When it is 1, it indicates that there is no focus detectable area, and when it is 0, it indicates that a focus detectable area exists and a group is being formed. . In step S42, it is determined whether the defocus amount DEF(i) of the focus detection area i is infinite, and if it is infinite, it means that the focus cannot be detected, so step S49 in FIG.
Otherwise, the process advances to step S43. In step S43, it is determined whether the flag flag is 1 or not. If it is 1, it indicates that there is no focus detectable area in an area with a smaller number than the current focus detection area number i, and the defocus amount DEF(i) of the current focus detection area i is used as the reference. The process proceeds to step S52 to start group formation. If it is 0, there is an area where focus detection is possible in an area with a number smaller than the current focus detection area number i, and the group is currently being formed, so group determination is performed. In order to do so, the process advances to step S44.

【0032】まず、グループ形成を開始するステップS
52の処理から説明する。ステップS52において、焦
点検出可能な領域が存在したのでフラグflagをリセ
ットした後、ステップS53へ進み、グループjのデフ
ォーカス量GDEF(j)およびパラメータGSLOP
(j)に、現在の焦点検出領域iのデフォーカス量DE
F(i)およびパラメータSLOP(i)を設定すると
ともに、グループ判定を行なう時の基準デフォーカス量
SDEFに、現在の焦点検出領域iのデフォーカス量D
EF(i)を設定して図14のステップS49へ進む。
First, step S for starting group formation.
The process will be explained starting from step 52. In step S52, since there is a focus detectable area, the flag flag is reset, and then the process proceeds to step S53, where the defocus amount GDEF(j) of group j and the parameter GSLOP are determined.
(j) is the defocus amount DE of the current focus detection area i.
In addition to setting F(i) and parameter SLOP(i), the defocus amount D of the current focus detection area i is set as the standard defocus amount SDEF when performing group determination.
EF(i) is set and the process advances to step S49 in FIG.

【0033】ステップS44では、基準デフォーカス量
SDEFと焦点検出領域iのデフォーカス量DEF(i
)との差の絶対値dDを求め、続くステップS45で、
この差の絶対値dDに基づいて焦点検出領域iの重み付
け係数HDと、グループjの重み付け係数HGを設定す
る。ステップS46では、重み付け係数HDまたはHG
が0であるかどうかを判定する。どちらかが0であれば
焦点検出領域iはグループjに属さないことを示し、ス
テップS47へ進み、そうでなければステップS50へ
進む。ステップS47では、現在のグループ形成を終了
し、新たにグループ形成を開始するためにグループ番号
jをインクリメントする。次にステップS48において
、グループjのデフォーカス量GDEF(j)およびパ
ラメータGSLOP(j)に、現在の焦点検出領域iの
デフォーカス量DEF(i)およびパラメータSLOP
(i)を設定するとともに、グループ判定を行なうため
の基準デフォーカス量SDEFに現在の焦点検出領域i
のデフォーカス量DEF(i)を設定して図14のステ
ップS49へ進む。
In step S44, the reference defocus amount SDEF and the defocus amount DEF(i
), and in the subsequent step S45,
Based on the absolute value dD of this difference, a weighting coefficient HD for focus detection area i and a weighting coefficient HG for group j are set. In step S46, the weighting coefficient HD or HG
Determine whether or not is 0. If either is 0, it indicates that the focus detection area i does not belong to group j, and the process advances to step S47; otherwise, the process advances to step S50. In step S47, the group number j is incremented to end the current group formation and start a new group formation. Next, in step S48, the current defocus amount DEF(i) and parameter SLOP of the focus detection area i are added to the defocus amount GDEF(j) and parameter GSLOP(j) of group j.
(i) and also set the current focus detection area i to the standard defocus amount SDEF for group determination.
The defocus amount DEF(i) is set and the process proceeds to step S49 in FIG.

【0034】重み付け量HDおよびHGがどちらも0で
なければ、ステップS50において、上記(10),(
11)式によりグループjのデフォーカス量GDEF(
j)と、焦点検出領域iのデフォーカス量DEF(i)
とを加算加重平均し、新たなグループのデフォーカス量
GDEF(j)とパラメータGSLOP(j)を算出す
る。ステップS51では、基準デフォーカス量SDEF
に焦点検出領域iのデフォーカス量DEF(i)を設定
して図14のステップS49へ進む。なお、基準デフォ
ーカス量SDEFにグループのデフォーカス量GFEF
(j)を設定してもよい。
If both the weighting amounts HD and HG are not 0, in step S50, the above (10), (
By formula 11), the defocus amount GDEF(
j) and the defocus amount DEF(i) of focus detection area i
The defocus amount GDEF(j) and the parameter GSLOP(j) of the new group are calculated by adding and weighting the average. In step S51, the standard defocus amount SDEF
The defocus amount DEF(i) of the focus detection area i is set to , and the process proceeds to step S49 in FIG. Note that the group defocus amount GFEF is added to the standard defocus amount SDEF.
(j) may also be set.

【0035】図14のステップS49において、焦点検
出領域番号iが8かどうか、すなわちすべての領域に対
してグループ判定を終了したかどうかを判定し、終了し
ていればプログラムの実行を終了し、終了していなけれ
ばステップS54へ進む。ステップS54では、焦点検
出領域番号iが5かどうか、すなわち図2に示す横方向
の焦点検出領域に対するグループ判定を終了したかどう
かを判定し、終了していれば、縦方向の焦点検出領域に
対するグループ化処理を行なうためステップS55へ進
み、そうでなければステップS58へ進む。ステップS
55では、フラグflagが1であるかどうか、すなわ
ち図2に示す横方向の焦点検出領域で焦点検出可能な領
域が存在するかどうかを判定し、すべての領域で検出不
能であればステップS58へ進み、そうでなければ横方
向の領域で焦点検出可能な領域が存在し、現在グループ
を形成中であるからステップS56へ進む。ステップS
56でフラグflagをセットした後、ステップS57
へ進んでグループ番号jをインクリメントする。ステッ
プS58で焦点検出領域番号iをインクリメントし、図
13のステップS42へ戻る。
In step S49 of FIG. 14, it is determined whether the focus detection area number i is 8, that is, whether group determination has been completed for all areas, and if it has been completed, the execution of the program is terminated; If the process has not ended, the process advances to step S54. In step S54, it is determined whether the focus detection area number i is 5, that is, whether group determination for the focus detection area in the horizontal direction shown in FIG. In order to perform grouping processing, the process advances to step S55, and if not, the process advances to step S58. Step S
In step S55, it is determined whether or not the flag flag is 1, that is, whether or not there is a focus detectable area in the horizontal focus detection area shown in FIG. If not, there is a focus detectable area in the horizontal direction and a group is currently being formed, so the process proceeds to step S56. Step S
After setting the flag in step S56, step S57
Go to and increment the group number j. In step S58, the focus detection area number i is incremented, and the process returns to step S42 in FIG.

【0036】次に第3のグループ化処理例を説明する。 このグループ化処理は、図3に示す焦点検出モード選択
装置80により選択された焦点検出モードに対応してグ
ループ判定を行なう。例えば、至近優先モードが選択さ
れていれば、最至近を示すデフォーカス量を基準として
グループを形成し、合焦優先モードが選択されていれば
、デフォーカス量の絶対値が最小のものを基準としてグ
ループを形成する。この処理方法によれば、形成される
グループは一つだけなので短時間で最適デフォーカス量
を算出できる。
Next, a third example of grouping processing will be explained. In this grouping process, group determination is performed in accordance with the focus detection mode selected by the focus detection mode selection device 80 shown in FIG. For example, if the closest priority mode is selected, groups are formed based on the defocus amount that indicates the closest distance, and if the focus priority mode is selected, the group is formed based on the one with the smallest absolute value of the defocus amount. form a group. According to this processing method, since only one group is formed, the optimum defocus amount can be calculated in a short time.

【0037】図15は、第3のグループ化処理を示すフ
ローチャートである。まずステップS61において、合
焦優先モードが選択されているかどうかを判定し、合焦
優先モードが選択されていればステップS62へ進み、
そうでなければ至近優先モードであるとしてステップS
63へ進む。ステップS62では、最も絶対値の小さい
デフォーカス量の領域番号をメモリSにセットし、一方
ステップS63では、最も至近を示すデフォーカス量の
領域番号をメモリSにセットする。続くステップS64
では、焦点検出領域Sの重み付け係数H(s)に1を設
定してステップS65へ進み、焦点検出領域番号iをリ
セットする。ステップS66で、焦点検出領域番号iが
領域番号Sと等しいかどうかを判定し、等しい時はグル
ープ判定の必要がないのでステップS69へ進み、そう
でなければステップS67へ進む。ステップS67では
、焦点検出領域iのデフォーカス量DEF(i)と、最
至近または絶対値が最小のデフォーカス量DEF(S)
との差の絶対値dDを算出し、続くステップS68で、
この差の絶対値に基づいて重み付け係数H(i)を決定
する。次にステップS69で、焦点検出領域番号iが8
かどうかを判定し、8であればすべての領域に対してグ
ループ判定が終了しているのでステップS70へ進み、
8でなければグループ判定が終了していない領域が残っ
ているのでステップS71へ進む。ステップS70では
、前述した(7)式によりグループのデフォーカス量G
DEF(j)を算出する。またステップS71では、領
域番号iをインクリメントしてステップS66へ戻る。
FIG. 15 is a flowchart showing the third grouping process. First, in step S61, it is determined whether the focus priority mode is selected, and if the focus priority mode is selected, the process proceeds to step S62,
Otherwise, step S assumes that the mode is close priority mode.
Proceed to 63. In step S62, the area number of the defocus amount having the smallest absolute value is set in the memory S, while in step S63, the area number of the defocus amount indicating the closest distance is set in the memory S. Subsequent step S64
Then, the weighting coefficient H(s) of the focus detection area S is set to 1, and the process proceeds to step S65, where the focus detection area number i is reset. In step S66, it is determined whether the focus detection area number i is equal to the area number S. If they are equal, there is no need for group determination, and the process proceeds to step S69; otherwise, the process proceeds to step S67. In step S67, the defocus amount DEF(i) of the focus detection area i and the closest defocus amount DEF(S) with the minimum absolute value are determined.
The absolute value dD of the difference is calculated, and in the following step S68,
The weighting coefficient H(i) is determined based on the absolute value of this difference. Next, in step S69, the focus detection area number i is 8.
If it is 8, group determination has been completed for all areas, so the process advances to step S70.
If it is not 8, there remains an area for which group determination has not been completed, and the process advances to step S71. In step S70, the defocus amount G of the group is calculated using the above-mentioned equation (7).
Calculate DEF(j). In step S71, the area number i is incremented and the process returns to step S66.

【0038】<最適デフォーカス量選択処理>以上の重
み付け処理およびグループ化処理によって算出された各
グループのデフォーカス量GDEF(j)の中から、以
下に示す焦点検出モード選択装置80によって選択され
たモードによって最適デフォーカス量DEFXを選択す
る。 (1)至近優先モード 最も後ピン、すなわち最も近距離を示すデフォーカス量
GDEF(j)を最適デフォーカス量DEFXとする。 (2)合焦優先モード デフォーカス量GDEF(j)の絶対値が最も小さいも
の、つまりその時点で最も合焦状態に近いデフォーカス
量GDEF(j)を最適デフォーカス量DEFXとする
。 (3)信頼度優先モード 信頼度が最も高いグループ、すなわちグループの信頼度
を示すパラメータGSLOP(j)が最も大きいグルー
プのデフォーカス量GDEF(j)を最適デフォーカス
量DEFXとする。上述したようにAFCPU30は、
選択されたデフォーカス量DEFXに従って、AF表示
装置40に撮影レンズ11の焦点調節状態を表示すると
ともに、AFモータ50を制御して撮影レンズ11を合
焦位置へ駆動する。これによって、撮影画面9上の最適
グループに属する焦点検出領域の被写体に正確にピント
を合せることができる。
<Optimal Defocus Amount Selection Process> The focus detection mode selection device 80 shown below selects the defocus amount GDEF(j) for each group calculated by the above weighting process and grouping process. The optimum defocus amount DEFX is selected depending on the mode. (1) Closest Priority Mode The rearmost focus, that is, the defocus amount GDEF(j) indicating the closest distance is set as the optimum defocus amount DEFX. (2) Focus priority mode The defocus amount GDEF(j) with the smallest absolute value, that is, the defocus amount GDEF(j) closest to the in-focus state at that time, is set as the optimal defocus amount DEFX. (3) Reliability Priority Mode The defocus amount GDEF(j) of the group with the highest reliability, that is, the group with the largest parameter GSLOP(j) indicating the reliability of the group, is set as the optimal defocus amount DEFX. As mentioned above, the AFCPU 30
According to the selected defocus amount DEFX, the focus adjustment state of the photographic lens 11 is displayed on the AF display device 40, and the AF motor 50 is controlled to drive the photographic lens 11 to the in-focus position. As a result, the subject in the focus detection area belonging to the optimum group on the photographing screen 9 can be accurately focused.

【0039】このように、撮影画面内に設定された複数
の焦点検出領域のデフォーカス量に対して、基準となる
デフォーカス量を設定し、この基準デフォーカス量と各
焦点検出領域のデフォーカス量との差の絶対値に基づい
て領域ごとに0〜1の値の重み付け係数を設定し、この
重み付け係数に基づいて同一グループに属するか否かを
判定するとともに、グループのデフォーカス量を算出す
るようにしたので、従来のようにある領域が同一グルー
プに属するか否かによってデフォーカス量の演算結果が
大きく異なることがなく、安定な焦点検出結果が得られ
る。
In this way, a reference defocus amount is set for the defocus amount of a plurality of focus detection areas set within the photographic screen, and this reference defocus amount and the defocus amount of each focus detection area are set. A weighting coefficient of 0 to 1 is set for each area based on the absolute value of the difference between the two areas, and based on this weighting coefficient, it is determined whether the area belongs to the same group or not, and the defocus amount of the group is calculated. As a result, the calculation result of the defocus amount does not vary greatly depending on whether a certain area belongs to the same group as in the conventional case, and a stable focus detection result can be obtained.

【0040】上述の実施例では、複数の焦点検出領域が
画面上で図2に示すように十字形に設定された場合を例
に上げて説明したが、複数の焦点検出領域の設定形状は
上記実施例に限定されなく、例えば検出領域を2次元上
に設定してもよい。また、本発明はTTL方式の焦点検
出装置に限定されなく、外光式焦点検出装置に対しても
応用できる。その場合、画面上に設定された複数の焦点
検出領域からはデフォーカス量の代りに被写体距離が得
られ、それらに対して前述のグループ化処理、最適デフ
ォーカス量選択処理を行なえばよい。
In the above-mentioned embodiment, the case where the plurality of focus detection areas are set in a cross shape on the screen as shown in FIG. 2 was explained as an example, but the setting shape of the plurality of focus detection areas is The detection area is not limited to the embodiment, and the detection area may be set two-dimensionally, for example. Further, the present invention is not limited to a TTL type focus detection device, but can also be applied to an external light type focus detection device. In that case, object distances can be obtained instead of defocus amounts from a plurality of focus detection areas set on the screen, and the aforementioned grouping process and optimal defocus amount selection process can be performed on them.

【0041】以上の実施例の構成において、撮影レンズ
11が撮影光学系を、AFモジュール23が焦点検出手
段を、AFCPU30が重み設定手段,グループ化手段
および最適デフォーカス量選択手段をそれぞれ構成する
In the configuration of the above embodiment, the photographing lens 11 constitutes a photographing optical system, the AF module 23 constitutes a focus detection means, and the AFCPU 30 constitutes a weight setting means, a grouping means, and an optimum defocus amount selection means.

【0042】[0042]

【発明の効果】以上説明したように、本発明のグループ
化機能を有する焦点検出装置は、撮影画面内に設定され
た複数の焦点検出領域に対して、基準デフォーカス量を
設定し、この基準デフォーカス量と各焦点検出領域のデ
フォーカス量との差に基づいて各領域ごとに重み付け係
数を設定し、この重み付け係数に基づいて複数の焦点検
出領域を複数のグループにまとめるとともに、各グルー
プのデフォーカス量を算出してこれらのデフォーカス量
の中から合焦すべき被写体像が形成されていると予想さ
れる最適デフォーカス量を選択するものである。このよ
うにグループ化することにより、基準となるデフォーカ
ス量とある焦点検出領域のデフォーカス量との差の絶対
値が所定値近傍にあって、焦点検出ごとに所定値以下に
なったり所定値を越えたりしても、その領域が同一グル
ープに属するか否かの判定とそのグループのデフォーカ
ス量の算出結果に大きな影響を与えることがなく、安定
な焦点検出結果が得られる。
As explained above, the focus detection device having the grouping function of the present invention sets a reference defocus amount for a plurality of focus detection areas set within the photographic screen, and A weighting coefficient is set for each area based on the difference between the defocus amount and the defocus amount of each focus detection area, and based on this weighting coefficient, multiple focus detection areas are grouped into multiple groups. Defocus amounts are calculated, and from among these defocus amounts, the optimum defocus amount that is expected to form a subject image to be focused is selected. By grouping in this way, the absolute value of the difference between the reference defocus amount and the defocus amount of a certain focus detection area is close to a predetermined value, and it becomes less than the predetermined value or less than the predetermined value for each focus detection. Even if the area exceeds 1, it does not significantly affect the determination of whether the area belongs to the same group and the calculation result of the defocus amount of the group, and a stable focus detection result can be obtained.

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

【図1】クレーム対応図である。FIG. 1 is a complaint correspondence diagram.

【図2】撮影画面内に設定された複数の焦点検出領域を
示す図である。
FIG. 2 is a diagram showing a plurality of focus detection areas set within a photographic screen.

【図3】一実施例の構成を示すブロック図である。FIG. 3 is a block diagram showing the configuration of one embodiment.

【図4】AFモジュールの構成を示す図である。FIG. 4 is a diagram showing the configuration of an AF module.

【図5】イメージセンサー上の受光素子の配置を示す図
である。
FIG. 5 is a diagram showing the arrangement of light receiving elements on an image sensor.

【図6】イメージセンサー上の各受光素子の出力データ
をマトリックス行列に対応させた図である。
FIG. 6 is a diagram showing output data of each light-receiving element on the image sensor in correspondence with a matrix.

【図7】焦点検出処理を示すフローチャートである。FIG. 7 is a flowchart showing focus detection processing.

【図8】デフォーカス量の差の絶対値に対する重み付け
係数を示す図である。
FIG. 8 is a diagram showing weighting coefficients for absolute values of differences in defocus amounts.

【図9】従来のデフォーカス量の差の絶対値に対する重
み付け係数を示す図である。
FIG. 9 is a diagram showing conventional weighting coefficients for absolute values of differences in defocus amounts.

【図10】他のデフォーカス量の差の絶対値に対する重
み付け係数を示す図である。
FIG. 10 is a diagram showing weighting coefficients for absolute values of differences in other defocus amounts.

【図11】他のデフォーカス量の差の絶対値に対する重
み付け係数を示す図である。
FIG. 11 is a diagram showing weighting coefficients for absolute values of differences in other defocus amounts.

【図12】第1のグループ化処理例を示すフローチャー
トである。
FIG. 12 is a flowchart showing an example of a first grouping process.

【図13】第2のグループ化処理例を示すフローチャー
トである。
FIG. 13 is a flowchart illustrating a second example of grouping processing.

【図14】第2のグループ化処理例を示すフローチャー
トである。
FIG. 14 is a flowchart illustrating a second example of grouping processing.

【図15】第3のグループ化処理例を示すフローチャー
トである。
FIG. 15 is a flowchart showing a third example of grouping processing.

【符号の説明】[Explanation of symbols]

1  撮影光学系 2  焦点検出手段 3  重み設定手段 4  グループ化手段 5  最適デフォーカス量選択手段 9  撮影画面 10  レンズ鏡筒 11  撮影レンズ 12  レンズ伝達系 13  レンズCPU 20  カメラボディ 23  AFモジュール 24  焦点検出光学系 25  イメージセンサー 26  センサー制御部 29A,29B,39A,39B  受光素子30  
AFCPU 40  AF表示部 50  AFモータ 51  ボディ伝達系 52  エンコーダ 80  焦点検出モード選択装置
1 Photographing optical system 2 Focus detection means 3 Weight setting means 4 Grouping means 5 Optimal defocus amount selection means 9 Photographing screen 10 Lens barrel 11 Photographing lens 12 Lens transmission system 13 Lens CPU 20 Camera body 23 AF module 24 Focus detection optics System 25 Image sensor 26 Sensor control section 29A, 29B, 39A, 39B Light receiving element 30
AFCPU 40 AF display unit 50 AF motor 51 Body transmission system 52 Encoder 80 Focus detection mode selection device

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  被写体像を所定面上に形成するための
撮影光学系と、撮影画面内に設定された複数の焦点検出
領域ごとに、前記所定面に対する前記撮影光学系の像面
のデフォーカス量を検出する焦点検出手段と、基準とな
るデフォーカス量を設定し、前記複数の焦点検出領域の
デフォーカス量と前記基準デフォーカス量との差に基づ
いて前記各焦点検出領域ごとの重み付け係数を設定する
重み設定手段と、前記重み付け係数に基づいて前記複数
の焦点検出領域を複数のグループにまとめ、各グループ
のデフォーカス量を算出するグループ化手段と、前記複
数のグループのデフォーカス量の中から合焦すべき被写
体像が形成されていると予想される最適デフォーカス量
を選択する最適デフォーカス量選択手段とを備えること
を特徴とするグループ化機能を有する焦点検出装置。
1. A photographing optical system for forming a subject image on a predetermined plane, and a defocusing system for defocusing the image plane of the photographing optical system with respect to the predetermined plane for each of a plurality of focus detection areas set within the photographing screen. and a weighting coefficient for each focus detection area based on the difference between the defocus amount of the plurality of focus detection areas and the reference defocus amount. a grouping means for grouping the plurality of focus detection areas into a plurality of groups based on the weighting coefficient and calculating a defocus amount for each group; 1. A focus detection device having a grouping function, comprising an optimum defocus amount selection means for selecting an optimum defocus amount at which a subject image to be focused is expected to be formed.
JP3023654A 1991-01-10 1991-01-10 Focus detecting device having grouping function Pending JPH04235512A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3023654A JPH04235512A (en) 1991-01-10 1991-01-10 Focus detecting device having grouping function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3023654A JPH04235512A (en) 1991-01-10 1991-01-10 Focus detecting device having grouping function

Publications (1)

Publication Number Publication Date
JPH04235512A true JPH04235512A (en) 1992-08-24

Family

ID=12116515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3023654A Pending JPH04235512A (en) 1991-01-10 1991-01-10 Focus detecting device having grouping function

Country Status (1)

Country Link
JP (1) JPH04235512A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5389995A (en) * 1992-09-02 1995-02-14 Nikon Corporation Focus condition detecting device
US5467163A (en) * 1992-09-03 1995-11-14 Nikon Corporation Focus condition detecting device
US5469240A (en) * 1992-09-04 1995-11-21 Nikon Corporation Autofocus camera
US5481329A (en) * 1992-09-04 1996-01-02 Nikon Corporation Focus condition detecting device
US5539494A (en) * 1992-09-03 1996-07-23 Nikon Corporation Focus condition detecting device
US5592254A (en) * 1992-09-03 1997-01-07 Nikon Corporation Autofocus camera
US5612763A (en) * 1994-09-28 1997-03-18 Nikon Corporation Focus detection device and method
US5689740A (en) * 1994-09-05 1997-11-18 Nikon Corporation Focus detection device
JP2010072559A (en) * 2008-09-22 2010-04-02 Nikon Corp Imaging apparatus and object area extracting method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02178641A (en) * 1988-12-29 1990-07-11 Nikon Corp Focus detecting device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02178641A (en) * 1988-12-29 1990-07-11 Nikon Corp Focus detecting device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5389995A (en) * 1992-09-02 1995-02-14 Nikon Corporation Focus condition detecting device
US5467163A (en) * 1992-09-03 1995-11-14 Nikon Corporation Focus condition detecting device
US5539494A (en) * 1992-09-03 1996-07-23 Nikon Corporation Focus condition detecting device
US5592254A (en) * 1992-09-03 1997-01-07 Nikon Corporation Autofocus camera
US5469240A (en) * 1992-09-04 1995-11-21 Nikon Corporation Autofocus camera
US5481329A (en) * 1992-09-04 1996-01-02 Nikon Corporation Focus condition detecting device
US5689740A (en) * 1994-09-05 1997-11-18 Nikon Corporation Focus detection device
US5612763A (en) * 1994-09-28 1997-03-18 Nikon Corporation Focus detection device and method
JP2010072559A (en) * 2008-09-22 2010-04-02 Nikon Corp Imaging apparatus and object area extracting method

Similar Documents

Publication Publication Date Title
US4716434A (en) Focus condition detecting device
US4768052A (en) Focus detecting device
US5517274A (en) Automatic focusing apparatus of a camera
JP2881790B2 (en) Focus detection device
US5091742A (en) Camera having an auto focusing device
JPH10161013A (en) Environment recognition device and camera provided therewith
JPS62229213A (en) Photographic lens barrel
EP0438116B1 (en) Focus detection apparatus
US5198856A (en) Camera having camera-shake detecting device
JPH04235512A (en) Focus detecting device having grouping function
US5410383A (en) Focus detecting device
JPH06175013A (en) Automatic zoom camera
US5258801A (en) Focus detecting device
JPH1138313A (en) Optical device and camera
US5144357A (en) Automatic focus detecting means
JPH07181369A (en) Automatic focusing camera, and automatic focusing method of camera
JPH11337814A (en) Optical device
EP0438140B1 (en) Focus detecting device in a camera
JP4950634B2 (en) Imaging apparatus and imaging system
JP2850336B2 (en) Focus detection device
JP3728604B2 (en) Focus detection device
JP3224535B2 (en) Camera exposure control device
JP4610714B2 (en) Multi-point autofocus camera
JP3352453B2 (en) camera
JP2969872B2 (en) Photometric calculation device for camera