JPH0718810B2 - Pattern inspection method - Google Patents

Pattern inspection method

Info

Publication number
JPH0718810B2
JPH0718810B2 JP28816688A JP28816688A JPH0718810B2 JP H0718810 B2 JPH0718810 B2 JP H0718810B2 JP 28816688 A JP28816688 A JP 28816688A JP 28816688 A JP28816688 A JP 28816688A JP H0718810 B2 JPH0718810 B2 JP H0718810B2
Authority
JP
Japan
Prior art keywords
reference pattern
direction code
matching
edge image
image
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
JP28816688A
Other languages
Japanese (ja)
Other versions
JPH02134548A (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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP28816688A priority Critical patent/JPH0718810B2/en
Publication of JPH02134548A publication Critical patent/JPH02134548A/en
Publication of JPH0718810B2 publication Critical patent/JPH0718810B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • G01N21/956Inspecting patterns on the surface of objects
    • G01N21/95607Inspecting patterns on the surface of objects using a comparative method

Landscapes

  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Testing Or Measuring Of Semiconductors Or The Like (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は例えば印刷回路板の外観目視検査を自動化する
パターン検査方法に関するものである。
The present invention relates to a pattern inspection method for automating visual appearance inspection of a printed circuit board, for example.

[従来の技術] 従来の基準パターンを使うマッチング法としては画面全
域に亙って基準パターンとのマッチング評価を行う方法
があった。この方法によるマッチング評価は、基準パタ
ーン内の1点1点について、被検査画像との誤差又は二
乗誤差を求め、基準パターン内で積分し、この積分値の
大小により行っている。つまり第4図(a)に示すm×
n画素の基準パターンを第4図(b)に示すようにフレ
ームメモリ上全域に亙って走査し、各画素においてマッ
チング評価計算を行うものである。
[Prior Art] As a conventional matching method using a reference pattern, there is a method of performing matching evaluation with the reference pattern over the entire screen. The matching evaluation by this method is performed by obtaining an error or a squared error with respect to the image to be inspected for each point in the reference pattern, integrating it within the reference pattern, and determining the magnitude of the integrated value. That is, m × shown in FIG.
As shown in FIG. 4B, the reference pattern of n pixels is scanned over the entire area of the frame memory, and the matching evaluation calculation is performed at each pixel.

[発明が解決しようとする課題] 上述した従来の処理は、アルゴリズム自体は簡単なもの
であるがマッチング評価する点の数が多く、また一箇所
のマッチング評価においても、処理する点の数が多く、
そのため計算量が多いという問題があった。またソフト
ウェアでこれらの処理を行うと実用的な処理速度を得る
ことができないという問題があった。
[Problems to be Solved by the Invention] In the conventional processing described above, although the algorithm itself is simple, the number of points to be evaluated for matching is large, and the number of points to be processed is large even for the evaluation of matching at one place. ,
Therefore, there is a problem that the calculation amount is large. In addition, there is a problem that a practical processing speed cannot be obtained when these processes are performed by software.

一方一旦ハードウェアでこれらの処理を行うようにして
しまうと、基準パターンの変更が行いにくくなるため、
基準パターンを頻繁に変えなければいけないような用途
においては問題があった。
On the other hand, once the hardware performs these processes, it becomes difficult to change the reference pattern.
There was a problem in applications where the reference pattern had to be changed frequently.

また従来の処理では第4図(a)に類似するパターン
(例えば第2図(a)のE部位のようなパターン)があ
ればマッチングしていると評価してしまう恐れがあっ
た。
Further, in the conventional process, if there is a pattern similar to that shown in FIG. 4A (for example, a pattern such as the E portion in FIG. 2A), there is a risk that it will be evaluated as matching.

本発明は上述の問題点に鑑みて為されたもので、ソフト
ウェアによって、十分高速な処理速度パターンマッチン
グを行うことができ、しかも基準パターンの変更が容易
に行え、更にマッチング評価を確実にするパターン検査
方法を提供することを目的とする。
The present invention has been made in view of the above-mentioned problems, and it is possible to perform sufficiently fast processing speed pattern matching by software, and moreover, it is possible to easily change a reference pattern and further ensure a matching evaluation. The purpose is to provide an inspection method.

[課題を解決するための手段] 本発明は濃淡画像を微分してエッジ画像を求め、エッジ
画像上で基準パターンとのマッチングを行う際に、基準
パターン中の特徴点の濃度勾配方向より得られる方向コ
ードと一致する被検査画像中の点を探索し、この一致す
る点についてのみ方向コード及び微分値を使ったマッチ
ング評価を行うことを特徴とする。
[Means for Solving the Problem] According to the present invention, when a grayscale image is differentiated to obtain an edge image and matching with a reference pattern is performed on the edge image, it is obtained from the density gradient direction of feature points in the reference pattern. A feature of the present invention is that a point in the image to be inspected that matches the direction code is searched for, and matching evaluation using the direction code and the differential value is performed only for this matching point.

[作用] 而して本発明方法はエッジ画像周辺でのみエッジ画像の
特徴を表す方向コードと、エッジ画像周辺で大きな値と
なる微分値を用いて、マッチング評価を行うので、基準
パターンと被検査画像とのマッチング評価を確実なもの
とするのである。
[Operation] In the method of the present invention, the matching evaluation is performed using the direction code representing the feature of the edge image only around the edge image and the differential value having a large value around the edge image. The matching evaluation with the image is ensured.

[実施例] 以下本発明方法を第1図に示した実施例のシステムに基
づいて説明する。
[Embodiment] The method of the present invention will be described below based on the system of the embodiment shown in FIG.

第1図の実施例のシステムは印刷回路板1上方からTVカ
メラ2により撮像して得られる映像信号をA/D変換器3
を通してデジタル信号に変換し、フレームメモリ4と微
分回路5とへ送る。フレームメモリ4へと送られた信号
は濃淡画像となる。微分回路5へ送られた信号は微分さ
れ、微分によって得られた濃度勾配の方向を表す方向コ
ードは方向コードメモリ6へ送られて方向コード画像と
なり、濃度勾配を表す微分の絶対値は、、微分値メモリ
7へ送られ、微分画像となる。また上記微分の絶対値は
2値化処理回路8へも送られる。
The system of the embodiment shown in FIG. 1 uses an A / D converter 3 for converting a video signal obtained by picking up an image from a TV camera 2 from above the printed circuit board 1.
It is converted to a digital signal through and is sent to the frame memory 4 and the differentiating circuit 5. The signal sent to the frame memory 4 becomes a grayscale image. The signal sent to the differentiating circuit 5 is differentiated, the direction code representing the direction of the density gradient obtained by the differentiation is sent to the direction code memory 6 and becomes a direction code image, and the absolute value of the differential representing the density gradient is It is sent to the differential value memory 7 and becomes a differential image. The absolute value of the above-mentioned differential is also sent to the binarization processing circuit 8.

2値化処理回路8へ送られた信号はパターンの形状を良
く表すように2値化され、細線化処理回路9へ送られ
る。
The signal sent to the binarization processing circuit 8 is binarized so as to well represent the shape of the pattern, and sent to the thinning processing circuit 9.

細線化処理回路9へ送られた信号は細線化処理を施され
た後、フレームメモリ10へ送られエッジ画像となる。こ
のエッジ画像は第2図(a)に示すようにパターン形状
を良く表したものとなる。尚第2図(a)において回路
パターンPに沿って書かれた矢印は方向コードの方向を
示す。ここで上述したように方向コードは微分によって
得られた濃度勾配の方向を表すのものであるから、第2
図(a)中の例えばB,D部分に相対して平行なエッジ部
分の方向コードはB,D部分の方向コードとは180度異な
り、これらの部分の方向コードを示す矢印は図示するよ
うにB,D部分の方向コードを示す矢印と正反対となって
いる。
The signal sent to the thinning processing circuit 9 is thinned and then sent to the frame memory 10 to form an edge image. This edge image is a good representation of the pattern shape as shown in FIG. 2A, the arrow written along the circuit pattern P indicates the direction of the direction code. Since the direction code represents the direction of the concentration gradient obtained by differentiation as described above, the second code
For example, the direction code of the edge part parallel to the B and D parts in the figure (a) is different from the direction code of the B and D parts by 180 degrees, and the arrows indicating the direction codes of these parts are as shown in the figure. It is the exact opposite of the arrow indicating the direction code of the B and D parts.

さてここで本発明方法による基準パターンはエッジ画像
パターンの部分のみをもち、基準パターン上の各点で基
準パターン設定時の方向コードの値を持つ。基準パター
ン上で被検査画像中発生頻度の低い方向コードを持つ点
に、第2図(b)に示すように初期探索点Mpを設定す
る。
Now, the reference pattern according to the method of the present invention has only the edge image pattern portion, and each point on the reference pattern has the value of the direction code when the reference pattern is set. An initial search point Mp is set on the reference pattern at a point having a direction code with a low occurrence frequency in the inspection image, as shown in FIG. 2 (b).

次いでフレームメモリ10上のエッジ画像を走査し、エッ
ジ画像上で上記初期探索点Mpと同じ方向コードを持つ点
を探索し、存在すればその点においてマッチング評価計
算を行うのである。
Then, the edge image on the frame memory 10 is scanned, a point having the same direction code as the initial search point Mp is searched for on the edge image, and if there is, a matching evaluation calculation is performed at that point.

つまり第2図(b)の基準パターンに基づいて、第2図
(a)の回路パターンP上を走査すると、初期探索点Mp
と一致する方向コードを持つ点は第2図(a)において
ハッチングを施したA,B,C,Dの各部位となる。この一致
する方向コードを持つ部分のみを抜き出すと第2図
(c)となる。
That is, when the circuit pattern P of FIG. 2 (a) is scanned based on the reference pattern of FIG. 2 (b), the initial search point Mp
Points having a direction code that coincides with are the hatched areas A, B, C, and D in FIG. 2 (a). FIG. 2C is obtained by extracting only the portion having the matching direction code.

従って、マッチング評価計算をする部位は第2図(c)
のA,B,C,Dのエッジ画像上だけで良く、画面全域に亙っ
て計算する場合に比べて計算量が非常に少なくなる。
Therefore, the part for which the matching evaluation is calculated is shown in FIG. 2 (c).
Only the edge images of A, B, C, and D need to be calculated, and the amount of calculation is much smaller than that in the case of calculation over the entire screen.

さて、マッチング評価の方法は、判定処理部11によりエ
ッジ画像が記憶されているフレームメモリ10上を走査し
てエッジ画像のある画素を探索し、エッジ画像が見つか
ると、判定処理部11は方向コードメモリ6上において、
そのエッジ画像上での画素位置に対応する位置の方向コ
ードと初期探索点Mpの方向コードとが一致するか否かの
判定を行う。そして一致した場合にはエッジ画像の画素
位置において、基準パターンを方向コードメモリ6上に
展開し、つまり方向コードメモリ6上の現在判定を行な
っている画素の位置に基準パターンの初期探索点Mpを一
致させて基準パターンを重ね合わせ、その重なった部分
について基準パターン各画素の方向コードと方向コード
メモリ6のエッジ画像の方向コードとを比較し、方向コ
ードが一致する全ての画素に対応する微分判定値を微分
値メモリ7より読み取って加算し加算値Wdを得る。この
加算値Wdを現在判定を行なっている画素の位置のアドレ
スと共に判定処理部11内に記憶する。フレームメモリ10
上の走査が終了したら判定処理部11内に記憶されている
加算値Wd中で最大のものを見つけ、この最大の加算値Wd
と共に記憶されているアドレスを基準パターンとよくマ
ッチングした位置と判定する。
Now, in the matching evaluation method, the determination processing unit 11 scans the frame memory 10 in which the edge image is stored to search for a pixel with an edge image, and when the edge image is found, the determination processing unit 11 determines the direction code. On the memory 6,
It is determined whether the direction code at the position corresponding to the pixel position on the edge image matches the direction code at the initial search point Mp. When they match, the reference pattern is developed on the direction code memory 6 at the pixel position of the edge image, that is, the initial search point Mp of the reference pattern is set at the position of the pixel on the direction code memory 6 which is currently being determined. The reference patterns are overlapped with each other, and the overlapped portion is compared with the direction code of each pixel of the reference pattern and the direction code of the edge image of the direction code memory 6, and the differential judgment corresponding to all the pixels with the same direction code. The value is read from the differential value memory 7 and added to obtain the added value Wd. The added value Wd is stored in the determination processing unit 11 together with the address of the position of the pixel currently being determined. Frame memory 10
When the above scanning is completed, the largest one of the added values Wd stored in the determination processing unit 11 is found, and the maximum added value Wd
It is determined that the address stored together with the reference pattern matches well with the reference pattern.

尚上記説明では基準パターンに一致する箇所が被検査画
面中に必ず1箇所存在する場合であるが、1箇所も無い
又は複数箇所存在する場合には加算値Wdと一定値αとの
比較を行って加算値Wd>αでなければマッチング点無し
と判定し、加算値Wd>αであればその部位が、基準パタ
ーンと良くマッチングする部位と判定するのである。
In the above description, there is always one place on the screen to be inspected that matches the reference pattern, but if there is no place or there are multiple places, the added value Wd and the constant value α are compared. If the added value Wd> α is not satisfied, it is determined that there is no matching point, and if the added value Wd> α is determined, the part is determined to be a part that matches well with the reference pattern.

このマッチング評価処理のフローチャートを第3図に示
す。
A flowchart of this matching evaluation process is shown in FIG.

かように本発明方法ではエッジ画像周辺の情報のみを使
うため第2図(a)のE部位をマッチさせることはな
い。つまり微分値はエッジ画像周辺で大きく、方向コー
ドはエッジ画像周辺でのみエッジ画像の特徴を表すから
である。
As described above, in the method of the present invention, since only the information around the edge image is used, the E site in FIG. 2 (a) is not matched. That is, the differential value is large around the edge image, and the direction code represents the feature of the edge image only around the edge image.

[発明の効果] 本発明は濃淡画像を微分してエッジ画像を求め、エッジ
画像上で基準パターンとのマッチングを行う際に、基準
パターン中の特徴点の濃度勾配方向より得られる方向コ
ードと一致する被検査画像中の点を探索し、この一致す
る点についてのみ方向コード及び微分値を使ったマッチ
ング評価を行うので、マッチング評価を行う点数が少な
く、そのため計算回数が少なくなって高速処理ができ、
結果ソフトウェアで実現しても実用に十分な処理速度が
得られ、しかも基準パターンをソフトウェアで設定で
き、そのため基準パターンの変更が容易であり、更にマ
ッチング評価に使用する情報がエッジ画像周辺の情報だ
けであるため、基準パターンに対するマッチング評価を
確実に行うことができるという効果がある。
EFFECTS OF THE INVENTION The present invention differentiates a grayscale image to obtain an edge image, and when performing matching with a reference pattern on the edge image, matches the direction code obtained from the density gradient direction of the feature points in the reference pattern. Since the points in the image to be inspected are searched and the matching evaluation is performed using the direction code and the differential value only for the coincident points, the number of points for matching evaluation is small, and therefore the number of calculations is small and high-speed processing is possible. ,
As a result, a processing speed sufficient for practical use can be obtained even if it is realized by software, and the reference pattern can be set by software, so it is easy to change the reference pattern, and the only information used for matching evaluation is the information around the edge image. Therefore, there is an effect that the matching evaluation with respect to the reference pattern can be surely performed.

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

第1図は本発明方法の実施例によるシステム構成図、第
2図(a)〜(c)は同上のマッチング評価の説明図、
第3図は同上のマッチング評価のフローチャート、第4
図(a),(b)は従来例のマッチング評価の説明図で
ある。 1は印刷回路板、2はTVカメラ、3はA/D変換器、4は
フレームメモリ、5は微分回路、6は方向コードメモ
リ、7は微分値メモリ、8は2値化処理回路、9は細線
化処理回路、10はフレームメモリ、11は判定処理部であ
る。
FIG. 1 is a system configuration diagram according to an embodiment of the method of the present invention, FIGS. 2 (a) to 2 (c) are explanatory diagrams of the matching evaluation as above,
FIG. 3 is a flowchart of matching evaluation in the same as above.
(A) and (b) are explanatory views of conventional matching evaluation. 1 is a printed circuit board, 2 is a TV camera, 3 is an A / D converter, 4 is a frame memory, 5 is a differentiation circuit, 6 is a direction code memory, 7 is a differential value memory, 8 is a binarization processing circuit, 9 Is a thinning processing circuit, 10 is a frame memory, and 11 is a determination processing unit.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】濃淡画像を微分してエッジ画像を求め、エ
ッジ画像上で基準パターンとのマッチングを行う際に、
基準パターン中の特徴点の濃度勾配方向より得られる方
向コードと一致する被検査画像中の点を探索し、この一
致する点についてのみ方向コード及び微分値を使ったマ
ッチング評価を行うことを特徴とするパターン検査方
法。
1. When differentiating a grayscale image to obtain an edge image and performing matching with a reference pattern on the edge image,
A feature is that a point in the image to be inspected that matches the direction code obtained from the density gradient direction of the characteristic point in the reference pattern is searched, and only the matching point is subjected to matching evaluation using the direction code and the differential value. Pattern inspection method.
JP28816688A 1988-11-15 1988-11-15 Pattern inspection method Expired - Fee Related JPH0718810B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28816688A JPH0718810B2 (en) 1988-11-15 1988-11-15 Pattern inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28816688A JPH0718810B2 (en) 1988-11-15 1988-11-15 Pattern inspection method

Publications (2)

Publication Number Publication Date
JPH02134548A JPH02134548A (en) 1990-05-23
JPH0718810B2 true JPH0718810B2 (en) 1995-03-06

Family

ID=17726663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28816688A Expired - Fee Related JPH0718810B2 (en) 1988-11-15 1988-11-15 Pattern inspection method

Country Status (1)

Country Link
JP (1) JPH0718810B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4419062B2 (en) 2004-03-29 2010-02-24 ソニー株式会社 Image processing apparatus and method, recording medium, and program

Also Published As

Publication number Publication date
JPH02134548A (en) 1990-05-23

Similar Documents

Publication Publication Date Title
JP4221534B2 (en) Feature extraction method for binary image
JPH0718810B2 (en) Pattern inspection method
JP3627249B2 (en) Image processing device
JPH1038542A (en) Method and device for object recognition and recording medium
US20030185431A1 (en) Method and system for golden template image extraction
JPH0610815B2 (en) Wiring pattern inspection method and device
JPS6055474A (en) Detector for difference between images
JP3048718B2 (en) Vertex detector
JPH10143673A (en) Picture processor
JPH08226961A (en) Automatic target identifying apparatus
JP3235392B2 (en) Rotation angle detection method for target pattern
JPH05113315A (en) Detecting method for center position of circular image data
JP2998518B2 (en) Pattern inspection equipment
JP2001357401A (en) Picture processing method
JPS58219683A (en) Detecting method of contour line
JPH0560147B2 (en)
JP2000182056A (en) Picture processor
JPS62251879A (en) Image contour extracting system
JPH04142676A (en) Binary image conversion method
JPH0624028B2 (en) Position measurement method of feature point corners for pattern recognition
JPH09288068A (en) Appearance inspecting instrument
JPH1097634A (en) Method for recognizing object
JPH09128542A (en) Image recognision and retrieval device
JPH07104137B2 (en) Method of detecting the rotation angle of the target pattern
JPH08123964A (en) Method and device for registering model pattern

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees