[go: up one dir, main page]

JP4734625B2 - Master pattern creation device - Google Patents

Master pattern creation device Download PDF

Info

Publication number
JP4734625B2
JP4734625B2 JP2004311091A JP2004311091A JP4734625B2 JP 4734625 B2 JP4734625 B2 JP 4734625B2 JP 2004311091 A JP2004311091 A JP 2004311091A JP 2004311091 A JP2004311091 A JP 2004311091A JP 4734625 B2 JP4734625 B2 JP 4734625B2
Authority
JP
Japan
Prior art keywords
pixel
correlation
data
run
length code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004311091A
Other languages
Japanese (ja)
Other versions
JP2006126946A (en
Inventor
ヒックス クレイグ
Original Assignee
国際技術開発株式会社
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 国際技術開発株式会社 filed Critical 国際技術開発株式会社
Priority to JP2004311091A priority Critical patent/JP4734625B2/en
Publication of JP2006126946A publication Critical patent/JP2006126946A/en
Application granted granted Critical
Publication of JP4734625B2 publication Critical patent/JP4734625B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

本発明は、マスターパターン作成装置にかかり、特に、画像処理を用いて基板等のパターンの欠陥を検出するパターン欠陥検出装置等の検出装置で用いられるマスターパターンを作成するマスターパターン作成装置に関する。   The present invention relates to a master pattern creation device, and more particularly to a master pattern creation device that creates a master pattern used in a detection device such as a pattern defect detection device that detects a defect in a pattern such as a substrate using image processing.

IC等の電気素子を積載するための基板等には各電気素子の端子間や他の機器とを電気的に接続するためにパターンが形成されている。このようなパターンを有する基板等は同一のものを多数作製するが、製造条件や環境条件によって同一のものが作製されないことがある。例えば、所定幅でかつ所定長さのパターンを作製した場合に、パターンの一部が欠けたりパターンの一部が膨らんだりした欠陥を有するパターンが作製されることがある。   A pattern or the like is formed on a substrate or the like on which an electric element such as an IC is mounted in order to electrically connect between terminals of each electric element and other devices. Many substrates having such a pattern are manufactured, but the same substrate may not be manufactured depending on manufacturing conditions and environmental conditions. For example, when a pattern having a predetermined width and a predetermined length is manufactured, a pattern having a defect in which a part of the pattern is missing or a part of the pattern swells may be manufactured.

このため、従来は基準とするマスターパターンを予め用意してそのマスターパターンと作製した作製パターンとを比較することによって、一致しているか否かを判定していた。この比較は、画像処理を用いて、マスターパターンを撮像した画像データと作製パターンを撮像した画像データとを比較するマッチング法が知られている。このマッチング法は、マスターパターンを撮像したときの各画素と作製パターンを撮像したときの各画素とを画素毎に2値化した画像データを比較してパターン同士が一致しているか否かを判定する。また、マスターパターンをテンプレートとして一つの作製パターンの中の複数のパターンを比較することもできる。このように比較することによって、作製パターンの欠陥を検出することができる。このような技術として、パターン欠陥検出装置が知られている(特許文献1参照)。   For this reason, conventionally, a master pattern as a reference is prepared in advance, and the master pattern is compared with the manufactured pattern to determine whether or not they match. For this comparison, a matching method is known in which image data obtained by capturing a master pattern and image data obtained by capturing a production pattern are compared using image processing. In this matching method, each pixel when the master pattern is imaged and each pixel when the production pattern is imaged are compared for each pixel, and it is determined whether the patterns match each other. To do. In addition, a plurality of patterns in one production pattern can be compared using the master pattern as a template. By comparing in this way, a defect in the production pattern can be detected. As such a technique, a pattern defect detection apparatus is known (see Patent Document 1).

ところが、欠陥を検出するために用いるマスターパターンの作成は、検出の基準となるため、検出精度が高いものを予め用意しなければならなかった。このため、設計図や製作図等の図面からマスターパターンを作成し、用いていた。
特開平10−83452号公報
However, since the creation of a master pattern used to detect a defect becomes a reference for detection, a master pattern with high detection accuracy must be prepared in advance. For this reason, a master pattern is created and used from drawings such as design drawings and production drawings.
Japanese Patent Laid-Open No. 10-83452

しかしながら、上記のように、マスターパターンを図面から作成する場合には、製造上の誤差を考慮しなければならず、煩雑な作業を必要としていた。また、マスターパターンの画像データは全ての画素について予め記憶しなければならないため、マスターパターンの作成に膨大な処理を必要としていた。   However, as described above, when a master pattern is created from a drawing, a manufacturing error must be taken into consideration, and a complicated operation is required. Further, since the master pattern image data must be stored in advance for all the pixels, a huge amount of processing is required to create the master pattern.

本発明は、上記事実を考慮して、迅速にパターン欠陥検出装置等の検出装置で用いられるマスターパターンを作成することができるマスターパターン作成装置を得ることが目的である。   An object of the present invention is to obtain a master pattern creation device that can quickly create a master pattern used in a detection device such as a pattern defect detection device in consideration of the above facts.

上記目的を達成するために請求項1に記載の発明のマスターパターン作成装置は、作製した複数の物体の各々について、縦横複数の画素に分割して撮像する撮像手段と、前記撮像手段によって撮像された複数の撮像画像の各々を画素毎に、該画素の濃度に基づいて予め定めた数値を該画素の画素値として設定する画素値設定手段と、各画素の画素値が設定された前記撮像画像を順次1画素の画素値を読み取って所定方向に同一の画素値が連続する長さを、該同一の画素値が連続する画素数で表したランレングスコードを生成する生成手段と、前記撮像手段によって撮像された複数の撮像画像の各々について、前記生成手段で生成されたランレングスコードに基づいて、前記所定方向のライン毎の同一画素値の総和の特性をX相関として求めると共に、求めたX相関の一致度が大きいラインについて、前記所定方向のライン毎の同一画素値の総和の特性をY相関として求めかつ求めたY相関の一致度が大きいランレングスコードの各々の位置及び長さの相関関係を求めることによって、前記撮像手段によって撮像された複数の撮像画像間におけるランレングスコードの位置及び長さの相関関係を求める相関関係演算手段と、求めた相関関係が所定値以上のランレングスコードをマスターパターンのデータとして設定するマスター設定手段と、を備えている。 In order to achieve the above object, a master pattern creating apparatus according to a first aspect of the present invention is directed to an imaging unit that divides and images a plurality of manufactured objects into a plurality of vertical and horizontal pixels, and is captured by the imaging unit. Pixel value setting means for setting a predetermined numerical value as a pixel value of the pixel for each pixel of each of the plurality of captured images, and the captured image in which the pixel value of each pixel is set Generating means for generating a run-length code in which a pixel value of one pixel is sequentially read and a length in which the same pixel value continues in a predetermined direction is represented by the number of pixels in which the same pixel value continues. for each of a plurality of images captured by, on the basis of run-length code generated by said generating means, determining characteristics of the sum of the same pixel value for each of the predetermined direction of the line as an X-correlation In each of the lines having a large degree of coincidence of the obtained X correlation, each position of the run length code having a large degree of coincidence of the Y correlation obtained by obtaining the characteristic of the sum of the same pixel values for each line in the predetermined direction as the Y correlation. And a correlation calculation means for obtaining a correlation between the position and length of the run-length code between a plurality of captured images picked up by the image pickup means, and a calculated correlation is a predetermined value. Master setting means for setting the above run length code as master pattern data.

請求項2の発明は、請求項1に記載のマスターパターン作成装置において、前記画素値設定手段は、画素の濃度を予め定めた所定濃度未満を白または該所定濃度以上を黒の何れかに分類する2値化によって画素毎に白データを表す画素値または黒データを表す画素値を設定することを特徴とする。   According to a second aspect of the present invention, in the master pattern creating apparatus according to the first aspect, the pixel value setting means classifies the pixel density as either white when the predetermined density is less than a predetermined density or black when the density is higher than the predetermined density. By performing binarization, a pixel value representing white data or a pixel value representing black data is set for each pixel.

前記マスターパターン作成装置において、前記相関関係演算手段は、前記所定方向のライン毎の同一画素値の総和の特性をX相関として求めると共に、求めたX相関の一致度が大きいラインについて、前記複数の物体の間におけるランレングスコードの位置及び長さの相関関係を求めることができる。 In the master pattern creation device, the correlation calculation means obtains a characteristic of the sum of the same pixel values for each line in the predetermined direction as an X correlation, and for the lines having a large degree of coincidence of the obtained X correlations, Ru can be found a correlation between the position and length of the run length code between objects.

前記マスターパターン作成装置において、前記相関関係演算手段は、前記X相関の一致度が大きいラインについて、前記所定方向のライン毎の同一画素値の総和の特性をY相関として求めると共に、求めたY相関の一致度が大きいランレングスコードの各々の位置及び長さの相関関係を求めることができる。
In the master pattern generation device, the correlation calculation means obtains the characteristic of the sum of the same pixel values for each line in the predetermined direction as a Y correlation for the line having a high degree of coincidence of the X correlation, and obtains the calculated Y correlation. Ru can be determined each position and length correlation of the degree of coincidence of the large run length code.

本発明では、撮像手段によって物体が縦横複数の画素に分割されて撮像される。この撮像画像は画素値設定手段によって画素毎に画素値が設定される。撮像画像を画素の濃度は、白色等の最低濃度から黒色等の最高濃度までの連続的な濃度範囲内に存在する。そこで、最低濃度から黒色等の最高濃度までの連続的な濃度範囲を複数に分類して分類された濃度範囲の各々に予め定めた数値を対応させる。従って、各画素は、画素の濃度に基づいて予め定めた数値が該画素の画素値として設定される。これによって、撮像画像は画素毎に画素値による多値化されたデータで表される。   In the present invention, the object is imaged by being divided into a plurality of vertical and horizontal pixels by the imaging means. In this captured image, the pixel value is set for each pixel by the pixel value setting means. The pixel density of the captured image exists within a continuous density range from the lowest density such as white to the highest density such as black. Therefore, a continuous density range from the lowest density to the highest density such as black is classified into a plurality, and a predetermined numerical value is associated with each of the classified density ranges. Accordingly, for each pixel, a predetermined numerical value based on the density of the pixel is set as the pixel value of the pixel. Thus, the captured image is represented by multivalued data based on pixel values for each pixel.

この画素値設定手段は、請求項2に記載したように、画素の濃度を予め定めた所定濃度未満を白または該所定濃度以上を黒の何れかに分類する2値化によって画素毎に白データを表す画素値または黒データを表す画素値を設定する2値化手段で構成することができる。この2値化手段によって、画素のデータは白データまたは黒データに2値化できる。撮像手段によって撮像された物体は多値化され、生成手段によって、順次1画素づつデータが読み取られ、所定方向に同一の画素値が連続する長さを、該同一の画素値が連続する画素数で表したランレングスコードが生成される。   The pixel value setting means, as described in claim 2, provides white data for each pixel by binarization that classifies the pixel density as either white when a predetermined density is less than a predetermined density or black when the density is higher than the predetermined density. Or a binarizing means for setting a pixel value representing black data. By this binarization means, pixel data can be binarized into white data or black data. The object picked up by the image pickup means is multi-valued, and the data is sequentially read by the pixel by the generation means, and the length of the same pixel value in a predetermined direction is set to the number of pixels in which the same pixel value is continuous. Is generated.

撮像手段では、複数の物体が撮像され、各々の物体は、生成手段によりランレングスコードが生成される。例えば、2値化された物体の画像は所定方向に白データまたは黒データが連続する画素数で表したランレングスコードとして生成される。従って、撮像手段によって撮像される物体の画像の所定方向の長さは、所定方向に同一の画素値が連続する画素数で表される。これら複数の物体の各々のランレングスコードに基づいて、相関関係演算手段によって、複数の各物体の間におけるランレングスコードの位置及び長さの相関関係が求められる。すなわち、複数の物体の各々のランレングスコードの間で相関関係が求められる。   A plurality of objects are imaged by the imaging means, and a run length code is generated for each object by the generating means. For example, a binarized object image is generated as a run-length code represented by the number of pixels in which white data or black data continues in a predetermined direction. Therefore, the length in the predetermined direction of the image of the object imaged by the imaging means is represented by the number of pixels in which the same pixel value continues in the predetermined direction. Based on the run length codes of each of the plurality of objects, the correlation calculating means obtains the correlation between the positions and lengths of the run length codes between the plurality of objects. That is, a correlation is obtained between run length codes of a plurality of objects.

上記の相関関係は、ランレングスコードの位置及び長さに対する一致度で表すことができ、ランレングスコードの位置及び長さが一致する、すなわち画像として重ねたときに重複する領域が大きくなる程、大きくなる値となる。求められた相関関係が所定値以上のランレングスコードは、マスターパターンのデータとしてマスター設定手段により設定される。略同一であることが望まれる複数の物体について、そのランレングスコードの位置及び長さの相関関係が高い(相関関係が所定値以上)ということは、複数の物体の間で、標準的なランレングスコードであるということを表している。従って、相関関係が高いランレングスコードをマスターパターンのデータとすれば、複数の物体そのものから、煩雑な作業や膨大な処理を必要とすることなく、マスタパターンを作成することができる。   The above correlation can be expressed by the degree of coincidence with the position and length of the run-length code, and the position and length of the run-length code match, that is, the larger the overlapping area when superimposed as an image, The value becomes larger. The run-length code having the calculated correlation equal to or greater than a predetermined value is set by the master setting means as master pattern data. For a plurality of objects that are desired to be substantially the same, the correlation between the position and length of the run-length code is high (correlation is equal to or greater than a predetermined value). Indicates that it is a length code. Therefore, if a run-length code having a high correlation is used as master pattern data, a master pattern can be created from a plurality of objects without requiring complicated operations and enormous processing.

パターン欠陥検出装置等の検出装置では、作成したマスターパターンのランレングスコードを用いて、撮像した物体の画像から生成されたランレングスコードを比較することができる。その比較結果に基づいて、すなわち、比較したランレングスコードが異なる場合には、同一の画素値連続する画素の数、すなわち長さが異なることになり、長さが短いまたは長い物体を撮像したことに相当し、不良であると判定できる。   In a detection device such as a pattern defect detection device, the run length codes generated from the captured image of the object can be compared using the run length code of the created master pattern. Based on the comparison result, that is, when the compared run length codes are different, the number of pixels having the same pixel value, that is, the length is different, and an object having a short or long length is imaged. It can be determined that it is defective.

複数の物体の各々の間で相関関係を求めるとき、撮像時の位置ずれや製造時の誤差等の位置状態により、同一のパターンであっても各々の物体間で位置ずれが生じていることがある。また、撮像時の誤差等で僅かな拡大縮小が生じることもある。このため、請求項3にも記載したように、前記相関関係演算手段が、所定方向のライン毎の同一画素値の総和の特性をX相関として求めると共に、求めたX相関の一致度が大きいラインについて、複数の物体の間におけるランレングスコードの位置及び長さの相関関係を求めることができる。このようにすれば、所定方向のライン毎に相関関係を求めることができ、位置ずれや拡大縮小時のずれを解消して相関関係を、求めることができる。   When obtaining a correlation between each of a plurality of objects, there may be a positional deviation between the objects even in the same pattern due to a positional state such as a positional deviation at the time of imaging or an error at the time of manufacturing. is there. In addition, slight enlargement / reduction may occur due to an error during imaging. For this reason, as described in claim 3, the correlation calculating means obtains the characteristic of the sum of the same pixel values for each line in a predetermined direction as an X correlation, and a line with a large degree of coincidence of the obtained X correlation. , The correlation between the position and length of the run-length code among a plurality of objects can be obtained. In this way, the correlation can be obtained for each line in the predetermined direction, and the correlation can be obtained by eliminating the positional deviation and the deviation at the time of enlargement / reduction.

また、所定方向のライン毎に相関関係を求めることができた場合であっても、そのライン上の画素が連続する方向、すなわち所定方向に位置ずれがあった場合には、これを解消できない。このため、請求項4に記載したように、相関関係演算手段が、X相関の一致度が大きいラインについて、所定方向のライン毎の同一画素値の総和の特性をY相関として求めると共に、求めたY相関の一致度が大きいランレングスコードの各々の位置及び長さの相関関係をさらに求めることが好ましい。このようにすれば、所定方向のライン毎に相関関係を求めることができると共に、そのライン上でのずれを解消することにより、精度よく位置ずれや拡大縮小時のずれを解消して相関関係を求めることができる。   Even if the correlation can be obtained for each line in a predetermined direction, this cannot be resolved if there is a positional shift in the direction in which the pixels on the line continue, that is, in the predetermined direction. For this reason, as described in claim 4, the correlation calculation means obtains the characteristic of the sum of the same pixel values for each line in a predetermined direction as the Y correlation for the line having a large degree of coincidence of the X correlation. It is preferable to further obtain the correlation between the positions and lengths of the run length codes having a high degree of coincidence of the Y correlation. In this way, a correlation can be obtained for each line in a predetermined direction, and by eliminating the deviation on the line, the positional deviation and the deviation at the time of enlargement / reduction can be eliminated with high accuracy. Can be sought.

以上説明したように本発明によれば、生成手段により所定方向に連続する同一画素値の画素数で表したランレングスコードが複数の物体の各々について生成され、相関関係演算手段により複数の各物体の間におけるランレングスコードの位置及び長さの相関関係が求められ、相関関係が所定値以上のランレングスコードがマスターパターンのデータとしてマスター設定手段により設定されるので、複数の物体そのものから、煩雑な作業や膨大な処理を必要とすることなく、マスタパターンを作成することができる、という効果がある。   As described above, according to the present invention, a run-length code represented by the number of pixels having the same pixel value continuous in a predetermined direction is generated for each of a plurality of objects by the generation unit, and each of the plurality of objects is calculated by the correlation calculation unit. Since the correlation between the position and the length of the run length code between them is obtained, and the run length code whose correlation is equal to or greater than a predetermined value is set as master pattern data by the master setting means, it is complicated from a plurality of objects themselves. There is an effect that a master pattern can be created without requiring a lot of work and enormous processing.

また、相関関係演算手段が、所定方向のライン毎の同一画素値の総和の特性をX相関として求めると共に、求めたX相関の一致度が大きいラインについて、複数の物体の間におけるランレングスコードの位置及び長さの相関関係を求めることにより、所定方向のライン毎に相関関係を求めることができ、位置ずれや拡大縮小時のずれを解消して相関関係を求めることができる、という効果がある。   Further, the correlation calculation means obtains the characteristic of the sum of the same pixel values for each line in a predetermined direction as X correlation, and for the line having a large degree of coincidence of the obtained X correlation, the run length code between a plurality of objects is calculated. By obtaining the correlation between the position and the length, the correlation can be obtained for each line in a predetermined direction, and the correlation can be obtained by eliminating the positional deviation and the deviation at the time of enlargement / reduction. .

さらに、相関関係演算手段が、X相関の一致度が大きいラインについて、所定方向のライン毎の同一画素値の総和の特性をY相関として求めると共に、求めたY相関の一致度が大きいランレングスコードの各々の位置及び長さの相関関係をさらに求めることにより、所定方向のライン毎に相関関係を求めることができると共に、そのライン上でのずれを解消することにより、精度よく位置ずれや拡大縮小時のずれを解消して相関関係を求めることができる、という効果がある。   Further, the correlation calculation means obtains the characteristic of the sum of the same pixel values for each line in a predetermined direction as the Y correlation for the line having a large degree of coincidence of the X correlation, and the run length code having a large degree of coincidence of the obtained Y correlation. By further determining the correlation between each position and length, it is possible to determine the correlation for each line in a predetermined direction, and by eliminating the shift on that line, the position shift and enlargement / reduction can be performed with high accuracy. There is an effect that the correlation can be obtained by eliminating the time lag.

以下、図面を参照して本発明の実施の形態の一例を詳細に説明する。本実施の形態はIC基板上に作製されたパターン(作製パターン)の欠陥を検出する欠陥検出装置に本発明を適用したものである。   Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings. In the present embodiment, the present invention is applied to a defect detection apparatus that detects defects in a pattern (manufactured pattern) formed on an IC substrate.

図1に示すように、本実施の形態の欠陥検出装置10は、IC基板を撮像するためのカメラ12、カメラ12からの出力信号であるアナログ信号をデジタル信号に変換するA/D変換装置14、IC基板をカメラ12対してIC基板の面に沿う方向に移動させるためのモータ16、ドライバ18、少なくとも画像を表示することが可能なモニタ20、及び演算装置22から構成されている。演算装置20は、CPU24,RAM26,ROM28及び入出力ポート(I/O)30からなるマイクロコンピュータで構成され、各々はコマンドやデータの授受が可能なようにバス32によって接続されている。なお、ROM28には、後述する処理ルーチンが記憶されている。入出力ポート30には、A/D変換装置14を介してカメラ12が接続されると共に、ドライバ18を介してモータ16が接続されている。また、入出力ポート30にはモニタ20が接続されると共に、データやコマンド等を入力するためのキーボード34が接続されている。   As shown in FIG. 1, a defect detection apparatus 10 according to the present embodiment includes a camera 12 for imaging an IC substrate, and an A / D conversion apparatus 14 that converts an analog signal that is an output signal from the camera 12 into a digital signal. The motor 16 for moving the IC board relative to the camera 12 in the direction along the surface of the IC board, the driver 18, the monitor 20 capable of displaying at least an image, and the arithmetic unit 22. The arithmetic unit 20 is composed of a microcomputer comprising a CPU 24, a RAM 26, a ROM 28, and an input / output port (I / O) 30, and each is connected by a bus 32 so that commands and data can be exchanged. The ROM 28 stores a processing routine which will be described later. The camera 12 is connected to the input / output port 30 via the A / D converter 14, and the motor 16 is connected via the driver 18. A monitor 20 is connected to the input / output port 30 and a keyboard 34 for inputting data, commands, and the like.

なお、A/D変換装置14は、カメラ12から出力されたアナログ信号を2値のデジタル信号に変換するためのものであるが、カメラ12から出力されたアナログ信号を2値化したデジタル信号(2値化データ)を出力するようにしてもよい。すなわち、カメラ12からの出力信号であるアナログ信号を2値のデジタル信号に変換するための2値化装置として構成してもよい。   The A / D conversion device 14 is for converting an analog signal output from the camera 12 into a binary digital signal. However, the A / D converter 14 converts the analog signal output from the camera 12 into a binary digital signal ( (Binary data) may be output. That is, it may be configured as a binarization device for converting an analog signal that is an output signal from the camera 12 into a binary digital signal.

次に、本実施の形態の作用を説明する。   Next, the operation of the present embodiment will be described.

演算装置22では電源が投入されると図2の処理ルーチンが実行され、ステップ100へ進む。   When the power is turned on in the arithmetic unit 22, the processing routine of FIG.

図2のステップ100では、作製パターン設置処理が実行される。この作製パターン設置処理は、カメラ12に対して複数の作製パターンをサンプルとして撮像する位置を定めるための処理である。すなわち、作製パターンが有する形状(長さや幅、角度や位置のデータ)を得るために、少なくとも各作製パターンの全てをカメラ12で撮像しなければならない。従って、その各作製パターンを撮像できるカメラ12と作製パターンの相対位置(カメラ12の倍率も含む)を設定しかつ記憶する。これにより、複数の作製パターンの各々が有する形状(長さや幅、角度や位置のデータ)を計測する場合に、作製パターンが形成されたIC基板の位置の設定が容易となる。   In step 100 of FIG. 2, a production pattern installation process is executed. This production pattern setting process is a process for determining a position at which the camera 12 captures a plurality of production patterns as samples. That is, in order to obtain the shape (length, width, angle, and position data) of the production pattern, at least all of the production patterns must be imaged by the camera 12. Therefore, the camera 12 capable of capturing each of the production patterns and the relative position of the production pattern (including the magnification of the camera 12) are set and stored. This facilitates setting of the position of the IC substrate on which the production pattern is formed when measuring the shape (length, width, angle, and position data) of each of the plurality of production patterns.

例えば、図8(1)に示すように、パターン40を撮像した画像50を得る設置位置を記憶する。この設置位置はモータ16にエンコーダを取り付けて、エンコーダによって表されたデータを位置データとして記憶すればよい。 なお、本実施の形態では、全ての作製パターンのうち複数(予め定めた数)の作製パターンをサンプルとして設定しているが、全ての作製パターンをサンプルとして設定してもよい。   For example, as shown in FIG. 8A, the installation position where the image 50 obtained by capturing the pattern 40 is obtained is stored. The installation position may be obtained by attaching an encoder to the motor 16 and storing data represented by the encoder as position data. In the present embodiment, a plurality (a predetermined number) of production patterns among all the production patterns are set as samples, but all the production patterns may be set as samples.

次のステップ102では、上記設置位置が記憶されたサンプルを用いて、作製パターンの欠陥を検出するための基準となるマスターパターンの作製処理が実行される。このマスター作製処理は、後述するように、作製パターンを用いて統計的に縦横についてのランレングスコードによって生成されたマスターデータにより構成されるマスターパターンを作製する(詳細は後述、図3参照)。   In the next step 102, a master pattern manufacturing process that is a reference for detecting a defect in the manufacturing pattern is executed using the sample in which the installation position is stored. As will be described later, this master production process produces a master pattern that is composed of master data that is statistically generated by run length codes in the vertical and horizontal directions using the production pattern (see FIG. 3 for details later).

次のステップ104では、作製パターン設置処理が実行される。この作製パターン設置処理は、欠陥を検出する作製パターンを撮像する位置に定めるための処理である。次のステップ106では、作製パターンに関する縦横についてのランレングスコードを生成すると共に、生成されたデータとマスターデータとを比較することによって作製パターンの欠陥を検出する(詳細は後述、図7参照)。   In the next step 104, a production pattern setting process is executed. This production pattern installation process is a process for determining a production pattern for detecting a defect at a position for imaging. In the next step 106, run length codes for the vertical and horizontal directions related to the manufacturing pattern are generated, and defects in the manufacturing pattern are detected by comparing the generated data with the master data (see FIG. 7 for details later).

次のステップ108では、欠陥検出を行う作製パターンが残存するか否かを判定し、残存するときはステップ108で肯定判定されステップ104へ戻って再度上記処理を繰り返し、欠陥を検出する。一方、全ての作製パターンについて欠陥検出が終了したときはステップ108で否定判定され、本ルーチンを終了する。このステップ108の判定は予め作製パターンの個数によって定められてもよく、キーボード34で入力するようにしてもよい。   In the next step 108, it is determined whether or not a production pattern for performing defect detection remains. If it remains, an affirmative determination is made in step 108 and the process returns to step 104 to repeat the above-described process again to detect defects. On the other hand, when the defect detection is completed for all the production patterns, a negative determination is made in step 108, and this routine is terminated. The determination in step 108 may be determined in advance by the number of production patterns, or may be input using the keyboard 34.

次に、図2のステップ102の詳細を説明する。図2のステップ102において、マスター作製処理が実行されると、図3のデータ作製ルーチンが実行され、ステップ200へ進む。   Next, details of step 102 in FIG. 2 will be described. When the master production process is executed in step 102 in FIG. 2, the data production routine in FIG. 3 is executed, and the process proceeds to step 200.

図3のステップ200では、カメラ12から出力された信号をA/D変換装置14が変換したデジタル信号を読み取ることによって作製パターンであるサンプル40を撮像してサンプル画像50を得る(図8(1)参照)。次のステップ202ではサンプル画像50を2値化する。次のステップ204では、1画素毎に2値化データを読み取ってランレングスコードを作製するランレングス処理を行う(詳細は後述、図4参照)。次のステップ206ではサンプル画像50の全画素についてランレングス処理が終了したか否かを判断し、サンプル画像50の全画素についてランレングス処理が終了したときにランレングス処理で得られたランレングスコードをサンプルデータi(i=1,2,・・・)として次のステップ208において記憶して、次のステップ210において所定数のサンプルについての上記処理が終了したか否かを判断する。否定判断の場合は、ステップ200へ戻り、次のサンプルを設定し、上記処理を繰り返す。   In step 200 of FIG. 3, the sample 40 which is a production pattern is imaged by reading a digital signal obtained by converting the signal output from the camera 12 by the A / D converter 14 (FIG. 8 (1)). )reference). In the next step 202, the sample image 50 is binarized. In the next step 204, run length processing is performed to read the binarized data for each pixel and create a run length code (see FIG. 4 for details later). In the next step 206, it is determined whether or not the run-length process has been completed for all the pixels of the sample image 50, and the run-length code obtained by the run-length process when the run-length process has been completed for all the pixels of the sample image 50. Is stored as sample data i (i = 1, 2,...) In the next step 208, and in the next step 210, it is determined whether or not the above-described processing for a predetermined number of samples has been completed. If the determination is negative, the process returns to step 200, the next sample is set, and the above process is repeated.

一方、ステップ210で肯定判断の場合には、ステップ212へ進む。このステップ212では、上記のようにしてランレングス処理が施された所定数のサンプルのうち1つのサンプルを仮マスターパターンとして設定する。すなわち、作製パターンのサンプルの1つを仮マスターパターンとして設定する。   On the other hand, if the determination at step 210 is affirmative, the routine proceeds to step 212. In this step 212, one sample is set as a temporary master pattern among the predetermined number of samples subjected to the run length processing as described above. That is, one of the samples of the production pattern is set as a temporary master pattern.

次に、ステップ214において、仮マスターパターンとして設定したサンプルと異なるサンプルをマッチング用のサンプルj(j=1,2,・・・,j≠i)として設定し、次のステップ216においてマッチング処理を行う。このマッチング処理は、詳細は後述するが、仮マスターパターンとして設定したサンプルと、マッチング用のサンプルjとの間の相関関係を求める処理である(図5参照)。   Next, in step 214, a sample different from the sample set as the temporary master pattern is set as a matching sample j (j = 1, 2,..., J ≠ i), and in the next step 216, matching processing is performed. Do. Although details will be described later, this matching processing is processing for obtaining a correlation between a sample set as a temporary master pattern and a matching sample j (see FIG. 5).

次のステップ218では、相関関係を求めるマッチング処理が所定数のサンプル全てについて終了したか否かを判断し、未だサンプルが残存するときは否定され、ステップ214へ戻る。一方、全てのサンプルについてマッチング処理が終了した場合にはステップ220へ進み、マスターパターンが生成される。マスターパターンは、所定数のサンプルの間で相関関係が高いランレングスコードを設定することにより生成される。このステップ220のマスター作製処理は、マッチング処理の説明の後に詳細を説明する。   In the next step 218, it is determined whether or not the matching processing for obtaining the correlation has been completed for all the predetermined number of samples. If samples still remain, the determination is negative, and the processing returns to step 214. On the other hand, if the matching process is completed for all samples, the process proceeds to step 220, where a master pattern is generated. The master pattern is generated by setting a run length code having a high correlation between a predetermined number of samples. The details of the master production process in step 220 will be described after the description of the matching process.

