JP2008185603A - Automatic focusing device and method - Google Patents
Automatic focusing device and method Download PDFInfo
- Publication number
- JP2008185603A JP2008185603A JP2007016283A JP2007016283A JP2008185603A JP 2008185603 A JP2008185603 A JP 2008185603A JP 2007016283 A JP2007016283 A JP 2007016283A JP 2007016283 A JP2007016283 A JP 2007016283A JP 2008185603 A JP2008185603 A JP 2008185603A
- Authority
- JP
- Japan
- Prior art keywords
- subject
- image
- focus
- evaluation value
- focus evaluation
- 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
Links
Images
Abstract
Description
本発明は、画像パタンが形成された被写体面上にフォーカス位置を合わせるオートフォーカス装置および方法に関する。 The present invention relates to an autofocus apparatus and method for adjusting a focus position on a subject surface on which an image pattern is formed.
従来、画像信号を元にオートフォーカスを行う方法としてコントラスト方式が知られている。
コントラスト方式は、合焦時には被写体画像のコントラストが高くなることを利用して、撮影した画像の特定範囲(以下、フォーカスエリアと称する)内における画像信号の高周波成分を積算した値を焦点評価値とし、フォーカス位置を変える毎に焦点評価値を算出し、焦点評価値が最大となるフォーカス位置に自動調整する方式である。
一方、所望の被写体に正確に合焦するために、被写体位置の検出を行い、所望の被写体位置におけるフォーカスエリアによりピント調整を行うオートフォーカス方法が知られている。
例えば、特許文献1には、フレームごとの画像信号の差分をとって複数の移動体を検出し、その中からピントを合わせるべき被写体と類似の色相を有する移動体を選択し、その移動体上にフォーカスエリアを設定することにより、移動する被写体に常に合焦できるようにしたオートフォーカスシステムが記載されている。
また、特許文献2には、画面内の広い領域で被写体距離を求めるとともに、画面内の複数の測距ポイントの像信号の空間周波または振幅のパターンにより測距結果を選択して、主被写体を雑被写体から区別してピントを合わせるオートフォーカスカメラが記載されている。
The contrast method uses the fact that the contrast of the subject image increases during focusing, and the focus evaluation value is a value obtained by integrating the high-frequency components of the image signal within a specific range of the captured image (hereinafter referred to as a focus area). The focus evaluation value is calculated every time the focus position is changed, and automatically adjusted to the focus position where the focus evaluation value is maximized.
On the other hand, in order to focus accurately on a desired subject, an autofocus method is known in which a subject position is detected and focus adjustment is performed using a focus area at the desired subject position.
For example, in
In
しかしながら、上記のような従来のオートフォーカス装置および方法には以下のような問題があった。
まずコントラスト方式は、コントラストの情報のみで被写体を判別しようとするので、ピントを合わせたい主被写体が画面内の一部を占め、主被写体以外の雑被写体が画面内に含まれる場合、雑被写体がコントラストの高い物体であると、雑被写体にピントが合ってしまうという問題がある。
特許文献1に記載の技術では、移動体を抽出して位置検出を行ってから、移動体の中で被写体を選択するので、主被写体が移動している場合には主被写体を検出してピントを合わせることができるものの、静止している場合には、主被写体にピントを合わせることができないという問題がある。
特許文献2に記載の技術では、被写体の測距と像信号によるパタン判別とを組み合わせることにより主被写体にピントを合わせるようにしているが、そのために測距手段を備える必要があるという問題がある。
また、各測距ポイントごとに、測距、パタン判別、およびそれらの組合せ判定の工程が必要となるため、測距ポイントが多くなると迅速なピント調整ができない恐れがあるという問題がある。
However, the conventional autofocus apparatus and method as described above have the following problems.
First, the contrast method tries to identify the subject only with the contrast information, so the main subject that you want to focus on occupies a part of the screen, and if there are miscellaneous subjects other than the main subject in the screen, If the object is high in contrast, there is a problem that a miscellaneous subject is in focus.
In the technique described in
In the technique described in
In addition, since the steps of ranging, pattern discrimination, and combination thereof are required for each ranging point, there is a problem that rapid focus adjustment may not be possible when the number of ranging points increases.
本発明は、上記のような問題に鑑みてなされたものであり、画面内にピントを合わせるべき被写体とそれ以外の雑被写体が混在していても、画面内の被写体の位置検出を行うことなく、また測距手段を備えることもなく、被写体にピント合せることができるオートフォーカス装置および方法を提供することを目的とする。 The present invention has been made in view of the above-described problems. Even when a subject to be focused on and other miscellaneous subjects are mixed in the screen, the position of the subject in the screen is not detected. It is another object of the present invention to provide an autofocus apparatus and method that can focus on a subject without providing a distance measuring means.
上記の課題を解決するために、請求項1に記載の発明では、被写体にフォーカス位置を合わせるためのオートフォーカス装置であって、前記被写体を含む所定領域の画像信号を取得する撮像部と、該撮像部のフォーカス位置を可変する撮像制御部と、前記撮像部により得られた前記所定領域の画像信号を演算して画像の鮮鋭度に対応した焦点評価値を算出するとともに、各フォーカス位置での前記焦点評価値を比較する演算部とを備え、前記焦点評価値が、前記被写体の画像特徴を有する画像の鮮鋭度に対して相対的に高い評価値を与える構成とする。
この発明によれば、被写体の画像特徴を有する画像の鮮鋭度が相対的に高い評価値となる焦点評価値が算出されるので、所定領域内に被写体と異なる画像特徴を有する雑被写体が混在する場合であっても、被写体の画像の鮮鋭度が最も高くなるフォーカス位置を検出することができ、雑被写体にピントが合うことを防止できる。
In order to solve the above-described problem, in the invention according to
According to the present invention, since the focus evaluation value that is an evaluation value with a relatively high sharpness of the image having the image feature of the subject is calculated, a miscellaneous subject having an image feature different from the subject is mixed in the predetermined region. Even in this case, it is possible to detect the focus position where the sharpness of the image of the subject is the highest, and it is possible to prevent focusing on the miscellaneous subject.
請求項2に記載の発明では、請求項1に記載のオートフォーカス装置において、前記焦点評価値が、前記被写体の画像特徴を強調する演算により算出される構成とする。
この発明によれば、焦点評価値を、被写体の画像特徴を強調する演算を行うことにより算出するので、被写体の画像特徴を含む画像信号に対して焦点評価値が高くなる。したがって、画像の特徴抽出やパタン比較などの演算を行う場合に比べて、簡素な演算により焦点評価値を求めることができる。
According to a second aspect of the present invention, in the autofocus device according to the first aspect, the focus evaluation value is calculated by a calculation that emphasizes the image feature of the subject.
According to the present invention, since the focus evaluation value is calculated by performing the calculation that emphasizes the image feature of the subject, the focus evaluation value becomes higher with respect to the image signal including the image feature of the subject. Accordingly, it is possible to obtain the focus evaluation value by a simple calculation as compared with the case of performing calculation such as image feature extraction or pattern comparison.
請求項3に記載の発明では、請求項1または2に記載のオートフォーカス装置において、前記被写体の画像特徴を強調する演算が、空間フィルタを用いた演算により行われる構成とする。
この発明によれば、空間フィルタを用いた演算により焦点評価値を求めるため、簡素かつ高速な演算処理とすることができる。
また、画像の画像特徴が異なる被写体に対しても、空間フィルタの設定を変えるだけで対応できるので、汎用性の高い処理を行うことができる。
According to a third aspect of the present invention, in the autofocus device according to the first or second aspect, the calculation for enhancing the image feature of the subject is performed by a calculation using a spatial filter.
According to the present invention, since the focus evaluation value is obtained by calculation using a spatial filter, simple and high-speed calculation processing can be achieved.
Also, it is possible to deal with subjects having different image characteristics by simply changing the setting of the spatial filter, so that highly versatile processing can be performed.
請求項4に記載の発明では、被写体にフォーカス位置を合わせるためのオートフォーカス方法であって、前記被写体を含む所定領域の画像信号を、フォーカス位置を可変して取得し、前記所定領域の画像信号に前記被写体の画像特徴を強調する演算を施し、該演算が施された画像信号から、画像の鮮鋭度を評価する焦点評価値を算出し、前記各フォーカス位置での前記焦点評価値を比較し、該比較結果に基づいて、フォーカス位置を調整する方法とする。
この発明によれば、フォーカス位置を移動して、被写体を含む所定領域の画像信号を取得し、その画像信号のうち、被写体の画像特徴を強調する演算を施して、画像の鮮鋭度を評価する焦点評価値を算出し、各フォーカス位置での焦点評価値を比較して、比較結果に基づいてフォーカス位置を調整する。
そのため、所定領域内に被写体と異なる画像特徴を有する雑被写体が混在している場合でも、被写体の画像の鮮鋭度に対応したフォーカス位置に調整され、被写体にピントを合わせることができる。
According to a fourth aspect of the present invention, there is provided an autofocus method for adjusting a focus position on a subject, wherein an image signal of a predetermined area including the subject is obtained by varying a focus position, and the image signal of the predetermined area is acquired. A focus evaluation value for evaluating the sharpness of the image is calculated from the image signal subjected to the calculation, and the focus evaluation values at the respective focus positions are compared. The focus position is adjusted based on the comparison result.
According to the present invention, the focus position is moved to acquire an image signal of a predetermined area including the subject, and the image sharpness of the image is evaluated by performing an operation for enhancing the image feature of the subject in the image signal. The focus evaluation value is calculated, the focus evaluation values at the respective focus positions are compared, and the focus position is adjusted based on the comparison result.
For this reason, even when a miscellaneous subject having an image characteristic different from that of the subject is mixed in the predetermined area, the focus position is adjusted to correspond to the sharpness of the subject image, and the subject can be focused.
本発明のオートフォース装置および方法によれば、所定領域の画像信号から、被写体の画像特徴を有する画像の鮮鋭度が相対的に高い評価値となる焦点評価値を算出して、各フォーカス位置での焦点評価値を比較し、フォーカス位置の調整を行うことができるので、被写体と異なる画像特徴を有する雑被写体が混在していても、被写体の位置検出を行うことなく、また測距手段を備えることもなく、被写体にピントを合わせることができるという効果を奏する。 According to the auto-force device and method of the present invention, a focus evaluation value, which is an evaluation value with a relatively high sharpness of an image having an image feature of a subject, is calculated from an image signal of a predetermined region, and at each focus position. Focus evaluation values can be compared and the focus position can be adjusted. Therefore, even if a miscellaneous subject having image characteristics different from that of the subject is present, the subject position is not detected and the distance measuring means is provided. There is also an effect that the subject can be focused.
以下では、本発明の実施の形態について添付図面を参照して説明する。
本発明の実施形態に係るオートフォーカス装置について説明する。
図1は、本発明の実施形態に係るオートフォーカス装置の概略構成について説明するための機能ブロック図である。図2(a)は、本発明の実施形態に係るオートフォーカス装置の被写体および雑被写体の一例について説明するための平面視模式図である。XY座標系は図示の上下(Y軸方向)、および左右(X軸方向)を参照するための座標軸である。図2(b)は、図2(a)の縦断面における高さを示すグラフである。図2(c)は、図2(a)の被写体および雑被写体の表面の画像について説明するための画像信号の微分値を示すグラフである。図2(b)、(c)の縦軸はそれぞれ高さ、画像信号の微分値であり、横軸は画素位置である。
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
An autofocus device according to an embodiment of the present invention will be described.
FIG. 1 is a functional block diagram for explaining a schematic configuration of an autofocus device according to an embodiment of the present invention. FIG. 2A is a schematic plan view for explaining an example of a subject and a miscellaneous subject of the autofocus device according to the embodiment of the present invention. The XY coordinate system is a coordinate axis for referring to the illustrated upper and lower sides (Y-axis direction) and left and right (X-axis direction). FIG.2 (b) is a graph which shows the height in the longitudinal cross-section of Fig.2 (a). FIG. 2C is a graph showing the differential value of the image signal for explaining the images of the surface of the subject and the miscellaneous subject in FIG. 2B and 2C, the vertical axis represents the height and the differential value of the image signal, and the horizontal axis represents the pixel position.
本実施形態のオートフォーカス装置1は、特徴抽出可能な画像を有する被写体にフォーカス位置を合わせるための装置である。したがって、そのような被写体を撮像する撮像システムであれば、例えば、カメラ、ヴィデオ、顕微鏡などの種々の光学システムに用いることができるが、以下では、例えば半導体ウエハや液晶ガラス基板などの規則的な画像パタンを有する被検体を撮像する場合の例で説明する。
The
オートフォーカス装置1の概略構成は、図1に示すように、撮像部2、撮像制御部3、画像取込部5、演算部7、保存部6、モニタ8、設定部9および全体制御部4からなる。
被写体11は、例えば、半導体ウエハや液晶ガラス基板などの平板状で、表面に基板パタンなどによる規則的な画像パタンが形成されたものである。そして、試料台12上に載置されている。
As shown in FIG. 1, the schematic configuration of the
The
撮像部2は、被写体を含む所定領域の画像信号を取得するためのもので、図示しないが、例えば適宜のレンズ構成を有する撮像光学系とCCDエリアセンサなどからなる撮像素子とを備える。
そして、撮像光学系により被写体11を含む所定領域の像を撮像素子の撮像面に結像し、光電変換して、所定領域をフレーム範囲とする画像信号100を取得できるようになっている。
本実施形態での撮像部2は、被写体11の一部を所定の倍率に拡大観察する対物レンズを備えた顕微鏡に適用した例を示している。
なお、撮像部2は、図示しない移動機構により、試料台12に対して相対的に移動できるようになっており、被写体11上の適宜位置に移動できるようになっている。
The
Then, an image of a predetermined area including the
The
The
撮像制御部3は、撮像部2のフォーカス位置を可変するための制御機構である。そして、全体制御部4からの制御信号に基づいて、撮像部2の撮像光学系の対物レンズ位置を移動することにより、フォーカス位置を可変できる構成とされている。
The
画像取込部5は、撮像部2により取得された1フレーム分の画像信号100をフォーカス位置の情報とともに画像データとして取り込むものである。
演算部7は、画像取込部5により取り込まれた画像信号100に対して、被写体11の画像パタンの画像特徴部分における画像の鮮鋭度に対応した焦点評価値を算出するためのものである。
画像取込部5、演算部7はそれぞれ専用の処理回路を備えたハードウェアから構成してもよいが、本実施形態では、CPU、メモリ、画像データの入出力インタフェースなどを備えたコンピュータを用いて、それぞれの処理に対応したプログラムを実行することにより実現している。
The
The
The
保存部6は、演算部7の処理の設定データや、画像取込部5に取り込まれた画像信号100などを保存するためのもので、例えば、ハードディスクなどを採用できる。
モニタ8は、画像取込部5が取り込んだ画像信号100や、設定部9により操作入力するための操作画面などを表示を行うものである。
設定部9は、オートフォーカス装置1を動作させるために必要な操作入力を行うためのもので、例えば、文字入力するためのキーボードや、マウスなどのポインティングデバイスが採用できる。
全体制御部4は、設定部9の操作入力に基づいて、撮像制御部3、画像取込部5、演算部7、保存部6、モニタ8に必要な制御信号を送って、これらの動作制御を行うためのものである。
The
The
The
Based on the operation input of the
次に、オートフォーカス装置1の動作原理について説明する。
例えば、被写体11の表面の画像パタンが、図2(a)に示すように、図示のY軸方向に沿って延され、比較的低輝度の地肌部16上にX軸方向に等ピッチで設けられた縦線状パタン15からなり、被写体11上に、縦線状パタン15とは異なる、例えば異物13(雑被写体)が付着しており、その異物13を高倍率の対物レンズで拡大観察を行う場合を考える。
異物13としては、どのようなものでもよいが、例えば製造上の欠陥やゴミの付着などが挙げられる。
撮像部2により取得される画像の範囲は、図2(a)に示すように対物レンズの視野内で取り込まれた撮像の範囲で、視野の中央部にフォーカスエリア14が設定されている。
フォーカスエリア14内には、長手方向に被検体領域A1、異物領域B、被検体領域A2がこの順に表示されている。そして、図2(b)に示すように、異物13は適宜の基準位置から高さH1の位置にあり、被写体11は、それより低い高さH2の位置にある。
Next, the operation principle of the
For example, as shown in FIG. 2A, the image pattern of the surface of the subject 11 is extended along the Y-axis direction shown in the figure, and is provided on the relatively low-
The
The range of the image acquired by the
In the
このような場合、焦点評価値として、例えば、画像輝度の微分値を採用すると、縦線状パタン15より異物13の表面の凹凸のピッチが狭いため、図2(c)に示すように、被検体領域A1、A2よりも異物領域Bの方が輝度変化の回数が多くなるため、焦点評価値は高く評価される。そのため、フォーカス位置は、異物領域Bの輝度の微分値のコントラストが最大となる位置と判定され、高さH1の異物13の上面に合焦することになり、被写体11上に合焦することができない。例えば、50倍の高倍率対物レンズを用いた拡大観察では、被写界深度が浅くなるので、被写体11を観察したい場合は、デフォーカスして被写体11の観察に支障を来すことになる。
In such a case, for example, when a differential value of the image luminance is adopted as the focus evaluation value, the pitch of the unevenness on the surface of the
本実施形態では、このような不具合を避けるため、被写体11の縦線状パタン15と異物13との間で、実際の画像の鮮鋭度に対して重み付けを変えた焦点評価値を算出できるようにする。
そのために、撮像範囲14の画像信号100に対して、縦線状パタン15の特徴を強調する空間フィルタの演算処理を行い、焦点評価値をその演算処理後の画像データの積算値として算出する。
図3(a)は、本発明の実施形態に係る焦点評価値を算出するための例えば3×3の空間フィルタfの係数マトリクスの一例を示す。なお、図示のXY座標系は、画素の隣接方向を示すためのもので、図2(a)のXY座標系と一致している。
In the present embodiment, in order to avoid such a problem, it is possible to calculate a focus evaluation value in which the weight is changed with respect to the actual image sharpness between the
For this purpose, a spatial filter calculation process that emphasizes the feature of the
FIG. 3A shows an example of a coefficient matrix of, for example, a 3 × 3 spatial filter f for calculating a focus evaluation value according to the embodiment of the present invention. Note that the illustrated XY coordinate system is for indicating the adjacent direction of the pixels and coincides with the XY coordinate system of FIG.
この空間フィルタfの係数マトリクスは、行方向がX軸方向に一致する3×3マトリクスで表され、各係数fijが、f11=f21=f31=f13=f23=f33=−1、f12=f22=f32=2となっているものである。このような係数マトリクスにより、画像信号100の画素単位の画像信号に対して、3×3の空間フィルタ演算(空間フィルタ処理)が行われ、Y軸方向のエッジを強調する処理が行われる
この縦エッジ強調は、縦線状パタン15のエッジの輝度が強調され、異物13の表面の輝度は失われる。
したがって、その積算値である焦点評価値は、実質的に被写体11の画像パタンの鮮鋭度が増すほど高い評価値となり、被写体11にピントが合ったフォーカス位置を求めることができる。
The coefficient matrix of this spatial filter f is represented by a 3 × 3 matrix in which the row direction coincides with the X-axis direction, and each coefficient f ij is expressed as f 11 = f 21 = f 31 = f 13 = f 23 = f 33 = −1, f 12 = f 22 = f 32 = 2. With such a coefficient matrix, a 3 × 3 spatial filter operation (spatial filter processing) is performed on the image signal in units of pixels of the
Therefore, the focus evaluation value, which is the integrated value, becomes higher as the sharpness of the image pattern of the subject 11 increases substantially, and the focus position at which the subject 11 is in focus can be obtained.
このとき、フォーカスエリア14内で、被写体11、異物13の位置を検出しているわけではないが、空間フィルタ演算により、異物13を画像データから自動的に除去しているも同然の結果が得られる。
このように、本実施形態では、画像データに対する空間フィルタ演算とその積算計算という簡単な演算処理により、異物13を除去した焦点評価値が得られるので、迅速なフォーカス位置調整を行うことができる。
At this time, the positions of the subject 11 and the
As described above, in this embodiment, the focus evaluation value from which the
ここで、異なる画像パタンを有する別の被写体のピント検出を行う場合は、空間フィルタの係数を変えればよい。他の空間フィルタの例として、図3(b)、(c)に、空間フィルタg、hの係数マトリクスを示した。
空間フィルタg(図3(b)参照)は、X軸方向に延びる横線を強調するためのもので、各係数は、g11=g12=g13=g31=g32=g33=−1、g21=g22=g23=2である。
空間フィルタh(図3(c)参照)は、図2(a)において異物13を強調するためのもので、各係数は、h22=4、h11=h13=h31=h33=−1、h12=h21=h23=h32=0である。
空間フィルタhでは、本実施形態の被写体11に比べて、異物13の画像特徴を強調するような空間フィルタになっているので、異物13にピントを合わせるときは、空間フィルタhを用いることができる。
Here, when performing the focus detection of another subject having a different image pattern, the coefficient of the spatial filter may be changed. As another example of the spatial filter, FIGS. 3B and 3C show coefficient matrices of the spatial filters g and h.
The spatial filter g (see FIG. 3B) is for emphasizing a horizontal line extending in the X-axis direction, and each coefficient is g 11 = g 12 = g 13 = g 31 = g 32 = g 33 = −. 1, g 21 = g 22 = g 23 = 2.
The spatial filter h (see FIG. 3C) is for emphasizing the
Since the spatial filter h is a spatial filter that emphasizes the image characteristics of the
なお、これらは空間フィルタの例の一部であって、係数の配置や係数マトリクスのサイズは、強調する画像の特徴に応じて適宜設定することができる。 These are a part of examples of the spatial filter, and the arrangement of the coefficients and the size of the coefficient matrix can be appropriately set according to the characteristics of the image to be emphasized.
次に、本発明の実施形態に係るオートフォーカス方法についてオートフォーカス装置の動作とともに説明する。
図4は、本発明の実施形態に係るオートフォーカス装置の設定画面について説明するための模式説明図である。図5は、本発明の実施形態に係るオートフォーカス方法の各工程について説明するためのフローチャートである。図6は、本実施形態のオートフォーカス方法による焦点評価値の一例について説明するための模式グラフである。縦軸は焦点評価値Cを、横軸はフォーカス位置Nを表す。
Next, the autofocus method according to the embodiment of the present invention will be described together with the operation of the autofocus device.
FIG. 4 is a schematic explanatory diagram for explaining a setting screen of the autofocus device according to the embodiment of the present invention. FIG. 5 is a flowchart for explaining each step of the autofocus method according to the embodiment of the present invention. FIG. 6 is a schematic graph for explaining an example of a focus evaluation value obtained by the autofocus method of the present embodiment. The vertical axis represents the focus evaluation value C, and the horizontal axis represents the focus position N.
本実施形態のオートフォーカス方法では、被写体11の画像パタンに応じて焦点評価値を求める処理を選択する。図4に示すのは、モニタ8に表示される設定画面の一例である。
設定画面には、被写体画像サンプル表示部20、異物画像サンプル表示部21、処理一覧表示部22、処理選択表示部23、評価結果表示部24、自動選択ボタン25などが設けられている。
被写体画像サンプル表示部20、異物画像サンプル表示部21は、それぞれ、保存部6に予め保存された代表的な被写体および異物の画像サンプルである画像α、βを呼び出して表示する画面である。
これらの画像α、βは、必要に応じて保存部6に追加できるようになっており、操作者が直感的で簡単な操作を行うことができるようになっている。また、これらの画像データは、焦点評価値を求める処理を試行してその妥当性を確認するための試行用データにもなっている。
In the autofocus method of this embodiment, a process for obtaining a focus evaluation value is selected according to the image pattern of the subject 11. FIG. 4 shows an example of a setting screen displayed on the
The setting screen includes a subject image
The subject image
These images α and β can be added to the
処理一覧表示部22には、実行可能な全画像処理が、例えば、処理a、処理b、…などとして、一覧表示されている。ここで、便宜的に「処理a」などとしているが、処理内容が分かる名称、解説やアイコンなどを表示してもよいことは言うまでもない。
操作者は処理一覧表示部22の中の処理を手動選択することができるようになっている。
The process
An operator can manually select a process in the process
処理選択表示部23には、処理一覧表示部22から選択された処理が表示される。例えば、処理a、k、pが選択されている。このうち、処理aは、焦点評価値を求めるための空間フィルタを設定する縦エッジ強調処理である。
処理k、pは、それ以外の画像処理であり、例えば、横エッジ強調処理、斜めエッジ強調処理、2値化処理、孤立点除去処理などの画像処理である。
評価結果表示部24は、選択された処理a、k、pを被写体画像サンプル表示部20、異物画像サンプル表示部21の画像サンプルに対して実行した場合の焦点評価値の大きさを示すものである。
この値は、本実施形態では、処理選択表示部23で選択された処理を画像α、βの画像データに対して演算して求めるようにしている。
ただし、例えば、画像サンプルの登録時に予めすべての処理に対して演算して、その結果を保存部6に記憶しておき、必要に応じて呼び出すことにより表示してもよい。
In the process
Processes k and p are other image processes, for example, image processing such as horizontal edge enhancement processing, oblique edge enhancement processing, binarization processing, and isolated point removal processing.
The evaluation
In this embodiment, this value is obtained by calculating the processing selected by the processing
However, for example, all the processes may be calculated in advance at the time of registration of the image sample, and the result may be stored in the
例えば、焦点評価値が、画像αは300で、画像βは50となる場合、焦点評価値の比率が、6:1と大きいため、画像α内に画像βが混在しても、画像αの被写体に合焦することが理解される。焦点評価値の比率が小さい場合は、処理の選択をやり直すようにする。 For example, when the focus evaluation value is 300 for the image α and the image β is 50, the ratio of the focus evaluation values is as large as 6: 1. Therefore, even if the image β is mixed in the image α, the image α It is understood that the subject is in focus. When the ratio of the focus evaluation values is small, the process selection is performed again.
自動選択ボタン25は、上記のような処理の選択工程を自動的に行うための操作ボタンである。
自動選択ボタン25が押されると、例えば、処理a、b、…を総当たり処理したり、遺伝的アルゴリズムなどの最適化処理したりすることで自動試行され、画像α、βの焦点評価値の比率が最大となるような処理が選択されるようになっている。
The
When the
次に、ピント合せ動作について、図1、5、6を参照して説明する。
本実施形態では、撮像部2の対物レンズが光軸方向に移動した際のフォーカス位置情報が、所定ピッチ毎に検出され、それぞれ試料台12の被写体11から遠ざかるにつれて増大する高さ距離に相当する番号Nにより各フォーカス位置が記述される。
ステップS1では、対物レンズが被写体11に当接しない下限位置に番号Nの初期値としてN0に初期設定する。
また、カウンタMをM=0として初期化する。
Next, the focusing operation will be described with reference to FIGS.
In the present embodiment, focus position information when the objective lens of the
In step S1, an initial value of number N is initially set to N 0 at a lower limit position where the objective lens does not contact the subject 11.
Also, the counter M is initialized as M = 0.
ステップS2では、撮像制御部3の制御信号により、番号Nに対応する位置に対物レンズ位置を移動する。
ステップS3では、対物レンズの移動位置で撮像部2により撮像を行い、画像信号100を画像取込部5に取り込む。
ステップS4では、選択された処理を実行し、焦点評価値CNを算出する。
In step S2, the objective lens position is moved to the position corresponding to the number N by the control signal of the
In step S <b> 3, the
In step S4, it executes the selected processing, calculates a focus evaluation value C N.
ステップS5では、それまでに算出した焦点評価値の最大値CmaxとCNとを比較し、CNが最大であれば、Nmax=N、Cmax=CNとする。
CN<Cmaxであれば、カウンタMを更新する。
そして、ステップS6を実行する。
In step S5, compared with the maximum value C max and C N of focus evaluation values calculated so far, C N is if the maximum, and N max = N, C max = C N.
If C N <C max , the counter M is updated.
Then, Step S6 is executed.
ステップS6では、カウンタMが所定値mに達したかどうか判定し、M=mであれば、Nが終了位置と判断してステップS7を実行する。
M<mであれば、Nは終了位置でないと判断してステップS8を実行する。
ここで、カウンタMは、焦点評価値のピーク値を確実に越えたかどうかを判定するためのもので、所定値mは1以上に設定する。
In step S6, it is determined whether or not the counter M has reached a predetermined value m. If M = m, N is determined to be an end position, and step S7 is executed.
If M <m, it is determined that N is not the end position, and step S8 is executed.
Here, the counter M is for determining whether or not the peak value of the focus evaluation value has been reliably exceeded, and the predetermined value m is set to 1 or more.
ステップS7では、撮像制御部3から制御信号を送り、撮像部2の対物レンズ位置を番号Nmaxの位置に設定する。これにより合焦が終了する。
ステップS8では、N=N+1として、ステップS2を実行し、上記処理を繰り返す。
In step S7, a control signal is sent from the
In step S8, N = N + 1 is set, step S2 is executed, and the above process is repeated.
このような動作により、フォーカス位置Nに対する焦点評価値Cは、図6に太い実線で示す曲線26のような上に凸の山形のグラフとして表される。ここで、処理aにおいて適切な空間フィルタを採用することにより、曲線26のピーク値Cmaxを与えるフォーカス位置Nmaxが被写体11に対する正確な合焦位置となるものである。
By such an operation, the focus evaluation value C with respect to the focus position N is expressed as an upward convex chevron graph such as a
例えば、破線で示した曲線27は、空間フィルタhを用いた場合の異物13に対する焦点評価値Cのグラフである。
空間フィルタhは、方向性のないエッジ部を有する異物13の焦点評価値Cを算出するため、NF(ただし、NF>Nmax)の位置で、焦点評価値の最大値CFとなる山形のグラフが得られる。
しかし、この空間フィルタhは、設定時に画像βの焦点評価値が画像αを上回る結果となるため選択されることはないものである。
For example, a
Since the spatial filter h calculates the focus evaluation value C of the
However, the spatial filter h is not selected because the focus evaluation value of the image β exceeds the image α at the time of setting.
このように、本実施形態のオートフォーカス装置および方法によれば、ピントを合わせたい被写体の焦点評価値がそれ以外の雑被写体(異物13)に比べて高く評価されるように設定することにより、被写体に正確にピントを合わせることができる。 As described above, according to the autofocus device and method of the present embodiment, by setting the focus evaluation value of the subject to be focused to be highly evaluated compared to other miscellaneous subjects (foreign matter 13), You can focus on the subject accurately.
なお、上記の説明では、図5のステップS7において、焦点評価値の最大値Cmaxに対応するフォーカス位置Nmaxに移動するようにした例で説明したが、焦点評価値Cmaxの近傍前後の3点の対物レンズ位置から適宜の補間法によりフォーカス位置を算出する工程を設けてもよい。そうすれば、フォーカス位置の精度が向上されるので、高精度のピント合せを行うことができる。また、対物レンズの移動位置Nのピッチ設定を大きくとることにより、ピント合せを高速化することができる。また、雑被写体である異物13にフォーカスを合わせる場合には、設定画面の評価結果表示部24の焦点評価値が画像α<画像βとなるように処理一覧表示部22から処理を選択する。この場合、空間フィルタhを用いて異物13に対する焦点評価が行われ、図6に示す曲線27が作成される。この曲線27の極大値となる焦点評価値の最大値CFに対応する対物レンズの移動位置がフォーカスに設定されることになる。
In the above description, in step S7 in FIG. 5 it has been described in the example so as to move the focus position N max corresponding to the maximum value C max of the focus evaluation values, before and after the vicinity of the focus evaluation value C max A step of calculating the focus position from the three objective lens positions by an appropriate interpolation method may be provided. In this way, the accuracy of the focus position is improved, so that highly accurate focusing can be performed. Also, focusing can be speeded up by increasing the pitch setting of the moving position N of the objective lens. Further, when focusing on the
また、上記の説明では、被写体上に、雑被写体として異物13が存在することで、複数の合焦位置が生じる場合の例で説明したが、例えば、図7(a)に示すように、光透過性を有する被写体28において、表面28aと裏面28bとが、それぞれ異なるパタン29(図7(b)参照)、パタン30(図7(c)参照)を有する場合にも、本発明は好適に適用することができる。
すなわち、パタン29、30のいずれかを強調する空間フィルタ処理などによる焦点評価値を設定することにより、表面または裏面への一方にフォーカス位置を合わせることができるものである。
また、被写体表面に凹凸が形成され、凹部と凸部とで異なる画像パタンを有する場合にも本発明は好適である。
In the above description, an example in which a plurality of in-focus positions are generated due to the presence of the
That is, the focus position can be adjusted to one of the front surface and the back surface by setting a focus evaluation value by a spatial filter process for emphasizing one of the
In addition, the present invention is also suitable in the case where irregularities are formed on the surface of the subject and the concave and convex portions have different image patterns.
また、上記の説明では、被写体の画像特徴を強調する演算を行って焦点評価値を求める例で説明したが、焦点評価値は、被写体と雑被写体との間の画像特徴に十分な差があればよく、例えば、被写体または雑被写体の画像特徴を除去するように輝度信号を操作する処理を行って焦点評価値を求めてもよい。例えば、雑被写体が微小なゴミなどである場合、孤立点除去処理や、2値化処理によって雑被写体の除去などの処理などの例を挙げることができる。 In the above description, the focus evaluation value is calculated by performing an operation that emphasizes the image feature of the subject. However, the focus evaluation value has a sufficient difference in the image feature between the subject and the miscellaneous subject. For example, the focus evaluation value may be obtained by performing a process of operating the luminance signal so as to remove the image feature of the subject or the miscellaneous subject. For example, when the miscellaneous subject is a minute dust or the like, examples such as an isolated point removal process or a process of removing a miscellaneous subject by a binarization process can be given.
また、上記の説明では、焦点評価値を求めるのに空間フィルタを用いた例で説明したが、画像信号に対する演算処理であれば、他の演算処理を用いてもよい。例えば、2値化処理をした画像を膨張処理を複数回処理して細いパタンを除去した大きな欠陥画像を作成し、その後に収縮処理を同回数処理して復元した大きな欠陥画像と2値化画像を排他的論理和の画像間演算することにより、パタンのみの画像を作成し、このパタンに対して焦点位置を合わせることもできる。このように画像特徴を空間周波数成分で特定することにより、画像の空間スペクトルに適宜の重み付けをして焦点評価値を算出してもよい。 In the above description, an example using a spatial filter for obtaining a focus evaluation value has been described. However, other arithmetic processing may be used as long as it is arithmetic processing on an image signal. For example, a large defect image and a binarized image obtained by processing a binarized image multiple times to create a large defect image by removing a thin pattern and then processing the same number of times of shrinkage processing. Can be calculated between the images of the exclusive OR, and a pattern-only image can be created, and the focal position can be adjusted to this pattern. As described above, by specifying the image feature by the spatial frequency component, the focus evaluation value may be calculated by appropriately weighting the spatial spectrum of the image.
1 オートフォーカス装置
2 撮像部
3 撮像制御部
4 全体制御部
5 画像取込部
6 保存部
7 演算部
11、28 被写体
12 試料台
13 異物
14 フォーカスエリア(所定領域)
15 縦線状パタン(画像)
29、30 パタン(画像)
100 画像信号
DESCRIPTION OF
15 Vertical line pattern (image)
29, 30 pattern (image)
100 image signal
Claims (4)
前記被写体を含む所定領域の画像信号を取得する撮像部と、
該撮像部のフォーカス位置を可変する撮像制御部と、
前記撮像部により得られた前記所定領域の画像信号を演算して画像の鮮鋭度に対応した焦点評価値を算出するとともに、各フォーカス位置での前記焦点評価値を比較する演算部とを備え、
前記焦点評価値が、前記被写体の画像特徴を有する画像の鮮鋭度に対して相対的に高い評価値を与えることを特徴とするオートフォーカス装置。 An autofocus device for adjusting the focus position on a subject,
An imaging unit for acquiring an image signal of a predetermined region including the subject;
An imaging control unit that varies a focus position of the imaging unit;
A calculation unit for calculating the focus evaluation value corresponding to the sharpness of the image by calculating the image signal of the predetermined area obtained by the imaging unit, and for comparing the focus evaluation value at each focus position;
The autofocus device, wherein the focus evaluation value gives a relatively high evaluation value with respect to a sharpness of an image having image characteristics of the subject.
前記被写体を含む所定領域の画像信号を、フォーカス位置を可変して取得し、
前記所定領域の画像信号に前記被写体の画像特徴を強調する演算を施し、
該演算が施された画像信号から、画像の鮮鋭度を評価する焦点評価値を算出し、
前記各フォーカス位置での前記焦点評価値を比較し、
該比較結果に基づいて、フォーカス位置を調整することを特徴とするオートフォーカス方法。 An autofocus method for adjusting the focus position on a subject,
An image signal of a predetermined area including the subject is acquired by changing a focus position,
Performing an operation to enhance the image characteristics of the subject on the image signal of the predetermined area;
From the image signal subjected to the calculation, a focus evaluation value for evaluating the sharpness of the image is calculated,
Compare the focus evaluation values at each focus position,
An autofocus method comprising adjusting a focus position based on the comparison result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007016283A JP2008185603A (en) | 2007-01-26 | 2007-01-26 | Automatic focusing device and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007016283A JP2008185603A (en) | 2007-01-26 | 2007-01-26 | Automatic focusing device and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008185603A true JP2008185603A (en) | 2008-08-14 |
Family
ID=39728731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007016283A Pending JP2008185603A (en) | 2007-01-26 | 2007-01-26 | Automatic focusing device and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008185603A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02199967A (en) * | 1989-01-27 | 1990-08-08 | Matsushita Electric Ind Co Ltd | Automatic focus detector |
JPH02251925A (en) * | 1989-03-27 | 1990-10-09 | Sumitomo Electric Ind Ltd | Method and device for automatic focusing |
JPH08160283A (en) * | 1994-12-05 | 1996-06-21 | Canon Inc | Automatic focusing device |
-
2007
- 2007-01-26 JP JP2007016283A patent/JP2008185603A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02199967A (en) * | 1989-01-27 | 1990-08-08 | Matsushita Electric Ind Co Ltd | Automatic focus detector |
JPH02251925A (en) * | 1989-03-27 | 1990-10-09 | Sumitomo Electric Ind Ltd | Method and device for automatic focusing |
JPH08160283A (en) * | 1994-12-05 | 1996-06-21 | Canon Inc | Automatic focusing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11803964B2 (en) | Method and system for imaging a cell sample | |
JP5202071B2 (en) | Charged particle microscope apparatus and image processing method using the same | |
US7932493B2 (en) | Method and system for observing a specimen using a scanning electron microscope | |
JP4586051B2 (en) | Scanning electron microscope | |
JP2007225351A (en) | Defect display method and its device | |
KR20140044395A (en) | Defect observation method and defect observation device | |
JP5088165B2 (en) | Defect detection method and defect detection apparatus | |
JP2010181328A (en) | Device, program and method for inspecting surface of solar battery wafer | |
KR101677822B1 (en) | Scanning-electron-microscope image processing device and scanning method | |
JP2011008482A (en) | Defect detection method, defect detection device and defect detection program | |
EP3015850B1 (en) | Image acquiring method and image acquiring apparatus using same | |
JP5317556B2 (en) | Electron diffraction image analysis method and transmission electron microscope | |
JP5239275B2 (en) | Defect detection method and defect detection apparatus | |
JP2008185603A (en) | Automatic focusing device and method | |
JP2007285868A (en) | Luminance gradient detection method, flaw detection method, luminance gradient detector and flaw detector | |
JPH11287618A (en) | Image processing device | |
JPH04194905A (en) | Microscopic image mapping device and method | |
JP2015210396A (en) | Aligment device, microscope system, alignment method and alignment program | |
TWI730438B (en) | Method for focusing a scanning electron microscope, computer program product for focusing a scanning electron microscope, and testing device | |
JP2011185715A (en) | Inspection device and inspection method | |
KR101850213B1 (en) | Object scanning methods based on high-speed autofocus for magnification inspection | |
JP2001319221A (en) | Method and device for inspection | |
JP2009175338A (en) | Image pickup apparatus, optical axis center calculation program, and optical axis center calculation method for image pickup apparatus | |
JP2010243214A (en) | Method and device for detection of flaw | |
JP2013101019A (en) | Internal inspection device of hole, inspection method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20091228 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20110502 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20110510 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20110711 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20110712 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20111011 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20111212 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20120403 |