JP3109865B2 - Focus detection device - Google Patents

Focus detection device

Info

Publication number
JP3109865B2
JP3109865B2 JP18251691A JP18251691A JP3109865B2 JP 3109865 B2 JP3109865 B2 JP 3109865B2 JP 18251691 A JP18251691 A JP 18251691A JP 18251691 A JP18251691 A JP 18251691A JP 3109865 B2 JP3109865 B2 JP 3109865B2
Authority
JP
Japan
Prior art keywords
correlation
shift
amount
image
value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP18251691A
Other languages
Japanese (ja)
Other versions
JPH0527162A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP18251691A priority Critical patent/JP3109865B2/en
Priority to US07/914,580 priority patent/US5381206A/en
Priority to DE4224064A priority patent/DE4224064C2/en
Publication of JPH0527162A publication Critical patent/JPH0527162A/en
Priority to US08/714,470 priority patent/US5667270A/en
Application granted granted Critical
Publication of JP3109865B2 publication Critical patent/JP3109865B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

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 used for optical equipment such as a camera, and more particularly to a signal processing method for focus detection.

【0002】[0002]

【従来の技術】従来、一眼レフ・カメラの焦点検出装置
の1つの方法として、撮影レンズの瞳を2つの領域に分
割し、分割された瞳領域を通過した光束が形成する2つ
の被写体像の相対位置変位を観測することによって、撮
影レンズの焦点状態を検出する装置がよく知られてい
る。その原理を図10を用いて簡単に説明する。
2. Description of the Related Art Conventionally, as one method of a focus detecting device of a single-lens reflex camera, a pupil of a photographing lens is divided into two regions, and two light beams passing through the divided pupil regions form two subject images. 2. Description of the Related Art A device that detects a focus state of a photographing lens by observing a relative position displacement is well known. The principle will be briefly described with reference to FIG.

【0003】図10においては焦点検出をすべき撮影レ
ンズ1と光軸を同じくしてフィールド・レンズ2が配置
され、その後方に2個の2次結像レンズ3a,3bが並
列され、さらにその後方にそれぞれ受光用光電変換セン
サ列4a,4bが配置されている。なお、5a,5bは
2次結像レンズの近傍に設けられた絞りである。フィー
ルド・レンズ2は撮影レンズ1の射出瞳を2個の2次結
像レンズ3a,3bの瞳面に略々結像している。この結
果、2次結像レンズ3a,3bのそれぞれに入射する光
束は、撮影レンズ1の射出面上において各2次結像レン
ズ3a,3bに対応する、互いに重なり合うことのない
等面積の領域から射出されたものとなる。
In FIG. 10, a field lens 2 is arranged with the same optical axis as a photographing lens 1 to be subjected to focus detection, and two secondary imaging lenses 3a and 3b are arranged in parallel behind the field lens 2. The photoelectric conversion sensor arrays 4a and 4b for light reception are arranged on the respective sides. Reference numerals 5a and 5b are diaphragms provided near the secondary imaging lens. The field lens 2 substantially forms an image of the exit pupil of the taking lens 1 on the pupil planes of the two secondary imaging lenses 3a and 3b. As a result, the light flux incident on each of the secondary imaging lenses 3a and 3b is shifted from the non-overlapping areas of the same area corresponding to the secondary imaging lenses 3a and 3b on the exit surface of the photographing lens 1. It will be injected.

【0004】フィールド・レンズ2の近傍に形成された
空中像が2次結像レンズ3a,3bによりセンサ列4
a,4bの面上に再結像されると、前記空中像が形成さ
れた光軸方向の位置の相違に基づき、再結像された2像
はその位置を変えることになる。
An aerial image formed in the vicinity of the field lens 2 is converted into a sensor array 4 by secondary imaging lenses 3a and 3b.
When the re-images are formed on the surfaces a and 4b, the two re-images change their positions based on the difference in the position in the optical axis direction where the aerial image was formed.

【0005】図11はこの現象が起こる様子を示してお
り、図11(a)の合焦状態を中心として、図11
(b),(c)のようにいわゆるピント状態が前ピン、
後ピンかによって、センサ列4a,4bの面上に形成さ
れた2像は面上を逆方向に移動する。この像強度分布を
光電変換し、得られた光電変換信号に対して電気的処理
を施すことによって、前記2像相対的位置ずれを検知す
れば、撮影レンズの焦点検出を行なうことができる。
FIG. 11 shows how this phenomenon occurs. FIG. 11 (a) mainly shows the in-focus state of FIG. 11 (a).
The so-called in-focus state as shown in (b) and (c) is the front focus,
The two images formed on the surfaces of the sensor rows 4a and 4b move in the opposite directions on the surfaces depending on whether the rear focus is on. By subjecting this image intensity distribution to photoelectric conversion and subjecting the obtained photoelectric conversion signal to electrical processing to detect the relative displacement between the two images, the focus of the photographing lens can be detected.

【0006】さて、上記2像のずれ量を検知する方法は
多数提案されており、2つの光電変換像信号を相対的に
シフトさせながら相関を求めてゆき、相関の最も高いシ
フト位置をもって像ずれ量とするという方法が一般的で
ある。
A number of methods for detecting the amount of shift between the two images have been proposed, and the correlation is obtained while relatively shifting the two photoelectrically converted image signals, and the image shift is performed with the shift position having the highest correlation. It is common to use a quantity.

【0007】例えば、特開昭56−75607号公報
(以下「従来例1」と称する)や日本国特開昭57−4
5510号公報(以下「従来例2」と称する)。特開昭
60−247211号公報(以下「従来例3」と称す
る)。あるいは本出願人による特開昭58−14230
6号公報、特開昭59−107313号公報(以下「従
来例4」と称する)等の各種方法が開示されている。
For example, Japanese Patent Application Laid-Open No. Sho 56-75607 (hereinafter referred to as "Conventional Example 1") and Japanese Patent Application Laid-Open No. Sho 57-4
No. 5510 (hereinafter referred to as “conventional example 2”). JP-A-60-247211 (hereinafter referred to as "conventional example 3"). Or JP-A-58-14230 by the present applicant.
No. 6, JP-A-59-107313 (hereinafter referred to as "conventional example 4") and the like are disclosed.

【0008】上記従来例で開示されている相関演算の各
手法は、 (1)相関演算の演算子 (2)相関量の極値の求め方 (3)相関演算のシフト方法 といった手続きに特徴がある。
The techniques of the correlation operation disclosed in the above-mentioned conventional example are characterized by procedures such as (1) an operator of the correlation operation, (2) a method of obtaining an extreme value of the correlation amount, and (3) a shift method of the correlation operation. is there.

【0009】最初に、演算子について説明する。First, the operator will be described.

【0010】「従来例1」、「従来例2」、「従来例
3」では、相関関数の演算子として「対応2信号の差の
絶対値」、若しくは「対応2信号の差の絶対値の累乗」
を用いて相関量を演算している。
In "Conventional example 1,""Conventional example 2," and "Conventional example 3," the operator of the correlation function is "the absolute value of the difference between the corresponding two signals" or "the absolute value of the difference between the corresponding two signals." Exponentiation "
Is used to calculate the correlation amount.

【0011】また、「従来例4」では、「対応2信号の
大なる値(あるいは小なる値)」を相関関数の演算子と
している。
[0011] In "Conventional Example 4,""a large value (or a small value) of the corresponding two signals" is used as an operator of the correlation function.

【0012】ここで、演算子の意味を簡単に説明する。Here, the meaning of the operator will be briefly described.

【0013】2つの被写体像信号系列をそれぞれIA
(i),IB(i)とすると、前記「対応2信号の差の
絶対値」(以下「差の絶対値」と称する)という演算子
は、シフトKにおける相関量COR(K)を、次式
(1)に従って演算するものである。
Each of the two subject image signal sequences is represented by IA
(I) and IB (i), the operator “absolute value of difference between corresponding two signals” (hereinafter referred to as “absolute value of difference”) calculates the correlation amount COR (K) at shift K by The calculation is performed according to equation (1).

【0014】[0014]

【外1】 [Outside 1]

【0015】一方、前記「対応2信号の大なる値」ある
いは「対応2信号の小なる値」(以下「大なる値」、
「小なる値」と称する)という演算子は、それぞれ式
(2)、(3)に従って相関量COR(K)を演算する
ものである。
On the other hand, the "large value of the corresponding two signals" or the "small value of the corresponding two signals" (hereinafter "large value",
The operator called “small value” calculates the correlation amount COR (K) according to the equations (2) and (3), respectively.

【0016】[0016]

【外2】 [Outside 2]

【0017】但し、Max{x,y},Min{x,
y}はそれぞれ実数x,yの内、大きい方、あるいは小
さい方を抽出する演算子である。
Where MaxMx, y}, Min {x,
y} is an operator for extracting the larger or smaller one of the real numbers x and y, respectively.

【0018】相関量が上述の式に従って演算されると、
得られた各シフト毎の相関量から、相関が最も大きいシ
フト量が検知できる。このシフト量かつ2つの被写体像
の像ずれ量に対応しており、これから撮影レンズの焦点
状態(デフォーカス量)が検出できるわけである。
When the correlation amount is calculated according to the above equation,
The shift amount having the largest correlation can be detected from the obtained correlation amount for each shift. The shift amount and the image shift amount of the two subject images correspond to each other, and from this, the focus state (defocus amount) of the photographing lens can be detected.

【0019】ところで、上述の如く、単純に相関が最大
となるシフト量をもって像ずれ量とすると、検知できる
像ずれ量は被写体信号系列の1シフト、即ち1画素の整
数単位でしか得られない。これをデフォーカス量に換算
すると、その分解能は比較的粗いものとなり、実用上は
不充分なレベルである。
As described above, if the image shift amount is simply the shift amount at which the correlation becomes maximum, the detectable image shift amount can be obtained only by one shift of the subject signal sequence, that is, by an integer unit of one pixel. When this is converted into a defocus amount, the resolution becomes relatively coarse, which is an insufficient level for practical use.

【0020】そこで、前記各従来例では、1画素の整数
単位よりも細かい少数単位の分解能で相関が最大となる
像ずれ量を検知する手法を開示しており、その方法には
大きく分けて2種類ある。
Therefore, each of the above-mentioned prior arts discloses a method of detecting an image shift amount at which the correlation becomes maximum with a resolution of a small unit smaller than an integer unit of one pixel. There are types.

【0021】1つは整数シフト単位の相関量から小数単
位の相関極値を直接補間して求める手法である(以下
「直接補間法」と称する)。いま1つの手法は、1次導
関数、即ち相関量の微分値(実際には、相関量はシフト
単位の離散量であるから、差分値であるが)がゼロとな
る小数単位のシフトを補間して求める手法であり(以下
「微分補間法」と称する)。これは1次導関数がゼロと
なるとき、その原関数が極値をとる、という原理に基づ
いている。
One is a method of directly interpolating a decimal extremum in decimal units from a correlation amount in integer shift units (hereinafter referred to as a "direct interpolation method"). Another approach is to interpolate the first derivative, that is, the shift in decimal units where the differential value of the correlation amount (actually, the correlation amount is a difference value because the correlation amount is a discrete amount in shift units) is zero. (Hereinafter referred to as “differential interpolation method”). This is based on the principle that when the first derivative becomes zero, its original function takes an extreme value.