なお、上記サンプル画像50は、階調画像としてモニタ20に表示してもよく、2値化画像として表示するようにしてもよい。   The sample image 50 may be displayed on the monitor 20 as a gradation image or may be displayed as a binarized image.

次に、図3のステップ204の詳細を説明する。図3のステップ204において、ランレングス処理が実行されると、図4のランレングス処理ルーチンが実行される。   Next, details of step 204 in FIG. 3 will be described. When the run length process is executed in step 204 of FIG. 3, the run length process routine of FIG. 4 is executed.

ランレングス処理を説明するにあたり、本実施の形態におけるランレングスコードの定義について説明する。   In describing the run length process, the definition of the run length code in the present embodiment will be described.

図9に示すように、サンプル画像50の1隅付近(図8(1)の左上隅付近)には、黒データから構成されるパターン40を構成する部分パターン60の先端部分が位置している。このサンプル画像50は一方向(水平方向、図9では横方向)に画素数H0 、一方向と交差する方向(垂直方向、図9では縦方向)に画素数V0 からなる画像で構成される。なお、以下の説明では、水平方向の位置を画素の位置i(1≦i≦H0 )で表し、垂直方向の位置を画素の位置j(1≦j≦V0 )で表すと共に、画像上の画素の位置を(i,j)で表す。 As shown in FIG. 9, the tip portion of the partial pattern 60 constituting the pattern 40 composed of black data is located near one corner of the sample image 50 (near the upper left corner of FIG. 8A). . This sample image 50 is composed of an image having a pixel number H 0 in one direction (horizontal direction, horizontal direction in FIG. 9) and a pixel number V 0 in a direction intersecting one direction (vertical direction, vertical direction in FIG. 9). The In the following description, the horizontal position is represented by a pixel position i (1 ≦ i ≦ H 0 ), the vertical position is represented by a pixel position j (1 ≦ j ≦ V 0 ), and Is represented by (i, j).

