JPH10170817A - Method and device for calculating focal position, and electron microscope using the same - Google Patents

Method and device for calculating focal position, and electron microscope using the same

Info

Publication number
JPH10170817A
JPH10170817A JP8331991A JP33199196A JPH10170817A JP H10170817 A JPH10170817 A JP H10170817A JP 8331991 A JP8331991 A JP 8331991A JP 33199196 A JP33199196 A JP 33199196A JP H10170817 A JPH10170817 A JP H10170817A
Authority
JP
Japan
Prior art keywords
partial image
focus
focus position
image sequence
sharpness
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
JP8331991A
Other languages
Japanese (ja)
Inventor
Hiroshi Hattori
寛 服部
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP8331991A priority Critical patent/JPH10170817A/en
Publication of JPH10170817A publication Critical patent/JPH10170817A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To obtain a highly accurately focused image, by regarding the focal position calculated on a partial image in the size, of which reliability reaches a prescribed level, as the optimum focal position of the partial image. SOLUTION: The position in the image for calculating a peak position (focal position) and the size of the partial image in the image are transmitted to an image processing part 4 by a setting part 3. These are changed in accordance with a signal from an evaluation part 5. The reliability of the peak position calculated by the image processing part 4 is calculated by the evaluation part 5, then, whether the peak position is true or false is judged by the part 5, thereafter, a signal showing whether the peak position is true or false is transmitted to the setting part 3. That is, the partial image can be set by the setting part 3 with less fluctuation in its depth, and also, as large as possible, based on the evaluation transmitted from the evaluation part 5. Thus, by calculating the focal position at every object position on the image, the automatic focusing function capable of obtaining a clear image as a whole is accomplished.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、電子顕微鏡、ある
いは、光学電子顕微鏡などに使用される合焦位置算出装
置及び方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and a method for calculating a focus position used in an electron microscope or an optical electron microscope.

【0002】[0002]

【従来の技術】自動的にフォーカスを調節し、被写体の
鮮明な画像を得る合焦位置算出(オートフォーカス)
は、あらゆる光学機器にとって非常に重要な機能であ
る。
2. Description of the Related Art Focusing position calculation for automatically adjusting the focus and obtaining a clear image of a subject (autofocus)
Is a very important function for any optical device.

【0003】一般にオートフォーカスは、以下の2つの
ステップから構成される。
[0003] Generally, auto focus is composed of the following two steps.

【0004】 各フォーカスで得られる画像のピント
が合っている度合(鮮明度)を評価する。
The degree of sharpness (clearness) of an image obtained by each focus is evaluated.

【0005】 鮮明度のフォーカスに対する変化のピ
ークを求め、そのピーク値を合焦位置とする。
[0005] A peak of change in sharpness with respect to focus is obtained, and the peak value is set as a focus position.

【0006】図1に鮮明度のフォーカスに対する変化の
例を示す。この曲線を以下では鮮明度曲線と呼ぶ。同図
において、鮮明度曲線における鮮明度の最大値をとるフ
ォーカスの位置(以下、ピーク位置という)fpeakが合
焦位置となる。
FIG. 1 shows an example of a change in sharpness with respect to focus. This curve is hereinafter referred to as a sharpness curve. In the figure, a focus position (hereinafter referred to as a peak position) f peak at which the maximum value of the sharpness in the sharpness curve is obtained is the focus position.

【0007】鮮明な画像は、高周波成分を多く含み、ボ
ケが多くなるにつれて高周波成分が少なくなる。従っ
て、鮮明度の評価関数としては、画像の高周波成分の強
度を用いる。
A clear image contains many high frequency components, and the higher the blur, the smaller the high frequency components. Therefore, the intensity of the high frequency component of the image is used as the evaluation function of the sharpness.

【0008】ところで、対象までの光軸方向の距離(奥
行き)が画像全体でほぼ一定である場合には、画像全体
で鮮明度を評価し、鮮明度曲線のピーク位置を合焦位置
とすれば良い。
When the distance (depth) in the optical axis direction to the object is substantially constant over the entire image, the sharpness of the entire image is evaluated, and the peak position of the sharpness curve is set as the in-focus position. good.

【0009】しかし、合焦位置は奥行きによって変化す
るため、対象物の表面に凹凸があったり、平面であって
も撮像面に対して傾きが大きい場合(以下、これを「奥
行き変動がある対象物」という)には、奥行きが画像中
の位置によって異なるため、画像中の位置毎にフォーカ
スを調節する必要がある。
However, since the in-focus position changes depending on the depth, the surface of the object has irregularities, or even if the object is a plane, the inclination is large with respect to the imaging surface (hereinafter, this is referred to as “objects having depth fluctuations”). Since the depth differs depending on the position in the image, it is necessary to adjust the focus for each position in the image.

【0010】特に、光学顕微鏡、あるいは、電子顕微鏡
のようにレンズのフォーカス距離が大きい場合には、鮮
明な画像が得られるフォーカスの範囲であるフォーカス
深度が非常に浅いため、奥行き変動がある対象物に対し
て画像全体でフォーカスを調節すると、画像のある部分
にフォーカスが合っていても、他の部分はボケてしまっ
たり、平均的な奥行きにフォーカスが合ってしまい、画
像全体がボケてしまうというような問題が頻繁に生ず
る。
In particular, when the focus distance of the lens is large, such as in an optical microscope or an electron microscope, since the focus depth, which is the focus range in which a clear image can be obtained, is very shallow, an object having a depth variation If you adjust the focus of the whole image, even if one part of the image is in focus, the other part will be out of focus or the average depth will be in focus, and the whole image will be out of focus Such problems frequently occur.

【0011】画像中の位置毎にフォーカスを調節するた
めには、画像中の任意の位置にウィンドウを設定し、そ
のウィンドウ内の部分画像に対して鮮明度を評価し、鮮
明度曲線のピーク位置を求めればよい。しかし、ウィン
ドウのサイズが大きすぎると、奥行き変動の大きい領域
ではウィンドウ内に含まれる凹凸が大きくなるため、鮮
明度曲線が明確なピークを持たなくなり、正しい合焦位
置を求めることができない。また、逆にウィンドウのサ
イズが小さすぎると鮮明度の変化がノイズに埋もれてし
まい、ピークを検出できなくなるという問題がある。
In order to adjust the focus for each position in the image, a window is set at an arbitrary position in the image, the sharpness of a partial image in the window is evaluated, and the peak position of the sharpness curve is set. Should be obtained. However, if the size of the window is too large, the unevenness included in the window becomes large in a region where the depth variation is large, so that the sharpness curve does not have a clear peak, and a correct focus position cannot be obtained. On the other hand, if the size of the window is too small, the change in sharpness is buried in noise, and the peak cannot be detected.

【0012】[0012]

【発明が解決しようとする課題】上述の問題点をまとめ
ると、ウィンドウのサイズが大きい場合と小さい場合に
は、各々以下のような短所がある。
To summarize the above problems, there are the following disadvantages when the window size is large and when the window size is small.

【0013】 ウィンドウが大きい場合には、ノイズ
に強いが、奥行きの変動が大きい領域に対応できない。
When the window is large, it is resistant to noise, but cannot cope with an area where the depth varies greatly.

【0014】 ウィンドウが小さい場合には、奥行き
変動が大きい領域にも対応できるが、ノイズに弱い。
When the window is small, it can cope with a region where the depth variation is large, but is susceptible to noise.

【0015】そこで、本発明は、上記事情を鑑みてなさ
れたもので、奥行き変動ができるだけ小さく、かつ、で
きるだけサイズが大きな領域で鮮明度を評価するように
その設定を行うことによって、安定、かつ、高精度にフ
ォーカス調節を行う合焦位置算出装置及び方法に関す
る。
Therefore, the present invention has been made in view of the above circumstances, and has been set so that the sharpness is evaluated in an area where the depth variation is as small as possible and the size is as large as possible. And a focus position calculating apparatus and method for performing focus adjustment with high accuracy.

【0016】[0016]

【課題を解決するための手段】第1の発明は、対象物が
写ったフォーカスのそれぞれ異なる複数枚の画像よりな
る画像系列を入力する画像系列入力手段と、前記画像系
列入力手段へ入力した画像系列における各画像上の同じ
位置に対応する部分画像をそれぞれ切出して部分画像系
列を設定する画像処理手段と、前記画像処理手段によっ
て切出された部分画像系列を用いて、前記部分画像の合
焦位置を算出し、この算出した合焦位置の信頼度を評価
する評価手段と、前記評価手段の信頼度が所定レベルに
なるまで、前記画像処理手段が切出す部分画像のサイズ
を変化させ、前記信頼度が所定レベルに到達したサイズ
における部分画像で算出した合焦位置が、前記部分画像
の最適の合焦位置とする設定手段とよりなることを特徴
とする合焦位置算出装置である。
According to a first aspect of the present invention, there is provided an image sequence input means for inputting an image sequence composed of a plurality of images each having a different focus and in which an object is captured, and an image input to the image sequence input means. Image processing means for extracting a partial image corresponding to the same position on each image in the sequence to set a partial image sequence, and focusing on the partial image using the partial image sequence cut out by the image processing means Calculating a position, evaluating the reliability of the calculated focus position, and changing the size of the partial image cut out by the image processing unit until the reliability of the evaluation unit reaches a predetermined level; A focus position calculated for a partial image at a size at which the reliability has reached a predetermined level, and a setting unit for setting an optimum focus position for the partial image. It is a device.

【0017】本発明であると、設定手段が評価手段から
の評価を元にして、部分画像内の奥行きの変動が少な
く、かつ、できるだけ大きな部分画像のサイズを設定す
ることができるので、従来よりも高精度に焦点のあった
画像を求めることができる。
According to the present invention, the setting means can set the size of the partial image as small as possible with a small fluctuation of the depth in the partial image based on the evaluation from the evaluation means. Also, a focused image can be obtained with high accuracy.

【0018】第2の発明は、対象物が写ったフォーカス
のそれぞれ異なる複数枚の画像よりなる画像系列を入力
する画像系列入力ステップと、前記画像系列における各
画像上の同じ位置に対応する部分画像をそれぞれ切出し
て部分画像系列を設定する画像処理ステップと、前記部
分画像系列を用いて、前記部分画像の合焦位置を算出
し、この算出した合焦位置の信頼度を評価する評価ステ
ップと、前記信頼度が所定レベルになるまで、前記画像
処理ステップにおいて切出す部分画像のサイズを変化さ
せ、前記信頼度が所定レベルに到達したサイズにおける
部分画像で算出した合焦位置が、前記部分画像の最適の
合焦位置とする設定ステップとよりなることを特徴とす
る合焦位置算出方法である。
According to a second aspect of the present invention, there is provided an image sequence inputting step of inputting an image sequence composed of a plurality of images each having a different focus on which an object is captured, and a partial image corresponding to the same position on each image in the image sequence. An image processing step of cutting out and setting a partial image sequence, and an evaluation step of calculating a focus position of the partial image using the partial image sequence and evaluating the reliability of the calculated focus position, Until the reliability reaches a predetermined level, the size of the partial image cut out in the image processing step is changed, and the focus position calculated on the partial image at the size at which the reliability reaches the predetermined level is the focus position of the partial image. And a setting step of setting an optimum focus position.

【0019】[0019]

【発明の実施の形態】以下に、本発明の一実施例につい
て図2から図6を参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS.

【0020】本実施例の前記合焦位置算出装置は、電子
顕微鏡、あるいは、光学電子顕微鏡の自動焦点調節装置
に使用されるものである。
The in-focus position calculating device of the present embodiment is used for an automatic focusing device of an electron microscope or an optical electron microscope.

【0021】図2に本実施例における概略構成を示し、
図3にその動作を表すフローチャートを示す。
FIG. 2 shows a schematic structure of this embodiment.
FIG. 3 is a flowchart showing the operation.

【0022】ここでは、フォーカス制御部1、画像入力
部2、設定部3、画像処理部4、評価部5、出力部6か
ら構成され、電子顕微鏡、あるいは、光学電子顕微鏡の
構成の一部である。
Here, it is composed of a focus control unit 1, an image input unit 2, a setting unit 3, an image processing unit 4, an evaluation unit 5, and an output unit 6, and is a part of the configuration of an electron microscope or an optical electron microscope. is there.

【0023】フォーカス制御部1が画像入力部2のフォ
ーカスを制御し、フォーカスが少しずつ異なるF枚のフ
ォーカス変化画像系列I,I,……Iを画像入力
部2が入力し、そのF枚の画像を画像処理部4に送信す
る(ステップ1参照)。ここで、入力される画像に写っ
ている対象物は、奥行き変動があるものとする。
The focus control unit 1 controls the focus of the image input unit 2, the focus differs F pieces of focus change image sequence I 1 gradually, I 2, ...... I F image input unit 2 inputs the, the The F images are transmitted to the image processing unit 4 (see step 1). Here, it is assumed that the object shown in the input image has a depth variation.

【0024】設定部3では、ピーク位置(合焦位置)を
算出する画像中の位置(x,y)と、ウィンドウ(画像
中の部分画像)のサイズwを画像処理部3に送信する。
これらは評価部5からの信号によって変化する。
The setting unit 3 transmits to the image processing unit 3 the position (x, y) in the image for calculating the peak position (focus position) and the size w of the window (partial image in the image).
These change depending on the signal from the evaluation unit 5.

【0025】まず、評価部5は、画像を得たい対象とな
る位置(以下、対象位置という)(x,y)と、ウィン
ドウのサイズwの初期値を予め設定する(ステップ2,
3参照)。ここで、ウィンドウは、矩形の領域をいい、
対象位置を中心にその一辺の長さ(以下、これをサイズ
という)が変更される。
First, the evaluation unit 5 sets in advance a position (x, y) at which an image is to be obtained (hereinafter referred to as a target position) and an initial value of a window size w (steps 2 and 2).
3). Here, a window refers to a rectangular area,
The length of one side (hereinafter, referred to as size) of the target position is changed.

【0026】その後、評価部5から「偽」を表す信号が
送信された場合には、ウィンドウのサイズwを1段階小
さくする(ステップ11参照)。「真」を表す信号が送
信された場合には、対象位置(x,y)を次の位置に変
え(ステップ10参照)、ウィンドウのサイズwを初期
化する。
Thereafter, when a signal indicating "false" is transmitted from the evaluation unit 5, the window size w is reduced by one level (see step 11). When a signal indicating "true" is transmitted, the target position (x, y) is changed to the next position (see step 10), and the window size w is initialized.

【0027】画像処理部4は、図4のように、設定部3
から送信される画像中の対象位置(x,y)の鮮明度の
ピーク位置を設定部3から送信されるサイズwのウィン
ドウで算出する(ステップ4参照)。
The image processing unit 4 includes, as shown in FIG.
The peak position of the sharpness of the target position (x, y) in the image transmitted from is calculated in the window of the size w transmitted from the setting unit 3 (see step 4).