【0022】「直接補間法」では、各シフト毎に演算さ
れた相関量が最小となるシフトと、その前後のシフトの
計3点における相関量から、相関量が最小になるであろ
うと予想されるシフト量を、シフト単位よりも細かい尺
度でもって補間して求め、これを像ずれ量としている。
前記「従来例3」がこれに相当し、具体的方法は「従来
例3」に詳しく開示されている。
In the "direct interpolation method", it is expected that the correlation amount will be minimized based on the correlation amounts at a total of three points, that is, the shift in which the correlation amount calculated for each shift is the minimum and the shifts before and after the shift. The shift amount is obtained by interpolation using a scale smaller than the shift unit, and this is used as the image shift amount.
The aforementioned “Conventional example 3” corresponds to this, and a specific method is disclosed in detail in “Conventional example 3”.

【0023】一方「微分補間法」では、各シフト毎に予
め相関量の差分量を演算しておき、その差分量の符号が
変化するシフトを検知し、そのシフトと隣のシフト2点
の差分量から、差分量がゼロになるであろう、即ち相関
量が極値をとるであろうと予想されるシフト量を、これ
もまたシフト単位よりも細かい尺度でもって補間して求
めるものである。
On the other hand, in the "differential interpolation method", a difference amount of a correlation amount is calculated in advance for each shift, a shift in which the sign of the difference amount changes is detected, and a difference between the shift and two adjacent shift points is detected. From the quantity, the shift amount expected to be the difference amount to be zero, that is, the correlation amount to be an extreme value, is also obtained by interpolation using a scale smaller than the shift unit.

【0024】例えば、演算子が「差の絶対値」の場合
の、シフトKにおける相関差分量は、次の式(4)に従
って演算する。
For example, when the operator is “absolute value of difference”, the correlation difference amount at shift K is calculated according to the following equation (4).

【0025】 DIF(K)=Σ|IA(i)−IB(i+K+1)|−Σ|IA(i+1) −IB(i+K)| …(4) 前記「従来例1」、「従来例2」、「従来例4」の極値
検出の手法がこれに相当し、具体的方法は「従来例2」
に詳しく開示されている。
DIF (K) = Σ | IA (i) −IB (i + K + 1) | −Σ | IA (i + 1) −IB (i + K) | (4) The above “Conventional example 1”, “Conventional example 2”, The method of detecting an extremum in “Conventional example 4” corresponds to this, and the specific method is “Conventional example 2”.
In detail.

【0026】次に、相関演算のシフト方法について説明
する。
Next, a method of shifting the correlation operation will be described.

【0027】本出願人による特開昭56−50315号
公報(以下「従来例5」と称する)の設定方法に付い
て、図12に従って説明する。
The setting method of Japanese Patent Application Laid-Open No. 56-50315 (hereinafter referred to as "conventional example 5") by the present applicant will be described with reference to FIG.

【0028】図中10a,10bは図10における2つ
のセンサー列4a,4bの面上での2つの被写体像の強
度分布を示しており、この例では単純な幾何学的エッジ
像が0.5画素ずれた場合を表している。各センサーと
しては8画素とし、像信号系列の信号数も8画素として
示している。12a,12bの矢印は相関演算のための
演算領域を示しており、相関演算のシフトkが例えば4
のときは、図の如く10aの信号では左側の4画素、1
0bの信号では右側の4画素の信号の相関を演算する。
シフトkが2では演算領域を各々1画素ずつ対称にずら
し、同じく4画素の像信号の相関を演算する。以下同様
に、演算画素数は一定のまま、シフトに応じて図のよう
に演算領域を変化させてゆく、シフトkの符号がいわゆ
るピントの前ピン、後ピンに対応している。
10a and 10b show intensity distributions of two subject images on the surface of the two sensor rows 4a and 4b in FIG. 10. In this example, a simple geometric edge image is 0.5. This shows the case where the pixel is shifted. Each sensor has eight pixels, and the number of signals in the image signal sequence is also shown as eight pixels. Arrows 12a and 12b indicate calculation regions for the correlation calculation, and the shift k of the correlation calculation is, for example, 4
In the case of, as shown in FIG.
For the signal of 0b, the correlation of the signals of the four pixels on the right is calculated.
When the shift k is 2, the operation area is symmetrically shifted by one pixel each, and the correlation of the image signals of the four pixels is similarly calculated. Similarly, while the number of operation pixels remains constant, the operation area is changed as shown in the figure according to the shift, and the sign of the shift k corresponds to the so-called front focus and rear focus.

【0029】このように2つの像信号の演算領域を相関
シフトに応じて、対称にかつ相互にずらしてゆくシフト
方法を、以下「相互シフト」と称することにする。
A method of shifting the operation areas of the two image signals symmetrically and mutually according to the correlation shift will be hereinafter referred to as "mutual shift".

【0030】「相互シフト」の方法では、2つの像信号
を同時にずらしてゆくため、相関のシフトが2シフト単
位にならざる得ない。従って、像信号系列の信号数が8
画素で、演算画素数が4画素ならば、演算し得るシフト
kは−4、−2、0、2、4となる。
In the "mutual shift" method, two image signals are simultaneously shifted, so that the correlation shift must be in units of two shifts. Therefore, the number of signals in the image signal sequence is eight.
If the number of calculated pixels is four, the shift k that can be calculated is −4, −2, 0, 2, 4.

【0031】図15は、演算子として「差の絶対値」を
用い、「相互シフト」で演算した相関量をプロットした
ものである。C(−4),C(−2),C(0),C
(2),C(4)がそれぞれシフトk=−4,−2,
0,2,4での相関量を表している。このプロットか
ら、小数単位の相関極値を検知するには、相関量C(−
2),C(0),C(2)での3点から、「直接補間
法」を用いて、図中破線のように相関の極小値を補間
し、同時にその極小値を与えるシフト量kpを求めれば
よい。3点の相関量から小数単位の相関極値を求める方
法は「従来例3」に詳しく開示されているので、ここで
の説明は省略する。
FIG. 15 is a plot of the correlation amount calculated by “mutual shift” using “absolute value of difference” as an operator. C (-4), C (-2), C (0), C
(2) and C (4) are shifts k = −4, −2,
The correlation amounts at 0, 2, and 4 are shown. From this plot, to detect the correlation extreme value in decimal units, the correlation amount C (-
From the three points of 2), C (0) and C (2), the minimum value of the correlation is interpolated using the “direct interpolation method” as shown by the broken line in the figure, and at the same time, the shift amount kp giving the minimum value Should be obtained. The method of obtaining the correlation extreme value in decimal units from the three correlation amounts is disclosed in detail in “Conventional example 3”, and thus the description thereof will be omitted.

【0032】なお、図15は「相互シフト」を説明する
ために、「差の絶対値」の演算子を用いて相関量をプロ
ットしてみたものである。「従来例5」ではシフト方と
しては「相互シフト」を用いているが、相関極値の求め
方については特に明示はされていない。
FIG. 15 is a graph obtained by plotting the correlation amount using an operator of “absolute value of difference” to explain “mutual shift”. In “Conventional Example 5”, “mutual shift” is used as the shift method, but how to obtain the correlation extreme value is not particularly specified.

【0033】次に、「従来例3」でのシフト方法につい
て、図13に従って説明する。
Next, the shift method in the "conventional example 3" will be described with reference to FIG.

【0034】図12と同様に、図中10a,10bは2
つの被写体像の強度分布を、12a,12bの矢印は相
関演算のための演算領域を示している。
As in FIG. 12, 10a and 10b in FIG.
The arrows 12a and 12b indicate the calculation area for the correlation calculation.

【0035】「従来例3」でのシフト方法の特徴は、2
つの被写体像を「基準部」と「参照部」というように性
格づけ、基本的には基準部を固定したまま参照部の像信
号をシフトして相関演算を実行してゆく、という方法で
ある。
The feature of the shift method in "Conventional example 3" is that
This is a method of characterizing two subject images as a “reference part” and a “reference part”, and basically performing a correlation operation by shifting the image signal of the reference part while keeping the reference part fixed. .

【0036】図に示したように、シフトがk=−2から
2の間は、基準部の像信号10aの演算領域12aは固
定されており、参照部の像信号10aの演算領域12b
のみが移動する。このシフト方法では片方の像信号しか
移動しないので、前述の「従来例5」の「相互シフト」
場合とは異なり、1シフト毎の相関演算が可能である。
As shown in the figure, when the shift is between k = -2 and 2, the operation area 12a of the image signal 10a of the reference section is fixed, and the operation area 12b of the image signal 10a of the reference section is fixed.
Only move. In this shift method, only one of the image signals is moved.
Unlike the case, the correlation operation for each shift can be performed.

【0037】さて、シフトk=−2あるいは2におい
て、参照部の像信号10bの演算領域12bは、全信号
域の端に突き当たってしまうため、これ以上の移動を行
なうことができない。そこで、シフトk=−3以上を演
算するために、本来固定であるべき基準部の像信号10
aの演算領域12aを2画素分移動し、相対的に2像の
シフトk=−3が実現するような工夫をしている。シフ
トk=3以降も同様である。
By the way, at the shift k = -2 or 2, the operation area 12b of the image signal 10b of the reference section abuts the end of the entire signal area, so that further movement cannot be performed. Therefore, in order to calculate the shift k = −3 or more, the image signal 10 of the reference portion, which should be originally fixed, is calculated.
The calculation region 12a of a is moved by two pixels, and a shift of two images k = -3 is realized relatively. The same applies to shift k = 3 and thereafter.

【0038】このように片方の像信号の演算領域を固定
して、もう一方の演算領域のみを移動させてゆくシフト
方法を、以下「片像シフト」と称することにする。
The shift method in which the operation area of one image signal is fixed and only the other operation area is moved will be hereinafter referred to as "one-image shift".

【0039】図16に、「従来例3」の演算子「差の絶
対値」とシフト方法「片像シフト」で演算した相関量を
プロットしたものを示す。
FIG. 16 shows a plot of the correlation value calculated by the operator "absolute value of difference" and the shift method "single image shift" in "Conventional Example 3".

【0040】図中、C(−4)〜C(4)がそれぞれシ
フトk=−4〜4での相関量を表している。
In the figure, C (-4) to C (4) represent the correlation amounts at shifts k = -4 to 4, respectively.

【0041】このプロットから、小数単位の相関極値を
検知するには、相関量C(−1),C(0),C
(1)、あるいはC(0),C(1),C(2)の3点
から、「直接補間法」を用いて、図中破線のように相関
の極小値を補間し、同時にその極小値を与えるシフト量
kpを求めればよい。
In order to detect the correlation extreme value in decimal units from this plot, the correlation amounts C (−1), C (0), C
From the three points (1) or C (0), C (1), and C (2), the minimum value of the correlation is interpolated using the “direct interpolation method” as shown by the broken line in the figure, and at the same time, the minimum value is obtained. What is necessary is just to find the shift amount kp giving the value.

