[go: up one dir, main page]

JP2007163259A - Difference comparison inspection method and difference comparison inspection device - Google Patents

Difference comparison inspection method and difference comparison inspection device Download PDF

Info

Publication number
JP2007163259A
JP2007163259A JP2005358962A JP2005358962A JP2007163259A JP 2007163259 A JP2007163259 A JP 2007163259A JP 2005358962 A JP2005358962 A JP 2005358962A JP 2005358962 A JP2005358962 A JP 2005358962A JP 2007163259 A JP2007163259 A JP 2007163259A
Authority
JP
Japan
Prior art keywords
image
angle
pixel
area
value
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.)
Abandoned
Application number
JP2005358962A
Other languages
Japanese (ja)
Inventor
Yoshio Asai
宣雄 浅井
Yuji Akagi
祐司 赤木
Jun Onishi
潤 大西
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.)
Dainippon Screen Manufacturing Co Ltd
Original Assignee
Dainippon Screen Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dainippon Screen Manufacturing Co Ltd filed Critical Dainippon Screen Manufacturing Co Ltd
Priority to JP2005358962A priority Critical patent/JP2007163259A/en
Priority to TW095136657A priority patent/TW200723980A/en
Priority to CNA2006101428229A priority patent/CN1982880A/en
Priority to KR1020060105429A priority patent/KR100821038B1/en
Publication of JP2007163259A publication Critical patent/JP2007163259A/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0006Industrial image inspection using a design-rule based approach

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a difference comparison inspection method and a difference comparison inspection device capable of performing proper comparison inspection even in the case of a pattern having an angular part or a corner part. <P>SOLUTION: An internal angle which is a recessed corner and an external angle which is a projecting angle formed on the pattern are detected respectively from a master image. Then, a range of an internal angle domain which is a domain near the detected internal angle is determined. Also, a range of an external angle which is a domain near the detected external angle is determined. Then, comparison inspection is performed based on a difference between the master image and an object image. In this case, the comparison inspection is performed by excluding a difference to an excessive domain which is a pattern domain of the object image formed more excessively than a pattern domain shown by the master image in the internal angle domain of the master image. The comparison inspection is performed by excluding a difference to the pattern domain of the object image formed more deficiently than the pattern domain shown by the master image in the external angle domain of the master image. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、被検査物を撮像した画像を用いた差分比較検査方法および装置に関し、より特定的には、基板上に形成されたパターンの比較検査方法および装置に関する。   The present invention relates to a differential comparison inspection method and apparatus using an image obtained by imaging an object to be inspected, and more specifically to a comparison inspection method and apparatus for a pattern formed on a substrate.

電子部品等が実装されるプリント基板の表面には、所定の回路を構成するのに必要な導体配線がパターン形成される。この配線パターンの検査方法の1つとして、比較検査法がある。これは、CADデータから作成される良品画像と、検査対象である基板を撮像した検査画像とを比べて、一定以上の差がある部分を欠陥として検出する方法である。具体的には、比較検査法は、CADデータをデジタル画像に変換した画像であるマスタ画像と、検査対象(被検査物)を撮像してデジタル画像にした検査画像との画素数の差分に基づいて欠陥を検出する。典型的には、この差分値が所定値以上であれば、検査対象を欠陥とするものである。図21は、このような比較検査法を説明するための図である。図21において、CADデータのマスタパターン画像(図21(A))を二値化したデジタル画像(図21(B))に変換する。同様に、検査対象となる検査パターンを撮像した画像(図21(C))も、二値化したデジタル画像(図21(D))に変換する。そして、双方のデジタル画像を比較し、画素毎の差分値を算出する(図21(E))。そして、この差分値が所定値以上であれば、当該検査対象には欠陥があるとされる。   On the surface of the printed circuit board on which electronic components and the like are mounted, a conductor wiring necessary for constituting a predetermined circuit is formed in a pattern. One of the wiring pattern inspection methods is a comparative inspection method. This is a method in which a non-defective image created from CAD data is compared with an inspection image obtained by imaging a substrate to be inspected, and a portion having a certain difference or more is detected as a defect. Specifically, the comparative inspection method is based on a difference in the number of pixels between a master image, which is an image obtained by converting CAD data into a digital image, and an inspection image obtained by capturing an inspection object (inspection object) and converting it into a digital image. Detect defects. Typically, if this difference value is greater than or equal to a predetermined value, the inspection object is a defect. FIG. 21 is a diagram for explaining such a comparative inspection method. In FIG. 21, a CAD data master pattern image (FIG. 21A) is converted into a binarized digital image (FIG. 21B). Similarly, an image obtained by imaging an inspection pattern to be inspected (FIG. 21C) is also converted into a binarized digital image (FIG. 21D). Then, the two digital images are compared, and a difference value for each pixel is calculated (FIG. 21E). If the difference value is equal to or greater than a predetermined value, the inspection object is considered defective.

しかし、プリント基板の表面に形成される配線パターンは、エッチングのような化学処理の工程を介して作られるため、特に角や隅の部分でエッチングの影響を受けやすい。例えば、図形(パターン領域)の凸状の角部分(外角)で、凸部の先端が丸くなってしまう「オーバーエッチング」や、図形の凹状の隅部分(内角)で、凹部の内側が丸くなってしまう「アンダーエッチング」という現象が起こってしまう(図22参照)。このようなオーバーエッチングやアンダーエッチングによって形成されるパターン領域は、上述した比較検査法では、マスタ画像と相違があると判定されるために、欠陥部分として検出される。その一方で、このようなエッチングによる角や隅部分の相違は、プリント基板の性能上大きな問題とはならないことが多い。そのため、このようなオーバーエッチングやアンダーエッチングによって形成されるパターン領域については、欠陥として検出されないことが望ましい。すなわち、プリント基板の表面に形成される配線パターンの比較検査においては、パターンの直線部分については比較検査の感度を上げ、角や隅などのエッジ部分については比較検査の感度を下げて検査することが必要となる。   However, since the wiring pattern formed on the surface of the printed circuit board is produced through a chemical treatment process such as etching, it is particularly susceptible to etching at corners and corners. For example, "over-etching" where the tip of the convex part is rounded at the convex corner (outer corner) of the figure (pattern area), or the inside of the concave part is rounded at the concave corner (inner corner) of the figure A phenomenon called “under etching” occurs (see FIG. 22). The pattern region formed by such over-etching or under-etching is detected as a defective portion because it is determined that there is a difference from the master image in the comparative inspection method described above. On the other hand, such differences in corners and corners due to etching often do not pose a major problem in the performance of printed circuit boards. Therefore, it is desirable that a pattern region formed by such overetching or underetching is not detected as a defect. That is, in the comparative inspection of the wiring pattern formed on the surface of the printed circuit board, the sensitivity of the comparative inspection should be increased for the linear portion of the pattern, and the sensitivity of the comparative inspection should be decreased for the edge portions such as corners and corners. Is required.

上述したオーバーエッチングなどを欠陥として検出しないようにするための方法として、差分値として許容する値を高く設定してプリント基板全面を検査するという方法がある。また、マスタ画像から内角と外角とを検出し、その周囲の一定の範囲だけ差分値として許容する値を高く設定して(すなわち、比較検査の感度を下げる)検査を行うという方法もある。つまり、内角部および外角部周辺についてのみ、差分値が相対的に大きくても欠陥と判定されないようにしておくという方法もある。また、外角部については予め角を丸め(角落とし)、内角部については予め肉付けしたマスタ画像を準備しておいて、検査画像と比較する方法がある(例えば、特許文献1)。さらに、別の方法として、内角部および外角部を比較検査の対象から外すという方法もある(例えば、特許文献2)。
特開平11−143052号公報 特開昭61−86639号公報
As a method for preventing the above-described over-etching or the like from being detected as a defect, there is a method of inspecting the entire surface of the printed circuit board by setting a high allowable value as a difference value. There is also a method in which an inner angle and an outer angle are detected from a master image, and an inspection is performed by setting a high allowable value (that is, lowering the sensitivity of the comparative inspection) for a certain range around the master image. That is, there is also a method in which only the periphery of the inner corner portion and the outer corner portion is not determined as a defect even if the difference value is relatively large. In addition, there is a method in which a corner image is rounded (outside corner) in advance for the outer corner portion and a master image is prepared in advance for the inner corner portion and compared with the inspection image (for example, Patent Document 1). Furthermore, as another method, there is a method of removing the inner corner portion and the outer corner portion from the target of the comparative inspection (for example, Patent Document 2).
Japanese Patent Laid-Open No. 11-143052 JP-A-61-86639

しかしながら、上述した特許文献1に開示された方法の場合、検査対象となるパターン領域の全ての角や隅が、予め角や隅を丸めたマスタ画像と同じような形状となっているとは限らない。これは、検査対象となるパターン領域における角や隅の形状は、エッチングの状態によって変化することがあるためである。そのため、オーバーエッチングやアンダーエッチングを原因とする欠陥検出が多少は軽減されるものの、依然、欠陥として検出される。また、角部や隅部についてのみ欠陥判定の条件の許容値を上げる(感度を下げる)場合は、判定のための許容値を角部や隅部とそれ以外の部分との2種類準備する必要がある。そのため、許容値判定の回路が複数必要になってコストがかかる。また、上述の特許文献2に開示された方法の場合は、確かにオーバーエッチングやアンダーエッチングを原因とする欠陥が検出されないが、そもそも角部や隅部の検査を行っていないため、角部や隅部にプリント基板の性能上問題となるような欠陥が生じている場合も、欠陥として検出できない。   However, in the case of the method disclosed in Patent Document 1 described above, all the corners and corners of the pattern area to be inspected are not necessarily in the same shape as the master image obtained by rounding the corners and corners in advance. Absent. This is because the shape of corners and corners in the pattern region to be inspected may change depending on the etching state. Therefore, although detection of defects due to overetching or underetching is somewhat reduced, it is still detected as a defect. Also, when increasing the tolerance value of the defect judgment condition only for corners and corners (decreasing sensitivity), it is necessary to prepare two types of tolerance values for judgment, corners and corners and other parts. There is. For this reason, a plurality of allowable value determination circuits are required, which is expensive. In addition, in the case of the method disclosed in Patent Document 2 described above, defects due to over-etching or under-etching are certainly not detected, but corners and corners are not inspected in the first place. Even if a defect that causes a problem in the performance of the printed circuit board occurs at the corner, it cannot be detected as a defect.

それ故に、本発明の目的は、角部や隅部を有するパターンであっても適切な比較検査ができる差分比較検査方法および差分比較検査装置を提供することである。   Therefore, an object of the present invention is to provide a difference comparison inspection method and a difference comparison inspection apparatus that can perform an appropriate comparison inspection even for a pattern having corners and corners.

上記目的を達成するために、本発明は以下のような構成を採用した。   In order to achieve the above object, the present invention employs the following configuration.

第1の発明は、パターンが形成された被検査物を撮像したオブジェクト画像と当該パターンのマスタ画像とを比較して、当該被検査物を検査する差分比較検査方法であって、角検出ステップと、内角領域決定ステップと、外角領域決定ステップと、比較検査ステップとを有する。角検出ステップは、パターンに形成された凹状の隅である内角及び凸状の角である外角をそれぞれマスタ画像から検出する。内角領域決定ステップは、検出した内角近傍の領域である内角領域の範囲を決定する。外角領域決定ステップは、検出した外角近傍の領域である外角領域の範囲を決定する。比較検査ステップは、マスタ画像とオブジェクト画像との差分に基づいて比較検査する。また、比較検査ステップは、マスタ画像における内角領域において、当該マスタ画像が示すパターンの領域より過剰に形成されているオブジェクト画像のパターンの領域に対する差分を除外して比較検査する。更に、マスタ画像における外角領域において、当該マスタ画像が示すパターンの領域より不足して形成されているオブジェクト画像のパターンの領域に対する差分を除外して比較検査する。   A first invention is a differential comparison inspection method for inspecting an inspection object by comparing an object image obtained by imaging an inspection object on which a pattern is formed with a master image of the pattern, and a corner detection step , An inner angle area determining step, an outer angle area determining step, and a comparative inspection step. In the corner detection step, an inner angle that is a concave corner formed in the pattern and an outer angle that is a convex corner are detected from the master image. In the interior angle area determination step, a range of the interior angle area that is an area in the vicinity of the detected interior angle is determined. In the outer angle area determination step, a range of the outer angle area that is an area in the vicinity of the detected outer angle is determined. In the comparison inspection step, a comparison inspection is performed based on a difference between the master image and the object image. In the comparison inspection step, a comparison inspection is performed by excluding a difference with respect to the pattern area of the object image formed excessively in the inner corner area of the master image from the pattern area indicated by the master image. Further, in the outer corner area in the master image, a comparison inspection is performed by excluding a difference from the pattern area of the object image formed in a shortage than the pattern area indicated by the master image.

第2の発明は、上記第1の発明において、オブジェクト画像およびマスタ画像は、それぞれパターンが形成された領域の画素値を第1の値、それ以外の画素値を当該第1の値とは異なる第2の値とする二値化された画像である。また、内角領域決定ステップは、内角領域内の画素値を第1の値、当該内角領域外の画素値を第2の値とした内角領域画像を生成する内角領域画像生成ステップを含む。また、外角領域決定ステップは、外角領域内の画素値を第1の値、当該外角領域外の画素値を第2の値とした外角領域画像を生成する外角領域画像生成ステップを含む。また、比較検査ステップは、同一の座標軸上でマスタ画像と内角領域画像と外角領域画像とオブジェクト画像との位置合わせを行う位置合わせステップと、当該座標軸上において同じ位置となる検査対象位置の画素の画素値を各画像から取得する画素値取得ステップと、取得したオブジェクト画像の画素値が第1の値であり、取得したマスタ画像の画素値が第2の値であり、且つ、取得した内角領域画像の画素値が第1の値であるときは、当該検査対象位置のマスタ画像およびオブジェクト画像の画素値を同じ値として比較検査し、取得したオブジェクト画像の画素値が第2の値であり、取得したマスタ画像の画素値が第1の値であり、且つ、取得した外角領域画像の画素値が第1の値であるときは、当該検査対象位置のマスタ画像およびオブジェクト画像の画素値を同じ値として比較検査する。   In a second aspect based on the first aspect, the object image and the master image are different from the first value in the pixel value of the area where the pattern is formed, and the other pixel values are different from the first value. It is the binarized image used as the second value. The inner angle area determination step includes an inner angle area image generation step of generating an inner angle area image in which the pixel value in the inner angle area is the first value and the pixel value outside the inner angle area is the second value. In addition, the outside angle area determining step includes an outside angle area image generating step for generating an outside angle area image in which the pixel value in the outside angle area is the first value and the pixel value outside the outside angle area is the second value. The comparison inspection step includes an alignment step for aligning the master image, the inner angle area image, the outer angle area image, and the object image on the same coordinate axis, and the pixel at the inspection target position that is the same position on the coordinate axis. A pixel value acquisition step for acquiring a pixel value from each image, the pixel value of the acquired object image is the first value, the pixel value of the acquired master image is the second value, and the acquired inner angle region When the pixel value of the image is the first value, the master image at the inspection target position and the pixel value of the object image are compared and inspected, and the pixel value of the acquired object image is the second value, When the pixel value of the acquired master image is the first value and the pixel value of the acquired outer-angle region image is the first value, the master image and the offset of the inspection target position are displayed. Comparing the inspection pixel values of the object image as the same value.

第3の発明は、上記第1の発明において、角検出ステップは、内角あるいは外角をそれぞれ示す1つの画素をマスタ画像から検出し、内角領域決定ステップは、検出した内角となる画素を中心とする所定の大きさの領域を内角領域として決定し、外角領域決定ステップは、検出した外角となる画素を中心とする所定の大きさの領域を外角領域として決定する。   In a third aspect based on the first aspect, the angle detection step detects one pixel indicating the inner angle or the outer angle from the master image, and the inner angle region determination step centers on the pixel that is the detected inner angle. A region having a predetermined size is determined as the inner corner region, and the outer corner region determining step determines a region having a predetermined size centered on the detected pixel having the outer corner as the outer corner region.

第4の発明は、上記第3の発明において、内角領域決定ステップは、検出された内角の画素に対して、膨張処理を予め定められた回数以上繰り返して実行することで内角領域を決定し、外角領域決定ステップは、検出された外角の画素に対して、膨張処理を予め定められた回数以上繰り返して実行することで外角領域を決定する。   In a fourth aspect based on the third aspect, the inner angle area determining step determines the inner angle area by repeatedly performing the expansion process a predetermined number of times or more on the detected inner angle pixels, In the outer corner area determination step, the outer corner area is determined by repeatedly performing the expansion process on the detected outer corner pixels by a predetermined number of times or more.

第5の発明は、上記第4の発明において、検出した内角あるいは外角に近接するパターンの直線部の幅を検出する幅検出ステップを更に有する。また、内角領域画像生成ステップは、検出された幅に応じて、膨張処理を繰り返す回数を変更し、外角領域画像生成ステップは、検出された幅に応じて、膨張処理を繰り返す回数を変更する。   According to a fifth aspect of the present invention, in the fourth aspect of the present invention, the method further includes a width detecting step of detecting a width of the linear portion of the pattern close to the detected inner angle or outer angle. The inner corner area image generation step changes the number of times of repeating the expansion process according to the detected width, and the outer angle area image generation step changes the number of times of repeating the expansion process according to the detected width.

第6の発明は、上記第3の発明において、角検出ステップは、マスタ画像における注目画素の画素値と当該注目画素を基準に抽出する複数の画素の位置をそれぞれ示す複数のパターンを用いてマスタ画像から抽出された画素値と、所定の論理式とを用いて、当該注目画素が内角あるいは外角を示す1つの画素であることを検出する論理演算ステップを更に含む。また、論理演算ステップは、パターンのうち、いずれか1つのパターンを用いて抽出された画素値および注目画素の画素値が代入された所定の論理式の演算結果が内角あるいは外角であることを示したときは、当該注目画素を内角あるいは外角を示す1つの画素として検出する。   In a sixth aspect based on the third aspect, the corner detection step uses a plurality of patterns each indicating a pixel value of the target pixel in the master image and a plurality of pixel positions extracted based on the target pixel. It further includes a logical operation step of detecting that the pixel of interest is one pixel indicating an inner angle or an outer angle using a pixel value extracted from the image and a predetermined logical expression. The logical operation step indicates that the operation result of a predetermined logical expression in which the pixel value extracted using any one of the patterns and the pixel value of the target pixel is substituted is an interior angle or an exterior angle. In this case, the target pixel is detected as one pixel indicating the inner angle or the outer angle.

第7の発明は、上記第3の発明において、角検出ステップは、マスタ画像における注目画素の画素値と当該注目画素を基準に抽出する複数の画素の位置をそれぞれ示す複数のパターンを用いてマスタ画像から抽出された画素値とを用いて、当該注目画素が内角あるいは外角を示す1つの画素であることを検出する論理演算ステップを更に含み、論理演算ステップは、注目画素の画素値がマスタ画像で示されるパターンの領域内を示し、当該注目画素の画素値が前記パターンの何れか1つを用いて抽出された画素値全てと異なるとき、当該注目画素が外角を示す1つの画素であるとして検出し、注目画素の画素値がマスタ画像で示されるパターンの領域外を示し、当該注目画素の画素値がパターンの何れか1つを用いて抽出された画素値全てと異なるとき、当該注目画素が内角を示す1つの画素であるとして検出する。   In a seventh aspect based on the third aspect, the corner detection step is performed using a plurality of patterns each indicating a pixel value of a target pixel in the master image and positions of a plurality of pixels extracted based on the target pixel. It further includes a logical operation step for detecting that the pixel of interest is one pixel indicating an internal angle or an external angle using the pixel value extracted from the image, and the logical operation step includes a pixel value of the pixel of interest as a master image. When the pixel value of the target pixel is different from all the pixel values extracted using any one of the patterns, the target pixel is one pixel indicating an outer angle. And the pixel value of the target pixel indicates outside the pattern area indicated by the master image, and the pixel value of the target pixel is all extracted using any one of the patterns. When made, it is detected as the target pixel is a pixel showing the interior angle.

第8の発明は、パターンが形成された被検査物を撮像したオブジェクト画像と当該パターンのマスタ画像とを比較して、当該被検査物を検査する差分比較検査装置であって、角検出部と、内角領域決定部と、外角領域決定部と、比較検査部とを備える。角検出部は、パターンに形成された凹状の隅である内角及び凸状の角である外角をそれぞれマスタ画像から検出する。内角領域決定部は、検出した内角近傍の領域である内角領域の範囲を決定する。外角領域決定部は、検出した外角近傍の領域である外角領域の範囲を決定する。比較検査部は、マスタ画像と前記オブジェクト画像との差分に基づいて比較検査する。また、比較検査部は、マスタ画像における内角領域において、当該マスタ画像が示すパターンの領域より過剰に形成されているオブジェクト画像のパターンの領域に対する差分を除外して比較検査する。また、比較検査部は、マスタ画像における外角領域において、当該マスタ画像が示すパターンの領域より不足して形成されているオブジェクト画像のパターンの領域に対する差分を除外して比較検査する。   An eighth invention is a differential comparison inspection apparatus that inspects an inspection object by comparing an object image obtained by imaging the inspection object on which a pattern is formed with a master image of the pattern, , An inner angle region determination unit, an outer angle region determination unit, and a comparison inspection unit. The corner detection unit detects an inner angle, which is a concave corner, and an outer angle, which is a convex corner, formed in the pattern from the master image. The interior angle area determination unit determines the range of the interior angle area that is an area in the vicinity of the detected interior angle. The outside angle area determination unit determines a range of the outside angle area, which is an area in the vicinity of the detected outside angle. The comparison inspection unit performs a comparison inspection based on a difference between the master image and the object image. In addition, the comparative inspection unit performs a comparative inspection by excluding a difference with respect to the pattern area of the object image that is formed excessively in the inner corner area of the master image from the pattern area indicated by the master image. In addition, the comparison inspection unit performs a comparative inspection by excluding a difference with respect to the pattern area of the object image formed in the outer corner area of the master image that is less than the pattern area indicated by the master image.

上記第1の発明によれば、マスタ画像とオブジェクト画像で一致しない個所があっても、当該個所が内角あるいは外角であるかに応じて、比較検査の感度(検査精度)を変更できる。すなわち、オブジェクト画像の内角部分について、マスタ画像よりも過剰な部分があっても、当該部分については差分をとらず、その結果、当該部分について欠陥として報告されるという虚報を防ぐことができる一方、同じ内角部分であっても、本来欠陥として報告されるべき部分については、差分が取られ、欠陥として報告される。また、オブジェクト画像の外角部分について、マスタ画像に対して不足している部分があっても、当該部分については差分をとらず、その結果、当該部分について欠陥として報告される虚報を防ぐことができる。一方、同じく外角部分であっても、本来欠陥として報告されるべき部分については、差分が取られ、欠陥として報告される。これにより、雑多になりがちなプリントパターンの角部の形状に応じて、適切な欠陥検出が可能となる。また、従来のように、内角部および外角部周辺について、差分値が相対的に大きくても欠陥と判定されないように高い値を設定して検査を行う必要もない。すなわち、欠陥として報告される差分値の閾値を低下させることができる。そのため、差分値の閾値を低めに設定し、全体として高い感度の比較検査を行いつつも、アンダーエッチングやオーバーエッチングにような欠陥としては検出して欲しくない部分については、欠陥として検出されることを防ぐことができる。その結果、精度の高い比較検査が可能となる。   According to the first aspect, even if there is a location that does not match between the master image and the object image, the sensitivity (inspection accuracy) of the comparative inspection can be changed depending on whether the location is an internal angle or an external angle. That is, for the inner corner portion of the object image, even if there is an excess portion than the master image, it does not take a difference for that portion, and as a result, it is possible to prevent false reports that the portion is reported as a defect, Even for the same inner corner portion, a difference is taken for a portion that should originally be reported as a defect, and is reported as a defect. In addition, even if there is a portion that is lacking with respect to the master image in the outer corner portion of the object image, the difference is not taken for the portion, and as a result, false information that is reported as a defect for the portion can be prevented. . On the other hand, even for the outer corner portion, a difference is taken for a portion that should be reported as a defect and is reported as a defect. Thereby, it becomes possible to detect an appropriate defect according to the shape of the corner of the print pattern which tends to be miscellaneous. In addition, as in the prior art, it is not necessary to perform inspection by setting a high value around the inner corner and the outer corner so as not to be determined as a defect even if the difference value is relatively large. That is, the threshold value of the difference value reported as a defect can be reduced. Therefore, the threshold value of the difference value is set low, and a high sensitivity comparison inspection is performed as a whole, but parts that are not desired to be detected as defects such as under etching and over etching are detected as defects. Can be prevented. As a result, a highly accurate comparative inspection is possible.

上記第2の発明によれば、二値化した画像を用いるため、例えば0と1の組み合わせによる単純な論理判定処理を行うことができ、処理速度を高めることが可能となる。   According to the second aspect, since a binarized image is used, a simple logic determination process using a combination of 0 and 1, for example, can be performed, and the processing speed can be increased.

上記第3の発明によれば、検出された内角あるいは外角の画素を中心とする領域を内角領域あるいは外角領域とする。これにより、エッチングファクター等による内角や外角の様々な形状に対しても万能的に対応した比較検査を行うことができる。   According to the third aspect of the invention, the area centered on the detected inner angle or outer angle pixel is defined as the inner angle area or the outer angle area. Thereby, it is possible to carry out a comparative inspection that is universally compatible with various shapes such as an inner angle and an outer angle due to an etching factor or the like.

上記第4の発明によれば、検出された内角あるいは外角の画素を近傍膨張することで内角領域あるいは外角領域とする。これにより、ほぼ円状の領域が生成できるため、多彩な角や隅の形状に対応できる内角領域および外角領域を生成することができる。   According to the fourth aspect of the invention, the detected inner angle or outer angle pixel is expanded in the vicinity to obtain the inner angle region or the outer angle region. Thereby, since a substantially circular area can be generated, an inner angle area and an outer angle area that can correspond to various corner and corner shapes can be generated.

上記第5の発明によれば、検出した外角あるいは内角に近接しているパターンの直線部の幅に応じて、当該内角および外角の画素の膨張段数を変化させる。これにより、直線部の幅に応じた内角領域および外角領域を生成することができ、より適切で精度の高い比較検査が可能となる。   According to the fifth aspect of the invention, the number of expansion stages of the pixels at the inner angle and the outer angle is changed according to the detected width of the linear portion of the pattern close to the outer angle or the inner angle. Thereby, it is possible to generate an inner corner region and an outer corner region according to the width of the straight line portion, and it is possible to perform a comparative examination with higher accuracy and higher accuracy.

上記第6乃至第7の発明によれば、所定のパターンおよび論理式を用いて内角あるいは外角を示す画素の検出を行う。そのため、マスタ画像の各画素について一律でかつ単純な判定処理を行うことで内角あるいは外角を検出することができ、処理の高速化および処理負荷を軽減を図ることができる。   According to the sixth to seventh aspects of the present invention, the pixels indicating the inner angle or the outer angle are detected using a predetermined pattern and logical expression. Therefore, by performing uniform and simple determination processing for each pixel of the master image, the inner angle or the outer angle can be detected, and the processing speed can be increased and the processing load can be reduced.

また、本発明の比較検査装置によれば、上述した第1の発明と同様の効果を得ることができる。   Further, according to the comparative inspection apparatus of the present invention, the same effect as that of the first invention described above can be obtained.

以下、本発明の一実施形態に係る差分比較検査装置ついて、図面を参照して説明する。図1は、当該差分比較検査装置の一例である光学式外観検査装置1(以下、検査装置1と呼ぶ)の全体構成を模式的に示す図である。すなわち、図1(A)は検査装置1の上面図であり、図1(B)は検査装置1の正面図である。図1において、検査装置1は、ステージ部11、ステージ支持部12、ステージ駆動機構13、ベース部14、撮像カメラ15、支持部材16、カメラ支持部17、およびカメラ駆動機構18を備えている。   Hereinafter, a differential comparison inspection apparatus according to an embodiment of the present invention will be described with reference to the drawings. FIG. 1 is a diagram schematically showing an overall configuration of an optical appearance inspection apparatus 1 (hereinafter referred to as an inspection apparatus 1) which is an example of the difference comparison inspection apparatus. 1A is a top view of the inspection apparatus 1, and FIG. 1B is a front view of the inspection apparatus 1. FIG. In FIG. 1, the inspection apparatus 1 includes a stage unit 11, a stage support unit 12, a stage drive mechanism 13, a base unit 14, an imaging camera 15, a support member 16, a camera support unit 17, and a camera drive mechanism 18.

ステージ部11は、最上面に水平のステージ面を構成している。被検査物であるプリント配線板Sは、ステージ部11のステージ面上に載置される。ステージ部11の下部は、ステージ支持部12によって支持されている。ステージ支持部12は、ステージ駆動機構13の上面に固設されている。また、ベース部14は、上記ステージ面と平行でかつ図示Y軸方向(主走査方向)に延設されて固定される。ステージ駆動機構13は、ベース部14の上面にY軸方向に延びるように設けられたガイド上に、当該ガイドに沿って滑動可能に設置される。つまり、ステージ駆動機構13、ならびにその上に固定されるステージ支持部12およびステージ部11は、Y軸方向に移動可能である。   The stage unit 11 constitutes a horizontal stage surface on the top surface. The printed wiring board S that is the object to be inspected is placed on the stage surface of the stage unit 11. The lower part of the stage unit 11 is supported by a stage support unit 12. The stage support 12 is fixed on the upper surface of the stage drive mechanism 13. The base portion 14 is parallel to the stage surface and extends and fixed in the illustrated Y-axis direction (main scanning direction). The stage drive mechanism 13 is slidably installed along a guide provided on the upper surface of the base portion 14 so as to extend in the Y-axis direction. That is, the stage drive mechanism 13 and the stage support part 12 and the stage part 11 fixed on the stage drive mechanism 13 are movable in the Y-axis direction.