【0028】評価部5は、画像処理部4で算出されたピ
ーク位置の信頼度を算出し(ステップ5参照)、そのピ
ーク位置の真偽を判定し、真偽を表す信号を設定部3に
送信する。
The evaluation section 5 calculates the reliability of the peak position calculated by the image processing section 4 (see step 5), determines the authenticity of the peak position, and sends a signal indicating the authenticity to the setting section 3. Send.

【0029】ここで、ウィンドウのサイズが予め設定し
た閾値Thr1よりも小さくなった場合には信頼度に依
らず「真」を表す信号を送信する(ステップ6参照)。
Here, when the size of the window becomes smaller than the threshold value Thr1 set in advance, a signal indicating "true" is transmitted irrespective of the reliability (see step 6).

【0030】また、評価部5は、画像上の全画素に渡っ
て処理が終了したかどうかを判断し(ステップ8参
照)、終了した場合には、出力部6にその各画素の合焦
位置を送信し、出力部6が各画素の合焦位置を出力する
(ステップ9参照)。
The evaluation unit 5 determines whether or not the processing has been completed for all the pixels on the image (see step 8). When the processing has been completed, the output unit 6 outputs the in-focus position of each pixel. And the output unit 6 outputs the in-focus position of each pixel (see step 9).

【0031】以下では、ステップ5における画像中の対
象位置(x,y)の鮮明度のピーク位置を求める場合に
ついて詳細に説明する。
Hereinafter, the case where the sharpness peak position of the target position (x, y) in the image in the step 5 is obtained will be described in detail.

【0032】画像処理部4は、鮮明度曲線を以下のよう
に算出する。
The image processing section 4 calculates a sharpness curve as follows.

【0033】上述のように、鮮明な画像は、ボケた画像
よりも高周波成分の強度が大きくなる。従って、画像中
の対象位置(x,y)に対し、局所高域強調フィルタを
かけ、その出力を鮮明度とする。
As described above, the intensity of high-frequency components is higher in a clear image than in a blurred image. Therefore, a local high-frequency emphasis filter is applied to the target position (x, y) in the image, and the output is defined as sharpness.

