JP3369114B2 - Automatic focusing method and apparatus by image measurement - Google Patents

Automatic focusing method and apparatus by image measurement

Info

Publication number
JP3369114B2
JP3369114B2 JP31021398A JP31021398A JP3369114B2 JP 3369114 B2 JP3369114 B2 JP 3369114B2 JP 31021398 A JP31021398 A JP 31021398A JP 31021398 A JP31021398 A JP 31021398A JP 3369114 B2 JP3369114 B2 JP 3369114B2
Authority
JP
Japan
Prior art keywords
focus
image
distance
value
degree
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP31021398A
Other languages
Japanese (ja)
Other versions
JP2000137158A (en
Inventor
嘉規 須藤
康之 中田
満 白石
哲男 肥塚
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP31021398A priority Critical patent/JP3369114B2/en
Publication of JP2000137158A publication Critical patent/JP2000137158A/en
Application granted granted Critical
Publication of JP3369114B2 publication Critical patent/JP3369114B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は画像処理を用いて非
接触式ひずみ計測等を行なう際に好適に使用できる自動
合焦方法及び装置に関する。本発明は例えば半導体用パ
ッケージ、一例としてクァッド・フラット・パッケージ
(QFP)のリード部の歪みを検出する場合に好適に使
用できる。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic focusing method and apparatus which can be suitably used when performing non-contact strain measurement and the like using image processing. INDUSTRIAL APPLICABILITY The present invention can be suitably used, for example, when detecting the distortion of the lead portion of a semiconductor package, for example, a quad flat package (QFP).

【0002】画像処理を用いた非接触式ひずみ計測技術
とは、例えば、プリント板に歪み加重をかける前と歪み
加重をかけた後での歪み量を画像で測定して、ひずみ量
を求めるものである。この歪み計測のためには、鮮明な
画像を得るため、自動合焦機能が必須である。また、歪
み加重後は、自動合焦とあわせて、歪み加重前の測定箇
所との対応箇所を検出する必要がある。
The non-contact type strain measurement technique using image processing is, for example, a technique for obtaining the strain amount by measuring the amount of strain before and after applying the strain weight on the printed board with an image. Is. For this distortion measurement, an automatic focusing function is essential to obtain a clear image. In addition, after the distortion is weighted, it is necessary to detect the position corresponding to the measurement point before the distortion is weighted, in addition to the automatic focusing.

【0003】[0003]

【従来の技術】本発明に関連する従来技術として、特開
平6−14243号公報及び特開平7−87378号公
報には、コントラスト比に基づく焦点合わせに関する記
述がある。特開平6−14243号公報では、好適なコ
ントラスト情報が得られる走査方向を検出し、検出され
た方向に走査して得られた映像情報中の高域成分に係る
情報を合焦評価値として用いることが開示されている。
また、特開平7−87378号公報では、光軸に対して
傾いた方向のパターンを被対象物に投影し、この被対象
物の像を検出するにあたって投影されたパターン像に対
応する信号中でコントラストが最大となる位置に基づい
て合焦位置を検出している。
2. Description of the Related Art As prior arts related to the present invention, Japanese Patent Laid-Open Nos. 6-14243 and 7-87378 describe a focusing based on a contrast ratio. In Japanese Patent Laid-Open No. 6-14243, a scanning direction in which suitable contrast information is obtained is detected, and information relating to a high frequency component in video information obtained by scanning in the detected direction is used as a focus evaluation value. It is disclosed.
Further, in Japanese Patent Application Laid-Open No. 7-87378, a pattern in a direction inclined with respect to the optical axis is projected on a target object, and a signal corresponding to the projected pattern image is detected in detecting the image of the target object. The focus position is detected based on the position where the contrast is maximum.

【0004】しかしながら、これらの先行技術では、対
象物が平面で、焦点位置が1つである場合にしか対応で
きない。即ち、焦点検出が有効となるのは、画像全体に
対してのみである。また、特開平8−201022号公
報では、取り込んだ画像に1次微分フィルタを施し、次
いでこの画像を2値化し、2値化した画像を細線化し
て、画面上の全画素数の総和を特徴量として求めてい
る。しかしながら、この場合、1次微分法による結果を
焦点結果にそのまま使用しているため、複数合焦点やフ
ォーカスエリアの限定を行なうことが出来ない。
However, these prior arts can deal only with the case where the object is a plane and the focal position is one. That is, focus detection is effective only for the entire image. In Japanese Patent Laid-Open No. 8-201022, a captured image is subjected to a first-order differential filter, the image is binarized, the binarized image is thinned, and the total number of all pixels on the screen is characterized. I ask for it as a quantity. However, in this case, since the result of the first-order differentiation method is used as it is for the focus result, it is not possible to limit a plurality of focus points or focus areas.

【0005】また、特開平6−133203号公報で
は、合焦エリア内の撮像画面の水平走査線を選択するこ
と、或いは走査線を間引くことが開示されている。
Further, Japanese Laid-Open Patent Publication No. 6-133203 discloses that horizontal scanning lines of the image pickup screen within the focus area are selected or scanning lines are thinned out.

【0006】[0006]

【発明が解決しようとする課題】上述の従来技術では、
例えば対象物に歪み加重をかける前後の場合のように、
合焦点位置が複数ある対象物に対して、特徴個所を検出
し、検出した複数の合焦位置に焦点を合わせることは出
来なかった。対象物に対する歪み加重前及び加重後にお
ける自動合焦には次のような課題がある。
In the above-mentioned prior art,
For example, before and after applying distortion weight to the object,
It was not possible to detect characteristic points and focus on a plurality of detected focus positions with respect to an object having a plurality of focus positions. There are the following problems in automatic focusing before and after distortion weighting of an object.

【0007】即ち、歪み加重をかける前の自動合焦にあ
っては、あらかじめ特異な点を指定できないため、画像
の特徴ある部分の自動合焦が必要となる。
That is, in the automatic focusing before applying the distortion weight, it is not possible to specify a peculiar point in advance, and therefore it is necessary to automatically focus the characteristic portion of the image.

【0008】[0008]

【課題を解決するための手段】上記の課題を達成するた
めに、本発明によれば、計測対象を撮像する撮像手段
と、該撮像手段と前記計測対象との間の距離を変化させ
る距離可変手段と、前記撮像手段にて撮像した画像を入
力する機能を有すると共に、前記距離可変手段を制御す
る制御手段と、を具備し、前記計測対象に対し歪みを加
重する前の状態にて、任意の距離の範囲内における各距
離位置についての入力画像で、特定範囲のフォーカスエ
リアを走査し、且つ、フォーカスエリア内で、エッジ強
度値を加算してた値をフォーカス度として求め、各走査
箇所でのフォーカス度を比較して、最大のフォーカス値
の箇所を検出して、それらの各距離位置での検出箇所を
比較して、最大のフォーカス値の検出箇所を含む位置を
焦点位置とすること、該焦点位置における検出した箇所
の画像をマッチング用辞書ファイルとして格納するこ
と、前記計測対象に対し歪みを加重した後の状態にて、
前記マッチング用辞書ファイルを使用し、各距離位置に
ついての前記入力画像でマッチングを行い、マッチング
位置とマッチング度を計測することを特徴とする、画像
計測による自動合焦方法が提供される。
In order to achieve the above object, according to the present invention, an image pickup means for picking up an image of an object to be measured and a variable distance for changing the distance between the image pickup means and the object to be measured. And a control unit for controlling the distance varying unit, which has a function of inputting an image captured by the image capturing unit, and applies a distortion to the measurement target.
In the state before overlapping, the input image at each distance position within the range of the arbitrary distance is scanned in the focus area of the specific range, and the value obtained by adding the edge strength value in the focus area is calculated. Obtained as the focus degree, compare the focus degree at each scanning location, detect the location of the maximum focus value, compare the detection location at each of those distance positions, and determine the location of the maximum focus value. The position that includes is the focus position, and the detected position at the focus position
Images can be stored as a matching dictionary file.
And in the state after the strain is applied to the measurement target,
Use the matching dictionary file for each distance position
Matching with the input image of the
An automatic focusing method by image measurement is provided, which is characterized by measuring a position and a matching degree .

【0009】エッジ強度値として、ソベルフィルタを適
用して得た値を用いたことを特徴とする。また、フォー
カスエリア内のエッジ強度値の平均値をフォーカス度と
して求めることを特徴とする。更に、検出したフォーカ
スエリアの位置に、フォーカスエリアを固定して、より
詳細な、距離位置についての自動合焦を行うことを特徴
とする。また、フォーカスエリアの走査間隔を間引いて
出力時間の短縮を図ることを特徴とする。更に、検出し
たフォーカス座標の縦、横、高さ位置及び画像パターン
を辞書ファイルに格納し、測定対象に歪みを与えた後、
辞書ファイルをもとにマッチングによりオートフォーカ
スを行うことを特徴とする。
As the edge strength value, a value obtained by applying a Sobel filter is used. Further, it is characterized in that the average value of the edge strength values in the focus area is obtained as the focus degree. Further, it is characterized in that the focus area is fixed to the detected position of the focus area to perform more detailed automatic focusing on the distance position. Further, it is characterized in that the scanning time of the focus area is thinned to shorten the output time. Furthermore, after storing the vertical, horizontal, and height positions of the detected focus coordinates and the image pattern in the dictionary file and applying distortion to the measurement target,
The feature is that auto-focusing is performed by matching based on the dictionary file.

【0010】また、本発明では、計測対象を撮像する撮
像手段と、該撮像手段と前記計測対象との間の距離を変
化させる距離可変手段と、前記撮像手段にて撮像した画
像を入力する機能を有すると共に、前記距離可変手段を
制御する制御手段と、任意の距離の範囲内における各距
離位置についての入力画像で、特定範囲のフォーカスエ
リアを走査し、且つ、フォーカスエリア内で、エッジ強
度値を加算してた値をフォーカス度として求め、各走査
箇所でのフォーカス度を比較して、最大のフォーカス値
の箇所を検出して、それらの各距離位置での検出箇所を
比較して、最大のフォーカス値の検出箇所を含む位置を
焦点位置とするオートフォーカス実行手段と、前記計測
対象に対し歪みを加重する前の状態にて、前記焦点位置
における検出した箇所の画像をマッチング用辞書ファイ
ルとして格納する格納手段と、前記計測対象に対し歪み
を加重する手段と、歪みを加重後の計測対象について、
前記マッチング用辞書ファイルを使用し、各距離位置に
ついての前記入力画像でマッチングを行い、マッチング
位置とマッチング度を計測する計測手段と、を具備する
ことを特徴とする、画像計測による自動合焦装置が提供
される。
Further, according to the present invention, an image pickup means for picking up an image of a measuring object, a distance varying means for changing a distance between the image pickup means and the measuring object, and a function for inputting an image picked up by the image pickup means. And a control means for controlling the distance varying means and an input image for each distance position within a range of an arbitrary distance to scan a focus area of a specific range, and within the focus area, an edge strength value. The value obtained by adding is calculated as the degree of focus, the degree of focus at each scanning location is compared, the location with the maximum focus value is detected, and the location detected at each of these distance positions is compared to determine the maximum. Measuring means for setting a focus position at a position including a focus value detection position of the
In the state before applying the distortion to the object, the focus position
The image of the detected location in
Storage means for storing the
And the measurement target after distortion is weighted,
Use the matching dictionary file for each distance position
Matching with the input image of the
There is provided an automatic focusing device by image measurement, comprising: a measuring unit that measures a position and a matching degree .

【0011】[0011]

【発明の実施の形態】以下、添付図面を参照して本発明
の実施形態について詳細に説明する。図1は本発明を適
用する場合の画像計測装置を示すものであり、例えばQ
FPの全ビン歪みの自動計測を行う場合に使用される。
図において、1は計測対象であるテストプリント基板、
2はこの計測対象を固定するための専用治具、3はこの
治具を水平方向(XY方向)に移動させて測定対象1の
位置決めを行うことの出来るXYステージ、4はこのX
Yステージを制御するステージ制御装置である。5は顕
微鏡、6は、この顕微鏡の対物レンズ、7は光源、8は
CCDカメラ、9はこれらを測定対象1に対して上下方
向へ移動させることの出来るZステージであり、このZ
ステージはZステージ制御装置10に接続され、光源7
は光量調整装置11に接続され、CCDカメラ8は制御
装置20の画像入力・画像処理ボード12に接続されて
いる。ステージ制御装置4,10及び光量制御装置11
も制御装置20に接続されている。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. FIG. 1 shows an image measuring device to which the present invention is applied.
It is used when automatic measurement of total bin distortion of FP is performed.
In the figure, 1 is a test printed circuit board to be measured,
Reference numeral 2 is a dedicated jig for fixing the measurement target, 3 is an XY stage capable of moving the jig in the horizontal direction (XY direction) to position the measurement target 1, and 4 is the X-axis.
It is a stage control device for controlling the Y stage. Reference numeral 5 is a microscope, 6 is an objective lens of the microscope, 7 is a light source, 8 is a CCD camera, and 9 is a Z stage that can move these in the vertical direction with respect to the measurement target 1.
The stage is connected to the Z stage control device 10, and the light source 7
Is connected to the light amount adjusting device 11, and the CCD camera 8 is connected to the image input / image processing board 12 of the control device 20. Stage control devices 4 and 10 and light amount control device 11
Is also connected to the control device 20.

【0012】図2は測定対象であるテストプリント基板
1を専用治具2に設置し、歪み加重前の状態と歪み加重
後の状態を示す。図示のように専用治具2の下側中央に
ある歪み加重シャフト13を上方へ移動すると、専用治
具2はその上側両端にある固定用シャフト14a,14
bに対して変形し、専用治具2に固定されているプリン
ト基板1も変形する。なお、図2では歪み変形を実際よ
りも誇張して示している。
FIG. 2 shows a state in which the test printed circuit board 1 to be measured is placed on the dedicated jig 2 before straining and after straining. As shown in the drawing, when the strain-weighted shaft 13 at the lower center of the special jig 2 is moved upward, the special jig 2 is fixed at both upper ends of the fixing shafts 14a and 14a.
The printed board 1 fixed to the dedicated jig 2 is also deformed with respect to b. It should be noted that FIG. 2 shows the distortion deformation in an exaggerated manner than it actually is.

【0013】本発明では計測対象に対する歪み加重前と
歪み加重後で、2種類の自動合焦手法を実行するもので
ある。歪み加重前の自動合焦では、あらかじめ特異的な
点を指定できないため、画像の特徴のある部分について
自動合焦することが必要であり、また歪み加重をかけた
後の自動合焦(マッチング)のことも考慮しなければな
らない。
In the present invention, two types of automatic focusing methods are executed before and after distortion weighting of the object to be measured. In automatic focusing before distortion weighting, specific points cannot be specified in advance, so it is necessary to automatically focus on the characteristic parts of the image, and automatic focusing after distortion weighting (matching) You must also consider that.

【0014】まず、歪み加重前の自動合焦について説明
する。これに関して、本発明の前提となる原理を述べ
る。まず、簡単な例として図3(a)のように黒白の明
確な画像を例として説明する。画像の焦点が合っている
場合、この画像のP1−P2のプロファイルは、図3
(b)の様になり、境界部分のエッジが急峻に立ち上が
り、焦点が合っていない場合には、図3(c)の様に立
ち上がりも緩やかになる。エッジの急峻度は、元画像に
微分フィルタ(例としてソベルフィルタを図5に示す)
をかけることによりエッジ強度値として得られる。本発
明の自動合焦の原理は、エッジ強度値を判断して、画像
の合焦点位置を見つけるものである。
First, automatic focusing before distortion weighting will be described. In this regard, the principle underlying the present invention will be described. First, as a simple example, a clear black and white image as shown in FIG. 3A will be described as an example. When the image is in focus, the P1-P2 profile of this image is shown in FIG.
As shown in FIG. 3B, the edge of the boundary portion rises sharply, and when it is out of focus, the rising edge also becomes gentle as shown in FIG. 3C. The steepness of the edge is obtained by using a differential filter in the original image (a Sobel filter is shown in FIG. 5 as an example).
It is obtained as an edge strength value by multiplying by. The principle of automatic focusing of the present invention is to judge the edge strength value to find the in-focus position of the image.

【0015】自動合焦は、高さ(Z)ステージ9をステ
ップ移動しながら画像入力を行う。入力画像全体のエッ
ジ強度値を合計した値または平均値を求め、これをフォ
ーカス度とする。このようにして求めたフォーカス度
を、各高さで得た画像で、比較し、最大を示したフォー
カス度を得た画像を計測した高さを焦点位置とする。こ
の時、入力画像全体では、処理量が大きすぎることや、
範囲が大きいため、特徴箇所がぼやけてしまうため、通
常は特定範囲のウインドウを一定位置で固定して、その
エリア内で、処理を進める。
In automatic focusing, an image is input while the height (Z) stage 9 is moved in steps. A value obtained by summing the edge strength values of the entire input image or an average value is obtained, and this is used as the focus degree. The focus degree thus obtained is compared with the images obtained at each height, and the height at which the image having the maximum focus degree is measured is set as the focus position. At this time, the processing amount is too large for the entire input image,
Since the range is large, the characteristic part is blurred. Therefore, the window of the specific range is usually fixed at a fixed position, and the process is advanced in that area.

【0016】なお、微分フィルタの例としてソベルフィ
ルタを使用する場合を図5に示す。ソベルフィルタと
は、例えば図5の左上に示すような画像に対して、 E=|C+2F+1−A−2D−G|+|G+2H+1
−A−2B−C| のマトリックスをかけるものである。これにより、縦方
向と横方向の濃淡角度の度合いを加算し、エッジを強調
することになる。
FIG. 5 shows the case where a Sobel filter is used as an example of the differential filter. The Sobel filter is, for example, E = | C + 2F + 1-A-2D-G | + | G + 2H + 1 for an image as shown in the upper left of FIG.
A matrix of -A-2B-C | is applied. As a result, the degrees of gray-scale angles in the vertical direction and the horizontal direction are added to emphasize the edge.

【0017】ところで、実際の計測画像は、図3(a)
の様に簡単ではなく、例えば図4の顕微鏡写真に示すよ
うにエッジ成分が複数である。また、プリント板に実装
されるQFPのリード部を撮像する場合、表面が半田の
塗布具合により、凸凹状態となっており、対象が平面で
はないため、合焦点位置も複数ある。そのため、上記の
ような「ウインドウエリア固定方法」では、半田塗布に
ムラがあった場合に表面上に焦点が合わなかったり、適
切でない箇所に焦点があうことがある。
By the way, the actual measurement image is shown in FIG.
It is not so simple as described above, and there are a plurality of edge components as shown in the micrograph of FIG. 4, for example. Further, when the image of the lead portion of the QFP mounted on the printed board is imaged, the surface is uneven due to the degree of application of the solder, and the object is not a flat surface, so there are multiple focusing points. Therefore, in the above-mentioned “window area fixing method”, when there is unevenness in solder application, the surface may not be in focus, or an inappropriate portion may be in focus.

【0018】また、歪み加重前の計測では、歪み加重後
計測用のマッチング辞書作成およびそのマッチング辞書
計測箇所の特定も必要となる。これらの問題を解決する
ため、本発明では次に示すオートフォーカス(自動合
焦)手法を案出した。図6は入力画像を示し、また図7
は歪み加重前の計測論理のフローチャートである。入力
画像21は例えば640×480画素のCCDカメラ8
(図1)に入力される画像領域であり、計測エリア22
は例えば60×60画素の計測用のエリアである。図6
(b)に示すように、このフォーカスエリア22で入力
画像21の全体をスキャンしていくのである。フォーカ
ス度は、各計測フォーカスエリア22内の画素ごとのソ
ベル値を加算し、その値または、フォーカスエリア22
の画素数で、除算した値である。
Further, in the measurement before distortion weighting, it is necessary to create a matching dictionary for measurement after distortion weighting and to specify the measurement location of the matching dictionary. In order to solve these problems, the present invention has devised the following autofocus (automatic focusing) method. FIG. 6 shows the input image and FIG.
Is a flow chart of the measurement logic before distortion weighting. The input image 21 is, for example, a CCD camera 8 having 640 × 480 pixels.
The measurement area 22 is an image area input to (FIG. 1).
Is an area for measurement of, for example, 60 × 60 pixels. Figure 6
As shown in (b), the entire input image 21 is scanned in this focus area 22. For the focus degree, the Sobel value for each pixel in each measurement focus area 22 is added, and the value or the focus area 22
It is a value divided by the number of pixels of.

【0019】入力画像21の全体で、計測エリア22を
スキャンして求めたフォーカス度が最大の時の位置をこ
の入力画像21の最大フォーカス度のフォーカスエリア
22aとする。同時にフォーカス度とフォーカスエリア
22aの位置と高さ位置をメモリに格納する。各高さ
で、これを行い、メモリ中のフォーカス度を比較して最
大の時の高さを焦点位置とする。
The position where the degree of focus obtained by scanning the measurement area 22 in the entire input image 21 is the maximum is the focus area 22a of the maximum degree of focus of the input image 21. At the same time, the focus degree, the position of the focus area 22a, and the height position are stored in the memory. At each height, this is done and the focus degrees in memory are compared and the maximum height is taken as the focus position.

【0020】次に、図7のフローチャートに従って歪み
加重前の計測論理について説明する。まず、高さ(Z)
ステージ9(図1)を走査範囲の始点高さに移動する。
次に、画像入力して、入力画像(例えば、640×48
0画素)を画像メモリ1に格納する。次に、入力画像に
対し、エッジ強調フィルタ(例えば、ソベルフィルタ)
をかけた値を画像メモリ2に格納する。フォーカスエリ
ア(例えば、m×n=60×60画素)を入力画像の画
面の左上に設定する。フォーカスエリア内のエッジ強調
フィルタ(例えば、ソベルフィルタ)をかけた値の合計
値又は平均値をフォーカス度として算出する。算出した
検知フォーカス度が最大フォーカス度より大きい時は、
この時の検知フォーカス度を最大フォーカス度として再
設定する。計測エリアの位置が画像終端でない限り、計
測エリアを1画素分、横に移動(スキャン)して、再度
次の計測エリアにおいてフォーカス度(f=Σe(x,
y)/m×n)を算出し、この操作を画像終端まで、即
ち画像全体にわたって繰り返す。
Next, the measurement logic before distortion weighting will be described with reference to the flowchart of FIG. First, the height (Z)
The stage 9 (FIG. 1) is moved to the starting point height of the scanning range.
Next, input an image and input an image (for example, 640 × 48).
0 pixel) is stored in the image memory 1. Next, for the input image, an edge enhancement filter (eg Sobel filter)
The value multiplied by is stored in the image memory 2. A focus area (for example, m × n = 60 × 60 pixels) is set at the upper left of the screen of the input image. The total value or the average value of the values applied with the edge enhancement filter (for example, Sobel filter) in the focus area is calculated as the focus degree. If the calculated detected focus degree is greater than the maximum focus degree,
The detected focus degree at this time is reset as the maximum focus degree. Unless the position of the measurement area is at the end of the image, the measurement area is laterally moved (scanned) by one pixel, and the focus degree (f = Σe (x,
y) / m × n) is calculated, and this operation is repeated until the end of the image, that is, over the entire image.

【0021】同じ入力画像において、フォーカス度が最
大となるフォーカスエリアの位置座標と、高さ(Z)ス
テージの高さ位置、フォーカス度をAF判定用メモリに
格納する。高さ(Z)ステージの位置が走査範囲の終点
高さでない限り、高さ(Z)ステージを所定のステップ
距離(例えば、0.2μm)移動して同様の操作を繰り
返す。
In the same input image, the position coordinates of the focus area where the degree of focus is maximum, the height position of the height (Z) stage, and the degree of focus are stored in the AF determination memory. Unless the position of the height (Z) stage is the end point height of the scanning range, the height (Z) stage is moved by a predetermined step distance (for example, 0.2 μm) and the same operation is repeated.

【0022】次に、AF判定用メモリに格納した各高さ
のフォーカス度を比較し、最大フォーカス度とそれに対
応するフォーカスエリア位置と高さ(Z)ステージ位置
を引き出す。次いで、検出した高さ位置に高さ(Z)ス
テージを移動する。ここで画像入力し、入力画像(例え
ば、640×480画素)を画像メモリ1に格納する。
入力画像から、検出したフォーカスエリアの位置に基づ
いたウインドウを切り出し、切り出した範囲の画像パタ
ーンをマッチング用辞書としてファイルに格納する。次
いで、高さ(Z)ステージの位置、XYステージの位
置、フォーカスエリアの位置を計測ファイルに格納す
る。
Next, the focus degrees at the respective heights stored in the AF determination memory are compared, and the maximum focus degree and the corresponding focus area position and height (Z) stage position are extracted. Next, the height (Z) stage is moved to the detected height position. An image is input here, and the input image (for example, 640 × 480 pixels) is stored in the image memory 1.
A window based on the detected position of the focus area is cut out from the input image, and the image pattern in the cut out range is stored in a file as a matching dictionary. Then, the position of the height (Z) stage, the position of the XY stage, and the position of the focus area are stored in the measurement file.

【0023】図8及び図9は歪み加重前の計測論理のオ
ートフォーカスを図式的に示すものである。顕微鏡5
(図1)によりCCDカメラ8に取り込む入力画像21
は、高さ(Z)ステーシ9の高さh1 ,h2 ,…を変え
て、順次計測される。各入力画像21について、計測エ
リア22(m×n画素)を移動(スキャン)しながらフ
ォーカス度の計測を行なう。ここでは、高さh3 位置で
最大フォーカス度(fh 3-max =100)が得られる。
8 and 9 show the measurement logic before distortion weighting.
FIG. Microscope 5
Input image 21 captured by the CCD camera 8 by (FIG. 1)
Is the height h of the height (Z) station 9.1, H2,, change
Are measured sequentially. For each input image 21,
While moving (scanning) the rear 22 (m × n pixels),
Measure the degree of focus. Here, the height h3In position
Maximum focus degree (fh 3-max= 100) is obtained.

【0024】本発明の特徴は、上記のように、各入力画
像で、ソベル値の高い箇所を見つけることである。これ
により、表面が凸凹の対象に対して、適切なフォーカシ
ングを行うことができる。図8及び図9の例に示すよう
に、焦点位置の2個所ある測定対象があり、焦点エリア
をそれぞれA,Bとする。フォーカスエリアが固定され
ているオートフォーカスの場合は、最初にエリアAに焦
点エリアを設定してしまうと、更にフォーカス度の高い
エリアBに焦点をあわせることができない。この場合
の、フォーカス度の推移をグラフにあらわすと図10
(a)のようになる。本発明では、各入力画像中の、フ
ォーカス度の最も高い箇所を探索することになるので、
エリアBも検知できる。図10(b)は、本発明による
フォーカス度推移のグラフ例である。
A feature of the present invention is to find a portion having a high Sobel value in each input image as described above. As a result, it is possible to perform appropriate focusing on an object whose surface is uneven. As shown in the examples of FIGS. 8 and 9, there are two measurement targets at the focus positions, and the focus areas are A and B, respectively. In the case of autofocus in which the focus area is fixed, if the focus area is first set in the area A, the focus cannot be focused in the area B having a higher degree of focus. FIG. 10 is a graph showing the transition of the focus degree in this case.
It becomes like (a). In the present invention, in each input image, since the location with the highest degree of focus will be searched,
Area B can also be detected. FIG. 10B is an example of a graph of focus degree transition according to the present invention.

【0025】即ち、図10(a)においては、高さ
(Z)ステージの位置を変えても計測エリアAが固定さ
れているために、高さh2 の位置において最大フォーカ
ス度(fh2-max =70)があらわれるものと判定して
しまう。これに対し、本発明では、高さ(Z)ステージ
の位置を変えた各入力画像において計測エリアをスキャ
ンしているので、高さh3 のエリアBにおいて最大フォ
ーカス度(fh3-max =100)が得られるものと判定
することが出来る。
[0025] That is, in FIG. 10 (a), the height (Z) to be changed the position of the stage is measured area A is fixed, the maximum degree of focus at the position of height h 2 (fh 2- It is determined that max = 70) appears. On the other hand, in the present invention, since the measurement area is scanned in each input image in which the position of the height (Z) stage is changed, the maximum focus degree (fh 3-max = 100 in area B of height h 3 ). ) Can be determined to be obtained.

【0026】図11は歪み加重後の計測論理のフローチ
ャートである。まず、本発明の原理を説明する。ひずみ
加重前のオートフォーカスで、検出した箇所の画像をマ
ッチング用辞書ファイルとして、ファイルに格納してお
く。このとき、仮に辞書に格納された特徴点をA点とす
る。ひずみ加重後は、この辞書をもとに各段階の高さ
で、マッチングを行い、マッチング位置とマッチング度
を計測する。その中で、最もマッチング度の高かった箇
所を注目し、その高さ位置が焦点位置となりA点のZ方
向位置、XYのマッチング位置がA点のXY位置とな
る。歪み加重前、加重後の2つの計測データを比較し
て、歪みによる計測対象の変形量が算出される。
FIG. 11 is a flowchart of the measurement logic after distortion weighting. First, the principle of the present invention will be described. The image of the location detected by autofocus before distortion weighting is stored in the file as a matching dictionary file. At this time, the characteristic point temporarily stored in the dictionary is set as point A. After distortion weighting, matching is performed at each step height based on this dictionary, and the matching position and matching degree are measured. Among them, the position with the highest matching degree is focused, and the height position thereof becomes the focus position, and the position in the Z direction of point A and the XY matching position become the XY position of point A. The amount of deformation of the measurement target due to the strain is calculated by comparing the two measurement data before and after the strain weighting.

