JP4734625B2 - Master pattern creation device - Google Patents
Master pattern creation device Download PDFInfo
- 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
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).
ところが、欠陥を検出するために用いるマスターパターンの作成は、検出の基準となるため、検出精度が高いものを予め用意しなければならなかった。このため、設計図や製作図等の図面からマスターパターンを作成し、用いていた。
しかしながら、上記のように、マスターパターンを図面から作成する場合には、製造上の誤差を考慮しなければならず、煩雑な作業を必要としていた。また、マスターパターンの画像データは全ての画素について予め記憶しなければならないため、マスターパターンの作成に膨大な処理を必要としていた。 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
撮像手段では、複数の物体が撮像され、各々の物体は、生成手段によりランレングスコードが生成される。例えば、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
また、所定方向のライン毎に相関関係を求めることができた場合であっても、そのライン上の画素が連続する方向、すなわち所定方向に位置ずれがあった場合には、これを解消できない。このため、請求項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
以上説明したように本発明によれば、生成手段により所定方向に連続する同一画素値の画素数で表したランレングスコードが複数の物体の各々について生成され、相関関係演算手段により複数の各物体の間におけるランレングスコードの位置及び長さの相関関係が求められ、相関関係が所定値以上のランレングスコードがマスターパターンのデータとしてマスター設定手段により設定されるので、複数の物体そのものから、煩雑な作業や膨大な処理を必要とすることなく、マスタパターンを作成することができる、という効果がある。 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
なお、A/D変換装置14は、カメラ12から出力されたアナログ信号を2値のデジタル信号に変換するためのものであるが、カメラ12から出力されたアナログ信号を2値化したデジタル信号(2値化データ)を出力するようにしてもよい。すなわち、カメラ12からの出力信号であるアナログ信号を2値のデジタル信号に変換するための2値化装置として構成してもよい。
The A /
次に、本実施の形態の作用を説明する。 Next, the operation of the present embodiment will be described.
演算装置22では電源が投入されると図2の処理ルーチンが実行され、ステップ100へ進む。
When the power is turned on in the
図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
例えば、図8(1)に示すように、パターン40を撮像した画像50を得る設置位置を記憶する。この設置位置はモータ16にエンコーダを取り付けて、エンコーダによって表されたデータを位置データとして記憶すればよい。 なお、本実施の形態では、全ての作製パターンのうち複数(予め定めた数)の作製パターンをサンプルとして設定しているが、全ての作製パターンをサンプルとして設定してもよい。
For example, as shown in FIG. 8A, the installation position where the
次のステップ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
次のステップ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
次に、図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
一方、ステップ210で肯定判断の場合には、ステップ212へ進む。このステップ212では、上記のようにしてランレングス処理が施された所定数のサンプルのうち1つのサンプルを仮マスターパターンとして設定する。すなわち、作製パターンのサンプルの1つを仮マスターパターンとして設定する。
On the other hand, if the determination at
次に、ステップ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
なお、上記サンプル画像50は、階調画像としてモニタ20に表示してもよく、2値化画像として表示するようにしてもよい。
The
次に、図3のステップ204の詳細を説明する。図3のステップ204において、ランレングス処理が実行されると、図4のランレングス処理ルーチンが実行される。
Next, details of
ランレングス処理を説明するにあたり、本実施の形態におけるランレングスコードの定義について説明する。 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
サンプル画像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
水平方向と同様に、図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
このように、本実施の形態では、白データまたは黒データが連続する画素数をデータとする水平ランレングスコード及び垂直ランレングスコードによりランレングスコードを構成する。 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
次のステップ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
なお、この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 (
図11には、サンプル画像50と、サンプル画像50に略一致するパターンが僅かに縮小したマッチング用のサンプル画像54とを示した。図11(2)の紙面右方のX相関の特性74から、各特性は略相似関係にある事が理解される。これにより、ラインに沿う方向と交差する方向にずれたラインが対応される。
FIG. 11 shows a
次のステップ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
次のステップ234では、仮マスターパターンとマッチング用のサンプルjの各々の間で対応するラインを設定する。すなわち、上記ステップ230でX相関の特性で最も一致度が高い位置のラインを、仮マスターパターンとマッチング用のサンプルとの間で対応させる。図10の例では、各々の間で相対的に位置関係のみが異なるのであるため、各ラインはその全てが1対1に対応できる。また、図11の例では、マッチング用のサンプル画像54は僅かに縮小されているので、1対1の位置のラインに対応されない。すなわち、ライン数が同一であるときは、仮マスターパターンの画像50のライン80は、マッチング用のサンプル画像54のライン82に対応されるべきであるが、X相関の特性から縮小方向のライン84が対応されることになる。
In the
次に、ステップ238では、Y相関の特性の特性を用いてライン方向の大まかな位置合わせを行って、上記ステップ236で設定されたラインについてマッチング検査をするランレングスコードを設定する。次のステップ240では、設定したランレングスコードについて、仮マスターパターンとサンプルとの間の重複領域を導出する。この重複領域とは、設定したライン上のランレングスコードを、仮マスターパターンとサンプルとについて重ねたときに重複する領域をいう。すなわち、このステップ240は、ライン上でマッチングすべきランレングスコードには重複領域が存在するということを想定しているためである。
Next, in
次のステップ242では、導出した重複領域が存在するか否かを判断し、重複領域が存在しない(図12(2)参照)ときは、仮マスターパターンとサンプルとの間で一致したランレングスコードが存在しないと判断し(ステップ242で否定判断)、ステップ246へ進みマッチングNGと決定する。一方、重複領域が存在するときは、ステップ242で肯定判断され、次のステップ244において仮マスターパターンに対してサンプルが複数の重複領域が存在するか否かを判断する。複数の重複領域が存在するときはステップ244で肯定され、ステップ246へ進む。仮マスターパターンに対してサンプルが複数の重複領域が存在する場合とは、図12(3)に示すように、仮マスターパターンの1つのランレングスコードに対して複数のランレングスコードが属するということである。すなわち、本来1対1に対応すべきランレングスコードに複数のランレングスコードが対応するので、マッチングはなされていない。このため、ステップ246でマッチングNGと決定する。
In the
一方、図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
このようにして所定数のサンプルについてマッチング処理が終了すると、各サンプルについてのマッチング度が求められることになる。これらの複数のマッチング度を用いて、マスターパターンが生成される(図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
次のステップ266では、上記ステップ264で求めたばらつきの値が予め定めた所定値未満の値か否かを判断することによって、ばらつきが小さいか否かを判断し、ばらつきの値が所定値以上の値のときは信頼性が低いためステップ266で否定され、ステップ272へ進む。ステップ272では仮マスターパターンとして設定したサンプルのランレングスコードをマスターデータとして決定することなく、すなわち、未決定状態(図14参照)でステップ276へ進む。
In the next step 266, it is determined whether or not the variation value obtained in
一方、ばらつきの値が所定値未満の値でありステップ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
設定されていないランレングスコードが存在するときは、ステップ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
次に、図2のステップ106の詳細を説明する。図2のステップ106において、比較処理が実行されると、図7の比較処理ルーチンが実行される。
Next, details of
図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
次のステップ156では、作製パターンを撮像した画像52の1画素について上記説明したランレングス処理を行い(図4参照)、作製パターンを撮像した画像52についてのランレングスコードとマスターデータのランレングスコードとを次のステップ158で比較する。
In the next step 156, the above-described run length processing is performed on one pixel of the
例えば、図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
また、マスターデータ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
そこで、図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
なお、本実施の形態では、マスターパターン(マスターデータ)と作製パターン(ランレングスコード)を、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
このように、本実施の形態では、作製パターンそのものを用いてマスタパターンのマスターデータを生成している。従って、生成されたマスターデータは、製造時点の誤差や許容範囲が反映されて製造された作製パターンから、作製パターンを検査するに最適なマスターデータが作製される。このため、設計図等から生成したマスターデータを誤差や許容範囲のデータで再度調整するという煩雑な処理が不要となる。このため、マスターデータの生成が容易となる。 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
例えば、図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
また、上記実施の形態では、マスターパターンを含んだ基板と作製パターンを含んだ基板の位置を最初に位置合わせした場合を説明したが、上記のように縦横のランレングスコードで長さを比較するときには、画像の横ずれや伸縮に対して効果的な検出方法となる。すなわち、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.
10 欠陥検出装置
12 カメラ
14 A/D変換装置
22 演算装置
DESCRIPTION OF
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.
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)
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)
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 |
-
2004
- 2004-10-26 JP JP2004311091A patent/JP4734625B2/en not_active Expired - Fee Related
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 |