【0034】ここでは、高域強調フィルタとして画像の
局所的な濃度勾配を算出するSobel微分フィルタを
用いる。Sobel微分フィルタの重み付けを図5に示
す。I,Iは、各々、x,y方向(各々画像の縦、
横方向)の濃度勾配を表す。フォーカスfにおける画像
上の点(x,y)の濃度勾配は、
Here, a Sobel differential filter for calculating a local density gradient of an image is used as a high-frequency emphasis filter. FIG. 5 shows the weighting of the Sobel differential filter. I x and I y are respectively in the x and y directions (the vertical and
(Horizontal direction). Gradient of a point on the image I f (x, y) is in the focus f,

【数1】 で計算されるから、画像Iの画像中の対象位置(x,
y)における鮮明度E(x,y,f)は、ウィンドウの
サイズを(2w+1)×(2w+1)とすると、
(Equation 1) In from the calculated target position in the image of the image I f (x,
The sharpness E (x, y, f) in y) is given by the size of the window as (2w + 1) × (2w + 1).

【数2】 より求めることができる。この処理を全フォーカスに対
して行うと、鮮明度曲線が得られる。
(Equation 2) More can be obtained. When this processing is performed for all focuses, a sharpness curve is obtained.

【0035】次に、鮮明度曲線のピーク位置fpeakを算
出する。
Next, the peak position f peak of the sharpness curve is calculated.

【0036】鮮明度曲線のピーク位置を求める方法とし
ては、ここでは、最も単純に、鮮明度が最大となるfを
ピーク位置fpeakとする。
As a method of obtaining the peak position of the sharpness curve, here, the simplest is to set f at which the sharpness becomes maximum as the peak position f peak .

【0037】評価部5では、算出したピーク位置の信頼
度Cを算出する(ステップ5参照)。算出したピーク位
置は、図6(a)のように鮮明度曲線が明確な鋭いピー
クを持つ場合には、信頼性が高く、(b),(c)のよ
うに、複数のピークが存在する場合や、明確なピークを
持たない場合には信頼性が低い。これらは、ウィンドウ
内に複数の奥行きが存在する場合に相当し、ウィンドウ
のサイズを小さくして再計算する必要がある。従って、
算出したピーク位置の信頼度Cを以下のように定義す
る。
The evaluation section 5 calculates the reliability C of the calculated peak position (see step 5). The calculated peak position is highly reliable when the sharpness curve has a sharp peak as shown in FIG. 6A, and there are a plurality of peaks as shown in FIGS. In some cases, or when there is no clear peak, the reliability is low. These correspond to the case where there are a plurality of depths in the window, and it is necessary to reduce the size of the window and perform recalculation. Therefore,
The calculated reliability C of the peak position is defined as follows.

【0038】[0038]

【数3】 式(3)の分母は、鮮明度曲線の区間0<f<Fにおけ
る面積であり、Cはピーク値の面積に対する比率であ
る。鮮明度曲線のピークが鋭い場合には、Cは高くな
り、そうでない場合には低くなる。
(Equation 3) The denominator of Expression (3) is the area in the section 0 <f <F of the sharpness curve, and C is the ratio of the peak value to the area. If the sharpness curve peak is sharp, C is high, otherwise it is low.

【0039】従って、信頼度Cが設定した閾値Thr2
よりも大きければ、そのピーク位置fpeakをその画像中
の対象位置の合焦位置とする(ステップ7参照)。この
時、設定部3に真を表す信号を送信し、設定部3は鮮明
度を評価する画像中の対象位置を次の位置に設定し、ウ
ィンドウのサイズを初期化する。Cが設定した閾値より
も小さければ、設定部3に「偽」を表す信号を送信し、
設定部3がウィンドウのサイズを1段階小さく設定し、
鮮明度を評価する処理を再度行う(ステップ11参
照)。
Accordingly, the threshold value Thr2 set by the reliability C
If it is larger, the peak position f peak is set as the focus position of the target position in the image (see step 7). At this time, a signal indicating true is transmitted to the setting unit 3, and the setting unit 3 sets the target position in the image for which the sharpness is to be evaluated to the next position, and initializes the window size. If C is smaller than the set threshold, a signal indicating "false" is transmitted to the setting unit 3,
The setting unit 3 sets the size of the window one step smaller,
The processing for evaluating the sharpness is performed again (see step 11).

【0040】以上の処理を画像中の任意の対象位置
(x,y)について行い、画像上の対象位置毎に合焦位
置を算出することにより、全体に渡って鮮明な画像を得
るオートフォーカス機能が実現される。
The above processing is performed for an arbitrary target position (x, y) in an image, and a focus position is calculated for each target position on the image, so that a clear image is obtained over the entire image. Is realized.

【0041】また、画像の全ての位置で鮮明な画像を得
ることができる。さらに、鮮明度を評価する処理は、局
所演算であるから、画像処理ハードウェアを用いた高速
化が容易であり、その実用的効果は多大である。
Further, clear images can be obtained at all positions of the image. Further, since the processing for evaluating the sharpness is a local operation, it is easy to increase the speed using image processing hardware, and the practical effect is great.

【0042】(変更例) 本実施例では、鮮明度が最大となるfを鮮明度曲線
のピーク位置としているが、鮮明度曲線に、ガウス曲線
等の曲線を当てはめ、その曲線のピークを求める方法を
用いてもよい。
(Modification) In this embodiment, f at which the sharpness becomes maximum is set as the peak position of the sharpness curve. A method such as a Gaussian curve is applied to the sharpness curve to find the peak of the curve. May be used.

【0043】 鮮明度としてSobel微分フィルタ
を用いているが、他の微分フィルタを用いてもよいし、
また、他の高周波成分を取り出すフィルタ、例えば、局
所分散を用いてもよいし、フーリエ変換を用いて周波数
解析を行ってもよい。
Although the Sobel differential filter is used as the definition, another differential filter may be used.
Further, a filter for extracting another high-frequency component, for example, a local variance may be used, or a frequency analysis may be performed using a Fourier transform.

【0044】 ウィンドウのサイズを初期値から少し
ずつ小さくして繰り返し計算を行っているが、初期値か
ら少しずつ大きくして繰り返し計算を行ってもよい。フ
ローチャートを図7に示す。
Although the repetitive calculation is performed by gradually reducing the window size from the initial value, the calculation may be repeatedly performed by gradually increasing the window size from the initial value. The flowchart is shown in FIG.

【0045】この場合、最終のウィンドウのサイズか
ら、鮮明度曲線のピークと信頼度を算出し、信頼度が設
定した閾値よりも大きくなるか、ウィンドウのサイズが
設定した限界値に達するまで、ウィンドウのサイズを大
きくしながら繰り返し計算を行う。
In this case, the peak and reliability of the sharpness curve are calculated from the size of the final window, and the window is calculated until the reliability becomes larger than the set threshold value or the window size reaches the set limit value. The calculation is repeated while increasing the size of.

【0046】 合焦位置の信頼度として式(3)を用
いているが、鮮明度曲線にガウス曲線等の曲線を当ては
め、その残差を信頼度としてもよい。
Although equation (3) is used as the reliability of the focus position, a curve such as a Gaussian curve may be applied to the sharpness curve, and the residual may be used as the reliability.

【0047】 図8に示すような方法を用いても良
い。
A method as shown in FIG. 8 may be used.

【0048】まず、画像全体で鮮明度曲線のピーク位置
とその信頼度を求める。その信頼度が低ければ、全画像
を4つの領域A,B,C,Dに分割し、各領域の鮮明度
曲線のピーク位置とその信頼度を求める。ここで、領域
A以外の信頼度が高ければ、領域Aのみ小領域a,b,
c,dに分割し、各領域の鮮明度曲線のピーク位置とそ
の信頼度を求める。このような処理を画像の全領域に渡
って鮮明度のピーク位置が求められるか、領域のサイズ
が限界値に達するまで繰り返す。また、逆に、予め画像
を小領域に分割し、その小領域を統合していくという方
法を用いてもよい。
First, the peak position of the sharpness curve and its reliability are obtained for the entire image. If the reliability is low, the entire image is divided into four regions A, B, C, and D, and the peak position of the sharpness curve of each region and its reliability are obtained. Here, if the reliability other than the area A is high, only the area A has the small areas a, b,
The area is divided into c and d, and the peak position of the sharpness curve of each area and its reliability are obtained. Such processing is repeated until the peak position of the sharpness is obtained over the entire area of the image or the size of the area reaches the limit value. Conversely, a method of dividing an image into small regions in advance and integrating the small regions may be used.

【0049】 上記実施例では、フォーカス制御部
1、画像入力部2、設定部3、画像処理部4、評価部
5、出力部6の機能をハード的に説明したが、これに代
えて図3及び図7の処理をプログラムにして記録媒体に
記憶させ、これを電子顕微鏡、あるいは、光学電子顕微
鏡の記憶装置に移して、本実施例を実行してもよい。
In the above embodiment, the functions of the focus control unit 1, the image input unit 2, the setting unit 3, the image processing unit 4, the evaluation unit 5, and the output unit 6 have been described in terms of hardware. 7 may be stored in a recording medium as a program, and the program may be transferred to a storage device of an electron microscope or an optical electron microscope to execute the present embodiment.

【0050】その他、本発明の要旨を逸脱しない範囲で
変形を実施できる。
In addition, modifications can be made without departing from the gist of the present invention.

【0051】[0051]

【発明の効果】本発明であると、設定手段が評価手段か
らの評価を元にして、部分画像内の奥行きの変動が少な
く、かつ、できるだけ大きな部分画像を設定することが
できるので、従来よりも高精度に焦点のあった画像を求
めることができる。
According to the present invention, the setting means can set the largest possible partial image with little variation in the depth within the partial image based on the evaluation from the evaluation means. Also, a focused image can be obtained with high accuracy.

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

【図1】鮮明度曲線を示すグラフの図である。FIG. 1 is a graph showing a sharpness curve.

【図2】本実施例の全体構成図である。FIG. 2 is an overall configuration diagram of the present embodiment.

【図3】本実施例のフローチャートである。FIG. 3 is a flowchart of the present embodiment.

【図4】合焦位置算出法を示す説明図である。FIG. 4 is an explanatory diagram showing a focus position calculation method.

【図5】Sobel微分マスクである。FIG. 5 is a Sobel differential mask.

【図6】信頼度を説明するための図である。FIG. 6 is a diagram for explaining reliability.

【図7】本実施例の変更例のフローチャートである。FIG. 7 is a flowchart of a modification of the present embodiment.

【図8】変更例である分割方式を説明するための図であ
る。
FIG. 8 is a diagram for explaining a division method which is a modification example.

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

1 フォーカス制御部 2 画像入力部 3 設定部 4 画像処理部 5 評価部 6 出力部 Reference Signs List 1 focus control unit 2 image input unit 3 setting unit 4 image processing unit 5 evaluation unit 6 output unit

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】対象物が写ったフォーカスのそれぞれ異な
る複数枚の画像よりなる画像系列を入力する画像系列入
力手段と、 前記画像系列入力手段により入力した画像系列から、前
記対象物の所定の領域が写った部分画像をそれぞれ切出
して、前記領域が写ったフォーカスのそれぞれ異なる複
数枚の部分画像から構成される部分画像系列を作成する
部分画像系列作成手段と、 前記部分画像系列作成手段によって切出される部分画像
のサイズを変化させて、この部分画像に写っている領域
の大きさを変更する部分画像サイズ変更手段と、 前記部分画像系列作成手段によって作成された部分画像
系列から合焦位置を算出し、この算出した合焦位置の信
頼度を評価する評価手段と、 前記評価手段の信頼度が所定レベルになるまで、前記部
分画像サイズ変更手段によって前記画像処理手段が切出
す部分画像のサイズを変化させ、前記信頼度が所定レベ
ルに到達したときのサイズの部分画像から構成される部
分画像系列から算出した合焦位置が、前記部分画像に写
った領域の合焦位置とする制御手段を有することを特徴
とする合焦位置算出装置。
1. An image sequence input means for inputting an image sequence composed of a plurality of images each having a different focus on which an object is captured, and a predetermined area of the object based on the image sequence input by the image sequence input means. A partial image sequence creating unit that creates a partial image sequence composed of a plurality of partial images each having a different focus and in which the region is captured, and A partial image size changing means for changing the size of the area shown in the partial image by changing the size of the partial image to be obtained, and calculating a focus position from the partial image sequence created by the partial image sequence creating means Evaluation means for evaluating the reliability of the calculated in-focus position; and the partial image size until the reliability of the evaluation means reaches a predetermined level. The size of the partial image cut out by the image processing means is changed by the size changing means, and the focus position calculated from the partial image sequence composed of the partial images of the size when the reliability reaches a predetermined level is the focus position. An in-focus position calculating device comprising control means for setting an in-focus position of an area shown in a partial image.
【請求項2】前記評価手段は、 前記部分画像系列に各部分画像毎にその鮮明度を求め、 これら求めた鮮明度から、前記鮮明度とフォーカスの関
係を示す鮮明度曲線を求め、 この鮮明度曲線の鮮明度の最大値に対応するフォーカス
を合焦位置となし、 前記最大値と前記鮮明度曲線の関係から前記合焦位置の
信頼度を評価することを特徴とする請求項1に記載の合
焦位置算出装置。
2. The evaluation means obtains a sharpness of each partial image in the partial image sequence, obtains a sharpness curve indicating a relationship between the sharpness and focus from the obtained sharpness, and The focus corresponding to the maximum value of the sharpness of the degree curve is defined as an in-focus position, and the reliability of the in-focus position is evaluated from the relationship between the maximum value and the sharpness curve. Focusing position calculation device.
【請求項3】電子型または光学型の電子顕微鏡の自動焦
点調節装置に請求項1または請求項2の合焦位置算出装
置を設け、この合焦位置算出装置によって対象物に対す
る合焦位置を求めることを特徴とする電子顕微鏡。
3. An in-focus system for an electronic or optical electron microscope, wherein the in-focus position calculating device according to claim 1 or 2 is provided, and the in-focus position calculating device determines a in-focus position for an object. An electron microscope characterized by the above-mentioned.
【請求項4】対象物が写ったフォーカスのそれぞれ異な
る複数枚の画像よりなる画像系列を入力する画像系列入
力ステップと、 前記画像系列から、前記対象物の所定の領域が写った部
分画像をそれぞれ切出して、前記領域が写ったフォーカ
スのそれぞれ異なる複数枚の部分画像から構成される部
分画像系列を作成する部分画像系列作成ステップと、 前記部分画像系列作成ステップにおいて切出される部分
画像のサイズを変化させて、この部分画像に写っている
領域の大きさを変更する部分画像サイズ変更ステップ
と、 前記部分画像系列作成ステップにおいて作成された部分
画像系列から合焦位置を算出し、この算出した合焦位置
の信頼度を評価する評価ステップと、 前記評価ステップの信頼度が所定レベルになるまで、前
記部分画像サイズ変更ステップにおいて前記切出す部分
画像のサイズを変化させ、前記信頼度が所定レベルに到
達したときのサイズの部分画像から構成される部分画像
系列から算出した合焦位置が、前記部分画像に写った領
域の合焦位置とする制御ステップを有することを特徴と
する合焦位置算出方法。
4. An image sequence inputting step of inputting an image sequence composed of a plurality of images each having a different focus on which an object is photographed, and extracting, from the image sequence, partial images each showing a predetermined region of the object. A partial image sequence creating step of extracting and creating a partial image sequence composed of a plurality of partial images each having a different focus where the region is captured, and changing a size of the partial image cut out in the partial image sequence creating step A partial image size changing step of changing the size of the region shown in the partial image; and a focusing position calculated from the partial image sequence created in the partial image sequence creating step. An evaluation step of evaluating the reliability of the position; and the partial image size until the reliability of the evaluation step reaches a predetermined level. In the changing step, the size of the cut-out partial image is changed, and the focus position calculated from the partial image sequence composed of the partial images of the size when the reliability reaches the predetermined level is reflected in the partial image. A focus position calculation method comprising a control step of setting a focus position of an area.
【請求項5】前記評価ステップは、 前記部分画像系列に各部分画像毎にその鮮明度を求め、 これら求めた鮮明度から、前記鮮明度とフォーカスの関
係を示す鮮明度曲線を求め、 この鮮明度曲線の鮮明度の最大値に対応するフォーカス
を合焦位置となし、 前記最大値と前記鮮明度曲線の関係から前記合焦位置の
信頼度を評価することを特徴とする請求項1に記載の合
焦位置算出方法。
5. The evaluation step comprises: obtaining a sharpness of each partial image in the partial image sequence; obtaining a sharpness curve indicating a relationship between the sharpness and focus from the obtained sharpness; The focus corresponding to the maximum value of the sharpness of the degree curve is defined as an in-focus position, and the reliability of the in-focus position is evaluated from the relationship between the maximum value and the sharpness curve. Focus position calculation method.
【請求項6】電子型または光学型の電子顕微鏡における
自動焦点調節方法に請求項4または請求項5の合焦位置
算出方法を用い、この合焦位置算出方法によって対象物
に対する合焦位置を求めることを特徴とする電子顕微
鏡。
6. An automatic or automatic focus adjustment method for an electronic or optical electron microscope, wherein the in-focus position calculating method according to claim 4 or 5 is used, and the in-focus position for the object is obtained by the in-focus position calculating method. An electron microscope characterized by the above-mentioned.
JP8331991A 1996-12-12 1996-12-12 Method and device for calculating focal position, and electron microscope using the same Pending JPH10170817A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8331991A JPH10170817A (en) 1996-12-12 1996-12-12 Method and device for calculating focal position, and electron microscope using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8331991A JPH10170817A (en) 1996-12-12 1996-12-12 Method and device for calculating focal position, and electron microscope using the same

Publications (1)

Publication Number Publication Date
JPH10170817A true JPH10170817A (en) 1998-06-26

Family

ID=18249925

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8331991A Pending JPH10170817A (en) 1996-12-12 1996-12-12 Method and device for calculating focal position, and electron microscope using the same

Country Status (1)

Country Link
JP (1) JPH10170817A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005333587A (en) * 2004-05-21 2005-12-02 Seiko Epson Corp Photographing apparatus and its control method
JP2006107919A (en) * 2004-10-05 2006-04-20 Hitachi High-Technologies Corp Charged particle beam device and dimension measuring method
JP2007178480A (en) * 2005-12-27 2007-07-12 Samsung Techwin Co Ltd Digital camera, automatic focusing method and automatic focusing program
JP2007214009A (en) * 2006-02-10 2007-08-23 Topcon Corp Image sharpness evaluation method and astigmatism evaluation method of charged particle beam apparatus, charged particle beam apparatus using these methods, and computer program
JP2010256724A (en) * 2009-04-27 2010-11-11 Olympus Corp Observation device
CN114324278A (en) * 2021-12-29 2022-04-12 常州奥创医疗科技有限公司 Fluorescent dark field automatic focusing method based on self-adaptive grid
CN114584700A (en) * 2020-11-30 2022-06-03 京东方科技集团股份有限公司 Focusing marking method, marking device and electronic equipment

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005333587A (en) * 2004-05-21 2005-12-02 Seiko Epson Corp Photographing apparatus and its control method
JP2006107919A (en) * 2004-10-05 2006-04-20 Hitachi High-Technologies Corp Charged particle beam device and dimension measuring method
JP4511303B2 (en) * 2004-10-05 2010-07-28 株式会社日立ハイテクノロジーズ Charged particle beam apparatus and dimension measuring method
US7973282B2 (en) 2004-10-05 2011-07-05 Hitachi High-Technologies Corporation Charged particle beam apparatus and dimension measuring method
JP2007178480A (en) * 2005-12-27 2007-07-12 Samsung Techwin Co Ltd Digital camera, automatic focusing method and automatic focusing program
JP2007214009A (en) * 2006-02-10 2007-08-23 Topcon Corp Image sharpness evaluation method and astigmatism evaluation method of charged particle beam apparatus, charged particle beam apparatus using these methods, and computer program
JP4762745B2 (en) * 2006-02-10 2011-08-31 株式会社トプコン Image sharpness evaluation method of charged particle beam apparatus, astigmatism evaluation method, charged particle beam apparatus using these methods, and computer program
JP2010256724A (en) * 2009-04-27 2010-11-11 Olympus Corp Observation device
CN114584700A (en) * 2020-11-30 2022-06-03 京东方科技集团股份有限公司 Focusing marking method, marking device and electronic equipment
CN114584700B (en) * 2020-11-30 2024-04-05 京东方科技集团股份有限公司 Focusing marking method, marking device and electronic equipment
CN114324278A (en) * 2021-12-29 2022-04-12 常州奥创医疗科技有限公司 Fluorescent dark field automatic focusing method based on self-adaptive grid
CN114324278B (en) * 2021-12-29 2024-05-24 常州奥创医疗科技有限公司 Fluorescent dark field automatic focusing method based on self-adaptive grid

Similar Documents

Publication Publication Date Title
US9361680B2 (en) Image processing apparatus, image processing method, and imaging apparatus
US8218061B2 (en) Apparatus, method, and manufacture for iterative auto-focus using depth-from-defocus
CN108259753B (en) Camera automatic focusing method and device based on defocus estimation and improved hill climbing method
US8553137B2 (en) Image data processing method and apparatus
US20090052795A1 (en) System and method for auto-focusing an image
CA2155529A1 (en) Imaging apparatus and method for determining range from focus and focus information
US9509977B2 (en) Image processing system and microscope system including the same
US9715721B2 (en) Focus detection
US5396336A (en) In-focus detecting device
KR102582261B1 (en) Method for determining a point spread function of an imaging system
US9485407B2 (en) Method of capturing images and obtaining information of the images
US20120249770A1 (en) Method for automatically focusing a microscope on a predetermined object and microscope for automatic focusing
JPH05137047A (en) Method and device for detection of focal point
US20030223009A1 (en) Photographing apparatus
JPH10170817A (en) Method and device for calculating focal position, and electron microscope using the same
JP2001331806A (en) Image processing system
JP3093057B2 (en) Automatic focus detection device
KR100577523B1 (en) Apparatus for adaptive auto focus control and auto focus controlling method
US11115582B2 (en) Imaging control apparatus, imaging apparatus, and recording medium
KR101025568B1 (en) Apparatus and method for focusing position decision using entropy of image
KR101056051B1 (en) Focus Control and Method of Auto Focus System
US20070036461A1 (en) Deconvolution of a digital image
JPH10154479A (en) Focusing position computing apparatus and method
US11854239B2 (en) Image processing device, imaging device, image processing method, and recording medium
CN114785952A (en) Automatic focusing method of continuous zooming television sighting device based on FPGA

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040409

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20041109