サンプル画像50は2値化されたデータであるため、各画素データは白データまたは黒データである。本実施の形態では、各画素データである白データまたは黒データが連続する画素数をランレングスコードとする。例えば、図9の例で垂直方向に8番目の画素(j=8)を水平方向に連続した領域62のデータは、水平方向に8番目の画素(i=8)まで白データが連続し、9番目の画素から12番目の画素まで黒データが連続し、13番目以降は白データとなる。従って、この領域62のデータは、白データまたは黒データの連続する画素の個数で、「8,5,・・・」と表すことができる。これによって、白データを「0」黒データを「1」として、領域62のデータは、「0:8,1:5,0:n・・・」と表すことができ、白データまたは黒データの連続する1群の画素について「k:n」(kは0または1、nは個数)で圧縮表現できる。この水平方向に関する画素データの連続は、水平方向(図9の矢印S方向)に順次読みだした後に垂直方向に順次(所謂、走査線毎に)読みだすようにすれば、(1,1)の位置の画素から(H0 ,V0 )の位置までの画素により、1群の画素についての「k:n」で表したランレングスコードで水平方向に関して1画像を表すことができる。このデータを水平ランレングスコードDH とする。 Since the sample image 50 is binarized data, each pixel data is white data or black data. In the present embodiment, the number of pixels in which white data or black data, which is each pixel data, continues is a run-length code. For example, in the example of FIG. 9, the data of the region 62 in which the eighth pixel (j = 8) in the vertical direction is continued in the horizontal direction is white data up to the eighth pixel (i = 8) in the horizontal direction. Black data continues from the 9th pixel to the 12th pixel, and the 13th and subsequent pixels are white data. Therefore, the data in this area 62 can be expressed as “8, 5,...” By the number of continuous pixels of white data or black data. Thus, the white data can be represented as “0”, the black data as “1”, and the data in the area 62 can be represented as “0: 8, 1: 5, 0: n. A continuous group of pixels can be compressed and expressed by “k: n” (k is 0 or 1, n is the number). The continuous pixel data in the horizontal direction is (1, 1) by sequentially reading in the horizontal direction (arrow S direction in FIG. 9) and then sequentially reading in the vertical direction (so-called every scanning line). One image can be represented in the horizontal direction by a run length code represented by “k: n” for one group of pixels from a pixel at a position of (H 0 , V 0 ) to a position of (H 0 , V 0 ). This data is defined as a horizontal run length code DH .

水平方向と同様に、図9の例で水平方向に9番目の画素(i=9)を垂直方向に連続した領域64のデータは、垂直方向に6番目の画素(i=6)まで白データが連続し、7番目の画素以降は黒データとなる。従って、この領域64のデータは、白データまたは黒データの連続する画素の個数で、「6,・・・」と表すことができる。これによって、領域64のデータは、「0:6,1:m,・・・」と表すことができ、白データまたは黒データの連続する1群の画素について「g:m」(gは0または1、mは個数)で圧縮表現できる。なお、垂直方向には、読みだす画素の位置を特定しなければならないため、水平方向の画素の位置iを付加する必要がある。このため、本実施の形態では、領域64のデータは、最初に水平方向の画素の位置iを付加し、「9,0:6,1:m,・・・」と表す。すなわち、縦方向に1画素づつ切り出した領域毎にランレングスコードを生成し、水平方向の画素の位置iを付加したデータを垂直ランレングスコードDV とする。 Similarly to the horizontal direction, in the example of FIG. 9, the data of the region 64 in which the ninth pixel (i = 9) in the horizontal direction continues in the vertical direction is white data up to the sixth pixel (i = 6) in the vertical direction. And the seventh pixel and thereafter become black data. Therefore, the data in the area 64 can be expressed as “6,...” By the number of continuous pixels of white data or black data. As a result, the data in the region 64 can be expressed as “0: 6, 1: m,...”, And “g: m” (g is 0 for a group of pixels in which white data or black data continues. Or, 1 and m can be expressed in compression. Note that in the vertical direction, since the position of the pixel to be read out must be specified, it is necessary to add the position i of the pixel in the horizontal direction. For this reason, in the present embodiment, the data of the region 64 is represented by “9, 0: 6, 1: m,... That is, to generate a run-length code for each cut out by one pixel in the longitudinal region, the data added with the position i in the horizontal direction of the pixels and the vertical run length codes D V.

このように、本実施の形態では、白データまたは黒データが連続する画素数をデータとする水平ランレングスコード及び垂直ランレングスコードによりランレングスコードを構成する。   As described above, in the present embodiment, a run-length code is composed of a horizontal run-length code and a vertical run-length code having the number of pixels in which white data or black data continues as data.

なお、以下の説明では、(i,j)=(1,1)の位置の画素から水平方向(図9の矢印S方向)に順次読みだした後に垂直方向(図9の矢印t方向)に順次(所謂、走査線毎に)、(H0 ,V0 )の位置の画素までの画素データを順次読みだすものとする。 In the following description, the pixels at the position (i, j) = (1, 1) are sequentially read in the horizontal direction (arrow S direction in FIG. 9) and then in the vertical direction (arrow t direction in FIG. 9). It is assumed that pixel data up to a pixel at a position of (H 0 , V 0 ) is sequentially read out sequentially (so-called for each scanning line).

まず、図4のステップ120では、本ルーチンが最初に実行された場合か否かを判断し、最初に実行された場合は次のステップ122で初期化処理を行う。すなわち、水平方向の画素の位置i、及び垂直方向の位置を画素の位置jを「1」に設定し、白データまたは黒データが水平方向に連続する画素群の個数n、及び垂直方向に連続する画素群の個数mを「1」に設定する。   First, in step 120 of FIG. 4, it is determined whether or not this routine is executed for the first time. If it is executed for the first time, initialization processing is performed in the next step 122. That is, the pixel position i in the horizontal direction and the pixel position j in the vertical direction are set to “1”, the number n of pixel groups in which white data or black data continues in the horizontal direction, and the vertical direction continues. The number m of pixel groups to be set is set to “1”.

次のステップ124では、1画素データを読み取り、この読み取った画素データが水平方向について前回の画素データ(白データまたは黒データ)と一致するか否かを次のステップ126で判断し、一致の場合は肯定判断されステップ132へ進む。不一致の場合はステップ126で否定判断され、ステップ128において前回までの水平ランレングスコードDH (n)を記憶したのち、ステップ130において水平方向に連続する画素群の個数nをインクリメントすると共に水平ランレングスコードDH (n)をリセットする。 In the next step 124, one pixel data is read, and it is determined in the next step 126 whether or not the read pixel data matches the previous pixel data (white data or black data) in the horizontal direction. Is affirmed and the routine proceeds to step 132. If they do not match, a negative determination is made in step 126, and in step 128, the horizontal run length code D H (n) up to the previous time is stored. Then, in step 130, the number n of consecutive pixel groups is incremented and the horizontal run length is increased. The length code D H (n) is reset.

次のステップ132では、ステップ124で読み取った画素データが垂直方向について前回の画素データ(白データまたは黒データ)と一致するか否かを判断し、一致の場合は肯定判断されステップ132へ進む。不一致の場合はステップ132で否定判断され、ステップ134において前回までの垂直ランレングスコードDV (i,m)を記憶したのち、ステップ136において垂直方向に連続する画素群の個数mをインクリメントすると共に垂直ランレングスコードDV (i,m)をリセットする。 In the next step 132, it is determined whether or not the pixel data read in step 124 matches the previous pixel data (white data or black data) in the vertical direction. If they do not match, a negative determination is made in step 132, the vertical run length code D V (i, m) up to the previous time is stored in step 134, and then the number m of the pixel groups continuous in the vertical direction is incremented in step 136. Reset the vertical run length code D V (i, m).

次のステップ138では、水平ランレングスコードDH (n)、及び垂直ランレングスコードDV (i,m)をインクリメントする。これによって、水平ランレングスコードDH (n)、及び垂直ランレングスコードDV (i,m)の各々は白データまたは黒データが連続する個数を表すデータとなる。 In the next step 138, the horizontal run length code D H (n) and the vertical run length code D V (i, m) are incremented. Thus, each of the horizontal run length code D H (n) and the vertical run length code D V (i, m) becomes data representing the number of consecutive white data or black data.

次のステップ140では、i=H0 か否かを判断することによって読みだした画素数が水平画素数に到達したか否かを判断し、肯定判断の場合には、次のステップ144において水平方向の画素の位置iをリセット(i=1)すると共に垂直方向の位置を画素の位置jをインクリメントする。一方、ステップ140で否定判断の場合には、まだ水平方向に画素が残存するため、水平方向の画素の位置iをインクリメントする。 In the next step 140, it is determined whether i = H 0 or not, and it is determined whether or not the number of read pixels has reached the number of horizontal pixels. The pixel position i in the direction is reset (i = 1), and the pixel position j is incremented in the vertical position. On the other hand, if the determination in step 140 is negative, the pixel still remains in the horizontal direction, so the position i of the pixel in the horizontal direction is incremented.

次のステップ146では、j<V0 か否かを判断することによって読みだした画素数が垂直画素数未満か否かを判断し、肯定判断の場合には、次回の処理のため、次のステップ148において現在のデータを記憶し本ルーチンを終了する。一方、ステップ146で否定判断の場合には、垂直方向について全画素の処理が終了したため、全画素について処理が終了したことを表す終了フラグをセットして本ルーチンを終了する。 In the next step 146, it is determined whether or not j <V 0 by determining whether or not the number of read pixels is less than the number of vertical pixels. If the determination is affirmative, the next process is performed for the next processing. In step 148, the current data is stored and this routine is terminated. On the other hand, if a negative determination is made in step 146, the processing for all the pixels in the vertical direction has been completed. Therefore, an end flag indicating that the processing has been completed for all the pixels is set, and this routine is terminated.

以上のようにして、1画素づつ読みだして水平ランレングスコード及び垂直ランレングスコードを生成する。   As described above, the horizontal run length code and the vertical run length code are generated by reading pixel by pixel.

次に、図3のステップ216の詳細を説明する。図3のステップ216において、マッチング処理が実行されると、図5のマッチング処理ルーチンが実行される。まずステップ230では、仮マスターパターンとマッチング用のサンプルjの各々の所定方向(図10の矢印A方向)のライン毎の相関関係を表すX相関を求める。なお、本実施の形態では、ラインは、カメラ12の走査線に相当する。2次元CCDセンサやラインCCDセンサをカメラ12として用いる場合には、画素を構成する最小セル(素子)が一方に連続する方向に並べられたセル群を対応させることができる。このラインCCDセンサを用いるときには2次元画像を得るため、ラインCCDセンサの素子が連続する方向と交差する方向にパターン及びカメラを移動させながら撮像させる必要がある。上記のX相関は、ライン内に含まれる黒に対応する画素の総数を各ライン毎に求め、所定方向と交差する方向(図10の矢印Aと交差する方向)の特性を表すものである。   Next, details of step 216 in FIG. 3 will be described. When the matching process is executed in step 216 of FIG. 3, the matching process routine of FIG. 5 is executed. First, in step 230, an X correlation representing a correlation for each line in the predetermined direction (the direction of arrow A in FIG. 10) of each of the temporary master pattern and the matching sample j is obtained. In the present embodiment, the line corresponds to the scanning line of the camera 12. When a two-dimensional CCD sensor or a line CCD sensor is used as the camera 12, a cell group in which the minimum cells (elements) constituting a pixel are arranged in one continuous direction can be associated. When this line CCD sensor is used, in order to obtain a two-dimensional image, it is necessary to pick up an image while moving the pattern and the camera in a direction intersecting the direction in which the elements of the line CCD sensor are continuous. The above-described X correlation represents the characteristics of the direction intersecting with a predetermined direction (direction intersecting with the arrow A in FIG. 10) by obtaining the total number of pixels corresponding to black included in the line for each line.

なお、このX相関は、画素毎の画素値を用いて求めれもよく、またランレングスを用いてもよい。ランレングスコードを用いる場合には、そのままランレングスコードを用いてもよく、ランレングスコードを画素値に変換してもよい。   The X correlation may be obtained using a pixel value for each pixel, or a run length may be used. When a run length code is used, the run length code may be used as it is, or the run length code may be converted into a pixel value.

図10には、略一致するパターンが僅かにずれた画像(サンプル画像50、52)の各々を示した。図10(1)には、仮マスターパターンに設定したサンプル画像50上のラインを概念イメージとして示し、図10(1)の紙面右方に、X相関によって求めた特性70を示した。また、図10(2)には、マッチング用のサンプル画像52上のラインを概念イメージとして示し、図10(2)の紙面右方に、X相関によって求めた特性72を示した。図10(1)、(2)の各々のX相関の特性70、72から理解されるように、各特性は略一致し、図10の矢印Aと交差する方向にずれた関係にある。   FIG. 10 shows images (sample images 50 and 52) in which the substantially matching patterns are slightly shifted. FIG. 10A shows a line on the sample image 50 set as the temporary master pattern as a conceptual image, and a characteristic 70 obtained by X correlation is shown on the right side of FIG. 10A. FIG. 10B shows a line on the matching sample image 52 as a conceptual image, and a characteristic 72 obtained by X correlation is shown on the right side of FIG. 10B. As can be understood from the X correlation characteristics 70 and 72 in FIGS. 10A and 10B, the characteristics are substantially the same and have a relationship shifted in the direction intersecting the arrow A in FIG.

図11には、サンプル画像50と、サンプル画像50に略一致するパターンが僅かに縮小したマッチング用のサンプル画像54とを示した。図11(2)の紙面右方のX相関の特性74から、各特性は略相似関係にある事が理解される。これにより、ラインに沿う方向と交差する方向にずれたラインが対応される。   FIG. 11 shows a sample image 50 and a matching sample image 54 in which a pattern substantially matching the sample image 50 is slightly reduced. It can be understood from the X correlation characteristic 74 on the right side of FIG. 11B that the characteristics are substantially similar. Thereby, the line which shifted | deviated to the direction which cross | intersects the direction along a line is respond | corresponded.

次のステップ232では、仮マスターパターンとマッチング用のサンプルjの各々の所定方向と交差する方向(図10の矢印A方向と交差する方向)の相関関係を表すY相関を求める。このY相関は、上記ラインと交差する方向の黒に対応する画素の総数を所定方向について各々求め、所定方向(図10の矢印A方向)の特性を表すものである。図10(1)の紙面下方には仮マスターパターンに設定したサンプル画像50についてY相関によって求めた特性76を示し、図10(2)の紙面下方にはマッチング用のサンプル画像52についてY相関によって求めた特性78を示した。図10(1)、(2)の各々のY相関の特性76、78から理解されるように、各特性は略一致し、図10の矢印A方向にずれた関係にある。   In the next step 232, a Y correlation representing the correlation in the direction intersecting the predetermined direction of each of the temporary master pattern and the matching sample j (direction intersecting the arrow A direction in FIG. 10) is obtained. This Y correlation represents the total number of pixels corresponding to black in the direction intersecting with the above-mentioned line for each predetermined direction, and represents the characteristic in the predetermined direction (the direction of arrow A in FIG. 10). A characteristic 76 obtained by the Y correlation for the sample image 50 set as the temporary master pattern is shown below the paper surface of FIG. 10 (1), and a matching sample image 52 is shown by the Y correlation on the lower surface of FIG. 10 (2). The obtained characteristic 78 is shown. As understood from the Y correlation characteristics 76 and 78 in FIGS. 10A and 10B, the characteristics are substantially the same and are in a relationship shifted in the direction of arrow A in FIG.

次のステップ234では、仮マスターパターンとマッチング用のサンプルjの各々の間で対応するラインを設定する。すなわち、上記ステップ230でX相関の特性で最も一致度が高い位置のラインを、仮マスターパターンとマッチング用のサンプルとの間で対応させる。図10の例では、各々の間で相対的に位置関係のみが異なるのであるため、各ラインはその全てが1対1に対応できる。また、図11の例では、マッチング用のサンプル画像54は僅かに縮小されているので、1対1の位置のラインに対応されない。すなわち、ライン数が同一であるときは、仮マスターパターンの画像50のライン80は、マッチング用のサンプル画像54のライン82に対応されるべきであるが、X相関の特性から縮小方向のライン84が対応されることになる。   In the next step 234, a corresponding line is set between each of the temporary master pattern and the matching sample j. That is, in step 230, the line having the highest coincidence in the X correlation characteristics is associated with the temporary master pattern and the matching sample. In the example of FIG. 10, since only the positional relationship is relatively different between each line, all the lines can correspond one-to-one. In the example of FIG. 11, the matching sample image 54 is slightly reduced and therefore does not correspond to a line at a one-to-one position. That is, when the number of lines is the same, the line 80 of the temporary master pattern image 50 should correspond to the line 82 of the sample image 54 for matching. Will be supported.

次に、ステップ238では、Y相関の特性の特性を用いてライン方向の大まかな位置合わせを行って、上記ステップ236で設定されたラインについてマッチング検査をするランレングスコードを設定する。次のステップ240では、設定したランレングスコードについて、仮マスターパターンとサンプルとの間の重複領域を導出する。この重複領域とは、設定したライン上のランレングスコードを、仮マスターパターンとサンプルとについて重ねたときに重複する領域をいう。すなわち、このステップ240は、ライン上でマッチングすべきランレングスコードには重複領域が存在するということを想定しているためである。   Next, in step 238, rough alignment in the line direction is performed using the characteristic of the Y correlation characteristic, and a run-length code for performing a matching check on the line set in step 236 is set. In the next step 240, an overlapping area between the temporary master pattern and the sample is derived for the set run length code. The overlapping area is an area that overlaps when the run-length code on the set line is overlapped with the temporary master pattern and the sample. That is, this step 240 is because it is assumed that there is an overlapping area in the run-length code to be matched on the line.

次のステップ242では、導出した重複領域が存在するか否かを判断し、重複領域が存在しない(図12(2)参照)ときは、仮マスターパターンとサンプルとの間で一致したランレングスコードが存在しないと判断し(ステップ242で否定判断)、ステップ246へ進みマッチングNGと決定する。一方、重複領域が存在するときは、ステップ242で肯定判断され、次のステップ244において仮マスターパターンに対してサンプルが複数の重複領域が存在するか否かを判断する。複数の重複領域が存在するときはステップ244で肯定され、ステップ246へ進む。仮マスターパターンに対してサンプルが複数の重複領域が存在する場合とは、図12(3)に示すように、仮マスターパターンの1つのランレングスコードに対して複数のランレングスコードが属するということである。すなわち、本来1対1に対応すべきランレングスコードに複数のランレングスコードが対応するので、マッチングはなされていない。このため、ステップ246でマッチングNGと決定する。   In the next step 242, it is determined whether or not the derived overlapping area exists. If there is no overlapping area (see FIG. 12 (2)), the run length code that matches between the temporary master pattern and the sample (No in step 242), the process proceeds to step 246 and matching NG is determined. On the other hand, if there is an overlapping area, an affirmative determination is made in step 242, and in the next step 244, it is determined whether or not there are a plurality of overlapping areas for the temporary master pattern. If there are a plurality of overlapping regions, the result is affirmative in step 244 and the process proceeds to step 246. A case where there are a plurality of overlapping areas of a sample with respect to the temporary master pattern means that a plurality of run-length codes belong to one run-length code of the temporary master pattern as shown in FIG. It is. That is, since a plurality of run-length codes correspond to run-length codes that should originally correspond one-to-one, matching is not performed. For this reason, it is determined as matching NG in step 246.

一方、図12(1)に示すように、唯一の重複領域が存在するときは、ステップ244で否定され、ステップ248でマッチング度を演算する。このマッチング度は、ランレングスコードによる長さの一致度であり、本実施の形態では仮マスターパターンの長さに対するサンプルの長さの比を用いている。マッチング度の演算が終了すると、ステップ250へ進み、全てのランレングスコードについて上記処理が終了したか否かを判断する。全ランレングスコードについて処理が終了していないときはステップ250で否定され、ステップ238へ戻り、上記処理を繰り返す。一方、全ランレングスコードについて処理が終了したときは、ステップ250で肯定され、次のステップ252へ進み、全てのラインについて上記マッチング処理が終了したか否かを判断する。未だラインが残存するときは、ステップ252で否定され、ステップ236へ戻り、上記処理を繰り返し実行する。一方、全てのラインについて終了したときは、ステップ252で肯定され、次のステップ254で、マッチング度を記憶して本ルーチンを終了する。   On the other hand, as shown in FIG. 12A, when there is only one overlapping region, the result is negative in step 244, and the matching degree is calculated in step 248. This degree of matching is the degree of coincidence of lengths by run length codes, and in this embodiment, the ratio of the length of the sample to the length of the temporary master pattern is used. When the calculation of the matching degree is completed, the process proceeds to step 250, and it is determined whether or not the above process has been completed for all the run length codes. If the processing has not been completed for all the run length codes, the result in Step 250 is negative, and the processing returns to Step 238 to repeat the above processing. On the other hand, when the processing is completed for all run length codes, the result in step 250 is affirmative, and the process proceeds to the next step 252 where it is determined whether the matching processing is completed for all lines. If the line still remains, the result is negative in step 252 and the process returns to step 236 to repeat the above processing. On the other hand, when all the lines have been completed, the result in step 252 is affirmative. In the next step 254, the matching degree is stored, and this routine is terminated.

このようにして所定数のサンプルについてマッチング処理が終了すると、各サンプルについてのマッチング度が求められることになる。これらの複数のマッチング度を用いて、マスターパターンが生成される(図3のステップ220)。   When the matching process is completed for a predetermined number of samples in this way, the matching degree for each sample is obtained. A master pattern is generated using these multiple matching degrees (step 220 in FIG. 3).

次に、このマスターパターンの生成処理(図3のステップ220)の詳細を説明する。図3のステップ220が開始されると、図6のマスターデータ決定ルーチンが実行される。まず、ステップ260では、仮マスターパターンとして設定したサンプルのランレングスコードのうちマスターデータとして決定するためのランレングスコードを設定する。次のステップ262では、設定した仮マスターパターンのランレングスコードx0、及びランレングスコードx0に対する各サンプルのランレングスコードx1,x2,・・・,xjを読み取って(図13参照)、次のステップ264で各々のマッチングのばらつきを求める。ばらつきは標準偏差等の統計処理によって求めることができる。なお、上記マッチング度の演算(図5のステップ248)では、長さの比が求められているので、この長さの比を用いて、ばらつきを求めてもよい。求めたばらつきから仮マスターパターンとして設定したサンプルのランレングスコードx0の信頼性が判断できる。すなわち、ばらつきが大きければ信頼性が低く、ばらつきが小さければ信頼性が高い。   Next, details of the master pattern generation process (step 220 in FIG. 3) will be described. When step 220 of FIG. 3 is started, the master data determination routine of FIG. 6 is executed. First, in step 260, a run-length code for determining as master data among the sample run-length codes set as the temporary master pattern is set. In the next step 262, the run length code x0 of the set temporary master pattern and the run length codes x1, x2,..., Xj of each sample with respect to the run length code x0 are read (see FIG. 13), and the next step In H.264, the variation of each matching is obtained. The variation can be obtained by statistical processing such as standard deviation. In the above calculation of the matching degree (step 248 in FIG. 5), since the length ratio is obtained, the length ratio may be used to obtain the variation. The reliability of the sample run-length code x0 set as the temporary master pattern can be determined from the obtained variation. That is, if the variation is large, the reliability is low, and if the variation is small, the reliability is high.

次のステップ266では、上記ステップ264で求めたばらつきの値が予め定めた所定値未満の値か否かを判断することによって、ばらつきが小さいか否かを判断し、ばらつきの値が所定値以上の値のときは信頼性が低いためステップ266で否定され、ステップ272へ進む。ステップ272では仮マスターパターンとして設定したサンプルのランレングスコードをマスターデータとして決定することなく、すなわち、未決定状態(図14参照)でステップ276へ進む。   In the next step 266, it is determined whether or not the variation value obtained in step 264 is less than a predetermined value, thereby determining whether or not the variation is small. When the value is, the reliability is low and the result is negative in step 266 and the process proceeds to step 272. In step 272, the process proceeds to step 276 without determining the sample run-length code set as the temporary master pattern as master data, that is, in an undecided state (see FIG. 14).

一方、ばらつきの値が所定値未満の値でありステップ266で肯定されたときには、ステップ268へ進み、統計処理によって仮マスターパターンとして設定したサンプルのランレングスコードをマスターデータとして決定し、次のステップ270で記憶する。この統計処理は、全ランレングスコードの平均値や特定のランレングスコードを抽出したものの平均値を用いることができる。特定のランレングスコードの抽出は、ばらつきが小さいものの中から所定部分、例えば中心分布から1/2や1/3のランレングスコードを抽出することが好ましい。   On the other hand, when the variation value is less than the predetermined value and the result is affirmative in step 266, the process proceeds to step 268, where the sample run-length code set as the temporary master pattern by the statistical process is determined as the master data. Store at 270. This statistical processing can use an average value of all run length codes or an average value of specific run length codes extracted. For the extraction of a specific run length code, it is preferable to extract a predetermined portion of the code having a small variation, for example, a run length code of 1/2 or 1/3 from the center distribution.

ステップ274では、全てのランレングスコードについて上記処理が終了したか否かを判断し、未だ未処理のランレングスコードが存在するときはステップ274で否定され、ステップ260へ戻り上記処理を繰り返す。一方、全てのランレングスコードについて上記処理が終了したときにはステップ274で肯定され、次のステップ276で設定されていないランレングスコードが存在するか否かを判断する。設定されていないランレングスコードが存在しないときは、全てのランレングスコードについて、マスターデータが設定されているので、ステップ276で否定され、本ルーチンを終了する。   In step 274, it is determined whether or not the above process has been completed for all the run length codes. If there is still an unprocessed run length code, the result in step 274 is negative, and the process returns to step 260 to repeat the above process. On the other hand, when the above processing is completed for all the run length codes, an affirmative determination is made in step 274, and it is determined whether or not there is a run length code not set in the next step 276. If there is no run-length code that has not been set, since master data has been set for all run-length codes, the result in Step 276 is negative, and this routine ends.

設定されていないランレングスコードが存在するときは、ステップ276で肯定され、次のステップ278へ進む。ステップ278では、未設定の仮マスターパターンのランレングスコードに対応するデータを統計処理によって求めて、マスターデータとして決定し、次のステップ280で更新する。ステップ278の統計処理は、仮マスターパターンのランレングスコードx0を除いた、各サンプルのランレングスコードx1,x2,・・・,xjについてなされる。まず、ランレングスコードx1,x2,・・・,xjのばらつき(標準偏差等)を求め、ばらつきが小さいときには仮マスターパターンのランレングスコードx0が不良であるとして、ランレングスコードx1,x2,・・・,xjの平均値や特定のランレングスコードを抽出したものの平均値をマスターデータとして決定する。一方、求めたばらつきが大きいときには、対象となるランレングスコードをマスターデータから外して、そのランレングスコードはサンプル全てについて変動がおおきいため、マスターデータ作製不可能として不良であることを表すデータを出力する。なお、対象となるランレングスコードをマスターデータから外したときには、後述する比較処理にそのマスターデータを用いずに比較対象からも外す。また、この場合、他のサンプルを仮マスターパターンとして再度マスター作製を行ってもよい。   If there is a run length code that has not been set, the determination at step 276 is affirmative, and the routine proceeds to the next step 278. In step 278, data corresponding to the run-length code of the unset temporary master pattern is obtained by statistical processing, determined as master data, and updated in the next step 280. The statistical processing in step 278 is performed on the run-length codes x1, x2,..., Xj of each sample excluding the run-length code x0 of the temporary master pattern. First, variation (standard deviation, etc.) of run length codes x1, x2,..., Xj is obtained, and when the variation is small, it is assumed that run length code x0 of the temporary master pattern is defective, and run length codes x1, x2,. ..., Xj average value or average value obtained by extracting a specific run length code is determined as master data. On the other hand, when the obtained variation is large, the target run-length code is removed from the master data, and since the run-length code varies greatly for all samples, data indicating that the master data cannot be produced is output as defective To do. When the target run-length code is removed from the master data, it is also removed from the comparison target without using the master data in the comparison process described later. In this case, master preparation may be performed again using another sample as a temporary master pattern.

次に、図2のステップ106の詳細を説明する。図2のステップ106において、比較処理が実行されると、図7の比較処理ルーチンが実行される。   Next, details of step 106 in FIG. 2 will be described. When the comparison process is executed in step 106 of FIG. 2, the comparison process routine of FIG. 7 is executed.

図7のステップ150では、上記作製されたマスターデータを読み取る(図3参照)。次のステップ152では、設置された作製パターン52(図8(2)参照)を撮像した画像データを読み取り、次のステップ154で2値化する。   In step 150 of FIG. 7, the master data created as described above is read (see FIG. 3). In the next step 152, image data obtained by imaging the prepared production pattern 52 (see FIG. 8B) is read and binarized in the next step 154.

次のステップ156では、作製パターンを撮像した画像52の1画素について上記説明したランレングス処理を行い(図4参照)、作製パターンを撮像した画像52についてのランレングスコードとマスターデータのランレングスコードとを次のステップ158で比較する。   In the next step 156, the above-described run length processing is performed on one pixel of the image 52 obtained by imaging the production pattern (see FIG. 4), and the run length code and the master data run length code for the image 52 obtained by imaging the production pattern are processed. Are compared in the next step 158.

例えば、図8(1)に示すように、マスターデータ40として記憶された画像では垂直方向の画素の位置V1 について、水平ランレングスコードDH (n)で表される長さは、最初の白データの連続する群をuとすると、DH (u)=A1 ,DH (u+1)=A2 ,DH (u+2)=A3 ,DH (u+3)=A4 ,DH(u+4)=A5 になる。作製パターン42について同様に垂直方向の画素の位置V1 について、水平ランレングスコードDH (n)で表される長さは、DH (u)=a1 ,DH (u+1)=a2 ,DH (u+2)=a3 ,DH (u+3)=a4 ,DH (u+4)=a5 になる。これにより、長さの対応関係は、A1 ≒a1 ,A2 ≒a2 ,A3 >a3 ,A4 <a4 ,A5 ≒a5 になる。従って、上記ステップ158では、これらの長さを比較する。例えば、マスターデータから作製パターンの長さを減算する。この減算値を比較結果とする。図8から理解されるように、長さの対応関係で、A3 >a3 ,A4 <a4 の部分に欠陥が検出できる。この部分は減算値に所定値以上の値が求まり、予め許容範囲を定め、これを越えた値を欠陥とすれば、欠陥を検出できる。 For example, as shown in FIG. 8 (1), in the image stored as the master data 40, the length represented by the horizontal run length code D H (n) for the pixel position V 1 in the vertical direction is the first If u is a continuous group of white data, D H (u) = A 1 , D H (u + 1) = A 2 , D H (u + 2) = A 3 , D H (u + 3) = A 4 , DH (u + 4 ) = become A 5. Similarly, the length represented by the horizontal run length code D H (n) is D H (u) = a 1 , D H (u + 1) = a 2 with respect to the vertical pixel position V 1 in the production pattern 42. , D H (u + 2) = a 3 , D H (u + 3) = a 4 , D H (u + 4) = a 5 . As a result, the correspondence relationships of the lengths are A 1 ≈a 1 , A 2 ≈a 2 , A 3 > a 3 , A 4 <a 4 , and A 5 ≈a 5 . Therefore, in step 158, these lengths are compared. For example, the length of the production pattern is subtracted from the master data. This subtraction value is used as a comparison result. As can be understood from FIG. 8, a defect can be detected in the portions of A 3 > a 3 and A 4 <a 4 in the correspondence relationship of the lengths. In this part, if a value equal to or greater than a predetermined value is obtained as a subtraction value, a permissible range is determined in advance, and a value exceeding this value is determined as a defect, and a defect can be detected.

また、マスターデータ40として記憶された画像では水平方向の画素の位置H1 について、垂直ランレングスコードDV (H1 ,m)で表される長さは、DV(H1 ,1)=B1 ,DV (H1 ,2)=B2 ,DV (H1 ,3)=B3 になる。作製パターン42について同様に水平方向の画素の位置H1 について、垂直ランレングスコードDV (H1 ,m)で表される長さは、DV (H1 ,1)=b1のみになる。これにより、長さの対応関係は、B1 <b1 のみが対応しB2 ,B3 に対応するデータが未検出になる。従って、マスターデータから作製パターンの長さを減算した減算値を比較結果とすればB1 ,B2 ,B3 の各部分に欠陥が検出できる。なお、この場合、対象となるデータが無いときはパターンの欠落を推定することもできる。 In the image stored as the master data 40, the length represented by the vertical run-length code D V (H 1 , m) for the pixel position H 1 in the horizontal direction is DV (H 1 , 1) = B. 1 , D V (H 1 , 2) = B 2 and D V (H 1 , 3) = B 3 . Similarly, the length represented by the vertical run-length code D V (H 1 , m) is only D V (H 1 , 1) = b1 with respect to the horizontal pixel position H 1 in the production pattern 42. As a result, the correspondence relationship between the lengths corresponds only to B 1 <b 1 , and data corresponding to B 2 and B 3 is not detected. Therefore, if a subtraction value obtained by subtracting the length of the production pattern from the master data is used as a comparison result, a defect can be detected in each portion of B 1 , B 2 , and B 3 . In this case, when there is no target data, it is possible to estimate the missing pattern.

そこで、図7のステップ160では、減算値の絶対値が所定値(許容範囲)を越えたか否かによって欠陥があるか否かを判断し、肯定判断の場合にはモニター20に「欠陥あり」と表示し、ステップ156へ戻る。一方、否定判断の場合には欠陥は検出されていないので、全画素についてランレングス処理が終了するまで(ステップ164で肯定判断されるまで)、上記処理を繰り返し実行する。   Therefore, in step 160 of FIG. 7, it is determined whether or not there is a defect depending on whether or not the absolute value of the subtraction value exceeds a predetermined value (allowable range). And returns to step 156. On the other hand, since no defect is detected in the case of negative determination, the above processing is repeatedly executed until the run length processing is completed for all pixels (until an affirmative determination is made in step 164).

ステップ164で肯定判断され、全画素についてランレングス処理が終了すると、次のステップ166で欠陥が存在した否かを判断し、1つ以上の欠陥が存在したときはステップ170で全ての欠陥を表示して本ルーチンを終了する。一方、欠陥が検出されないときは作製パターンがマスターデータに相当するものが作製されたことを表す欠陥無の表示をステップ168で行い本ルーチンを終了する。   When an affirmative determination is made in step 164 and the run length processing is completed for all pixels, it is determined in the next step 166 whether or not there is a defect. If one or more defects exist, all defects are displayed in step 170. Then, this routine is finished. On the other hand, if no defect is detected, a defect-free display indicating that a production pattern corresponding to the master data has been produced is displayed in step 168, and this routine is terminated.

なお、本実施の形態では、マスターパターン(マスターデータ)と作製パターン(ランレングスコード)を、2値化処理後に求めたランレングスコードそのものを用いて比較して欠陥を検出する場合について説明したが、マスターパターン(マスターデータ)を作製するときの処理を用いてもよい。すなわち、図3の処理に適用し、ステップ212の仮マスターパターンの設定を、マスターパターンの設定に置き換える。また、ステップ220のマスター生成処理を判定処理に置き換える。この判定処理は、図5のステップ246で設定されたマッチングNGまたはステップ248で求められるマッチング度を用いて、マスターパターン(マスターデータ)と作製パターン(ランレングスコード)とが略一致するか否かを判定する。判定は、マッチング度が予め定めた値以上のときにマッチングがOKとし、予め定めた値未満またはマッチングNGのときにマッチングNGとし、マッチングNGのときに欠陥有りと検出ものとすればよい。   In the present embodiment, a case has been described in which a defect is detected by comparing a master pattern (master data) and a production pattern (run-length code) using the run-length code itself obtained after binarization processing. A process for producing a master pattern (master data) may be used. That is, applying the process of FIG. 3, the setting of the temporary master pattern in step 212 is replaced with the setting of the master pattern. Also, the master generation process in step 220 is replaced with a determination process. In this determination process, whether the master pattern (master data) and the production pattern (run-length code) substantially match using the matching NG set in step 246 in FIG. 5 or the matching degree obtained in step 248. Determine. The determination may be that the matching is OK when the matching degree is equal to or higher than a predetermined value, the matching is NG when the degree of matching is less than the predetermined value or when the matching is NG, and a defect is detected when the matching is NG.

このように、本実施の形態では、作製パターンそのものを用いてマスタパターンのマスターデータを生成している。従って、生成されたマスターデータは、製造時点の誤差や許容範囲が反映されて製造された作製パターンから、作製パターンを検査するに最適なマスターデータが作製される。このため、設計図等から生成したマスターデータを誤差や許容範囲のデータで再度調整するという煩雑な処理が不要となる。このため、マスターデータの生成が容易となる。   As described above, in the present embodiment, master data of the master pattern is generated using the fabrication pattern itself. Accordingly, the generated master data is optimal master data for inspecting the production pattern from the production pattern produced by reflecting an error at the time of production and an allowable range. For this reason, the complicated process of adjusting the master data generated from the design drawing or the like again with the data of the error or the allowable range becomes unnecessary. For this reason, it becomes easy to generate master data.

なお、本実施の形態では、マスタパターンについてランレングスコード(マスターデータ)を作製し、欠陥検出の対象となる作製パターンについて1画素毎にランレングスコードを作製しながらマスターパターンのランレングスコードと比較することによって欠陥検出を行っている。従って、マスターデータはランレングスコードとして記憶することによって圧縮されるので、1画素毎に画素データを比較して欠陥検出する方法に比べて、少ない容量で記憶することができ、ROMやRAM等の記憶装置の容量を小さくすることができる。   In the present embodiment, a run-length code (master data) is produced for the master pattern, and a run-length code is produced for each pixel of the production pattern to be detected by the defect, and compared with the run-length code of the master pattern. By doing so, defect detection is performed. Therefore, since the master data is compressed by storing it as a run-length code, it can be stored with a smaller capacity than a method of detecting defects by comparing pixel data for each pixel, such as ROM and RAM. The capacity of the storage device can be reduced.

また、1画素の画素データを読み取る毎にランレングスコードを作製または更新している。このため、欠陥検出するときには、ランレングスコード同士で比較すればよく、高速な判定が可能となる。   A run length code is created or updated every time pixel data of one pixel is read. For this reason, when detecting a defect, the run length codes may be compared with each other, and high-speed determination is possible.

さらに、ランレングスコードは水平方向と垂直方向の両方のランレングスコードが1画素毎に作製または更新される。従って、1画素の画素データを読み取る毎に水平方向と垂直方向との両方の欠陥を同時に検出することができる。   Furthermore, the run-length code is produced or updated for each pixel in both the horizontal direction and the vertical direction. Therefore, every time pixel data of one pixel is read, both horizontal and vertical defects can be detected simultaneously.

上記実施の形態では、垂直方向(縦方向)と水平方向(横方向)の直角2方向のランレングスコードを生成し使用した場合を説明した。パターンの欠陥検出は、上記のように、水平方向と垂直方向の両方のランレングスコードのみによって、どのような形状のパターンであっても検出が可能である。例えば、図8(1)に示したマスターパターン40において、一定幅の部分パターン60は中腹部分で45度方向に折れ曲がっている。このため、従来、パターン幅を検出する場合には幅計測の軸をパターンの形状に合わせて傾斜させなければならなかった。本実施の形態では、水平ランレングスコード及び垂直ランレングスコードによって全ての方向の成分を含んでいることになり、パターンの幅を検出することができる。   In the above-described embodiment, a case has been described in which run-length codes in two perpendicular directions (vertical direction (longitudinal direction) and horizontal direction (lateral direction)) are generated and used. As described above, the pattern defect can be detected with any shape pattern by using only the run length codes in both the horizontal direction and the vertical direction. For example, in the master pattern 40 shown in FIG. 8A, the partial pattern 60 having a constant width is bent in a 45 degree direction at the middle part. For this reason, conventionally, when detecting a pattern width, the axis of width measurement has to be inclined according to the shape of the pattern. In the present embodiment, the horizontal run length code and the vertical run length code include components in all directions, and the width of the pattern can be detected.

例えば、図8(1)に示すように、マスターデータ40として記憶された画像では垂直方向の画素の位置V2 については、45度方向に折れ曲がった部分パターンを含んでいる。本実施の形態では、上記で説明した垂直方向の画素の位置V1 の場合と同様に比較することができる。すなわち、水平の長さは、マスターパターンについてはE1 ,E2 ,E3 ,E4 ,E5 ,E6 ,・・・になり、作製パターン42についてはe1 ,e2 ,e3 ,e4 ,e5 ,e6 ,・・・になる。これにより、長さの対応関係は、E1 ≒e1 ,E2 ≒e2 ,E3 ≒e3 ,E4 ≒e4 ,E5 >e5 ,E6 <e6 になる。従って、これらの長さを、マスターデータから作製パターンの長さを減算した減算値から欠陥が検出できる。 For example, as shown in FIG. 8A, the image stored as the master data 40 includes a partial pattern bent in a 45-degree direction at the pixel position V 2 in the vertical direction. In the present embodiment, a comparison can be made in the same manner as in the case of the vertical pixel position V 1 described above. That is, the horizontal length is E 1 , E 2 , E 3 , E 4 , E 5 , E 6 ,... For the master pattern, and e 1 , e 2 , e 3 ,. e 4 , e 5 , e 6 ,... As a result, the correspondence relationships of the lengths are E 1 ≈e 1 , E 2 ≈e 2 , E 3 ≈e 3 , E 4 ≈e 4 , E 5 > e 5 , E 6 <e 6 . Therefore, a defect can be detected from the subtracted value obtained by subtracting the length of the production pattern from the master data.

また、上記実施の形態では、マスターパターンを含んだ基板と作製パターンを含んだ基板の位置を最初に位置合わせした場合を説明したが、上記のように縦横のランレングスコードで長さを比較するときには、画像の横ずれや伸縮に対して効果的な検出方法となる。すなわち、1画素毎に画素データを比較する場合にはマスターパターンと作製パターンとの位置合わせが必須となる。1画素でも画像がずれた場合や画像が伸縮して大きさが変化した場合には同一のパターンであっても欠陥として検出されてしまう。本実施の形態では、水平方向と垂直方向との直角2方向のランレングスコードを生成しこれらのランレングスコードを比較している。このため、各ランレングスコードの許容範囲を有するようにすれば、画像取り込み時の横ずれ、画像の伸縮が生じた場合に、精度よく欠陥を検出できる。また、パターンのみを比較するように、すなわち、例えば黒データのみによるランレングスコードを比較するようにすれば、白データ中のパターンを相対的な位置として扱うことができ、画像取り込み時の横ずれを考慮しなくてもよいことになる。   In the above embodiment, the case where the position of the substrate including the master pattern and the position of the substrate including the fabrication pattern is first aligned has been described. However, the lengths are compared using the vertical and horizontal run length codes as described above. Sometimes, this is an effective detection method for lateral shift and expansion / contraction of an image. That is, when comparing pixel data for each pixel, it is essential to align the master pattern with the production pattern. Even when the image is shifted even by one pixel or when the size of the image changes due to expansion / contraction, even the same pattern is detected as a defect. In the present embodiment, run length codes in two directions perpendicular to the horizontal direction and the vertical direction are generated, and these run length codes are compared. For this reason, if an allowable range of each run length code is set, a defect can be detected with high accuracy when a lateral shift or an image expansion or contraction occurs during image capture. In addition, if only the patterns are compared, that is, if, for example, run length codes based only on the black data are compared, the pattern in the white data can be treated as a relative position, and the lateral shift at the time of image capture can be reduced. You don't have to consider it.

なお、上記実施の形態では、撮像画像を2値化した2値化画像を用いてランレングスコードを生成する場合を説明したが、本発明は2値化に限定されるものではなく、3値またはそれ以上の値による多値画像に変換するようにしてもよい。例えば、白データ及び黒データの2値のデータに対して、それらの中間データとして灰色データを加えた3値化することができる。この3値は白データ、灰色データ及び黒データの各々について、そもそもの画像データ(アナログデータでもよくデジタルデータでもよい)を最低濃度から最高濃度までを3つに分類し、分類濃度範囲の各々に画素値を定め、画素の濃度が含まれる分類濃度範囲の画素値を、その画素の画素値と設定すればよい。一般化すれば、画像データ(アナログデータでもよくデジタルデータでもよい)を最低濃度から最高濃度までをn個に分類し、分類濃度範囲の各々に画素値mを定め、画素の濃度が含まれる分類濃度範囲の画素値を、その画素の画素値と設定すればよい。   In the above-described embodiment, the case where the run-length code is generated using the binarized image obtained by binarizing the captured image has been described. However, the present invention is not limited to binarization, and ternary Or you may make it convert into the multi-value image by the value beyond it. For example, ternary data can be obtained by adding gray data as intermediate data to binary data of white data and black data. These three values are classified into three from the lowest density to the highest density of the original image data (analog data or digital data) for each of the white data, gray data, and black data. The pixel value is determined, and the pixel value in the classified density range including the pixel density may be set as the pixel value of the pixel. If generalized, image data (analog data or digital data) is classified into n items from the lowest density to the highest density, pixel values m are set for each of the classified density ranges, and the pixel density is included. The pixel value in the density range may be set as the pixel value of that pixel.

本発明の実施の形態にかかる、欠陥検出装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the defect detection apparatus concerning embodiment of this invention. 欠陥検出装置の処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a process of a defect detection apparatus. マスターデータ作製処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a master data preparation process. ランレングス処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a run length process. マッチング処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a matching process. マスター生成処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a master production | generation process. 比較処理の流れを示すフローチャートである。It is a flowchart which shows the flow of a comparison process. 撮像画像を示したイメージ図であり、(1)はマスターパターン含んだ基準画像を示し、(2)は作製パターンを含んだ作製画像を示している。It is an image figure which showed the picked-up image, (1) shows the reference | standard image containing a master pattern, (2) has shown the preparation image containing a preparation pattern. ランレングスコードを説明するための説明図である。It is explanatory drawing for demonstrating a run length code. 仮マスターパターンと作製パターンとの各々のイメージ図、X相関の特性及びY相関の特性を示す線図である。It is a diagram which shows each image figure of a temporary master pattern and a production pattern, the characteristic of X correlation, and the characteristic of Y correlation. 仮マスターパターンと図11と異なる作製パターンとの各々のイメージ図、X相関の特性及びY相関の特性を示す線図である。It is a diagram which shows each image figure of the temporary master pattern and the production pattern different from FIG. 11, the characteristic of X correlation, and the characteristic of Y correlation. ランレングスコードのマッチングを説明するための説明図である。It is explanatory drawing for demonstrating matching of a run length code. 仮マスターパターンのランレングスコードと複数の作製パターンのランレングスコードとの対応関係を示すイメージ図である。It is an image figure which shows the correspondence of the run length code of a temporary master pattern, and the run length code of a some production pattern. 仮マスターパターンの中で設定されないランレングスコードを示すイメージ図である。It is an image figure which shows the run length code which is not set in a temporary master pattern.

符号の説明Explanation of symbols

10 欠陥検出装置
12 カメラ
14 A/D変換装置
22 演算装置
DESCRIPTION OF SYMBOLS 10 Defect detection apparatus 12 Camera 14 A / D conversion apparatus 22 Arithmetic apparatus

Claims (2)

作製した複数の物体の各々について、縦横複数の画素に分割して撮像する撮像手段と、
前記撮像手段によって撮像された複数の撮像画像の各々を画素毎に、該画素の濃度に基づいて予め定めた数値を該画素の画素値として設定する画素値設定手段と、
各画素の画素値が設定された前記撮像画像を順次1画素の画素値を読み取って所定方向に同一の画素値が連続する長さを、該同一の画素値が連続する画素数で表したランレングスコードを生成する生成手段と、
前記撮像手段によって撮像された複数の撮像画像の各々について、前記生成手段で生成されたランレングスコードに基づいて、前記所定方向のライン毎の同一画素値の総和の特性をX相関として求めると共に、求めたX相関の一致度が大きいラインについて、前記所定方向のライン毎の同一画素値の総和の特性をY相関として求めかつ求めたY相関の一致度が大きいランレングスコードの各々の位置及び長さの相関関係を求めることによって、前記撮像手段によって撮像された複数の撮像画像間におけるランレングスコードの位置及び長さの相関関係を求める相関関係演算手段と、
求めた相関関係が所定値以上のランレングスコードをマスターパターンのデータとして設定するマスター設定手段と、
を備えたマスターパターン作成装置。
For each of the plurality of produced objects, an imaging unit that divides the image into a plurality of vertical and horizontal pixels, and
Pixel value setting means for setting each of a plurality of picked-up images picked up by the image pickup means for each pixel, and a predetermined numerical value based on the density of the pixel as a pixel value of the pixel;
The captured image in which the pixel value of each pixel is set is sequentially read from the pixel value of one pixel, and a length in which the same pixel value continues in a predetermined direction is represented by the number of pixels in which the same pixel value continues. Generating means for generating a length code;
For each of a plurality of captured images captured by the imaging unit, based on the run length code generated by the generating unit, the characteristic of the sum of the same pixel values for each line in the predetermined direction is obtained as an X correlation, For the line having a high degree of coincidence of the X correlation obtained, the position and length of each run-length code having a large degree of coincidence of the Y correlation obtained by obtaining the characteristic of the sum of the same pixel values for each line in the predetermined direction as the Y correlation. by obtaining the the correlation, the correlation calculation means for obtaining a correlation between the position and length of the run length code among the plurality of images captured by the imaging means,
Master setting means for setting a run length code having a calculated correlation value equal to or greater than a predetermined value as master pattern data;
A master pattern creation device.
前記画素値設定手段は、画素の濃度を予め定めた所定濃度未満を白または該所定濃度以上を黒の何れかに分類する2値化によって画素毎に白データを表す画素値または黒データを表す画素値を設定することを特徴とする請求項1に記載のマスターパターン作成装置。   The pixel value setting means represents a pixel value or black data representing white data for each pixel by binarization that classifies the pixel density as either white when a predetermined density is lower than a predetermined density or black when the density is higher than the predetermined density. 2. The master pattern creating apparatus according to claim 1, wherein a pixel value is set.
JP2004311091A 2004-10-26 2004-10-26 Master pattern creation device Expired - Fee Related JP4734625B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004311091A JP4734625B2 (en) 2004-10-26 2004-10-26 Master pattern creation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004311091A JP4734625B2 (en) 2004-10-26 2004-10-26 Master pattern creation device

Publications (2)

Publication Number Publication Date
JP2006126946A JP2006126946A (en) 2006-05-18
JP4734625B2 true JP4734625B2 (en) 2011-07-27

Family

ID=36721676

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004311091A Expired - Fee Related JP4734625B2 (en) 2004-10-26 2004-10-26 Master pattern creation device

Country Status (1)

Country Link
JP (1) JP4734625B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5195096B2 (en) * 2008-07-09 2013-05-08 Nok株式会社 Image processing inspection method and image processing inspection system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0589286A (en) * 1991-09-30 1993-04-09 N T T Data Tsushin Kk Document picture binarizing method
JPH1074261A (en) * 1996-08-30 1998-03-17 Kokusai Gijutsu Kaihatsu Kk Pattern defect detecting device
JPH1083452A (en) * 1996-09-09 1998-03-31 Kokusai Gijutsu Kaihatsu Kk Pattern defect detecting device

Also Published As

Publication number Publication date
JP2006126946A (en) 2006-05-18

Similar Documents

Publication Publication Date Title
EP0253397B1 (en) Shape recognition method
JP4585926B2 (en) PATTERN LAYER DATA GENERATION DEVICE, PATTERN LAYER DATA GENERATION SYSTEM USING THE SAME, SEMICONDUCTOR PATTERN DISPLAY DEVICE, PATTERN LAYER DATA GENERATION METHOD, AND COMPUTER PROGRAM
CN101770582A (en) Image matching system and method
KR101227343B1 (en) Inspection system
JP4230880B2 (en) Defect inspection method
CN117274258B (en) Method, system, equipment and storage medium for detecting defects of main board image
KR20080056149A (en) System and method for generating a reference image using an unknown quality pattern
JP4734625B2 (en) Master pattern creation device
JP2011133258A (en) Three-dimensional shape measuring method and three-dimensional shape measuring instrument
JPH1083452A (en) Pattern defect detecting device
CN118628572A (en) Chip patch spatial positioning visual detection method, system and storage medium
CN112862062A (en) Learning device, learning method, and recording medium
WO2020217970A1 (en) Wire shape measurement device, wire three-dimensional image generation method, and wire shape measurement method
JP3836988B2 (en) Pattern inspection method and pattern inspection apparatus
CN111428534B (en) Decryption identification method based on dot matrix hidden writing information coding
CN117115095A (en) A method and system for detecting small defects in complex textured ceramic tiles
JP2009047458A (en) Circuit pattern inspection device and inspection method
JPH1074261A (en) Pattern defect detecting device
JP3919505B2 (en) Pattern inspection apparatus and method
JP2002277409A (en) Inspection device for pattern of printed board
JPH05129397A (en) Foreign object detection method and apparatus
Melnyk et al. Detection of defects in printed circuit boards by flood-fill algorithm and distributed cumulative histogram
Nguyen et al. Symmetrical-symbol pattern based structured light for accurate decoding
JP3751389B2 (en) Wiring pattern inspection method and apparatus
KR101786734B1 (en) Apparatus and method for thinning characters

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071012

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100621

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100629

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101026

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101227

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110308

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110407

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140513

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees