JPS6236206B2 - - Google Patents

Info

Publication number
JPS6236206B2
JPS6236206B2 JP54005270A JP527079A JPS6236206B2 JP S6236206 B2 JPS6236206 B2 JP S6236206B2 JP 54005270 A JP54005270 A JP 54005270A JP 527079 A JP527079 A JP 527079A JP S6236206 B2 JPS6236206 B2 JP S6236206B2
Authority
JP
Japan
Prior art keywords
focus detection
output
contrast
focus
correlation
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
Application number
JP54005270A
Other languages
Japanese (ja)
Other versions
JPS5598710A (en
Inventor
Takeshi Utagawa
Akira Ogasawara
Hiroshi Shirasu
Kunihisa Hoshino
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nikon Corp
Original Assignee
Nippon Kogaku KK
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 Nippon Kogaku KK filed Critical Nippon Kogaku KK
Priority to JP527079A priority Critical patent/JPS5598710A/en
Priority to US06/112,350 priority patent/US4336450A/en
Priority to DE19803001767 priority patent/DE3001767A1/en
Publication of JPS5598710A publication Critical patent/JPS5598710A/en
Publication of JPS6236206B2 publication Critical patent/JPS6236206B2/ja
Granted legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 本発明は、対物レンズ(結像光学系)の合焦状
態を検出する焦点検出装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a focus detection device that detects the in-focus state of an objective lens (imaging optical system).

従来この種の装置としては、対物レンズの空間
的に異なる部分を通過した2光束による一対の光
像を一対の光電素子アレイ上にそれぞれ導き、こ
の一対の光電素子アレイ出力を比較処理して合焦
状態を検出する方法がいろいろ提案されている。
Conventionally, this type of device guides a pair of optical images formed by two light beams that have passed through spatially different parts of an objective lens onto a pair of photoelectric element arrays, compares and processes the outputs of the pair of photoelectric element arrays, and then synthesizes the images. Various methods have been proposed to detect the focused state.

例えば、上記一対の光電素子アレイ出力の差出
力の総和、およびコントラストを用いて合焦状態
を検出する方法が特開昭52―142512号に記載され
ている。この従来例では、上記一対の光像の相対
的偏倚が焦点合致状態により変わることと、焦点
合致時にはコントラストが最大となることを利用
して焦点検出装置について述べている。この方法
によれば、(特開昭52―142512号の第5図に示さ
れるように)検出出力曲線h3が焦点合致位置にお
いて鋭く立上り、そして閾値εを設定して焦点
合致範囲を定めている。
For example, Japanese Patent Application Laid-Open No. 142512/1983 describes a method of detecting the in-focus state using the sum of the differential outputs of the pair of photoelectric element array outputs and the contrast. In this conventional example, a focus detection device is described by taking advantage of the fact that the relative deviation of the pair of optical images changes depending on the in-focus state, and that the contrast is maximum when the images are in focus. According to this method, the detection output curve h 3 rises sharply at the in-focus position (as shown in FIG. 5 of JP-A-52-142512), and the in-focus range is determined by setting the threshold value ε 0 . ing.

しかしながら、この従来例では、この検出出力
曲線がコントラストに影響をうけているために、
特定の被写体については適正に機能するが、例え
ば被写体のコントラスト量の異なるものでは、こ
の検出出力曲線h3のレベルが変化(即ち第5図上
の縦軸方向にずれる)してしまうために、閾値ε
を一定としたのでは良好な結果が得られない欠
点がある。また、この従来例の演算処理では、合
焦位置および合焦近傍の判断はできても、前ピ
ン、後ピンのような像ずれ方向やずれ量を判別す
ることはできない欠点がある。
However, in this conventional example, since this detection output curve is affected by contrast,
Although it functions properly for a specific subject, for example, when the subject has a different amount of contrast, the level of this detection output curve h3 changes (that is, shifts in the vertical axis direction in Fig. 5). threshold ε
If 0 is kept constant, there is a drawback that good results cannot be obtained. Furthermore, although the arithmetic processing of this conventional example can determine the in-focus position and the vicinity of the in-focus state, it has a drawback that it cannot determine the direction or amount of image shift, such as front focus or back focus.

本発明は、これらの欠点を解決し、被写体のコ
ントラストに影響されない安定した焦点検出装置
を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to solve these drawbacks and provide a stable focus detection device that is not affected by the contrast of a subject.

本発明では上記目的を達成するために、像の鮮
明度を示すコントラスト量信号を算出するコント
ラスト演算手段と、2像の相対的変位に応じて変
わる相関量信号を出力する相関演算手段とを設
け、さらにコントラスト量信号を第1所定レベル
と比較する第1判定手段と、相関量信号を前記コ
ントラスト量信号の影響が除去された形で第2所
定レベルと比較する第2判定手段とを備えた焦点
検出装置を構成して、そして、コントラスト量信
号と第1所定レベルとを比較することにより、合
焦されるべき被写体像の鮮明度が焦点検出に必要
な量であることを保証し、被写体のコントラスト
が著しく低いことで多分に誤差が含まれた焦点検
出演算の検出信号(即ち不確かな検出信号)を、
事前に知ることができ対処できる効果を得、さら
に相関量信号を前記コントラスト量信号の影響が
除去された形で第2所定レベルと比較することに
より、被写体像のコントラストによつて影響され
ることなく、焦点検出演算で得られた信号が有効
である範囲を適切に識別できる効果を得ている。
In order to achieve the above object, the present invention is provided with a contrast calculation means for calculating a contrast amount signal indicating the sharpness of an image, and a correlation calculation means for outputting a correlation amount signal that changes depending on the relative displacement of two images. , further comprising first determining means for comparing the contrast amount signal with a first predetermined level, and second determining means for comparing the correlation amount signal with a second predetermined level in a form in which the influence of the contrast amount signal is removed. The focus detection device is configured to ensure that the sharpness of the image of the object to be focused is the amount necessary for focus detection by comparing the contrast amount signal with the first predetermined level; The detection signal of the focus detection calculation that contains many errors due to the extremely low contrast of the image (that is, the uncertain detection signal) is
An effect that can be known in advance and can be dealt with is obtained, and further, by comparing the correlation amount signal with a second predetermined level in a form in which the influence of the contrast amount signal is removed, it is possible to eliminate the influence of the contrast of the subject image. The effect is that the range in which the signal obtained by the focus detection calculation is valid can be appropriately identified.

またさらに、本発明の実施例では、焦点検出演
算により、2像のずれ量およびずれ方向を検出
し、少なくとも2像合致の近傍では高精度に検出
できるように構成されている。
Furthermore, in the embodiment of the present invention, the amount and direction of deviation between the two images are detected by focus detection calculation, and the detection can be performed with high precision at least in the vicinity of the coincidence of the two images.

第1図において、対物レンズ1の固定焦点面又
はそれと共役な面にフイールドレンズ2が設けら
れている。カメラでは、固定焦点面にはフイルム
が配置されるので、このフイールドレンズ2は対
物レンズ1の光路を分路し、その分路した光路中
に設けることになる。再結像レンズ3,4に関し
てフイールドレンズ2すなわち、レンズ1の固定
焦点面と共役な位置にそれぞれ光電素子アレイ
5,6が設けられている。この例では、各アレイ
5,6は8つの光電素子P1〜P8、P1′〜P8′から構
成されている。対物レンズが合焦すべき物体に、
合焦された場合、対物レンズ1と再結像レンズ
3,4によつてそれぞれ光電素子アレイ5,6上
に形成される物体の光像と、対応するアレイ5,
6と、の位置関係が同一となるように、再結像レ
ンズ3,4、アレイ5,6の位置関係等が定めら
れている。従つて、合焦状態のとき、1対のアレ
イ56の位置的に対応する光電素子P1とP1′……
P8とP8′への入射光強度は等しくなる。また、対
物レンズ1による物体の像がフイールドレンズ2
の前方に形成された時(前ピンのとき)アレイ5
上の像は下方へ、他方アレイ6上の像は上方へ移
動する。逆に、対物レンズ1による像がフイール
ドレンズ2の後方に形成された時(後ピンの
時)、アレイ5,6上の像はそれぞれ前ピンのと
きと逆方向へ移動する。アレイ5の各光電素子P1
〜P8の光電出力はそれぞれ線型増幅されまたは、
対物増幅されたりして、その光電出力に関連した
電気出力υ〜υとしてアレイ5の出力端子5
a〜5hより出力される。アレイ6の光電素子
P1′〜P8′の光電出力も同様であつて関連電気出力
υ1′〜υ8′が、出力端子6a〜6hより出力され
る。
In FIG. 1, a field lens 2 is provided on a fixed focal plane of an objective lens 1 or a plane conjugate thereto. In a camera, a film is placed on a fixed focal plane, so the field lens 2 shunts the optical path of the objective lens 1 and is provided in the shunted optical path. Regarding the re-imaging lenses 3 and 4, photoelectric element arrays 5 and 6 are provided at positions conjugate with the fixed focal plane of the field lens 2, that is, the lens 1, respectively. In this example, each array 5, 6 consists of eight photoelectric elements P1 to P8 , P1 ' to P8 '. On the object that the objective lens should focus on,
When focused, the optical image of the object formed by the objective lens 1 and the reimaging lenses 3, 4 on the photoelectric element arrays 5, 6, respectively, and the corresponding array 5,
The positional relationship between the re-imaging lenses 3 and 4 and the arrays 5 and 6 is determined so that the positional relationship between the re-imaging lenses 3 and 4 and the arrays 5 and 6 is the same. Therefore, in the focused state, a pair of positionally corresponding photoelectric elements P 1 and P 1 ' of the array 56...
The intensities of light incident on P 8 and P 8 ′ are equal. Also, the image of the object formed by the objective lens 1 is transmitted to the field lens 2.
When formed in front of (front pin) array 5
The upper image moves downwards, while the image on array 6 moves upwards. Conversely, when the image by the objective lens 1 is formed behind the field lens 2 (rear focus), the images on the arrays 5 and 6 move in the opposite direction to the front focus. Each photoelectric element P 1 of array 5
The photoelectric output of ~ P8 is linearly amplified or, respectively,
The output terminal 5 of the array 5 is objectively amplified and the electrical output υ 1 to υ 8 related to the photoelectric output is
Output from a to 5h. Photoelectric element of array 6
The photoelectric outputs of P 1 ′ to P 8 ′ are similar, and the related electrical outputs υ 1 ′ to υ 8 ′ are outputted from the output terminals 6a to 6h.

次にこの関連電気出力υ〜υ、υ1′〜υ
8′の処理を説明する。第2図において空間周波数
成分抽出回路7は、アレイ5上の光像の特定の第
1空間周波数成分を表わす第1電気信号V1と、
その1/2の空間周期の空間周波数成分を表わす第
2電気信号V2とを、上記関連電気出力υ〜υ
から抽出する。第2空間周波数成分は第1空間
周波数成分と異なる空間周期を持つものであれば
よく、上記例に限るものではない。この第1電気
信号V1はアレイ5上の光像が、素子の配列方向
に変位した時、その変位に応じて、一定の関係で
変化する位相情報φと、その抽出空間周波数成
分の大きさを表わす大きさ情報γとを含む。第
2電気信号も同様で、位相情報φと大きさ情報
γを含む。他方の空間周波数成分抽出回路8
は、回路7と同一のもので、アレイ6の関連電気
出力υ1′〜υ8′から、そのアレイ上の光像の第
1、第2空間周波数成分を抽出しそれらをそれぞ
れ表わす第1、第2電気信号を作る。この第1、
第2電気信号はそれぞれ位相情報φ1′,φ2′大き
さ情報γ1′,γ2′を含む。
Next, this related electrical output υ 1 ~ υ 8 , υ 1 ′ ~ υ
8 ′ processing will be explained. In FIG. 2, the spatial frequency component extraction circuit 7 generates a first electrical signal V 1 representing a specific first spatial frequency component of the optical image on the array 5;
A second electric signal V 2 representing a spatial frequency component with a spatial period of 1/2 of the above-mentioned related electric output υ 1 to υ
Extract from 8 . The second spatial frequency component may have a spatial period different from the first spatial frequency component, and is not limited to the above example. When the optical image on the array 5 is displaced in the arrangement direction of the elements, this first electric signal V 1 contains phase information φ 1 that changes in a fixed relationship according to the displacement, and the magnitude of the extracted spatial frequency component. size information γ1 representing the size. The second electric signal is similar and includes phase information φ 2 and magnitude information γ 2 . The other spatial frequency component extraction circuit 8
is the same as the circuit 7, and extracts the first and second spatial frequency components of the optical image on the array 6 from the associated electrical outputs υ 1 ′ to υ 8 ′ and represents them respectively. Create a second electrical signal. This first,
The second electrical signals include phase information φ 1 ′, φ 2 ′ and magnitude information γ 1 ′, γ 2 ′, respectively.

この抽出回路の原理を第3図により説明する。
同図において、光電素子P1〜P8の関連電気出力υ
〜υはベクトル化回路9によつて、順次それ
ぞれ2π/8位相のずれたベクトルexp(i2π×0/8
)、 exp(i2π×1/8)……exp(i2π×7/8)が乗ぜら
れ、 ベクトルに変換される。加算回路10はベクトル
化回路9の出力を加算する。従つて加算回路10
の出力Vは以下の如くなる。
The principle of this extraction circuit will be explained with reference to FIG.
In the same figure, the associated electrical outputs υ of photoelectric elements P 1 to P 8
The vectorization circuit 9 sequentially converts 1 to υ 8 into vectors exp (i2π×0/8
), exp(i2π×1/8)...multiplyed by exp(i2π×7/8) and converted to a vector. Addition circuit 10 adds the outputs of vectorization circuit 9. Therefore, the adder circuit 10
The output V is as follows.

この出力υはアレイの光電素子P1〜P8の配列
方向の空間長さdを空間周期とする空間周波数成
分の情報を含むことになる。この出力Vは特願昭
第53―12144号において証明した如くアレイ上の
光像が変位するとその位相φが、変化する。ま
た、出力Vの大きさγは光像中の抽出した空間周
波数成分の大きさを表わす。
This output υ 1 includes information of a spatial frequency component whose spatial period is the spatial length d in the arrangement direction of the photoelectric elements P 1 to P 8 of the array. As demonstrated in Japanese Patent Application No. 53-12144, the phase φ of this output V changes when the optical image on the array is displaced. Further, the magnitude γ of the output V represents the magnitude of the extracted spatial frequency component in the optical image.

前述の出力Vを第1電気信号とするとそれとは
異なつた空間周期の空間周波数成分に関する第2
電気信号を求めるには、次の如くすればよい。ベ
クトル化回路9において、関連電気出力υ〜υ
、υ〜υに、ベクトルexP(i2π×0/4)〜 exP(i2π×3/4)をそれぞれ乗することにより、4 つの光電素子の長さd/2と等しい周期の空間周
波数成分が得られる。
If the above-mentioned output V is the first electrical signal, the second electrical signal regarding the spatial frequency component with a different spatial period is
To obtain the electrical signal, proceed as follows. In the vectorization circuit 9, the related electrical outputs υ 1 to υ
By multiplying 4 , υ 5 to υ 8 by vectors exP (i2π x 0/4) to exP (i2π x 3/4), respectively, the spatial frequency with a period equal to the length d/2 of the four photoelectric elements is obtained. ingredients are obtained.

アレイ5,6と空間周波数抽出回路7,8の具
体的回路例を第4図、第5図に示す。
Specific circuit examples of the arrays 5 and 6 and the spatial frequency extraction circuits 7 and 8 are shown in FIGS. 4 and 5.

第4図において、アレイ5,6のフオトダイオ
ードP1〜P8、P1′〜P8′の光電流は、演算増幅器と
その帰還トランジスタ.ダイオードからなる対数
変換回路12a〜12h、13a〜13hによつ
て入射光強度の対数に比例した関連電気出力υ
〜υ、υ1′〜υ8′に変換される。なお、図では
対数変換回路12b〜12h、13a〜13hの
帰還トランジスタとダイオードを示していない。
回路15は関連電気出力υ〜υ、υ1′〜υ
8′の平均値が零となるように帰還をかけている。
この平均値を零にすることはベクトル化回路によ
つて掛けられるベクトルの値の誤差、具体的には
左動増幅器16〜23の入力抵抗などの誤差の影
響を小さくするためである。
In FIG. 4, the photocurrents of the photodiodes P 1 to P 8 and P 1 ' to P 8 ' of the arrays 5 and 6 flow through the operational amplifier and its feedback transistor. A related electric output υ 1 proportional to the logarithm of the incident light intensity is generated by the logarithmic conversion circuits 12a to 12h, 13a to 13h consisting of diodes.
〜υ 8 , υ 1 ′〜υ 8 ′. Note that the feedback transistors and diodes of the logarithmic conversion circuits 12b to 12h and 13a to 13h are not shown in the figure.
The circuit 15 has associated electrical outputs υ 1 to υ 8 , υ 1 ′ to υ
Feedback is applied so that the average value of 8 ' becomes zero.
The purpose of setting this average value to zero is to reduce the influence of errors in the value of the vector multiplied by the vectorization circuit, specifically, errors in the input resistances of the left-hand amplifiers 16 to 23.

次に、抽出回路を示す第5図において端子5a
〜5h、6a〜6hはそれぞれ第4図の同一符号
の端子5a〜5h、6a〜6hに接続されるベク
トル化回路は関連電気出力υ〜υ、υ1′〜υ
8′にベクトルexP(i2π×0/8)〜exP(i2π×7/
8)を そのx成分とy成分の形で乗ずるものである。差
動増幅器16は、上述のベクトルのn成分を、関
連電気出力υ〜υに乗じ加算するもので、
各々の入力抵抗の値は乗ずべきx成分の逆数に比
例したものとなつている。こうして差動増幅器1
6の出力は空間周期dの空間周波数成分に関する
第1電気信号V1のx成分となる。
Next, in FIG. 5 showing the extraction circuit, terminal 5a
~5h, 6a~6h are vectoring circuits connected to terminals 5a ~ 5h, 6a ~ 6h with the same symbols in FIG.
8 ′ is the vector exP(i2π×0/8) ~ exP(i2π×7/
8) in the form of its x and y components. The differential amplifier 16 multiplies and adds the n components of the above-mentioned vector to the related electrical outputs υ 1 to υ 8 .
The value of each input resistance is proportional to the reciprocal of the x component to be multiplied. Thus the differential amplifier 1
The output of 6 becomes the x component of the first electrical signal V 1 regarding the spatial frequency component of the spatial period d.

差動増幅器17は上述のベクトルのy成分を関
連電気出力υ〜υに乗じそれを加算するもの
である。この出力は第1電気信号V1のy成分に
相当する。また、差動増幅器18,19は、アレ
イ6の関連電気出力υ1′〜υ8′について、増幅器
17,18と全く同様にして第1電気出力V1′の
x成分、y成分を作り出す。また、差動増幅器2
0,21は、アレイ5についてd/2の空間周期
の空間周波数成分に関する第2電気信号V2のx
成分、y成分をそれぞれ出力し、差動増幅器2
2,23はアレイ6について、第2電気信号
V2′のx成分、y成分をそれぞれ出力する。
The differential amplifier 17 multiplies the related electrical outputs υ 1 to υ 8 by the y component of the vector described above and adds the results. This output corresponds to the y component of the first electrical signal V1 . Also, the differential amplifiers 18 and 19 produce the x and y components of the first electrical output V 1 ' in exactly the same way as the amplifiers 17 and 18 for the associated electrical outputs υ 1 ' to υ 8 ' of the array 6. Also, the differential amplifier 2
0,21 is x of the second electrical signal V 2 with respect to the spatial frequency component of a spatial period of d/2 for the array 5
component and y component, respectively, and outputs the differential amplifier 2.
2 and 23 are second electrical signals for array 6;
The x and y components of V 2 ' are output respectively.

乗算器24,26,28,30は、差動増幅器
16,18,20,22の出力に回路32からの
交流出力coswtを乗じ、乗算器25,27,2
9,31は、差動増幅器17,19,21,23
の出力に回路32からの交流出力sinwtを乗ず
る。加算器33,34、35,36はそれぞれ乗
算器24と25,26と27,28と29,30
と31の出力を加算する。これらの加算器33,
34,35,36の交流出力がそれぞれ第1電気
信号V1,V1′、第2電気信号V2,V2′に相当しそれ
らの位相が前記位相φ、φ1′、φ、φ2′であ
り、それらの出力を整流回路37,38,39,
40によつて整流したものがそれぞれ前記大きさ
情報γ、γ1′、γ、γ2′となる。
Multipliers 24, 26, 28, 30 multiply the outputs of differential amplifiers 16, 18, 20, 22 by the AC output coswt from circuit 32, and multipliers 25, 27, 2
9, 31 are differential amplifiers 17, 19, 21, 23
The output of is multiplied by the AC output sinwt from the circuit 32. Adders 33, 34, 35, 36 are multipliers 24, 25, 26, 27, 28, 29, 30, respectively.
and the output of 31 are added. These adders 33,
The AC outputs of 34, 35, and 36 correspond to the first electrical signals V 1 , V 1 ′ and the second electrical signals V 2 , V 2 ′, respectively, and their phases are the above-mentioned phases φ 1 , φ 1 , φ 2 , φ 2 ', and their outputs are connected to rectifier circuits 37, 38, 39,
40 becomes the size information γ 1 , γ 1 ′, γ 2 , and γ 2 ′, respectively.

再び第2図において、こうして得た空間周波数
成分抽出回路7,8の第1電気信号V1,V1′の位
相差φ―φ1′は、第6図aに示す如く対物レン
ズが合焦位置にあるとき零となり、前ピン位置で
は例えば正となり、後ピン位置では負となり、そ
の差の大きさは合焦位置からのすれ量に応じて大
きくなる。
Again in FIG. 2, the phase difference φ 1 −φ 1 ′ between the first electric signals V 1 and V 1 ′ of the spatial frequency component extraction circuits 7 and 8 obtained in this way is determined by the fact that the objective lens is aligned as shown in FIG. 6 a. It is zero at the focused position, positive at the front focused position, and negative at the rear focused position, and the magnitude of the difference increases depending on the amount of deviation from the focused position.

第2電気信号V2,V2′の位相差φ―φ2′につ
いても第6図bに示す如く同様である。
The same holds true for the phase difference φ 22 ' between the second electrical signals V 2 and V 2 ', as shown in FIG. 6b.

例えば第2電気信号V2,V2′が前述した説明の
とおり4画素で一周期をなしており、したがつて
1画素の幅は90゜の位相差に相当している。第7
図に示したような位相差検出回路は、この90゜の
位相差を容易に数十分割できるので、Φ―Φ
2′の信号を用いれば1画素幅の数十分の1以上の
相対的変位の検出が可能であり、高い検出精度を
有する。
For example, the second electrical signals V 2 and V 2 ' form one cycle of four pixels as explained above, and therefore the width of one pixel corresponds to a phase difference of 90°. 7th
The phase difference detection circuit shown in the figure can easily divide this 90° phase difference into several tenths, so Φ 2 - Φ
If a signal of 2 ' is used, it is possible to detect a relative displacement of more than a few tenths of a pixel width, and the detection accuracy is high.

即ち、第6図に示すように、その有効適用範囲
が2像の合致する状態の近傍に限られてはいる
が、2像の変位を方向も含めて精度よく検出でき
る焦点検出演算を行う。
That is, as shown in FIG. 6, focus detection calculation is performed that can accurately detect the displacement of the two images, including the direction, although the effective range of application is limited to the vicinity of the state where the two images match.

次に検出精度は粗いが2像の合致する状態の近
傍を他の状態から識別する方法に関して以下に詳
述する。この目的を達成するために本発明では2
像の相対的変位に関して相関量信号を出力する相
関演算手段と、像の鮮明度を示すコントラスト量
信号を出力するコントラスト演算手段とを設け、
相関量信号をコントラスト量信号で規格化した規
格相関出力を作成し、これを所定の閾値と比較す
ることで、どんな被写体に対しても有効に2像の
合致位置の近傍を識別する方法を用いる。この処
理を行うのが第2図相関検出部41である。とこ
ろが第6図a,bから明らかなように、合焦位置
から大きく前ピン又は後ピン位置へずれた場合に
も位相差φ―φ1′、φ―φ2′が零となつてし
まうので、この位相差のみから、合焦検出を行う
と誤つてしまう恐れがある。これを防止するため
に、対物レンズが合焦位置近傍であることを検出
する相関検出部41が設けられている。この相関
検出部41は、規格相関関数 を算出する。この規格相関関数1の分子は、物体
の輝度分布がほぼ一様であるとき小さくなり、そ
れに応じて分母も小さくなるので、この規格相関
関数は輝度分布に無関係に、対物レンズの焦点位
置に依存するような規格化されたものとなつてい
る。この規格相関関数の分子は、一対の光像に
関する相互相関関数を表し、分母は、光像の自己
相関関数すなわち光像のコントラスト(鮮明度)
を表している。詳述すると合焦位置のときυi=
υ′iであるから分子が零となり、=0とな
り、アレイ5上の像がアレイ6上の像に対して相
対的に光電素子1個分ずれているような後ピン又
は前ピンのとき物体の輝度分布に無関係にυ2′=
υ,υ3′=υ,…υ8′=υ又はυ=υ
1′,υ=υ2′…υ=υ7′がそれぞれ成立する
ので、=1となる。
Next, although the detection accuracy is rough, a method for identifying the vicinity of the state where the two images match from other states will be described in detail below. In order to achieve this purpose, the present invention provides two
Correlation calculation means for outputting a correlation amount signal regarding the relative displacement of the image, and contrast calculation means for outputting a contrast amount signal indicating the sharpness of the image,
By creating a standard correlation output by normalizing the correlation amount signal with the contrast amount signal and comparing this with a predetermined threshold, a method is used to effectively identify the vicinity of the matching position of two images for any subject. . The correlation detection unit 41 in FIG. 2 performs this process. However, as is clear from FIGS. 6a and 6b, the phase differences φ 1 - φ 1 ' and φ 2 - φ 2 ' become zero even when there is a large shift from the in-focus position to the front focus or rear focus position. Therefore, if focus detection is performed only from this phase difference, there is a risk of errors. In order to prevent this, a correlation detection section 41 is provided that detects that the objective lens is near the in-focus position. This correlation detection section 41 uses a standard correlation function Calculate. The numerator of this standard correlation function 1 becomes small when the brightness distribution of the object is almost uniform, and the denominator also becomes small accordingly, so this standard correlation function is independent of the brightness distribution and depends on the focal position of the objective lens. It has become standardized. The numerator of this standard correlation function represents the cross-correlation function for a pair of optical images, and the denominator is the autocorrelation function of the optical images, that is, the contrast (sharpness) of the optical images.
represents. To explain in detail, at the in-focus position, υi=
Since υ′i, the numerator becomes zero and = 0, and the object is in the rear focus or front focus such that the image on array 5 is shifted by one photoelectric element relative to the image on array 6. υ 2 ′= regardless of the luminance distribution of
υ 1 , υ 3 ′=υ 2 ,…υ 8 ′=υ 7 or υ 2 = υ
1 ′, υ 3 = υ 2 ′…υ 8 = υ 7 ′ hold, so it becomes =1.

こうして、この規格相関関数は、第6図Cに
示すごとく最大相関のある位置αと像の相対変位
が±1画素に相当する位置β、γの三点で期格化
されている。即ち、±1画素前後の範囲が前記一
対の光像が合致する状態の近傍に対応する。もち
ろんこのような規格化された相関関数はこれに限
るものでなく、種々のものが考えられる。例え
ば、規格相関関数の分母は光像のコントラスト
に対応する量であれば何でも良く、この分母を空
間周波数成分の大きさ情報r1、r2、r3、r4の総和
で代用して、 でもよい。
In this way, this standard correlation function is standardized at three points: the position α where the correlation is maximum, and the positions β and γ where the relative displacement of the image corresponds to ±1 pixel, as shown in FIG. 6C. That is, the range of around ±1 pixel corresponds to the vicinity of the state where the pair of optical images match. Of course, such a standardized correlation function is not limited to this, and various other types can be considered. For example, the denominator of the standard correlation function can be any quantity as long as it corresponds to the contrast of the optical image, and by substituting this denominator with the sum of the magnitude information r 1 , r 2 , r 3 , r 4 of the spatial frequency components, But that's fine.

即ち、規格相関関数は2像の相関量をコント
ラストに対応する量で規格化したものである。
That is, the standard correlation function is obtained by normalizing the amount of correlation between two images by the amount corresponding to the contrast.

以上で精度は粗いが2像の合致する状態の近傍
を他の状態から識別する方法の説明を終え、第7
図に記載した実施例の回路に基づいて第2図の制
御部50の説明を行う。
This completes the explanation of the method of identifying the vicinity of the state where two images match, although the accuracy is rough, from other states, and the seventh
The control unit 50 in FIG. 2 will be explained based on the circuit of the embodiment shown in the figure.

比較器51は空間周期dの第1空間周波数成分
に関する大きさ情報γ,γ1′の和の1/2と、空
間周期d/2の第2空間周波数成分に関する大き
さ情報γ、γ2′の和とを比較し、前者が大きい
ときすなわち、光像中に第1空間周波数成分が多
く含まれているとき“H”レベルの出力を発生
し、位相φ、φ1′に関するFET52を導通状態に
する。他方、後者が大きいとき、“L”レベルの
出力を発生しインバータ53を介して、位相φ
、φ2′に関するFET54を導通にする。なお、こ
こで、γとγ1′の和を1/2倍したのは、第2空
間周波数成分に関する位相情報の方が、第1空間
周波数成分のものに比べ、精度が良いためであ
る。FET52がオンのときは交流信号φ、φ
1′が、他方FET54がオンのときは交流信号φ
φ2′がそれぞれ波形整形回路55によつて矩形波
に変換後、D―フリツプフロツプ56と排他的論
理和回路57に入力される。D―フリツプフロツ
プ56は両交流信号の位相差φ―φ1′又はφ
―φ2′の正負を判別する。前述した如く、この正
負は、前ピン又は後ピンを表わすことになる。排
他的論理和回路57は、上記位相差の絶対値すな
わち大きさを測定する。この大きさは、合焦位置
からのずれ量を表わす。従つて、フリツプフロツ
プ56の出力と回路57の出力により、合焦状
態、前ピン、後ピン及びその程度が分ることにな
る。
The comparator 51 receives 1/2 of the sum of magnitude information γ 1 , γ 1 ' regarding the first spatial frequency component with the spatial period d, and magnitude information γ 2 , γ regarding the second spatial frequency component with the spatial period d/2. 2 ', and when the former is large, that is, when the optical image contains many first spatial frequency components, an "H" level output is generated, and the FET52 regarding the phases φ 1 and φ 1 ' becomes conductive. On the other hand, when the latter is large, an "L" level output is generated and the phase φ
2. Make FET54 related to φ 2 ' conductive. Note that the reason why the sum of γ 1 and γ 1 ' is multiplied by 1/2 here is that the phase information regarding the second spatial frequency component is more accurate than that of the first spatial frequency component. . When FET52 is on, AC signals φ 1 and φ
1 ', and when the other FET54 is on, the AC signal φ 2 ,
Each of the waves φ 2 ' is converted into a rectangular wave by a waveform shaping circuit 55 and then inputted to a D-flip-flop 56 and an exclusive OR circuit 57. The D-flip-flop 56 adjusts the phase difference between the two AC signals φ 11 ' or φ 2
- Determine whether φ 2 ′ is positive or negative. As mentioned above, the positive and negative numbers represent the front pin or the rear pin. The exclusive OR circuit 57 measures the absolute value or magnitude of the phase difference. This size represents the amount of deviation from the in-focus position. Therefore, from the output of the flip-flop 56 and the output of the circuit 57, the in-focus state, front focus, rear focus, and the degree thereof can be determined.

比較器58は規格相関関数出力と基準レベル
1とを比較し、前者が低いとき“L”レベル
出力を発生する。この基準レベルV1は第6図
cに示す如く、相関関数出力がこのレベル以下
である範囲では、第6図a,bに示す如く、位相
差φ―φ1′、φ―φ2′が必ず正常な範囲l1、l2
にあることを保障するように選定されている。こ
うして、比較器58の出力が“L”レベルである
とき、対物レンズは合焦近傍にあり、D―フリツ
プフロツプ56の出力や排他的論理和回路57の
出力は正常な焦点検出信号であることが保障され
ている。
Comparator 58 compares the standard correlation function output with reference level V1 , and generates an "L" level output when the former is low. This reference level V 1 is as shown in FIG. 6c, and in the range where the correlation function output is below this level, the phase difference φ 11 ', φ 22 as shown in FIGS. 6a and b. ′ is always in the normal range l 1 , l 2
It has been selected to ensure that In this way, when the output of the comparator 58 is at the "L" level, the objective lens is near focus, and the output of the D-flip-flop 56 and the output of the exclusive OR circuit 57 are normal focus detection signals. Guaranteed.

その輝度分布がほとんど一様でアレイ5,6上
の光像が第1空間周波数成分や第2空間周波数成
分をほとんど含まない黒板の如き物体がある。こ
のような物体に関しては、位相差φ―φ1′、φ
―φ2′は、ノイズ等が大きく影響し、アレイ
5,6上の光像の相対位置の変化を忠実に表わす
ものでなくなつてしまう。従つて、この位相差は
対物レンズの正確な焦点検出信号ではなくなつて
しまう。そこで、このような第1、第2空間周波
数成分をほとんど含まない場合には当然、大きさ
情報γ、γ1′、γ、γ2′が小さくなつている
ので、比較回路60,61によつて情報γ、γ
1′が一定レベルV2以上か否かを検出し、同様
に比較回路62,63によつて情報γ、γ2′が
一定レベルV3以上か否かを検出し、ともに一
定レベル以上である場合のみにOR回路64の出
力を“L”レベルにする。すなわちこのOR回路
64の出力の“L”レベルはフリツプフロツプ5
6と回路57の出力とが正しいことを表わす。
There is an object such as a blackboard whose luminance distribution is almost uniform and the optical image on the arrays 5 and 6 contains almost no first spatial frequency component or second spatial frequency component. For such an object, the phase differences φ 1 −φ 1 ′, φ
22 ' is greatly affected by noise and the like, and no longer faithfully represents changes in the relative positions of the optical images on the arrays 5 and 6. Therefore, this phase difference is no longer an accurate focus detection signal for the objective lens. Therefore, when such first and second spatial frequency components are hardly included, the size information γ 1 , γ 1 ′, γ 2 , γ 2 ′ is naturally becoming smaller, so the comparator circuits 60 and 61 Information γ 1 , γ
1 ' is above a certain level V 2 , and similarly the comparison circuits 62 and 63 detect whether the information γ 2 and γ 2 ' are above a certain level V 3 , and both are above a certain level. The output of the OR circuit 64 is set to "L" level only in certain cases. That is, the "L" level of the output of this OR circuit 64 is the flip-flop 5.
6 and the output of circuit 57 are correct.

また、相関出力の分母が非常に小さい場合
は、相関出力は多分に誤差を多く含むので、こ
の場合は比較器58の出力を合焦近傍を表わす信
号として採用することは適当でない。そこで、比
較器65によつて、分母が一定レベルV4より
大きいか否かを検出する。そして比較器65は、
分母がV4より小さいとき“H”レベルとな
り、この“H”レベルは比較器58の合焦近傍か
否かを表わす出力が正しくないかもしれないこと
を意味する。そしてOR回路66はその出力が
“H”レベルのとき、位相差φ―φ1′、φ
φ2′か規格相関出力かの少なくとも一方が正し
くないことが表わされる。
Furthermore, if the denominator of the correlation output is very small, the correlation output will likely contain many errors, so in this case it is inappropriate to use the output of the comparator 58 as a signal representing the vicinity of focus. Therefore, the comparator 65 detects whether the denominator is greater than a certain level V4 . And the comparator 65 is
When the denominator is smaller than V4 , it becomes "H" level, and this "H" level means that the output of comparator 58 indicating whether or not the focus is near may be incorrect. When the output of the OR circuit 66 is at "H" level, the phase difference φ 11 ', φ 2 -
This indicates that at least one of φ 2 ' or the standard correlation output is incorrect.

本実施例では、検出精度を高めるために2つの
位相差φ―φ1′、φ―φ2′を作り出したが、
もちろん1つのみでもよい。
In this example, two phase differences φ 1 −φ 1 ′ and φ 2 −φ 2 ′ were created to improve detection accuracy.
Of course, there may be only one.

また、第4図の例は、フオトダイオードからの
出力は並列的に取り出す例であつたが、例えば、
時系列的に取り出す場合、フオトダイオードの電
荷積蓄時間を、γ+γ1′+γ+γ2′=一定と
なるようにAGCをかければ、単に相関出力Σ|
υo―υ′o|が規格されたものとなる。
Furthermore, in the example shown in Fig. 4, the outputs from the photodiodes are taken out in parallel, but for example,
When extracting data in time series, if AGC is applied so that the charge accumulation time of the photodiode becomes constant γ 1 + γ 1 ′ + γ 2 + γ 2 ′=constant, the correlation output Σ|
υ o −υ′ o | becomes standardized.

以上のように本発明によれば、コントラスト演
算手段のコントラスト量信号と第1所定レベルと
を比較することで、合焦されるべき被写体像が鮮
明度が焦点検出に必要な量あることを保証し、か
つ相関量信号が光像のコントラストに依存しない
形で第2所定レベルと比較することで、被写体像
の輝度分布によつて影響されることなく適正に2
像が合致する状態の近傍を他の状態から識別し、
この2像合致近傍において方向も含めて2像のず
れ量を精密に演算しており、前後ピンの判定が可
能で検出精度が高く、かつ被写体の如何を問わず
誤動作のない安定した焦点検出装置を得ることが
できる。
As described above, according to the present invention, by comparing the contrast amount signal of the contrast calculation means with the first predetermined level, it is guaranteed that the object image to be focused has the sharpness necessary for focus detection. By comparing the correlation amount signal with the second predetermined level in a manner that does not depend on the contrast of the optical image, the correlation amount signal can be properly adjusted to the second level without being affected by the brightness distribution of the subject image.
Identify the neighborhood of the state where the image matches from other states,
The amount of deviation between the two images, including the direction, is precisely calculated in the vicinity of the two images matching, making it possible to determine front and rear focus, with high detection accuracy, and a stable focus detection device that does not malfunction regardless of the subject. can be obtained.

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

第1図は本発明の一実施例の光学系の配置図、
第2図は一実施例の信号処理系のブロツク図、第
3図は空間周波数成分抽出回路の原理を示すブロ
ツク図、第4図は光電素子アレイの具体的回路例
を示す回路図、第5図は空間周波数成分抽出回路
の具体的回路例を示す回路図、第6図a,bはそ
れぞれ位相差出力のグラフで、第6図cは相関出
力のグラフである。第7図は制御部の具体的回路
例を示す回路図である。 主要部分の符号の説明、1……対物レンズ、
5,6……光電素子アレイ、7,8……空間周波
数成分抽出回路、41……相関検出部。
FIG. 1 is a layout diagram of an optical system according to an embodiment of the present invention.
FIG. 2 is a block diagram of a signal processing system according to an embodiment, FIG. 3 is a block diagram showing the principle of a spatial frequency component extraction circuit, FIG. 4 is a circuit diagram showing a specific example of a photoelectric element array, and FIG. The figure is a circuit diagram showing a specific circuit example of a spatial frequency component extraction circuit, FIGS. 6a and 6b are graphs of phase difference output, and FIG. 6c is a graph of correlation output. FIG. 7 is a circuit diagram showing a specific circuit example of the control section. Explanation of symbols of main parts, 1...Objective lens,
5, 6...Photoelectric element array, 7, 8...Spatial frequency component extraction circuit, 41...Correlation detection unit.

Claims (1)

【特許請求の範囲】 1 被写体の同一部分からの光がそれぞれ異なる
経路を介して視差を有する光学的開口を通り、該
光束から作られる一対の光像を光電変換する光電
変換手段と、 前記光電変換手段上の一対の光像の相対的変位
から焦点検出演算を行う焦点検出手段と、 前記光像の鮮明度を示すコントラスト量信号を
出力するコントラスト量演算手段と、 前記一対の光像の相対的変位に関連した相関量
信号を出力する相関演算手段と、 前記コントラスト演算手段のコントラスト量信
号が第1所定レベルを越えていることを判定する
第1判定手段と、 前記相関量信号が前記コントラスト信号の影響
を除去された形で第2所定レベルを越えているこ
とを判定する第2判定手段とを有し、 前記第1判定手段と前記第2判定手段との判定
結果が、それぞれ第1及び第2所定レベルを越え
ていれば、前記焦点検出演算が適正であると判定
することを特徴とする焦点検出装置。 2 前記焦点検出手段の焦点検出演算は、少なく
とも前記一対の光像が合致する状態の近傍では前
記相対的変位の大きさとその方向とを演算するこ
とを特徴とする特許請求の範囲第1項に記載の焦
点検出装置。
[Scope of Claims] 1. A photoelectric conversion means for photoelectrically converting a pair of optical images created from the light beams by allowing light from the same part of the subject to pass through an optical aperture having parallax through different paths, respectively; a focus detection means for performing focus detection calculation based on the relative displacement of the pair of light images on the conversion means; a contrast amount calculation means for outputting a contrast amount signal indicating the sharpness of the light image; correlation calculation means for outputting a correlation amount signal related to target displacement; first determination means for determining that the contrast amount signal of the contrast calculation means exceeds a first predetermined level; and a second determining means for determining that the signal exceeds a second predetermined level with the influence of the signal removed, and the determination results of the first determining means and the second determining means are respectively the first and second predetermined levels. and a second predetermined level, the focus detection calculation is determined to be appropriate. 2. According to claim 1, the focus detection calculation of the focus detection means calculates the magnitude and direction of the relative displacement at least in the vicinity of a state where the pair of optical images match. The focus detection device described.
JP527079A 1979-01-20 1979-01-20 Focus detector Granted JPS5598710A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP527079A JPS5598710A (en) 1979-01-20 1979-01-20 Focus detector
US06/112,350 US4336450A (en) 1979-01-20 1980-01-15 Focus detecting apparatus
DE19803001767 DE3001767A1 (en) 1979-01-20 1980-01-18 FOCUS DETECTOR

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP527079A JPS5598710A (en) 1979-01-20 1979-01-20 Focus detector

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP808986A Division JPS61209413A (en) 1986-01-20 1986-01-20 Focus detector

Publications (2)

Publication Number Publication Date
JPS5598710A JPS5598710A (en) 1980-07-28
JPS6236206B2 true JPS6236206B2 (en) 1987-08-06

Family

ID=11606529

Family Applications (1)

Application Number Title Priority Date Filing Date
JP527079A Granted JPS5598710A (en) 1979-01-20 1979-01-20 Focus detector

Country Status (1)

Country Link
JP (1) JPS5598710A (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4636624A (en) * 1983-01-10 1987-01-13 Minolta Camera Kabushiki Kaisha Focus detecting device for use with cameras
US5202555A (en) * 1983-01-10 1993-04-13 Minolta Camera Kabushiki Kaisha Focus detecting device for use with cameras with correlation and contrast detecting means
JPS60247210A (en) * 1984-05-22 1985-12-06 Minolta Camera Co Ltd Focus detector
JPH0727106B2 (en) * 1984-12-20 1995-03-29 株式会社ニコン Camera focus detector
JPS61209413A (en) * 1986-01-20 1986-09-17 Nippon Kogaku Kk <Nikon> Focus detector
JP2558377B2 (en) * 1990-07-03 1996-11-27 ミノルタ株式会社 Focus detection device
JPH0333708A (en) * 1990-07-03 1991-02-14 Minolta Camera Co Ltd Focus detector
JP6124564B2 (en) * 2012-11-21 2017-05-10 キヤノン株式会社 Focus detection apparatus and method, and imaging apparatus
JP2019061264A (en) * 2018-11-29 2019-04-18 株式会社ニコン Focus detector, camera, and electronic apparatus
JP2020166297A (en) * 2020-06-29 2020-10-08 株式会社ニコン Focus detector, camera, and electronic apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS52142512A (en) * 1976-05-22 1977-11-28 Asahi Optical Co Ltd Singleelens reflex camera focus detector

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS52142512A (en) * 1976-05-22 1977-11-28 Asahi Optical Co Ltd Singleelens reflex camera focus detector

Also Published As

Publication number Publication date
JPS5598710A (en) 1980-07-28

Similar Documents

Publication Publication Date Title
US10326927B2 (en) Distance information producing apparatus, image capturing apparatus, distance information producing method and storage medium storing distance information producing program
US7711201B2 (en) Method of and apparatus for generating a depth map utilized in autofocusing
US10455149B2 (en) Image processing apparatus, image processing apparatus control method, image pickup apparatus, and image pickup apparatus control method
US20070189750A1 (en) Method of and apparatus for simultaneously capturing and generating multiple blurred images
US10477100B2 (en) Distance calculation apparatus, imaging apparatus, and distance calculation method that include confidence calculation of distance information
US10600195B2 (en) Depth detection apparatus and depth detection method
US11347133B2 (en) Image capturing apparatus, image processing apparatus, control method, and storage medium
US9438887B2 (en) Depth measurement apparatus and controlling method thereof
US4336450A (en) Focus detecting apparatus
US4297571A (en) Focus detecting device
JPS6236206B2 (en)
JPH0328691B2 (en)
JPS6029716A (en) Signal processing method of focus detector
KR20160105322A (en) Focus position detection device, focus position detection method and a computer program for focus position detection
JP6173549B2 (en) Image data processing device, distance calculation device, imaging device, and image data processing method
JPH0328689B2 (en)
US10339665B2 (en) Positional shift amount calculation apparatus and imaging apparatus
JPS6236207B2 (en)
JPS6237364B2 (en)
JPH0443204B2 (en)
JP2016054506A (en) Imaging apparatus, histogram display method, program, and image processing apparatus
JPH04230715A (en) Focus detector
JP2017083401A (en) Distance detection device, imaging apparatus, and distance detection method
JPS6236208B2 (en)
JPS6159407A (en) Automatic focus adjusting device