Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP2881772B2 - Focus detection device - Google Patents
[go: Go Back, main page]

JP2881772B2 - Focus detection device - Google Patents

Focus detection device

Info

Publication number
JP2881772B2
JP2881772B2 JP17563988A JP17563988A JP2881772B2 JP 2881772 B2 JP2881772 B2 JP 2881772B2 JP 17563988 A JP17563988 A JP 17563988A JP 17563988 A JP17563988 A JP 17563988A JP 2881772 B2 JP2881772 B2 JP 2881772B2
Authority
JP
Japan
Prior art keywords
image
range
focus detection
image data
reference image
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
JP17563988A
Other languages
Japanese (ja)
Other versions
JPH0224617A (en
Inventor
健 歌川
洋介 日下
重之 内山
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nikon Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nikon Corp filed Critical Nikon Corp
Priority to JP17563988A priority Critical patent/JP2881772B2/en
Publication of JPH0224617A publication Critical patent/JPH0224617A/en
Application granted granted Critical
Publication of JP2881772B2 publication Critical patent/JP2881772B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 A.産業上の利用分野 本発明は、カメラの焦点検出装置に関し、特に像ずれ
量演算による焦点検出精度の改善を図ったものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a focus detection device for a camera, and more particularly to an improvement in focus detection accuracy by calculating an image shift amount.

B.従来の技術とその問題点 第10図は対物レンズの瞳を分割して形成された2像の
ずれ量を検出し、対物レンズの焦点調整状態を判別する
カメラの焦点検出装置の一例を示す。
B. Conventional Techniques and Problems Thereof FIG. 10 shows an example of a focus detection device of a camera that detects a shift amount between two images formed by dividing a pupil of an objective lens and determines a focus adjustment state of the objective lens. Show.

対物レンズ10を介して入射した物体光の光束は、ハー
フミラー11,サブミラー12,視野マスク13,フィールドレ
ンズ14,絞り15および再結像レンズ16を通りイメージセ
ンサ17a,17b上に結像する。これらイメージセンサ17a,1
7b上に結像した一対の光像は、対物レンズ10の焦点調節
状態が予定焦点面より前に被写体の鮮鋭像を結ぶいわゆ
る前ピン状態では互いに遠ざかり、逆に予定焦点面より
後に結ぶいわゆる後ピンの時は互いに近づき、予定焦点
面に結ぶ時はその中間のある決まった間隔に光像が並
ぶ。したがって、それぞれの光像をイメージセンサ17a,
17bによって光電変換し、これらの信号を演算処理して
一対の光像のずれ量を求めることにより対物レンズ10の
焦点調整状態がわかる。
The light beam of the object light incident via the objective lens 10 passes through the half mirror 11, the sub-mirror 12, the field mask 13, the field lens 14, the stop 15, and the re-imaging lens 16 to form an image on the image sensors 17a and 17b. These image sensors 17a, 1
The pair of light images formed on 7b are separated from each other in a so-called front focus state in which the focus adjustment state of the objective lens 10 forms a sharp image of the subject before the planned focal plane, and conversely, a so-called rear focus state after the planned focal plane. When they are pins, they approach each other, and when they are connected to a predetermined focal plane, light images are arranged at a certain interval between them. Therefore, each light image is converted to an image sensor 17a,
The focus adjustment state of the objective lens 10 can be determined by performing photoelectric conversion by 17b and arithmetically processing these signals to determine the amount of shift between the pair of optical images.

そこで、一対のイメージセンサ17a,17bの光電変換出
力は、インタフェース部18を介してマイクロプロセッサ
19に送られその演算部21でずれ量を求め、制御部22を介
してモータ24を駆動して対物レンズ10を光軸方向に移動
せしめる。また、合焦状態をファインダ内の表示器23で
表示する。なお、イメージセンサ17a,17bからのイメー
ジ信号はメモリ部20にいったん記憶される。
Therefore, the photoelectric conversion outputs of the pair of image sensors 17a and 17b are transmitted to the microprocessor via the interface unit 18.
It is sent to 19 and its calculation unit 21 determines the amount of deviation, and drives the motor 24 via the control unit 22 to move the objective lens 10 in the optical axis direction. The in-focus state is displayed on the display 23 in the viewfinder. The image signals from the image sensors 17a and 17b are temporarily stored in the memory unit 20.

ところで、第10図に符号25で示すスクリーン板には、
第11図に示すように焦点検出視野表示(視野枠)251が
描かれており、ファインダを通してカメラ使用者から見
ることができる。一方、上述したイメージセンサ17a,17
b上に光像が投影される範囲は第11図において符号252で
表示されている。この投影範囲252は使用者には見えな
いが、検出視野表示251の枠内に焦点検出対象の被写体
を入れれば、その光像がイメージセンサ17a,17bで捕捉
されるようになっている。
By the way, the screen plate indicated by reference numeral 25 in FIG.
As shown in FIG. 11, a focus detection visual field display (visual field frame) 251 is drawn, and can be seen by the camera user through the finder. On the other hand, the image sensors 17a, 17
The range where the light image is projected on b is indicated by reference numeral 252 in FIG. Although this projection range 252 is invisible to the user, if a subject whose focus is to be detected is placed within the frame of the detection visual field display 251, the light image is captured by the image sensors 17a and 17b.

しかし、従来の焦点検出装置では、視野枠251の端に
例えば白黒のエッジパターンが位置した場合には、焦点
検出が不安定となる欠点を有していた。これは第12図に
より次のように説明できる。
However, the conventional focus detection device has a disadvantage that the focus detection becomes unstable when, for example, a black and white edge pattern is positioned at the end of the field frame 251. This can be explained as follows with reference to FIG.

第12図(a1),(b1)は、視野枠251の範囲に対応す
るイメージセンサ17a,17b上の光像のコントラスト分布
を、(a2),(b2)はイメージセンサ17a,17bを、(a
3),(b3)は、一対の光像を焦点検出範囲FR内で比較
するためにL=0,1,2…,−1,−2…と変えるときのイ
メージセンサ17a,17bの比較範囲を示す。(a3),(b
3)のように比較する像範囲を変えて相関量C(L)を
算出し、その相関量C(L)の最小値を与えるLの値を
内挿してずれ量を演算する。
12 (a1) and (b1) show the contrast distribution of the light image on the image sensors 17a and 17b corresponding to the range of the field frame 251. (a2) and (b2) show the image sensors 17a and 17b, a
3) and (b3) are comparison ranges of the image sensors 17a and 17b when L = 0, 1, 2,..., −1, −2. Is shown. (A3), (b
The correlation amount C (L) is calculated by changing the image range to be compared as in 3), and the deviation amount is calculated by interpolating the value of L that gives the minimum value of the correlation amount C (L).

