JPH0527162A - Focus detecting device - Google Patents

Focus detecting device

Info

Publication number
JPH0527162A
JPH0527162A JP18251691A JP18251691A JPH0527162A JP H0527162 A JPH0527162 A JP H0527162A JP 18251691 A JP18251691 A JP 18251691A JP 18251691 A JP18251691 A JP 18251691A JP H0527162 A JPH0527162 A JP H0527162A
Authority
JP
Japan
Prior art keywords
correlation
shift
amount
calculation
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.)
Granted
Application number
JP18251691A
Other languages
Japanese (ja)
Other versions
JP3109865B2 (en
Inventor
Akira Akashi
彰 明石
Hiroshi Matsushima
寛 松島
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

Abstract

PURPOSE:To accomplish the accurate detection of the deviation of an image, which is excellent in S/N, by duplicating an object image signal, doubly enlarging it, and obtaining a correlation amount by ''mutual shift'' in correlation arithmetic operation. CONSTITUTION:In a device where a luminous flux is received on 1st and 2nd sensor trains 4a, 4b through optical systems 1-3 so that the focusing state of the optical systems 1-3 is detected based on a correlation displacement amount with respect to 1st and 2nd signals by the respective sensor trains 4a and 4b, the signals from plural picture elements which constitute the respective sensors 4a, 4b are duplicated, enlarged to be double signal amounts, and the correlation arithmetic operation is performed to the 1st and the 2nd enlarged signals. In the correlation arithmetic operation, a larger value or a smaller value out of the corresponding signals in the 1st and the 2nd signals is set as an operator. By obtaining the correlation amount by 'mutual shift', the detection of the image, which is excellent in the S/N, is accomplished. Furthermore, by using the larger value or the smaller value as the operator, the dependency of the object is decreased, and the accurate focus detection is accomplished.

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 in 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 apparatus for a single-lens reflex camera, a pupil of a photographing lens is divided into two areas, and two object images formed by a light flux passing through the divided pupil areas are formed. A device that detects the focus state of a photographing lens by observing the 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 the photographic lens 1 for focus detection, and two secondary imaging lenses 3a and 3b are arranged in parallel behind the field lens 2 and further after that. Photoelectric conversion sensor arrays 4a and 4b for light reception are arranged on each side. Note that 5a and 5b are diaphragms provided near the secondary imaging lens. The field lens 2 substantially forms 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 fluxes incident on the secondary imaging lenses 3a and 3b respectively come from the areas of the same area on the exit surface of the photographing lens 1 which do not overlap with each other and which correspond to the secondary imaging lenses 3a and 3b. It has been ejected.

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

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

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

【0008】上記従来例で開示されている相関演算の各
手法は、 (1)相関演算の演算子 (2)相関量の極値の求め方 (3)相関演算のシフト方法 といった手続きに特徴がある。
Each of the correlation calculation methods disclosed in the above-mentioned conventional examples is characterized by the procedures such as (1) operator of correlation calculation, (2) method of obtaining extreme value of correlation amount, and (3) shift method of correlation calculation. 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", as the operator of the correlation function, "absolute value of difference between corresponding two signals" or "absolute value of difference between corresponding two signals" is used. Exponentiation "
Is used to calculate the correlation amount.

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

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

【0013】2つの被写体像信号系列をそれぞれIA
(i),IB(i)とすると、前記「対応2信号の差の
絶対値」(以下「差の絶対値」と称する)という演算子
は、シフトKにおける相関量COR(K)を、次式
(1)に従って演算するものである。
The two object image signal sequences are respectively 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 as follows. The calculation is performed according to the equation (1).

【0014】[0014]

【外1】 [Outer 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 a 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の内、大きい方、あるいは小
さい方を抽出する演算子である。
However, Max {x, y}, Min {x,
y} is an operator for extracting the larger one or the smaller one of the real numbers x and y.

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

【0019】ところで、上述の如く、単純に相関が最大
となるシフト量をもって像ずれ量とすると、検知できる
像ずれ量は被写体信号系列の1シフト、即ち1画素の整
数単位でしか得られない。これをデフォーカス量に換算
すると、その分解能は比較的粗いものとなり、実用上は
不充分なレベルである。
By the way, if the image shift amount is simply the shift amount that maximizes the correlation as described above, 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 conventional examples discloses a method of detecting the image shift amount at which the correlation is maximized with a resolution of a decimal 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 correlation extremum in a decimal unit from a correlation amount in an integer shift unit (hereinafter referred to as "direct interpolation method"). Another method is to interpolate a first-order derivative, that is, a differential unit value of the correlation amount (actually, the correlation amount is a discrete amount of the shift unit, so it is a difference value), but is a decimal unit shift. This is a method of obtaining (hereinafter referred to as "differential interpolation method"). This is based on the principle that the original function takes an extreme value when the first derivative becomes zero.

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

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

【0024】例えば、演算子が「差の絶対値」の場合
の、シフトKにおける相関差分量は、次の式(4)に従
って演算する。
For example, when the operator is the "absolute value of difference", the correlation difference amount in 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 “conventional example 1”, the “conventional example 2”, The extremal value detection method of "Conventional example 4" corresponds to this, and the specific method is "Conventional example 2".
In detail.

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

【0027】本出願人による特開昭56−50315号
公報(以下「従来例5」と称する)の設定方法に付い
て、図12に従って説明する。
The setting method of JP-A-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の符号がいわゆ
るピントの前ピン、後ピンに対応している。
Reference numerals 10a and 10b in the figure show the intensity distributions of two object images on the surfaces of the two sensor arrays 4a and 4b in FIG. 10, and in this example, a simple geometric edge image is 0.5. The case where the pixels are displaced is shown. Each sensor has 8 pixels, and the number of signals in the image signal series is also 8 pixels. Arrows 12a and 12b indicate calculation areas 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 0b, the correlation of the signals of the four pixels on the right side is calculated.
When the shift k is 2, the calculation areas are symmetrically shifted by one pixel and the correlation of the image signals of four pixels is calculated. Similarly, while the number of pixels to be calculated is constant, the calculation area is changed according to the shift as shown in the figure. The sign of shift k corresponds to the so-called front focus and rear focus.

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

【0030】「相互シフト」の方法では、2つの像信号
を同時にずらしてゆくため、相関のシフトが2シフト単
位にならざる得ない。従って、像信号系列の信号数が8
画素で、演算画素数が4画素ならば、演算し得るシフト
kは−4、−2、0、2、4となる。
In the "mutual shift" method, since two image signals are shifted at the same time, the shift of the correlation is inevitably 2 shift units. Therefore, the number of signals in the image signal sequence is 8
If the number of calculation pixels is 4 pixels, 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 shifted by k = −4, −2,
The amount of correlation at 0, 2, and 4 is shown. From this plot, the correlation amount C (-
2), C (0), and C (2), the shift amount kp that interpolates the local minimum value of the correlation as shown by the broken line in the figure using the "direct interpolation method" and at the same time gives the local minimum value. You should ask. The method of obtaining the correlation extreme value in decimal units from the correlation amount of three points is disclosed in detail in "Conventional Example 3", and therefore the description thereof is omitted here.

【0032】なお、図15は「相互シフト」を説明する
ために、「差の絶対値」の演算子を用いて相関量をプロ
ットしてみたものである。「従来例5」ではシフト方と
しては「相互シフト」を用いているが、相関極値の求め
方については特に明示はされていない。
In order to explain the "mutual shift", FIG. 15 is a plot of the correlation amount using the operator of "absolute value of difference". In "Conventional Example 5", "mutual shift" is used as the shift method, but the method for obtaining 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 are 2 in the figure.
The intensity distribution of one subject image, and the arrows 12a and 12b indicate calculation areas for correlation calculation.

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

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

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

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

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

【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を求めればよい。
From this plot, the correlation quantities C (-1), C (0), C can be detected in order to detect the correlation extreme value in decimal units.
From (1) or C (0), C (1), and C (2), the local minimum value of the correlation is interpolated as shown by the broken line in the figure by using the "direct interpolation method", and at the same time the local minimum is obtained. The shift amount kp that gives a value may be obtained.

【0042】「従来例5」、「従来例3」ともに3点の
相関量から、相関極値を与える小数単位のシフト量を求
めるわけであるが、シフト方法の違いによって「従来例
5」では2シフトずつ離れた3つの相関量を用いるのに
対して、「従来例3」では1シフトずつ離れた3つの相
関量を用いることになる。
In both "Conventional example 5" and "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 2 shifts are used, in "Conventional example 3", three correlation amounts separated by 1 shift are used.

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

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

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

【0046】このシフト方法は「従来例5」の「相互シ
フト」場合と似ているが、「相互シフト」では演算画素
数は一定のまま、シフトにつれて2つの像信号の演算領
域の絶対位置を相互に、かつ対称的に変化させている。
従って2つの演算領域の相対位置の変化は2シフト単位
で行なわれることになる。
This shift method is similar to the case of "mutual shift" in "Conventional example 5", but in "mutual shift", the absolute positions of the calculation regions of two image signals are changed as the number of calculation pixels remains constant. It changes mutually and symmetrically.
Therefore, the change in 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 the "conventional example 2", the number of operation pixels changes with the shift, and the absolute position of one operation area of the two image signals changes depending on the positive or negative sign of the shift k. I haven't let it happen. Therefore, the two calculation areas are performed in units of one shift.

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

【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 the "conventional example 2", the arrows 12a, 1 of FIG.
This means that the correlation calculation is not performed in the calculation area itself shown in 2b. FIG. 14A is shown to explain the difference between the “conventional example 2” and other conventional examples. In the “conventional example 2”, since the “differential interpolation method” is actually used as the method for detecting the correlation extreme value, the calculation areas are shifted from each other by one pixel at a certain shift, as shown in FIG. Two operation area (15a, 15b) pairs and (16a, 16) separated by ± 1 shift about the shift
b) The correlation amount 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 subject image given as an example is originally shifted by 0.5 pixels, the correlation amount should take an extreme value at shift k = 0.5. As is clear from the figure, the correlation difference amount changes its sign at shifts k = 0 and k = 1, and the correlation difference amount is zero between shifts k = 0 and k = 1, that is, it is an original function. It means that there is a fractional shift amount that gives the extreme value of the correlation amount. Therefore, in the “conventional example” 2, two points of the correlation difference amount D (0) and D (1) are interpolated to obtain the shift amount kp where the correlation difference amount is expected to be zero. The interpolation method for obtaining the correlation extreme value in decimal units from the correlation difference amount between two points is disclosed in detail in "Prior art example 2", and therefore the description thereof is omitted here.

【0052】本出願人による「従来例4」で開示されて
いる像ずれ検知の方法は、相関極値の補間方法ならびに
シフト方法は、「従来例2」と同じ「微分補間法」、
「演算数可変シフト」であるが、演算子としては「大な
る値」あるいは「小なる値」を用いた手法である。
The image shift detection method disclosed in the "Prior art example 4" by the present applicant is the same as the "prior art example 2" in the "differential interpolation method" for the correlation extreme value interpolation method and the shift method.
Although it is a "variable number 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, which are obtained by plotting the correlation difference amounts according to the "conventional example 4".
(4) represents a case where "large value" is used as an operator, and correlation difference amounts F (-4) to F (4) represent a case where "small value" is used as an operator. The method of obtaining the correlation extreme value kp equal to or less than the shift unit may be the same as that in the "conventional example 2".

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

【0055】そこで「従来例2」のように「演算数可変
シフト」を使用する場合は、「微分補間法」と組み合
せ、図14(b)の如く差分演算を行なう2シフト離れ
た相関量の演算画素数を、各シフト毎に一定にしている
のである。
Therefore, in the case of using the "variable operation number shift" as in the "conventional example 2", it is combined with the "differential interpolation method" and the correlation amount of two shifts away is calculated by performing the difference operation as shown in FIG. 14B. The number of calculated pixels is 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)の「直接補間法」と組み
合わせて使用しない方が良い。
To summarize the conventional image shift detection methods described above, The correlation calculation operators are (1.1) "absolute value of difference" (conventional examples 1, 2, 3) (1.2) "large value (or small value)" (conventional example 4) 2 . As the interpolation method of the correlation extreme value, there are (2.1) “direct interpolation method” (conventional example 3) (2.2) “differential interpolation method” (conventional examples 1, 2, 4). The correlation calculation shift method includes (3.1) "mutual shift" (conventional example 5) (3.2) "one-sided image shift" (conventional example 3) (3.3) "calculation number variable shift" (conventional example) 2.4) However, it is better not to use the "variable number of arithmetic shifts" in (3.3) above in combination with the "direct interpolation method" in (2.1).

【0057】[0057]

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

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

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

【0060】また、光学系のゴーストのような低周波ノ
イズが被写体像信号に混入した場合では、被写体にもよ
るが一般的には、相関極値の補間方法として相関差分量
から極値を求める「微分補間法」よりも、相関量から直
接極値を求める「直接補間法」の方が誤差が小さい傾向
がある。これは、補間演算に何点の相関量を使用してい
るか、が主因であると考えられる。「微分補間法」は2
点の相関差分量を用いて補間演算を行なっているが、差
分量は式(4)の如く2点の相関量から計算されるか
ら、実質的には4点の相関量を使用して補間演算を行な
っていることに他ならない。一方「直接補間法」では3
点の相関量を使用している。このため、ノイズによって
各シフト相関量が変動すると、より多数の相関量を使用
している「微分補間法」の方がノイズの影響を受け易い
ことになる。
When low frequency noise such as ghost of the optical system is mixed in the subject image signal, the extreme value is generally obtained from the correlation difference amount as an interpolating method of the correlation extreme value, although it depends on the subject. The error tends to be smaller in the “direct interpolation method” that directly obtains the extreme value from the correlation amount than in the “differential interpolation method”. The main reason for this is considered to be how many correlation amounts are used in the interpolation calculation. "Differential interpolation method" is 2
Although the interpolation calculation is performed using the correlation difference amount of the points, since the difference amount is calculated from the correlation amount of the two points as shown in Expression (4), the interpolation amount is practically used using the correlation amount of the four points. It is nothing but a calculation. On the other hand, in the "direct interpolation method", 3
The point correlation is used. Therefore, if each shift correlation amount changes 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 calculation,
It can be said that “mutual shift” is S / N disadvantageous as compared with other methods. In the case of "mutual shift", the correlation amount can be obtained only in units of 2 shifts as described above. In the other two methods, "single-image shift" and "variable operation number shift", one shift unit is obtained. Therefore, in the "mutual shift" interpolation calculation, the position of the correlation extremum to be obtained is calculated using the correlation amount at a shift that is farther away than other methods. It is easily expected that the error of the interpolation calculation will increase if the inter-coordinate distance of the correlation amount used for the interpolation calculation increases.

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

【0063】しかしながら、上述のそれぞれ好ましい手
続きを組み合わせた像ずれ検知方法は、正しい像ずれ量
を検出することができないのである。この組み合わせに
よる相関量のプロットを図19に示す。演算子としては
「大なる値(あるいは小なる値)」を、相関極値の補間
方法としては「直接補間法」を、シフト方法としては
「片像シフト」を用いている。被写体像信号はこれまで
の例と同様に、幾何学的エッジ像が0.5画素ずれた場
合を想定している。
However, the image shift detecting method in which the above-mentioned preferable procedures are combined cannot detect the correct image shift amount. FIG. 19 shows a plot of the correlation amount by this combination. "Large value (or small value)" is used as an operator, "direct interpolation method" is used as a correlation extreme value interpolation method, and "single-image shift" is used as a shift method. The subject image signal is assumed to be a case where the geometric edge image is displaced by 0.5 pixel, as in the above-described 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 A (-4) to A (4) are correlation amounts B (-4) to B (B).
(4) represents the 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 extreme value is not shown at the position of 0.5 pixel which is the original image shift amount, that is, the shift k = 0.5, which is correct. Image shift detection is impossible.

【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 as shown in FIG.
In the case of the geometrical bar pattern as shown in (b), correct image shift detection is possible even with the operator of "large value (or small value)". A plot of the correlation amount in this case is shown in FIG. It is shown in (b). Correlation amount A (-4) to A (4), correlation amount B (-4)
B (4) are the correlation amounts when the operator is the “large value” and the “small value”, respectively, and the object image is shifted by 0.5 pixels between the two images as in the previous examples. The case is assumed. In this case, 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 regardless of which of the above two correlation amounts is used.

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

【0067】そもそも相関関数というものは、2信号系
列が最も似ているシフト位置にて相関量が最小(あるい
は最大)となり、そのシフト位置から遠ざかるにつれて
相関量は増加(あるいは減少)する関数である。ところ
が、「大なる値」を演算子として、しかも1像の演算領
域を固定して、エッジ像のような「左右非対称」の像信
号の相関量を演算すると、シフトの符号が正の場合はシ
フトに応じてその相関量が変化するが、負の場合にはシ
フトを変えても相関量が変化しない、といった状況が発
生する。つまり、固定した方のニッジ像の輝度信号が作
る「包絡」の中に、もう1像のエッジ部分が入り込む
と、その状態で入り込んだ方の像をシフトしても、「大
なる値」の演算子は常に固定した方の像の包絡に沿った
一定の信号を抽出するだけで、相関量に変化が現れない
からである。
In the first place, 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 the “left-right asymmetric” image signal such as an edge image is calculated, when the shift sign is positive. A situation occurs in which the correlation amount changes according to the shift, but when the shift amount is negative, the correlation amount does not change even if the shift is changed. In other words, if the edge part of another image enters the "envelope" created by the luminance signal of the fixed nidge image, even if the image that entered is shifted in that state, "large value" This is because the operator always extracts 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", since the calculation area is constantly changing without fixing one image, the above condition does not occur. Therefore, regardless of the sign of the shift, the correlation amount depends on the shift. Changes, and it becomes possible to detect the correlation extreme value.

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

【0070】[0070]

【課題を解決するための手段】本発明は、前記した問題
の解消を目的をしており、相関演算に先だって、像ずれ
検出すべき被写体像信号を複製して2倍に拡大し、相関
演算では「相互シフト」で相関量を求めることによっ
て、S/N的にも優れた、精度の高い像ずれ検出を可能
とするものである。
SUMMARY OF THE INVENTION The present invention is intended to solve the above-mentioned problems, and prior to the correlation calculation, the object image signal to be subjected to the image shift detection is duplicated and doubled to perform the correlation calculation. Then, by obtaining the correlation amount by the "mutual shift", it is possible to detect the image shift with high accuracy and excellent S / N.

【0071】[0071]

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

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

【0073】図中10a,10bは図10におけるセン
サ列4a,4bの面上での2つの被写体像の強度分布を
示しており、この例では単純な幾何学的エッジ像が0.
5画素ずれた場合を表している。像信号系列の信号数は
8画素である。又、図中IA(0)〜IA(7)はセン
サ列4aの各画素出力を示し、IB(0)〜IB(7)
はセンサ4bの各画像出力を示している。
In the figure, 10a and 10b show the intensity distributions of two object images on the surfaces of the sensor arrays 4a and 4b in FIG. 10, and in this example, a simple geometric edge image is 0.
The figure shows the case where there is a shift of 5 pixels. The number of signals in the image signal series is 8 pixels. Further, in the figure, IA (0) to IA (7) indicate respective pixel outputs 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)とする、といった拡大操作
である。
To enlarge the image signal, each pixel signal of the image signal series 10a and 10b of FIG. 1A is duplicated and enlarged to double the number of signals, as shown in 11a and 11b of FIG. 1B, respectively. ,
The conversion is performed by converting into an image signal sequence having 16 signals. Specifically, the first pixel signal IA of the image signal series 10a
(0) is the first JA (0) and the second JA (0) of the image signal sequence 11a.
The 2nd pixel signal IA (1) of the image signal series 10a is the 3rd JA of the image signal series 11a.
(2) and the fourth JA (3) are the enlargement operations.

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

【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 calculation according to the present invention. The operator uses “large value (or small value)”. Correlation amount A (-
4) to A (4) and the correlation amounts B (−4) to B (4) are the correlation amounts when the operators are “large value” and “small value”, respectively.

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

【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 is a sensor drive circuit, and 60 is a microcomputer that controls the entire focus detection apparatus and performs signal processing. Microcomputer 6
The sensor drive circuit 50 is controlled by the control signals 61, 62, 63 output from 0, and the control signals 61, 62,
Sensor drive signals 51, 52, 53 generated from 63 are provided to the sensor device 40. The actual control of this area is not directly related to the present invention, and therefore detailed description thereof will be omitted.

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

【0083】焦点検出動作開始によってステップ(S1
00)の「焦点検出開始」ルーチンNコールされ、ステ
ップ(S101)にて前述の像信号の入力が実行され
る。図1(a)での像信号10aをIA(0)〜IA
(7),10bをIB(0)〜IーB(7)とする。
Step (S1
00) "focus detection start" routine N is called, and the input of the above-mentioned image signal is executed in step (S101). The image signal 10a in FIG. 1A is converted to IA (0) to IA
Let (7) and 10b be 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 step (S102) (S103), processing for expanding the image signal to double the signal amount is performed. The magnified image signals 11a and 11b shown in FIG. 1B are set to JA (0) to JA (15) and JB (0) to JB (1), respectively.
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) However, i = 0 to 7. (5) to (8) in IA
(I), IB (i) as JA (0) to JA (15), JB
(0) to JB (15). In addition, step (S1
02) represents a loop process for i, and formulas (5) to (8) are executed in step (S103) in the loop.

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

【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 correlation calculation in the equation (9) using the smaller value for each calculation range for each k value shown in FIG. 1 (b). That is, when k = -4, signals JA (0) to J (J)
For A (7) and signals JB (8) to JB (15), the smaller right value of JA (0) and JB (8) is set to J
The smaller value of A (1) and JB (9) is set to J
A (2) and JB (10) pair, 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) is selected, and a smaller value is selected from each pair of JA (7) and JB (15), and the addition value 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, signals JA (1) to JA (1) -J
For A (8) and signals JB (7) to JB (14), the addition value of the smaller values of the corresponding signals is COR (-.
3) is required. Also, when k = −2 to +4, the above COR (− is similarly set for each range shown in FIG. 1B.
2) to COR (+4) are required.

【0089】シフトkが−4から+4までの相関量CO
R(k)の計算が完了すると、ステップ(S106)〜
(S110)で相関極値の検出を行なっている。演算子
として「小なる値」を採用した場合、相関が最大のシフ
トにて相関量COR(k)は最大となるはずである。そ
のため、ステップ(S106)にてあらかじめ相関量の
最大値を格納する変数CORMAXに0を初期値として
与えておく。
Correlation amount CO from shift -4 to +4
When the calculation of R (k) is completed, step (S106)-
The correlation extreme value is detected in (S110). When “small value” is adopted as the operator, the correlation amount COR (k) should be maximized at the shift with the maximum correlation. Therefore, in step (S106), 0 is given as an initial value to the variable CORMAX which stores 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 the 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)より狭くしている。
"Maximum" and "greater than two points before and after" are used as the conditions for the extreme value search. Step (S
108), it is determined whether or not the correlation amount COR (k) is the maximum, and in step (S109), the COR (k) is set to the front or rear two.
It is determined whether or not the point correlation amounts are larger than COR (k-1) and COR (k + 1). Only when both conditions are satisfied, the process proceeds to step (S110), and 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 the extreme value shift kx. In order to perform the determination in the step (S109) of comparing the correlation amount with the values of two points before and after, the loop processing of the step (S107) is performed with k ranging from -3 to +3, and the shift range (corresponding to the actual correlation calculation) -4 to +
4) It is narrower than

【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, after setting CORMAX = 0 in S106, COR (-3) and CORMAX are compared in S108. Since COR (-3) = B (-3)> CORMAX, COR (-3) and CO are obtained in step S109.
The magnitude comparison between R (-4) and COR (-3) and COR (-2) is performed.

【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
Without executing step 10, k = -2 is set, 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 again the above steps S108 and S10.
9 is executed. As a result, COR (0) = B (0)> C
Since OR (-1) = B (-1), S1 in this case as well.
Instead of executing step 10, k = 0 is set and steps S108 and S109 are executed again. In this case, COR
(0) = B (0)> COR (-1) = B (-1) and COR (0) = B (0)> COR (1) = B
Since it is (1), step S110 is executed, and COR
Set COR (0) = B (0) as MAX, kx
Is set to 0, and then k = 1, and the above S is again set.
108 and S109 are executed. In the subsequent processing from k = 1 to 4, the conditions in steps 108 and 109 are not satisfied, so after performing processing with k = 4, step S11 is performed.
Go to 1.

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

【0096】補間方法としては、前述したように最大値
のシフトとその前後の計3点の相関量から補間を行う方
法を用いている。ここでは一例として、従来例3の方法
で補間演算を行ってみる。
As the interpolation method, the method of performing the interpolation from the maximum value shift and the correlation amount of a total of three points before and after the shift as described above 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 in which "small value" is calculated in 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
-1) ≤ COR (kx + 1) (Fig. 5 (a))
And COR (kx-1)> COR (kx1) (FIG. 5 (b)). CO as shown in FIG.
If R (kx−1) ≦ COR (kx + 1), then CO
The k-coordinate of a straight line passing through R (kx-1) and COR (kx) and the intersection of the straight line and the straight line passing through COR (kx + 1) with the opposite sign to COR (kx + 1) is set as an image shift amount kp of a small number or less. Through the above processing, the image shift amount kp which is 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 a straight line passing through R (kx + 1) and an intersection of the straight line and the straight line passing through COR (kx-1) with the opposite sign to kp is kp.
And The formula is 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) before and after it, COR (k
The image shift amount kp is obtained from (x + 1),
In addition to the method of interpolating kp with a straight line as shown in FIGS. 5A and 5B, the correlation amounts COR (kx−1) and COR (K
x) and COR (kx + 1) may be obtained as an extreme value of a quadratic function passing through three points.

【0102】図6は上記補間演算の他の例を示す説明図
で、図6では2次関数で像ずれ量kpを補間する例を表
している。
FIG. 6 is an explanatory view showing another example of the above-mentioned interpolation calculation, and 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.
Is given, a quadratic function COR (K) passing through the three points
= Ak 2 + bk + c coefficients are obtained, and the extrema of the quadratic function

【0104】[0104]

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

【0105】[0105]

【外7】 [Outside 7]

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

【0107】図4(b)のステップ(S204)〜(S
210)が図4(a)の(S104)〜(S110)に
相当している。両者の相違についてのみ説明すると、ス
テップ(S205)において相関量を計算する際に演算
子「大なる値」を用いている。「大なる値」を演算子と
すると、その相関量は相関最大で極小子とする。
Steps (S204) to (S) of 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 the “large value” is an operator, the correlation amount is the maximum and the minimum.

【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 a large value that the correlation amount cannot take may be stored.

【0109】ステップ(S208)、(S209)、
(S210)では、極値探索条件として、「最小」かつ
「前後2点より小さい」を条件としており、条件を満足
した場合に、ステップ(S210)にて、最小値変数C
ORMINとシフトkxを更新する。
Steps (S208), (S209),
In (S210), as the extreme value search condition, "minimum" and "smaller than two points before and after" are set. If the condition is satisfied, the minimum value variable C is set 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)が適用される。
Regarding the interpolation of the correlation extremum, the total is slightly different depending on whether the maximum value or the minimum value is calculated when interpolating with a straight line. That is, COR (kx
When −1) ≧ COR (kx + 1), the equation (10) is C
When OR (kx−1) <COR (kx + 1), the expression (1
1) applies.

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

【0112】ところで本発明は像信号系列の新号数を2
倍としたため、そのまま2倍の信号量で相関演算を行う
と、演算時間は従来よりも大幅に増大してしまう。
In the present invention, the new number of the image signal sequence is set to 2
Since the number of times is doubled, if the correlation calculation is performed with the doubled signal amount as it is, the calculation time is significantly increased as compared with the conventional case.

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

【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画ず
つ加えた領域である。
Arrow pairs (13a, 14a), (13 in FIG.
b and 14b) respectively indicate the correlation calculation areas corresponding to the arrows 12a and 12b in FIG. Originally, the magnified image signal series 11a and 11b are respectively the image signal series 10a and 10b.
It is generated from b. Therefore, the magnified image signal sequence 1
1a area 12a and magnified image signal sequence 11b area 12b
The correlation amount between the two is equal to the value obtained by adding the correlation amount between the region 13a of the original image signal sequence 10a and the region 13b of the original image signal sequence 10b to the correlation amount between the regions 14a and 14b. Then, in the even shift, the regions 13a and 14a are equal, and in the odd shift, the region 13a is a region obtained by adding one image at both ends of 14a.

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

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

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

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

【0119】図7から明らかなように、シフトkが偶数
か奇数かによって演算領域の設定方法が異なる。即ち、
シフトkが偶数の場合には、相関量COR(k)は
As is apparent from FIG. 7, the method of setting the calculation 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) is

【0120】[0120]

【外8】 となる。一方、シフトkが奇数の場合には、相関量CO
R(K)は、
[Outside 8] Becomes On the other hand, when the shift k is odd, 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)以降の相関極値の探索と
極値の補間を行えば良い。
In this way, if the correlation amount COR (k) with the shift k of −4 to +4 is obtained, then FIG.
It suffices to search for correlation extreme values and interpolate extreme values after the step (S106) in (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, but when “large value” is used as the operator, “Min” in the figure may be replaced with “Max”. In that case, steps (S206) to (S21) of FIG.
0) and step (S111) of FIG. 4A, the image shift amount kp can be obtained.

【0124】上記実施例では、「従来例6」で説明して
いるように、観測する被写体像が、いわゆるエッジ・パ
ターンのように全体的に平坦で部分的にのみ輝度変化が
あるような像では、相関演算の演算子として「差の絶対
値」を用いた像ずれ検知方法よりも、「大なる値(ある
いは小なる値)」を用いた方法の方がS/N的には有利
であるため、ここまでの説明では、演算子として「大な
る値(あるいは小なる値)」を用いてきた。しかし、
「差の絶対値」という演算子も、本発明の像ずれ検知手
法に対して適用可能である。
In the above-described embodiment, as described in "Conventional example 6", the observed object image is an image in which the image is so flat that there is only a partial change in luminance like an edge pattern. In terms of S / N, the method using "large value (or small value)" is more advantageous than the image shift detection method using "absolute value of difference" as the operator for correlation calculation. Therefore, in the above description, "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 "one-image shift" and "alternate shift", which are shift methods of correlation calculation, and therefore, the "difference of absolute value" of the present invention is intentionally used. It seems that it is not necessary to combine it with "mutual shift", but since "single image shift" fixes the calculation area of the reference portion of the image signal, it may be inconvenient depending on the observed object image. This is because in the "single image shift", the calculation area of the fixed reference image is changed from shift k = 2 to 3 and k = -2 to -3.
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で相関量の
連続性が損なわれると、少なからず誤差要因となり得
る。
When an object image with a 0.5 pixel shift as shown in FIG. 13 is targeted, kp = 0.5 can be interpolated as in the plot of the correlation amount in FIG. 16, and correct image shift detection is possible. Is. However, when the subject image is displaced by 2.5 pixels, shift k = 2,3,4 or k = 1,2,3
Since the correlation extremal value in decimal units is interpolated and calculated from the correlation amounts of the above three points, if the continuity of the correlation amount is lost at shifts k = 2 and k = 3, it may cause an error to some extent.

【0127】「従来例3」ではその辺りを考慮して、基
準像の1つの演算領域が受け持つシフト範囲が、他の演
算領域のシフト範囲と部分的に重なるようにしている。
それによって、補間演算に用いる3点の相関量は基準像
の演算領域が同じものが使用でき、3点の相関量の連続
性が保たれる。
In the "conventional example 3", in consideration of this, the shift range covered by one calculation area of the reference image partially overlaps with the shift ranges of the other calculation areas.
As a result, the correlation amount of the three points used for the interpolation calculation can be the same in the calculation region of the reference image, and the continuity of the correlation amount of the three points is 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, the device of "conventional example 3" is not necessary and the calculation time does not increase accordingly.

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

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

【0131】[0131]

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

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

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

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

【図3】本発明の焦点検出装置の回路ブロック図であ
る。
FIG. 3 is a circuit block diagram of a 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 extreme value detection of a correlation amount.

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

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

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

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

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

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

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

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

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

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

【図16】従来の相関演算結果の他の例を示す説明図で
ある。
FIG. 16 is an explanatory diagram showing another example of a conventional correlation calculation 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 the difference amount calculation result of the conventional correlation calculation.

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

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

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

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

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

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 光学系を介して第1と第2のセンサー列
上に光束を受光させ、各センサー列にて受光された光束
に対応した第1と第2の信号に対する相対変位量から光
学系の焦点状態を検出する焦点検出装置において、 各センサーを構成する複数の画素からの信号を複製して
2倍の信号量に拡大し、該拡大された第1と第2の信号
に対して相関演算を行なうことを特徴とする焦点検出装
置。
1. A light flux is received on a first and a second sensor array via an optical system, and an optical signal is obtained from a relative displacement amount with respect to the first and second signals corresponding to the light flux received by each sensor array. In a focus detection device for detecting the focus state of a system, the signals from a plurality of pixels forming each sensor are duplicated and expanded to a doubled signal amount, and the expanded first and second signals are A focus detection device characterized by performing a correlation calculation.
【請求項2】 前記相関演算は、第1と第2の信号にお
ける対応する信号の大なる値、あるいは対応する2信号
の小なる値を演算子とする相関演算であることを特徴と
する請求項1に記載の焦点検出装置。
2. The correlation calculation is a correlation calculation using a large value of corresponding signals in the first and second signals or a small value of corresponding two signals as an operator. The focus detection device according to item 1.
【請求項3】 前記相関演算は、第1と第2の信号にお
ける対応する信号の差の絶対値を演算子とする相関演算
であることを特徴とする請求項1に記載の焦点検出装
置。
3. The focus detection apparatus according to claim 1, wherein the correlation calculation is a correlation calculation using an absolute value of a difference between corresponding signals in the first and second signals as an operator.
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 true JPH0527162A (en) 1993-02-05
JP3109865B2 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009151155A (en) * 2007-12-21 2009-07-09 Nikon Corp Focus detecting device, focus adjusting device and imaging apparatus
JP2014238452A (en) * 2013-06-06 2014-12-18 リコーイメージング株式会社 Automatic focus detection method and automatic focus detection device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009151155A (en) * 2007-12-21 2009-07-09 Nikon Corp Focus detecting device, focus adjusting device and imaging apparatus
JP2014238452A (en) * 2013-06-06 2014-12-18 リコーイメージング株式会社 Automatic focus detection method and automatic focus detection device

Also Published As

Publication number Publication date
JP3109865B2 (en) 2000-11-20

Similar Documents

Publication Publication Date Title
EP2579213B1 (en) Apparatus, method, program and recording medium for image processing
EP1654515B1 (en) Inclination angle detection device and inclination angle detection method
JP3491343B2 (en) Focus detection device and focus detection method
JP2013037166A (en) Focus detector, and lens device and imaging device having the same
US11410321B2 (en) Distance measuring camera
JPH0690357B2 (en) Deviation amount detector
EP1885132A2 (en) Interpolation frame generating method and interpolation frame generating apparatus
EP3770550A1 (en) Distance measurement camera
JP2009180778A (en) Focal point detecting device and imaging device
JPH0527162A (en) Focus detecting device
US5612763A (en) Focus detection device and method
JPH06250078A (en) Detecting device for focused state or distance of object
JPH0875997A (en) Focus detector
US5923773A (en) Measured value processing method, a shape reconstructing method, and a shape reconstructing apparatus
JP6648916B2 (en) Imaging device
EP0896301A1 (en) Stereoscopic image interpolating apparatus and method
JPH0527161A (en) Focus detecting device
JP2969642B2 (en) Focus detection device
JP2006024999A (en) Pixel interpolation method
US5667270A (en) Focus detecting device
JP2707569B2 (en) Focus detection device
JPH04338905A (en) Focus detection device
US6798988B2 (en) Rangefinder apparatus and camera equipped therewith
JP4053282B2 (en) Image processing apparatus and image processing method
JP2005128292A (en) Focus detector and camera

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