支持部材16は、ステージ部11の上部空間に架設されている。支持部材16上には、上記ステージ面と平行で、かつ上記Y軸方向に垂直な図示X軸方向(副走査方向)に延びるカメラ駆動機構18が設けられる。カメラ支持部17は、カメラ駆動機構18に接続され、X軸方向に沿って往復移動可能に配置される。撮像カメラ15は、その撮像方向が鉛直下向き(図示Z軸下方向)となるようにカメラ支持部17に支持されている。撮像カメラ15は、例えばCCDカメラにより構成され、入射する光をその色や強度を示す電気信号に変換して、撮像したプリント配線板Sの画像を生成する。   The support member 16 is installed in the upper space of the stage unit 11. On the support member 16, there is provided a camera drive mechanism 18 that extends in the illustrated X-axis direction (sub-scanning direction) parallel to the stage surface and perpendicular to the Y-axis direction. The camera support unit 17 is connected to the camera drive mechanism 18 and is disposed so as to be capable of reciprocating along the X-axis direction. The imaging camera 15 is supported by the camera support 17 so that the imaging direction is vertically downward (downward in the Z axis in the drawing). The imaging camera 15 is constituted by a CCD camera, for example, and converts incident light into an electrical signal indicating its color and intensity to generate an image of the captured printed wiring board S.

検査装置1は、撮像カメラ15によってプリント配線板Sを撮像し、プリント配線板Sの上面の画像を取得する。このとき、プリント配線板Sの全面の画像を取得するために、検査装置1は、ステージ部11をY軸方向に移動させるとともに撮像カメラ15をX軸方向に移動させる。具体的には、撮像カメラ15のX軸方向の位置を固定した状態でステージ部11がY軸方向に移動されることによって主走査が行われる。ここで、基板Sの一端から他端までの主走査が完了する毎に、撮像カメラ15は副走査方向(X軸方向)に沿って所定距離だけ移動する。これによって、プリント配線板Sの検査領域全体についてのプリントパターンを含むプリント配線板Sの全面の画像を撮像カメラ15によって得ることが可能となる。   The inspection apparatus 1 captures an image of the printed wiring board S with the imaging camera 15 and acquires an image of the upper surface of the printed wiring board S. At this time, in order to acquire an image of the entire surface of the printed wiring board S, the inspection apparatus 1 moves the stage unit 11 in the Y-axis direction and moves the imaging camera 15 in the X-axis direction. Specifically, main scanning is performed by moving the stage unit 11 in the Y-axis direction while the position of the imaging camera 15 in the X-axis direction is fixed. Here, every time main scanning from one end to the other end of the substrate S is completed, the imaging camera 15 moves by a predetermined distance along the sub-scanning direction (X-axis direction). As a result, an image of the entire surface of the printed wiring board S including the print pattern for the entire inspection area of the printed wiring board S can be obtained by the imaging camera 15.

図2は、検査装置1の機能的な構成を示すブロック図である。図2において、検査装置1は、上述した構成要素の他に、制御部21、オブジェクト画像生成部22、角領域画像生成部23、記憶部26、および比較検査部31を備えている。   FIG. 2 is a block diagram showing a functional configuration of the inspection apparatus 1. In FIG. 2, the inspection apparatus 1 includes a control unit 21, an object image generation unit 22, a corner area image generation unit 23, a storage unit 26, and a comparison inspection unit 31 in addition to the components described above.

制御部21は、例えばCPUボードによって構成されている。制御部21は、以下に述べる各構成部と接続されている。また、制御部21は、記憶部26へのデータの入出力や撮像カメラ15の動作制御や各種画像処理等の、本実施形態に係る検査処理全体の制御を行う。   The control unit 21 is configured by, for example, a CPU board. The control unit 21 is connected to each component described below. The control unit 21 also controls the entire inspection process according to the present embodiment, such as data input / output to / from the storage unit 26, operation control of the imaging camera 15, and various image processing.

オブジェクト画像生成部22は、撮像カメラ15が取り込んだ画像を2値化する。ここでは、撮像カメラ15が取り込んだ画像を構成する各画素のうち、所定の閾値より濃度が高い(濃い)画素を1とし、残りの画素を0として2値化するものとする。もちろん、所定の閾値より濃度が高い画素を0とし、残りの画素を1としても構わない。また、オブジェクト画像生成部22は、当該2値化した画像であるオブジェクト画像27を記憶部26へ格納する。   The object image generation unit 22 binarizes the image captured by the imaging camera 15. Here, it is assumed that, among the pixels constituting the image captured by the imaging camera 15, a pixel having a density higher (darker) than a predetermined threshold is set to 1, and the remaining pixels are set to 0 to be binarized. Of course, a pixel having a density higher than a predetermined threshold may be set to 0 and the remaining pixels may be set to 1. Further, the object image generation unit 22 stores the object image 27 that is the binarized image in the storage unit 26.

角領域画像生成部23は、角検出部24および膨張部25を備えている。角検出部24は、記憶部26に格納されているマスタ画像28を読み込み、当該マスタ画像28から、内角および外角の位置をそれぞれ検出する。膨張部25は、角検出部24が検出した内角及び外角の位置に相当する上記マスタ画像上の1画素を、所定の段数だけ8近傍膨張(拡大)することで内角領域および外角領域を決定し、当該内角領域および外角領域をそれぞれ示す内角領域画像29および外角領域画像30を生成して、記憶部26に格納する。   The corner area image generation unit 23 includes a corner detection unit 24 and an expansion unit 25. The angle detection unit 24 reads the master image 28 stored in the storage unit 26 and detects the positions of the inner angle and the outer angle from the master image 28. The expansion unit 25 determines an internal angle region and an external angle region by expanding (enlarging) one pixel on the master image corresponding to the position of the internal angle and the external angle detected by the angle detection unit 24 by a predetermined number of steps. Then, an inner angle area image 29 and an outer angle area image 30 respectively indicating the inner angle area and the outer angle area are generated and stored in the storage unit 26.

記憶部26は、例えば半導体メモリやハードディスク等の記憶媒体であり、上記オブジェクト画像27と、CADデータに基づいて予め作成されるマスタ画像28と、膨張部25によって生成される内角領域画像29および外角領域画像30(詳細は後述)とが格納される。また、図示しないが、後述する比較検査処理で用いられる各種フラグ等も記憶部26に記憶される。   The storage unit 26 is, for example, a storage medium such as a semiconductor memory or a hard disk, and the object image 27, a master image 28 created in advance based on CAD data, an inner angle region image 29 and an outer angle generated by the expansion unit 25. A region image 30 (details will be described later) is stored. Although not shown, various flags and the like used in the comparison inspection process described later are also stored in the storage unit 26.

比較検査部31は、上記記憶部26に格納されている内角領域画像29および外角領域画像30を用いて、オブジェクト画像27とマスタ画像28との比較検査を行う。   The comparison inspection unit 31 performs a comparison inspection between the object image 27 and the master image 28 using the inner corner area image 29 and the outer corner area image 30 stored in the storage unit 26.

なお、図2に示す制御部21、オブジェクト画像生成部22、角領域画像生成部23、および比較検査部31は、典型的には集積回路であるLSIとして実現してもよい。これらは、個別に1チップ化されても良いし、一部または全てを含むように1チップ化されても良い。また、集積回路化の手法は、LSIに限るものではなく、専用回路または汎用プロセッサで実現してもよい。   Note that the control unit 21, the object image generation unit 22, the corner area image generation unit 23, and the comparative inspection unit 31 illustrated in FIG. 2 may be realized as an LSI that is typically an integrated circuit. These may be individually made into one chip, or may be made into one chip so as to include a part or all of them. Further, the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible.

次に、本実施形態における比較検査処理の概要について説明する。本実施形態では、基本的には、CADデータから生成された2値化画像であるマスタ画像28と、検査対象を撮像して、同様に2値化することで生成されたオブジェクト画像27とを比較することで比較検査処理が行われる。なお、ここでは、説明を具体的にするために、プリントパターン領域内となる部分を1(ドット有り)、領域外となる部分を0(ドット無し)とする。   Next, an outline of the comparison inspection process in the present embodiment will be described. In the present embodiment, basically, a master image 28 that is a binarized image generated from CAD data, and an object image 27 that is generated by imaging the inspection target and binarizing in the same manner. A comparison inspection process is performed by comparison. Here, in order to make the description more specific, a portion within the print pattern area is set to 1 (with dots), and a section outside the area is set to 0 (without dots).

図3(A)は、マスタ画像28の一例を示す図であり、図4はオブジェクト画像27の一例を示す図である。この2つの画像を単純に比較すると、図4のオブジェクト画像27において、アンダーエッチング部分41(マスタ画像28が示すパターン領域より過剰に形成されている領域)およびオーバーエッチング部分42(マスタ画像28が示すパターン領域より不足して形成されている領域)については、マスタ画像28と一致しない。   FIG. 3A is a diagram illustrating an example of the master image 28, and FIG. 4 is a diagram illustrating an example of the object image 27. When these two images are simply compared, in the object image 27 of FIG. 4, an under-etched portion 41 (a region formed in excess of the pattern region indicated by the master image 28) and an over-etched portion 42 (the master image 28 shows) The area that is formed less than the pattern area does not match the master image 28.

そのため、比較検査を行う前に、内角と外角とを識別するための画像データ、すなわち、内角領域画像29および外角領域画像30を生成する。具体的には、マスタ画像28から、後述のような方法でパターンに形成された凹状の隅である内角(図3(A)の菱形印)および凸状の角である外角(図3(A)の星印)を示す1画素をそれぞれ検出する。次に、当該検出した1画素を所定の段数だけ8近傍膨張する。すなわち、検出された1画素を当該1画素を中心とした複数画素に拡大することで、当該検出された1画素の近傍領域を内角領域あるいは外角領域として生成する。そして、図3(B)に示すような、検出された内角の1画素を拡大した内角領域を1とし、その他の領域を0とする画像データ29を生成する(これが、内角領域画像29となる)。併せて、図3(C)に示すような、検出された外角の1画素を拡大した外角領域を1とし、その他の領域を0とする画像データ30も生成する(これが、外角領域画像30となる)。なお、図3(A)〜図3(C)においては、1(ドットあり)を黒色領域で示し、0(ドット無し)を白色領域で示している。そして、マスタ画像28とオブジェクト画像27とを比較検査する際に、例えば、ある画素を比較したときに、マスタ画像28とオブジェクト画像27とで差異があったときは、上記内角領域画像29および外角領域画像30を参照し、当該差異のある画素が内角領域あるいは外角領域に含まれているかを判定する。その結果、内角領域に含まれている場合は、当該画素が、アンダーエッチング部分(過剰に形成されている領域)であれば、当該画素についての差分は取らないが、当該画素がオーバーエッチング部分(不足して形成されている領域)であれば、差分を取る。一方、外角領域に含まれている場合は、当該画素が、当該画素がオーバーエッチング部分であれば、差分を取らないが、アンダーエッチング部分であれば、当該画素についての差分は取る。そして、最終的な差分値が所定の許容値を超えていれば、欠陥があると判定するものである。   Therefore, before the comparison inspection is performed, image data for identifying the inner angle and the outer angle, that is, the inner angle region image 29 and the outer angle region image 30 are generated. Specifically, from the master image 28, an inner angle (diamond mark in FIG. 3 (A)) that is a concave corner formed in a pattern by a method as described later and an outer angle (FIG. 3 (A) that is a convex corner). Each pixel indicating ()) is detected. Next, the detected one pixel is expanded by 8 by a predetermined number of stages. That is, by expanding one detected pixel to a plurality of pixels centered on the one pixel, a region near the detected one pixel is generated as an inner corner region or an outer corner region. Then, as shown in FIG. 3B, image data 29 is generated in which the inner angle area obtained by enlarging one pixel of the detected inner angle is set to 1, and the other areas are set to 0 (this becomes the inner angle area image 29). ). In addition, as shown in FIG. 3C, image data 30 is also generated in which the outside angle region obtained by enlarging one pixel of the detected outside angle is set to 1, and the other region is set to 0 (this corresponds to the outside angle region image 30 and Become). In FIGS. 3A to 3C, 1 (with dots) is shown as a black area, and 0 (without dots) is shown as a white area. When the master image 28 and the object image 27 are compared and inspected, for example, when a certain pixel is compared, if there is a difference between the master image 28 and the object image 27, the inner angle region image 29 and the outer angle With reference to the region image 30, it is determined whether the pixel having the difference is included in the inner corner region or the outer corner region. As a result, when the pixel is included in the inner corner region, if the pixel is an under-etched portion (an excessively formed region), no difference is taken for the pixel, but the pixel is an over-etched portion ( If it is an area that is insufficiently formed, the difference is taken. On the other hand, when the pixel is included in the outer corner region, the difference is not taken if the pixel is an over-etched portion, but the difference is taken for the pixel if the pixel is an under-etched portion. Then, if the final difference value exceeds a predetermined allowable value, it is determined that there is a defect.

図5は、本実施形態における比較検査の原理を示す図である。図5において、検査対象画素値51は、検査対象画素についてのマスタ画像28およびオブジェクト画像27の画素値を示す。当該画素値は、0が画素のないことを示し、1は画素があることを示す。差分の有無52は、当該画素にかかるマスタ画像28とオブジェクト画像27との差分の有無を示す。0は差分がないことを示し、1は差分があることを示す。   FIG. 5 is a diagram showing the principle of comparative inspection in the present embodiment. In FIG. 5, the inspection target pixel value 51 indicates the pixel values of the master image 28 and the object image 27 for the inspection target pixel. In the pixel value, 0 indicates that there is no pixel, and 1 indicates that there is a pixel. The presence / absence 52 of the difference indicates the presence / absence of a difference between the master image 28 and the object image 27 relating to the pixel. 0 indicates that there is no difference, and 1 indicates that there is a difference.

図5において、例えば、所定の画素の画素値について、マスタ画像28およびオブジェクト画像27が共に0である場合は、外角領域、内角領域、および通常領域全てに対して差分がない(0)と判定される。マスタ画像28およびオブジェクト画像27が共に1である場合も、同様に、全てに対して差分がない(0)と判定される。   In FIG. 5, for example, when the master image 28 and the object image 27 are both 0 for the pixel value of a predetermined pixel, it is determined that there is no difference (0) with respect to all of the outer angle area, the inner angle area, and the normal area. Is done. Similarly, when both the master image 28 and the object image 27 are 1, it is determined that there is no difference for all (0).

一方、検査対象の画素にかかるマスタ画像28の画素値が0でオブジェクト画像27の画素値が1の場合は、当該画素が外角領域および通常領域にあるときは差分がある(1)と判定される。しかし、当該画素が内角領域にあるときは、差分がない(0)と判定される。つまり、図4に示したアンダーエッチング部分41については、差分があるとは判定しない。一方、当該画素が内角領域に含まれていても、マスタ画像28の画素値が1でオブジェクト画像27の画素値が0の場合、すなわち、内角領域におけるオーバーエッチング部分については、差分があると判定される。   On the other hand, when the pixel value of the master image 28 relating to the pixel to be inspected is 0 and the pixel value of the object image 27 is 1, it is determined that there is a difference (1) when the pixel is in the outer corner area and the normal area. The However, when the pixel is in the inner corner area, it is determined that there is no difference (0). That is, the under-etched portion 41 shown in FIG. 4 is not determined to have a difference. On the other hand, even if the pixel is included in the inner corner area, if the pixel value of the master image 28 is 1 and the pixel value of the object image 27 is 0, that is, the over-etched portion in the inner corner area is determined to have a difference. Is done.

また、検査対象の画素にかかるマスタ画像28の画素値が1でオブジェクト画像27の画素値が0の場合は、当該画素が内角領域および通常領域にあるときは差分がある(1)と判定される。しかし、当該画素が外角領域にあるときは、差分がない(0)と判定される。つまり、図4に示したオーバーエッチング部分42については、差分があるとは判定しない。一方、当該画素が外角領域に含まれていても、マスタ画像28の画素値が0でオブジェクト画像27の画素値が1の場合、すなわち、外角領域におけるアンダーエッチング部分については、差分があると判定される。このように、本実施形態では、マスタとオブジェクトとで差異がある部分につき、当該差異のある部分が内角領域か外角領域か通常領域かに応じて、差分検出の判定基準を変化させる。   When the pixel value of the master image 28 relating to the pixel to be inspected is 1 and the pixel value of the object image 27 is 0, it is determined that there is a difference (1) when the pixel is in the inner corner area and the normal area. The However, when the pixel is in the outer corner area, it is determined that there is no difference (0). That is, it is not determined that there is a difference in the over-etched portion 42 shown in FIG. On the other hand, even if the pixel is included in the outer corner area, if the pixel value of the master image 28 is 0 and the pixel value of the object image 27 is 1, that is, the under-etched portion in the outer corner area is determined to have a difference. Is done. As described above, in this embodiment, the difference detection criterion is changed according to whether there is a difference between the master and the object, depending on whether the difference is the inner corner region, the outer corner region, or the normal region.

以下、図6〜図20を用いて、検査装置1が行う比較検査処理の詳細動作を説明する。まず、比較検査処理に先立って、上述した比較検査に用いる各種画像を準備するための準備処理が行われる。図6は、当該準備処理の詳細を示すフローチャートである。   The detailed operation of the comparison inspection process performed by the inspection apparatus 1 will be described below with reference to FIGS. First, prior to the comparison inspection process, a preparation process for preparing various images used for the above-described comparison inspection is performed. FIG. 6 is a flowchart showing details of the preparation process.

図6において、まず、内角領域画像29を生成するための内角領域画像生成処理(ステップS1)が行われる。続いて、外角領域画像30を生成するための外角領域画像生成処理(ステップS2)が行われる。なお、これらの処理を行う順序は逆でもいいし、並行に行ってもかまわない。ここで、本実施形態における内角とは、例えば、図7に示すような、プリントパターンに形成された凹状の隅となる部分であって、プリントパターンの領域外に位置する隅の1画素を内角ポイントと呼ぶ(図7の菱形印の画素)。また、外角は、図7に示すような、プリントパターンに形成された凸状の角となる部分であって、プリントパターンの領域内に位置する角の1画素を外角ポイントと呼ぶ(図7の星印の画素)。   In FIG. 6, first, an inner corner area image generation process (step S1) for generating the inner corner area image 29 is performed. Subsequently, an outside angle area image generation process (step S2) for generating the outside angle area image 30 is performed. The order in which these processes are performed may be reversed, or may be performed in parallel. Here, the interior angle in the present embodiment is, for example, a concave corner formed in the print pattern as shown in FIG. 7, and one corner pixel located outside the print pattern area is defined as the interior angle. It is called a point (pixels with diamonds in FIG. 7). In addition, the outer angle is a convex corner formed in the print pattern as shown in FIG. 7, and one corner pixel located in the print pattern region is called an outer angle point (see FIG. 7). Star pixel).

図8は、上記ステップS1で示した内角領域画像生成処理の詳細を示すサブルーチンである。図8において、まず、制御部21は、予め生成され記憶部26に格納されているているマスタ画像28を角検出部24に読み込ませる(ステップS11)。   FIG. 8 is a subroutine showing details of the inner corner area image generation processing shown in step S1. In FIG. 8, first, the control unit 21 causes the corner detection unit 24 to read the master image 28 that is generated in advance and stored in the storage unit 26 (step S <b> 11).

続いて、角検出部24は、読み込んだマスタ画像28から、上記内角ポイントを検出する(ステップS12)。このステップS12の処理を、より具体的に説明すると、まず、角検出部24は、マスタ画像28の各画素から、内角ポイントであるか否かの判定対象となる1画素(以下、注目画素と呼ぶ)を決定する。そして、当該注目画素およびその周辺の所定の画素の画素値(1か0か)に基づいて、次に説明するような論理演算を行うことで、注目画素が内角ポイントであるか否かを判定する。図9は、当該内角ポイント検出のために用いられる、上記注目画素とその周辺の所定の画素との組み合わせパターン91を示す図である。図9では内角ポイントを検出するために用いる画素を、注目画素Oと、その周辺の所定の画素A、B、およびCとによって示しており、それらの組み合わせが合計8個のパターン91として用意されている。そして、各パターン91が示す注目画素Oと、その周辺の所定の画素A、B、およびCとの画素値を用いて、以下のような論理演算を行う。
On=!O&A&B&C
なお、上記数式おける!は反転、&は論理積を示している。また、1は画素有り、0は画素無しを示す。そして、上記の演算を図9に示す全てのパターン91について行い、いずれか1つでも、On=1となれば、上記注目画素Pは内角ポイントであるとする。そして、マスタ画像28の全ての画素を順に注目画素に設定しながら、このような論理演算を行っていくことで、マスタ画像28における内角ポイントを検出する。
Subsequently, the corner detection unit 24 detects the inner corner point from the read master image 28 (step S12). The process of step S12 will be described more specifically. First, the corner detection unit 24 determines, from each pixel of the master image 28, one pixel (hereinafter referred to as a target pixel) to be determined as to whether or not it is an inner corner point. Call). Then, based on the pixel value (1 or 0) of the target pixel and a predetermined pixel around it, it is determined whether or not the target pixel is an internal angle point by performing a logical operation as described below. To do. FIG. 9 is a diagram showing a combination pattern 91 of the pixel of interest and predetermined pixels around it, which is used for detecting the inner corner point. In FIG. 9, the pixels used for detecting the inner angle point are indicated by the pixel of interest O and predetermined pixels A, B, and C around the pixel of interest O, and combinations thereof are prepared as a total of eight patterns 91. ing. Then, using the pixel values of the pixel of interest O indicated by each pattern 91 and the predetermined pixels A, B, and C around it, the following logical operation is performed.
On =! O & A & B & C
The above formula can be used! Indicates inversion, and & indicates logical product. 1 indicates that there is a pixel, and 0 indicates that there is no pixel. Then, the above calculation is performed for all the patterns 91 shown in FIG. 9, and if any one of them is On = 1, it is assumed that the pixel of interest P is an inner angle point. Then, by performing such a logical operation while sequentially setting all the pixels of the master image 28 as the target pixel, an inner angle point in the master image 28 is detected.

内角ポイントが検出できれば、次に、膨張部25は、当該内角ポイントを所定の段数、8近傍膨張(拡大)する(ステップS13)。これは、検出した全ての内角ポイントそれぞれに対して行う。また、ここでは、8近傍膨張の段数は1段であるとして、以下説明を続ける。   If the internal angle point can be detected, the expansion unit 25 then expands (expands) the internal angle point by a predetermined number of steps in the vicinity of 8 (step S13). This is performed for each of all detected interior angle points. Here, the description will be continued on the assumption that the number of stages of 8-near expansion is one stage.

続いて、膨張部25は、上記8近傍膨張した内角ポイントを内角領域として決定し、上記図3(B)に示したような内角領域画像29として、記憶部26に保存する(ステップS14)。なお、内角領域画像29は、マスタ画像28における内角の位置を示すためのものであるため、その画像サイズはマスタ画像28のサイズと一致するものが好ましい(これは、後述の外角領域画像30についても同様である)。以上で、内角領域画像生成処理が終了する。これによって生成された内角領域画像29(図3(B))において、画素値が1の領域は内角領域を示し、0の領域は内角領域ではない領域であることが示される。換言すれば、内角領域画像29は、内角領域であるか否かを2値で表した画像である。また、近傍膨張を行っているため、内角領域が円に近い形の領域となる。これにより、エッチングファクターにより様々な形状で形成される角のどんな形状にも万能的に対応できる。   Subsequently, the expansion unit 25 determines the internal angle point expanded in the vicinity of 8 as an internal angle region, and saves it in the storage unit 26 as an internal angle region image 29 as shown in FIG. 3B (step S14). Since the inner angle area image 29 is for indicating the position of the inner angle in the master image 28, the image size preferably matches the size of the master image 28 (this applies to the outer angle area image 30 described later). Is the same). Thus, the inner corner area image generation process ends. In the generated inner corner area image 29 (FIG. 3B), an area having a pixel value of 1 indicates an inner corner area, and a region of 0 indicates that the area is not an inner corner area. In other words, the interior corner area image 29 is an image that represents whether or not the interior corner area is a binary value. In addition, since the expansion is performed in the vicinity, the inner angle region is a region close to a circle. Thereby, it is possible to universally cope with any shape of the corner formed in various shapes depending on the etching factor.

上記内角領域画像生成処理の次または並行して、外角領域画像生成処理が行われる。図10は、上記ステップS2で示した外角領域画像生成処理の詳細を示すフローチャートである。図10において、まず、制御部21は、予め生成され記憶部26に格納されているているマスタ画像28を角検出部24に読み込ませる(ステップS21)。続いて、角検出部24は、読み込んだマスタ画像28から、上記外角ポイントを検出する(ステップS22)。このステップS22の処理を、より具体的に説明すると、まず、角検出部24は、マスタ画像28の各画素から、上記注目画素を決定する。そして、上記図9に示した各パターン91が示す注目画素Oと、その周辺の所定の画素A、B、およびCとの画素値を用いて、以下のような論理演算を行う。
Og=O&!A&!B&!C
そして、上記の演算を図9に示す全てのパターン91について行い、いずれか1つでも、Og=1になれば、注目画素Oは外角ポイントであると判定する。そして、マスタ画像28の全ての画素を順に注目画素に設定しながら、このような論理演算を行っていくことで、マスタ画像28における外角ポイントを検出する。
Next to or in parallel with the inner angle area image generation process, the outer angle area image generation process is performed. FIG. 10 is a flowchart showing details of the outer corner area image generation processing shown in step S2. In FIG. 10, the control unit 21 first causes the corner detection unit 24 to read the master image 28 generated in advance and stored in the storage unit 26 (step S21). Subsequently, the corner detection unit 24 detects the outer corner point from the read master image 28 (step S22). The processing in step S22 will be described more specifically. First, the corner detection unit 24 determines the pixel of interest from each pixel of the master image 28. Then, using the pixel values of the pixel of interest O indicated by each pattern 91 shown in FIG. 9 and the predetermined pixels A, B, and C around it, the following logical operation is performed.
Og = O &! A &! B &! C
Then, the above calculation is performed on all the patterns 91 shown in FIG. 9, and if any one of them is Og = 1, it is determined that the target pixel O is an outside angle point. Then, an outside angle point in the master image 28 is detected by performing such a logical operation while sequentially setting all the pixels of the master image 28 as the target pixel.

外角ポイントが検出できれば、次に、膨張部25は、当該外角ポイントを所定の段数、8近傍膨張(拡大)する(ステップS23)。これは、検出した全ての外角ポイントそれぞれに対して行う。ここでは、上記ステップS12と同様に、8近傍膨張の段数は1段であるとする。   If the outside angle point can be detected, the expansion unit 25 then expands (enlarges) the outside angle point by a predetermined number of steps by 8 (step S23). This is performed for each of the detected outside angle points. Here, it is assumed that the number of stages of 8-neighbor expansion is one, as in step S12.

続いて、膨張部25は、上記8近傍膨張した外角ポイントを外角領域として決定し、上記図3(C)に示したような外角領域画像30として、記憶部26に保存する(ステップS24)。以上で、外角領域画像生成処理が終了する。これによって生成された外角領域画像30(図3(C))において、画素値が1の領域は外角領域を示し、0の領域は外角領域ではない領域であることが示される。換言すれば、外角領域画像30は、外角領域であるか否かを2値で表した画像である。   Subsequently, the expansion unit 25 determines the outside angle point expanded in the vicinity of 8 as an outside angle region, and saves it in the storage unit 26 as the outside angle region image 30 as shown in FIG. 3C (step S24). The outer corner area image generation process is thus completed. In the outer angle region image 30 (FIG. 3C) generated as a result, a region with a pixel value of 1 indicates an outer angle region, and a region of 0 indicates a region that is not an outer angle region. In other words, the outer corner area image 30 is an image that represents whether or not the outer corner area is a binary angle.

上述したような準備処理で内角領域画像29および外角領域画像30が生成された後、撮像カメラ15で、検査対象となるプリントパターンを含む画像が撮像される。そして、当該撮像した画像を2値化したオブジェクト画像27がオブジェクト画像生成部22で生成された後、当該オブジェクト画像27とマスタ画像28とを比較する比較検査処理が行われる。本処理の詳細を説明する前に、処理概要について図11を用いて説明する。   After the inner corner area image 29 and the outer corner area image 30 are generated by the preparation process as described above, the imaging camera 15 captures an image including the print pattern to be inspected. Then, after the object image 27 obtained by binarizing the captured image is generated by the object image generation unit 22, a comparison inspection process for comparing the object image 27 and the master image 28 is performed. Before explaining the details of this process, an outline of the process will be described with reference to FIG.

本処理では、オブジェクト画像27とマスタ画像28とを比較する際、図11(A)に示すように、両画像を所定の大きさのブロックに区切り、これらのブロックを単位として両画像を比較検査する。当該ブロック単位における処理では、図11(B)および(C)に示すような、例えば5×5ピクセルの「検査ウィンドウ」と呼ばれるウィンドウを当該ブロックの左上から順に走査していく。そして、この検査ウィンドウ内における画素を比較して、その差分をとっていく。そして、当該差分値が予め設定されている許容値を越えれば、その時点で当該ブロックには欠陥があると判定する。   In this process, when the object image 27 and the master image 28 are compared, as shown in FIG. 11A, both the images are divided into blocks of a predetermined size, and the two images are compared and inspected in units of these blocks. To do. In the processing in the block unit, for example, a window called “inspection window” of 5 × 5 pixels as shown in FIGS. 11B and 11C is scanned sequentially from the upper left of the block. Then, the pixels in this inspection window are compared and the difference is taken. If the difference value exceeds a preset allowable value, it is determined that the block is defective at that time.