この方式によると、第12図(a1),(b1)に示すよう
に情報量を多く含むエッジ部分が焦点検出範囲FRの端に
ある場合には検出精度が低下する。
According to this method, as shown in FIGS. 12 (a1) and (b1), when an edge portion containing a large amount of information is located at the end of the focus detection range FR, the detection accuracy is reduced.

また次のような問題点もある。 There are also the following problems.

すなわち、イメージセンサ出力が第13図に示す場合の
ように、少ない情報が一部の領域GRに局在している時に
は、第12図でL=0,1,2…,−1,−2…のように広い焦
点検出範囲FRの領域の画像をシフトしながら比較する
と、比較データ中に、ノイズ成分のみで情報を含まない
領域(FRからGRを除く領域)のデータが含まれる。つま
り、第13図のような場合に比較する領域を広くとると検
出精度が低下してしまう。
That is, when a small amount of information is localized in a partial area GR as in the case where the image sensor output is as shown in FIG. 13, L = 0, 1, 2,..., −1, −2 in FIG. When the images in the area of the wide focus detection range FR are compared with each other while shifting the data, the data of the area that does not include information but includes only the noise component (the area excluding GR from FR) is included in the comparison data. That is, if the area to be compared with the case as shown in FIG. 13 is widened, the detection accuracy is reduced.

本発明の目的は、イメージセンサ出力の検出範囲の端
にエッジがあったり、情報量が局在していても精度よく
焦点検出ができる焦点検出装置を提供することにある。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a focus detection device capable of accurately detecting a focus even if an edge is present at an end of a detection range of an image sensor output or an information amount is localized.

C.問題点を解決するための手段 一実施例を示す第1図により説明すると、本発明は、
それぞれ複数の画素アレイから成り、同一物体光による
一対の光束をそれぞれ受光して光電変換する一対のイメ
ージセンサ17a,17bと、これら一対のイメージセンサ17
a,17bの出力に基づいた第1の画像データと第2の画像
データとから両イメージセンサ上の光像の相対変位を算
出する像ずれ算出手段213とを備えた焦点検出装置に適
用される。そして、請求項1の発明では、少なくとも一
方の画像データに基づいて物体光のパターンが有するコ
ントラストを算出し、そのコントラストに基づいて、像
ずれ算出手段213で用いる基準画像範囲を設定する設定
手段212を備え、この設定手段212で設定された基準画像
範囲に基づいて、像ずれ算出手段213は第1および第2
の画像データを比較して画像の相対変位量を算出するこ
とにより上述の問題点を解決する。
C. Means for Solving Problems Referring to FIG. 1 showing an embodiment, the present invention provides:
A pair of image sensors 17a and 17b each including a plurality of pixel arrays, receiving a pair of light beams of the same object light, and performing photoelectric conversion, and a pair of the image sensors 17
The present invention is applied to a focus detection device including image shift calculating means 213 for calculating a relative displacement of a light image on both image sensors from first image data and second image data based on the outputs of a and 17b. . According to the first aspect of the present invention, the setting means 212 calculates the contrast of the pattern of the object light based on at least one of the image data, and sets the reference image range used in the image shift calculating means 213 based on the contrast. Based on the reference image range set by the setting unit 212, the image shift calculating unit 213
The above-mentioned problem is solved by calculating the relative displacement amount of the image by comparing the image data.

また、請求項2の発明では、少なくとも一方の画像デ
ータにおける複数の画素を含む初期基準画像範囲内に、
物体光のパターンが有するコントラストの大きなものが
ある場合、大きなコントラストの画素を含むように像ず
れ算出手段213で用いる基準画像範囲を変更して設定す
る設定手段212を備え、この設定手段212で設定された基
準画像範囲に基づいて、像ずれ算出手段213は第1およ
び第2の画像データを比較して画像の相対変位量を算出
することにより上述の問題点を解決する。
According to the second aspect of the present invention, in an initial reference image range including a plurality of pixels in at least one of the image data,
In the case where there is a large contrast of the pattern of the object light, there is provided a setting unit 212 for changing and setting a reference image range used by the image shift calculating unit 213 so as to include a pixel having a large contrast. Based on the obtained reference image range, the image shift calculating unit 213 solves the above-described problem by comparing the first and second image data and calculating the relative displacement amount of the image.

請求項3の発明は、大きいコントラストが局在する画
像データの場合、設定手段212は大きいコントラストが
局在する画像データ周辺の領域に基準画像範囲を変更す
るものである。
According to a third aspect of the present invention, in the case of image data in which a large contrast is localized, the setting unit 212 changes the reference image range to an area around the image data in which the large contrast is localized.