【0042】「従来例5」、「従来例3」ともに3点の
相関量から、相関極値を与える小数単位のシフト量を求
めるわけであるが、シフト方法の違いによって「従来例
5」では2シフトずつ離れた3つの相関量を用いるのに
対して、「従来例3」では1シフトずつ離れた3つの相
関量を用いることになる。
In both the "conventional example 5" and the "conventional example 3", the shift amount in decimal units that gives the correlation extreme value is obtained from the correlation amounts at three points. While three correlation amounts separated by two shifts are used, “corresponding example 3” uses three correlation amounts separated by one shift.

【0043】次に、「従来例2」でのシフト方法と、相
関極値の求め方について、図14(a)に従って説明す
る。
Next, the shift method in "Conventional Example 2" and the method for obtaining the correlation extreme value will be described with reference to FIG.

【0044】図12、図13と同様に、図中10a,1
0bは2つの被写体像の強度分布を、12a,12bの
矢印は相関演算のための演算領域を示している。
As in FIGS. 12 and 13, 10a, 1
0b indicates the intensity distribution of the two subject images, and arrows 12a and 12b indicate calculation regions for correlation calculation.

【0045】「従来例2」のシフト方法の特徴は、図に
示したように、シフトk=0では像信号10a,10b
の全信号域を演算対象とし、k=0からシフトするに従
って演算領域の一方の端から演算範囲を対称的に減じて
いく、という点にある。
The feature of the shift method of "Conventional Example 2" is that, as shown in the figure, when the shift k = 0, the image signals 10a and 10b
Is to be calculated, and the calculation range is symmetrically reduced from one end of the calculation area as shifting from k = 0.

【0046】このシフト方法は「従来例5」の「相互シ
フト」場合と似ているが、「相互シフト」では演算画素
数は一定のまま、シフトにつれて2つの像信号の演算領
域の絶対位置を相互に、かつ対称的に変化させている。
従って2つの演算領域の相対位置の変化は2シフト単位
で行なわれることになる。
This shift method is similar to the "mutual shift" in "Conventional Example 5", except that in "mutual shift", the absolute position of the operation area of the two image signals is changed as the shift is performed while the number of operation pixels remains constant. Mutually and symmetrically.
Therefore, the change in the relative position between the two calculation areas is performed in units of two shifts.

【0047】これに対して、「従来例2」では、シフト
につれて演算画素数が変化し、シフトkが正符号あるい
は負符号によって、2つの像信号の内の一方の演算領域
の絶対位置は変化させていない。従って2つの演算領域
は1シフト単位で行なわれる。
On the other hand, in "Conventional Example 2", the number of operation pixels changes with the shift, and the absolute position of one of the operation regions in the two image signals changes depending on whether the shift k is a positive or negative sign. I didn't let it. Therefore, the two operation areas are performed in units of one shift.

【0048】このように2つの像信号の演算画素を減じ
つつ、片方の演算領域のみを移動させてゆくシフト方法
を、以下「演算数可変シフト」と称することにする。
The shift method of moving only one of the operation areas while reducing the number of operation pixels of the two image signals in this manner is hereinafter referred to as “operation number variable shift”.

【0049】ここで明記しておかなければならないの
は、「従来例2」では、図14(a)の矢印12a,1
2bで示された演算領域そのもので相関演算しているわ
けではない、ということである。図14(a)は「従来
例2」と他の従来例との差異を説明するために表したも
のである。「従来例2」は実際には、相関極値の検出方
法に「微分補間法」を用いるために、図14(b)に示
したように、あるシフトで演算領域を互いに1画素ずら
し、従ってそのシフトを中心として±1シフト分離れた
2つの演算領域(15a,15b)対と(16a,16
b)対で相関量を計算し、その差分を計算するようにし
ている。
It should be noted here that, in "Conventional Example 2", arrows 12a and 1a in FIG.
That is, the correlation operation is not performed in the operation region itself shown by 2b. FIG. 14A is a diagram for explaining a difference between “Conventional example 2” and another conventional example. In the “Conventional Example 2”, the operation areas are actually shifted by one pixel with a certain shift as shown in FIG. Two operation area (15a, 15b) pairs separated by ± 1 shift about the shift and (16a, 16
b) The amount of correlation is calculated in pairs, and the difference is calculated.

【0050】図17に各シフト毎の相関差分量D(−
4)〜D(4)をプロットしたものを示す。演算子は
「差の絶対値」である。
FIG. 17 shows the correlation difference amount D (−
4) to D (4) are plotted. The operator is "absolute value of difference".

【0051】例として挙げた被写体像は元々0.5画素
ずらしてあるので、シフトk=0.5で相関量は極値を
とるべきである。図から明らかなように、相関差分量は
シフトk=0とk=1でその符号が変化しており、シフ
トk=0とk=1の間に相関差分量がゼロ、即ち原関数
である相関量が極値を与える小数単位のシフト量が存在
することを意味している。そこで「従来例」2では、相
関差分量D(0)とD(1)の2点を補間し、相関差分
量がゼロと見込まれるシフト量kpを求めている。2点
の相関差分量から小数単位の相関極値を求める補間方法
は「従来例2」に詳しく開示されているので、ここでの
説明は省略する。
Since the object image given as an example is originally shifted by 0.5 pixel, the correlation value should take an extreme value when the shift k = 0.5. As is clear from the figure, the sign of the correlation difference amount changes at shifts k = 0 and k = 1, and the correlation difference amount is zero between shifts k = 0 and k = 1, that is, the original function. This means that there is a decimal shift amount that gives an extreme value of the correlation amount. Therefore, in “Conventional Example 2”, two points of the correlation difference amounts D (0) and D (1) are interpolated to obtain the shift amount kp at which the correlation difference amount is expected to be zero. The interpolation method for obtaining the correlation extreme value in decimal units from the two points of the correlation difference amount is disclosed in detail in “Conventional Example 2”, and thus the description thereof will be omitted.

【0052】本出願人による「従来例4」で開示されて
いる像ずれ検知の方法は、相関極値の補間方法ならびに
シフト方法は、「従来例2」と同じ「微分補間法」、
「演算数可変シフト」であるが、演算子としては「大な
る値」あるいは「小なる値」を用いた手法である。
The method of detecting the image shift disclosed in the “conventional example 4” by the present applicant is the same as the “differential interpolation method” in the same manner as the “conventional example 2”.
Although it is "operable variable shift", it is a method using "large value" or "small value" as an operator.

【0053】図18に「従来例4」による相関差分量を
プロットしたものを示す相関差分量E(−4)〜E
(4)は演算子として「大なる値」を用いた場合、相関
差分量F(−4)〜F(4)は演算子として「小なる
値」を用いた場合を表している。シフト単位以下の相関
極値kpを求める方法は「従来例2」と同じでよい。
FIG. 18 shows correlation difference amounts E (−4) to E (−4) showing the correlation difference amounts according to “Conventional example 4”.
(4) shows the case where "large value" is used as the operator, and the correlation difference amounts F (-4) to F (4) show the case where "small value" is used as the operator. The method of obtaining the correlation extremum kp of the shift unit or less may be the same as that of “Conventional example 2”.

【0054】なお、先に説明したように、「従来例2」
では相関演算の演算画素数がシフトに応じて変化する
が、上記のように差分量で相関極値を検知するが故に演
算画素数が変化が許される。直接相関極値を検知する
「直接補間法」場合は、各シフトでの演算画素数が変化
すると、各相関量に寄与する情報量が一律でないため、
正しい極値を検出することが出来ない場合が生じる得
る。つまり、相関量から直接極値を補間する「直接補間
法」は、シフトに応じて相関量が一定の割合で変化する
ことを暗黙的に仮定しているから成り立つのであって、
シフトによって相関量演算に使用する画素数が変化する
と、相関量はシフトと演算画素数の2つの要因で変化
し、補間演算が成り立たなくなってしまうのである。
As described above, "conventional example 2"
Although the number of calculation pixels in the correlation calculation changes according to the shift, the number of calculation pixels is allowed to change because the correlation extreme value is detected based on the difference amount as described above. In the case of the "direct interpolation method" in which the direct correlation extreme value is detected, if the number of calculation pixels at each shift changes, the amount of information contributing to each correlation amount is not uniform.
There may be cases where the correct extremum cannot be detected. In other words, the "direct interpolation method" that directly interpolates the extreme value from the correlation amount is achieved by implicitly assuming that the correlation amount changes at a fixed rate according to the shift,
When the number of pixels used for the correlation amount calculation changes due to the shift, the correlation amount changes due to the two factors of the shift and the number of calculation pixels, and the interpolation calculation does not hold.

【0055】そこで「従来例2」のように「演算数可変
シフト」を使用する場合は、「微分補間法」と組み合
せ、図14(b)の如く差分演算を行なう2シフト離れ
た相関量の演算画素数を、各シフト毎に一定にしている
のである。
Therefore, when "variable shift of operation number" is used as in "conventional example 2", in combination with "differential interpolation method", as shown in FIG. The number of calculation pixels is kept constant for each shift.

【0056】以上説明してきた従来例の像ずれ検知の手
法をまとめると、1.相関演算の演算子としては、 (1.1)「差の絶対値」(従来例1,2,3) (1.2)「大なる値(あるいは小なる値)」(従来例
4) 2.相関極値の補間方法としては、 (2.1)「直接補間法」(従来例3) (2.2)「微分補間法」(従来例1,2,4) 3.相関演算シフト方法としては、 (3.1)「相互シフト」(従来例5) (3.2)「片像シフト」(従来例3) (3.3)「演算数可変シフト」(従来例2.4) というように整理される。但し、上記(3.3)の「演
算数可変シフト」は(2.1)の「直接補間法」と組み
合わせて使用しない方が良い。
The method of detecting the image shift of the conventional example described above is summarized as follows. (1.1) “Absolute value of difference” (conventional examples 1, 2, 3) (1.2) “large value (or small value)” (conventional example 4) 2 . (2.1) “Direct interpolation method” (conventional example 3) (2.2) “Differential interpolation method” (conventional examples 1, 2, and 4) The correlation operation shift method includes: (3.1) “mutual shift” (conventional example 5) (3.2) “single image shift” (conventional example 3) (3.3) “operation number variable shift” (conventional example) 2.4) However, it is better not to use the “variable operation number shift” of (3.3) in combination with the “direct interpolation method” of (2.1).

【0057】[0057]

【発明が解決しようとする課題】さて、上述したように
像ずれ検知の方法は種々提案されているが、各方法は観
測する被写体像によって性能の優劣が生ずる。
As described above, various methods of detecting an image shift have been proposed, but each method has a performance difference depending on an object image to be observed.

