JP6035375B1 - Defect inspection apparatus and defect inspection method - Google Patents
Defect inspection apparatus and defect inspection method Download PDFInfo
- Publication number
- JP6035375B1 JP6035375B1 JP2015112327A JP2015112327A JP6035375B1 JP 6035375 B1 JP6035375 B1 JP 6035375B1 JP 2015112327 A JP2015112327 A JP 2015112327A JP 2015112327 A JP2015112327 A JP 2015112327A JP 6035375 B1 JP6035375 B1 JP 6035375B1
- Authority
- JP
- Japan
- Prior art keywords
- defect
- pixels
- row
- length
- point side
- 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.)
- Active
Links
Images
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
【課題】欠陥全体の2次元画像を取得することなく、欠陥の特徴量を求めることを可能にする欠陥検出装置、及び欠陥検査方法を提供する。【解決手段】欠陥検査装置は、検査対象物の画像を読み取るラインセンサと、前記ラインセンサから入力されたデータを2値化する2値化部と、前記2値化部により2値化されたデータをランレングス符号化するランレングス符号化部と、前記ランレングス符号を連結性処理することにより、欠陥の特徴量を測定する連結性処理部と、を有する。【選択図】図1A defect detection apparatus and a defect inspection method that can determine a feature amount of a defect without acquiring a two-dimensional image of the entire defect. A defect inspection apparatus includes a line sensor that reads an image of an inspection object, a binarization unit that binarizes data input from the line sensor, and binarization performed by the binarization unit. A run-length encoding unit that performs run-length encoding of data; and a connectivity processing unit that measures a feature quantity of a defect by performing connectivity processing on the run-length code. [Selection] Figure 1
Description
本発明は、フィルムなど連続走行する検査対象に存在する欠陥を検査するためのラインセンサを使用した欠陥検査装置、及び欠陥検査方法である。 The present invention is a defect inspection apparatus and a defect inspection method using a line sensor for inspecting defects existing in an inspection object such as a film that continuously runs.
従来、フィルムに含まれる欠陥の形状を分類するため、欠陥を検出して2次元画像を取得した後、2値化を行い、欠陥の特徴量(欠陥の周囲長、面積、幅、長さ、縦横比、面積率)を求めている。周囲長は、各連結成分の境界部分の輪郭追跡を行うことで求め、面積(S)と周囲長(L)から円形度(4πS/L2)、複雑度(L2/4πS)を求めている(特許文献1参照)。 Conventionally, in order to classify the shape of a defect included in a film, after detecting a defect and acquiring a two-dimensional image, binarization is performed, and the feature amount of the defect (peripheral length of the defect, area, width, length, (Aspect ratio, area ratio). The perimeter is obtained by tracing the contour of the boundary portion of each connected component, and the circularity (4πS / L 2 ) and complexity (L 2 / 4πS) are obtained from the area (S) and the perimeter (L). (See Patent Document 1).
図6は、周囲長を測定する従来技術を示す図である。図6は、画像処理技術として知られる輪郭追跡による周囲長を測定する技術を示している。すなわち、図6は、欠陥を検出して2次元画像を取得した後、2値化を行い、欠陥の特徴量を求める従来技術を用いて周囲長(L)を求める手法を示している。
(手順1)まず、左上からラスタスキャンを行い、欠陥の最初の画素を見つける。
(手順2)欠陥の最初の画素をスタート地点として、反時計回りに輪郭の部分を検出する。
(手順3)欠陥の最初の画素は左上からラスタスキャンしたため、スタート地点の右上、上、左上、左には欠陥の画素が無い事が確定しているので、最初に左下の部分から反時計回りに白の部分を検索し、欠陥の画素が見つかったら次の輪郭へ検索を続ける。
(手順4)最後にスタート地点に戻ったら処理は終了する。
(手順5)周囲長は、上下方向は1、斜め方向は√2としてカウントする。
このようにして、周囲長(L)が、6+10√2=20.14画素と求まる。
FIG. 6 is a diagram showing a conventional technique for measuring the perimeter. FIG. 6 shows a technique for measuring the perimeter by contour tracking, which is known as an image processing technique. That is, FIG. 6 shows a technique for obtaining a perimeter (L) using a conventional technique for obtaining a two-dimensional image by detecting a defect and performing binarization to obtain a feature amount of the defect.
(Procedure 1) First, raster scanning is performed from the upper left to find the first pixel of the defect.
(Procedure 2) A contour portion is detected counterclockwise using the first pixel of the defect as a start point.
(Procedure 3) Since the first pixel of the defect was raster scanned from the upper left, it is determined that there are no defective pixels at the upper right, upper, upper left, and left of the start point, so first counterclockwise from the lower left part If a defective pixel is found, the search continues to the next contour.
(Procedure 4) The process ends when returning to the start point at the end.
(Procedure 5) The perimeter is counted as 1 in the vertical direction and √2 in the diagonal direction.
In this way, the peripheral length (L) is obtained as 6 + 10√2 = 20.14 pixels.
従来技術は、2次元画像を取得した後、保存した2次元画像から欠陥の特徴量を求めていたため、下記に記載する各問題が生じていた。
(問題点1)測定サイズに関する問題
2次元画像のサイズ以下の欠陥しか測定できない。例えば、2次元画像のサイズが256×256画素である場合には、これ以上のサイズの欠陥を測定できない。
(問題点2)測定速度に関する問題
2次元画像はファイル容量が大きいため、取得に時間がかかる。
(問題点3)測定件数に関する問題
2次元画像のファイル容量が大きいので、1回の検査で保存できる欠陥画像数の制約がある。例えば、(株)メック製検査装置LSC6000では、標準仕様で画像数5000枚である。
(問題点4)個体の認識に関する問題
2次元画像の中に複数個の欠陥があると、どの欠陥を測定すべきかが課題となる。
(問題点5)分解能に関する問題
画素数としてカウントするため、幅分解能と流れ分解能が同じであることが前提であった。連続走行するシート検査の場合は、幅分解能と流れ分解能が異なる場合が多い。例えば、幅分解能/流れ分解能が0.5の場合は、円よりも縦横比2の細長い楕円の方が、円形度が1に近くなる。
In the prior art, after obtaining a two-dimensional image, the feature amount of the defect is obtained from the stored two-dimensional image, and thus the following problems have occurred.
(Problem 1) Problem related to measurement size Only defects smaller than the size of a two-dimensional image can be measured. For example, when the size of the two-dimensional image is 256 × 256 pixels, a defect having a size larger than this cannot be measured.
(Problem 2) Problem related to measurement speed Since a two-dimensional image has a large file capacity, it takes time to acquire it.
(Problem 3) Problems related to the number of measurements Since the file capacity of a two-dimensional image is large, there is a limitation on the number of defect images that can be stored in one inspection. For example, in the MEC inspection device LSC6000, the standard specification has 5000 images.
(Problem 4) Problems related to individual recognition When there are a plurality of defects in a two-dimensional image, it becomes a problem which defect should be measured.
(Problem 5) Resolution problem It was assumed that the width resolution and the flow resolution were the same in order to count as the number of pixels. In the case of sheet inspection that runs continuously, the width resolution and the flow resolution are often different. For example, when the width resolution / flow resolution is 0.5, a circular ellipse having an aspect ratio of 2 is closer to 1 than a circle.
本発明は上記の問題点に鑑みてなされたものであり、欠陥全体の2次元画像を取得することなく、欠陥の特徴量を求めることを可能にする欠陥検出装置、及び欠陥検査方法を提供することである。 The present invention has been made in view of the above-described problems, and provides a defect detection apparatus and a defect inspection method capable of obtaining a feature amount of a defect without acquiring a two-dimensional image of the entire defect. That is.
上記の課題を解決するために、本発明の欠陥検査装置は、検査対象物の画像を読み取るラインセンサと、前記ラインセンサから入力されたデータを2値化する2値化部と、前記2値化部により2値化されたデータをランレングス符号化するランレングス符号化部と、前記ランレングス符号を連結性処理することにより、欠陥の特徴量を測定する連結性処理部と、を有し、Pをn行目の周囲長、Paを(n−1)行目までの周囲長合計、Pa’を(n−1)行目までの右側の周囲長、Pbをn行目の右側の周囲長、Tを(n−1)行目とn行目の欠陥データが接触している画素数、bsをn行目の欠陥データの始点画素、beをn行目の欠陥データの終点画素としたときに、前記連結性処理部は、前記検査対象物の走行方向に隣接するラインで得られる欠陥の関係に応じた次の計算式(1)〜(4)に基づいて、(1)発生パターンの場合、P=2(be−bs)とし、(2)連続パターンの場合、P=Pa+Pとし、(3)収束パターンの場合、P=P+Pa’とし、(4)分散パターンの場合、P=P+Pbとし、ただし、上記計算式(2)〜(4)については、さらに、幅方向は、始点側、終点側が異なる位置の場合、P=P−2Tとし、いずれか片方が同じ位置の場合、P=P−(2T−1)とし、いずれも同じ位置の場合、P=P−(2T−2)とし、流れ方向は、始点側、終点側で、欠陥パターンが同じ位置の場合、P=P+1とし、斜めになっている場合、P=P+√2とすることにより、前記欠陥の特徴量である周囲長Pを求めることを特徴とする。 In order to solve the above problems, a defect inspection apparatus according to the present invention includes a line sensor that reads an image of an inspection object, a binarization unit that binarizes data input from the line sensor, and the binary value. and run-length encoding unit for run length encoding the binarized data by the unit, by connectivity processing the run-length code, possess a connectivity processing unit for measuring the feature amounts of the defect, the , P is the perimeter of the nth row, Pa is the sum of the perimeters up to the (n−1) th row, Pa ′ is the right perimeter of the (n−1) th row, and Pb is the right of the nth row. Perimeter, T is the number of pixels in contact with the defect data in the (n−1) th row and the nth row, bs is the start pixel of the defect data in the nth row, and be is the end pixel of the defect data in the nth row. The connectivity processing unit is obtained on a line adjacent to the traveling direction of the inspection object. Based on the following calculation formulas (1) to (4) corresponding to the relationship of defects to be generated, (1) In the case of the generated pattern, P = 2 (be-bs), and (2) in the case of the continuous pattern, P = Pa + P, (3) P = P + Pa ′ in the case of the convergence pattern, (4) P = P + Pb in the case of the dispersion pattern. However, in the above formulas (2) to (4), the width direction is further When the start point side and the end point side are different, P = P−2T, when either one is the same position, P = P− (2T−1), and when both are the same position, P = P− ( 2T-2), and the flow direction is P = P + 1 when the defect pattern is at the same position on the start point side and the end point side, and P = P + √2 when the defect pattern is slanted. The feature is to obtain a perimeter length P that is a feature amount .
上記の課題を解決するために、本発明の欠陥検査方法は、ラインセンサが、検査対象物の画像を読み取る読み取り工程と、2値化部が、前記ラインセンサから入力されたデータを2値化する2値化工程と、ランレングス符号化部が、前記2値化部により2値化されたデータをランレングス符号化するランレングス符号化工程と、連結性処理部が、前記ランレングス符号を連結性処理することにより、欠陥の特徴量を測定する連結性処理工程と、を有し、Pを周囲長、Pをn行目の周囲長、Paを(n−1)行目までの周囲長合計、Pa’を(n−1)行目までの右側の周囲長、Pbをn行目の右側の周囲長、Tを(n−1)行目とn行目の欠陥データが接触している画素数、bsをn行目の欠陥データの始点画素、beをn行目の欠陥データの終点画素としたときに、前記連結性処理工程は、前記検査対象物の走行方向に隣接するラインで得られる欠陥の関係に応じた次の計算式(1)〜(4)に基づいて、(1)発生パターンの場合、P=2(be−bs)とし、(2)連続パターンの場合、P=Pa+Pとし、(3)収束パターンの場合、P=P+Pa’とし、(4)分散パターンの場合、P=P+Pbとし、ただし、上記計算式(2)〜(4)については、さらに、幅方向は、始点側、終点側が異なる位置の場合、P=P−2Tとし、いずれか片方が同じ位置の場合、P=P−(2T−1)とし、いずれも同じ位置の場合、P=P−(2T−2)とし、流れ方向は、始点側、終点側で、欠陥パターンが同じ位置の場合、P=P+1とし、斜めになっている場合、P=P+√2とすることにより、前記欠陥の特徴量である周囲長Pを求めることを特徴とする。 In order to solve the above-described problems, the defect inspection method of the present invention includes a reading step in which a line sensor reads an image of an inspection object, and a binarization unit binarizes data input from the line sensor. A binarizing step, a run-length encoding unit that performs run-length encoding on the data binarized by the binarizing unit, and a connectivity processing unit that converts the run-length code by treating connectivity, surrounding possess a connection processing step of measuring the characteristic of the defect, a circumferential length of P, the peripheral length of the n-th row, the Pa (n-1) to row P The total length, Pa ′ is the peripheral length on the right side to the (n−1) th line, Pb is the peripheral length on the right side of the nth line, and T is the defect data on the (n−1) th line and the nth line. The number of pixels, bs is the starting pixel of the defect data in the nth row, and be is the defect data in the nth row. Based on the following calculation formulas (1) to (4) according to the relationship of defects obtained in the line adjacent to the traveling direction of the inspection object, 1) P = 2 (be-bs) for the generated pattern, (2) P = Pa + P for the continuous pattern, (3) P = P + Pa ′ for the convergent pattern, and (4) the dispersion pattern In this case, P = P + Pb. However, in the above formulas (2) to (4), the width direction is P = P−2T when the start point side and the end point side are different, and either one is the same. In the case of the position, P = P− (2T−1), and in the case where both are the same position, P = P− (2T−2). The flow direction is the start point side and the end point side, and the defect pattern is the same position. In this case, P = P + 1, and if it is slanted, P = P + √2. Thus, the perimeter length P which is the feature amount of the defect is obtained .
本発明によれば、欠陥全体の2次元画像を取得することなく、連結性処理により欠陥の特徴量を求めることにより、上記各問題点を以下のように解決できる。
(問題点1)測定サイズに関する問題
幅方向はラインセンサの素子数の範囲である。採用するラインセンサは、2048〜8192素子がある。流れ方向は、64ビットでカウントしているので、実用上制約はほとんどない。
(問題点2)測定速度に関する問題
大容量の画像保存を行わないので、高速処理ができる。
(問題点3)測定件数に関する問題
大容量の画像保存を行わない場合は、多数の欠陥の測定ができる。例えば、(株)メック製検査装置LSC6000では、標準仕様で20万個である。
(問題点4)個体の認識に関する問題
個体の認識と同時に測定するので、どの欠陥を検出しているのか明確である。
(問題点5)分解能に関する問題
幅分解能と流れ分解能が異なる場合でも対応可能である。
そのため、欠陥全体の2次元画像を取得することなく、欠陥の特徴量を求めることを可能にする欠陥検出装置、及び欠陥検査方法を提供することができる。
According to the present invention, the above-described problems can be solved as follows by obtaining the feature amount of a defect by connectivity processing without acquiring a two-dimensional image of the entire defect.
(Problem 1) Problem concerning measurement size The width direction is the range of the number of elements of the line sensor. There are 2048-8192 elements as the line sensor to be adopted. Since the flow direction is counted by 64 bits, there is almost no practical limitation.
(Problem 2) Measurement speed problem Since large-capacity image storage is not performed, high-speed processing is possible.
(Problem 3) Problems related to the number of measurements When a large-capacity image is not stored, a large number of defects can be measured. For example, in the MEC inspection device LSC6000, the standard specification is 200,000.
(Problem 4) Problems related to individual recognition Since measurement is performed simultaneously with individual recognition, it is clear which defect is detected.
(Problem 5) Resolution problem It is possible to cope with the case where the width resolution and the flow resolution are different.
Therefore, it is possible to provide a defect detection apparatus and a defect inspection method that can obtain the feature amount of a defect without acquiring a two-dimensional image of the entire defect.
以下、図面を参照しながら本発明の実施形態について詳細に説明する。
[欠陥検査装置の構成]
図1は、本発明の検査装置の一実施例を示す図である。
本実施形態による欠陥検査装置は、ライン照明1、ラインセンサ3、第1の欠陥検出部4、画像抽出部5、及び第2の欠陥検出部6を含んで構成されている。
本実施形態による欠陥検査装置は、走行中のシート状の検査対象物2を、ライン照明1で照明し、ラインセンサ3で撮像し、第1の欠陥検出部4で欠陥検出を行う。また、検出した欠陥座標に基づき画像抽出部5で欠陥を中心とした画像を抽出し、その画像データに基づいて第2の欠陥検出部6で詳細な欠陥測定を行い、欠陥分類を行っている。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[Configuration of defect inspection equipment]
FIG. 1 is a diagram showing an embodiment of an inspection apparatus according to the present invention.
The defect inspection apparatus according to the present embodiment includes a
The defect inspection apparatus according to the present embodiment illuminates the traveling sheet-
ライン照明1は、検査対象物2上における光の照射範囲の長手方向が検査対象物2の走行方向に対して直交する方向に配置されたライン状の照明装置である。
The
検査対象物2は、連続シート状のフィルム、金属板、布、不織布、樹脂板等であり、本実施形態ではフィルムを一例として以下に説明する。検査対象物2は、搬送方向に対して長尺のものが好ましく、固定されたラインセンサ3に対して、検査対象物2をその長さ方向に走行させながら検査することが好ましい。
The
ラインセンサ3は、撮像範囲の長手方向が検査対象物2の走行方向に対して直交する方向に配置されたライン状の光センサである。
ラインセンサ3は、検査対象物2からの反射光または透過光を受光し、検査対象物2の表面の色調の濃淡に応じた電気信号(欠陥データ)を第1の欠陥検出部4に供給する。言い換えると、ラインセンサ3は、検査対象物2の走行方向に対して直交する方向におけるライン(以下、検査ライン)単位で、検査対象物2の表面の光強度分布に応じた電気信号を出力する。ラインセンサ3としては、例えば、CMOSカメラ、CCDカメラが挙げられる。
ラインセンサ3は、例えば素子数2048〜8192素子のものが用いられる。検査装置として使用する素子数と台数は、検査対象の幅、走行速度、分解能、設置スペースなどにより選択している。
なお、図示する例では、ラインセンサ3を、ライン照明1と同じく検査対象物2の表面側に配置し、検査対象物2からの反射光を受光する構成としている。しかし、ライン照明1から照射され、検査対象物2を透過した透過光をラインセンサ3が受光する構成としてもよい。
The
The
For example, the
In the illustrated example, the
第1の欠陥検出部4は、2値化部11、ランレングス符号化部12、及び連結性処理部13を含んで構成されている。
2値化部11は、欠陥データを不図示の閾値設定部により設定された第1閾値th1(明→暗)、及び第2閾値th2(暗→明)に基づいて2値化する。
閾値設定部には、検査対象物2の材質、厚さ等に応じて、欠陥検査に先行して予め外部から第1閾値th1(明→暗)、及び第2閾値th2(暗→明)が設定される。
2値化部11における検出論理には2種類ある。2値化部11は、明欠陥を検出する場合、第2閾値th2より大きい出力レベルを有する領域を”1”とし、暗欠陥を検出する場合、第1閾値th1より小さいレベルを有する領域を”1”とする。つまり、2値化部11による2値化により、欠陥部に相当する領域が”1”、正常部に相当する領域が”0”となる。
The first
The
The threshold value setting unit has a first threshold value th1 (bright → dark) and a second threshold value th2 (dark → bright) from the outside in advance of defect inspection according to the material, thickness, and the like of the
There are two types of detection logic in the
ランレングス符号化部12は、2値化部11による2値化データの”0”から”1”、或いは”1”から”0”への変化点のアドレスを得るため、2値化データをランレングス符号化する。
連結性処理部13は、ランレングス符号化部12によりランレングス符号化されたランレングス符号に対して連結性処理を実行する。ここで、連結性処理とは、複数の連続する走査ラインにおける欠陥データをライン間で比較しつつ処理することをいう。この連結性処理を行うことによって、検査対象物の欠陥を認識し、欠陥の形態に起因した特徴を測定できる。
The run-
The
以上説明した構成により、第1の欠陥検出部4は、ラインセンサ3から入力された欠陥データを予め決められた閾値で2値化を行い、欠陥データ圧縮後、連結性処理を行い、欠陥の特徴量(欠陥の形状の特徴を表す情報。例えば欠陥の周囲長、面積、幅、長さ、縦横比、面積率)を測定している。本発明では、この段階で欠陥の周囲長を測定し、円形度、複雑度を求めている。なお、第1の欠陥検出部4として、(株)メック製画像処理装置LSC600を使用することができる。
With the configuration described above, the first
画像抽出部5は、第1の欠陥検出部4が検出した欠陥座標に基づき欠陥を中心とした画像を抽出する。
第2の欠陥検出部6は、画像抽出部5が抽出した画像データに基づいて詳細な欠陥測定を行い、欠陥分類を行っている。第2の欠陥検出部6としては、例えば、Windows(登録商標)PCを使用し、特許文献1に記載の様にMVTec社製の画像処理ライブラリHALCON(登録商標)などを使用することもできる。
The
The second
図2は、第1の欠陥検出部で行っている連結性処理の内容を説明するための図である。図2に示すように、連続する2行分の欠陥データは、5種類のパターン(発生パターン、連続パターン、収束パターン、分散パターン、消滅パターン)に分類される。
(1)発生パターン
(n−1)行目の欠陥データと、n行目で発生した欠陥データが接触していないパターンである。ここから、この欠陥の測定を行う。
(2)連続パターン
(n−1)行目の欠陥データが、n行目で発生した欠陥データと接触している。ここでは、両者のデータを加算する。
(3)収束パターン
(n−1)行目の複数の欠陥データ(図2では2個)が、n行目で発生した1つの欠陥データと接触している。ここでは、(n−1)行目の複数番目(図2では2番目)のデータとn行目のデータとを加算する。
(4)分散パターン
(n−1)行目の1つの欠陥データが、n行目で発生した複数の欠陥データ(図2では2個)と接触している。(n−1)行目のデータと加算されたn行目の左のデータと、n行目の右のデータとを加算する。
(5)消滅パターン
(n−1)行目の1つの欠陥データが、n行目の欠陥データと接触していない。ここで、この欠陥の測定は終了する。
FIG. 2 is a diagram for explaining the contents of the connectivity process performed by the first defect detection unit. As shown in FIG. 2, the defect data for two consecutive rows is classified into five types of patterns (occurrence pattern, continuous pattern, convergence pattern, dispersion pattern, disappearance pattern).
(1) Occurrence pattern This is a pattern in which the defect data in the (n-1) th row is not in contact with the defect data generated in the nth row. From here, this defect is measured.
(2) Continuous pattern The defect data in the (n-1) th row is in contact with the defect data generated in the nth row. Here, both data are added.
(3) Convergence pattern A plurality of defect data (two in FIG. 2) in the (n-1) th row is in contact with one defect data generated in the nth row. Here, a plurality of (n−1) th row data (second in FIG. 2) data and the nth row data are added.
(4) Dispersion pattern One defect data in the (n-1) th row is in contact with a plurality of defect data (two in FIG. 2) generated in the nth row. (N-1) The left data in the nth row added to the data in the row and the right data in the nth row are added.
(5) Annihilation pattern One defect data in the (n-1) th row is not in contact with the defect data in the nth row. Here, the measurement of this defect ends.
図3は、本発明の周囲長測定方法を示す図である。図3は、図2で説明した各パターンで周囲長を測定する計算方法を説明するための図である。
(1)発生パターン
n行目の欠陥データの始点画素bs、終点画素beの場合、1行分の周囲長P(画素)を、次式で求める。
P=2(be−bs)
なお、周囲長P(mm)は、幅方向分解能H(mm/画素)の場合、次式で求まる。
P=2(be−bs)H
(2)連続パターン
(n−1)行目までの周囲長合計Paとn行目の周囲長Pを合計する。
(n−1)行目とn行目の欠陥データが接触している画素数Tの場合、幅方向は、始点側/終点側が異なる位置の場合は2T、いずれか片方が同じ位置の場合は(2T−1)、いずれも同じ位置の場合は(2T−2)を減算する。流れ方向は、始点側、終点側で、欠陥パターンが同じ位置の場合は、1を加算する。斜めになっている場合は、√2を加算する。
なお、mm単位では、流れ方向分解能V(mm/画素)の場合、欠陥パターンが同じ位置の場合は、Vを加算する。斜めになっている場合は、(√(H2+V2))を加算する。
(3)収束パターン
(n−1)行目の左側の周囲長合計Paとn行目の周囲長Pを合計することは処理済みである。(n−1)行目の右側の周囲長Pa’とn行目の周囲長Pを合計する。
終点側で、欠陥パターンが同じ位置の場合は、1を加算する。始点側で欠陥パターンが同じ位置の場合は無い。斜めになっている場合は、√2を加算する。
なお、mm単位では、流れ方向分解能V(mm/画素)の場合、欠陥パターンが同じ位置の場合は、Vを加算する。また、斜めになっている場合は、(√(H2+V2))を加算する。
(4)分散パターン
(n−1)行目までの周囲長合計Paとn行目の左側の周囲長Pを合計することは処理済みである。n行目の左側までの周囲長Pとn行目の右側の周囲長Pbを合計する。
終点側で、欠陥パターンが同じ位置の場合は、1を加算する。始点側で欠陥パターンが同じ位置の場合は無い。斜めになっている場合は、√2を加算する。
なお、mm単位では、流れ方向分解能V(mm/画素)の場合、欠陥パターンが同じ位置の場合は、Vを加算する。斜めになっている場合は、(√(H2+V2))を加算する。
FIG. 3 is a diagram showing a method for measuring the perimeter of the present invention. FIG. 3 is a diagram for explaining a calculation method for measuring the perimeter of each pattern described in FIG.
(1) Generation Pattern In the case of the start point pixel bs and end point pixel be of the defect data on the nth row, the perimeter length P (pixel) for one row is obtained by the following equation.
P = 2 (be-bs)
The peripheral length P (mm) is obtained by the following equation in the case of the width direction resolution H (mm / pixel).
P = 2 (be-bs) H
(2) Continuous pattern (n-1) Total perimeter Pa up to the line and total perimeter P of the nth line are summed.
(N-1) In the case of the number T of pixels in which the defect data in the row and the n-th row are in contact, the width direction is 2T when the start point side / end point side is different, and when either one is the same position (2T-1), if both are at the same position, (2T-2) is subtracted. When the flow direction is the start point side and the end point side and the defect patterns are at the same position, 1 is added. If it is slanted, add √2.
In addition, in the mm unit, when the flow direction resolution is V (mm / pixel), V is added when the defect pattern is at the same position. If it is slanted, (√ (H2 + V2)) is added.
(3) Convergence pattern (n-1) Summing the perimeter length Pa on the left side of the row and the perimeter length P of the nth row has been processed. (N-1) The perimeter length Pa ′ on the right side of the row and the perimeter length P of the nth row are summed.
When the defect pattern is at the same position on the end point side, 1 is added. There is no case where the defect pattern is at the same position on the start point side. If it is slanted, add √2.
In addition, in the mm unit, when the flow direction resolution is V (mm / pixel), V is added when the defect pattern is at the same position. Further, if it is slanted, (√ (H2 + V2)) is added.
(4) Dispersion pattern (n-1) Summing up the perimeter length Pa up to the row and the perimeter length P on the left side of the nth row has been processed. The peripheral length P up to the left side of the nth row and the peripheral length Pb on the right side of the nth row are summed.
When the defect pattern is at the same position on the end point side, 1 is added. There is no case where the defect pattern is at the same position on the start point side. If it is slanted, add √2.
In addition, in the mm unit, when the flow direction resolution is V (mm / pixel), V is added when the defect pattern is at the same position. If it is slanted, (√ (H2 + V2)) is added.
図4は、図6に示す欠陥パターンの処理手順を示す図である。図4においては、走行方向における1行目〜8行目に生じる欠陥パターンをステップ(1)〜(10)で表している。図4は、図3に示したパターンを全て含んでいる。
[ステップ(1)]
ステップ(1)は発生である。
2行目の欠陥データは1画素のため、周囲長は0画素である。
[ステップ(2)]
ステップ(2)はステップ(1)との連続である。
ステップ(2)の欠陥データは2画素のため、周囲長は2画素である。
ステップ(1)の欠陥データは0画素、ステップ(2)の欠陥データは2画素であるので、周囲長の合計は2画素である。2行(2行目と3行目)が接触している部分は1(=T)画素であり、いずれか片方が同じ位置であるので、減算は1(=2T−1)画素である。始点側は斜めであるので√2画素を加算する。また、終点側は垂直であるので1画素を加算する。これにより、ステップ(2)により、周囲長は、2+√2(=2−1+√2+1)画素となる。
[ステップ(3)]
ステップ(3)は発生である。
ステップ(3)の欠陥データは1画素のため、周囲長は0画素である。
[ステップ(4)]
ステップ(4)はステップ(2)との連続である。
ステップ(4)の欠陥データは4画素のため、周囲長は6画素である。
ステップ(2)の欠陥データは2+√2画素、ステップ(4)の欠陥データは6画素であるので、周囲長の合計は8+√2画素である。2行(3行目と4行目)が接触している部分は2(=T)画素であり、始点側/終点側が異なる位置であるので、減算は4(=2T)画素である。始点側は斜めであるので√2画素を加算する。また、終点側は斜めであるので√2画素を加算する。これにより、ステップ(4)により、周囲長は、4+3√2(=2+√2+6−4+√2+√2)画素となる。
[ステップ(5)]
ステップ(5)はステップ(3)との収束である。
3行目の左側の周囲長合計と4行目の周囲長を合計することは処理済みである。
3行目の右側の周囲長0画素と、4行目の周囲長(4+3√2)画素を合計して、ステップ(5)とステップ(3)の周囲長の合計値は、4+3√2画素である。
また、始点側、終点側とも斜めであるので、2√2画素を加算する。これにより、ステップ(5)により、周囲長は、4+5√2(=4+3√2+2√2)画素となる。
FIG. 4 is a diagram showing a processing procedure of the defect pattern shown in FIG. In FIG. 4, the defect patterns generated in the first to eighth rows in the traveling direction are represented by steps (1) to (10). FIG. 4 includes all the patterns shown in FIG.
[Step (1)]
Step (1) is generation.
Since the defect data in the second row is one pixel, the perimeter is 0 pixel.
[Step (2)]
Step (2) is continuous with step (1).
Since the defect data in step (2) is 2 pixels, the peripheral length is 2 pixels.
Since the defect data in step (1) is 0 pixel and the defect data in step (2) is 2 pixels, the total perimeter is 2 pixels. The portion where the second row (second row and third row) is in contact is 1 (= T) pixels, and one of them is at the same position, so the subtraction is 1 (= 2T-1) pixels. Since the starting point side is diagonal, √2 pixels are added. Since the end point is vertical, one pixel is added. As a result, the peripheral length becomes 2 + √2 (= 2-1 + √2 + 1) pixels by step (2).
[Step (3)]
Step (3) is generation.
Since the defect data in step (3) is 1 pixel, the peripheral length is 0 pixel.
[Step (4)]
Step (4) is continuous with step (2).
Since the defect data in step (4) is 4 pixels, the perimeter is 6 pixels.
Since the defect data in step (2) is 2 + √2 pixels and the defect data in step (4) is 6 pixels, the total perimeter is 8 + √2 pixels. Since the portion where the second row (the third row and the fourth row) is in contact is 2 (= T) pixels, and the start point side / end point side are different positions, the subtraction is 4 (= 2T) pixels. Since the starting point side is diagonal, √2 pixels are added. Further, since the end point side is oblique, √2 pixels are added. As a result, in step (4), the perimeter becomes 4 + 3√2 (= 2 + √2 + 6−4 + √2 + √2) pixels.
[Step (5)]
Step (5) is convergence with step (3).
The sum of the perimeter of the left side of the third row and the perimeter of the fourth row has been processed.
The peripheral length 0 pixels on the right side of the third row and the peripheral length (4 + 3√2) pixels of the fourth row are summed, and the total value of the peripheral lengths of step (5) and step (3) is 4 + 3√2 pixels It is.
Since both the start point side and the end point side are diagonal, 2√2 pixels are added. As a result, the perimeter becomes 4 + 5√2 (= 4 + 3√2 + 2√2) pixels in step (5).
[ステップ(6)]
ステップ(6)はステップ(5)との連続である。
ステップ(6)の欠陥データは5画素のため、周囲長は8画素である。
ステップ(5)の欠陥データは4+5√2画素、ステップ(6)の欠陥データは8画素であるので、周囲長の合計は12+5√2画素である。2行(4行目と5行目)が接触している部分は4(=T)画素であり、いずれか片方が同じ位置であるので、減算は7(=2T−1)画素である。始点側は垂直であるので1画素を加算する。また、終点側は斜めであるので√2画素を加算する。これにより、ステップ(6)により、周囲長は、6+6√2(=4+5√2+8−7+1+√2)画素となる。
[ステップ(7)]
ステップ(7)はステップ(6)との連続である。
ステップ(7)の欠陥データは6画素のため、周囲長は10画素である。
ステップ(6)の欠陥データは6+6√2画素、ステップ(7)の欠陥データは10画素であるので、周囲長の合計は16+6√2画素である。2行(5行目と6行目)が接触している部分は5(=T)画素であり、いずれか片方が同じ位置であるので、減算は9(=2T−1)画素である。始点側は斜めであるので√2画素を加算する。また、終点側は垂直であるので1画素を加算する。これにより、ステップ(7)により、周囲長は、8+7√2(=6+6√2+10−9+√2+1)画素となる。
[Step (6)]
Step (6) is continuous with step (5).
Since the defect data in step (6) is 5 pixels, the perimeter is 8 pixels.
Since the defect data in step (5) is 4 + 5√2 pixels and the defect data in step (6) is 8 pixels, the total perimeter is 12 + 5√2 pixels. The portion where the second row (the fourth row and the fifth row) is in contact is 4 (= T) pixels, and one of them is at the same position, so the subtraction is 7 (= 2T-1) pixels. Since the start point side is vertical, one pixel is added. Further, since the end point side is oblique, √2 pixels are added. As a result, in step (6), the perimeter becomes 6 + 6√2 (= 4 + 5√2 + 8−7 + 1 + √2) pixels.
[Step (7)]
Step (7) is continuous with step (6).
Since the defect data in step (7) is 6 pixels, the peripheral length is 10 pixels.
Since the defect data in step (6) is 6 + 6√2 pixels and the defect data in step (7) is 10 pixels, the total perimeter is 16 + 6√2 pixels. The portion where the second row (the fifth row and the sixth row) is in contact is 5 (= T) pixels, and one of them is at the same position, so the subtraction is 9 (= 2T-1) pixels. Since the starting point side is diagonal, √2 pixels are added. Since the end point is vertical, one pixel is added. Thus, the peripheral length becomes 8 + 7√2 (= 6 + 6√2 + 10−9 + √2 + 1) pixels by the step (7).
[ステップ(8)]
ステップ(8)はステップ(7)との連続である。
ステップ(8)の欠陥データは2画素のため、周囲長は2画素である。
ステップ(7)の欠陥データは8+7√2画素、ステップ(8)の欠陥データは2画素であるので、周囲長の合計は10+7√2画素である。2行(6行目と7行目)が接触している部分は2(=T)画素であり、始点側/終点側が異なる位置であるので、減算は4(=2T)画素である。始点側は斜めであるので√2画素を加算する。また、終点側は斜めであるので√2画素を加算する。これにより、ステップ(8)により、周囲長は、6+9√2(=8+7√2+2−4+√2+√2)画素となる。
[ステップ(9)]
ステップ(9)はステップ(8)との分散である。
6行目までの周囲長合計と7行目の左側の周囲長を合計することは処理済みである。
7行目の左側までの周囲長6+9√2画素と、7行目の右側の周囲長0画素を合計して、周囲長は、6+9√2画素である。また、始点側は斜めであるので√2画素を加算する。また、終点側は垂直であるので1画素を加算する。これにより、ステップ(9)により、周囲長は、6+10√2画素となる。
[Step (8)]
Step (8) is continuous with step (7).
Since the defect data in step (8) is 2 pixels, the peripheral length is 2 pixels.
Since the defect data in step (7) is 8 + 7√2 pixels and the defect data in step (8) is 2 pixels, the total perimeter is 10 + 7√2 pixels. The portion where the second row (the sixth row and the seventh row) is in contact is 2 (= T) pixels, and since the start point side / end point side are different positions, the subtraction is 4 (= 2T) pixels. Since the starting point side is diagonal, √2 pixels are added. Further, since the end point side is oblique, √2 pixels are added. Thereby, the perimeter becomes 6 + 9√2 (= 8 + 7√2 + 2 + 4 + √2 + √2) pixels by step (8).
[Step (9)]
Step (9) is a variance with step (8).
Summing the total perimeter up to the sixth line and the left perimeter of the seventh line has been processed.
The peripheral length of 6 + 9√2 pixels to the left side of the seventh row and the peripheral length of 0 pixels on the right side of the seventh row are totaled, and the peripheral length is 6 + 9√2 pixels. Further, since the starting point side is oblique, √2 pixels are added. Since the end point is vertical, one pixel is added. Thereby, the perimeter becomes 6 + 10√2 pixels by step (9).
[ステップ(10)]
ステップ(10)は消滅である。
ステップ(10)による周囲長は、図6で示す従来技術と同じく6+10√2画素となる。
[Step (10)]
Step (10) is extinction.
The perimeter of step (10) is 6 + 10√2 pixels as in the prior art shown in FIG.
すなわち、本実施形態における第1の欠陥検出部4が欠陥全体の2次元欠陥画像を取得することなく、連結性処理部13によって欠陥データをライン毎に算出することにより、欠陥の特徴量である周囲長(L)を測定することが可能となる。
なお、連結性処理部13は、ステップ(1)〜ステップ(10)における欠陥データを、ライン毎に順番に0+1、1+2、3+1、4+4、8+5、13+6、19+2、21+1と加算していくことにより、欠陥の特徴量である面積(S)=22画素を測定することが可能となる。これにより、連結性処理部13は、円形度4πS/L2=0.68を算出することができる。
このように、連結性処理部13は、検査対象物2の走行方向に隣接するラインで得られる欠陥の関係に応じた計算式に基づいて、欠陥の特徴量(周囲長、面積など)を計算する処理を走行方向に順に行う。
That is, the first
The
As described above, the
図5は、幅/流れ分解能が異なる場合を示す図である。
図5(A)は、円形状の欠陥を(幅部分解能/流れ分解能=1)で読み取った場合を示し、図5(B)は、同じ円形状の欠陥を(幅/流れ分解能=0.5)で読み取った場合を示している。
以下、図5(A)、図5(B)に示す欠陥パターンの処理手順を説明する。
(図5(A)に示す欠陥パターンの処理手順)
なお、図5(A)においては、走行方向における1行目〜12行目に生じる欠陥パターンをステップ(1)〜(11)で表している。
[ステップ(1)]
ステップ(1)は発生である。
2行目の欠陥データは4画素のため、周囲長は6画素である。
[ステップ(2)]
ステップ(2)はステップ(1)との連続である。
ステップ(2)の欠陥データは8画素のため、周囲長は14画素である。
ステップ(1)の欠陥データは6画素、ステップ(2)の欠陥データは14画素であるので、周囲長の合計は20画素である。2行(2行目と3行目)が接触している部分は4(=T)画素であり、始点側/終点側が異なる位置であるので、減算は8(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(2)により、周囲長は、12+2√2(=6+14−8+2√2)画素となる。
[ステップ(3)]
ステップ(3)はステップ(2)との連続である。
ステップ(3)の欠陥データは8画素のため、周囲長は14画素である。
ステップ(2)の欠陥データは12+2√2画素、ステップ(3)の欠陥データは14画素であるので、周囲長の合計は26+2√2画素である。2行(3行目と4行目)が接触している部分は8(=T)画素であり、いずれもが8(=T)画素であるので、減算は14(=2T−2)画素である。始点側、終点側ともに垂直であるので2画素を加算する。これにより、ステップ(3)により、周囲長は、14+2√2(=12+2√2+14−14+2)画素となる。
FIG. 5 is a diagram showing a case where the width / flow resolution is different.
FIG. 5A shows a case where a circular defect is read at (width resolution / flow resolution = 1), and FIG. 5B shows the same circular defect (width / flow resolution = 0.0). 5) shows the case of reading.
Hereinafter, the processing procedure of the defect pattern shown in FIGS. 5A and 5B will be described.
(Defect pattern processing procedure shown in FIG. 5A)
In FIG. 5A, the defect patterns generated in the first to twelfth lines in the traveling direction are represented by steps (1) to (11).
[Step (1)]
Step (1) is generation.
Since the defect data in the second row is 4 pixels, the peripheral length is 6 pixels.
[Step (2)]
Step (2) is continuous with step (1).
Since the defect data in step (2) is 8 pixels, the peripheral length is 14 pixels.
Since the defect data in step (1) is 6 pixels and the defect data in step (2) is 14 pixels, the total perimeter is 20 pixels. The portion where the second row (the second row and the third row) is in contact is 4 (= T) pixels, and the start point side / end point side is a different position, so the subtraction is 8 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. As a result, the peripheral length becomes 12 + 2√2 (= 6 + 14−8 + 2√2) pixels by the step (2).
[Step (3)]
Step (3) is continuous with step (2).
Since the defect data in step (3) is 8 pixels, the peripheral length is 14 pixels.
Since the defect data in step (2) is 12 + 2√2 pixels and the defect data in step (3) is 14 pixels, the total perimeter is 26 + 2√2 pixels. Since the portion where the second row (the third row and the fourth row) is in contact is 8 (= T) pixels and both are 8 (= T) pixels, subtraction is 14 (= 2T-2) pixels. It is. Since both the start point side and the end point side are vertical, two pixels are added. As a result, the perimeter becomes 14 + 2√2 (= 12 + 2√2 + 14-14 + 2) pixels in step (3).
[ステップ(4)]
ステップ(4)はステップ(3)との連続である。
ステップ(4)の欠陥データは10画素のため、周囲長は18画素である。
ステップ(3)の欠陥データは14+2√2画素、ステップ(4)の欠陥データは18画素であるので、周囲長の合計は32+2√2画素である。2行(4行目と5行目)が接触している部分は8(=T)画素であり、始点側/終点側が異なる位置であるので、減算は16(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(4)により、周囲長は、16+4√2(=14+2√2+18−16+2√2)画素となる。
[ステップ(5)]
ステップ(5)はステップ(4)との連続である。
ステップ(5)の欠陥データは10画素のため、周囲長は18画素である。
ステップ(4)の欠陥データは16+4√2画素、ステップ(5)の欠陥データは18画素であるので、周囲長の合計は34+4√2画素である。2行(5行目と6行目)が接触している部分は10(=T)画素であり、いずれもが10(=T)画素であるので、減算は18(=2T−2)画素である。始点側、終点側ともに垂直であるので2画素を加算する。これにより、ステップ(5)により、周囲長は、18+4√2(=16+4√2+18−18+2)画素となる。
[ステップ(6)]
ステップ(6)はステップ(5)との連続である。
ステップ(6)の欠陥データは10画素のため、周囲長は18画素である。
ステップ(5)の欠陥データは18+4√2画素、ステップ(6)の欠陥データは18画素であるので、周囲長の合計は36+4√2画素である。2行(6行目と7行目)が接触している部分は10(=T)画素であり、いずれもが10(=T)画素であるので、減算は18(=2T−2)画素である。始点側、終点側ともに垂直であるので2画素を加算する。これにより、ステップ(6)により、周囲長は、20+4√2(=18+4√2+18−18+2)画素となる。
[ステップ(7)]
ステップ(7)はステップ(6)との連続である。
ステップ(7)の欠陥データは10画素のため、周囲長は18画素である。
ステップ(6)の欠陥データは20+4√2画素、ステップ(7)の欠陥データは18画素であるので、周囲長の合計は38+4√2画素である。2行(7行目と8行目)が接触している部分は10(=T)画素であり、いずれもが10(=T)画素であるので、減算は18(=2T−2)画素である。始点側、終点側ともに垂直であるので2画素を加算する。これにより、ステップ(7)により、周囲長は、22+4√2(=20+4√2+18−18+2)画素となる。
[Step (4)]
Step (4) is continuous with step (3).
Since the defect data in step (4) is 10 pixels, the perimeter is 18 pixels.
Since the defect data in step (3) is 14 + 2√2 pixels and the defect data in step (4) is 18 pixels, the total perimeter is 32 + 2√2 pixels. The portion where the second row (the fourth row and the fifth row) is in contact is 8 (= T) pixels, and since the start point side / end point side are different positions, the subtraction is 16 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. As a result, the perimeter becomes 16 + 4√2 (= 14 + 2√2 + 18−16 + 2√2) pixels by step (4).
[Step (5)]
Step (5) is continuous with step (4).
Since the defect data in step (5) is 10 pixels, the perimeter is 18 pixels.
Since the defect data in step (4) is 16 + 4√2 pixels and the defect data in step (5) is 18 pixels, the total perimeter is 34 + 4√2 pixels. Since the portion where the second row (the fifth row and the sixth row) is in contact is 10 (= T) pixels, and both are 10 (= T) pixels, the subtraction is 18 (= 2T-2) pixels. It is. Since both the start point side and the end point side are vertical, two pixels are added. Thus, the peripheral length becomes 18 + 4√2 (= 16 + 4√2 + 18−18 + 2) pixels by the step (5).
[Step (6)]
Step (6) is continuous with step (5).
Since the defect data in step (6) is 10 pixels, the peripheral length is 18 pixels.
Since the defect data in step (5) is 18 + 4√2 pixels and the defect data in step (6) is 18 pixels, the total perimeter is 36 + 4√2 pixels. Since the portion where the second row (the sixth row and the seventh row) is in contact is 10 (= T) pixels, and both are 10 (= T) pixels, the subtraction is 18 (= 2T-2) pixels. It is. Since both the start point side and the end point side are vertical, two pixels are added. Thus, the perimeter becomes 20 + 4√2 (= 18 + 4√2 + 18−18 + 2) pixels by step (6).
[Step (7)]
Step (7) is continuous with step (6).
Since the defect data in step (7) is 10 pixels, the perimeter is 18 pixels.
Since the defect data in step (6) is 20 + 4√2 pixels and the defect data in step (7) is 18 pixels, the total perimeter is 38 + 4√2 pixels. Since the portion where the second row (the seventh row and the eighth row) is in contact is 10 (= T) pixels and both are 10 (= T) pixels, the subtraction is 18 (= 2T-2) pixels. It is. Since both the start point side and the end point side are vertical, two pixels are added. Thereby, the perimeter becomes 22 + 4√2 (= 20 + 4√2 + 18−18 + 2) pixels by step (7).
[ステップ(8)]
ステップ(8)はステップ(7)との連続である。
ステップ(8)の欠陥データは8画素のため、周囲長は14画素である。
ステップ(7)の欠陥データは22+4√2画素、ステップ(8)の欠陥データは14画素であるので、周囲長の合計は36+4√2画素である。2行(8行目と9行目)が接触している部分は8(=T)画素であり、始点側/終点側が異なる位置であるので、減算は16(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(8)により、周囲長は、20+6√2(=22+4√2+14−16+2√2)画素となる。
[ステップ(9)]
ステップ(9)はステップ(8)との連続である。
ステップ(9)の欠陥データは8画素のため、周囲長は14画素である。
ステップ(8)の欠陥データは20+6√2画素、ステップ(9)の欠陥データは14画素であるので、周囲長の合計は34+6√2画素である。2行(9行目と10行目)が接触している部分は8(=T)画素であり、いずれもが8(=T)画素であるので、減算は14(=2T−2)画素である。始点側、終点側ともに垂直であるので2画素を加算する。これにより、ステップ(9)により、周囲長は、22+6√2(=20+6√2+14−14+2)画素となる。
[ステップ(10)]
ステップ(10)はステップ(9)との連続である。
ステップ(10)の欠陥データは4画素のため、周囲長は6画素である。
ステップ(9)の欠陥データは22+6√2画素、ステップ(10)の欠陥データは6画素であるので、周囲長の合計は28+6√2画素である。2行(10行目と11行目)が接触している部分は4(=T)画素であり、始点側/終点側が異なる位置であるので、減算は8(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(10)により、周囲長は、20+8√2(=22+6√2+6−8+2√2)画素となる。
[Step (8)]
Step (8) is continuous with step (7).
Since the defect data in step (8) is 8 pixels, the peripheral length is 14 pixels.
Since the defect data in step (7) is 22 + 4√2 pixels and the defect data in step (8) is 14 pixels, the total perimeter is 36 + 4√2 pixels. The portion where the second row (the eighth row and the ninth row) is in contact is 8 (= T) pixels, and since the start point side / end point side are different positions, the subtraction is 16 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. As a result, in step (8), the perimeter becomes 20 + 6√2 (= 22 + 4√2 + 14-16 + 2√2) pixels.
[Step (9)]
Step (9) is continuous with step (8).
Since the defect data in step (9) is 8 pixels, the perimeter is 14 pixels.
Since the defect data in step (8) is 20 + 6√2 pixels and the defect data in step (9) is 14 pixels, the total perimeter is 34 + 6√2 pixels. Since the portion where the second row (the ninth row and the tenth row) is in contact is 8 (= T) pixels, and both are 8 (= T) pixels, the subtraction is 14 (= 2T-2) pixels. It is. Since both the start point side and the end point side are vertical, two pixels are added. As a result, the perimeter becomes 22 + 6√2 (= 20 + 6√2 + 14-14 + 2) pixels in step (9).
[Step (10)]
Step (10) is continuous with step (9).
Since the defect data in step (10) is 4 pixels, the perimeter is 6 pixels.
Since the defect data in step (9) is 22 + 6√2 pixels and the defect data in step (10) is 6 pixels, the total perimeter is 28 + 6√2 pixels. The portion where the second row (the tenth row and the eleventh row) is in contact is 4 (= T) pixels, and since the start point side / end point side are different positions, the subtraction is 8 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. As a result, in step (10), the perimeter becomes 20 + 8√2 (= 22 + 6√2 + 6−8 + 2√2) pixels.
[ステップ(11)]
ステップ(11)は消滅である。
ステップ(11)による周囲長は、20+8√2画素となる。
すなわち、本実施形態における第1の欠陥検出部4が欠陥全体の2次元欠陥画像を取得することなく、連結性処理部13によって欠陥データをライン毎に算出することにより、欠陥の特徴量である周囲長(L)=31.312(=20+8√2)画素を測定することが可能となる。
また、連結性処理部13は、ステップ(1)〜ステップ(11)における欠陥データを、ライン毎に順番に0+4、4+8、12+8、20+10、30+10、40+10、50+10、60+8、68+8、76+4と加算していくことにより、欠陥の特徴量である面積(S)=80画素を測定することが可能となる。
これにより、連結性処理部13は、円形度4πS/L2=1.025を算出することができる。
すなわち、図5(A)に示す直径10画素の円の場合、面積80画素、周囲長31.312画素であるので、円形度は、1.025となる。
[Step (11)]
Step (11) is extinction.
The perimeter of step (11) is 20 + 8√2 pixels.
That is, the first
In addition, the
Thereby, the
That is, in the case of a circle having a diameter of 10 pixels as shown in FIG. 5A, the area is 80 pixels and the peripheral length is 31.312 pixels, so the circularity is 1.025.
(図5(B)に示す欠陥パターンの処理手順)
図5(B)においては、走行方向における1行目〜7行目に生じる欠陥パターンをステップ(1)〜(6)で表している。
[ステップ(1)]
ステップ(1)は発生である。
2行目の欠陥データは6画素のため、周囲長は10画素である。
[ステップ(2)]
ステップ(2)はステップ(1)との連続である。
ステップ(2)の欠陥データは8画素のため、周囲長は14画素である。
ステップ(1)の欠陥データは10画素、ステップ(2)の欠陥データは14画素であるので、周囲長の合計は24画素である。2行(2行目と3行目)が接触している部分は6(=T)画素であり、始点側/終点側が異なる位置であるので、減算は12(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(2)により、周囲長は、12+2√2(=14+10−12+2√2)画素となる。
[ステップ(3)]
ステップ(3)はステップ(2)との連続である。
ステップ(3)の欠陥データは10画素のため、周囲長は18画素である。
ステップ(2)の欠陥データは12+2√2画素、ステップ(3)の欠陥データは18画素であるので、周囲長の合計は30+2√2画素である。2行(3行目と4行目)が接触している部分は8(=T)画素であり、始点側/終点側が異なる位置であるので、減算は16(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(3)により、周囲長は、14+4√2(=12+2√2+18−16+2√2)画素となる。
(Defect pattern processing procedure shown in FIG. 5B)
In FIG. 5B, the defect patterns generated in the first to seventh rows in the traveling direction are represented by steps (1) to (6).
[Step (1)]
Step (1) is generation.
Since the defect data in the second row is 6 pixels, the perimeter is 10 pixels.
[Step (2)]
Step (2) is continuous with step (1).
Since the defect data in step (2) is 8 pixels, the peripheral length is 14 pixels.
Since the defect data in step (1) is 10 pixels and the defect data in step (2) is 14 pixels, the total perimeter is 24 pixels. The portion where the second row (second row and third row) is in contact is 6 (= T) pixels, and the start point side / end point side is a different position, so the subtraction is 12 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. As a result, the peripheral length becomes 12 + 2√2 (= 14 + 10−12 + 2√2) pixels by the step (2).
[Step (3)]
Step (3) is continuous with step (2).
Since the defect data in step (3) is 10 pixels, the perimeter is 18 pixels.
Since the defect data in step (2) is 12 + 2√2 pixels and the defect data in step (3) is 18 pixels, the total perimeter is 30 + 2√2 pixels. Since the portion where the second row (the third row and the fourth row) is in contact is 8 (= T) pixels, and the start point side / end point side are different positions, the subtraction is 16 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. Thus, the peripheral length becomes 14 + 4√2 (= 12 + 2√2 + 18−16 + 2√2) pixels by the step (3).
[ステップ(4)]
ステップ(4)はステップ(3)との連続である。
ステップ(4)の欠陥データは8画素のため、周囲長は14画素である。
ステップ(3)の欠陥データは14+4√2画素、ステップ(4)の欠陥データは14画素であるので、周囲長の合計は28+4√2画素である。2行(4行目と5行目)が接触している部分は8(=T)画素であり、始点側/終点側が異なる位置であるので、減算は16(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(4)により、周囲長は、12+6√2(=14+4√2+14−16+2√2)画素となる。
[ステップ(5)]
ステップ(5)はステップ(4)との連続である。
ステップ(5)の欠陥データは6画素のため、周囲長は10画素である。
ステップ(4)の欠陥データは12+6√2画素、ステップ(5)の欠陥データは10画素であるので、周囲長の合計は22+6√2画素である。2行(5行目と6行目)が接触している部分は6(=T)画素であり、始点側/終点側が異なる位置であるので、減算は12(=2T)画素である。始点側、終点側ともに斜めであるので2√2画素を加算する。これにより、ステップ(5)により、周囲長は、10+8√2(=12+6√2+10−12+2√2)画素となる。
[Step (4)]
Step (4) is continuous with step (3).
Since the defect data in step (4) is 8 pixels, the perimeter is 14 pixels.
Since the defect data in step (3) is 14 + 4√2 pixels and the defect data in step (4) is 14 pixels, the total perimeter is 28 + 4√2 pixels. The portion where the second row (the fourth row and the fifth row) is in contact is 8 (= T) pixels, and since the start point side / end point side are different positions, the subtraction is 16 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. Thus, the peripheral length becomes 12 + 6√2 (= 14 + 4√2 + 14-16 + 2√2) pixels by the step (4).
[Step (5)]
Step (5) is continuous with step (4).
Since the defect data in step (5) is 6 pixels, the peripheral length is 10 pixels.
Since the defect data in step (4) is 12 + 6√2 pixels and the defect data in step (5) is 10 pixels, the total perimeter is 22 + 6√2 pixels. Since the portion where the second row (the fifth row and the sixth row) is in contact is 6 (= T) pixels, and the start point side / end point side are different positions, the subtraction is 12 (= 2T) pixels. Since both the starting point side and the ending point side are diagonal, 2√2 pixels are added. As a result, the perimeter becomes 10 + 8√2 (= 12 + 6√2 + 10−12 + 2√2) pixels in step (5).
[ステップ(6)]
ステップ(6)は消滅である。
ステップ(6)による周囲長は、10+8√2画素となる。
すなわち、本実施形態における第1の欠陥検出部4が欠陥全体の2次元欠陥画像を取得することなく、連結性処理部13によって欠陥データをライン毎に算出することにより、欠陥の特徴量である周囲長(L)=21.312(=10+8√2)画素を測定することが可能となる。
また、連結性処理部13は、ステップ(1)〜ステップ(6)における欠陥データを、ライン毎に順番に0+6、6+8、14+10、24+8、32+6と加算していくことにより、欠陥の特徴量である面積(S)=38画素を測定することが可能となる。
これにより、連結性処理部13は、円形度4πS/L2=1.050を算出することができる。
すなわち、図5(B)に示す流れ方向の画素数が5画素の円の場合、面積38画素、周囲長21.312画素であるので、円形度は、1.050となる。このとき、同じ幅で長さが2倍の欠陥は、図5(A)と同じ画像になるので、円形度としては、後者の方が円と判断される。
[Step (6)]
Step (6) is extinction.
The perimeter of step (6) is 10 + 8√2 pixels.
That is, the first
Further, the
Thereby, the
That is, when the number of pixels in the flow direction shown in FIG. 5B is a circle of 5 pixels, the circularity is 1.050 because the area is 38 pixels and the peripheral length is 21.212 pixels. At this time, since the defect having the same width and double length becomes the same image as that in FIG. 5A, the latter is determined to be a circle as the circularity.
また、従来技術においては、画素数としてカウントするため、幅分解能と流れ分解能が同じであることが前提であった。これに対し本願では、幅分解能と流れ分解能が異なる場合でも対応可能である。
このように、連結性処理部13による欠陥検査では、分解能に対応した処理により、円形度をリアルタイムに算出できる。これにより、面積や幅、長さの分類では十分に行うことが出来なかった欠陥の分類(例えば、ムシとムシ以外の異物との分類)を、第2の欠陥検出部6による欠陥検査に先んじて行うことができる。
In the prior art, since the number of pixels is counted, it is assumed that the width resolution and the flow resolution are the same. In contrast, in the present application, even when the width resolution and the flow resolution are different, it is possible to cope.
Thus, in the defect inspection by the
このように、本発明の欠陥検査装置は、検査対象物2の画像を読み取るラインセンサ3と、ラインセンサ3から入力されたデータを2値化する2値化部11と、2値化部11により2値化されたデータをランレングス符号化するランレングス符号化部12と、ランレングス符号を連結性処理することにより、欠陥の特徴量を測定する連結性処理部13と、を有する。
As described above, the defect inspection apparatus of the present invention includes a
本発明によれば、欠陥全体の2次元画像を取得することなく、欠陥の特徴量を求めることを可能にする欠陥検出装置、及び欠陥検査方法を提供することができる。 According to the present invention, it is possible to provide a defect detection apparatus and a defect inspection method that can determine a feature amount of a defect without acquiring a two-dimensional image of the entire defect.
以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to
1…ライン照明、2…検査対象物、3…ラインセンサ、4…第1の欠陥検出部、5…画像抽出部、6…第2の欠陥検出部、11…2値化部、12…ランレングス符号化部、13…連結性処理部
DESCRIPTION OF
Claims (2)
前記ラインセンサから入力されたデータを2値化する2値化部と、
前記2値化部により2値化されたデータをランレングス符号化するランレングス符号化部と、
前記ランレングス符号を連結性処理することにより、欠陥の特徴量を測定する連結性処理部と、
を有し、
Pをn行目の周囲長、Paを(n−1)行目までの周囲長合計、Pa’を(n−1)行目までの右側の周囲長、Pbをn行目の右側の周囲長、Tを(n−1)行目とn行目の欠陥データが接触している画素数、bsをn行目の欠陥データの始点画素、beをn行目の欠陥データの終点画素としたときに、
前記連結性処理部は、前記検査対象物の走行方向に隣接するラインで得られる欠陥の関係に応じた次の計算式(1)〜(4)に基づいて、
(1)発生パターンの場合、P=2(be−bs)とし、
(2)連続パターンの場合、P=Pa+Pとし、
(3)収束パターンの場合、P=P+Pa’とし、
(4)分散パターンの場合、P=P+Pbとし、
ただし、上記計算式(2)〜(4)については、さらに、
幅方向は、
始点側、終点側が異なる位置の場合、P=P−2Tとし、
いずれか片方が同じ位置の場合、P=P−(2T−1)とし、
いずれも同じ位置の場合、P=P−(2T−2)とし、
流れ方向は、
始点側、終点側で、欠陥パターンが同じ位置の場合、P=P+1とし、
斜めになっている場合、P=P+√2とすることにより、
前記欠陥の特徴量である周囲長Pを求めることを特徴とする欠陥検査装置。 A line sensor that reads an image of the inspection object;
A binarization unit for binarizing data input from the line sensor;
A run-length encoding unit that performs run-length encoding on the data binarized by the binarization unit;
A connectivity processing unit for measuring a feature quantity of a defect by performing connectivity processing on the run-length code;
I have a,
P is the perimeter length of the nth row, Pa is the total perimeter length to the (n-1) th row, Pa 'is the circumference length of the right side to the (n-1) th row, and Pb is the circumference of the right side of the nth row Length, T is the number of pixels in contact with the defect data in the (n−1) th row and the nth row, bs is the start pixel of the defect data in the nth row, and be is the end pixel of the defect data in the nth row. When
The connectivity processing unit is based on the following calculation formulas (1) to (4) corresponding to the relationship of defects obtained in a line adjacent to the traveling direction of the inspection object.
(1) In the case of an occurrence pattern, P = 2 (be-bs),
(2) For a continuous pattern, P = Pa + P,
(3) In the case of a convergence pattern, P = P + Pa ′
(4) In the case of a dispersion pattern, P = P + Pb,
However, for the above formulas (2) to (4),
The width direction is
When the start point side and the end point side are different positions, P = P−2T,
If either one is in the same position, P = P- (2T-1)
If both are in the same position, P = P− (2T−2)
The flow direction is
When the defect pattern is at the same position on the start point side and end point side, P = P + 1,
If it is slanted, by setting P = P + √2,
A defect inspection apparatus characterized by obtaining a perimeter length P which is a feature amount of the defect.
2値化部が、前記ラインセンサから入力されたデータを2値化する2値化工程と、
ランレングス符号化部が、前記2値化部により2値化されたデータをランレングス符号化するランレングス符号化工程と、
連結性処理部が、前記ランレングス符号を連結性処理することにより、欠陥の特徴量を測定する連結性処理工程と、
を有し、
Pをn行目の周囲長、Paを(n−1)行目までの周囲長合計、Pa’を(n−1)行目までの右側の周囲長、Pbをn行目の右側の周囲長、Tを(n−1)行目とn行目の欠陥データが接触している画素数、bsをn行目の欠陥データの始点画素、beをn行目の欠陥データの終点画素としたときに、
前記連結性処理工程は、前記検査対象物の走行方向に隣接するラインで得られる欠陥の関係に応じた次の計算式(1)〜(4)に基づいて、
(1)発生パターンの場合、P=2(be−bs)とし、
(2)連続パターンの場合、P=Pa+Pとし、
(3)収束パターンの場合、P=P+Pa’とし、
(4)分散パターンの場合、P=P+Pbとし、
ただし、上記計算式(2)〜(4)については、さらに、
幅方向は、
始点側、終点側が異なる位置の場合、P=P−2Tとし、
いずれか片方が同じ位置の場合、P=P−(2T−1)とし、
いずれも同じ位置の場合、P=P−(2T−2)とし、
流れ方向は、
始点側、終点側で、欠陥パターンが同じ位置の場合、P=P+1とし、
斜めになっている場合、P=P+√2とすることにより、
前記欠陥の特徴量である周囲長Pを求めることを特徴とする欠陥検査方法。 A reading process in which the line sensor reads an image of the inspection object;
A binarization step in which the binarization unit binarizes the data input from the line sensor;
A run-length encoding step in which the run-length encoding unit performs run-length encoding on the data binarized by the binarization unit;
A connectivity processing step for measuring a feature quantity of a defect by performing connectivity processing on the run-length code; and
I have a,
P is the perimeter length of the nth row, Pa is the total perimeter length to the (n-1) th row, Pa 'is the circumference length of the right side to the (n-1) th row, and Pb is the circumference of the right side of the nth row Length, T is the number of pixels in contact with the defect data in the (n−1) th row and the nth row, bs is the start pixel of the defect data in the nth row, and be is the end pixel of the defect data in the nth row. When
The connectivity processing step is based on the following calculation formulas (1) to (4) corresponding to the relationship of defects obtained in a line adjacent to the traveling direction of the inspection object.
(1) In the case of an occurrence pattern, P = 2 (be-bs),
(2) For a continuous pattern, P = Pa + P,
(3) In the case of a convergence pattern, P = P + Pa ′
(4) In the case of a dispersion pattern, P = P + Pb,
However, for the above formulas (2) to (4),
The width direction is
When the start point side and the end point side are different positions, P = P−2T,
If either one is in the same position, P = P- (2T-1)
If both are in the same position, P = P− (2T−2)
The flow direction is
When the defect pattern is at the same position on the start point side and end point side, P = P + 1,
If it is slanted, by setting P = P + √2,
A defect inspection method characterized by obtaining a perimeter length P which is a feature amount of the defect.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015112327A JP6035375B1 (en) | 2015-06-02 | 2015-06-02 | Defect inspection apparatus and defect inspection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015112327A JP6035375B1 (en) | 2015-06-02 | 2015-06-02 | Defect inspection apparatus and defect inspection method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6035375B1 true JP6035375B1 (en) | 2016-11-30 |
JP2016223975A JP2016223975A (en) | 2016-12-28 |
Family
ID=57419932
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015112327A Active JP6035375B1 (en) | 2015-06-02 | 2015-06-02 | Defect inspection apparatus and defect inspection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6035375B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP7172537B2 (en) * | 2018-12-11 | 2022-11-16 | 株式会社島津製作所 | Imaging analyzer |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS52114355A (en) * | 1976-03-22 | 1977-09-26 | Jeol Ltd | Apparatus for and method of analyzing image |
JPS63217479A (en) * | 1987-03-06 | 1988-09-09 | Hitachi Ltd | Analyzing device for particle image |
JPH05322538A (en) * | 1992-05-25 | 1993-12-07 | Mazda Motor Corp | Image processing method |
JPH05332950A (en) * | 1992-05-26 | 1993-12-17 | Mitsubishi Rayon Co Ltd | Defect inspection instrument |
JPH0682385A (en) * | 1992-09-01 | 1994-03-22 | Mitsubishi Rayon Co Ltd | Defect inspection device |
JPH1011589A (en) * | 1996-06-26 | 1998-01-16 | Hitachi Cable Ltd | Picture processing method |
JP2011089834A (en) * | 2009-10-21 | 2011-05-06 | Mec:Kk | Defect inspection apparatus and method of inspecting defect |
JP2014106141A (en) * | 2012-11-28 | 2014-06-09 | Mecc Co Ltd | Defect inspection device and defect inspection method |
-
2015
- 2015-06-02 JP JP2015112327A patent/JP6035375B1/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS52114355A (en) * | 1976-03-22 | 1977-09-26 | Jeol Ltd | Apparatus for and method of analyzing image |
JPS63217479A (en) * | 1987-03-06 | 1988-09-09 | Hitachi Ltd | Analyzing device for particle image |
JPH05322538A (en) * | 1992-05-25 | 1993-12-07 | Mazda Motor Corp | Image processing method |
JPH05332950A (en) * | 1992-05-26 | 1993-12-17 | Mitsubishi Rayon Co Ltd | Defect inspection instrument |
JPH0682385A (en) * | 1992-09-01 | 1994-03-22 | Mitsubishi Rayon Co Ltd | Defect inspection device |
JPH1011589A (en) * | 1996-06-26 | 1998-01-16 | Hitachi Cable Ltd | Picture processing method |
JP2011089834A (en) * | 2009-10-21 | 2011-05-06 | Mec:Kk | Defect inspection apparatus and method of inspecting defect |
JP2014106141A (en) * | 2012-11-28 | 2014-06-09 | Mecc Co Ltd | Defect inspection device and defect inspection method |
Also Published As
Publication number | Publication date |
---|---|
JP2016223975A (en) | 2016-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5174540B2 (en) | Wood defect detection device | |
JP5074998B2 (en) | Appearance inspection method and apparatus for transparent film | |
JP2013134666A (en) | Binary image generation device, classification device, binary image generation method, and classification method | |
KR101146081B1 (en) | Detection of macro-defects using micro-inspection inputs | |
JP6035375B1 (en) | Defect inspection apparatus and defect inspection method | |
JP6628185B2 (en) | Inspection method for transparent objects | |
JP6035124B2 (en) | Defect inspection apparatus and defect inspection method | |
JP2017142219A (en) | Image inspection device, image inspection program, recording medium readable by computer and recording apparatus | |
JPH0210461B2 (en) | ||
JP2016217989A (en) | Defect inspection device and defect inspection method | |
JP2007081513A (en) | Blot defect detecting method for solid-state imaging element | |
JP6666171B2 (en) | Defect inspection equipment | |
JP4956077B2 (en) | Defect inspection apparatus and defect inspection method | |
JP2010038759A (en) | Surface flaw inspecting method, surface flaw inspecting device, steel plate manufacturing method and steel plate manufacturing apparatus | |
JP5889426B1 (en) | Web inspection device, web inspection method, web inspection program | |
KR20090121612A (en) | Method and apparatus for automatic detecting quality defects for corrugated board | |
JP6173088B2 (en) | Inspection device, inspection method, program, and recording medium | |
TWI493177B (en) | Method of detecting defect on optical film with periodic structure and device thereof | |
JP2021148678A (en) | Defect detection device and defect detection method | |
JP5346304B2 (en) | Appearance inspection apparatus, appearance inspection system, and appearance inspection method | |
JP6185539B2 (en) | Optical connector ferrule end face inspection device and inspection program | |
JP2005265828A (en) | Flaw detection method and apparatus | |
JP2021064215A (en) | Surface property inspection device and surface property inspection method | |
JP2004286708A (en) | Defect detection apparatus, method, and program | |
JP2005165482A (en) | Defect detecting method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20161018 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20161031 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6035375 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |