JPS59155808A - Automatic focus detecting device - Google Patents

Automatic focus detecting device

Info

Publication number
JPS59155808A
JPS59155808A JP2859583A JP2859583A JPS59155808A JP S59155808 A JPS59155808 A JP S59155808A JP 2859583 A JP2859583 A JP 2859583A JP 2859583 A JP2859583 A JP 2859583A JP S59155808 A JPS59155808 A JP S59155808A
Authority
JP
Japan
Prior art keywords
image
pupil
image sensor
image data
focus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2859583A
Other languages
Japanese (ja)
Inventor
Yoshiaki Horikawa
嘉明 堀川
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.)
Olympus Corp
Original Assignee
Olympus Corp
Olympus Optical Co Ltd
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 Olympus Corp, Olympus Optical Co Ltd filed Critical Olympus Corp
Priority to JP2859583A priority Critical patent/JPS59155808A/en
Priority to DE3406578A priority patent/DE3406578C2/en
Publication of JPS59155808A publication Critical patent/JPS59155808A/en
Priority to US06/928,730 priority patent/US4740678A/en
Priority to US07/140,537 priority patent/US4833315A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B7/00Mountings, adjusting means, or light-tight connections, for optical elements
    • G02B7/28Systems for automatic generation of focusing signals
    • G02B7/34Systems for automatic generation of focusing signals using different areas in a pupil plane

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Optics & Photonics (AREA)
  • Focusing (AREA)
  • Automatic Focus Adjustment (AREA)

Abstract

PURPOSE:To raise remarkably detecting accuracy and a detecting speed by using an image sensor for covering the whole field of view, and executing a correlating operation by using only a part of a picture data obtained by its sensor. CONSTITUTION:A relay lens 60 for leading a light from a beam splitter 55 to a detecting optical system, a lens 60 for making a pupil, and a pupil splitter 62 placed at a position of a pupil made by the lens 61 are provided on a well- known microscope. Also, a light passing through an image forming lens 63 is made to form an image on an image sensor 65 through a filter 64. Also, a pupil splitter driving circuit 66 and a stage driving circuit 67 are provided, and controlled by a microcomputer 70. Moreover, an image sensor driving circuit 68, and an interface circuit 67 for inputting a picture data from the image sensor 65 to the microcomputer 70 are provided, an automatic focusing operation is executed, a focusing display and an impossibility display are executed by a console 71, and an operation of collelation and a decision of focusing, etc. are all executed by the microcomputer 70.

Description