【0058】ノイズの全く存在しない幾何学的な被写体
像では、いずれの手法を用いても総て正しい像ずれ量が
検知可能である。しかしながら、光電変換センサからの
ランダム・ノイズや光学系のゴーストのような低周波ノ
イズが被写体像信号に混入すると、手法の違いによって
被写体像に依存するS/N的な優劣が生じてくる。
For any geometric object image free of noise, the correct amount of image shift can be detected by any method. However, when low-frequency noise such as random noise from a photoelectric conversion sensor or ghost of an optical system is mixed in a subject image signal, the S / N ratio depending on the subject image is generated depending on the method.

【0059】一例を挙げると、観測する被写体像が、い
わゆるエッジ・パターンのように全体的に平坦で部分的
にのみ輝度変化があるようなパターンの場合、その輝度
変化部分が相関演算の演算領域の端部に存在してしまう
と、演算子として「差の絶対値」を用いた像ずれ検知方
法よりも、「大なる値(あるいは小なる値)」を用いた
方法の方が、S/N的には優れている。その理由に関し
ては、本出願人による特開昭60−101513号公報
(以下「従来例6」と称する)に詳しく説明している。
As an example, if the object image to be observed is a pattern such as a so-called edge pattern that is entirely flat and has only a partial luminance change, the luminance change portion is a calculation area for correlation calculation. , The method using the “large value (or small value)” is more effective than the image shift detection method using the “absolute value of the difference” as the operator. Excellent in N. The reason is described in detail in Japanese Patent Application Laid-Open No. S60-101513 (hereinafter referred to as "Conventional Example 6") by the present applicant.

【0060】また、光学系のゴーストのような低周波ノ
イズが被写体像信号に混入した場合では、被写体にもよ
るが一般的には、相関極値の補間方法として相関差分量
から極値を求める「微分補間法」よりも、相関量から直
接極値を求める「直接補間法」の方が誤差が小さい傾向
がある。これは、補間演算に何点の相関量を使用してい
るか、が主因であると考えられる。「微分補間法」は2
点の相関差分量を用いて補間演算を行なっているが、差
分量は式(4)の如く2点の相関量から計算されるか
ら、実質的には4点の相関量を使用して補間演算を行な
っていることに他ならない。一方「直接補間法」では3
点の相関量を使用している。このため、ノイズによって
各シフト相関量が変動すると、より多数の相関量を使用
している「微分補間法」の方がノイズの影響を受け易い
ことになる。
When low-frequency noise such as a ghost of an optical system is mixed in a subject image signal, an extreme value is generally obtained from a correlation difference amount as an interpolation method of a correlation extreme value, though it depends on the subject. The "direct interpolation method" for directly finding an extremum from the correlation amount tends to have a smaller error than the "differential interpolation method". This is considered to be mainly due to how many correlation amounts are used in the interpolation calculation. "Differential interpolation method" is 2
Although the interpolation operation is performed using the correlation difference amount between the points, the difference amount is calculated from the correlation amount between the two points as shown in Expression (4). Therefore, the interpolation operation is substantially performed using the correlation amount between the four points. It is nothing but performing the operation. On the other hand, the direct interpolation method
Point correlation is used. For this reason, when each shift correlation amount fluctuates due to noise, the "differential interpolation method" using a larger number of correlation amounts is more susceptible to noise.

【0061】また、相関演算のシフト方法としては、
「相互シフト」が他の方法に比較してS/N的に不利で
あるということができる。「相互シフト」の場合は前述
したように相関量が2シフト単位でしか得られない。他
の2つの方法「片像シフト」、「演算数可変シフト」で
は1シフト単位で得られる。従って、「相互シフト」の
補間演算では、求めるべき相関極値の位置に対して、他
の方法よりも距離の離れたシフトでの相関量を使って計
算することになる。補間演算に用いられる相関量の座標
間距離が離れると、補間演算の誤差が拡大されることは
容易に予想される。
As a shift method of the correlation operation,
It can be said that "mutual shift" is disadvantageous in S / N compared to other methods. In the case of "mutual shift", as described above, the correlation amount can be obtained only in units of two shifts. In the other two methods “one-image shift” and “variable number of operations”, the shift is obtained in units of one shift. Therefore, in the interpolation operation of "mutual shift", the position of the correlation extreme value to be obtained is calculated using the correlation amount at a shift that is farther away than other methods. When the inter-coordinate distance of the correlation amount used in the interpolation calculation increases, it is easily expected that the error of the interpolation calculation will increase.

【0062】像ずれ検知方法の優劣について、これまで
説明してきたことを手続き別にまとめると、演算子は
「大なる値(あるいは小なる値)」の方が、相関極値の
補間方法は「直接補間法」の方が、相関演算のシフト方
法は「相互シフト」以外「直接補間法」と組み合わせる
ならば「片像シフト」)の方が、概してS/N的に優れ
たものであるということができる。
The advantages and disadvantages of the image shift detection method can be summarized by the procedure described above. When the operator is “large value (or small value)”, the correlation extreme value interpolation method is “direct value”. The "interpolation method" is generally superior in terms of S / N to the shift method of the correlation operation except for the "mutual shift" and "single image shift" if combined with the "direct interpolation method". Can be.

【0063】しかしながら、上述のそれぞれ好ましい手
続きを組み合わせた像ずれ検知方法は、正しい像ずれ量
を検出することができないのである。この組み合わせに
よる相関量のプロットを図19に示す。演算子としては
「大なる値(あるいは小なる値)」を、相関極値の補間
方法としては「直接補間法」を、シフト方法としては
「片像シフト」を用いている。被写体像信号はこれまで
の例と同様に、幾何学的エッジ像が0.5画素ずれた場
合を想定している。
However, the image shift detecting method combining the above preferred procedures cannot detect a correct image shift amount. FIG. 19 shows a plot of the correlation amount by this combination. The operator uses "large value (or small value)", "direct interpolation method" as the interpolation method of the correlation extreme value, and "single image shift" as the shift method. The subject image signal assumes a case where the geometric edge image is shifted by 0.5 pixel as in the previous examples.

【0064】相関量A(−4)〜A(4)は演算子とし
て「大なる値」を用いた場合、相関量B(−4)〜B
(4)は演算子として「小なる値」を用いた場合を表し
ている。図から判るように、上記2つのいずれの相関量
を使用しても、本来の像ずれ量である0.5画素に位
置、即ちシフトk=0.5で極値を示しておらず、正し
い像ずれ検知が不可能である。
When the "large value" is used as the operator, the correlation amounts B (-4) to B (-4) to A (4)
(4) shows a case where “small value” is used as an operator. As can be seen from the figure, no matter which of the above two correlation amounts is used, the position does not show the extreme value at the position of 0.5 pixel which is the original image shift amount, that is, the shift k = 0.5. Image shift detection is not possible.

【0065】ところが、被写体像が図20(a).
(b)に示したような幾何学的なバー・パターンのよう
なものであれば、「大なる値(あるいは小なる値)」の
演算子でも正しい像ずれ検知が可能となる。この場合の
相関量のプロットをそれぞれ図21(a).(b)に示
した。相関量A(−4)〜A(4)、相関量B(−4)
〜B(4)が、それぞれ「大なる値」、「小なる値」の
演算子のときの相関量であり、被写体像はこれまでの例
と同様に、2像が0.5画素ずれた場合を想定してい
る。この場合、上記2つのいずれの相関量を使用して
も、相関極値のシフト量kpは本来の像ずれ量である
0.5画素を表しており、正しい極値の検知ができてい
る。
However, the subject image is shown in FIG.
If it is a geometric bar pattern as shown in (b), an operator of "large value (or small value)" can correctly detect an image shift. The plot of the correlation amount in this case is shown in FIG. (B). Correlation A (-4) to A (4), Correlation B (-4)
To B (4) are the correlation amounts when the operators are “large value” and “small value”, respectively. Two subject images are shifted by 0.5 pixel as in the previous examples. The case is assumed. In this case, no matter which of the two correlation amounts is used, the shift amount kp of the correlation extreme value represents 0.5 pixel which is the original image shift amount, and the correct extreme value can be detected.

【0066】「大なる値(あるいは小なる値)」という
演算子が、何故こういった性質を持っているか、という
と次のように考えられる。
The reason why the operator "large value (or small value)" has such a property can be considered as follows.

【0067】そもそも相関関数というものは、2信号系
列が最も似ているシフト位置にて相関量が最小(あるい
は最大)となり、そのシフト位置から遠ざかるにつれて
相関量は増加(あるいは減少)する関数である。ところ
が、「大なる値」を演算子として、しかも1像の演算領
域を固定して、エッジ像のような「左右非対称」の像信
号の相関量を演算すると、シフトの符号が正の場合はシ
フトに応じてその相関量が変化するが、負の場合にはシ
フトを変えても相関量が変化しない、といった状況が発
生する。つまり、固定した方のニッジ像の輝度信号が作
る「包絡」の中に、もう1像のエッジ部分が入り込む
と、その状態で入り込んだ方の像をシフトしても、「大
なる値」の演算子は常に固定した方の像の包絡に沿った
一定の信号を抽出するだけで、相関量に変化が現れない
からである。
The correlation function is a function in which the correlation amount becomes minimum (or maximum) at the shift position where the two signal sequences are most similar, and the correlation amount increases (or decreases) as the distance from the shift position increases. . However, when the "large value" is used as an operator, and the calculation area of one image is fixed, and the correlation amount of a "left-right asymmetric" image signal such as an edge image is calculated, if the shift sign is positive, The amount of correlation changes according to the shift, but in the negative case, the amount of correlation does not change even if the shift is changed. In other words, if the edge portion of the other image enters the “envelope” created by the luminance signal of the fixed nudge image, the “large value” of This is because the operator always extracts only a constant signal along the envelope of the fixed image, and no change appears in the correlation amount.

【0068】「相互シフト」の場合は、片像を固定させ
ず常に演算領域が変化しているので、上記したような状
態が起こらない、従ってシフトの符号に関わらず、シフ
トに応じて相関量が変化してゆき、相関極値の検知が可
能となる。
In the case of "mutual shift", the above-mentioned state does not occur because the calculation area is constantly changed without fixing one image, and therefore, the correlation amount is changed according to the shift regardless of the sign of the shift. Changes, and the detection of the correlation extreme value becomes possible.

【0069】結局、「対応2信号の大なる値和(あるい
は小なる値和)」という演算子は、像信号の一方の演算
領域を固定した相関演算と組み合わせると、被写体によ
っては正しい像ずれ量の検知ができない演算子である、
ということになる。
After all, the operator “sum of large values (or sum of small values) of corresponding two signals” is combined with a correlation operation in which one operation area of the image signal is fixed, and the correct image shift amount depends on the subject. Is an operator that cannot detect
It turns out that.

【0070】[0070]

【課題を解決するための手段】本発明は、前記した問題
の解消を目的をしており、相関演算に先だって、像ずれ
検出すべき被写体像信号を複製し、信号量を拡大させ、
相関演算では「相互シフト」で相関量を求めることによ
って、S/N的にも優れた、精度の高い像ずれ検出を可
能とするものである。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problem. Prior to a correlation operation, a subject image signal to be detected for image shift is duplicated to increase the signal amount.
In the correlation calculation, the amount of correlation is obtained by "mutual shift", thereby enabling highly accurate image shift detection excellent in S / N ratio.

【0071】[0071]

【実施例】以下、実施例に従って本発明を説明する。The present invention will be described below with reference to examples.

【0072】図1(a),(b)は相関演算に先だって
行なう被写体像信号の拡大と、シフトに伴う演算領域の
設定を説明したものである。
FIGS. 1A and 1B illustrate the enlargement of the subject image signal performed prior to the correlation calculation and the setting of the calculation area accompanying the shift.

【0073】図中10a,10bは図10におけるセン
サ列4a,4bの面上での2つの被写体像の強度分布を
示しており、この例では単純な幾何学的エッジ像が0.
5画素ずれた場合を表している。像信号系列の信号数は
8画素である。又、図中IA(0)〜IA(7)はセン
サ列4aの各画素出力を示し、IB(0)〜IB(7)
はセンサ4bの各画像出力を示している。
In FIG. 10, reference numerals 10a and 10b denote the intensity distributions of the two subject images on the surface of the sensor rows 4a and 4b in FIG.
This shows a case where there is a shift of 5 pixels. The number of signals in the image signal sequence is 8 pixels. In the figure, IA (0) to IA (7) indicate each pixel output of the sensor array 4a, and IB (0) to IB (7).
Indicates each image output of the sensor 4b.

【0074】像信号の拡大は、図1(a)の像信号系列
10a,10bの各画素信号を複製して2倍の信号数に
拡大し、それぞれ図1(b)の11a,11bの如く、
信号数16画素の像信号系列に変換して行なわれる。具
体的には、像信号系列10aの第1番目の画素信号IA
(0)を像信号系列11aの第1番目JA(0)と第2
番目JA(1)とし、像信号系列10aの第2番目の画
素信号IA(1)を像信号系列11aの第3番目JA
(2)と第4番目JA(3)とする、といった拡大操作
である。
The enlargement of the image signal is performed by duplicating each pixel signal of the image signal series 10a and 10b in FIG. 1A and enlarging it to twice the number of signals, respectively, as shown by 11a and 11b in FIG. 1B. ,
The conversion is performed by converting the signal into an image signal sequence having 16 pixels. Specifically, the first pixel signal IA of the image signal sequence 10a
(0) and the first JA (0) and the second JA (0) of the image signal sequence 11a.
And the second pixel signal IA (1) of the image signal sequence 10a is referred to as a third JA (1) of the image signal sequence 11a.
(2) and a fourth JA (3).

【0075】このようにして拡大した被写体像信号11
a,11bに対して相関演算を施す。図中12a,12
bの矢印は相関演算のための演算領域を表しており、図
7と同じ「相互シフト」である。注目すべきは、図7の
「相互シフト」は2像を同時に移動させるため、2シフ
ト単位の相関演算となるが、図1(b)では像信号を2
倍に拡大した後に移動させるため、元の像信号系列に換
算して1シフト単位の相関演算が可能となることであ
る。
The subject image signal 11 thus enlarged
a and 11b are subjected to a correlation operation. 12a, 12 in the figure
The arrow b indicates a calculation area for the correlation calculation, which is the “mutual shift” as in FIG. It should be noted that the “mutual shift” in FIG. 7 is a two-shift correlation operation because two images are moved simultaneously, but in FIG.
Since the image signal is moved after being enlarged twice, it is possible to perform a correlation operation in units of one shift in terms of the original image signal sequence.

【0076】図2に本発明による相関演算の、各シフト
毎の相関量をプロットしたものを示す。演算子は「大な
る値(あるいは小なる値)」を用いる。相関量A(−
4)〜A(4)、相関量B(−4)〜B(4)が、それ
ぞれ「大なる値」、「小なる値」の演算子のときの相関
量である。
FIG. 2 shows a plot of the correlation amount for each shift in the correlation operation according to the present invention. The operator uses "large value (or small value)". Correlation amount A (-
4) to A (4) and correlation amounts B (−4) to B (4) are the correlation amounts when the operators are “large value” and “small value”, respectively.

【0077】図から明らかなように、「相互シフト」に
も拘らず、1シフト単位で相関量が得られ、又相関極値
の検知も正しく実行できることがわかる。
As is apparent from the figure, the correlation amount can be obtained in units of one shift, regardless of the "mutual shift", and the correlation extreme value can be correctly detected.

【0078】図3に本発明による焦点検出装置を実現す
る具体的回路ブロック図を示す。
FIG. 3 shows a specific circuit block diagram for realizing the focus detection device according to the present invention.

【0079】図中40はセンサ装置であり、2つのセン
サ列4a,4bが配置されている。50はセンサ駆動回
路、60は焦点検出装置全体の制御や信号処理を行なう
マイクロコンピュータである。マイクロコンピュータ6
0から出力される制御信号61,62,63によりセン
サ駆動回路50は制御され、また制御信号61,62,
63から生成されるセンサ駆動信号51,52,53が
センサ装置40に与えられる。この辺りの制御の実際は
本発明とは直接関わりがないので詳しい説明は省略す
る。
In the figure, reference numeral 40 denotes a sensor device, in which two sensor rows 4a and 4b are arranged. Reference numeral 50 denotes a sensor drive circuit, and reference numeral 60 denotes a microcomputer that controls the entire focus detection device and performs signal processing. Microcomputer 6
The sensor drive circuit 50 is controlled by control signals 61, 62, 63 output from 0, and the control signals 61, 62, 63
Sensor drive signals 51, 52 and 53 generated from 63 are provided to the sensor device 40. The actual control in this area is not directly related to the present invention, and thus a detailed description is omitted.

【0080】蓄積型センサからなるセンサ列の所定の蓄
積が行なわれると、アナログ像信号41がセンサ装置4
0から出力され、センサ駆動回路50内の増巾回路54
を経て、増巾されたアナログ像信号55がマイクロコン
ピュータ60のアナログ入力に入力される。マイクロコ
ンピュータ60は、自身が出力する制御信号61,6
2,63に同期して、入力されるアナログ像信号55を
A/D変換し、マイクロコンピュータに内蔵されたRA
Mの所定アドレスにディジタル像信号を順次格納してゆ
く。
When a predetermined accumulation of the sensor array composed of accumulation type sensors is performed, the analog image signal 41 is output to the sensor device 4.
0, and the amplification circuit 54 in the sensor driving circuit 50
, The amplified analog image signal 55 is input to the analog input of the microcomputer 60. The microcomputer 60 outputs control signals 61 and 6 output by itself.
A / D conversion of the input analog image signal 55 in synchronization with
The digital image signals are sequentially stored at a predetermined address of M.

【0081】像信号の格納が終了すると、マイクロコン
ピュータ60はROMに格納されている焦点検出のため
のプログラムを実行してゆく。
When the storage of the image signal is completed, the microcomputer 60 executes the focus detection program stored in the ROM.

【0082】図4にマイクロコンピュータのプログラム
のフローチャートを示している。
FIG. 4 shows a flowchart of the microcomputer program.

【0083】焦点検出動作開始によってステップ(S1
00)の「焦点検出開始」ルーチンNコールされ、ステ
ップ(S101)にて前述の像信号の入力が実行され
る。図1(a)での像信号10aをIA(0)〜IA
(7),10bをIB(0)〜IーB(7)とする。
When the focus detection operation is started, step (S1)
The "focus detection start" routine N of "00" is called, and the input of the image signal is executed in step (S101). The image signal 10a in FIG. 1A is represented by IA (0) to IA.
(7) and 10b are IB (0) to IB (7).

【0084】次のステップ(S102)(S103)に
て、像信号を2倍の信号量に拡大する処理を行なってい
る。図1(b)での拡大像信号11a,11bをそれぞ
れJA(0)〜JA(15),JB(0)〜JB(1
5)とすると、 JA(2・i)←IA(i) …(5) JA(2・i+1)←IA(i) …(6) JB(2・i)←IB(i) …(7) JB(2・i+1)←IB(i) …(8) 但し、i=0〜7である。の(5)〜(8)式にてIA
(i),IB(i)をJA(0)〜JA(15),JB
(0)〜JB(15)に変換する。尚、ステップ(S1
02)はiについてのループ処理を表わしており、ルー
プ内のステップ(S103)にて式(5)〜(8)を実
行している。
In the next steps (S102) and (S103), a process of expanding the image signal to twice the signal amount is performed. The enlarged image signals 11a and 11b in FIG. 1B are respectively represented by JA (0) to JA (15) and JB (0) to JB (1
Assuming that 5), JA (2 · i) ← IA (i) (5) JA (2 · i + 1) ← IA (i) (6) JB (2 · i) ← IB (i) (7) JB (2 · i + 1) ← IB (i) (8) where i = 0 to 7. IA in equations (5) to (8)
(I), IB (i) is represented by JA (0) to JA (15), JB
(0) to JB (15). Step (S1)
02) represents a loop process for i, and the equations (5) to (8) are executed in step (S103) in the loop.

【0085】次のステップ(S104),(S105)
にて、図1(b)に表わした相関演算範囲での相関演算
を行なう。この場合、演算子としては「小なる値」を用
いてシフトkにおける相関量をCOR(k)とし、次の
式(9)ある計算を行なう。
Next step (S104), (S105)
Performs a correlation operation in the correlation operation range shown in FIG. In this case, the correlation amount at the shift k is COR (k) using “small value” as an operator, and the following equation (9) is calculated.

【0086】[0086]

【外3】 但し、k=−4〜+4である。[Outside 3] However, k = −4 to +4.

【0087】ステップ(S104),(S105)での
処理は図1(b)に示した各k値ごとにおける演算範囲
ごとの上記「小なる値を用いた式(9)での相関演算を
意味する。即ち、k=−4の時には信号JA(0)〜J
A(7)と信号JB(8)〜JB(15)を対象とし
て、JA(0)とJB(8)のうち小なる右の値を、J
A(1)とJB(9)のうち小なる値を、以下同様にJ
A(2)とJB(10)との対、JA(3)とJB(1
1)の対、JA(4)とJB(12)との対、JA
(5)とJB(13)との対、JA(6)とJB(1
4)との対、JA(7)とJB(15)との各対のうち
小なる値をそれぞれ選択し、該選択された小なる右の値
の加算値がCOR(−4)として求められる。
The processing in steps (S104) and (S105) means the above-mentioned “correlation calculation in equation (9) using small values” for each calculation range for each k value shown in FIG. That is, when k = -4, the signals JA (0) to J (0) to J
For A (7) and signals JB (8) to JB (15), the smaller right value of JA (0) and JB (8) is expressed by J
A smaller value of A (1) and JB (9)
A pair of A (2) and JB (10), and a pair of JA (3) and JB (1)
1) pair, JA (4) and JB (12) pair, JA
Pair of (5) and JB (13), JA (6) and JB (1
4) and the smaller value of each pair of JA (7) and JB (15) are selected, and the sum of the selected smaller right values is obtained as COR (-4). .

【0088】又、k=−3の時には信号JA(1)〜J
A(8)と信号JB(7)〜JB(14)を対象とし
て、各対応信号のうち小なる値の加算値がCOR(−
3)として求められる。又、k=−2〜+4の時も同様
にして図1(b)に示した各範囲ごとに上記COR(−
2)〜COR(+4)が求められる。
When k = -3, the signals JA (1) to JA (1) to J
For A (8) and the signals JB (7) to JB (14), the sum of the smaller values of the corresponding signals is COR (-
3). Similarly, when k = −2 to +4, the above-mentioned COR (−) is obtained for each range shown in FIG.
2) to COR (+4) are required.

【0089】シフトkが−4から+4までの相関量CO
R(k)の計算が完了すると、ステップ(S106)〜
(S110)で相関極値の検出を行なっている。演算子
として「小なる値」を採用した場合、相関が最大のシフ
トにて相関量COR(k)は最大となるはずである。そ
のため、ステップ(S106)にてあらかじめ相関量の
最大値を格納する変数CORMAXに0を初期値として
与えておく。
The correlation amount CO when the shift k is from -4 to +4
When the calculation of R (k) is completed, steps (S106) to (S106)
In step (S110), an extreme correlation value is detected. When “small value” is adopted as the operator, the correlation amount COR (k) should be the maximum at the shift where the correlation is the maximum. Therefore, in step (S106), 0 is given as an initial value to the variable CORMAX storing the maximum value of the correlation amount in advance.

【0090】ステップ(S107)はkについてのルー
プ処理を表わしており、k=−3〜+3の範囲に渡って
相関量の極値を探索する。
Step (S107) represents a loop process for k, and searches for an extreme value of the correlation amount over the range of k = -3 to +3.

【0091】極値探索の条件としては、「最大」かつ
「前後の2点より大きい」を用いている。ステップ(S
108)で相関量COR(k)が最大であるか否かを判
定し、ステップ(S109)でCOR(k)が前後の2
点の相関量COR(k−1),COR(k+1)より大
きいか否かを判定している。両方の条件を満足した場合
のみステップ(S110)へ移行し、ステップ(S11
0)にて、相関量最大値変数CORMAXをCOR
(k)の値で更新し、同時に極値シフトkxに現在のシ
フトkの値を格納する。相関量を前後2点の値と比較す
るステップ(S109)の判定を行なうために、ステッ
プ(S107)のループ処理は、kを−3から+3まで
と、実際に相関演算を行なったシフト範囲(−4〜+
4)より狭くしている。
As the conditions for the extremum search, "maximum" and "greater than two points before and after" are used. Step (S
At 108), it is determined whether or not the correlation amount COR (k) is maximum.
It is determined whether or not the correlation amounts of the points are larger than COR (k-1) and COR (k + 1). Only when both conditions are satisfied, the process proceeds to step (S110), and the process proceeds to step (S11).
0), the maximum correlation value variable CORMAX is set to COR.
The value of (k) is updated, and at the same time, the current value of shift k is stored in extreme value shift kx. In order to determine the step (S109) in which the correlation amount is compared with the values of two points before and after, the loop processing in the step (S107) sets k to -3 to +3 and sets the shift range (the shift range in which the correlation operation was actually performed). -4 to +
4) It is narrower.

【0092】今、図2のB(−4)〜B(4)が上記の
ステップS104、S105にて求めた各相関値COR
(−4)〜COR(+4)を表しているものとして、上
記極値探索について説明する。
Now, B (-4) to B (4) in FIG. 2 are the correlation values COR obtained in steps S104 and S105.
The extreme value search will be described as representing (−4) to COR (+4).

【0093】まず、S106でCORMAX=0とした
後、S108でCOR(−3)とCORMAXが比較さ
れる。COR(−3)=B(−3)>CORMAXであ
るので、ステップS109にて、COR(−3)とCO
R(−4)及びCOR(−3)とCOR(−2)との大
小比較がなされる。
First, CORMAX is set to 0 in S106, and COR (-3) and CORMAX are compared in S108. Since COR (−3) = B (−3)> CORMAX, COR (−3) and CO (−3) are determined in step S109.
R (−4) and COR (−3) are compared with COR (−2).

【0094】この場合、COR(−2)=B(−2)>
COR(−3)=B(−3)であるので、ステップS1
10を実行することなくk=−2にセットし、再度ステ
ップS108とS109の比較を行う。この結果、CO
R(−1)=B(−1)>COR(−2)=B(−2)
であるので、ステップS110を実行することなく、k
=−1にセットし、再度上記ステップS108、S10
9を実行する。この結果、COR(0)=B(0)>C
OR(−1)=B(−1)であるので、この場合もS1
10を実行することなく、k=0として、再度ステップ
S108、S109を実行する。この場合、COR
(0)=B(0)>COR(−1)=B(−1)であ
り、かつCOR(0)=B(0)>COR(1)=B
(1)であるので、ステップS110を実行し、COR
MAXとしてCOR(0)=B(0)をセットし、kx
を0にセットし、その後k=1にセットし、再度上記S
108、S109を実行する。以後のk=1〜4までの
上記処理ではステップ108、109を条件を満たさな
いので、k=4として処理を行った後、ステップS11
1へ進む。
In this case, COR (−2) = B (−2)>
Since COR (−3) = B (−3), step S1
Then, k is set to −2 without executing Step 10, and Steps S108 and S109 are compared again. As a result, CO
R (-1) = B (-1)> COR (-2) = B (-2)
Therefore, without executing step S110, k
= −1, and the above steps S108 and S10 are performed again.
9 is executed. As a result, COR (0) = B (0)> C
Since OR (-1) = B (-1), S1 is also used in this case.
Steps S108 and S109 are executed again, with k = 0, without executing step 10. In this case, COR
(0) = B (0)> COR (-1) = B (-1), and COR (0) = B (0)> COR (1) = B
(1), step S110 is executed, and COR
Set COR (0) = B (0) as MAX and set kx
Is set to 0, then k = 1, and the above S
108 and S109 are executed. In the subsequent processing from k = 1 to k = 4, steps 108 and 109 do not satisfy the condition, so that the processing is performed with k = 4 and then step S11
Proceed to 1.

【0095】ステップ(S107)〜(S110)に
て、相関極値が検出されると、次のステップ(S11
1)にて、シフト単位より小さい尺度で像ずれ量を求め
るために、相関極値の補間を行っている。
When an extreme correlation value is detected in steps (S107) to (S110), the next step (S11)
In 1), interpolation of the correlation extreme value is performed to obtain the image shift amount on a scale smaller than the shift unit.

【0096】補間方法としては、前述したように最大値
のシフトとその前後の計3点の相関量から補間を行う方
法を用いている。ここでは一例として、従来例3の方法
で補間演算を行ってみる。
As the interpolation method, as described above, the method of performing the interpolation from the shift of the maximum value and the correlation amounts of three points before and after the shift is used. Here, as an example, the interpolation calculation is performed by the method of the conventional example 3.

【0097】図5(a)、(b)に示したように、シフ
トkxにおいて「小なる値」を演算とする相関量COR
(kx)が最大となったとき、COR(kx−1)とC
OR(kx+1)の値の大きさによって、COR(kx
−1)≦COR(kx+1)なる場合(図5(a))
と、COR(kx−1)>COR(kx1)なる場合
(図5(b))が考えられる。図5(a)のようにCO
R(kx−1)≦COR(kx+1)の場合には、CO
R(kx−1)とCOR(kx)を通ると直線と、その
直線と傾きが逆符号でCOR(kx+1)を通る直線の
交点のk座標を少数以下の像ずれ量kpとする。以上の
処理によって焦点検出結果である像ずれ量kpが求めら
れることとなる。
As shown in FIGS. 5 (a) and 5 (b), the correlation amount COR calculated using the "small value" at the shift kx.
When (kx) becomes the maximum, COR (kx-1) and C
Depending on the magnitude of the value of OR (kx + 1), COR (kx
-1) ≦ COR (kx + 1) (FIG. 5A)
And COR (kx-1)> COR (kx1) (FIG. 5B). As shown in FIG.
If R (kx−1) ≦ COR (kx + 1), CO
The k coordinate at the intersection of a straight line passing through R (kx-1) and COR (kx) and a straight line having the opposite sign and passing through COR (kx + 1) with the opposite sign is defined as an image shift amount kp of a small number or less. With the above processing, the image shift amount kp as the focus detection result is obtained.

【0098】図5(b)のようにCOR(kx−1)>
COR(kx+1)の場合には、COR(Kx)とCO
R(kx+1)を通る直線と、その直線と傾きが逆符号
でCOR(kx−1)を通る直線の交点のk座標をkp
とする。式で表すと次のようになる。 (i)COR(kx−1)≦COR(kx+1)の場
合、
As shown in FIG. 5B, COR (kx-1)>
In the case of COR (kx + 1), COR (Kx) and CO
The k coordinate of the intersection of a straight line passing through R (kx + 1) and a straight line passing through COR (kx−1) with the opposite sign to the straight line passing through COR (kx−1) is represented by kp
And This can be expressed as follows. (I) When COR (kx−1) ≦ COR (kx + 1),

【0099】[0099]

【外4】 (ii)COR(kx−1)>COR(kx+1)の場
合、
[Outside 4] (Ii) When COR (kx−1)> COR (kx + 1),

【0100】[0100]

【外5】 [Outside 5]

【0101】以上のようにして、最大相関COR(K
x)とその前後の2点COR(kx−1)、COR(k
x+1)から像ずれ量kpが求められるわけであるが、
図5(a)、(b)のようにkpを直線で補間して求め
る方法以外に、相関量COR(kx−1)、COR(K
x)、COR(kx+1)の3点が通る2次関数の極値
として求めても良い。
As described above, the maximum correlation COR (K
x) and two points COR (kx-1) and COR (k
x + 1), the image shift amount kp is obtained.
As shown in FIGS. 5A and 5B, in addition to the method of calculating kp by linear interpolation, the correlation amounts COR (kx−1) and COR (K
x) and COR (kx + 1) may be obtained as extreme values of a quadratic function through which three points pass.

【0102】図6は上記補間演算の他の例を示す説明図
で、図6では2次関数で像ずれ量kpを補間する例を表
している。
FIG. 6 is an explanatory diagram showing another example of the above-mentioned interpolation calculation. FIG. 6 shows an example in which the image shift amount kp is interpolated by a quadratic function.

【0103】図6において最大相関COR(Kx)とそ
の前後の2点COR(kx−1)、COR(kx+1)
が与えられると、その3点を通る2次関数COR(K)
=ak2+bk+cの各係数が求められ、2次関数の極
In FIG. 6, the maximum correlation COR (Kx) and the two points COR (kx-1) and COR (kx + 1) before and after it are shown.
Is given, the quadratic function COR (K) passing through the three points
= Ak 2 + bk + c are obtained, and the extreme value of the quadratic function is obtained.

【0104】[0104]

【外6】 をもってkpと見なすわけである。kpは次式(12)
によって求められる。
[Outside 6] Is regarded as kp. kp is given by the following equation (12).
Required by

【0105】[0105]

【外7】 [Outside 7]

【0106】さて、図4(a)では相関の演算子として
「小なる値」を用いた場合を示したが、「大なる値」を
演算として場合のフローチャートの一部を図4(b)に
示す。
Now, FIG. 4A shows a case where "small value" is used as a correlation operator, but FIG. 4B shows a part of a flowchart in the case where "large value" is used as an operation. Shown in

【0107】図4(b)のステップ(S204)〜(S
210)が図4(a)の(S104)〜(S110)に
相当している。両者の相違についてのみ説明すると、ス
テップ(S205)において相関量を計算する際に演算
子「大なる値」を用いている。「大なる値」を演算子と
すると、その相関量は相関最大で極小子とする。
Steps (S204) to (S204) in FIG.
210) corresponds to (S104) to (S110) in FIG. Explaining only the difference between the two, the operator "large value" is used when calculating the correlation amount in step (S205). When “large value” is used as an operator, the correlation amount is the maximum correlation and the minimum value.

【0108】次のステップでは、相関量の最小値を表す
変数CORMINに初期値9999を格納している。こ
れは9999に限定されるわけではなく、相関量のとり
得ない大きな値を格納しておけば良い。
In the next step, the initial value 9999 is stored in the variable CORMIN representing the minimum value of the correlation amount. This is not limited to 9999, and it is sufficient to store a large value from which the correlation amount cannot be obtained.

【0109】ステップ(S208)、(S209)、
(S210)では、極値探索条件として、「最小」かつ
「前後2点より小さい」を条件としており、条件を満足
した場合に、ステップ(S210)にて、最小値変数C
ORMINとシフトkxを更新する。
Steps (S208), (S209),
In (S210), the extreme value search condition is “minimum” and “smaller than two points before and after”. If the condition is satisfied, the minimum value variable C is determined in step (S210).
Update ORMIN and shift kx.

【0110】相関極値の補間については、直線で補間す
る場合、最大値を求めるのか、最小値を求めるのかの違
いによって場合合計が若干異なる。即ち、COR(kx
−1)≧COR(kx+1)の場合に式(10)が、C
OR(kx−1)<COR(kx+1)の場合に式(1
1)が適用される。
As for the interpolation of the correlation extreme value, when interpolating with a straight line, the sum of the cases differs slightly depending on whether the maximum value or the minimum value is obtained. That is, COR (kx
-1) ≧ COR (kx + 1), the equation (10) is
When OR (kx−1) <COR (kx + 1), the expression (1)
1) applies.

【0111】図6のように、2次関数で補間する場合
は、当然のことながら演算子によらず式(12)で求め
られる。
As shown in FIG. 6, when interpolating with a quadratic function, it is naturally obtained by equation (12) regardless of the operator.

【0112】ところで本発明は像信号系列の新号数を2
倍としたため、そのまま2倍の信号量で相関演算を行う
と、演算時間は従来よりも大幅に増大してしまう。
In the present invention, the number of new image signal sequences is two.
Therefore, if the correlation calculation is performed with twice the signal amount as it is, the calculation time will be significantly longer than in the past.

【0113】しかし、相関演算に図7のような工夫をす
れば、演算時間は従来に比較してほとんど増加しないで
済む。
However, if the correlation calculation is devised as shown in FIG. 7, the calculation time can hardly be increased as compared with the related art.

【0114】図7の矢印対(13a,14a)、(13
b,14b)がそれぞれ図1の矢印12a,12bに対
応した相関演算領域を表している。もともと拡大像信号
系列11a,11bはそれぞれ像信号系列10a,10
bから生成したものである。それ故、拡大像信号系列1
1aの領域12aと拡大像信号系列11bの領域12b
間の相関量は、元の像信号系列10aの領域13aと元
の像信号系列10bの領域13b間の相関量に、同じく
領域14aと領域14b間の相関量を加算した値に等し
い。そして、偶数シフトでは領域13aと14aは等し
く、奇数シフトでは領域13aは14aの両端の1画ず
つ加えた領域である。
The arrow pairs (13a, 14a), (13
b, 14b) represent the correlation calculation areas corresponding to the arrows 12a, 12b in FIG. 1, respectively. Originally, the enlarged image signal sequences 11a and 11b are respectively image signal sequences 10a and 10b.
b. Therefore, the enlarged image signal sequence 1
1a and the area 12b of the enlarged image signal sequence 11b
The amount of correlation between them is equal to the value obtained by adding the amount of correlation between the regions 14a and 14b to the amount of correlation between the region 13a of the original image signal sequence 10a and the region 13b of the original image signal sequence 10b. In the even-numbered shift, the areas 13a and 14a are equal, and in the odd-numbered shift, the area 13a is an area obtained by adding one stroke at both ends of the 14a.

【0115】したがって、偶数シフトでの相関量は領域
14aと14b間の相関量を2倍にしたものであり、奇
数シフトでの相関量は領域14aと14b間の相関量を
2倍にした値に、領域13aと13bの両端の信号のみ
の相関量を加えたものになる。このようにして演算すれ
ば、拡大像信号系列での相関演算時間は、元の像信号系
列での演算時間と比較してほとんど増加することはな
い。
Therefore, the correlation amount at the even-numbered shift is a value obtained by doubling the correlation amount between the regions 14a and 14b, and the correlation amount at the odd-numbered shift is a value obtained by doubling the correlation amount between the regions 14a and 14b. And the correlation amount of only the signals at both ends of the regions 13a and 13b. By performing the calculation in this manner, the correlation calculation time in the enlarged image signal sequence hardly increases compared to the calculation time in the original image signal sequence.

【0116】図7の演算方法を用いた場合のフローチャ
ートの部分を図8に示す。図8のステップ(S301)
〜(S305)が図4(a)の中のステップ(S10
1)〜(S105)に相当する。
FIG. 8 shows a part of a flowchart when the calculation method of FIG. 7 is used. Step of FIG. 8 (S301)
4 to (S305) correspond to the steps (S10) in FIG.
1) to (S105).

【0117】ステップ(S301)は、ステップ(S1
01)と同様に像信号IA(0)〜IA(7)、IB
(0)〜IB(7)を得る。
The step (S301) is the same as the step (S1)
01), image signals IA (0) to IA (7), IB
(0) to IB (7) are obtained.

【0118】次のステップ(S302)はシフトkにつ
いてのループ処理を表しており、ループ内にてk=−4
から+4までの処理を行う。
The next step (S302) represents a loop process for the shift k, where k = -4 in the loop.
To +4.

【0119】図7から明らかなように、シフトkが偶数
か奇数かによって演算領域の設定方法が異なる。即ち、
シフトkが偶数の場合には、相関量COR(k)は
As apparent from FIG. 7, the method of setting the operation area differs depending on whether the shift k is an even number or an odd number. That is,
When the shift k is an even number, the correlation amount COR (k) becomes

【0120】[0120]

【外8】 となる。一方、シフトkが奇数の場合には、相関量CO
R(K)は、
[Outside 8] Becomes On the other hand, when the shift k is an odd number, the correlation amount CO
R (K) is

【0121】[0121]

【外9】 となる。ステップ(S303)〜(305)にてCOR
(k)が計算される。
[Outside 9] Becomes COR in steps (S303) to (305)
(K) is calculated.

【0122】このようにしてシフトkが−4から+4ま
での相関量COR(k)が得られれば、その後図4
(a)のステップ(S106)以降の相関極値の探索と
極値の補間を行えば良い。
If the correlation amount COR (k) in which the shift k is from -4 to +4 is obtained in this way, then, FIG.
The search for the correlation extreme value and the interpolation of the extreme value may be performed after the step (S106) of (a).

【0123】図8では、相関演算の演算子は「小なる
値」を用いたが、「大なる値」を演算子として用いる場
合には、図中‘Min’を‘Max’とすれば良く、そ
の場合図4(b)のステップ(S206)〜(S21
0)と、図4(a)のステップ(S111)を実行すれ
ば、像ずれ量kpを求めることができる。
In FIG. 8, “small value” is used as the operator of the correlation operation. However, when “large value” is used as the operator, “Min” in the figure may be changed to “Max”. In this case, the steps (S206) to (S21) in FIG.
0) and step (S111) in FIG. 4A, the image shift amount kp can be obtained.

【0124】上記実施例では、「従来例6」で説明して
いるように、観測する被写体像が、いわゆるエッジ・パ
ターンのように全体的に平坦で部分的にのみ輝度変化が
あるような像では、相関演算の演算子として「差の絶対
値」を用いた像ずれ検知方法よりも、「大なる値(ある
いは小なる値)」を用いた方法の方がS/N的には有利
であるため、ここまでの説明では、演算子として「大な
る値(あるいは小なる値)」を用いてきた。しかし、
「差の絶対値」という演算子も、本発明の像ずれ検知手
法に対して適用可能である。
In the above embodiment, as described in "Conventional Example 6", the image of the object to be observed is an image such as a so-called edge pattern which is entirely flat and has only a partial luminance change. In this case, a method using “large value (or small value)” is more advantageous in S / N than an image shift detection method using “absolute value of difference” as an operator of the correlation operation. For this reason, in the description so far, “large value (or small value)” has been used as an operator. But,
The operator “absolute value of difference” is also applicable to the image shift detection method of the present invention.

【0125】先に説明したように、「差の絶対値」とい
う演算子は、相関演算のシフト方法である「片像シフ
ト」、「交互シフト」ともに組み合わせて使用できるの
で、あえて本発明の「相互シフト」に組み合わせる必要
はないかのように思えるが、「片像シフト」は像信号の
基準部の演算領域を固定するため、観測する被写体像に
よっては、都合の悪い場合がある。それは、「片像シフ
ト」では、シフトk=2から3、k=−2から−3にか
けて、固定にしている基準像の演算領域を変えるため、
ここで相関量が不連続となることがあり得るからであ
る。
As described above, the operator “absolute value of difference” can be used in combination with “shift of one image” and “alternate shift”, which are shift methods of the correlation operation. Although it seems that there is no need to combine with the "mutual shift", the "single image shift" fixes the calculation area of the reference portion of the image signal, and therefore may be inconvenient depending on the subject image to be observed. That is, in the “single image shift”, since the shift k = 2 to 3, and k = −2 to −3, the calculation area of the fixed reference image is changed.
This is because the correlation amount may be discontinuous here.

【0126】図13に示したような、0.5画素ずれた
被写体像を対象とする場合は、図16の相関量のプロッ
トの如くkp=0.5が補間でき、正しい像ずれ検知が
可能である。ところが、被写体像が2.5画素ずれてい
る場合、シフトk=2,3,4あるいはk=1,2,3
の3点の相関量から、小数単位の相関極値を補間して求
めるわけであるから、シフトk=2とk=3で相関量の
連続性が損なわれると、少なからず誤差要因となり得
る。
In the case of a subject image shifted by 0.5 pixel as shown in FIG. 13, kp = 0.5 can be interpolated as shown in the plot of the correlation amount in FIG. It is. However, if the subject image is shifted by 2.5 pixels, the shift k = 2, 3, 4 or k = 1, 2, 3
Since the correlation extreme value in decimal units is obtained by interpolating the correlation extremum of the three points, if the continuity of the correlation quantity is impaired by the shifts k = 2 and k = 3, it may be a considerable error factor.

【0127】「従来例3」ではその辺りを考慮して、基
準像の1つの演算領域が受け持つシフト範囲が、他の演
算領域のシフト範囲と部分的に重なるようにしている。
それによって、補間演算に用いる3点の相関量は基準像
の演算領域が同じものが使用でき、3点の相関量の連続
性が保たれる。
In "Conventional example 3", the shift range assigned to one calculation region of the reference image partially overlaps with the shift range of another calculation region in consideration of the vicinity.
As a result, the three correlation amounts used in the interpolation calculation can be the same in the calculation area of the reference image, and the continuity of the three correlation amounts can be maintained.

【0128】本発明の像ずれ検知方法では、上記相関量
の連続性の不安はないので、「従来例3」のような工夫
は必要なく、その分演算時間が増加することはない。
In the image shift detecting method of the present invention, since there is no concern about the continuity of the correlation amount, there is no need to devise the technique described in "Conventional Example 3", and the calculation time does not increase accordingly.

【0129】図9に本発明の像ずれ検知方法に、演算子
として「差の絶対値」を適用した場合の、各シフト毎の
相関量をプロットしたものを示す。被写体像は図1と同
じ幾何学的エッジ像が0.5画素ずれたものである。
FIG. 9 shows a plot of the amount of correlation for each shift when "absolute value of difference" is applied as an operator to the image shift detection method of the present invention. The subject image is the same geometric edge image as in FIG. 1 shifted by 0.5 pixel.

【0130】図から明らかなように、シフトk=2と
3、またはk=−2と−3の間で相関量は不連続になら
ず、正しい像ずれ量の検出ができることが判る。
As is clear from the figure, the correlation amount does not become discontinuous between shifts k = 2 and 3, or k = -2 and -3, and it is possible to detect a correct image shift amount.

【0131】[0131]

【発明の効果】以上説明したように、本発明によると、
相関演算に先だって、像ずれ検出すべき被写体像信号を
複製し、信号量を拡大させ、相関演算では「相互シフ
ト」で相関量を求めることによって、S/N的にも優れ
た像ずれ検出を可能とし、さらに演算子として「大なる
値(あるいは小なる値)」を用いれば、被写体依存も少
なくすることができ、それにより精度の高い焦点検出が
可能となる。
As described above, according to the present invention,
Prior to the correlation operation, the object image signal to be detected for image deviation is duplicated, the signal amount is enlarged, and the correlation operation obtains the correlation amount by “mutual shift”, thereby detecting an image deviation excellent in S / N. If it is possible, and if a "large value (or a small value)" is used as an operator, the dependence on the subject can be reduced, thereby enabling highly accurate focus detection.

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

【図1】本発明による相関演算の原理的説明図である。FIG. 1 is a principle explanatory diagram of a correlation operation according to the present invention.

【図2】本発明による相関演算の第1の実施形の相関量
のプロット図である。
FIG. 2 is a plot diagram of a correlation amount of the first embodiment of the correlation operation according to the present invention.

【図3】本発明の焦点検出装置の回路ブロック図であ
る。
FIG. 3 is a circuit block diagram of the focus detection device of the present invention.

【図4】焦点検出装置内のマイクロコンピュータのフロ
ーチャートを示す説明図である。
FIG. 4 is an explanatory diagram showing a flowchart of a microcomputer in the focus detection device.

【図5】相関量の極値検出の説明図である。FIG. 5 is an explanatory diagram of detection of an extreme value of a correlation amount.

【図6】相関量の極値検出の他の例を示す説明図であ
る。
FIG. 6 is an explanatory diagram showing another example of detecting an extreme value of a correlation amount.

【図7】本発明による相関演算の別の説明図である。FIG. 7 is another explanatory diagram of the correlation operation according to the present invention.

【図8】図7による相関演算を実現するマイクロコンピ
ュータのフローチャートを示す説明図である。
8 is an explanatory diagram showing a flowchart of a microcomputer for realizing the correlation operation shown in FIG. 7;

【図9】相関量の補間動作の他の例を説明するための説
明図である。
FIG. 9 is an explanatory diagram for explaining another example of a correlation amount interpolation operation.

【図10】焦点検出光学系の原理を説明するための説明
図である。
FIG. 10 is an explanatory diagram for explaining the principle of a focus detection optical system.

【図11】図10とともに焦点検出光学系の原理を説明
するための説明図である。
FIG. 11 is an explanatory diagram for explaining the principle of the focus detection optical system together with FIG. 10;

【図12】従来の相関演算の原理を説明するための説明
図である。
FIG. 12 is an explanatory diagram for explaining the principle of a conventional correlation operation.

【図13】従来の他の相関演算の原理を説明するための
説明図である。
FIG. 13 is an explanatory diagram for explaining another principle of a conventional correlation operation.

【図14】従来の他の相関演算の原理を説明するための
説明図である。
FIG. 14 is an explanatory diagram for explaining the principle of another conventional correlation operation.

【図15】従来の相関演算結果を示す説明図である。FIG. 15 is an explanatory diagram showing a conventional correlation operation result.

【図16】従来の相関演算結果の他の例を示す説明図で
ある。
FIG. 16 is an explanatory diagram showing another example of a conventional correlation operation result.

【図17】従来の相関演算の差分量演算結果を示す説明
図である。
FIG. 17 is an explanatory diagram showing a difference amount calculation result of a conventional correlation calculation.

【図18】従来の相関演算の差分量演算結果の他の例を
示す説明図である。
FIG. 18 is an explanatory diagram showing another example of a difference amount calculation result of a conventional correlation calculation.

【図19】従来例の組み合わせによる相関演算量を示す
説明図である。
FIG. 19 is an explanatory diagram showing a correlation calculation amount by a combination of the conventional example.

【図20】被写体像信号例を示す説明図である。FIG. 20 is an explanatory diagram illustrating an example of a subject image signal.

【図21】従来例の組み合わせによる相関演算の他の例
を示す説明図である。
FIG. 21 is an explanatory diagram showing another example of the correlation operation using the combination of the conventional example.

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

1 撮影レンズ 4a 光電変換センサ列 4b 光電変換センサ列 40 センサ装置 60 マイクロコンピューター Reference Signs List 1 shooting lens 4a photoelectric conversion sensor array 4b photoelectric conversion sensor array 40 sensor device 60 microcomputer

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

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 光学系を介して第1と第2のセンサー列
上に光束を受光させ、各センサー列にて受光された光束
に対応した第1と第2の信号に対する相対変位量から光
学系の焦点状態を検出する焦点検出装置において、各セ
ンサーを構成する各画素の信号を複製して2倍の信号量
に拡大するとともに、該拡大された第1と第2の信号に
対しての相関演算に際して、第1と第2の信号の演算領
域が各シフトごとに互いに対称に変位する形式で行わせ
たことを特徴とする焦点検出装置。
1. A light beam is received on first and second sensor arrays via an optical system, and an optical signal is obtained based on a relative displacement amount with respect to the first and second signals corresponding to the light beam received by each sensor array. In a focus detection device that detects a focus state of a system, a signal of each pixel constituting each sensor is duplicated and enlarged to a double signal amount, and a signal corresponding to the enlarged first and second signals is generated. A focus detection device wherein the correlation calculation is performed in such a manner that the calculation areas of the first and second signals are displaced symmetrically with each other for each shift.
【請求項2】 前記相関演算は、第1と第2の信号にお
ける対応する信号の大なる値、あるいは小なる値を演算
子とする相関演算であることを特徴とする請求項1に記
載の焦点検出装置。
2. The correlation operation according to claim 1, wherein the correlation operation is a correlation operation using a large value or a small value of a corresponding signal in the first and second signals as an operator. Focus detection device.
JP18251691A 1991-07-22 1991-07-23 Focus detection device Expired - Fee Related JP3109865B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP18251691A JP3109865B2 (en) 1991-07-23 1991-07-23 Focus detection device
US07/914,580 US5381206A (en) 1991-07-22 1992-07-20 Focus detecting device
DE4224064A DE4224064C2 (en) 1991-07-22 1992-07-21 Focus state detector device
US08/714,470 US5667270A (en) 1991-07-22 1996-09-16 Focus detecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP18251691A JP3109865B2 (en) 1991-07-23 1991-07-23 Focus detection device

Publications (2)

Publication Number Publication Date
JPH0527162A JPH0527162A (en) 1993-02-05
JP3109865B2 true JP3109865B2 (en) 2000-11-20

Family

ID=16119669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP18251691A Expired - Fee Related JP3109865B2 (en) 1991-07-22 1991-07-23 Focus detection device

Country Status (1)

Country Link
JP (1) JP3109865B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5399627B2 (en) * 2007-12-21 2014-01-29 株式会社ニコン Focus detection device, focus adjustment device, and imaging device
JP6221362B2 (en) * 2013-06-06 2017-11-01 リコーイメージング株式会社 Automatic focus detection method and automatic focus detection device

Also Published As

Publication number Publication date
JPH0527162A (en) 1993-02-05

Similar Documents

Publication Publication Date Title
JP3263931B2 (en) Stereo matching device
US5602584A (en) Apparatus for producing a panoramic image using a plurality of optical systems
JP4018218B2 (en) Optical apparatus and distance measuring point selection method
JP2692049B2 (en) Focus detection device
WO2005015123A2 (en) Inclination angle detection device and inclination angle detection method
US6480620B1 (en) Method of and an apparatus for 3-dimensional structure estimation
JP2013037166A (en) Focus detector, and lens device and imaging device having the same
JP3491343B2 (en) Focus detection device and focus detection method
US10999491B2 (en) Control apparatus, image capturing apparatus, control method, and storage medium
JPS6037513A (en) Shift amount detector
JP3109865B2 (en) Focus detection device
JP2020112700A (en) Focus controller, imaging device, and focus control method
JP4641502B2 (en) Focus detection apparatus and optical instrument
JPH06250078A (en) Detecting device for focused state or distance of object
US5612763A (en) Focus detection device and method
JP3356229B2 (en) Optical detection device and focus control device
US5667270A (en) Focus detecting device
JP3174869B2 (en) Target object tracking device
JPH0527161A (en) Focus detecting device
JP2016066015A (en) Focus detector, control method thereof, program, and memory medium
JPH04338905A (en) Focus detection device
JP3239413B2 (en) Camera autofocus device
JPH07306038A (en) Distance measuring instrument
JP5065466B2 (en) Focus detection apparatus and optical instrument
JP2757592B2 (en) Camera system

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20000829

LAPS Cancellation because of no payment of annual fees