続いて、検査装置1が行う比較検査処理の詳細を説明する。図12は、検査装置1が行う比較検査処理の詳細を示すフローチャートである。図12において、まず、制御部21は、比較検査部31に上記オブジェクト画像27、マスタ画像28、内角領域画像29、および外角領域画像30を読み込ませる(ステップS31)。次に、読み込んだ各画像を、所定の大きさのブロックに細分化する(ステップS32;図11参照)。このステップS32の処理をより具体的に説明すると、まず、比較検査部31は、各画像に対して、基準点となる座標をそれぞれ決定する。例えば、比較検査部31は、各画像の左上端の座標(0,0)を基準点とする。そして、オブジェクト画像27、マスタ画像28、内角領域画像29、および外角領域画像30の基準点を合わせることで、位置合わせを行う(つまり、各画像の左上端を揃える)。そして、当該基準点から、右下方向に向かって、図11(A)に示したような所定の大きさのブロックで上記画像を細分化する(より正確には、各ブロックの境界となる座標値を記憶部26に記憶しておく)。ここでは、図11(A)に示したように、各画像を6×6のブロックに分割するものとする。なお、図示しないが、内角領域画像29および、外角領域画像30についても同じように6×6のブロックで細分化されている。また、1つのブロックの大きさは、例えば320×256ピクセルである。   Next, details of the comparison inspection process performed by the inspection apparatus 1 will be described. FIG. 12 is a flowchart showing details of the comparison inspection process performed by the inspection apparatus 1. In FIG. 12, the control unit 21 first causes the comparison inspection unit 31 to read the object image 27, the master image 28, the inner corner region image 29, and the outer corner region image 30 (step S31). Next, each read image is subdivided into blocks of a predetermined size (step S32; see FIG. 11). The process of step S32 will be described more specifically. First, the comparative inspection unit 31 determines coordinates that serve as reference points for each image. For example, the comparison inspection unit 31 uses the coordinates (0, 0) of the upper left corner of each image as a reference point. Then, alignment is performed by aligning the reference points of the object image 27, the master image 28, the inner corner area image 29, and the outer corner area image 30 (that is, the upper left corner of each image is aligned). Then, the image is subdivided into blocks of a predetermined size as shown in FIG. 11A from the reference point toward the lower right direction (more precisely, the coordinates serving as the boundaries of the blocks) The value is stored in the storage unit 26). Here, as shown in FIG. 11A, each image is divided into 6 × 6 blocks. Although not shown, the inner corner area image 29 and the outer corner area image 30 are similarly subdivided into 6 × 6 blocks. The size of one block is, for example, 320 × 256 pixels.

次に、制御部21は、各ブロックを識別するための変数となる変数nを1にする(ステップS33)。本実施形態では、各画像を6×6のブロックに細分化しているため、変数nは、1〜36の範囲内の値となる。つまり、変数nは、細分化したブロックの番号を示している。図11(A)を例にとると、左上のブロックが1番目のブロック(n=1)となり、右方向に向かってn=2、3・・・と増えていき、右下隅のブロックがn=36のブロックになる。   Next, the control unit 21 sets a variable n, which is a variable for identifying each block, to 1 (step S33). In the present embodiment, since each image is subdivided into 6 × 6 blocks, the variable n takes a value within the range of 1 to 36. That is, the variable n indicates the number of the subdivided block. Taking FIG. 11A as an example, the upper left block becomes the first block (n = 1), increases to the right with n = 2, 3,..., And the lower right corner block is n. = 36 blocks.

次に、n番目のブロックについて、オブジェクト画像27とマスタ画像28との比較検査を行う、ブロック検査処理が行われる(ステップS34)。図13は、上記ステップS34で示したブロック検査処理の詳細を示すフローチャートである。   Next, a block inspection process is performed for the nth block, in which a comparison inspection between the object image 27 and the master image 28 is performed (step S34). FIG. 13 is a flowchart showing details of the block inspection process shown in step S34.

図13において、まず、「ゆすらせ処理」を行うためのゆすらせ基準位置Δを座標(0,0)に設定する(ステップS41)。   In FIG. 13, first, the sway reference position Δ for performing “sway process” is set to the coordinates (0, 0) (step S41).

ここで、上記「ゆすらせ処理」について説明する。一般的に、プリント基板は、薄板部材で構成されるために「反り」が生じることがある。そのため、検査対象となるプリント基板に形成されたプリントパターンにも微妙な「歪み」が生じる。このような「歪み」がある場合は、上述のようにマスタ画像とオブジェクト画像との位置を同一の基準点で合わせたとしても、「歪み」のために微妙にずれる個所が発生することがある。このような状況を考慮して、上記ブロック単位の画像でオブジェクト画像27とマスタ画像28とを比較検査する際に、n番目のブロックのマスタ画像サイズを、同じn番目のブロックのオブジェクト画像より少し大きいサイズに設定し、オブジェクト画像27より少し広い範囲のマスタ画像28を切り出して比較検査する。   Here, the “smooth process” will be described. Generally, since a printed circuit board is composed of a thin plate member, “warping” may occur. Therefore, a subtle “distortion” is also generated in the print pattern formed on the printed circuit board to be inspected. When such “distortion” exists, even if the positions of the master image and the object image are aligned at the same reference point as described above, there may be a portion that is slightly shifted due to “distortion”. . In consideration of such a situation, when the object image 27 and the master image 28 are compared and inspected with the block unit image, the master image size of the nth block is slightly smaller than the object image of the same nth block. A large size is set, and a master image 28 in a range slightly wider than the object image 27 is cut out and compared.

図14を用いて具体的に説明すると、上記オブジェクト画像27から、例えば320×256ピクセルの画像(図14(A))を1ブロックとして切り出す。これに対して、上下左右それぞれ例えば5ピクセルずつ大きい(つまり、上下方向および左右方向がそれぞれ合計10ピクセル大きい)、330×266ピクセルの画像(図14(B))を1ブロックとしてマスタ画像28から切り出す。そして、当該切り出したオブジェクト画像27を切り出し後のマスタ画像28に重ね、この10ピクセルの差について、1ピクセルごとにずらしながら比較検査を行う(このように画像を少しずつ動かすことを「ゆすらせ」と呼ぶ)。   Specifically, using FIG. 14, for example, an image of 320 × 256 pixels (FIG. 14A) is cut out as one block from the object image 27. On the other hand, for example, an image of 330 × 266 pixels (FIG. 14B), which is larger by 5 pixels each in the vertical and horizontal directions, for example, by 10 pixels in each of the vertical and horizontal directions, is taken as one block from the master image 28. cut. Then, the extracted object image 27 is superimposed on the master image 28 after being cut out, and a comparison inspection is performed with respect to the difference of 10 pixels while shifting the pixel image by 1 pixel (in this way, “moving the image little by little”) Called).

図15は、上記「ゆすらせ処理」を模式的に示す図である。上述のように、オブジェクト画像27に「歪み」が存在している場合、上記ステップS32における位置合わせだけだと、マスタ画像28とオブジェクト画像27とは完全に一致せず、微妙なズレが生じる。そのため、少し大きめのマスタ画像28の中でオブジェクト画像27をずらしながら比較することで、両者の微妙なズレを埋めていく。そして、このようにオブジェクト画像27をずらしながら比較検査し、両者の差分値が一度でも許容値内に収まれば、「欠陥無し」とし、一度も許容値内に収まらなければ、「欠陥有り」と判定するものである。   FIG. 15 is a diagram schematically showing the “smooth process”. As described above, when “distortion” is present in the object image 27, the master image 28 and the object image 27 do not completely coincide with each other only by the alignment in step S <b> 32, and a slight shift occurs. Therefore, by comparing the object image 27 while shifting the object image 27 in the slightly larger master image 28, the subtle deviation between the two is filled. Then, the object images 27 are compared and inspected while shifting, and if the difference value between the two is within the allowable value even once, “no defect” is indicated. If the difference value is not within the allowable value, “defective” is indicated. Judgment.

そして、上記基準位置Δは、このマスタ画像28に対してのオブジェクト画像27の位置を決めるためのものである。図15においては、まず、比較検査部31は、基準位置Δ=(0,0)として比較検査を行う(図15(A))。この時点では、両画像は全く一致していないため、両者の差分値は許容値を超え、その結果「欠陥有り」という判定になる。次に、オブジェクト画像27をX方向に+1移動させた、基準位置Δ=(1,0)の位置で比較検査を行う(図15(B))。この時点でもまだ両画像は一致していないため「欠陥有り」と判定される。このようにオブジェクト画像27をマスタ画像28のサイズの範囲内でずらしてながら比較していく。その結果、基準位置Δ=(1,1)のとき、図15(C)に示すように、両画像の位置がほぼ一致すると、両者の差分値は許容値以下に収まることになる。そのため、当該ブロックについては、「欠陥無し」と判定される(なお、一度「欠陥無し」と判定されれば、当該ブロックの検査についてはそこで終了する)。   The reference position Δ is for determining the position of the object image 27 with respect to the master image 28. In FIG. 15, first, the comparative inspection unit 31 performs a comparative inspection with the reference position Δ = (0, 0) (FIG. 15A). At this point, since the two images do not match at all, the difference value between the two exceeds the allowable value, and as a result, it is determined that there is a defect. Next, a comparative inspection is performed at the position of the reference position Δ = (1, 0) where the object image 27 is moved by +1 in the X direction (FIG. 15B). At this point in time, both images do not match, so it is determined that there is a defect. In this way, the object image 27 is compared while being shifted within the size range of the master image 28. As a result, when the reference position Δ = (1, 1), as shown in FIG. 15C, when the positions of the two images substantially coincide with each other, the difference value between them falls within the allowable value. For this reason, the block is determined to be “no defect” (note that once it is determined that there is no defect, the inspection of the block ends there).

図13に戻り、ステップS41の次に、比較検査部31は、n番目のブロックの画像を、上記オブジェクト画像27、マスタ画像28、内角領域画像29、および外角領域画像30からそれぞれ切り出す(ステップS42)。このステップS42の処理をより具体的に説明すると、まず、比較検査部31は、上記オブジェクト画像27から、n番目のブロックの画像を切り出す。以下、当該画像をデータDと呼ぶ。このデータDの画像サイズは、上述のブロックの大きさと同じ、例えば320×256ピクセルとなる。続いて、比較検査部31は、マスタ画像28、内角領域画像29、および外角領域画像30からn番目のブロックの画像を切り出す。以下、マスタ画像28から切り出した画像をデータM、内角領域画像29から切り出した画像をデータA、外角領域画像30から切り出した画像をデータBと呼ぶ。これらデータM、A、Bの画像サイズは、上述した「ゆすらせ」を行うために、上記ブロックの上下左右の4方向それぞれについて5ピクセル大きくした、例えば330×266ピクセルのサイズで切り出される。   Returning to FIG. 13, after step S41, the comparison inspection unit 31 cuts out the image of the n-th block from the object image 27, the master image 28, the inner corner region image 29, and the outer corner region image 30, respectively (step S42). ). The processing in step S42 will be described more specifically. First, the comparison inspection unit 31 cuts out an image of the nth block from the object image 27. Hereinafter, the image is referred to as data D. The image size of the data D is the same as the above-described block size, for example, 320 × 256 pixels. Subsequently, the comparison inspection unit 31 cuts out an image of the nth block from the master image 28, the inner corner area image 29, and the outer corner area image 30. Hereinafter, an image cut out from the master image 28 is referred to as data M, an image cut out from the inner corner area image 29 is referred to as data A, and an image cut out from the outer corner area image 30 is referred to as data B. The image sizes of these data M, A, and B are cut out in a size of, for example, 330 × 266 pixels, which is increased by 5 pixels in each of the four directions of the upper, lower, left, and right sides of the block in order to perform the above-described “smooth”.

次に、比較検査部31は、オブジェクト画像27とマスタ画像28との差分量SAを0にする。併せて、図11(C)を用いて説明した検査ウィンドウ内で検査対象となる画素(以下、検査ポイントと呼ぶ)の位置を示す変数P1を(0,0)にする。また、上記「ゆすらせ処理」によるデータD(オブジェクト画像27)のずらし量を考慮した変数P2を(0,0)にする(ステップS43)。続いて、比較検査部31は、上記データD等の画像を上記検査ウィンドウを用いて検査するための、ウィンドウ検査処理を行う(ステップS44)。   Next, the comparison inspection unit 31 sets the difference amount SA between the object image 27 and the master image 28 to zero. In addition, a variable P1 indicating the position of a pixel to be inspected (hereinafter referred to as an inspection point) within the inspection window described with reference to FIG. 11C is set to (0, 0). Further, the variable P2 taking into account the shift amount of the data D (object image 27) by the above-mentioned “smooth process” is set to (0, 0) (step S43). Subsequently, the comparative inspection unit 31 performs window inspection processing for inspecting the image such as the data D using the inspection window (step S44).

図16は、上記ステップS44で示したウィンドウ検査処理の詳細を示すフローチャートである。本処理では、「検査ウィンドウ」内の各画素(5×5=25画素)について順に比較検査する。まず、比較検査部31は、検査対象となる画素を取得する(ステップS61)。具体的には、検査ウィンドウをデータDにセットし(最初は左上端を基準に位置が合わせられる)、変数P1で示される検査ウィンドウ内の座標に対応するデータDの座標の画素値を取得する。併せて、検査ウィンドウをデータM、データA,およびデータBにセットし(最初は左上端を基準に位置が合わせられる)、変数P1で示される検査ウィンドウ内の座標に基準位置Δを加えた座標(変数P2の示す座標)に対応する、当該データM、データA、およびデータB上の座標の画素値(0か1)をそれぞれ取得する。以下、データMから取得した画素値を画素値[m]、データAから取得した画素値を画素値[a]、データBから取得した画素値を画素値[b]、データDから取得した画素値を画素値[d]と呼ぶ。   FIG. 16 is a flowchart showing details of the window inspection process shown in step S44. In this process, each pixel (5 × 5 = 25 pixels) in the “inspection window” is comparatively inspected in order. First, the comparison inspection unit 31 acquires a pixel to be inspected (step S61). Specifically, the inspection window is set to the data D (initially, the position is aligned with the upper left corner as a reference), and the pixel value of the coordinates of the data D corresponding to the coordinates in the inspection window indicated by the variable P1 is acquired. . In addition, the inspection window is set to data M, data A, and data B (initially, the position is aligned with the upper left corner as a reference), and the coordinate obtained by adding the reference position Δ to the coordinates in the inspection window indicated by the variable P1 The pixel values (0 or 1) of the coordinates on the data M, data A, and data B corresponding to (coordinate indicated by the variable P2) are respectively acquired. Hereinafter, the pixel value acquired from the data M is the pixel value [m], the pixel value acquired from the data A is the pixel value [a], the pixel value acquired from the data B is the pixel value [b], and the pixel is acquired from the data D. The value is called a pixel value [d].

次に、比較検査部31は、ステップS61で取得した画素値について、以下の論理演算を行う(ステップS62)。
S=(!m&d&!a)#(m&!d&!b) …(1)
上記数式(1)において、!は反転、&は論理積、#は論理和を示す。また、演算優先順位は、高いものから、「!→&→#→=」である。また、S=1で差分あり、S=0で差分なしを示す。
Next, the comparison inspection unit 31 performs the following logical operation on the pixel value acquired in step S61 (step S62).
S = (! M & d &! A) # (m &! D &! B) (1)
In the above formula (1),! Indicates inversion, & indicates logical product, and # indicates logical sum. Also, the calculation priority is “! → & → # → =” in descending order. Further, S = 1 indicates a difference, and S = 0 indicates no difference.

上記論理演算について、図17を用いて補足説明する。図17は、図3(A)の外角(星印)部分の比較検査の例を説明するための図である。図17においては、基準位置Δ=(0,0)であり、検査ポイントは、変数P1=(2,2)の位置(つまり、3行3列目の位置にある画素)である。そして、当該検査ポイントに対応するデータM(マスタ画像28)の画素は1(画素あり)であるが、データD(オブジェクト画像27)の画素では0(画素無し)になっている。このような場合、データMとデータDとの比較のみを行うと、両者が一致していない(差分あり)と判定される。しかし、本実施形態によれば、データB(外角領域画像30)で1(画素あり)であるため差分なしと判定する。つまり、内角領域画像29と外角領域画像30とを併用して、それらが示す領域に応じて判定基準を変化させている。   The logical operation will be supplementarily described with reference to FIG. FIG. 17 is a diagram for explaining an example of the comparative inspection of the outer angle (star) portion of FIG. In FIG. 17, the reference position Δ = (0, 0), and the inspection point is the position of the variable P1 = (2, 2) (that is, the pixel at the position of the third row and third column). The pixel of the data M (master image 28) corresponding to the inspection point is 1 (with pixels), but the pixel of the data D (object image 27) is 0 (no pixels). In such a case, if only the comparison between the data M and the data D is performed, it is determined that the two do not match (there is a difference). However, according to the present embodiment, since the data B (outer corner area image 30) is 1 (with pixels), it is determined that there is no difference. That is, the inner corner area image 29 and the outer corner area image 30 are used in combination, and the determination criterion is changed according to the area indicated by them.

図17の場合、変数P1=(2,2)および変数P2=(2,2)の位置においては、画素値[m]=1、画素値[a]=0、画素値[b]=1、画素値[d]=0となる。これらの値で上述した数式(1)を用いて演算すると、S=0、すなわち差分なしと判定される。また、図17において、上記検査ポイントの右下の画素(つまり、変数P1=(3,3)および変数P2=(3,3)の位置であり、4行4列目の位置にある画素)については、画素値[m]=1、画素値[a]=0、画素値[b]=1、画素値[d]=1となり、S=0となる。また、上記検査ポイントの左上の画素(つまり、変数P1=(1,1)および変数P2=(1,1)の位置であり、2行2列目の位置にある画素)については、画素値[m]=0、画素値[a]=0、画素値[b]=1、画素値[d]=0となり、上記論理演算の結果、S=0となる。   In the case of FIG. 17, at the positions of the variable P1 = (2, 2) and the variable P2 = (2, 2), the pixel value [m] = 1, the pixel value [a] = 0, and the pixel value [b] = 1. Pixel value [d] = 0. When these values are used to calculate using the above-described equation (1), it is determined that S = 0, that is, there is no difference. In FIG. 17, the pixel at the lower right of the inspection point (that is, the pixel at the position of the variable P1 = (3, 3) and the variable P2 = (3, 3) and at the position of the fourth row and the fourth column). , Pixel value [m] = 1, pixel value [a] = 0, pixel value [b] = 1, pixel value [d] = 1, and S = 0. Also, the pixel value of the upper left pixel of the inspection point (that is, the pixel at the position of the variable P1 = (1,1) and the variable P2 = (1,1) and at the position of the second row and the second column)) [M] = 0, pixel value [a] = 0, pixel value [b] = 1, pixel value [d] = 0, and S = 0 as a result of the logical operation.

一方、仮に、図17のデータD(オブジェクト画像)において、変数P1=(1,1)の位置における画素値[d]=1であるとする。すなわち、外角においてアンダーエッチングとなっており、欠陥として検出されるべき状態である場合を想定する。この場合、変数P1=(1,1)および変数P2=(1,1)の位置においては、画素値[m]=0、画素値[a]=0、画素値[b]=1、画素値[d]=1となる。その結果、上記論理演算によって、S=1、すなわち、差分ありと判定される。また、仮に、図17のデータD(オブジェクト画像)において、変数P1=(4,4)の位置における画素値[d]=0であるとする。すなわち、外角におけるオーバーエッチングが許容範囲を超えてしまっており、欠陥として検出されるべき状態である場合を想定する。この場合、変数P1=(4,4)および変数P2=(4,4)の位置においては、画素値[m]=1、画素値[a]=0、画素値[b]=0、画素値[d]=0となる。その結果、上記論理演算によって、S=1、すなわち、差分ありと判定される。つまり、許容値を超えるようなオーバーエッチングやアンダーエッチング等、本来欠陥として検出されるべきものは検出される。   On the other hand, assume that the pixel value [d] = 1 at the position of the variable P1 = (1, 1) in the data D (object image) of FIG. That is, it is assumed that the outer corner is under-etched and should be detected as a defect. In this case, at the position of variable P1 = (1,1) and variable P2 = (1,1), pixel value [m] = 0, pixel value [a] = 0, pixel value [b] = 1, pixel The value [d] = 1. As a result, it is determined by the logical operation that S = 1, that is, there is a difference. Further, it is assumed that the pixel value [d] = 0 at the position of the variable P1 = (4, 4) in the data D (object image) of FIG. That is, it is assumed that the over-etching at the outer corner has exceeded the allowable range and should be detected as a defect. In this case, at the position of variable P1 = (4, 4) and variable P2 = (4, 4), pixel value [m] = 1, pixel value [a] = 0, pixel value [b] = 0, pixel The value [d] = 0. As a result, it is determined by the logical operation that S = 1, that is, there is a difference. That is, what should be originally detected as a defect, such as over-etching or under-etching exceeding the allowable value, is detected.

このように、マスタ画像28とオブジェクト画像27について差異がある個所について、図5に示した表のように、マスタ画像28とオブジェクト画像27との画素値0および1の組み合わせと、上記内角領域画像29および外角領域画像30とを用いることにより、内角部のアンダーエッチングや外角のオーバーエッチングの状態に応じて、差分を取らないようにすることができる。その結果、欠陥として検出して欲しくないような個所についての虚報を減らすことが可能となる。また、差分の有無判定の許容値についても、従来のように、内角部および外角部周辺について、差分値が相対的に大きくても欠陥と判定されないように高い値を設定して検査を行う必要もない。そのため、比較検査の感度を高めたまま、許容範囲内のアンダーエッチングやオーバーエッチングについては欠陥として検出されない、精度の高い比較検査が可能となる。   As described above, as for the portion where there is a difference between the master image 28 and the object image 27, as shown in the table of FIG. 5, the combination of the pixel values 0 and 1 of the master image 28 and the object image 27, By using the image 29 and the outer corner area image 30, it is possible to prevent a difference from being taken depending on the state of the inner corner under-etching or the outer corner over-etching. As a result, it is possible to reduce false information about places that are not desired to be detected as defects. In addition, as for the allowable value for the presence / absence determination of the difference, it is necessary to perform inspection by setting a high value around the inner corner portion and the outer corner portion so as not to be determined as a defect even if the difference value is relatively large. Nor. Therefore, it is possible to perform a high-precision comparative inspection in which under-etching and over-etching within an allowable range are not detected as defects while increasing the sensitivity of the comparative inspection.

図16に戻り、ステップS62の処理の次に、比較検査部31は、上記数式(1)の演算結果Sが1か否かを判定する(ステップS63)。その結果、S=1、すなわち差分があった場合(ステップS63でYES)は、SAに1を加算し(ステップS64)、処理を次のステップS65に進める。一方、S=0であれば(ステップS63でNO)、そのままステップS65に進む。   Returning to FIG. 16, after the process of step S <b> 62, the comparative inspection unit 31 determines whether or not the calculation result S of the formula (1) is 1 (step S <b> 63). As a result, if S = 1, that is, if there is a difference (YES in step S63), 1 is added to SA (step S64), and the process proceeds to the next step S65. On the other hand, if S = 0 (NO in step S63), the process directly proceeds to step S65.

次に、比較検査部31は、検査ウィンドウ内の検査ポイントを移動する(ステップS65)。すなわち、変数P1に所定値を加える。例えば、検査ポイントを1画素だけ右方向に移動させたい場合は、(+1,0)を変数P1に加える。また、変数P2についても、(+1,0)を加える。   Next, the comparative inspection unit 31 moves the inspection point in the inspection window (step S65). That is, a predetermined value is added to the variable P1. For example, when it is desired to move the inspection point to the right by one pixel, (+1, 0) is added to the variable P1. Also, (+1, 0) is added to the variable P2.

次に、比較検査部31は、検査ウィンドウ内の全ての画素をついて上記論理演算による比較検査を行ったか否か判定する(ステップS66)。具体的には、検査ウィンドウは5×5ピクセルであることから、検査ポイントを25回以上移動したか否かを判定する。その結果、検査ウィンドウ内の全画素について検査が済んでいない場合は(ステップS66でNO)、比較検査部31は、上記ステップS61に戻って処理を繰り返す。一方、全画素について検査が済んだ場合は(ステップS66でYES)、比較検査部31は、当該ウィンドウ検査処理を終了する。   Next, the comparison inspection unit 31 determines whether or not the comparison inspection by the logical operation has been performed on all the pixels in the inspection window (step S66). Specifically, since the inspection window is 5 × 5 pixels, it is determined whether the inspection point has been moved 25 times or more. As a result, if all the pixels in the inspection window have not been inspected (NO in step S66), the comparative inspection unit 31 returns to step S61 and repeats the process. On the other hand, when all the pixels have been inspected (YES in step S66), the comparative inspection unit 31 ends the window inspection process.

図13に戻り、次に、比較検査部31は、差分量SAが予め指定されている所定の許容値を超えたか否かを判定する(ステップS45)。つまり、上記検査ウインドウ内で検出された差分が当該許容値を超えたか否かが判断される。その結果、許容値を超えていない場合は(ステップS45でNO)、比較検査部31は、検査ウィンドウを1画素だけ移動させる(ステップS46)。移動させる方向については、最初は上記ブロック内の左上端にあるとして、そこから右方向に1画素ずつ移動していく。そして検査ウィンドウが当該ブロックの右端にきたら、1画素下に移動させ、今度は左方向に向かって移動させる。そして、左端に検査ウィンドウが来たら、1画素下に移動し、右方向へ移動させていく。この動きを、検査ウインドウが右下端に行くまで繰り返す。   Returning to FIG. 13, next, the comparison inspection unit 31 determines whether or not the difference amount SA exceeds a predetermined allowable value specified in advance (step S <b> 45). That is, it is determined whether or not the difference detected in the inspection window exceeds the allowable value. As a result, when the allowable value is not exceeded (NO in step S45), the comparative inspection unit 31 moves the inspection window by one pixel (step S46). The moving direction is initially assumed to be at the upper left end in the block, and from there, it is moved one pixel at a time in the right direction. When the inspection window comes to the right end of the block, the inspection window is moved down by one pixel, and this time, it is moved in the left direction. When the inspection window comes to the left end, it moves down by one pixel and moves to the right. This movement is repeated until the inspection window goes to the lower right corner.

続いて、比較検査部31は、検査ウィンドウがブロック内の領域全てに移動したか、すなわち、当該ブロック内の領域を全て検査したか否かを判定する(ステップS47)。その結果、まだブロック内を全て検査し終わっていない場合は、比較検査部31は、上記ステップS43に戻って処理を繰り返す。一方、ブロック内の領域を全て検査した場合は、比較検査部31は、当該n番目のブロックには欠陥無しと判定し、nブロック目の検査結果を「欠陥なし」として記憶部26に記憶し(ステップS48)、当該ブロック検査処理を終了する。   Subsequently, the comparison inspection unit 31 determines whether or not the inspection window has moved to all the areas in the block, that is, whether or not all the areas in the block have been inspected (step S47). As a result, if the entire block has not yet been inspected, the comparison inspection unit 31 returns to step S43 and repeats the process. On the other hand, when all the areas in the block are inspected, the comparison inspection unit 31 determines that the nth block has no defect, and stores the inspection result of the nth block in the storage unit 26 as “no defect”. (Step S48), the block inspection process is terminated.

一方、上記ステップS45の判定の結果、差分量SAが許容値を超えている場合は(ステップS45でYES)、上述したように、データD(n番目のブロックのオブジェクト画像)の位置をマスタ画像上で「ゆすらせ」て再度比較検査する「ゆすらせ処理」を行うために、比較検査部31は、基準位置Δに所定値を加算する(ステップS39)。この所定値は、データDがデータM上を一通り巡回するような値である。例えば、上述した検査ウィンドウと同様に、左上から右下に向かって移動していうような値を加算してもよいし、また、最初はΔをデータMの中心になるようにして、(+1、0)、次に(0、+1)、次に(−1、0)、次に(0、−1)、というように、データDが渦巻状に移動するような値を加算しても良い。   On the other hand, if the difference SA exceeds the allowable value as a result of the determination in step S45 (YES in step S45), the position of the data D (the object image of the nth block) is set as the master image as described above. In order to perform the “jussling process” in which the “swing” is performed again and the comparative inspection is performed again, the comparative inspection unit 31 adds a predetermined value to the reference position Δ (step S39). This predetermined value is such a value that the data D circulates over the data M. For example, as in the above-described inspection window, a value such as moving from the upper left to the lower right may be added, or first, Δ is set to the center of the data M, and (+1, 0), then (0, +1), next (-1, 0), then (0, -1), and so on, values that move the data D in a spiral shape may be added. .

次に、比較検査部31は、Δに所定値を加算した結果、データDの位置(例えば四隅のいずれか一端)がデータMのサイズ(330×266ピクセル)の範囲外に来たか否かを判定する(ステップS50)。その結果、範囲外にきた場合は(ステップS50でYES)、ゆすらせた結果、欠陥が無かった位置(両画像が一致した位置)がなかったということになる。そのため、比較検査部31は、当該ブロックについては欠陥有りと判定し、nブロック目の検査結果として、記憶部26に記憶しておく(ステップS51)。以上で、ブロック検査処理が終了する。   Next, as a result of adding a predetermined value to Δ, the comparison inspection unit 31 determines whether or not the position of the data D (for example, one end of the four corners) is out of the range of the size of the data M (330 × 266 pixels). Determination is made (step S50). As a result, if it is out of range (YES in step S50), it means that there was no position where there was no defect (position where both images coincided) as a result of swaying. Therefore, the comparison inspection unit 31 determines that the block has a defect, and stores it in the storage unit 26 as the inspection result of the nth block (step S51). This is the end of the block inspection process.

図12に戻り、ブロック検査処理が終了すれば、次のブロックを検査するために、比較検査部31は、nに1を加算する(ステップS35)。続いて、比較検査部31は、全ブロックを検査したか否かを判定する(ステップS36)。その結果、まだ検査していないブロックが残っている場合は(ステップS36でNO)、制御部21は、上記ステップS34に戻って処理を繰り返す。一方、全ブロックを検査した場合は(ステップS36でYES)、比較検査部31は、当該比較検査処理を終了する。以上で、本実施形態にかかる比較検査処理は終了する。   Returning to FIG. 12, when the block inspection process is completed, the comparison inspection unit 31 adds 1 to n in order to inspect the next block (step S35). Subsequently, the comparison inspection unit 31 determines whether or not all blocks have been inspected (step S36). As a result, when there remains a block that has not been inspected yet (NO in step S36), the control unit 21 returns to step S34 and repeats the process. On the other hand, when all the blocks have been inspected (YES in step S36), the comparison inspection unit 31 ends the comparison inspection process. The comparison inspection process according to the present embodiment is thus completed.

このように、本実施形態では、オブジェクト画像とマスタ画像28とを比較検査する際に、差異がある部分について、そこが外角であるか内角であるかに応じて差分判定の判定基準を変化させる。すなわち、外角におけるオーバーエッチングについては差分は取らないが、アンダーエッチングについては差分をとる。また、内角におけるオーバーエッチングについては差分は取るが、アンダーエッチングについては差分をとらない。そのため、角部や隅部において、オブジェクト画像27とマスタ画像28で差分がある個所について、欠陥として判定して欲しくないような差分のみを除外することができる。これにより、精度の高い比較検査が可能となる。また、従来のように、マスタ画像28に対して、内角部の肉付けや外角部の角落としをする等の加工を行う必要もない。そのため、マスタ画像28の加工のための回路を設ける必要もなく、回路規模を縮小してコストダウンを図ることができる。また、差分判定のための許容値について、従来のように内角部および外角部用の許容値と、それ以外の部分用の許容値との2種類を準備する必要がなくなる。そのため、許容値判定のための回路も1つだけですみ、回路規模を縮小してコストダウンを図ることができる。また、従来のように内角や外角についての虚報(オーバーエッチング等を欠陥と判定すること)がなく、許容値を低めに設定することができる(すなわち、検査精度を上げる)ため、より信頼性の高い比較検査が可能となる。したがって、検査精度を下げることによって見逃していたパターン欠陥を検出することができる。また、本実施形態では、内角あるいは外角を近傍膨張して円に近い形の領域を作成している。これにより、例えば、予め四角い領域パターンを準備して内角・外角領域として一律に当てはめるような方法に比べ、エッチングファクターにより様々な形状で形成される角や隅のどんな形状にも万能的に対応できる。   As described above, in the present embodiment, when the object image and the master image 28 are compared and inspected, a difference determination criterion is changed depending on whether the difference is an outside angle or an inside angle. . That is, a difference is not taken for over-etching at the outer corner, but a difference is taken for under-etching. Further, a difference is taken for over-etching at the inner corner, but no difference is taken for under-etching. Therefore, it is possible to exclude only a difference that is not desired to be determined as a defect at a corner or corner where there is a difference between the object image 27 and the master image 28. Thereby, a comparative inspection with high accuracy becomes possible. Further, unlike the prior art, there is no need to process the master image 28 such as fleshing the inner corner or dropping the outer corner. Therefore, it is not necessary to provide a circuit for processing the master image 28, and the cost can be reduced by reducing the circuit scale. Also, it is not necessary to prepare two types of tolerance values for the difference determination, that is, tolerance values for the inner and outer corner portions and tolerance values for the other portions as in the prior art. For this reason, only one circuit is required for determining the allowable value, and the circuit scale can be reduced to reduce the cost. In addition, since there is no false information about the inner angle and outer angle (determining overetching etc. as a defect) as in the prior art, and the allowable value can be set lower (that is, the inspection accuracy is increased), more reliable. High comparative inspection is possible. Therefore, it is possible to detect a pattern defect that has been overlooked by reducing the inspection accuracy. Further, in the present embodiment, an area having a shape close to a circle is created by expanding the inner angle or the outer angle in the vicinity. As a result, for example, compared to a method in which a square area pattern is prepared in advance and uniformly applied as an inner corner / outer corner area, any shape of corners and corners formed in various shapes depending on the etching factor can be handled universally. .

なお、上述の実施形態では、準備処理における角検出処理(図8のステップS12、図10のステップS22)において、図9に示したような8つのパターン91を用いて内角あるいは外角を検出していた。これに限らず、更に多くのパターンを用いても良い。例えば、上述の8つのパターン91を用いた検出は、「低感度検出」である。これに対して、図18に示すような16個のパターン92を用いた検出は、「中感度検出」となる。さらに、図19に示すような24個のパターン93を用いた検出は、「高感度検出」となる。いずれも、上述したように、パターン92または93における注目画素Oと、その周辺の所定の画素A、B、C(パターン93においては、周辺の所定の画素Dも用いる)との画素値を用いて、上述したステップS12およびS22のような論理演算を行う。   In the above-described embodiment, in the corner detection process (step S12 in FIG. 8 and step S22 in FIG. 10) in the preparation process, the inner angle or the outer angle is detected using the eight patterns 91 as shown in FIG. It was. Not limited to this, more patterns may be used. For example, the detection using the eight patterns 91 described above is “low sensitivity detection”. In contrast, detection using 16 patterns 92 as shown in FIG. 18 is “medium sensitivity detection”. Further, detection using 24 patterns 93 as shown in FIG. 19 is “high sensitivity detection”. In any case, as described above, the pixel values of the pixel of interest O in the pattern 92 or 93 and the predetermined pixels A, B, and C around it (the peripheral predetermined pixel D is also used in the pattern 93) are used. Thus, the logical operation as in steps S12 and S22 described above is performed.

これら「中感度検出」および「高感度検出」は、以下のような場合に用いることが考えられる。例えば、図20(A)に示すような斜めに形成された直線のパターンは、CADデータからマスタ画像28を生成する際に、パターンが伸張されるため、図20(B)に示すように一部に段差が生じることがある。つまり、現実には直線であっても、マスタ画像28に対する画像処理によって段差が形成されてしまうことがある。このような段差の部分は、検査精度を上げた場合にオブジェクト画像27との間で差異となるが、欠陥ではない。しかしながら、このような段差は「低感度検出」では、角や隅として検出できないため、欠陥として判定されることがある。そのため、このような画像処理によって生じるような微小な段差(例えば、「低感度検出」では十分な検査ができない個所や「低感度検出」では虚報となる個所)は、適宜、「中感度検出」や「高感度検出」を用いて内角領域または外角領域として設定するようにする。これにより、上記のような斜め線等に生じる微小な段差についても「内角」または「外角」として検出することができる。その結果、微小な段差についても欠陥の判定基準を変化させることができ、欠陥として判定されない。そのため、許容値を上げることが不要となり、精度の高い比較検査が可能となる。   These “medium sensitivity detection” and “high sensitivity detection” may be used in the following cases. For example, since a straight line pattern formed obliquely as shown in FIG. 20A is expanded when the master image 28 is generated from CAD data, one pattern as shown in FIG. There may be a step in the part. That is, even if it is actually a straight line, a step may be formed by image processing on the master image 28. Such a stepped portion is different from the object image 27 when the inspection accuracy is increased, but is not a defect. However, such a level difference cannot be detected as a corner or a corner in “low sensitivity detection”, and may be determined as a defect. For this reason, a small step (for example, a location where sufficient inspection cannot be performed with “low sensitivity detection” or a location where false detection is possible with “low sensitivity detection”) is appropriately selected as “medium sensitivity detection”. Or “high sensitivity detection” is used to set the inner angle region or the outer angle region. As a result, even a minute step generated in the oblique line as described above can be detected as an “inner angle” or “outer angle”. As a result, the defect criterion can be changed even for a minute step and is not determined as a defect. Therefore, it is not necessary to increase the allowable value, and highly accurate comparative inspection is possible.

更に、上記角検出部24が検出した内角あるいは外角に近接する上記プリントパターンの直線部の幅に応じて、上記ステップS13やステップS13における8近傍膨張の段数を変化させてもよい。例えば、上記直線部の幅についての情報を予めCADデータから取得しておき、当該幅が細い場合は膨張する段数を少なめに、太い場合は膨張する段数を多めに決定するようにしてもよい。なお、上記近傍膨張について、8近傍膨張だけでなく4近傍膨張を用いても良いし、この2つを組み合わせて用いても良いことはいうまでもない。   Furthermore, the step number of the 8-neighbor expansion in step S13 or step S13 may be changed in accordance with the width of the linear portion of the print pattern that is close to the inner angle or the outer angle detected by the angle detection unit 24. For example, information on the width of the straight line portion may be acquired in advance from CAD data, and the number of expanding stages may be reduced when the width is narrow, and the number of expanding stages may be determined when it is thick. Needless to say, not only the 8-neighbor expansion but also the 4-neighbor expansion may be used, or the two may be used in combination.

また、上記ステップS32において、オブジェクト画像27等をブロックに区切る際に、1つのブロック範囲が他のブロック範囲と重なるように区切ってもよい。例えば、上述のように1つのブロックのサイズを320×256とした場合、最初のブロックの位置については、左端上の座標(0,0)を、マスタ画像28等の座標(0,0)に合わせるが、2つ目のブロックの位置については、マスタ画像28等の(300、0)に合わせるようにする。このように、ブロックの一部を重複させるようにして、各ブロック単位で比較検査を行うことで、ブロックの端部にあるパターンについても正確に検査をすることができる。その結果、上記「ゆすらせ」と併用することで、より一層正確な比較検査を行うことができる。   In step S32, when the object image 27 or the like is divided into blocks, one block range may be divided so as to overlap another block range. For example, when the size of one block is set to 320 × 256 as described above, the coordinates (0, 0) on the left end are changed to the coordinates (0, 0) of the master image 28 or the like for the position of the first block. However, the position of the second block is adjusted to (300, 0) of the master image 28 or the like. In this way, by performing the comparative inspection in units of blocks so that a part of the blocks overlap, it is possible to accurately inspect the pattern at the end of the block. As a result, a more accurate comparative inspection can be performed by using together with the above-mentioned “jussling”.

また、被検査物について、上述した実施形態ではプリント配線板を被検査物としていた。これに限らず、半導体ウェハや液晶基板等、また、これらを作成するためのマスクフィルムや印刷版等を被検査物としてもよい。   Further, regarding the inspection object, in the above-described embodiment, the printed wiring board is the inspection object. However, the present invention is not limited to this, and a semiconductor wafer, a liquid crystal substrate, etc., and a mask film or a printing plate for producing them may be used as the inspection object.

また、上述した実施形態においては、オブジェクト画像27やマスタ画像28等の二値化した画像を用いて比較検査を行っていた。このような二値化画像に限らず、二値以上の値で構成される画像を用いて比較検査を行っても良い。   In the above-described embodiment, the comparative inspection is performed using the binarized images such as the object image 27 and the master image 28. The comparative inspection may be performed using not only such a binarized image but also an image composed of two or more values.

本発明にかかる差分比較検査方法および差分比較検査装置は、基板上に形成されたパターンについて適切な比較検査ができ、基板検査装置等の用途に有用である。   The difference comparison inspection method and the difference comparison inspection apparatus according to the present invention can perform an appropriate comparison inspection on a pattern formed on a substrate, and are useful for applications such as a substrate inspection apparatus.

本発明の実施形態に係る光学式検査装置の全体構成を模式的に示す図The figure which shows typically the whole structure of the optical inspection apparatus which concerns on embodiment of this invention. 本発明の実施形態に係る光学式検査装置を示す機能ブロック図Functional block diagram showing an optical inspection device according to an embodiment of the present invention マスタ画像28の一例を示す図The figure which shows an example of the master image 28 オブジェクト画像27の一例を示す図The figure which shows an example of the object image 27 本実施形態における比較検査の原理を示す図The figure which shows the principle of the comparison inspection in this embodiment 準備処理の詳細を示すフローチャートFlow chart showing details of preparation process 内角・外角を説明するための図Illustration for explaining inner and outer angles 図6のステップS1で示した内角領域画像生成処理の詳細を示すフローチャートThe flowchart which shows the detail of an internal corner area | region image generation process shown by step S1 of FIG. 角検出のための、注目画素とその周辺の所定の画素との組み合わせパターンを示す図The figure which shows the combination pattern of an attention pixel and the predetermined pixel of the circumference for a corner detection 図6のステップS2で示した外角領域画像生成処理の詳細を示すフローチャートThe flowchart which shows the detail of an outer corner area | region image generation process shown by step S2 of FIG. 画像のブロックによる細分化の一例を示す図The figure which shows an example of the subdivision by the block of an image 比較検査処理の詳細を示すフローチャートFlow chart showing details of comparison inspection process 図12のステップS34で示したブロック検査処理の詳細を示すフローチャートThe flowchart which shows the detail of the block test | inspection process shown by step S34 of FIG. 「ゆすらせ」を説明するための図Illustration for explaining "Yusurase" 「ゆすらせ」を説明するための図Illustration for explaining "Yusurase" 図13のステップS44で示したウィンドウ検査処理の詳細を示すフローチャートThe flowchart which shows the detail of the window test | inspection process shown by step S44 of FIG. 本実施形態における比較検査について説明するための図The figure for demonstrating the comparative test | inspection in this embodiment 中感度の角検出パターンの一例を示す図Diagram showing an example of medium sensitivity angle detection pattern 高感度の角検出パターンの一例を示す図The figure which shows an example of a highly sensitive corner detection pattern 斜め線の段差について説明するための図The figure for explaining the step of the diagonal line 従来の比較検査法を説明するための図Diagram for explaining the conventional comparative inspection method オーバーエッチングおよびアンダーエッチングの一例を示す図Diagram showing an example of over-etching and under-etching

符号の説明Explanation of symbols

1 光学式外観検査装置
11 ステージ部
12 ステージ支持部
13 ステージ駆動機構
14 ベース部
15 撮像カメラ
16 支持部材
17 カメラ支持部
18 カメラ駆動機構
21 制御部
22 オブジェクト画像生成部
23 角領域画像生成部
24 角検出部
25 膨張部
26 記憶部
27 オブジェクト画像
28 マスタ画像
29 内角領域画像
30 外角領域画像
31 比較検査部



DESCRIPTION OF SYMBOLS 1 Optical appearance inspection apparatus 11 Stage part 12 Stage support part 13 Stage drive mechanism 14 Base part 15 Imaging camera 16 Support member 17 Camera support part 18 Camera drive mechanism 21 Control part 22 Object image generation part 23 Corner area image generation part 24 Corner Detection unit 25 Expansion unit 26 Storage unit 27 Object image 28 Master image 29 Inner corner region image 30 Outer corner region image 31 Comparative inspection unit



Claims (8)

パターンが形成された被検査物を撮像したオブジェクト画像と当該パターンのマスタ画像とを比較して、当該被検査物を検査する差分比較検査方法であって、
前記パターンに形成された凹状の隅である内角及び凸状の角である外角をそれぞれ前記マスタ画像から検出する角検出ステップと、
前記検出した内角近傍の領域である内角領域の範囲を決定する内角領域決定ステップと、
前記検出した外角近傍の領域である外角領域の範囲を決定する外角領域決定ステップと、
前記マスタ画像と前記オブジェクト画像との差分に基づいて比較検査する比較検査ステップとを有し、
前記比較検査ステップは、
前記マスタ画像における前記内角領域において、当該マスタ画像が示すパターンの領域より過剰に形成されている前記オブジェクト画像のパターンの領域に対する差分を除外して比較検査し、
前記マスタ画像における前記外角領域において、当該マスタ画像が示すパターンの領域より不足して形成されている前記オブジェクト画像のパターンの領域に対する差分を除外して比較検査する、差分比較検査方法。
A difference comparison inspection method for inspecting the inspection object by comparing the object image obtained by imaging the inspection object on which the pattern is formed with the master image of the pattern,
An angle detection step of detecting an inner angle that is a concave corner formed in the pattern and an outer angle that is a convex corner from the master image, respectively.
An inner angle area determining step for determining a range of an inner angle area that is an area in the vicinity of the detected inner angle;
An outer angle region determining step for determining a range of an outer angle region which is a region in the vicinity of the detected outer angle;
A comparison inspection step of performing a comparison inspection based on a difference between the master image and the object image;
The comparative inspection step includes
In the inner angle area of the master image, a comparison inspection is performed by excluding a difference with respect to the pattern area of the object image formed in excess of the pattern area indicated by the master image,
A difference comparison inspection method in which, in the outer angle area of the master image, a comparison inspection is performed by excluding a difference from the pattern area of the object image that is formed less than the pattern area indicated by the master image.
前記オブジェクト画像および前記マスタ画像は、それぞれ前記パターンが形成された領域の画素値を第1の値、それ以外の画素値を当該第1の値とは異なる第2の値とする二値化された画像であり、
前記内角領域決定ステップは、前記内角領域内の画素値を前記第1の値、当該内角領域外の画素値を前記第2の値とした内角領域画像を生成する内角領域画像生成ステップを更に含み、
前記外角領域決定ステップは、前記外角領域内の画素値を前記第1の値、当該外角領域外の画素値を前記第2の値とした外角領域画像を生成する外角領域画像生成ステップを更に含み
前記比較検査ステップは、
同一の座標軸上で前記マスタ画像と前記内角領域画像と前記外角領域画像と前記オブジェクト画像との位置合わせを行う位置合わせステップと、
前記座標軸上において同じ位置となる検査対象位置の画素の画素値を前記各画像から取得する画素値取得ステップと、
前記取得したオブジェクト画像の画素値が前記第1の値であり、前記取得したマスタ画像の画素値が前記第2の値であり、且つ、前記取得した内角領域画像の画素値が前記第1の値であるときは、当該検査対象位置の前記マスタ画像およびオブジェクト画像の画素値を同じ値として比較検査し、
前記取得したオブジェクト画像の画素値が前記第2の値であり、前記取得したマスタ画像の画素値が前記第1の値であり、且つ、前記取得した外角領域画像の画素値が前記第1の値であるときは、当該検査対象位置の前記マスタ画像およびオブジェクト画像の画素値を同じ値として比較検査する、画素値判定ステップを更に含む、請求項1に記載の差分比較検査方法。
Each of the object image and the master image is binarized with a pixel value of a region where the pattern is formed as a first value and other pixel values as a second value different from the first value. Images
The inner angle area determining step further includes an inner angle area image generating step of generating an inner angle area image in which the pixel value in the inner angle area is the first value and the pixel value outside the inner angle area is the second value. ,
The outer angle area determining step further includes an outer angle area image generating step of generating an outer angle area image in which the pixel value in the outer angle area is the first value and the pixel value outside the outer angle area is the second value. The comparative inspection step includes
An alignment step of aligning the master image, the inner angle area image, the outer angle area image, and the object image on the same coordinate axis;
A pixel value acquisition step of acquiring, from each image, a pixel value of a pixel at an inspection target position that is the same position on the coordinate axis;
The pixel value of the acquired object image is the first value, the pixel value of the acquired master image is the second value, and the pixel value of the acquired inner corner area image is the first value. When it is a value, the pixel value of the master image and the object image at the inspection target position is compared and inspected as the same value,
The pixel value of the acquired object image is the second value, the pixel value of the acquired master image is the first value, and the pixel value of the acquired outside angle area image is the first value. The difference comparison inspection method according to claim 1, further comprising a pixel value determination step of comparing and inspecting the pixel value of the master image and the object image at the inspection target position as the same value when the value is a value.
前記角検出ステップは、前記内角あるいは外角をそれぞれ示す1つの画素を前記マスタ画像から検出し、
前記内角領域決定ステップは、前記検出した内角となる画素を中心とする所定の大きさの領域を前記内角領域として決定し、
前記外角領域決定ステップは、前記検出した外角となる画素を中心とする所定の大きさの領域を前記外角領域として決定する、請求項1に記載の比較検査方法。
The corner detecting step detects one pixel indicating the inner angle or the outer angle from the master image,
In the inner angle area determining step, an area having a predetermined size centered on the pixel that is the detected inner angle is determined as the inner angle area,
The comparative inspection method according to claim 1, wherein in the outer angle area determination step, an area having a predetermined size centered on the pixel having the detected outer angle is determined as the outer angle area.
前記内角領域決定ステップは、前記検出された内角の画素に対して、膨張処理を予め定められた回数以上繰り返して実行することで前記内角領域を決定し、
前記外角領域決定ステップは、前記検出された外角の画素に対して、膨張処理を予め定められた回数以上繰り返して実行することで前記外角領域を決定する、請求項3に記載の差分比較検査方法。
In the inner angle region determining step, the inner angle region is determined by repeatedly performing expansion processing for a predetermined number of times for the detected inner angle pixels,
The difference comparison inspection method according to claim 3, wherein the outer-angle region determining step determines the outer-angle region by repeatedly performing expansion processing on the detected outer-angle pixels by a predetermined number of times or more. .
更に、前記検出した内角あるいは外角に近接する前記パターンの直線部の幅を検出する幅検出ステップを有し、
前記内角領域画像生成ステップは、前記検出された幅に応じて、前記膨張処理を繰り返す回数を変更し、
前記外角領域画像生成ステップは、前記検出された幅に応じて、前記膨張処理を繰り返す回数を変更する、請求項4に記載の比較検査方法。
And a width detecting step for detecting a width of the linear portion of the pattern close to the detected inner angle or outer angle,
The inner corner area image generation step changes the number of times the expansion process is repeated according to the detected width,
The comparative inspection method according to claim 4, wherein in the outer corner region image generation step, the number of times the expansion process is repeated is changed according to the detected width.
前記角検出ステップは、前記マスタ画像における注目画素の画素値と当該注目画素を基準に抽出する複数の画素の位置をそれぞれ示す複数のパターンを用いて前記マスタ画像から抽出された画素値と、所定の論理式とを用いて、当該注目画素が前記内角あるいは外角を示す1つの画素であることを検出する論理演算ステップを更に含み、
前記論理演算ステップは、前記パターンのうち、いずれか1つのパターンを用いて抽出された画素値および前記注目画素の画素値が代入された前記所定の論理式の演算結果が内角あるいは外角であることを示したときは、当該注目画素を前記内角あるいは外角を示す1つの画素として検出する、請求項3に記載の比較検査方法。
The corner detection step includes a pixel value extracted from the master image using a plurality of patterns respectively indicating a pixel value of the target pixel in the master image and positions of the plurality of pixels extracted based on the target pixel; And a logical operation step of detecting that the pixel of interest is one pixel indicating the inner angle or the outer angle using the logical expression of
In the logical operation step, an operation result of the predetermined logical expression in which a pixel value extracted using any one of the patterns and a pixel value of the target pixel is substituted is an internal angle or an external angle. The comparison inspection method according to claim 3, wherein the target pixel is detected as one pixel indicating the inner angle or the outer angle.
前記角検出ステップは、前記マスタ画像における注目画素の画素値と当該注目画素を基準に抽出する複数の画素の位置をそれぞれ示す複数のパターンを用いて前記マスタ画像から抽出された画素値とを用いて、当該注目画素が前記内角あるいは外角を示す1つの画素であることを検出する論理演算ステップを更に含み、
前記論理演算ステップは、
前記注目画素の画素値が前記マスタ画像で示されるパターンの領域内を示し、当該注目画素の画素値が前記パターンの何れか1つを用いて抽出された画素値全てと異なるとき、当該注目画素が前記外角を示す1つの画素であるとして検出し、
前記注目画素の画素値が前記マスタ画像で示されるパターンの領域外を示し、当該注目画素の画素値が前記パターンの何れか1つを用いて抽出された画素値全てと異なるとき、当該注目画素が前記内角を示す1つの画素であるとして検出する、請求項3に記載の比較検査方法。
The corner detection step uses a pixel value of the target pixel in the master image and a pixel value extracted from the master image using a plurality of patterns respectively indicating positions of a plurality of pixels extracted based on the target pixel. A logical operation step of detecting that the target pixel is one pixel indicating the inner angle or the outer angle;
The logical operation step includes
When the pixel value of the target pixel indicates the area of the pattern indicated by the master image, and the pixel value of the target pixel is different from all the pixel values extracted using any one of the patterns, the target pixel Is detected as one pixel indicating the outer angle,
When the pixel value of the target pixel indicates outside the area of the pattern indicated by the master image, and the pixel value of the target pixel is different from all the pixel values extracted using any one of the patterns, the target pixel The comparison inspection method according to claim 3, wherein the pixel is detected as one pixel indicating the inner angle.
パターンが形成された被検査物を撮像したオブジェクト画像と当該パターンのマスタ画像とを比較して、当該被検査物を検査する差分比較検査装置であって、
前記パターンに形成された凹状の隅である内角及び凸状の角である外角をそれぞれ前記マスタ画像から検出する角検出部と、
前記検出した内角近傍の領域である内角領域の範囲を決定する内角領域決定部と、
前記検出した外角近傍の領域である外角領域の範囲を決定する外角領域決定部と、
前記マスタ画像と前記オブジェクト画像との差分に基づいて比較検査する比較検査部とを備え、
前記比較検査部は、
前記マスタ画像における前記内角領域において、当該マスタ画像が示すパターンの領域より過剰に形成されている前記オブジェクト画像のパターンの領域に対する差分を除外して比較検査し、
前記マスタ画像における前記外角領域において、当該マスタ画像が示すパターンの領域より不足して形成されている前記オブジェクト画像のパターンの領域に対する差分を除外して比較検査する、差分比較検査装置。

A differential comparison inspection apparatus that inspects the inspection object by comparing the object image obtained by imaging the inspection object on which the pattern is formed with the master image of the pattern,
An angle detection unit that detects an inner angle that is a concave corner and an outer angle that is a convex corner formed in the pattern, respectively, from the master image;
An internal angle region determination unit that determines a range of an internal angle region that is a region in the vicinity of the detected internal angle;
An outside angle region determining unit that determines a range of an outside angle region that is a region in the vicinity of the detected outside angle;
A comparison inspection unit that performs a comparison inspection based on a difference between the master image and the object image;
The comparison inspection unit
In the inner angle area of the master image, a comparison inspection is performed by excluding a difference with respect to the pattern area of the object image formed in excess of the pattern area indicated by the master image,
A difference comparison inspection apparatus that excludes a difference from the pattern area of the object image that is formed in the outer angle area of the master image and is less than the pattern area indicated by the master image, and performs a comparison inspection.

JP2005358962A 2005-12-13 2005-12-13 Difference comparison inspection method and difference comparison inspection device Abandoned JP2007163259A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2005358962A JP2007163259A (en) 2005-12-13 2005-12-13 Difference comparison inspection method and difference comparison inspection device
TW095136657A TW200723980A (en) 2005-12-13 2006-10-03 Differential comparison inspection method and apparatus thereof
CNA2006101428229A CN1982880A (en) 2005-12-13 2006-10-26 Differential comparison inspection method and apparatus thereof
KR1020060105429A KR100821038B1 (en) 2005-12-13 2006-10-30 Differential comparison test method and differential comparison test device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005358962A JP2007163259A (en) 2005-12-13 2005-12-13 Difference comparison inspection method and difference comparison inspection device

Publications (1)

Publication Number Publication Date
JP2007163259A true JP2007163259A (en) 2007-06-28

Family

ID=38165559

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005358962A Abandoned JP2007163259A (en) 2005-12-13 2005-12-13 Difference comparison inspection method and difference comparison inspection device

Country Status (4)

Country Link
JP (1) JP2007163259A (en)
KR (1) KR100821038B1 (en)
CN (1) CN1982880A (en)
TW (1) TW200723980A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010128795A (en) * 2008-11-27 2010-06-10 Aisin Seiki Co Ltd Obstacle detector
JP2010198555A (en) * 2009-02-27 2010-09-09 Brother Ind Ltd Head mounted display

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103674959A (en) * 2012-09-21 2014-03-26 英业达科技有限公司 System and method for detecting electronic element on circuit board
JP6675831B2 (en) * 2015-03-27 2020-04-08 株式会社日立産機システム Print inspection method, print inspection apparatus using the same, and print inspection apparatus main body
US9646191B2 (en) * 2015-09-23 2017-05-09 Intermec Technologies Corporation Evaluating images
JP7293046B2 (en) * 2019-08-23 2023-06-19 東レエンジニアリング株式会社 Wafer visual inspection apparatus and method
CN111739020B (en) * 2020-07-31 2020-12-01 成都数之联科技有限公司 Automatic labeling method, device, equipment and medium for periodic texture background defect label
CN113340909B (en) * 2021-08-05 2021-11-16 常州铭赛机器人科技股份有限公司 Glue line defect detection method based on machine vision

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4648053A (en) 1984-10-30 1987-03-03 Kollmorgen Technologies, Corp. High speed optical inspection system
JPH06185999A (en) * 1992-12-21 1994-07-08 Toshiba Corp Method and device for inspecting pattern
GB2389178B (en) 2001-12-31 2004-10-27 Orbotech Ltd Method for inspecting patterns

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010128795A (en) * 2008-11-27 2010-06-10 Aisin Seiki Co Ltd Obstacle detector
JP2010198555A (en) * 2009-02-27 2010-09-09 Brother Ind Ltd Head mounted display

Also Published As

Publication number Publication date
KR20070062905A (en) 2007-06-18
CN1982880A (en) 2007-06-20
TWI303540B (en) 2008-11-21
TW200723980A (en) 2007-06-16
KR100821038B1 (en) 2008-04-08

Similar Documents

Publication Publication Date Title
CN100565196C (en) Defect detecting device and method and wire area extraction element and method
KR100821038B1 (en) Differential comparison test method and differential comparison test device
JP4652391B2 (en) Pattern inspection apparatus and pattern inspection method
JP2008175686A (en) Visual examination device and visual examination method
KR960013357B1 (en) Image data inspection method and device
JP4323475B2 (en) Sample inspection apparatus, sample inspection method, and program
JP2005121546A (en) Defect inspection method
JP4414533B2 (en) Defect inspection equipment
US7275006B2 (en) Workpiece inspection apparatus assisting device, workpiece inspection method and computer-readable recording media storing program therefor
JP3806125B2 (en) Defect inspection apparatus and defect inspection method
JP2004132950A (en) Appearance inspection device and appearance inspection method
JP2002005850A (en) Defect inspection method and apparatus therefor, and production method of mask
JP2023109897A (en) Learning device, inspection device, alignment device, and method for learning
JP2002286430A (en) Solder printing inspection equipment
JPH08272078A (en) Pattern inspection method and inspection apparatus
JP5148564B2 (en) Appearance inspection method and appearance inspection apparatus for inspecting using the method
JP3683827B2 (en) Pattern defect inspection method and pattern defect inspection apparatus
JP4243268B2 (en) Pattern inspection apparatus and pattern inspection method
JP3707674B2 (en) Pattern inspection apparatus and method
JP2004085543A (en) Appearance inspection device and appearance inspection method
JP2004340837A (en) Surface defect inspection method and surface defect inspection device
JPH01255073A (en) Method and device for checking pattern
JP4206392B2 (en) Pattern defect inspection apparatus and pattern defect inspection method using the same
WO2024204649A1 (en) Wafer inspection device, wafer inspection system, wafer inspection method, and program
WO2024166608A1 (en) Visual inspection method and visual inspection device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071218

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20090821