【発明の詳細な説明】 れる自動焦点検出装置であって、異なる光路を通って形
成された二つの像を多数の素子を配列して成る光′亀変
換装(aにより個別に光電出力信号に変換し、該光′低
出力信号に基いて二つの像の相対位置関係を検出するこ
とによυ合焦検出を行うようにした自動焦点検出装置に
関するものである。
DETAILED DESCRIPTION OF THE INVENTION This is an automatic focus detection device that converts two images formed through different optical paths into photoelectric output signals by means of an optical converter (a), which is formed by arranging a large number of elements. This invention relates to an automatic focus detection device that performs focus detection by detecting the relative positional relationship between two images based on the optical low output signal.

この種従来の自動焦点検出装置には、三角測量を応用し
た距離計式のものや瞳を通る光束を分割して二つの像を
得る’r T L方式のものがあり、いずれも二つの像
の合致を検出するのに二つの像についてデジタル的に相
関を求め、その相関値の極値をもって合致となし且つそ
の合致まで二つの像の相対移@量をもって1象の位相差
量とするものであった。
Conventional automatic focus detection devices of this type include a rangefinder type that applies triangulation and a 'rTL type that divides the light flux passing through the pupil to obtain two images. To detect a match, the correlation is calculated digitally between the two images, and the extreme value of the correlation value is taken as a match, and the relative shift of the two images until the match is taken as the amount of phase difference of one image. Met.

第1図はその一例を示しており、図示し々いイメージセ
ンサ−により撮られた二つの像のデータA,Bはサンプ
ルホールド回路,A−D変換器(いずれも図示せず)等
を通ってリング状のシフトレジスタla,lbに夫々記
憶される。この例では画像データを128ビツト構成と
している。両画像データA,Bが夫々シフトレジスタl
a,lbに格納されると、続いて差の絶対値を求める回
路2によシ各ビット毎の差の絶対値が求められ、更に加
算器3によってそれらの和が求められて二つの像の相関
値となる。次に、クロックOLからのノぞルスによりシ
フトレジスタ1bの画像データBが1ビット分移動され
て再び回路2.加算器3により相関値が求められる。こ
のようにして、クロックOLにより次々と一方の画像デ
ータを移動させるたびに相関値が求められ、更にビーク
ディテクタ4によって相関値の極値が求められ、極値を
検出した位置が合焦位置となる。又、極値の場合のクロ
ック数がカウンタ5によって求められ、このクロック数
即ちシフトレジスタ1bの画像データBの移動量が二つ
の画像の位相差量となり、これからデフォーカスの方向
と量を知ることが出来る。
Figure 1 shows an example of this, in which data A and B of two images taken by an image sensor (not shown) are passed through a sample hold circuit, an A-D converter (none of which is shown), etc. The signals are stored in ring-shaped shift registers la and lb, respectively. In this example, the image data has a 128-bit configuration. Both image data A and B are transferred to shift register l.
When stored in a and lb, the absolute value of the difference for each bit is determined by the circuit 2 for determining the absolute value of the difference, and then the sum of these is determined by the adder 3, and the sum of the two images is calculated. It becomes a correlation value. Next, the image data B in the shift register 1b is shifted by one bit by a pulse from the clock OL, and the image data B in the shift register 1b is shifted again to the circuit 2. An adder 3 calculates a correlation value. In this way, a correlation value is determined each time one of the image data is successively moved by the clock OL, and the extreme value of the correlation value is determined by the beak detector 4, and the position where the extreme value is detected is determined as the in-focus position. Become. Further, the number of clocks in the case of an extreme value is obtained by the counter 5, and this number of clocks, that is, the amount of movement of the image data B in the shift register 1b becomes the amount of phase difference between the two images, and from this, the direction and amount of defocus can be known. I can do it.

ところが、この従来装置では、イメージセンサ−が一定
の大きさを有せざるを得ないためイメージセンサ−に写
る二つの像は単に位置がずれているだけでなく周辺部分
が異なったものとなり、その結果二つのシフトレジスタ
1.a、lbに記憶される画像データA、Bも単に位置
がずれているだけでなく端部において異なったものとな
シ、而もこの一方の画像データをリング状に回転させな
がら相関を計算するので、正確な像の位相差が求められ
なかった。この点を第2図に基づき詳細に説明すれば、
(a)及び(b)はシフトレジスタ1aに格納された画
像データA及びシフトレジスタ1bに格納された画像デ
ータBを夫々示していて、焦点が合っていない場合両方
の画像データA、Bがずれ従ってビークP 、 P’も
ずれていると共に、両方の画像データA、Bは端部にお
いて異なったものとなっている。又、 (c)はシフト
レジスタ1bの画像データBをαビット移動せしめたも
のを示している。従って、ビークP 、 P#が一致し
ているととがら両画像データA、Bの位相差がαビット
であることがわかるが、(C)の画像データのうち0〜
αビツトの部分は(b)の状態におけるβ〜127ビツ
トの部分であ!U、(a)と(c)の画像データは児全
には一致しない。即ち、相関の計算を0−127ビツト
の全ての画像データについて行うと、像の位相差が零の
場合即ちビークp 、 P/7が一致した場合に相関の
値が極値になるとは限らない。従って、この装置では正
確な像の位相差を求めることは困難である。又、合Lf
#度を考慮してイメージセンサ−の素子のピッチを小さ
くしたシ、演算速度を考慮してイメージセンサ−の素子
の数を少なくしたりすると、イメージセンサ−のカバー
範囲が狭く々って視野中の限られた狭い部分に合焦対象
物を持ってこなければならなくなるという面倒があり、
一方イメージセンサーのカバー範囲を広くすると素子の
数が多くなって演算時間が長くなるという問題もあった
However, in this conventional device, since the image sensor has to have a certain size, the two images captured on the image sensor are not only shifted in position, but also have different peripheral parts. Result: two shift registers 1. The image data A and B stored in a and lb are not only shifted in position but also different at the ends, and the correlation is calculated while rotating one of the image data in a ring shape. Therefore, accurate image phase difference could not be determined. If this point is explained in detail based on Figure 2,
(a) and (b) show image data A stored in the shift register 1a and image data B stored in the shift register 1b, respectively; when out of focus, both image data A and B shift. Therefore, the beaks P and P' are also shifted, and both image data A and B are different at the ends. Further, (c) shows the image data B in the shift register 1b shifted by α bits. Therefore, it can be seen that when the peaks P and P# match, the phase difference between the two image data A and B is α bit, but among the image data of (C), 0 to
The α bit part is the β~127 bit part in the state (b)! The image data of U, (a) and (c) do not match the entire child. In other words, if the correlation is calculated for all image data from 0 to 127 bits, the correlation value will not necessarily be an extreme value when the image phase difference is zero, that is, when the peaks p and P/7 match. . Therefore, it is difficult to obtain an accurate image phase difference with this device. Also, combined Lf
If you reduce the pitch of the image sensor's elements taking into account the degree of rotation, or reduce the number of elements in the image sensor taking into account the calculation speed, the coverage area of the image sensor becomes narrower and the field of view becomes smaller. There is the trouble of having to bring the object to be focused on in a narrow, limited area.
On the other hand, if the coverage area of the image sensor is widened, the number of elements increases, resulting in a longer calculation time.

本発明は、上記問題点に鑑み、視野全体をカバーする光
電変換装置を用いると共に、該光電変換装置の一部の素
子の光電出力信号を用いて相対位置関係を検出するよう
にして、検出精度及び検出速度の大巾な向上を実現した
自動焦点検出装置を提供せんとするものであるが、以下
第3図乃至第15図に示した一実施例に基づきこれを説
明すれば、第3図は本実施例に用いられる瞳分割法の原
理を示してお、D、(、)において、6は結像レンズ、
7は結像レンズ6の前側で瞳の近傍に配設された開ロア
aを有する遮光板、8は像面であシ、合焦時には像面8
上に像Qが結像されるが、非合焦時には前ビン、後ビン
に対応して像。に関して各々光軸0に垂直な方向で反対
方向にずれた位置にボケた像Q1. Q2が像面8上に
形成される。(b)は遮光板7の開ロアaを光軸0に関
して反対側に移動させた場合を示しており、合焦時には
像面8上に像Q′が結像されるが、非合焦時には各々前
ビン。
In view of the above problems, the present invention uses a photoelectric conversion device that covers the entire field of view, and detects the relative positional relationship using photoelectric output signals of some elements of the photoelectric conversion device, thereby improving detection accuracy. The present invention aims to provide an automatic focus detection device that achieves a significant improvement in detection speed.This will be explained below based on an embodiment shown in FIGS. 3 to 15. shows the principle of the pupil division method used in this example, and in D, (,), 6 is an imaging lens,
7 is a light-shielding plate with an open lower a disposed near the pupil on the front side of the imaging lens 6; 8 is an image plane; when in focus, the image plane 8;
An image Q is formed above, but when out of focus, images correspond to the front and rear bins. The blurred images Q1. Q2 is formed on the image plane 8. (b) shows the case where the opening lower a of the light shielding plate 7 is moved to the opposite side with respect to the optical axis 0. When in focus, an image Q' is formed on the image plane 8, but when out of focus, an image Q' is formed on the image plane 8. Each in front bin.

後ビンに対応してボケた像Q+’+ Q2’が像面8上
に形成される。従って、趣光板7の開ロアaを例えば(
a)の位置から(b)の位置へ移動さぜると、合焦時に
は像Q及びqが同じ位置にあって移動しないが、前ピン
の場合には像はQlがら。1′の位置へ移動し、また後
ビンの場合にはQ2がらQ2’の位1gへ移動する。そ
して、8の像面上にいわゆるイメージセンサ−を設ける
ことにより像の状態を測定できる。
A blurred image Q+'+Q2' corresponding to the rear bin is formed on the image plane 8. Therefore, for example, the opening lower a of the light plate 7 is (
When moving from position a) to position (b), images Q and q are at the same position when in focus and do not move, but when the front focus is on, the image Ql is empty. It moves to the position 1', and in the case of the rear bin, it moves from Q2 to the position 1g of Q2'. By providing a so-called image sensor on the image plane 8, the state of the image can be measured.

以上のことから、前ピン、後ビンの判別が可能となると
共に、その時の非合焦の量を像の移動方向及び量(すな
わち位相差)から知ることができる。
From the above, it becomes possible to distinguish between the front focus and the rear focus, and the amount of out-of-focus at that time can be known from the direction and amount of image movement (ie, phase difference).

第4図は上記原理を顕微鏡に用いた場合の実施例の全体
図であり、51は光源、52はコンデンサーレンズであ
る。53はステージで、この上に標本をのせて観察を行
なう。54は対物レンズ、55は焦点検出系へ光を導く
ビームスプリッタ−156は接眼レンズに光の一部を導
くプリズム、57は接眼レンズである。58は写真用接
眼レンズ、59はフィルムである。ここ1では、普通の
顕微悦と例ら異なるところは無い光学系である。60は
ビームスプリッタ−55からの光を検出光学系ニ導くリ
レーレンズ、61は瞳をつくるレンズ、62はレンズ6
1によってつくられた瞳の位置におかれる瞳分割器であ
る。63は結像レンズで、これを通る光をフィルター6
4を介してイメージセンサ−65上に結像させる。66
は瞳分割器駆動回路、67はステージ駆動回路であり、
それぞれマイクロコンピュータ70によって制御される
FIG. 4 is an overall view of an embodiment in which the above principle is applied to a microscope, where 51 is a light source and 52 is a condenser lens. 53 is a stage on which the specimen is placed for observation. 54 is an objective lens; 55 is a beam splitter that guides light to the focus detection system; 156 is a prism that guides a portion of the light to an eyepiece; and 57 is an eyepiece. 58 is a photographic eyepiece lens, and 59 is a film. Here, the optical system used is no different from a normal microscope. 60 is a relay lens that guides the light from the beam splitter 55 to the detection optical system, 61 is a lens that forms a pupil, and 62 is a lens 6.
This is a pupil divider placed at the position of the pupil created by 1. 63 is an imaging lens, and the light passing through this is filtered 6
4 onto an image sensor 65. 66
is a pupil divider drive circuit, 67 is a stage drive circuit,
Each is controlled by a microcomputer 70.

68はイメージセンサ−駆動回路、69はイメージセン
サ−65からの画像データをマイクロコンピュータ70
に入力するインターフェイス回路である。71は自動焦
点動作を行r4つたシ、合焦表示や不可能表示を行なう
コンソールである。相関の演算や合焦の判定等は全てマ
イクロコンピュータ70が行ガつでいる。相関の演算は
最近開発され市場例出ている計算専用LSIを用いると
良い。
68 is an image sensor driving circuit; 69 is a microcomputer 70 for transmitting image data from the image sensor 65;
This is an interface circuit that inputs to the Reference numeral 71 denotes a console that performs automatic focusing operations and displays in-focus and impossible indications. The microcomputer 70 performs all correlation calculations, focus determination, etc. For the calculation of the correlation, it is preferable to use a calculation-dedicated LSI that has recently been developed and is now available on the market.

次に各部分の動作について詳述する。第5図は二つの像
を形成する為に11屯を通る光束を分割する瞳分割器の
具体的な二つの例を示しており、(a)はガラス基板に
遮光部分(斜線部)を設は且つ軸Oを中心に回転させる
ことにより瞳9を半分ずつ交互に開閉するようにしたも
のであり、(b)は開口部10を有した扇形のもので軸
Oを中心に左右に回転させることにより瞳9を半分ずつ
交互に開閉するようになっている。(a)の場合は、D
Cモニタ等によって回転させつつ回転する1翰分割器に
よる同期信号に応じてイメージセンサ−で撮像する方法
に適しでいる。(b)はマイクロコンピュータ等の制御
装置に従って瞳分割器を動かしながらそれと同期してイ
メージセンサ−で撮像する方法に適している。かくして
、以上の様な瞳分割器によって第3図における(a) 
、 (b)の状態を作り出し、その(a)。
Next, the operation of each part will be explained in detail. Figure 5 shows two specific examples of a pupil splitter that splits the light beam passing through 11 ton to form two images, and (a) shows a glass substrate with a light-shielding part (shaded part). (b) is a sector-shaped device with an opening 10 that is rotated left and right about axis O. As a result, half of the pupils 9 are opened and closed alternately. In the case of (a), D
This method is suitable for a method in which an image sensor is used to capture an image in response to a synchronizing signal from a single-lens divider that is rotated by a C monitor or the like. (b) is suitable for a method in which the pupil divider is moved according to a control device such as a microcomputer and an image is taken by an image sensor in synchronization with the movement of the pupil divider. Thus, by using the pupil divider as described above, (a) in FIG.
, creates the state (b) and its (a).

(b)の状態それぞれの場合の画像データをイメージセ
ンサ−によって得ることが可能となる。
It becomes possible to obtain image data for each of the states (b) using the image sensor.

又、一般に合焦の対象となる被写体や標本は視野の中心
にあるとは限らないので、イメージセンサ−は視野の中
心だけでなくなるべく広範囲にわたっていることが望ま
しい。しかし、視野全体をカノクーシようとするとイメ
ージセンサ−の素子数を増やす必要がある。これは合焦
精度を一定に保つためには素子のピンチをある程度の大
きさにしなければならないところからくる。
Furthermore, since the object or specimen to be focused is generally not always located at the center of the field of view, it is desirable that the image sensor be located as widely as possible and not just at the center of the field of view. However, in order to cover the entire field of view, it is necessary to increase the number of elements in the image sensor. This comes from the fact that the pinch of the element must be made to a certain degree in order to maintain constant focusing accuracy.

この点について以下説明す“る。第6図は二つの像の位
相差量とデフォーカス量との関係を示す図である。こ\
では、説明を簡単にする為に点像を考える。13は光学
系の光軸であり、後側聞口数がN A’の光学系によっ
て点像11が形成されているとする。今デフォーカス量
δdの位置にイメージセンサ−12があるとすると、二
つの像11A。
This point will be explained below. Figure 6 is a diagram showing the relationship between the amount of phase difference and the amount of defocus between two images.
Now, to simplify the explanation, we will consider a point image. 13 is the optical axis of the optical system, and it is assumed that the point image 11 is formed by the optical system with the number of rear apertures NA'. Assuming that the image sensor 12 is now located at the position of the defocus amount δd, there are two images 11A.

lIBは5pだけ位相差をもって形成されるから、δd
とSpの関係は Sp δd= −(1) NA’ となる。今10×の対物レンズを用いた場合の合焦精度
を考える。lo×対物レンズのNAを0.40とすると
N A’は0.04となり、(1)式からδd=258
p             (2)が導かれる。一方
、1o×対物レンズの焦点深度tは ε t = −(3) NA〆 で表わされる(εは最小錯乱円で′ある)から、ε=0
.05mm(20本/■の分解能に相当)とすれば、 t=1.25訓           (4)となる。
Since lIB is formed with a phase difference of 5p, δd
The relationship between and Sp is Sp δd=−(1) NA′. Now let us consider the focusing accuracy when using a 10x objective lens. lo x NA of the objective lens is 0.40, NA' is 0.04, and from equation (1), δd = 258
p (2) is derived. On the other hand, the depth of focus t of a 10 × objective lens is expressed by ε t = −(3) NA〆 (ε is the circle of least confusion), so ε = 0
.. 05mm (equivalent to a resolution of 20 lines/■), then t=1.25mm (4).

この焦点深度以内の合焦検出精度が必要であるから、 として δd=0.625胸              (6
)よって 5p=26μm(7) となる。この程度の像の位相差量を精度良く求めるにけ
、イメージセンサ−12のダイオードプレイのピッチか
やはり25μm程度である必要がある。
Since focus detection accuracy within this depth of focus is required, δd=0.625 (6
) Therefore, 5p=26 μm (7). In order to obtain this amount of image phase difference with high accuracy, the pitch of the diode play of the image sensor 12 must be approximately 25 μm.

以上の様に合焦精度の要求からイメージセンサ−12の
ピッチが決定される。この場合板に128個のダイオー
ドアレイを有するイメージセンサ−を用いたとすると、
イメージセンサ−がカッ々−する範囲は128 X O
,025=3.2晒とかシ、これは視野数21(視野が
直径21 wm )に比べて非常に小さく、合焦の対象
となる被写体をイメージセンサ−の位置(一般的には中
心)に移動させて合焦を行う必要が生じる。
As described above, the pitch of the image sensor 12 is determined based on the requirement for focusing accuracy. In this case, if we use an image sensor with 128 diode arrays on the board,
The range where the image sensor is sharp is 128 x O
, 025 = 3.2 exposure, which is very small compared to the field of view number 21 (field of view is 21 wm in diameter), and the subject to be focused is placed at the position of the image sensor (generally at the center). It becomes necessary to move and focus.

第7図は本実施例に使用したイメージセンサ−とそこに
おける処理方法を示したものである。本実施例は512
個の7オトダイオードアレイを有するイメージセンサ−
を使用しているが、このイメージセンサ−によると51
2X0.025=12.8簡となり、視野のかなりの部
分をカバーすることができる。しかし全てのビット(ダ
イオードアレイ)を用いて相関演算すると非常に演算時
間が長くなるし、意味も無い。そこで512ビツトを1
28ビツトの五つのブロックa −dに分け、その内設
もコントラストの高いブロックで相関の演算を行なう。
FIG. 7 shows the image sensor used in this embodiment and the processing method used therein. In this example, 512
Image sensor with 7 otodiode arrays
According to this image sensor, 51
2×0.025=12.8 lenghts, and can cover a considerable part of the field of view. However, if the correlation calculation is performed using all bits (diode array), the calculation time will be extremely long and it will be meaningless. So 512 bits are 1
It is divided into five blocks a to d of 28 bits, and correlation calculations are performed using blocks with high contrast.

ここで、コントラスト計算方法の一例について説明する
。一般にコントラスト評価の評価関数としては5r(x
)をセンサーのXビット目の出力とじた場合 C−Σ+ r(x)−f (x+1 ) 1又は、 0−Σ(f(X)−f(X+1))” となることが知られている。本実施例の場合、コントラ
ストの変化を精度良く知る必要のあるコントラスト ック間の相対的コントラスト強度を知れば良いから、必
ずしも瞬シのビットの差を計算する必要はない。例えば C−Σ’l f(x)− f ( x+5 ) lとす
る(Σ′はXを4つおきに計算するという意味である 
)と、例えばAブロックの計算はx=64 ==+ r(s4)−r(69) ++・−・・・・+
+ f (184)−f(188) 1となり、差の絶
対値を31回計算しながら加算すれば良いことになる。
Here, an example of a contrast calculation method will be described. Generally, the evaluation function for contrast evaluation is 5r(x
) is combined with the sensor's X-bit output, it is known that C-Σ+ r(x)-f (x+1) 1 or 0-Σ(f(X)-f(X+1))" In the case of this embodiment, since it is sufficient to know the relative contrast strength between the contrast marks, which is necessary to accurately know the change in contrast, it is not necessarily necessary to calculate the difference between the bits of the instantaneous shift.For example, C-Σ' Let f(x) − f (x+5) l (Σ' means to calculate every fourth X
), and for example, the calculation for block A is x=64 ==+ r(s4)-r(69) ++・-・・・・・+
+ f (184) - f (188) 1, which means that it is sufficient to add the absolute value of the difference while calculating it 31 times.

従来の計算法なら121回必要となる。The conventional calculation method would require 121 times.

尚、ここで5ピツト・隣・りの値との差の絶対値を4ビ
ツトおきに計算しているのは、ただ単に隣シの値の差の
絶対値を4ビツトおきに計算するよシもコントラストの
感度を良くするためである。
Note that the reason why the absolute value of the difference between the 5-pit, adjacent value, and value is calculated every 4 bits is simply that the absolute value of the difference between the adjacent value is calculated every 4 bits. This is also to improve contrast sensitivity.

この点に関し、例えば第8図に示したイメージセンサ−
上の光の強度分布tに基づき比較計算を行ってみると、
本実施例の場合は 0=l f (64)−f(69) ++lf(68)
−f.(73) 1=1 13−301+125−60
1 =52 となるのに対し、従来の場合は c=+ f(64)−f(65)+++B68)−f(
69)+=113ー141+125ー301 =6 となることから、本実施例の方が従来の場合よシコント
ラスト感度が良くなっている。
In this regard, for example, the image sensor shown in FIG.
When we perform a comparative calculation based on the intensity distribution t of the light above, we find that
In this example, 0=l f (64)-f(69) ++lf(68)
-f. (73) 1=1 13-301+125-60
1 = 52, whereas in the conventional case c = + f (64) - f (65) +++ B68) - f (
69)+=113-141+125-301=6 Therefore, the contrast sensitivity of this embodiment is better than that of the conventional case.

更に、計算量を少なくする為にXビット隣りの値との差
を求め、これをXビットおきに計算する場合は,X>Y
が好ましい。本実施例はX=5>4=Yである。
Furthermore, in order to reduce the amount of calculation, if you calculate the difference between the adjacent value of X bits and calculate this every X bits, then X>Y
is preferred. In this embodiment, X=5>4=Y.

なお、上記関数fに用いるデータは画像データA,Bの
どちらか一方で良い。
Note that the data used for the function f may be either image data A or B.

かくして、以上の様な方法でブロックa,b。Thus, blocks a and b are created in the manner described above.

・・・−・・、eのコントラストを計算してその内の一
番コントラストの良いものを選ぶが、ここで第7図から
明らかなようにブロックaとbが128〜192ビツト
で沖なっているので、無駄なオを算をしないように64
〜128ビツト、128〜192ビツト、192〜25
6ビツトのコントラストを各々計算し、ブロックaのコ
ントラストは64〜128ビツトと128〜192ビツ
トのコントラストの和、ブロックbのコントラストは1
28〜192ビツトと192〜256ビツトのコントラ
ストの和としても良い。尚、ブロックa 、 b 、 
c。
......, the contrast of e is calculated and the one with the best contrast is selected, but as is clear from Figure 7, blocks a and b are 128 to 192 bits apart. 64 so that you don't calculate unnecessary numbers.
~128 bits, 128-192 bits, 192-25
The contrast of 6 bits is calculated respectively, and the contrast of block a is the sum of the contrast of 64 to 128 bits and 128 to 192 bits, and the contrast of block b is 1.
It may also be the sum of the contrasts of 28 to 192 bits and 192 to 256 bits. Furthermore, blocks a, b,
c.

d、eが各々の半分ずつ重なり合っているのは、ブロッ
クの境界に画像強度変化の著しい部分がある場合でもそ
の変化を含んだブロックを設定できるようにする為であ
る。例えばブロックa、cの境界すなわち192ビット
近辺に画像強度変化の著しい部分があった場合、ブロッ
クaあるいはブロックCでは情報を全て使うことは出来
々いが、ブロックbが設定されていれば情報の全てがブ
ロックbに含まれることになり都合が良い。コントラス
トを求める演算は相関の演算に比べて非常に短時間で済
むので、本実施例の演算時間は128ビツトだけの相関
演算時間+α程度の時間で済む。
The reason why half of d and e overlap is so that even if there is a part with a significant change in image intensity at the boundary of the block, it is possible to set a block that includes the change. For example, if there is a part where the image intensity changes significantly near the boundary between blocks a and c, that is, around 192 bits, it is not possible to use all the information in block a or block C, but if block b is set, the information Everything is included in block b, which is convenient. Since the calculation for determining the contrast takes a much shorter time than the calculation for the correlation, the calculation time in this embodiment is about 128-bit correlation calculation time + α.

又、両側のそれぞれ64ビツトにブロックを設定してい
ないのは、像をずらして相関を計算する場合に第2図で
述べたことが起こらないようにする為である。
Furthermore, the reason why blocks are not set for each of the 64 bits on both sides is to prevent the situation described in FIG. 2 from occurring when the correlation is calculated by shifting the images.

以上のように処理を行なえば、必ずしも合焦させるべき
被写体や標本が視野の中心になくとも被写体のある部分
(ブロック)が自動的に選ばれて焦点検出が行われる。
By performing the processing as described above, even if the subject or specimen to be focused is not necessarily in the center of the field of view, a certain part (block) of the subject is automatically selected and focus detection is performed.

以上のことは特に固定的なブロックを定めておく必要は
なく、視野の大部分をカッ々−するように配設されたイ
メージセンサ−の数多くのフォトダイオードアレイの中
から、相関演算に必要なフォトダイオードアレイを含ん
だ部分をコントラスト等で選べば良い。まだ観察用の視
野中にマーク等を設は手動で設定するようにしても良い
。この様にすると視野中に立体的な標本があっても、あ
るいはゴミがあっても、使用者の合わせたい被写体に焦
点を合わせることができる。
For the above, there is no need to define a fixed block, and the image sensor's many photodiode arrays are arranged so as to cover most of the field of view. The part containing the photodiode array can be selected based on contrast, etc. Marks etc. may still be set manually in the field of view for observation. In this way, even if there is a three-dimensional specimen or dust in the field of view, the user can focus on the subject he or she wants to focus on.

次に、全体の動作について説明する。まず、第4図のイ
メージセンサ−65からの二つの画像データA及びBは
インターフェイス69全通してマイクロコンピュータ7
0のメモリに格納される。
Next, the overall operation will be explained. First, two image data A and B from the image sensor 65 in FIG.
Stored in memory 0.

そして、五つのブロックの内殻もコントラストの高いブ
ロックが選択され、そのブロックの画像データによって
相関が演算される。仮に第7図のブロックaを選択した
として話を進める。
Then, a block with high contrast among the inner shells of the five blocks is selected, and a correlation is calculated using the image data of that block. Let us proceed by assuming that block a in FIG. 7 is selected.

相関演算はメモリに格納された二つの画像に対応する画
像データAとIIf!l像データBとを相対的に1ピツ
トずつずらしながら計算し、何ビット分ずらしたら画像
が重なるたかを判定して像の位相差量を求める。相関の
式は、例えば となり、ABSは絶対値を表わし、関数t A(x)r
 f B(x)は夫々画像データA、BOXビット目の
値を表わしている。そして、−組の関数f A、 + 
f B  についてδを変えていってR(δ)が最小と
なる時のδ即ちδlを位相差としている。又、この例で
は一64≦δ≦64としている。このδの範囲は合焦点
近くでは狭くすることができるので、演算時間の短縮と
なる。
The correlation calculation is performed on image data A and IIf! corresponding to two images stored in memory. The amount of phase difference between the images is calculated by shifting the image data B one pit at a time and determining how many bits the images need to be shifted to overlap. The correlation formula is, for example, where ABS represents the absolute value and the function t A(x)r
fB(x) represents the value of the image data A and BOX bit, respectively. Then, − set of functions f A, +
When δ is changed for f B , δ when R(δ) is minimized, that is, δl, is taken as the phase difference. Further, in this example, -64≦δ≦64. Since the range of δ can be narrowed near the focal point, calculation time can be shortened.

実際のδの値はイメージセンサ−の1ビツトごとの値し
かとらないので、さらに精度良く検tBする為には相関
の離数的な値をカーブフイテイング等で近似して1ピツ
ト以下の精度で像の位相差を求める(第9図)。あるい
は几(δ)が最小の1寺のδ即ちδ′とその前後の三点
’+p+Qを用いて二次曲線近似を行うことによって求
めることもできる(第10図)。
Since the actual value of δ is only taken for each bit of the image sensor, in order to test with even higher accuracy, the value of the correlation is approximated by curve fitting, etc., and the accuracy is less than 1 pit. Find the phase difference of the images (Figure 9). Alternatively, it can also be determined by performing quadratic curve approximation using the one point δ where the value (δ) is minimum, that is, δ', and three points '+p+Q before and after it (Figure 10).

以上の結果、視野の多くの部分をカッ々−し且つ合焦の
精度を維持しガから、演算時間をほとんど増加させない
で済む。
As a result of the above, since many parts of the field of view can be sharpened and focus accuracy can be maintained, the calculation time can be hardly increased.

上記の例ではδが−64〜64の範囲にあシ、この範囲
のデフォーカス量は(6)式から0f325’18←4
輌となり、対物側では40/10” =0.4=400
μmであるからデフォーカス量が±400μmとなる。
In the above example, δ is in the range of -64 to 64, and the defocus amount in this range is 0f325'18←4 from equation (6).
vehicle, and on the objective side 40/10" = 0.4 = 400
Since it is μm, the defocus amount is ±400 μm.

これ以上の広い範囲のデフォーカス量を検出範囲に入れ
ようとする場合、δの範囲を増やすことが考えら゛れる
が、これは計算量が増大し好ましくない。
If an attempt is made to include a wider range of defocus amounts within the detection range, it may be possible to increase the range of δ, but this increases the amount of calculations and is not preferable.

またその様にデフォーカス量が大きい場合に上す己の様
な精度の高い計算をしても意味が無(へ。
Also, when the amount of defocus is large like that, there is no point in performing highly accurate calculations like the one I did above.

そこで、本実施例では画像データとして取込んだデータ
の内の数ビットごとのデータを用いてコントラストや相
関の往1算を実行している。具体的には5ビツトおきに
データを用いるとすると、画像メモリ中のデータf(0
)、 f(1)、 f(2)、・・・f (510) 
、 f (511)の内のf(0)、 f(5)、 f
(10)、・・・f(505)、r(slo)が使用す
るデータになると考えれば良い。実際には計算の際に5
ビツトおきのデータを用いるに過ぎない。例えば(8)
式は 64 鎮δトΣIf (96+4n)−f (96+4n+δ
)+   (9)n:OAB の様になる。この場合は、デフォーカス量が大きく像も
ぼやけて低周波成分しかないから、ブロック分けは行な
っていない。この場合のδの変化量も5つおきに計算す
るから、δの範囲を例えば−200≦δ≦200 とし
た場合でも相関計算の回数は81回となシ少なくて済む
。検出範囲は±1.25■と々る。
Therefore, in this embodiment, the forward calculation of contrast and correlation is performed using data of every few bits of the data taken in as image data. Specifically, if data is used every 5 bits, data f(0
), f(1), f(2),...f (510)
, f (511) of f(0), f(5), f
(10), . . . f (505), r (slo) can be considered as the data to be used. In fact, when calculating
It simply uses bit-by-bit data. For example (8)
The formula is 64 If (96+4n)-f (96+4n+δ
)+ (9)n:OAB. In this case, since the defocus amount is large and the image is blurred and contains only low frequency components, no block division is performed. In this case, the amount of change in δ is also calculated every five, so even if the range of δ is, for example, −200≦δ≦200, the number of correlation calculations can be as small as 81 times. The detection range is ±1.25■.

以上の様に、画像データを数ビットおきに用いることに
より計算量を増やすことなく検出範囲を広げられる。こ
の様にデフォーカス量の大きい時は数ビットごとの計算
により焦点位置の近くに合わせ、その後に前述の鞘度を
考えた計算を行なうと、合焦可能範囲が広く且つ合焦鞘
度の良い自動焦点検出を行なうことが出来る。
As described above, by using image data every few bits, the detection range can be expanded without increasing the amount of calculation. When the amount of defocus is large like this, by calculating every few bits to get close to the focus position, and then performing calculations that take into account the above-mentioned coverage, the focus range will be wide and the focus coverage will be good. Automatic focus detection can be performed.

さらにデフォーカス量が大きい場合には、画像データか
らコントラスト(計算量が少なくて済む)だけを計算し
つつステージを移動し、コントラストが一定の値になっ
てから相関による焦点合わせを行なうようにすると良い
。丑たこれは、コントラストが一定以ヒないと相関計算
が誤った像位相を計算する恐れもあるので、それより低
いコントラストの場合は計算しないなどの判断に用いて
もよい。
Furthermore, if the amount of defocus is large, move the stage while calculating only the contrast (which requires less calculation) from the image data, and then perform focusing by correlation after the contrast reaches a constant value. good. However, since there is a risk that the correlation calculation will calculate an incorrect image phase if the contrast is not higher than a certain level, it may be used to determine whether or not to perform the calculation if the contrast is lower than that.

尚、カメラ等対物光学系を移動して焦点合わせを行なう
装置の場合は、光学系を駆動するのは言う壕でもない。
In addition, in the case of a device such as a camera that moves an objective optical system to perform focusing, it is not necessary to drive the optical system.

上記の実施例の場合、瞳を通る光束を分割して二つの像
を得るので、光学系の偏芯や瞳の偏芯等で画像データA
とBの光量が異々る場合がある。
In the case of the above embodiment, the light flux passing through the pupil is divided to obtain two images, so the image data A
and B may be different in amount.

特に合焦系をアタッチメント形式にすると影響が出やす
い。捷だ瞳位置にlli分割器が無い場合には、第11
図のように画像データAとBで光量にむらが出来る。第
12図は光量むらを模式的に説明する図である。(a)
の場合、瞳と瞳分割器が一致しているから各像高”+’
+jに対して瞳を通過する光量は全てaに等じい。(b
)の場合、瞳と瞳分割器が一致していないから、谷像高
hr ’ * Jに対して瞳を通過する光量はそれぞれ
す、a、cとなって不均一となり、光量むらが生じる。
This is especially likely to be the case if the focusing system is attached. If there is no lli divider at the pupil position, the 11th
As shown in the figure, there is unevenness in the amount of light between image data A and B. FIG. 12 is a diagram schematically illustrating unevenness in light amount. (a)
In the case of , the pupil and pupil divider match, so each image height is ``+'
For +j, the amount of light passing through the pupil is all equal to a. (b
), since the pupil and the pupil divider do not match, the amount of light passing through the pupil for the valley image height hr'*J is s, a, and c, respectively, and is non-uniform, resulting in uneven light amount.

以上のような光量差や光量むらがあると、画像データA
とBの二つの像の相似性が悪化し、相関処理結果の精度
が著しく低下することになる。そこで補正が必要となる
。補正の−つの例は、イメージセンサ−の固定パターン
ノイズの除去によく用いられている方法で、あらかじめ
均一な光でイメージセンサ−を露光しその画像データを
得る。
If there is a difference in the amount of light or unevenness in the amount of light as described above, the image data A
The similarity between the two images B and B will deteriorate, and the accuracy of the correlation processing result will drop significantly. Therefore, correction is necessary. One example of correction is a method often used to remove fixed pattern noise from image sensors, in which image data is obtained by exposing an image sensor to uniform light in advance.

入射光が均一であることによシ画像データは固定ノぐタ
ーンノイズそのものであるから、その逆数によって補正
係数をつくれば、その後画像データに補正係数をかける
ことによシ固定ノぐ夕゛−ンノイズの影響を除くことが
できる。本実施例の場合、合焦光学系を通した均一な光
で画像データA及びBを得ると画像データAとBは偏芯
等によシ第11図の様に光量むらのあるデータとなって
いる。従って、その逆数等によって補正係数をつくり同
様な処理を行なえば、光量むらの影響を除くことが出来
る。光量差がある場合もその光学系を通して同様な処理
を行なえば同様な効果を得ることができる。付随的には
イメージセンサ−の固定ノミターンノイズの除去にもな
る。均一光で露光する具体的方法としては、ステージ5
3上に試料をおかない状態での画像データを入力する方
法が簡単である。
Due to the uniformity of the incident light, the image data is just fixed-noise noise, so if you create a correction coefficient using its reciprocal, then by multiplying the correction coefficient by the image data, you can obtain a fixed-noise noise. It is possible to remove the influence of noise. In the case of this embodiment, when image data A and B are obtained with uniform light passing through the focusing optical system, image data A and B become data with uneven light intensity as shown in Fig. 11 due to eccentricity, etc. ing. Therefore, by creating a correction coefficient using its reciprocal or the like and performing similar processing, the influence of uneven light amount can be removed. Even if there is a difference in light intensity, the same effect can be obtained by performing the same processing through the optical system. Incidentally, it also serves to eliminate fixed chime turn noise of the image sensor. As a specific method for exposing with uniform light, Stage 5
A simple method is to input image data without placing a sample on the sample.

以上のように1上記の補正には一度均一光によるデータ
入力を行なう必要がある。これはめんどうな操作ではな
いが、それでも補正用のデータ入力を行ないたく々(へ
場合は計算によって補正することも出来る。第13図は
それを説明する図で、X軸をセンサーアレイの並び方向
にy軸を画像データの強度の方向に夫々とっである。画
像データA、Bの値は、第12図の説明でもわかる通シ
ある一定の傾きをもつ直線と考えることが出来る。
As described above, for the above correction, it is necessary to input data using uniform light once. Although this is not a troublesome operation, it still requires a lot of data input for correction (if necessary, correction can also be done by calculation. Figure 13 is a diagram explaining this, with the The y-axis is in the direction of the intensity of the image data.The values of the image data A and B can be thought of as straight lines with a constant slope, as can be seen from the explanation of FIG.

それぞれを1.1  とする。画像データZAの傾B きをβいとすると、il!II像データtAO式は、I
AをtAの光量の平均として、 y=βAX+工A とガる。ここで傾きβいは光量によ、つて変化するが、
から求めることが出来る。鉦はその光学系の特性により
決捷るもので、あらかじめ測定しておけば良い。画像デ
ータA、Bの光量の平均を■attとすると、補正係数
αは とカリ、これによって光量差の補正及び光量むらの補正
ができる。
Each is set as 1.1. If the slope B of image data ZA is β, then il! II image data tAO formula is I
If A is the average light amount of tA, then y = βAX + engineering A. Here, the slope β changes depending on the amount of light, but
It can be found from The gong is determined by the characteristics of its optical system, so it is best to measure it in advance. If the average of the light amounts of the image data A and B is ``att'', then the correction coefficient α is equal to .alpha., which makes it possible to correct the difference in light amount and the unevenness of light amount.

以上の様に、均一光を用いたりあるいはに1゛算するこ
とで、光学系の偏芯あるいは瞳の偏芯の影響や瞳と瞳分
割器が一致していない影響を補正し除去することが出来
る。その結果、合焦の精度が向上し、検出範囲も拡がる
。更には合焦検出部もアタッチメント形式にしても使用
出来る。最も大きな効果としては、11偵位置の異々る
各棟各倍率の対物レンズが使用出来ることである。
As described above, by using uniform light or by multiplying by 1, it is possible to correct and eliminate the effects of eccentricity of the optical system or eccentricity of the pupil, or the effects of misalignment between the pupil and the pupil divider. I can do it. As a result, focusing accuracy is improved and the detection range is expanded. Furthermore, the focus detection section can also be used as an attachment. The most significant effect is that objective lenses with different magnifications can be used for each of the 11 different positions.

また、顕微鏡のように多くの種類の対物レンズを用いる
とそれぞれの対物レンズにより IRn位置が違うので
、瞳分割器を瞳位置に全ての対物レンズについて正しく
設置することが難しい。この不具合の解決法の一つとし
て瞳分割器を複数個設けることが考えられる。複数の瞳
分割器をそれぞれの対物レンズの瞳位置に設けることに
ょシ瞳と瞳分割器とを一致させる。一つの+Ii分割器
を使用している場合、他の瞳分割器が瞳をけらないよう
に構成されているのは言うまでもな、い。例えば第14
図のように第5図と同じ瞳分割器を二枚連結したものを
用いてもよい。
Furthermore, when many types of objective lenses are used, such as in a microscope, the IRn position differs depending on each objective lens, so it is difficult to correctly install the pupil divider at the pupil position for all the objective lenses. One possible solution to this problem is to provide a plurality of pupil dividers. By providing a plurality of pupil dividers at the pupil positions of respective objective lenses, the pupils and the pupil dividers are made to coincide. It goes without saying that when one +Ii divider is used, the other pupil dividers are configured so as not to disturb the pupil. For example, the 14th
As shown in the figure, it is also possible to use the same two pupil dividers as in FIG. 5 connected together.

第4図において、フィルター64は赤外カットフィルタ
ー或いはバンド、々スフイルターであって、イメージセ
ンサ−及び光量51等の分光感度1分光分イDが比想感
度と異なるので、そのことによる焦点ずれの現象を防ぐ
役目をする。
In FIG. 4, the filter 64 is an infrared cut filter or a band filter, and the spectral sensitivity of the image sensor and the amount of light 51, etc., is different from the relative sensitivity by 1 spectral sensitivity, so the focus shift is caused by this. It serves to prevent the phenomenon of

以上のような自動焦点装置の制御、演算処理を行う場合
、マイクロコンピュータ及び演算処理ユニットによる方
法が最も設計容易で安価である。
When performing control and arithmetic processing of the automatic focusing device as described above, a method using a microcomputer and an arithmetic processing unit is easiest and cheapest in design.

これについて、第15図のフローチャートで説明を補足
する。これは最も基本的な場合を示している。合焦が開
始されると、まず顕微鏡の状態が合焦動作に適した状態
になっているかをチェックし、対物の種類2倍率を判別
する。これは、光量むら補正の場合対物の種類及び倍率
によってノクラメータ、が異なシ、像位相差量をステー
ジ移動量に変換する変換の係数も倍率によって違うから
である((1)式参照)。次に、イメージセンサ−から
へ及びfBのデータを得てメモリに格納する。その後、
光量むらを補正し、再びメモリに格納する。合焦開始時
は焦点が大きくずれていることがあるので、5ビツトお
きの相関演算でおおよその焦点位置を決定する((9)
式参照)。そして、相関にょシ求めた像位相差量をステ
ージ移動量に変換しステージを移動する。そこで再びf
A、fBのデータを得、補正を行なう。次にコントラス
ト評価によりブロックを決定する。コント2ストが一定
値以上なければ相関による結果の信頼性が少々いので、
もう一度5ビット相関を行ないステージを焦点位置に近
づける。数回性なってもコントラストが上がらない場合
は試料のコントラストが低すぎるので不可能表示を行な
う。コントラ公トが一定以上あれば、決定されたブロッ
クで相関を計算し、ステージを移動して合焦する。合焦
の確認としてもう一度、fA、fBを得、相関を計算す
る。ここで像位相差量が焦点深度内の値であれば合焦で
あシ、ステージを移動しない。もし焦点深度外であれば
もう一度同じ動作を繰シ返す。
Regarding this, the explanation will be supplemented with the flowchart shown in FIG. 15. This shows the most basic case. When focusing is started, it is first checked to see if the microscope is in a state suitable for focusing, and the type and magnification of the objective are determined. This is because in the case of light intensity unevenness correction, the noclameter varies depending on the type of objective and the magnification, and the conversion coefficient for converting the amount of image phase difference into the amount of stage movement also differs depending on the magnification (see equation (1)). Next, the data of fB and fB are obtained from the image sensor and stored in the memory. after that,
Correct the uneven light intensity and store it in memory again. Since the focus may be largely off at the start of focusing, the approximate focus position is determined by correlation calculation every 5 bits ((9)
(see formula). Then, the image phase difference amount determined based on the correlation is converted into a stage movement amount, and the stage is moved. So again f
Obtain data of A and fB and perform correction. Next, blocks are determined by contrast evaluation. Since the reliability of the results due to correlation is a little low unless the control value exceeds a certain value,
Perform 5-bit correlation again and move the stage closer to the focus position. If the contrast does not increase even after repeating several times, the contrast of the sample is too low, and an "impossible" indication is displayed. If the contrast is above a certain level, the correlation is calculated using the determined block, and the stage is moved to focus. To confirm focus, fA and fB are obtained again and the correlation is calculated. Here, if the image phase difference amount is within the depth of focus, the image is in focus and the stage is not moved. If it is outside the depth of focus, repeat the same operation again.

以上は最も基本的な動作を説明したもので、実際のプロ
グ、ラム圀は試料が無かった場合とが機械が故障した場
合のフェイル・セイ7等も考慮されている。
The above is an explanation of the most basic operation, and the actual program and RAM take into account cases where there is no sample, fail-say 7, etc. when the machine breaks down.

また5ビツト相関から1ビツト相関に移る場合の判定に
像位相差景を用いてもよい。前例の場合−200≦δ≦
200の範囲を5つおきに計算しているが、相関R(δ
)が最小値をとるδが一200≦δ′≦200表らばそ
の分ステージを移動した後に1ビツト相関に移る。この
場合判定粂件を一180≦δ′≦180のように計算し
たδの範囲により小さめに設定するほうがよい。これは
デフォーカス駿が大きい場合には雑音等で誤って最小値
をとるδを決定するととがあるからである。
Further, the image phase difference view may be used for determination when changing from 5-bit correlation to 1-bit correlation. In the case of the previous example -200≦δ≦
200 ranges are calculated every 5th range, but the correlation R(δ
) takes the minimum value when δ is 1200≦δ'≦200, the stage is moved by that amount and then the process moves to 1-bit correlation. In this case, it is better to set the criterion to be smaller than the calculated range of δ, such as -180≦δ'≦180. This is because if the defocus is large, noise or the like may cause the δ to take the minimum value to be determined incorrectly.

第16図は第二実施例として中央処理装置以外をハード
ウェアで構成した例の制御・演算回路を示している。こ
れについて説明すれば、まずコンソール71からの合焦
開始信号によシ瞳分割器駆動Io回路66が働き画像デ
ータAをイメージセンサ−65により得る。イメージセ
ンサ−65は瞳分割器62と同期してセンサー駆動回路
68により撮像を開始する。この時、蓄積型イメージセ
ンサ−の場合は(一般に固体撮像素子はこの型)、−庇
取前に蓄積された信号を消去する為にカラ読み出しを行
なう。イメージセンサ−65から連続して読み出される
画像データ人はサンプルホールド回路31.A、/Dコ
ンバータ32.スイッチ回路33を通って第一メモリ3
4に記憶される。そして、図示していないメモリにあら
かじめ記1.ハされている補正係数データによって画像
データAは補正されて再び第一メモリ34に記憶される
。補正係数データはあらかじめ均一光を入射して画像セ
ンナ−で撮像した前述の画像データの逆数にその時の画
像データA、Bの平均値を掛けたものである。512ビ
ツトのイメージセンサ−の場合を考える。画像データA
、Bは両方台わせると0〜1023ビツトまで合計10
24個となる。画像データAは0〜511ビツト、画像
データBは・1512〜1023ビツトとする。試料が
無い状態での均一光で得た画像データのnビット目の値
をXnとすると、nビットの補正係数knは023 ΣX と々る。
FIG. 16 shows a second embodiment of a control/arithmetic circuit in which components other than the central processing unit are constructed of hardware. To explain this, first, the pupil divider drive Io circuit 66 operates in response to a focus start signal from the console 71 to obtain image data A by the image sensor 65. The image sensor 65 starts imaging by the sensor drive circuit 68 in synchronization with the pupil splitter 62. At this time, in the case of an accumulation type image sensor (generally, solid-state image sensing devices are of this type), a color readout is performed in order to erase the accumulated signals before evacuation. Image data continuously read out from the image sensor 65 is stored in a sample and hold circuit 31. A, /D converter 32. The first memory 3 passes through the switch circuit 33
4 is stored. Then, 1. is written in advance in a memory (not shown). The image data A is corrected using the corrected correction coefficient data and stored in the first memory 34 again. The correction coefficient data is obtained by multiplying the reciprocal of the above-mentioned image data captured by an image sensor with uniform light incident thereon by the average value of the image data A and B at that time. Consider the case of a 512-bit image sensor. Image data A
, B has a total of 10 bits from 0 to 1023 when both are installed.
There will be 24 pieces. Image data A is 0 to 511 bits, and image data B is 1512 to 1023 bits. If the value of the n-th bit of image data obtained with uniform light without a sample is Xn, then the correction coefficient kn of n bits is 023 ΣX.

次に、画像データAが第一メモリ34−に格納されると
、瞳分割器62は画像データBを取る状態になり画像デ
ータBけ画像データAと同様にして。
Next, when the image data A is stored in the first memory 34-, the pupil divider 62 becomes in a state to take the image data B and performs the same process as the image data A.

第二メモリ35に補正されて格納される。第一メモリ3
4に格納されたデータは第7図に示したブロックごとに
コントラスト判別器36に送られ、コントラストの高さ
により用いるべきブロックが決定される。ブロックbの
コントラストが最も高い場合にはアドレス指定回路37
に128が与えられる。アドレスシフト回路38には初
期値−32が入っており、アドレス指定回路37が第一
メモリ34の128を指定すると、アドレスシフト回路
38は第二メモリ35の96を指定する。そして画像デ
ータfA(128)とfB(96)が減算器39に入力
され、絶対値回路40を経てl fA(128)−fB
(96) 1の演算が行なわれる。そして、加算器41
を経てメモリ42に格納される。以上が終ると、アドレ
ス指定回路37はメモリ34の129を指定し、アドレ
スシフト回路38はメモリ35の97を指定し、以後同
様に演算され+ fA(t29)−rB(97) + 
 は加算器41によって前のデータ+ fA(12g)
−rB(96) +に加えられてメモリ42に格納され
る。以後拾−メモリ34のアドレス255まで繰り返さ
れ、相が完了する。この計算が完了すると、アドレスシ
フト回路38の値は−31になり、 が計算される。そして、これはアドレスシフト回路38
の値が31になるまで続き、全体の相関演算 が行々われる。続いて中央処理装置43によシフモリ4
2内のR(δ)を比較し、几(δ)が最小となるδを見
つけて像の位相差量とする。それに従ってステージ駆動
回路67を駆動しピントを合わせる。
It is corrected and stored in the second memory 35. 1st memory 3
The data stored in 4 is sent to the contrast discriminator 36 for each block shown in FIG. 7, and the block to be used is determined based on the height of contrast. If block b has the highest contrast, addressing circuit 37
128 is given to . The address shift circuit 38 contains an initial value -32, and when the address designation circuit 37 designates 128 in the first memory 34, the address shift circuit 38 designates 96 in the second memory 35. Then, the image data fA (128) and fB (96) are input to the subtracter 39 and passed through the absolute value circuit 40 to l fA (128) - fB.
(96) An operation of 1 is performed. And adder 41
The data is then stored in the memory 42. When the above is completed, the address designating circuit 37 designates 129 in the memory 34, the address shift circuit 38 designates 97 in the memory 35, and the same calculation is performed thereafter as +fA(t29)-rB(97)+
is the previous data + fA (12g) by the adder 41
−rB(96) + and stored in the memory 42. Thereafter, the process is repeated up to address 255 in the memory 34, and the phase is completed. When this calculation is completed, the value of the address shift circuit 38 becomes -31, and the following is calculated. And this is the address shift circuit 38
This continues until the value of becomes 31, and the entire correlation calculation is performed. Next, the central processing unit 43 processes the shift memory 4.
2, R(δ) is compared, and δ that minimizes R(δ) is found and used as the amount of phase difference of the image. Accordingly, the stage drive circuit 67 is driven to adjust the focus.

尚、デフォーカス量が犬きく一32≦δ≦31  の位
相差量では不足な場合は、アドレス指定回路37は第一
メモリ34の128i指定し且つアドレスシフト回路3
8の初期値は−64となる。そして、それぞれの相関計
算が終るごとに2ずつ増え、R(−64)=I情(12
8)−t 8(128−64)+十げA、(130)−
fB(130−64)l+−・・・・・−−・・・・+
l fA(382)−fB(3B2−64) 1R(−
62)−・・・−・・ n(60)=・・・・・・・・ という計算が行なわれる。これは画像データを1ビツト
おきに用いたことに相当し、同じ計算量で像位相差の検
出範囲が二倍になっている。但し合焦精度は1/2にな
る。
If the defocus amount is insufficient with the phase difference amount of 32≦δ≦31, the address designation circuit 37 specifies 128i of the first memory 34 and the address shift circuit 3
The initial value of 8 is -64. Then, each time the correlation calculation is completed, it increases by 2, and R (-64) = I information (12
8) -t 8 (128-64) + Toge A, (130) -
fB(130-64)l+−・・・・・−−・・・・+
l fA(382)-fB(3B2-64) 1R(-
62)-...-... n(60)=... The following calculation is performed. This corresponds to using every other bit of the image data, and the detection range of the image phase difference is doubled with the same amount of calculation. However, the focusing accuracy becomes 1/2.

以上のように像位相差を計算しステージ駆動回路67を
駆動してピントを合わせるが、ピントを正確に合わせる
為上記動作を数回繰り返しても良い。尚、コンソール7
1では合焦開始や合焦表示を行なう。
As described above, the image phase difference is calculated and the stage drive circuit 67 is driven to adjust the focus, but the above operation may be repeated several times to accurately adjust the focus. Furthermore, console 7
In step 1, focusing is started and focused display is performed.

上述の如く、本発明による自動焦点検出装置は、視野全
体をカバーするイメージセンサーを用いると共に、該イ
メージセンサ−で得た画像データの一部だけを用いて相
関演算を行っているので、検出精度及び検出速度が大巾
に向上する。
As mentioned above, the automatic focus detection device according to the present invention uses an image sensor that covers the entire field of view, and performs correlation calculations using only a part of the image data obtained by the image sensor, so the detection accuracy can be improved. and the detection speed is greatly improved.

尚、本発明は、二つのイメージセンサ−を用いた自動焦
点検出装置にも適用し得るのは言うまでもない。
It goes without saying that the present invention can also be applied to an automatic focus detection device using two image sensors.

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

第】図は従来の自動焦点検出装置の要部回路を示す図、
第2図は上記従来例のシフトレジスタに記憶される画像
で一部の一例を示す図、第3図は本発明による自動焦点
検出装置の一実施例に用いられる瞳分割法の原理を示す
図、第4図は上記実施例の全体図、第5図は上記実施例
に用いられる1閘分割器の具体例を示す正面図、第6図
は二つの像の位相差禁とデフォーカス量との関係を示す
図、第7図は上記実施例のイメージセンサ−とそこにお
ける処理方法を示す図、第8図はイメージセンサ−上の
光の強度分布の一例を示す図、第9図及び第10図は合
焦点付近における精度の良い位相差計算法を示す図、第
11図は上記実施例における画像データの光量むらを示
す図、第12図は光量むらを模式的に説明する図、第1
3図は光量むらの補正方法を示す図、第14図は他の瞳
分割器の斜視図、第15図は上記実施例のコンピュータ
による制御及び演算処理方法を示すフローチャート、第
16図は他の実施例の制御・演算回路を示す図である。 51・・・光源、52−・コンデンサーレンズ、53・
・・ステージ、54・・・対物レンズ、55−・・ビー
ムスプリッタ−156・・・プリズム、57・・・接眼
レンズ、58−・・写真用接眼レンズ、59・−・フィ
ルム、60−・IJL/−V7ズ、61−・・レンズ、
62・・・l槓分害り器、6吐・・結像レンズ、64・
・・フィルター、65・・・イメージセンサ−166・
・・瞳分割器I11ス動回路、67・・・ステージ駆動
回路、68・・・イメージセンサ−駆動回路、69・・
・インターフェイス回路、70・・・マイクロコンピュ
ータ、71・・・−z y 7− /l/。 代理人  篠 原 泰 司Jiシ゛1“、・(G茹 11図     第2図 3′3図 3′9図    第10図 R(X)! 第11図
Figure 1 is a diagram showing the main circuit of a conventional automatic focus detection device.
FIG. 2 is a diagram showing an example of a part of the image stored in the conventional shift register, and FIG. 3 is a diagram showing the principle of the pupil division method used in an embodiment of the automatic focus detection device according to the present invention. , FIG. 4 is an overall view of the above embodiment, FIG. 5 is a front view showing a specific example of a one-fail divider used in the above embodiment, and FIG. 6 is a diagram showing the phase difference and defocus amount of two images. 7 is a diagram showing the image sensor of the above embodiment and its processing method, FIG. 8 is a diagram showing an example of the light intensity distribution on the image sensor, and FIGS. FIG. 10 is a diagram showing a highly accurate phase difference calculation method near the in-focus point, FIG. 11 is a diagram showing unevenness in the amount of light of image data in the above embodiment, FIG. 12 is a diagram schematically explaining the unevenness in light amount, and FIG. 1
FIG. 3 is a diagram showing a method for correcting light amount unevenness, FIG. 14 is a perspective view of another pupil divider, FIG. 15 is a flowchart showing a computer control and arithmetic processing method of the above embodiment, and FIG. 16 is a diagram showing another method FIG. 3 is a diagram showing a control/arithmetic circuit according to an embodiment. 51... Light source, 52-. Condenser lens, 53.
...Stage, 54...Objective lens, 55--Beam splitter-156...Prism, 57--Eyepiece lens, 58--Photography eyepiece lens, 59--Film, 60--IJL /-V7's, 61-...lens,
62...l ramming device, 6 discharge...imaging lens, 64...
...Filter, 65...Image sensor-166.
... Pupil divider I11 movement circuit, 67... Stage drive circuit, 68... Image sensor drive circuit, 69...
- Interface circuit, 70... microcomputer, 71...-z y 7- /l/. Agent Yasushi Shinohara Jishi 1", (G Boiled Figure 11 Figure 2 Figure 3'3 Figure 3'9 Figure 10 R (X)! Figure 11

Claims (1)

【特許請求の範囲】[Claims] 異なる光路を通って形成された二つの像を多数の素子を
配列して成る光電変換装置により個別に光電出力信号に
変換し、該光電出力信号に基づいて二つの像の相対位置
関係を検出することによυ合焦検出を行うようにした自
動焦点検出装置において、視野全体をカッ々−する光電
変換装置を用い°ると共に、該光電変換装置の一部の素
子の光電出力信号を用いて相対位置関係を検出するよう
にしたことを特徴とする自動焦点検出装置。
Two images formed through different optical paths are individually converted into photoelectric output signals by a photoelectric conversion device comprising a large number of elements arranged, and the relative positional relationship between the two images is detected based on the photoelectric output signals. In an automatic focus detection device that performs in-focus detection, a photoelectric conversion device that covers the entire field of view is used, and a photoelectric output signal of some elements of the photoelectric conversion device is used. An automatic focus detection device characterized by detecting a relative positional relationship.
JP2859583A 1983-02-24 1983-02-24 Automatic focus detecting device Pending JPS59155808A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2859583A JPS59155808A (en) 1983-02-24 1983-02-24 Automatic focus detecting device
DE3406578A DE3406578C2 (en) 1983-02-24 1984-02-21 Automatic focus detection device
US06/928,730 US4740678A (en) 1983-02-24 1986-11-10 Automatic focus detecting device in which two objects images formed through different light paths are converted to photoelectric signals
US07/140,537 US4833315A (en) 1983-02-24 1988-01-04 Automatic focus detecting device in which two object images formed through different light paths are converted to photoelectric signals

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2859583A JPS59155808A (en) 1983-02-24 1983-02-24 Automatic focus detecting device

Publications (1)

Publication Number Publication Date
JPS59155808A true JPS59155808A (en) 1984-09-05

Family

ID=12252940

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2859583A Pending JPS59155808A (en) 1983-02-24 1983-02-24 Automatic focus detecting device

Country Status (1)

Country Link
JP (1) JPS59155808A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04114017U (en) * 1991-03-26 1992-10-07 株式会社三協精機製作所 optical device
WO2022163208A1 (en) * 2021-01-29 2022-08-04 富士フイルム株式会社 Phase difference detection device, lens device, and imaging apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56101111A (en) * 1980-01-14 1981-08-13 Mamiya Koki Kk Automatic focus adjustment method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56101111A (en) * 1980-01-14 1981-08-13 Mamiya Koki Kk Automatic focus adjustment method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04114017U (en) * 1991-03-26 1992-10-07 株式会社三協精機製作所 optical device
WO2022163208A1 (en) * 2021-01-29 2022-08-04 富士フイルム株式会社 Phase difference detection device, lens device, and imaging apparatus

Similar Documents

Publication Publication Date Title
JP2928548B2 (en) Three-dimensional shape detection method and device
JPS59155809A (en) Automatic focus detecting device
JPH0672972B2 (en) Focus detection device
JPS6036905A (en) Distance measuring apparatus
US4740678A (en) Automatic focus detecting device in which two objects images formed through different light paths are converted to photoelectric signals
JPH0666007B2 (en) Camera focus detector
JPH01131509A (en) Variable power optical system
JPS59155808A (en) Automatic focus detecting device
JPH0477289B2 (en)
JPS5928886B2 (en) automatic focus detection device
JPS626206B2 (en)
JPH03141311A (en) Video position detector
JPH0553241B2 (en)
US4631394A (en) Focusing device for optical systems
JPS5870540A (en) Focal position detector
JP2910102B2 (en) Focus detection device
JPH0693059B2 (en) Focus detection device
JPH0762732B2 (en) Focus detection device
JP4560159B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2558377B2 (en) Focus detection device
JPH02190083A (en) Offset value measurement and offset correction method for infrared ray image pickup device
EP4050575A2 (en) Line-of-sight detection device and method for controlling the same
JPS595214A (en) Automatic focusing device
JP3703153B2 (en) Focus detection device
JPH0333708A (en) Focus detector