請求項4の発明は、基準画像範囲の端に大きなコント
ラストをもつ画像データの場合、設定手段212はその大
きなコントラストが端に存在しなくなるように基準画像
範囲を変更するものである。
In the case of image data having a large contrast at the end of the reference image range, the setting means 212 changes the reference image range so that the large contrast does not exist at the end.

D.作用 請求項1の発明において、設定手段212は、少なくと
も一方の画像データに基づいて物体光のパターンが有す
るコントラストを算出し、そのコントラストに基づい
て、像ずれ量算出手段213で用いる基準画像範囲を設定
する。像ずれ量算出手段213は、設定された基準画像範
囲に基づいて、第1および第2の画像データを比較して
画像の相対変位量を算出する。
D. Function In the invention of claim 1, the setting means 212 calculates the contrast of the pattern of the object light based on at least one of the image data, and based on the contrast, the reference image used in the image shift amount calculating means 213. Set the range. The image shift amount calculating unit 213 compares the first and second image data based on the set reference image range and calculates the relative displacement amount of the image.

請求項2の発明において、設定手段212は、少なくと
も一方の画像データにおける複数の画素を含む初期基準
画像範囲内に、物体光が有するコントラストの大きなも
のがある場合、大きなコントラストの画素を含むように
像ずれ算出手段213で用いる基準画像範囲を変更して設
定する。像ずれ算出手段213は、設定された基準画像範
囲に基づいて、第1および第2の画像データを比較して
画像の相対変位量を算出する。
In the invention of claim 2, the setting unit 212 includes a pixel having a large contrast when the object light has a large contrast in an initial reference image range including a plurality of pixels in at least one of the image data. The reference image range used by the image shift calculator 213 is changed and set. The image shift calculating unit 213 calculates the relative displacement amount of the image by comparing the first and second image data based on the set reference image range.

請求項3の発明において、設定手段212は、大きいコ
ントラストが局在する画像データの場合、大きいコント
ラストが局在する画像データ周辺の領域に基準画像範囲
を変更する。
In the invention according to claim 3, in the case of image data in which a large contrast is localized, the setting unit 212 changes the reference image range to an area around the image data in which the large contrast is localized.

請求項4の発明において、設定手段212は、基準画像
範囲の端に大きなコントラストをもつ画像データの場
合、その大きなコントラストが端に存在しなくなるよう
に基準画像範囲を変更する。
In the invention according to claim 4, in the case of image data having a large contrast at the end of the reference image range, the setting unit 212 changes the reference image range so that the large contrast does not exist at the end.

なお、本発明の構成を説明する上記D項およびE項で
は、本発明を分かり易くするために実施例の図を用いた
が、これにより本発明が実施例に限定されるものではな
い。
In the above sections D and E for describing the configuration of the present invention, the drawings of the embodiments are used for easy understanding of the present invention, but the present invention is not limited to the embodiments.

E.実施例 第1図〜第10図により一実施例を説明する。E. Embodiment An embodiment will be described with reference to FIGS.

この実施例における焦点検出装置の全体概略構成は第
10図に示した通りであり、演算部21による像ずれ量演算
方式が異なる。したがって、以下ではこの演算方式を主
に説明する。
The overall schematic configuration of the focus detection device in this embodiment is
As shown in FIG. 10, the calculation method of the image shift amount by the calculation unit 21 is different. Therefore, the calculation method will be mainly described below.

本実施例による演算部21の詳細を第1図に示す。 FIG. 1 shows details of the calculation unit 21 according to the present embodiment.

演算部21はメモリ部20からの光像パターンを計量化す
る微小領域情報量算出部211と、光像パターンに応じ
て、ずれ量を算出する際の一対の光像を比較する範囲
(以下、基準画像範囲と呼ぶ)を決定する範囲設定部21
2と、一対の光像パターンをずらしてゆきそのときの相
関量C(L)に基づいてずれ量を算する像ずれ算出部21
3とを有する。
The calculation unit 21 compares a pair of light images for calculating a shift amount according to the light image pattern with a minute area information amount calculation unit 211 that quantifies the light image pattern from the memory unit 20 (hereinafter, referred to as a range). Range setting unit 21 for determining a reference image range)
2 and an image shift calculator 21 that shifts a pair of optical image patterns and calculates a shift amount based on the correlation amount C (L) at that time.
With 3.

次に、微小領域情報量算出部211による光像パターン
の計量化について説明する。
Next, the measurement of the light image pattern by the minute area information amount calculation unit 211 will be described.

第5図(b)に示すように複数個のアレイ状に並設さ
れる画素171,172…17nを備えて成るイメージセンサ17
を、4つの画素を含む複数個の微小領域MR1〜MRmに分割
する(第5図(c))。なお、微小領域のとり方は、第
8図のように相互に重複しながら並ぶようにしてもよ
い。この場合、微小領域の数が多くなるがメモリ容量や
演算時間に問題がなければ、このようにする方がより好
ましい。また、微小領域MRを構成する画素数Mは2〜10
程度が適当であるが、焦点検出範囲FRに対して十分小さ
いことが必要である。
As shown in FIG. 5B, an image sensor 17 including a plurality of pixels 17 1 , 17 2 ...
And it is divided into a plurality of minute regions MR 1 ~MRm including four pixels (FIG. 5 (c)). The micro regions may be arranged so as to overlap each other as shown in FIG. In this case, the number of minute regions increases, but this is more preferable if there is no problem in memory capacity or calculation time. Further, the number M of pixels constituting the minute region MR is 2 to 10
Although the degree is appropriate, it needs to be sufficiently small with respect to the focus detection range FR.

この各微小領域MRについて次のようにして情報量dkを
求める。
The information amount dk is obtained for each of the minute regions MR as follows.

一方のイメージセンサ17aに対応する第1画像出力デ
ータをa1…anとするとき、これから差分データei=ai−
ai+1を算出する(第2図ステップS2)。差分データは、
1つおき差分ei=ai−ai+2または2つおきei=ai−ai+3
等としてもよい。こうして求められた差分データに関し
て、各微小領域MRの情報量dkを、 dk=Σ|e[M(k−1)+m]| ただし、ここではM=4、Σはm=1〜Mの総和演算
を表す。
When the first image output data corresponding to one image sensor 17a is a 1 ... An, the difference data ei = ai−
ai + 1 is calculated (step S2 in FIG. 2). The difference data is
Every other difference ei = ai-ai +2 or every other ei = ai-ai +3
And so on. Regarding the difference data obtained in this manner, the information amount dk of each minute region MR is represented by dk = Σ | e [M (k−1) + m] | where M = 4, Σ is the sum of m = 1 to M Represents an operation.

で算出する(第2図ステップS2)。この情報量dkの値
が大きい程、k番目の微小領域MRkの情報量が多いこと
がわかる。
(Step S2 in FIG. 2). It can be seen that the greater the value of the information amount dk, the greater the information amount of the k-th minute region MRk.

このようにして定義された情報量dkはその大きさが検
出精度とおおむね比例関係を有するので、その情報量が
所定値を上まわるように基準画像範囲を設ければ所定の
検出精度が達成できることは容易にわかる。したがっ
て、基準画像範囲を決める際に非常に有効なパラメータ
である。
Since the information amount dk defined in this way has a roughly proportional relationship with the detection accuracy, a predetermined detection accuracy can be achieved by providing a reference image range such that the information amount exceeds a predetermined value. Is easily understood. Therefore, it is a very effective parameter when determining the reference image range.

範囲設定部212においては、こうして演算された各微
小領域MRの情報量dkを比較して、第2図のステップS3で
上述の基準画像範囲の始点l1と終点l2とを決定する。そ
して像ずれ算出部213において、決定された第1画像デ
ータについての基準画像範囲と第2画像データとから、
L画素ずらしに関する相関量C(L)を、 で求め、その最小を与えるLの値を像ずれ量として算
出する(第2図ステップS4)。
In the range setting unit 212, thus by comparing the information amount dk of each minute region MR which is calculated to determine the starting point l 1 and end l 2 of the reference image within the above range in step S3 of FIG. 2. Then, in the image shift calculation unit 213, based on the determined reference image range and the second image data for the first image data,
The correlation amount C (L) relating to L pixel shift is , And the value of L that gives the minimum is calculated as the image shift amount (step S4 in FIG. 2).

次に、ステップS3における基準画像範囲の始点l1と終
点l2の決定方式について詳細に説明するが、上述したと
おり、この実施例では、範囲設定部212が不要領域除去
部212Aと範囲端高情報量回避部212Bとを備えているの
で、初めに範囲端高情報量回避部212Bについて第3図に
基づいて説明する。
Next, will be described in detail starting l 1 and method for determining the end point l 2 of the reference image region in step S3, as described above, in this embodiment, the range setting unit 212 is unnecessary area removal unit 212A and scope end height Since the information processing apparatus includes the information amount avoiding unit 212B, the range end high information amount avoiding unit 212B will be described first with reference to FIG.

まずステップS21で、初期値としてあらかじめ設定さ
れている大きさに焦点検出範囲FRの大きさを決める。次
にステップS22で、この焦点検出範囲FRより両側にそれ
ぞれ1微小領域だけ広い領域を新しい焦点検出範囲FR′
とする。ステップS23では、両領域FRおよびFR′に含ま
れる微小領域に関する情報量dkの総和を求め、それらを
それぞれdTOT,dTOT′とする。ステップS24では、この総
和の比dTOT/dTOT′が基準値γより大きいか否かを判定
して、焦点検出範囲FRの境界に情報量が相対的に大きい
部分が含まれているかどうかを検知する。ここではγを
0.5以上1以下の定数とする。dTOT/dTOT′>γが成立す
る場合には、端部に情報量が著しく大きい部分がないと
判断して次のステップS25に進む。また、dTOT/dTOT′>
γが不成立のときはステップS27に移り、前回の焦点検
出範囲FRの大きさの両側に1微小領域ずつ広げたものを
新たな基準画像範囲として、ステップS22にもどる。ス
テップS25では、こうして決定された焦点検出範囲FRの
範囲についてその始点の位置(画素の位置)r1およびそ
の終点の位置r2を決定する。そして、ステップS26で
は、こうして定められた位置r1,r2の値をそのまま像ず
れ演算における基準画像範囲の始点l1,終点l2とする。
First, in step S21, the size of the focus detection range FR is determined to a size set in advance as an initial value. Next, in step S22, an area wider by one minute area on both sides of the focus detection range FR is added to the new focus detection range FR '.
And In step S23, the sum of the information amounts dk regarding the minute regions included in both the regions FR and FR 'is obtained, and these are set as d TOT and d TOT ', respectively. In step S24, it is determined whether the ratio d TOT / d TOT ′ of the sum is greater than a reference value γ, and it is determined whether the boundary of the focus detection range FR includes a portion having a relatively large information amount. Detect. Here, γ
It is a constant of 0.5 or more and 1 or less. If d TOT / d TOT ′> γ holds, it is determined that there is no portion where the amount of information is extremely large at the end, and the flow advances to the next step S25. Also, d TOT / d TOT ′>
If γ is not satisfied, the process moves to step S27, and the image obtained by expanding one minute region on both sides of the previous focus detection range FR is set as a new reference image range, and the process returns to step S22. At step S25, thus determined position of the start point for the range of the focus detection range FR (pixel position) to determine the r 1 and the position r 2 for that endpoint. Then, in step S26, the values of the positions r 1 and r 2 thus determined are used as they are as the start point l 1 and the end point l 2 of the reference image range in the image shift calculation.

第6図および第7図を参照して範囲端高情報量回避部
212Bの動作を具体的に説明する。
Referring to FIGS. 6 and 7, range end high information amount avoiding section
The operation of 212B will be specifically described.

第6図は、焦点検出範囲FRの左端に大きい情報量が含
まれており、この焦点検出範囲FRのまま像ずれ量演算を
行なうと検出精度に問題がある。そこで、上述したステ
ップS21〜S26を実行することにより焦点検出範囲FRが広
がり、焦点検出範囲FRの端に大きい情報量が含まれなく
なる。すなわち、初期値の焦点検出範囲FRのままでは、
第6図(b)に示す情報dkからdTOT/dTOT′=0.39であ
り、両側にそれぞれ1微小領域加えられた後の焦点検出
範囲FRに対してはdTOT/dTOT′=0.95となって問題なく
なる。一方、第7図の例では、初期値の焦点検出範囲FR
においても、第7図(b)に示す情報dkからdTOT/
dTOT′=0.73であり、焦点検出範囲FRの領域端の像の検
出精度への影響は問題がない。
FIG. 6 shows that a large amount of information is included at the left end of the focus detection range FR, and there is a problem in detection accuracy if the image shift amount calculation is performed with this focus detection range FR. Therefore, by executing the above-described steps S21 to S26, the focus detection range FR is expanded, and the end of the focus detection range FR does not include a large amount of information. In other words, with the initial focus detection range FR,
From the information dk shown in FIG. 6 (b), d TOT / d TOT '= 0.39, and d TOT / d TOT ' = 0.95 for the focus detection range FR after adding one minute area on each side. No problem. On the other hand, in the example of FIG.
In FIG. 7B, the information dk to d TOT /
d TOT ′ = 0.73, and there is no problem in the detection accuracy of the image at the edge of the area of the focus detection range FR.

このような処理を行なうので、範囲端高情報量回避部
212Bは、焦点検出範囲FRの端に高コントラスト部がかか
ることによる検出精度の低下を防止する効果が得られ
る。
Since such processing is performed, the range edge high information amount avoiding unit
212B has an effect of preventing a decrease in detection accuracy due to a high contrast portion being applied to an end of the focus detection range FR.

次に、演算部21を構成する不要領域除去部212Aについ
て第4図を用いて説明する。
Next, the unnecessary area removing unit 212A constituting the calculating unit 21 will be described with reference to FIG.

第3図のステップS26に続くステップS27で、基準画像
範囲の値l1,l2としてステップS26で決定された値r1,r2
が設定されるとともに、始点変更フラグQ1および終点変
更フラグQ2に0が設定される。このフラグQ1,Q2が0な
らば変更なし、1ならば変更ありである。次にステップ
S28で、焦点検出範囲FR〔r1,r2〕の中の微小領域中で情
報量dkが最大となるkの位置pを求める。
In step S27 following step S26 in FIG. 3, values r 1 and r 2 determined in step S26 as values l 1 and l 2 of the reference image range.
Is set, and 0 is set in the start point change flag Q1 and the end point change flag Q2. If the flags Q1 and Q2 are 0, there is no change, and if they are 1, there is a change. Next step
In S28, the focus detection range FR [r 1, r 2] amount of information dk in small regions in the seek a position p k that maximizes.

ステップS29ではこの情報量dkを所定値Thと比較し、d
k>ThであればステップS30へ進む。ステップS30では、
k=pに位置する微小領域の両側に対して、順次、情報
量dkを調べ、これが所定値Th以下となる微小領域をみつ
ける。r1の方向に見つかった時はフラグQ1=1とし、そ
の位置k=q1を記憶する。また、r2の方向について見つ
かった時はフラグQ2=1と、その位置k=q2を記憶す
る。
In step S29, this information amount dk is compared with a predetermined value Th, and d
If k> Th, the process proceeds to step S30. In step S30,
The information amount dk is sequentially examined on both sides of the minute region located at k = p, and a minute region in which the information amount dk is equal to or less than the predetermined value Th is found. When found in the direction of r 1 is the flag Q1 = 1, and stores the position k = q1. Further, when it finds the direction of r 2 and flag Q2 = 1, and stores the position k = q2.

基準画像範囲の値l1,l2は、こうして記憶された微小
領域q1,q2の中央位置とするのがよいが、pに近い方ま
たは遠い方のq1またはq2の端に決めることもできる。
The values l 1 and l 2 of the reference image range are preferably set at the center positions of the small areas q 1 and q 2 thus stored, but are determined at the ends of q 1 or q 2 closer to or farther from p. You can also.

具体的に第5図(a)に示す光像パターンの場合につ
いて第5図(d)を用いて説明すると、情報量dkが最大
をとるのはk=6、つまりp=6である。ここで、所定
値Th=10とすると、その両側で情報量dk<Thとなるの
は、r1方向ではk=5つまりq1=5,r2方向ではk=7つ
まりq2=7となる。
Specifically, the case of the optical image pattern shown in FIG. 5 (a) will be described with reference to FIG. 5 (d). The maximum amount of information dk is k = 6, that is, p = 6. Here, if the predetermined value Th = 10, is to become the information amount dk <Th at both sides, the r 1 direction k = 7, i.e. q 2 = 7 in the k = 5, i.e. q 1 = 5, r 2 directions Become.

次にステップS31で、こうして定められた基準画像範
囲l1〜l2における情報量dllを、 から算出する。ステップS32で、こうして求めた基準
画像範囲の情報量dllが、これをもとに像ずれ演算をす
るのに十分情報量を含んでいるか否かを判定する。例え
ば、図示するようにdllを所定値Th1と比較して情報量が
十分であるか否かを判定する。あるいは、dll/dTOT>β
(βはたとえば0.5)をもって情報量が十分と判定した
り、さらには両者の組合せで判定してもよい。このステ
ップS32で情報量が不十分とされたときは、ステップS33
で再び基準画像範囲がr1〜r2に広げられる。これによっ
て個々の微小領域MRの情報量は少ないが、情報が広い範
囲に分布していて、領域を広くとれば検出可能な場合を
救うことができる。ステップS32で情報量が十分とされ
たときはステップS33を迂回する。
Next, in step S31, the information amount dll in the reference image range l 1 to l 2 thus determined is Is calculated from In step S32, it is determined whether or not the information amount dll of the reference image range obtained in this manner includes an information amount sufficient to perform an image shift calculation based on the information amount dll. For example, as shown in the drawing, the dll is compared with a predetermined value Th1 to determine whether the information amount is sufficient. Or dll / d TOT > β
(Β is 0.5, for example) may be used to determine that the amount of information is sufficient, or may be determined by a combination of both. If the amount of information is determined to be insufficient in step S32, step S33
In reference image area is extended to r 1 ~r 2 again. As a result, although the information amount of each minute area MR is small, the information is distributed in a wide range, and if the area is made wider, it is possible to save a case where detection is possible. If the information amount is sufficient in step S32, step S33 is bypassed.

ここで、上述した範囲設定部212により決定される基
準画像範囲l1〜l2が初期値としての焦点検出範囲FRの広
がりとどのような関係になるのかをまとめて説明する。
Here, the relationship between the reference image ranges l 1 and l 2 determined by the above-described range setting unit 212 and the expansion of the focus detection range FR as an initial value will be described collectively.

第5図(a)の被写体パターンでは、焦点検出範囲FR
に対して基準画像範囲l1〜l2は情報が局在する部分だけ
の(イ)に制限される。従って、不要部からのノイズの
影響を減少することができる。
In the subject pattern shown in FIG. 5A, the focus detection range FR
On the other hand, the reference image ranges l 1 to l 2 are limited to (a) of only the portion where the information is localized. Therefore, the influence of noise from unnecessary portions can be reduced.

第6図(a)の被写体パターンでは、焦点検出範囲FR
に対して範囲端高情報量回避部212Bを用いたときには基
準画像範囲l1〜l2は(ロ)のようになり、さらに不要領
域除去部212Aも用いたときには(ハ)のようになる。い
ずれも情報量の大きい部分が基準画像範囲の端になくな
るので検出精度が向上する。つまり、範囲端高情報量回
避部212Bまたは不要領域除去部212Aをそれぞれ単独に用
いてもよい。
In the subject pattern of FIG. 6A, the focus detection range FR
On the other hand, when the range edge high information amount avoiding unit 212B is used, the reference image ranges l 1 to l 2 are as shown in (b), and when the unnecessary area removing unit 212A is also used, as in (c). In any case, a portion having a large amount of information is not at the end of the reference image range, so that the detection accuracy is improved. That is, the range edge height information amount avoiding unit 212B or the unnecessary area removing unit 212A may be used independently.

第7図(a)のように情報量が場所によらず分散して
存在する被写体パターンでは、初期値として与えられる
焦点検出範囲FRがそのまま(ニ)の基準画像範囲l1〜l2
となる。
As shown in FIG. 7 (a), in a subject pattern in which the amount of information is dispersed irrespective of location, the focus detection range FR given as an initial value is unchanged (d) the reference image range l 1 to l 2.
Becomes

また、焦点距離範囲FRは第11図の検出視野枠に等しい
として話を進めたが、勿論これに限るものではない。例
えば、検出視野を複数の検出視野に分けてそれぞれで焦
点検出演算をする場合には、その個々の検出視野を焦点
距離範囲FRとして扱うことになる。
Further, the discussion has been made on the assumption that the focal length range FR is equal to the detection field frame of FIG. 11, but it is needless to say that the present invention is not limited to this. For example, in the case where the detection visual field is divided into a plurality of detection visual fields and focus detection calculation is performed on each of them, each of the detection visual fields is treated as a focal length range FR.

最後に像ずれ算出部213について簡単に述べる。 Finally, the image shift calculator 213 will be briefly described.

上述のごとくして決定された第1画像出力データa1
anの基準画像範囲l1〜l2に対して第2画像出力データの
比較領域を第9図のごとくシフト量Lに関して1画素ず
つずらして相関量C(L)を、 を求め、これから周知の方法で最大相関を与えるLの
値を算出する。この式は第9図のようなシフトの場合で
あるが、第12図のようなシフトのさせ方でもよい。この
後者の場合には基準画像範囲は少し広目にとる。例えば
前記l1,l2は微小領域q1,q2のPに遠い方の端に決める。
The first image output data a 1 determined as described above.
The comparison area of the second image output data is shifted by one pixel with respect to the shift amount L with respect to the reference image range l 1 to l 2 of an as shown in FIG. , And the value of L that gives the maximum correlation is calculated from this by a known method. This equation is for the case of the shift as shown in FIG. 9, but the shift may be as shown in FIG. In the latter case, the reference image range is slightly wider. For example, l 1 and l 2 are determined at the ends of the minute regions q 1 and q 2 that are farther from P.

なお以上では、第1,第2画像出力データをイメージセ
ンサからの直接出力であるとして記載したが、イメージ
センサからの直接画像出力に何等かのフィルタ処理等を
行なった後のデータを第1,第2画像出力データとして扱
っても良い。
In the above description, the first and second image output data are described as being direct output from the image sensor. However, the data obtained by performing some sort of filter processing on the direct image output from the image sensor is referred to as the first and second image output data. It may be treated as the second image output data.

F.発明の効果 以上のように本発明によれば、物体光のパターンが有
するコントラストに基づいて像ずれ算出手段で用いる基
準画像範囲を設定したり、物体光のパターンが有するコ
ントラストの大きな画素を含むように像ずれ算出手段で
用いる基準画像範囲を変更して設定したり、あるいは、
イメージセンサ上に投影された被写体パターンに応じて
最適な広がりあるいは位置を有する基準画像範囲を設定
し、これともう一方の像に関して像ずれ比較を行なうの
で、焦点検出精度の低下あるいは焦点検出不能がなくな
り、安定した焦点検出が可能となる。
F. Effects of the Invention As described above, according to the present invention, it is possible to set the reference image range used in the image shift calculating unit based on the contrast of the pattern of the object light, or to set a pixel having a large contrast of the pattern of the object light. Change and set the reference image range used by the image shift calculation means to include, or,
A reference image range having an optimum spread or position is set according to the subject pattern projected on the image sensor, and an image shift comparison is performed with respect to the other image. As a result, stable focus detection becomes possible.

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

第1図〜第8図は本発明の一実施例を説明するもので、
第1図が演算部の詳細ブロック図である。 第2図は像ずれ演算ルーチンを示すフローチャートであ
る。 第3図および第4図は基準画像範囲l1〜l2を決定するル
ーチンを示すフローチャートである。 第5図は局在する情報を持つ被写体パターンを説明する
もので、(a)が被写体パターンを示す図、(b)がイ
メージセンサの構成図、(c)が微小領域MRを説明する
図、(d)が情報量dKの演算結果を示す図である。 第6図は焦点検出範囲FRの端にエッジをもつ被写体パタ
ーンを説明するもので、(a)が被写体パターンを示す
図、(b)が情報量dkの演算結果を示す図である。 第7図は通常の被写体パターンを説明するもので、
(a)が被写体パターンを示す図、(b)が情報量dkの
演算結果を示す図である。 第8図は微小領域MRのとり方の変形例を説明する図であ
る。 第9図は像ずれ演算を説明する図である。 第10図は本発明が適用される焦点検出装置の全体構成を
示す図である。 第11図は視野枠内の焦点検出領域とイメージセンサに投
影される光像とを重ねて示す図である。 第12図は、焦点検出範囲FRの端部にエッジをもつ被写体
パターンの像ずれ演算を説明する図である。 第13図は、情報量が局在している被写体パターンを示す
図である。 10:対物レンズ、13:視野枠、14:フィールドレンズ、15:
絞り、16:再結像レンズ、17a,17b:イメージセンサ、19:
マイクロプロセッサ、21:演算部、211:微小領域情報量
算出部、212:範囲設定部、212A:不要領域除去部、212B:
範囲端高情報量回避部
1 to 8 illustrate one embodiment of the present invention.
FIG. 1 is a detailed block diagram of the calculation unit. FIG. 2 is a flowchart showing an image shift calculation routine. FIGS. 3 and 4 are flowcharts showing a routine for determining the reference image ranges l 1 to l 2 . 5A and 5B illustrate a subject pattern having localized information, wherein FIG. 5A illustrates a subject pattern, FIG. 5B illustrates a configuration diagram of an image sensor, and FIG. 5C illustrates a minute region MR; (d) is a diagram showing a calculation result of the amount of information d K. 6A and 6B illustrate a subject pattern having an edge at the end of the focus detection range FR. FIG. 6A is a diagram illustrating the subject pattern, and FIG. 6B is a diagram illustrating a calculation result of the information amount dk. FIG. 7 illustrates a normal subject pattern.
(A) is a figure showing a subject pattern, (b) is a figure showing a calculation result of information amount dk. FIG. 8 is a view for explaining a modified example of how to take the minute region MR. FIG. 9 is a diagram for explaining the image shift calculation. FIG. 10 is a diagram showing the overall configuration of a focus detection device to which the present invention is applied. FIG. 11 is a diagram showing a focus detection area in the field frame and a light image projected on the image sensor in an overlapping manner. FIG. 12 is a diagram for explaining an image shift calculation of a subject pattern having an edge at an end of the focus detection range FR. FIG. 13 is a diagram showing a subject pattern in which the amount of information is localized. 10: objective lens, 13: field frame, 14: field lens, 15:
Aperture, 16: Re-imaging lens, 17a, 17b: Image sensor, 19:
Microprocessor, 21: calculation unit, 211: minute area information amount calculation unit, 212: range setting unit, 212A: unnecessary area removal unit, 212B:
Range edge height information amount avoidance unit