【0027】即ち、図11において、マッチング用辞書
ファイルをロードした後、高さ(Z)ステージを走査範
囲の始点高さに移動をする。次いで、画像入力し、入力
画像(例えば、640×480画素)を画像メモリ1に
格納する。次に、入力画像に対し、マッチング辞書でマ
ッチングを行う。マッチングで、一致したエリアがあ
り、且つマッチング度が今までの走査の中で最大となる
時点で、マッチング度および高さ(Z)ステージ位置、
フォーカスエリア位置を格納し、高さ(Z)ステージが
走査範囲の終点高さ位置となるまで繰り返す。
That is, in FIG. 11, after loading the matching dictionary file, the height (Z) stage is moved to the starting point height of the scanning range. Next, an image is input, and the input image (for example, 640 × 480 pixels) is stored in the image memory 1. Next, the input image is matched with the matching dictionary. In matching, there is a matched area, and the matching degree and height (Z) stage position, when the matching degree becomes the maximum in the scanning so far,
The focus area position is stored and repeated until the height (Z) stage reaches the end position height position of the scanning range.

【0028】マッチング度が最大の時のマッチング度、
および高さ(Z)ステージ位置、フォーカスエリア位置
を引き出す。検出した高さステージの位置に高さ(Z)
ステージを移動する。この位置において、マッチング度
および高さ(Z)ステージの位置、XYステージの位
置、フォーカスエリア位置を計測ファイルに格納する。
以上、添付図面を参照して本発明の実施形態について詳
細に説明したが、本発明は上記の実施形態に限定される
ものではなく、本発明の精神ないし範囲内において種々
の形態、変形、修正等が可能であることに留意すべきで
ある。
The matching degree when the matching degree is maximum,
And the height (Z) stage position and focus area position are pulled out. Height detected (Z) at the stage position
Move the stage. At this position, the matching degree and the height (Z) stage position, the XY stage position, and the focus area position are stored in the measurement file.
The embodiments of the present invention have been described above in detail with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments, and various forms, variations, and modifications within the spirit and scope of the present invention It should be noted that etc. are possible.

【0029】[0029]

【発明の効果】以上に説明したように、本発明によれ
ば、計測対象を撮像する撮像手段と、該撮像手段と前記
計測対象との間の距離を変化させる距離可変手段と、前
記撮像手段にて撮像した画像を入力する機能を有すると
共に、前記距離可変手段を制御する制御手段と、を具備
し、任意の距離の範囲内における各距離位置についての
入力画像で、特定範囲のフォーカスエリアを走査し、且
つ、フォーカスエリア内で、エッジ強度値を加算した値
をフォーカス度として求め、各走査箇所でのフォーカス
度を比較して、最大の箇所を検出して、それら各距離位
置での検出点を比較して、最大の位置を焦点位置として
いるので、計測対象がその表面に凹凸があって、焦点位
置が複数ある場合においても適用可能となる。また、本
発明では、計測対象に歪み加重を与える場合において、
歪み加重後の計測において、歪み加重前の辞書(マッチ
ング辞書)を利用してオートフォーカスを行うことがで
きる。
As described above, according to the present invention, the image pickup means for picking up the image of the measuring object, the distance varying means for changing the distance between the image pickup means and the measuring object, and the image pickup means. And a control means for controlling the distance varying means, which has a function of inputting an image picked up in, and an input image for each distance position within a range of an arbitrary distance, and a focus area of a specific range is set. The value obtained by scanning and adding the edge strength value in the focus area is obtained as the degree of focus, the degree of focus at each scanning location is compared, the maximum location is detected, and detection at each of these distance positions is performed. Since the points are compared and the maximum position is set as the focal position, the present invention can be applied even when the surface of the measurement target has irregularities and there are a plurality of focal positions. Further, in the present invention, in the case where a strain weight is given to the measurement target,
In the measurement after distortion weighting, autofocus can be performed using a dictionary (matching dictionary) before distortion weighting.

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

【図1】本発明を適用する場合の画像計測装置を示す。FIG. 1 shows an image measuring device when the present invention is applied.

【図2】計測対象であるテストプリント基板を専用治具
にセットした歪み加重前の状態及び歪み加重後の状態を
それぞれ示す。
FIG. 2 shows a test printed circuit board to be measured, which is set in a dedicated jig, before and after strain-weighting, respectively.

【図3】画像プロファイル(a)に対して、境界部分の
エッジが急峻な場合(b)と、緩やかな場合(c)とを
示す。
FIG. 3 shows a case where the edge of the boundary portion is steep (b) and a case where the edge is gentle (c) with respect to the image profile (a).

【図4】凹凸のある計測対象の表面を見た写真である。FIG. 4 is a photograph of a surface of a measurement target having irregularities.

【図5】ソベルフィルタの説明のための図である。FIG. 5 is a diagram for explaining a Sobel filter.

【図6】入力画像とフォーカスエリアとを示し(a)、
更に入力画像を、フォーカスエリアでもって走査する状
態を示す。
FIG. 6 shows an input image and a focus area (a),
Further, it shows a state in which the input image is scanned with the focus area.

【図7】加重前の計測論理のフローチャートである。FIG. 7 is a flow chart of measurement logic before weighting.

【図8】加重前の計測論理のオートフォーカスの状態を
図解的に示す。
FIG. 8 schematically shows a state of autofocus of the measurement logic before weighting.

【図9】加重前の計測論理のオートフォーカスの状態を
図解的に示す。
FIG. 9 schematically shows a state of autofocus of the measurement logic before weighting.

【図10】フォーカスエリアを固定した場合(a)と、
本発明のようにフォーカスエリアをスキャンする場合
(b)を比較して示す。
FIG. 10 shows a case where the focus area is fixed (a),
The case (b) of scanning the focus area as in the present invention is shown for comparison.

【図11】加重後の計測論理のフローチャートである。FIG. 11 is a flow chart of measurement logic after weighting.

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

1…計測対象 2…治具 3…XYステージ 4,10…ステージ制御装置 5…顕微鏡 6…対物レンズ 7…光源 8…CCDカメラ 9…高さ(Z)ステージ 11…光量調整装置 12…画像入力・出力ポート 13…歪み加重シャフト 20…制御装置 1 ... Measurement target 2 ... jig 3 ... XY stage 4, 10 ... Stage control device 5 ... Microscope 6 ... Objective lens 7 ... Light source 8 ... CCD camera 9 ... Height (Z) stage 11 ... Light intensity adjusting device 12 ... Image input / output port 13 ... Strain-weighted shaft 20 ... Control device

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI G02B 21/26 G02B 7/11 D J (72)発明者 肥塚 哲男 神奈川県川崎市中原区上小田中4丁目1 番1号 富士通株式会社内 (56)参考文献 特開 平4−150176(JP,A) 特開 平5−19161(JP,A) 特開 平9−211307(JP,A) (58)調査した分野(Int.Cl.7,DB名) G02B 7/28 - 7/40 ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 7 Identification code FI G02B 21/26 G02B 7/11 DJ (72) Inventor Tetsuo Hizuka 4-1-1 Kamiodanaka, Nakahara-ku, Kawasaki-shi, Kanagawa Fujitsu (56) References JP-A-4-150176 (JP, A) JP-A-5-19161 (JP, A) JP-A-9- 211307 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G02B 7/ 28-7/40

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 計測対象を撮像する撮像手段と、該撮像
手段と前記計測対象との間の距離を変化させる距離可変
手段と、前記撮像手段にて撮像した画像を入力する機能
を有すると共に、前記距離可変手段を制御する制御手段
と、を具備し、前記計測対象に対し歪みを加重する前の
状態にて、任意の距離の範囲内における各距離位置につ
いての入力画像で、特定範囲のフォーカスエリアを走査
し、且つ、フォーカスエリア内で、エッジ強度値を加算
してた値をフォーカス度として求め、各走査箇所でのフ
ォーカス度を比較して、最大のフォーカス値の箇所を検
出して、それらの各距離位置での検出箇所を比較して、
最大のフォーカス値の検出箇所を含む位置を焦点位置と
すること、該焦点位置における検出した箇所の画像をマ
ッチング用辞書ファイルとして格納すること、前記計測
対象に対し歪みを加重した後の状態にて、前記マッチン
グ用辞書ファイルを使用し、各距離位置についての前記
入力画像でマッチングを行い、マッチング位置とマッチ
ング度を計測することを特徴とする、画像計測による自
動合焦方法。
1. An image pickup means for picking up an image of a measurement target, a distance changing means for changing a distance between the image pickup means and the measurement target, and a function of inputting an image picked up by the image pickup means, A control means for controlling the distance varying means, before applying a strain to the measurement object.
In this state, the input image at each distance position within the range of the arbitrary distance is scanned in the focus area of the specific range, and the value obtained by adding the edge strength value in the focus area is obtained as the focus degree. , Comparing the degree of focus at each scanning location, detecting the location of the maximum focus value, comparing the detection location at each of those distance positions,
The focus position is defined as the position that includes the detected location of the maximum focus value, and the image of the detected location at the focus location is marked.
Storing as a dictionary file for
After applying distortion to the target,
Use the dictionary file for
Matches with the input image and matches with the matching position
An automatic focusing method based on image measurement, which is characterized by measuring the tangency.
【請求項2】 エッジ強度値として、ソベルフィルタを
適用して液体値を用いたことを特徴とする請求項1に記
載の画像計測による自動合焦方法。
2. The automatic focusing method by image measurement according to claim 1, wherein a Sobel filter is applied and a liquid value is used as the edge strength value.
【請求項3】 フォーカスエリア内のエッジ強度値の平
均値をフォーカス度として求めることを特徴とする請求
項1又は2に記載の自動合焦方法。
3. The automatic focusing method according to claim 1, wherein an average value of edge strength values in the focus area is obtained as a focus degree.
【請求項4】 計測対象を撮像する撮像手段と、該撮像
手段と前記計測対象との間の距離を変化させる距離可変
手段と、前記撮像手段にて撮像した画像を入力する機能
を有すると共に、前記距離可変手段を制御する制御手段
と、任意の距離の範囲内における各距離位置についての
入力画像で、特定範囲のフォーカスエリアを走査し、且
つ、フォーカスエリア内で、エッジ強度値を加算してた
値をフォーカス度として求め、各走査箇所でのフォーカ
ス度を比較して、最大のフォーカス値の箇所を検出し
て、それらの各距離位置での検出箇所を比較して、最大
のフォーカス値の検出箇所を含む位置を焦点位置とする
オートフォーカス実行手段と、前記計測対象に対し歪み
を加重する前の状態にて、前記焦点位置における検出し
た箇所の画像をマッチング用辞書ファイルとして格納す
る格納手段と、前記計測対象に対し歪みを加重する手段
と、歪みを加重後の計測対象について、前記 マッチング
用辞書ファイルを使用し、各距離位置についての前記入
力画像でマッチングを行い、マッチング位置とマッチン
グ度を計測する計測手段と、を具備することを特徴とす
る、画像計測による自動合焦装置。
4. An image pickup means for picking up an image of a measuring object, a distance varying means for changing a distance between the image pickup means and the measuring object, and a function of inputting an image picked up by the image pickup means, With the control means for controlling the distance varying means and the input image for each distance position within the range of the arbitrary distance, the focus area of the specific range is scanned, and the edge strength value is added within the focus area. Value is calculated as the degree of focus, the degree of focus at each scanning location is compared, the location with the maximum focus value is detected, and the locations detected at each distance position are compared to determine the maximum focus value. An autofocus executing means for setting a focus position at a position including a detection point, and distortion for the measurement target.
In the state before weighting,
Store the image of the selected part as a dictionary file for matching
Storing means and means for applying strain to the measurement target
And the matching for the measurement target after distortion is weighted
For each distance position, use the dictionary file for
Matches with force image and matches with matching position
An automatic focusing device by image measurement, comprising: a measuring unit that measures a degree of blur.
JP31021398A 1998-10-30 1998-10-30 Automatic focusing method and apparatus by image measurement Expired - Fee Related JP3369114B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP31021398A JP3369114B2 (en) 1998-10-30 1998-10-30 Automatic focusing method and apparatus by image measurement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP31021398A JP3369114B2 (en) 1998-10-30 1998-10-30 Automatic focusing method and apparatus by image measurement

Publications (2)

Publication Number Publication Date
JP2000137158A JP2000137158A (en) 2000-05-16
JP3369114B2 true JP3369114B2 (en) 2003-01-20

Family

ID=18002568

Family Applications (1)

Application Number Title Priority Date Filing Date
JP31021398A Expired - Fee Related JP3369114B2 (en) 1998-10-30 1998-10-30 Automatic focusing method and apparatus by image measurement

Country Status (1)

Country Link
JP (1) JP3369114B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4773198B2 (en) * 2005-12-22 2011-09-14 シスメックス株式会社 Specimen imaging apparatus and specimen analyzer including the same
JP2007334141A (en) * 2006-06-16 2007-12-27 Sanyo Electric Co Ltd Culture observation system
JP6166702B2 (en) * 2014-08-29 2017-07-19 日本電信電話株式会社 Length measuring device and length measuring method
JP6883767B2 (en) * 2017-02-28 2021-06-09 パナソニックIpマネジメント株式会社 Displacement measuring device and displacement measuring method

Also Published As

Publication number Publication date
JP2000137158A (en) 2000-05-16

Similar Documents

Publication Publication Date Title
US5040228A (en) Method and apparatus for automatically focusing an image-acquisition device
US5877809A (en) Method of automatic object detection in image
US6067114A (en) Detecting compositional change in image
US7702231B2 (en) Autofocus control apparatus and method of controlling the same
EP0713593B1 (en) Method and apparatus for ball bond inspection system
US20060098970A1 (en) Image signal processing unit and digital camera
US6470148B2 (en) Distance measuring device
JPS62269279A (en) Pattern recognition system
US5396336A (en) In-focus detecting device
JP3357210B2 (en) Automatic focus detection method
JP2535695B2 (en) Scanning electron microscope automatic focusing method
JP3369114B2 (en) Automatic focusing method and apparatus by image measurement
JP3058781B2 (en) Focusing point detection method
US5373567A (en) Method and apparatus for pattern matching
CN106981065A (en) A kind of image Absolute Central Moment innovatory algorithm based on exposure compensating
US6510240B1 (en) Automatic detection of die absence on the wire bonding machine
JP2000199709A (en) Method and device for inspecting pattern
CN115547909B (en) Wafer definition positioning method
JPH113415A (en) Image fetching device
JP3226678B2 (en) Micro size measuring device
JPH07177414A (en) Focusing detector
JP2001305421A (en) Automatic focusing device
JP3342143B2 (en) Prism foreign matter detection method
JPS638618A (en) Focused point detecting method
JP2023130329A (en) Method and device for inspecting black box camera focusing

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20021001

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081115

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081115

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091115

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101115

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101115

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111115

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111115

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121115

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121115

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131115

Year of fee payment: 11

LAPS Cancellation because of no payment of annual fees