フロントページの続き (58)調査した分野(Int.Cl.6,DB名) G03B 3/00 G02B 7/28 Continuation of the front page (58) Field surveyed (Int.Cl. 6 , DB name) G03B 3/00 G02B 7/28

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】それぞれ複数の画素アレイから成り、同一
物体光による一対の光束をそれぞれ受光して光電変換す
る一対のイメージセンサと、 これら一対のイメージセンサの出力に基づいた第1の画
像データと第2の画像データとから両イメージセンサ上
の光像の相対変位を算出する像ずれ算出手段とを備えた
焦点検出装置において、 少なくとも前記一方の画像データに基づいて前記物体光
のパターンが有するコントラストを算出し、そのコント
ラストに基づいて、前記像ずれ算出手段で用いる基準画
像範囲を設定する設定手段を備え、 この設定手段で設定された基準画像範囲に基づいて、前
記像ずれ算出手段は前記第1および第2の画像データを
比較して画像の相対変位量を算出することを特徴とする
焦点検出装置。
1. A pair of image sensors each comprising a plurality of pixel arrays, respectively receiving a pair of light beams of the same object light and performing photoelectric conversion, and a first image data based on outputs of the pair of image sensors. A focus detection device comprising: image shift calculating means for calculating a relative displacement of the light images on both image sensors from second image data; and a contrast of the object light pattern based on at least one of the image data. And setting a reference image range to be used by the image shift calculating means on the basis of the contrast. Based on the reference image range set by the setting means, the image shift calculating means sets A focus detection apparatus for calculating a relative displacement amount of an image by comparing first and second image data.
【請求項2】それぞれ複数の画素アレイから成り、同一
物体光による一対の光束をそれぞれ受光して光電変換す
る一対のイメージセンサと、 これら一対のイメージセンサの出力に基づいた第1の画
像データと第2の画像データとから両イメージセンサ上
の光像の相対変位を算出する像ずれ算出手段とを備えた
焦点検出装置において、 少なくとも前記一方の画像データにおける複数の画素を
含む初期基準画像範囲内に、前記物体光のパターンが有
するコントラストの大きなものがある場合、大きなコン
トラストの画素を含むように前記像ずれ算出手段で用い
る基準画像範囲を変更して設定する設定手段を備え、 この設定手段で設定された基準画像範囲に基づいて、前
記像ずれ算出手段は前記第1および第2の画像データを
比較して画像の相対変位量を算出することを特徴とする
焦点検出装置。
2. A pair of image sensors each comprising a plurality of pixel arrays, respectively receiving a pair of light beams of the same object light and performing photoelectric conversion, and a first image data based on outputs of the pair of image sensors. An image shift calculating means for calculating a relative displacement of the light images on the two image sensors from the second image data, wherein at least one of the one image data includes a plurality of pixels within an initial reference image range. Setting means for changing and setting a reference image range used by the image shift calculating means so as to include a pixel having a large contrast when the object light pattern has a large contrast. Based on the set reference image range, the image shift calculating unit compares the first and second image data to determine the relative position of the image. Focus detection device and calculates the position quantity.
【請求項3】前記設定手段は、大きいコントラストが局
在する画像データの場合、大きいコントラストが局在す
る画像データ周辺の領域に前記基準画像範囲を変更する
ことを特徴とする請求項1または2に記載の焦点検出装
置。
3. The image processing apparatus according to claim 1, wherein the setting unit changes the reference image range to an area around the image data in which a large contrast is localized, in the case of image data in which a large contrast is localized. 3. The focus detection device according to claim 1.
【請求項4】前記設定手段は、前記基準画像範囲の端に
大きなコントラストをもつ画像データの場合、その大き
なコントラストが端に存在しなくなるように前記基準画
像範囲を変更することを特徴とする請求項1または2に
記載の焦点検出装置
4. The image processing apparatus according to claim 1, wherein the setting unit changes the reference image range so that the image data having a large contrast at an end of the reference image range does not exist at the end. Item 3. The focus detection device according to item 1 or 2.
JP17563988A 1988-07-13 1988-07-13 Focus detection device Expired - Lifetime JP2881772B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17563988A JP2881772B2 (en) 1988-07-13 1988-07-13 Focus detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17563988A JP2881772B2 (en) 1988-07-13 1988-07-13 Focus detection device

Publications (2)

Publication Number Publication Date
JPH0224617A JPH0224617A (en) 1990-01-26
JP2881772B2 true JP2881772B2 (en) 1999-04-12

Family

ID=15999602

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17563988A Expired - Lifetime JP2881772B2 (en) 1988-07-13 1988-07-13 Focus detection device

Country Status (1)

Country Link
JP (1) JP2881772B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0875986A (en) * 1994-09-06 1996-03-22 Nikon Corp Focus detection device

Also Published As

Publication number Publication date
JPH0224617A (en) 1990-01-26

Similar Documents

Publication Publication Date Title
US7750970B2 (en) Distance-measuring device installed in camera
JPH05119252A (en) Method and apparatus for camera distance measurement and rapid automatic focusing
JPS62229213A (en) Photographic lens barrel
JP3491343B2 (en) Focus detection device and focus detection method
US5689740A (en) Focus detection device
JP3636524B2 (en) Focus detection device and optical instrument using the same
JP2001174692A (en) Range-finder
JP2001194576A (en) Range-finding device and camera equipped therewith
JP3653739B2 (en) Camera with subject tracking function
JP2008216719A (en) Focus detection device, focus adjustment device, and imaging device
JPH09184969A (en) Focus detection device and optical instrument using the same
JP2881772B2 (en) Focus detection device
JP7730668B2 (en) Image processing device, imaging device, image processing method and program
JP2002023044A (en) Focus detection device, distance measuring device and camera
JP3170722B2 (en) Exposure calculation device
JPH09184965A (en) Focus detector and optical instrument using the same
JPH0488326A (en) Object detector of optical instrument
JP4539276B2 (en) Camera photometric device and camera
JP3174869B2 (en) Target object tracking device
JP4512173B2 (en) Ranging device
JP3214117B2 (en) Interchangeable lens and camera with focus detection
JP3382321B2 (en) Optical equipment
JP3456231B2 (en) Subject tracking device
JPH0949706A (en) Method for measuring moving amount of object to be measured in front/rear direction with using laser light
JPS62294213A (en) focus detection device

Legal Events

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

Free format text: PAYMENT UNTIL: 20090205

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090205

Year of fee payment: 10