JP3509581B2 - Appearance inspection method - Google Patents

Appearance inspection method

Info

Publication number
JP3509581B2
JP3509581B2 JP30279298A JP30279298A JP3509581B2 JP 3509581 B2 JP3509581 B2 JP 3509581B2 JP 30279298 A JP30279298 A JP 30279298A JP 30279298 A JP30279298 A JP 30279298A JP 3509581 B2 JP3509581 B2 JP 3509581B2
Authority
JP
Japan
Prior art keywords
stripe
image
value
pixel
detected
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 - Lifetime
Application number
JP30279298A
Other languages
Japanese (ja)
Other versions
JP2000132685A (en
Inventor
肇 直原
満 白澤
剛 増田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP30279298A priority Critical patent/JP3509581B2/en
Publication of JP2000132685A publication Critical patent/JP2000132685A/en
Application granted granted Critical
Publication of JP3509581B2 publication Critical patent/JP3509581B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、縦・横・斜めの直
線、波線あるいは同心円状等の規則的な縞模様を有する
検査対象物の縞部分に発生する曲がり・とぎれ・ピッチ
の違いといった欠陥を画像処理を用いて検出する外観検
査方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to defects such as bends, breaks, and differences in pitch that occur in a striped portion of an inspection target having a regular striped pattern such as vertical, horizontal, or diagonal straight lines, wavy lines, or concentric circles. The present invention relates to a visual inspection method for detecting an image using image processing.

【0002】[0002]

【従来の技術】従来、被検査物の表面に発生する欠陥を
検出する方法として、特開平3−175343号に開示
された技術が知られている。この従来技術では、被検査
物の表面に適当な照明を照射して、テレビカメラにより
被検査物の表面を撮像し、得られた原画像に対して微分
処理を含む画像処理を施して、被検査物の輪郭線を抽出
し、この輪郭線の内側に発生する濃淡変化部分を欠陥と
して検出している。
2. Description of the Related Art Conventionally, a technique disclosed in Japanese Patent Laid-Open No. 3-175343 has been known as a method for detecting defects occurring on the surface of an object to be inspected. In this conventional technique, the surface of the object to be inspected is irradiated with appropriate illumination, the surface of the object to be inspected is imaged by a television camera, and the obtained original image is subjected to image processing including differential processing to obtain the object. The contour line of the inspection object is extracted, and the shade change portion occurring inside this contour line is detected as a defect.

【0003】[0003]

【発明が解決しようとする課題】被検査物の表面がほぼ
均一な濃度の場合には上述の従来技術により検査が可能
であったが、被検査物の表面に縞などの模様が存在する
場合、その縞模様自体に発生する曲がり・とぎれ・ピッ
チの違いなどの欠陥を抽出することは困難である。
When the surface of the object to be inspected has a substantially uniform density, the above-mentioned conventional technique was able to perform the inspection, but when the surface of the object to be inspected has a pattern such as stripes. However, it is difficult to extract defects such as bends, breaks, and pitch differences that occur in the striped pattern itself.

【0004】本発明はこのような点に鑑みてなされたも
のであり、その目的とするところは、縞模様を有する被
検査物の縞部分に発生する欠陥を検出できる外観検査方
法を提供することにある。
The present invention has been made in view of the above circumstances, and an object thereof is to provide a visual inspection method capable of detecting a defect occurring in a striped portion of an inspection object having a striped pattern. It is in.

【0005】[0005]

【課題を解決するための手段】本発明は、図1に示すよ
うな縞模様を有する検査対象物の縞部分に発生する欠陥
を検出するための検査方法であって、検査対象物を撮像
する工程と、撮像により得られた濃淡画像に対して少な
くとも微分処理を含む前処理を施して濃淡変化を特徴抽
出した画像を取得する工程と、特徴抽出された良品の画
像に対して、縞と交わるように予め設定された縞探索ラ
イン上を走査して縞の成分画素を検出し、検出された縞
の成分画素を起点として縞の成分画素を追跡処理するこ
とにより縞の特徴ラインを背景から分離して抽出する工
程と、良品の画像から抽出された縞の特徴ラインを被検
査対象画像に対する検査ラインとし、検査ラインに沿っ
て被検査対象画像を検査することによって欠陥を検出す
る工程とを有することを特徴とするものである。
The present invention is an inspection method for detecting a defect occurring in a striped portion of an inspection object having a striped pattern as shown in FIG. Steps, a step of performing preprocessing including at least differentiation processing on the grayscale image obtained by imaging to obtain an image in which the grayscale change is feature-extracted, and the feature-extracted non-defective image intersects with stripes The stripe feature line is separated from the background by scanning the stripe search line set in advance so as to detect the stripe component pixel, and by tracking the stripe component pixel starting from the detected stripe component pixel. And a step of detecting the defect by inspecting the image to be inspected along the inspection line, using the characteristic line of the stripe extracted from the image of the non-defective product as an inspection line for the image to be inspected. And it is characterized in and.

【0006】[0006]

【発明の実施の形態】(システム構成)図2は本発明の
外観検査方法を実施するための装置の概観を示す斜視図
である。図中、1はCCDカメラであり、縞模様を有す
る被検査物2の表面を上方から撮像する。3はLED光
源であり、被検査物2の両側に配置されて、被検査物2
の表面に対して均一な照明を照射する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (System Configuration) FIG. 2 is a perspective view showing an outline of an apparatus for carrying out the appearance inspection method of the present invention. In the figure, 1 is a CCD camera, which images the surface of the inspection object 2 having a striped pattern from above. Reference numeral 3 denotes an LED light source, which is arranged on both sides of the inspection object 2 and
Illuminates the surface of the object with uniform illumination.

【0007】図3は本発明の外観検査方法を実施するた
めのシステム構成を示すブロック図である。図中、4は
画像処理装置であり、CCDカメラ1により撮像された
被検査物2の表面の濃淡画像を処理して、外観検査不良
の有無を判定する。9は撮像された画像を表示するため
のモニター、10は画像処理装置4で検査した結果を受
け取り、不良排出の処理を行うシーケンサー、11はL
ED光源3を駆動するためのLED電源装置である。
FIG. 3 is a block diagram showing a system configuration for carrying out the appearance inspection method of the present invention. In the figure, reference numeral 4 denotes an image processing device, which processes a grayscale image of the surface of the inspection object 2 captured by the CCD camera 1 to determine whether there is a visual inspection defect. Reference numeral 9 is a monitor for displaying a picked-up image, 10 is a sequencer for receiving a result of inspection by the image processing device 4 and performing defective discharge processing, and 11 is L
It is an LED power supply device for driving the ED light source 3.

【0008】図4は画像処理装置4の詳細な構成を示し
ている。この画像処理装置4は、CCDカメラ1から出
力される画像信号をA/D変換するA/D変換部5と、
A/D変換された画像データを前処理する前処理部6
と、前処理された画像データを被検査物2の原画像とし
て記憶する原画像メモリ71と、原画像の各画素に対応
して演算される微分値を記憶する微分画像メモリ72
と、演算された微分方向値を記憶する微分方向値画像メ
モリ73と、原画像の濃淡(明るさ)の変化点を線画と
して抽出したエッジフラグを記憶するエッジ画像メモリ
74と、原画像を演算処理して各画像メモリ71〜74
に所定のデータを記憶させるとともに、各画像メモリ7
1〜74に記憶されているデータに基づいて被検査物2
の欠陥の有無をチェックするマイクロプロセッサよりな
る判定部8とで形成されている。
FIG. 4 shows a detailed structure of the image processing apparatus 4. The image processing device 4 includes an A / D converter 5 for A / D converting an image signal output from the CCD camera 1,
Pre-processing unit 6 for pre-processing A / D converted image data
An original image memory 71 that stores the preprocessed image data as an original image of the inspection object 2, and a differential image memory 72 that stores a differential value calculated corresponding to each pixel of the original image.
And a differential direction value image memory 73 for storing the calculated differential direction value, an edge image memory 74 for storing an edge flag extracted as a line drawing the change point of the grayscale (brightness) of the original image, and the original image Image memory 71 to 74 processed
In addition to storing predetermined data in the image memory 7
The inspection object 2 based on the data stored in 1 to 74
And a determination unit 8 including a microprocessor for checking the presence or absence of defects.

【0009】以下、上述の画像処理装置により原画像か
ら微分画像、微分方向値画像、及びエッジ画像を作成す
る処理について説明する。まず、被検査物2を含む空間
領域を撮像して得られた原画像は濃淡画像であって、各
画素はたとえば濃度が256階調(8ビット)で表わさ
れている。この濃淡画像から被検査物2の輪郭や縞模
様、欠陥、異物等のエッジを抽出する処理は、「エッジ
の部分は濃度変化が大きい部分に対応している」という
考え方を基本にしている。したがって、濃度を微分する
ことによってエッジの抽出を行うのが一般的である。微
分処理は、図5に示すように、濃淡画像を3×3画素の
局所並列ウィンドウWに分割して行う。つまり、注目す
る画素Eと、その画素Eの周囲の8画素A〜D、F〜I
とで局所並列ウィンドウWを形成し、局所並列ウィンド
ウW内の画素A〜Iの濃度の縦方向の濃度変化ΔVと横
方向の濃度変化ΔHとを次式によって求める。
The process of creating a differential image, a differential direction value image, and an edge image from the original image by the above image processing apparatus will be described below. First, an original image obtained by capturing an image of a spatial region including the inspection object 2 is a grayscale image, and each pixel is represented by, for example, a density of 256 gradations (8 bits). The process of extracting the contour, the striped pattern, the defect, the foreign material, or the like of the inspection object 2 from the grayscale image is based on the idea that "the edge portion corresponds to a portion where the density change is large". Therefore, the edge is generally extracted by differentiating the density. The differentiation process is performed by dividing the grayscale image into 3 × 3 pixel local parallel windows W as shown in FIG. That is, the pixel E of interest and eight pixels A to D and F to I around the pixel E
And form a local parallel window W, and a vertical density change ΔV and a horizontal density change ΔH of the pixels A to I in the local parallel window W are obtained by the following equation.

【0010】 ΔV=(A+B+C)−(G+H+I) ΔH=(A+D+G)−(C+F+I) ただし、A〜Iは対応する画素の濃度を示している。さ
らに、微分値|e|と微分方向値∠eとを次式によって
求める。 |e|=√(ΔV2 +ΔH2 ) ∠e =tan-1(ΔV/ΔH)+π/2
ΔV = (A + B + C) − (G + H + I) ΔH = (A + D + G) − (C + F + I) where A to I indicate the densities of the corresponding pixels. Further, the differential value | e | and the differential direction value ∠e are obtained by the following equation. | E | = √ (ΔV 2 + ΔH 2 ) ∠e = tan −1 (ΔV / ΔH) + π / 2

【0011】以上の演算を原画像の全画素について行う
ことにより、被検査物2の輪郭や縞模様、欠陥、異物等
が存在しているような濃度変化が大きい部分と、その変
化の方向とを抽出することができ、微分画像(6ビッ
ト)、微分方向値画像(4ビット)としてそれぞれ微分
画像メモリ72および微分方向値画像メモリ73に記憶
される。
By performing the above calculation for all the pixels of the original image, the portion where the density change is large such that the contour, the striped pattern, the defect, the foreign matter and the like of the inspection object 2 are present, and the direction of the change. Can be extracted and stored as a differential image (6 bits) and a differential direction value image (4 bits) in the differential image memory 72 and the differential direction value image memory 73, respectively.

【0012】次に、細線化処理が行われる。細線化処理
は、微分値が大きいほど濃度変化が大きいことを表わし
ている点に着目して行われる。すなわち、各画素の微分
値を周囲の画素の微分値と比較し、周囲の画素よりも大
きくなるものを連結していくことにより、1画素の幅を
有したエッジが抽出される。つまり、画面上の各画素の
位置をX−Y座標で表わし、微分値をZ軸に取れば、図
6に示すように、微分値を表わす曲面が形成されること
になるのであり、細線化処理は、この曲面における稜線
を求めることに相当する。この段階ではノイズ等による
エッジも含まれているから、図7に示すように、適宜し
きい値を設定し、しきい値以上の値のみを採用してノイ
ズ成分を除去する。
Next, thinning processing is performed. The thinning process is performed by paying attention to the fact that the larger the differential value, the larger the density change. That is, an edge having a width of one pixel is extracted by comparing the differential value of each pixel with the differential value of the surrounding pixels and connecting those that are larger than the surrounding pixels. That is, if the position of each pixel on the screen is represented by XY coordinates and the differential value is taken on the Z axis, a curved surface representing the differential value is formed, as shown in FIG. The process corresponds to finding the ridgeline on this curved surface. At this stage, an edge due to noise or the like is also included. Therefore, as shown in FIG. 7, a threshold value is appropriately set and only a value equal to or higher than the threshold value is used to remove the noise component.

【0013】細線化処理で得られたエッジ画像(1ビッ
ト)は、原画像のコントラストが不十分であるときや、
ノイズが多いようなときには、不連続線になりやすい。
そこで、エッジ延長処理を行う。エッジ延長処理は、不
連続線の端点から始めて、注目する画素とその周囲の画
素とを比較し、次式で表わされる評価関数f(eJ )が
もっとも大きくなる方向にエッジを延長し、他の線の端
点に衝突するまでこれを続けるものである。
The edge image (1 bit) obtained by the thinning process is used when the contrast of the original image is insufficient,
When there is a lot of noise, discontinuous lines are likely to occur.
Therefore, edge extension processing is performed. The edge extension processing starts from the end point of the discontinuous line, compares the pixel of interest with the surrounding pixels, extends the edge in the direction in which the evaluation function f (e J ) expressed by This continues until it hits the end of the line.

【0014】f(eJ )=|eJ |cos(∠eJ −∠
0 )cos{(J−1)π/4−∠e0 } ここに、e0 は中心画素の微分データであり、eJ は隣
接画素の微分データであって、J=1,2,…,8であ
る。
[0014] f (e J) = | e J | cos (∠e J -∠
e 0 ) cos {(J-1) π / 4∠e 0 } where e 0 is the differential data of the central pixel, e J is the differential data of the adjacent pixel, and J = 1, 2, …, 8

【0015】以上の処理により、被検査物2の輪郭、縞
模様、欠陥、異物等の輪郭線が閉曲線のパターンとなっ
た1ビットのエッジ画像が得られ、エッジ画像メモリ7
4に記憶される。エッジ画像メモリ74の値が“1”と
なる画素をエッジ点と称する。
By the above processing, a 1-bit edge image in which the contour lines of the object to be inspected 2, the striped pattern, the defect, the foreign matter, and the like have a closed curve pattern is obtained, and the edge image memory 7 is obtained.
4 is stored. A pixel whose value in the edge image memory 74 is "1" is called an edge point.

【0016】(実施例1)上述の画像処理装置を用い
て、予め良品画像に対して、微分画像、微分方向値画
像、エッジ延長画像等を求める画像処理を行い、縞の特
徴抽出を行う。次に特徴抽出された良品画像に対して予
め縞と交差するように設定された縞探索ライン上を走査
することにより縞の成分画素を検出し、図8に示す縞部
アドレス1、縞部アドレス2、…のように、すべてのア
ドレスを蓄積する。次に縞の特徴ライン抽出のために、
蓄積された縞の成分画素の各アドレスを起点としてN×
M画素の縞成分画素探索用の探索ウィンドウを用いて、 (条件1):「微分値が所定値以上でなおかつエッジ延
長フラグが存在する画素」という条件を満たす画素を探
索する。これは、縞部分が背景に対して濃淡差があり、
画像処理を施すと微分値もある値以上となる特徴を有す
ることを利用している。この画素が検出された場合に
は、追跡候補画素とし、 (条件2):「追跡元の画素の持つ微分方向値と追跡候
補画素の微分方向値の差が予め設定された値よりも小さ
い。」という条件を満たす場合に追跡画素として認識す
る。これは、縞部分は連続しており、画像処理を施すと
隣接する画素では微分方向値(図9参照)が似通った値
を持つことを利用している。例えば、図10に示す例の
場合、隣接する画素が2方向に枝分かれしているが、微
分方向値を比較することにより、微分方向値の差が小さ
い方の画素を追跡画素として認識することができる。図
中、矢印を含む丸は、それぞれ条件1を満たす画素であ
り、丸で囲まれた矢印は微分方向値の示す方向を意味し
ている。この追跡処理を繰り返し、縞の特徴ラインを抽
出するが、 (条件3):「(条件1)と(条件2)を満たす画素が
連続して存在し、その画素数が予め設定されたカウント
値よりも大きい。」という条件を満たせば、そのライン
を縞の特徴ラインの1つとして認識する。
(Embodiment 1) Using the above-described image processing apparatus, image processing for obtaining a differential image, a differential direction value image, an edge extension image, etc. is performed on a non-defective image in advance, and stripe feature extraction is performed. Next, the component pixels of the stripes are detected by scanning on the stripe search line set so as to intersect the stripes in advance for the feature-extracted non-defective image, and the stripe address 1 and stripe address shown in FIG. Accumulate all addresses, such as 2, ... Next, for the feature line extraction of stripes,
Starting from each address of the accumulated stripe component pixel, N ×
A search window for searching the stripe component pixels of M pixels is used to search for a pixel that satisfies the condition (condition 1): "a pixel whose differential value is a predetermined value or more and an edge extension flag exists". This is because the striped part has a shade difference with the background,
The fact that the differential value becomes a certain value or more when image processing is performed is used. When this pixel is detected, it is set as a tracking candidate pixel, and (condition 2): "The difference between the differential direction value of the tracking source pixel and the differential direction value of the tracking candidate pixel is smaller than a preset value. When the condition “” is satisfied, it is recognized as a tracking pixel. This is based on the fact that the striped portions are continuous, and the differential direction values (see FIG. 9) in adjacent pixels have similar values when image processing is performed. For example, in the case of the example shown in FIG. 10, adjacent pixels are branched in two directions, but by comparing the differential direction values, the pixel having the smaller differential direction value can be recognized as the tracking pixel. it can. In the figure, circles including arrows are pixels that satisfy the condition 1, and arrows surrounded by circles indicate the directions indicated by the differential direction values. This tracking process is repeated to extract the striped characteristic line. However, (Condition 3): "Conditions where there are consecutive pixels that satisfy (Condition 1) and (Condition 2), and the number of pixels is a preset count value. Is larger than that. ”, The line is recognized as one of the stripe characteristic lines.

【0017】縞の特徴ラインの抽出を、すべての蓄積さ
れた縞の成分画素のアドレスに対して繰り返すことによ
り縞の特徴ラインを全て抽出する。これら、抽出された
縞の特徴ラインをそれぞれの縞の検査ラインとする。以
上の処理を行うことにより、縞の形状に関わらず自動的
に縞の検査ラインを作成することが可能となる。この処
理を良品画像に対して予め実施する。
All the striped feature lines are extracted by repeating the striped feature line extraction for the addresses of all the stored striped component pixels. These extracted characteristic lines of stripes are set as inspection lines of the stripes. By performing the above processing, it becomes possible to automatically create a stripe inspection line regardless of the stripe shape. This process is performed in advance on the non-defective image.

【0018】次に被検査対象画像に対して同様の特徴抽
出処理を行い、その特徴抽出された画像上に前述した複
数本の検査ラインを図11に示すように重ねあわせ、検
査ライン上における縞の成分画素の有無や、検査ライン
から縞の成分画素までの距離などにより縞の曲がり、と
ぎれ、ピッチの乱れなどの欠陥を検出することができ
る。図中、水平な直線は良品画像に対して予め求められ
た検査ラインであり、複数個の丸は被検査対象画像に対
して特徴抽出処理により検出された縞の成分画素であ
る。図11の上側の例(a)では、被検査対象画像から
特徴抽出された縞の成分画素は、良品画像から求められ
た検査ライン上に完全に一致しているが、下側の例
(b)では、被検査対象画像から特徴抽出された縞の成
分画素が、良品画像から求められた検査ラインから部分
的に外れており、この場合、全体として不良であると判
定することができる。
Next, similar feature extraction processing is performed on the image to be inspected, and the plurality of inspection lines described above are superimposed on the image from which the features have been extracted as shown in FIG. Defects such as fringe bending, breaks, and pitch irregularity can be detected based on the presence or absence of the component pixels of No. 2 and the distance from the inspection line to the fringe component pixels. In the figure, a horizontal straight line is an inspection line previously obtained for a non-defective image, and a plurality of circles are stripe component pixels detected by the feature extraction process for the image to be inspected. In the example (a) on the upper side of FIG. 11, the component pixels of the stripes whose features are extracted from the image to be inspected are completely coincident with the inspection line obtained from the non-defective image, but the example (b) on the lower side is shown. In (), the component pixels of the stripes whose features are extracted from the image to be inspected are partially off the inspection line obtained from the non-defective image, and in this case, it can be determined that the pixel is defective as a whole.

【0019】本実施例の処理をマイクロプロセッサ(図
4の判定部8)で実現するためのフローチャートを図1
2及び図13に示す。図12は図8に示す縞探索ライン
上で縞成分画素を走査して、条件1を満たす追跡候補画
素を検索する処理である。まず、良品画像を撮像し、微
分画像、微分方向値画像、エッジ延長画像等を求める画
像処理を行い、縞の特徴抽出処理を行う。次に、図8に
示す縞探索ライン上の画素を走査し、エッジ延長フラグ
が存在し、且つある微分値以上の画素を縞の成分画素と
して記憶する。この処理を縞探索ラインの終点まで繰り
返す。これにより、縞探索ライン上の縞成分画素が縞部
アドレスn(Xn,Yn)として記憶される。
FIG. 1 is a flowchart for realizing the processing of this embodiment by a microprocessor (determination unit 8 in FIG. 4).
2 and FIG. FIG. 12 shows a process of scanning the stripe component pixels on the stripe search line shown in FIG. 8 to search for tracking candidate pixels that satisfy the condition 1. First, a non-defective image is picked up, image processing for obtaining a differential image, a differential direction value image, an edge extension image, etc. is performed, and stripe feature extraction processing is performed. Next, the pixels on the stripe search line shown in FIG. 8 are scanned, and pixels having an edge extension flag and having a certain differential value or more are stored as stripe component pixels. This process is repeated until the end of the stripe search line. As a result, the stripe component pixel on the stripe search line is stored as the stripe portion address n (Xn, Yn).

【0020】次に、図13は縞部アドレスnを起点とし
て、条件1及び条件2を満たす画素を追跡する処理であ
る。まず、図12の処理で得られた縞部アドレスn(X
n,Yn)を追跡元画素として設定する。この追跡元画
素のアドレスを起点としてN×M画素の縞成分探索用の
ウィンドウを設置する。また、追跡元画素の微分方向値
を記憶しておく。縞成分探索用のウィンドウ内を走査
し、条件1を満たす画素、つまり、エッジ延長フラグが
存在し、ある微分値以上を有する画素を検出する。次
に、追跡元画素の微分方向値と検出画素の微分方向値の
差の絶対値|B|を算出し、絶対値|B|が設定値以下
であれば、条件2を満たす縞の成分画素として記憶す
る。その縞部アドレスLn(Xm,Ym)と微分方向値
LnGmは、次の追跡元画素のアドレス及び微分方向値
として記憶される。以上の処理を繰り返すことにより、
縞の成分画素のアドレスLn(Xm,Ym)の集合とし
て、縞部の特徴ラインLnが得られる。縞探索ウィンド
ウ内に条件1及び条件2を満たす画素が存在しなくなれ
ば、縞の特徴ラインの終端とみなして追跡を終了する。
Next, FIG. 13 shows a process of tracing pixels satisfying the conditions 1 and 2 from the stripe address n as a starting point. First, the stripe address n (X
n, Yn) is set as the tracking source pixel. A window for fringe component search of N × M pixels is set starting from the address of the tracking source pixel. Also, the differential direction value of the tracking source pixel is stored. The window for searching the stripe component is scanned to detect pixels satisfying the condition 1, that is, pixels having an edge extension flag and having a certain differential value or more. Next, the absolute value | B | of the difference between the differential direction value of the tracking source pixel and the differential direction value of the detected pixel is calculated, and if the absolute value | B | Memorize as. The stripe address Ln (Xm, Ym) and the differential direction value LnGm are stored as the address and differential direction value of the next tracking source pixel. By repeating the above process,
The characteristic line Ln of the stripe portion is obtained as a set of addresses Ln (Xm, Ym) of the stripe component pixels. When there is no pixel satisfying the conditions 1 and 2 in the fringe search window, it is regarded as the end of the fringe feature line and the tracking is terminated.

【0021】以上の処理をすべての縞部アドレスn(X
n,Yn)について実施することにより、全縞の特徴ラ
インを抽出することができる。良品画像の場合、抽出さ
れた特徴ラインのそれぞれを縞の検査ラインとする。ま
た、被検査対象画像の場合、抽出された特徴ラインを良
品画像から求めた検査ラインと重ね合わせて比較照合す
る。
The above processing is performed for all stripe address n (X
n, Yn), the feature lines of all stripes can be extracted. In the case of a non-defective image, each of the extracted characteristic lines is used as a striped inspection line. Further, in the case of the image to be inspected, the extracted feature line is superposed on the inspection line obtained from the non-defective image and compared and collated.

【0022】(実施例2)図14は本発明の実施例2の
説明図である。本実施例は、上述の実施例1において、
良品画像から求めた検査ラインを用いて被検査対象画像
を検査する際に、検査ラインを中心に設定される縞成分
検出用のウィンドウを用いて被検査対象画像上の縞の成
分画素を探索することにより、良品レベルの微細な曲が
りについては許容し、それよりも大きな縞の曲がり、と
ぎれ等の欠陥を検出することを特徴とする。
(Second Embodiment) FIG. 14 is an explanatory view of a second embodiment of the present invention. The present embodiment is the same as the above-described first embodiment.
When inspecting the image to be inspected using the inspection line obtained from the non-defective image, the stripe component pixel on the image to be inspected is searched using the stripe component detection window set around the inspection line. Thus, fine bends of a non-defective level are allowed, and defects such as stripe bends and breaks larger than that are detected.

【0023】まず、良品画像に対して、予め検査ライン
を求める処理については実施例1と同様である。次に、
被検査対象画像に対して、縞探索ライン上で縞成分画素
を認識する処理を図15、また、認識された縞成分画素
を起点として設置された検査ライン上に縞成分検出用の
ウィンドウを設定して、被検査対象画像上の縞の成分画
素を探索する処理を図16に示す。
First, the process for obtaining an inspection line in advance for a non-defective image is the same as in the first embodiment. next,
FIG. 15 shows a process of recognizing stripe component pixels on a stripe search line for an image to be inspected, and a stripe component detection window is set on the inspection line installed starting from the recognized stripe component pixels. FIG. 16 shows a process for searching for stripe component pixels on the image to be inspected.

【0024】以下、図15と図16のフローチャートに
沿って、本実施例を説明する。被検査対象画像を撮像
し、上述の画像処理装置を用いて、微分画像、微分方向
値画像、エッジ延長画像等を求める画像処理を行い、縞
の特徴抽出を行う。次に特徴抽出された被検査対象画像
に対して予め縞と交差するように設定された縞探索ライ
ン上を走査することにより縞の成分画素を検出する。こ
の際、 (条件1):「微分値が所定値以上でなおかつエッジ延
長フラグが存在する画素」という条件を満たす画素を探
索する。この画素が検出された場合には、この画素を通
るように、良品画像に対して予め求められた縞の検査ラ
インを設定するものであるが、その際に、 (条件2):「良品画像から検査ラインを作成するとき
に検出した縞成分画素と被検査対象画像で検出した縞成
分画素の微分方向値の差が設定値より小さい。」という
条件を満たすことを確認することにより、異なる縞に対
する検査ラインの設定を防止する。
This embodiment will be described below with reference to the flow charts of FIGS. 15 and 16. An image of an inspection target image is picked up, image processing for obtaining a differential image, a differential direction value image, an edge extension image, and the like is performed by using the above-described image processing device, and stripe feature extraction is performed. Next, the component pixel of the stripe is detected by scanning the stripe-extracted line set in advance so as to intersect the stripe with the feature-extracted target image to be inspected. At this time, (condition 1): a pixel satisfying a condition of "a pixel having a differential value equal to or larger than a predetermined value and having an edge extension flag" is searched for. When this pixel is detected, the stripe inspection line previously obtained for the non-defective image is set so as to pass through this pixel. At that time, (condition 2): “non-defective image The difference between the differential direction values of the stripe component pixels detected when creating the inspection line from the image and the stripe component pixels detected in the image to be inspected is smaller than the set value. Prevent the setting of the inspection line.

【0025】このようにして、縞の成分画素が認識され
ると、実施例1の図12及び図13の処理で良品画像に
対して求められた縞の特徴ラインLnを検査ラインとし
て設置する。このとき、検査ラインは認識された縞の成
分画素を通るように設置されるものである。この検査ラ
イン上で縞の成分画素を探索する処理(図16)を行う
ことにより、1つの縞についての検査が終了する。同じ
ことを縞探索ラインの終わりまで繰り返すことにより、
すべての縞の検査が行われる。以上の処理を図15に示
した。
In this way, when the stripe component pixels are recognized, the stripe characteristic line Ln obtained for the non-defective image by the processing of FIGS. 12 and 13 of the first embodiment is set as the inspection line. At this time, the inspection line is installed so as to pass through the recognized component pixels of the stripe. By performing the process (FIG. 16) of searching the component pixel of the stripe on this inspection line, the inspection for one stripe is completed. By repeating the same until the end of the stripe search line,
All stripes are inspected. The above processing is shown in FIG.

【0026】次に、設置された縞の検査ライン上で縞の
成分画素を探索する処理を図16により説明する。ま
ず、設置された検査ライン上にN×M画素の縞成分検出
用ウィンドウを設置する。図14の例では、横1画素×
縦5画素のウィンドウを設置している。図14におい
て、丸は特徴抽出処理により被検査対象画像から検出さ
れた縞の成分画素を意味している。図中、上側の例
(a)では、検査ライン上に縞の成分画素が並んでいる
ので、縞成分検出用ウィンドウを矢印に示す方向に移動
させると、ウィンドウの中心画素のところで、縞の成分
画素が常に検出される。したがって、ウィンドウの探索
は中心画素から外側へ向けて探索するのが効率的であ
る。ここでも縞の成分画素であることを判定するには、
(条件1)と同様に、「微分値が所定値以上でなおかつ
エッジ延長フラグが存在する画素」という条件を満たす
画素を探索する。この画素がウィンドウ内の何処かで検
出された場合には、良品候補とし、図14の矢印に示す
ように次の検査ライン上画素にウィンドウを移動させ
て、検査ライン上を始点から終点まで探索し、検査ライ
ン上の全画素について、探索用ウィンドウ内で縞の成分
画素の存在が判定されれば、その検査ラインについて
は、良品と判定される。また、ウィンドウ内で縞の成分
画素の存在が判定されなかった場合には、その検査ライ
ンは不良、つまり、被検査対象が不良と判定される。
Next, the process of searching for stripe component pixels on the installed stripe inspection line will be described with reference to FIG. First, a stripe component detection window of N × M pixels is installed on the installed inspection line. In the example of FIG. 14, one horizontal pixel ×
A vertical 5 pixel window is installed. In FIG. 14, a circle means a stripe component pixel detected from the image to be inspected by the feature extraction processing. In the example (a) on the upper side in the figure, since the stripe component pixels are arranged on the inspection line, if the stripe component detection window is moved in the direction indicated by the arrow, the stripe component is located at the center pixel of the window. Pixels are always detected. Therefore, it is efficient to search the window outward from the central pixel. Again, to determine that it is a stripe component pixel,
Similar to (Condition 1), a pixel that satisfies the condition "a pixel whose differential value is greater than or equal to a predetermined value and in which an edge extension flag exists" is searched. If this pixel is detected somewhere within the window, it is determined as a good product candidate, the window is moved to the pixel on the next inspection line as shown by the arrow in FIG. 14, and the inspection line is searched from the start point to the end point. If all the pixels on the inspection line are determined to have stripe component pixels in the search window, the inspection line is determined to be non-defective. If the presence of the stripe component pixel is not determined in the window, the inspection line is determined to be defective, that is, the inspection target is determined to be defective.

【0027】なお、図14に例示したウィンドウは横1
画素×縦5画素の大きさであるから、図中の下の例
(b)のように、縦方向に上下2画素までの曲がりは許
容されるが、3画素以上ずれると不良と判定される。ま
た、横方向については、1画素でも「とぎれ」があると
不良と判定されるが、ウィンドウの横方向の画素数Nが
2画素以上の場合には、(N−1)画素までの「とぎ
れ」は許容範囲内とすることができる。このように、ウ
ィンドウの縦方向の画素数により縞の「曲がり」に対す
る許容範囲を設定でき、横方向の画素数により縞の「と
ぎれ」に対する許容範囲を設定できる。
The window illustrated in FIG. 14 has a width of 1
Since it has a size of pixels × 5 pixels in the vertical direction, as shown in the lower example (b) in the figure, bending up to 2 pixels in the vertical direction is allowed, but it is determined to be defective if it shifts by 3 pixels or more. . In the horizontal direction, even if one pixel has a “break”, it is determined to be defective, but if the number N of pixels in the horizontal direction of the window is two or more pixels, “break” up to (N−1) pixels is detected. Can be within an acceptable range. Thus, the allowable range for the "bending" of the stripe can be set by the number of pixels in the vertical direction of the window, and the allowable range for the "break" of the stripe can be set by the number of pixels in the horizontal direction.

【0028】(実施例3)図17は本発明の実施例3の
説明図である。本実施例は、上述の実施例2において、
ウィンドウ内に縞成分画素が存在するとして許容してい
た曲がりが、1点だけで見ると微細な変化であっても、
連続した場合には曲がりとして不良となることがあるの
で、そのような不良を検出できるようにしたものであ
る。例えば、図17の場合、検査ライン上のすべての画
素について、検査ライン上に設定されるウィンドウ内に
縞の成分画素(図中の○で示す)が存在しているが、検
査ラインから検出された縞成分画素までの距離Tiを算
出すると、0、0、0、1、2、2、2、2、2、1、
0、1、1、0、0、0、0、0、0となっている。こ
のうち、0、1、1、0の部分は目立たないとしても、
0、1、2、2、2、2、2、1、0の部分は全体とし
て見ると、曲がりと見えるほどに連続している。そこ
で、距離Tiが連続してある設定値以上(例えば1画素
分以上)である場合に、縞の曲がり欠陥の候補箇所とし
てその距離Tiを全て加算し、その総和によって縞の曲
がりの欠陥を検出する。前者の場合、連続する距離の総
和は、T=ΣTi=1+2+2+2+2+2+1=12
画素と計算され、後者の場合、T=2画素と計算される
から、その間にしきい値を設定すれば、前者は不良、後
者は許容範囲内と判定することができる。
(Embodiment 3) FIG. 17 is an explanatory diagram of Embodiment 3 of the present invention. The present embodiment is the same as the above-described second embodiment.
Even if the bending, which was allowed as the presence of stripe component pixels in the window, is a minute change when viewed at only one point,
If they are continuous, a defect may occur as a bend, so such a defect can be detected. For example, in the case of FIG. 17, for all the pixels on the inspection line, stripe component pixels (indicated by a circle in the figure) exist in the window set on the inspection line, but they are detected from the inspection line. When the distance Ti to the stripe component pixel is calculated, 0, 0, 0, 1, 2, 2, 2, 2, 2, 1,
It is 0, 1, 1, 0, 0, 0, 0, 0, 0. Of these, the 0, 1, 1, 0 parts are not noticeable,
The 0,1,2,2,2,2,2,1,0 part is continuous so that it can be seen as a bend when viewed as a whole. Therefore, when the distance Ti is continuously set value or more (for example, one pixel or more), all the distances Ti are added as candidate points of the stripe defect, and the defect of the stripe stripe is detected by the sum. To do. In the former case, the sum of continuous distances is T = ΣTi = 1 + 2 + 2 + 2 + 2 + 2 + 1 = 12
Since the pixel is calculated and the latter is calculated as T = 2 pixels, it is possible to determine that the former is defective and the latter is within the allowable range by setting a threshold value between them.

【0029】本実施例により連続した変化を曲がりとし
て認識するための処理を図18のフローチャートに示
す。本実施例の処理の特徴は、検査ラインの途中であっ
ても、検出点アドレスから検査ラインまでの距離Tiが
設定値よりも小さくなれば、距離の総和Tを初期値0に
リセットしてしまう点である。これに対して、次に説明
する実施例4(図19)では1本の検査ラインについて
距離の総和Tを積算しており、実施例5(図20)では
全検査ラインについて距離の総和Tを積算している。
The process for recognizing a continuous change as a bend according to this embodiment is shown in the flowchart of FIG. The feature of the processing of this embodiment is that the total sum T of the distances is reset to the initial value 0 if the distance Ti from the detection point address to the inspection line becomes smaller than the set value even during the inspection line. It is a point. On the other hand, in Example 4 (FIG. 19) described below, the total sum T of distances is integrated for one inspection line, and in Example 5 (FIG. 20), the total sum T of distances is calculated for all inspection lines. I am accumulating.

【0030】(実施例4)図19は本発明の実施例4に
よる検査ライン上での検査の内容を示すフローチャート
である。本実施例は、縞の一部分だけで見ると微細な変
化であっても、1本の縞として観察した場合には曲がり
として不良となることがあるので、そのような不良を検
出できるようにしたものである。図18に示した実施例
3のフローチャートと比較すると、距離の総和Tを初期
値0にリセットする仕方が異なり、検出点アドレスから
検査ラインまでの距離Tiが設定値より小さくなっても
距離の総和Tをリセットせず、1本の検査ラインについ
て距離の総和Tを積算する。例えば、図17の例では、
T=ΣTi=0+0+0+1+2+2+2+2+2+1
+0+1+1+0+0+0+0+0+0=14画素と計
算される。このようにして計算された距離の総和Tが設
定値以上であれば不良と判定する。これにより、縞1本
を全体として見たときの不良を判定することができる。
(Fourth Embodiment) FIG. 19 is a flow chart showing the contents of the inspection on the inspection line according to the fourth embodiment of the present invention. In the present embodiment, even if only a part of the stripes is minutely changed, when it is observed as one stripe, it may be defective as a bend, so that such a defect can be detected. It is a thing. Compared with the flow chart of the third embodiment shown in FIG. 18, the way of resetting the total sum T of distances to an initial value 0 is different, and the total sum of distances even if the distance Ti from the detection point address to the inspection line becomes smaller than the set value. Without resetting T, the total sum T of the distances for one inspection line is integrated. For example, in the example of FIG.
T = ΣTi = 0 + 0 + 0 + 1 + 2 + 2 + 2 + 2 + 2 + 1
It is calculated as + 0 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + 0 = 14 pixels. If the total sum T of the distances calculated in this way is equal to or greater than the set value, it is determined to be defective. As a result, it is possible to determine a defect when one stripe is viewed as a whole.

【0031】(実施例5)図20は本発明の実施例5に
よる検査ライン上での検査の内容を示すフローチャート
である。本実施例は、縞1本だけで見ると微細な変化で
あっても縞摸様全体として見た場合に曲がりとして不良
となることがあるので、そのような不良を検出できるよ
うにしたものである。図19に示した実施例4のフロー
チャートと比較すると、1本の検査ラインの終了毎に距
離の総和Tを初期値0にリセットする処理が無く、距離
の総和Tを全検査ラインについて積算する点が異なる。
全検査ラインについて積算された距離の総和Tが設定値
以上であれば不良と判定する。これにより、縞模様全体
として見たときの不良を判定することができる。
(Fifth Embodiment) FIG. 20 is a flow chart showing the contents of the inspection on the inspection line according to the fifth embodiment of the present invention. In the present embodiment, even if only one stripe is seen, even a minute change may cause a defect as a bend when viewed as a stripe pattern as a whole. Therefore, such a defect can be detected. is there. Compared to the flowchart of the fourth embodiment shown in FIG. 19, there is no process for resetting the total sum T of distances to the initial value 0 at the end of each inspection line, and the total sum T of distances is integrated for all inspection lines. Is different.
If the total sum T of the distances accumulated for all the inspection lines is equal to or greater than the set value, it is determined as defective. As a result, it is possible to determine a defect when viewed as the entire striped pattern.

【0032】(実施例6)図21は本発明の実施例6の
説明図である。本実施例は、上述の実施例2において、
ゴミなどにより数点の縞成分画素が検出されない場合に
不良となることを防止し、検査精度を上げるために、縞
の成分画素が検出されなかった画素数をそれぞれの縞1
本ごとに加算しその画素数の総和を用いて、縞のとぎれ
欠陥として検出することを特徴とするものである。
(Sixth Embodiment) FIG. 21 is an explanatory view of a sixth embodiment of the present invention. The present embodiment is the same as the above-described second embodiment.
In order to prevent a defect when several stripe component pixels are not detected due to dust or the like and to improve inspection accuracy, the number of pixels in which the stripe component pixel is not detected is set for each stripe 1.
The feature is that each line is added, and the sum of the numbers of pixels is used to detect a stripe defect.

【0033】本実施例の処理を図22のフローチャート
に示す。本実施例では、検査ライン上に設定されるウィ
ンドウ内に縞の成分画素が検出されなかった場合に、そ
の回数をとぎれ画素数として加算して行き、1本の検査
ラインについて加算した総和が設定値以上であれば不
良、設定値以内であれば良品候補と判定し、次の検査ラ
インについて同様の検査を行う。例えば、図21の場
合、検査ライン上の一部の画素について、検査ライン上
に設定されるウィンドウ内に縞の成分画素(図中の○で
示す)が存在していないが、とぎれ画素の数Giをそれ
ぞれの縞1本ごとに加算すると、上側の例(a)ではΣ
Gi=2+3=5、下側の例(b)ではΣGi=1とな
る。その間にしきい値を設定すれば、上側の例では不
良、下側の例では良品(ゴミが付着している)と判定す
ることができる。
The processing of this embodiment is shown in the flowchart of FIG. In the present embodiment, when the stripe component pixel is not detected in the window set on the inspection line, the number of times is added as the number of discontinuous pixels, and the total sum for one inspection line is set. If it is greater than or equal to the value, it is determined to be defective, and if it is within the set value, it is determined to be a good product candidate, and the same inspection is performed on the next inspection line. For example, in the case of FIG. 21, for some pixels on the inspection line, there is no stripe component pixel (indicated by a circle in the figure) in the window set on the inspection line, but the number of broken pixels When Gi is added for each stripe, Σ in the upper example (a)
Gi = 2 + 3 = 5, and in the lower example (b), ΣGi = 1. If a threshold value is set in the meantime, it can be determined that the upper example is defective and the lower example is non-defective (with dust attached).

【0034】(実施例7)図23は本発明の実施例7の
説明図である。本実施例は、上述の実施例2において、
複数箇所でのゴミなどの影響により複数点の縞成分画素
が検出されない場合に不良となることを防止し、検査精
度を上げるために、縞の成分画素が連続して検出されな
かった場合に、その連続する画素数を用いて、縞のとぎ
れ欠陥として検出することを特徴とするものである。こ
れは、ゴミと比較して縞のとぎれの欠陥が大きいことを
利用している。
(Embodiment 7) FIG. 23 is an explanatory diagram of Embodiment 7 of the present invention. The present embodiment is the same as the above-described second embodiment.
In order to prevent a defect when stripe component pixels at multiple points are not detected due to the effect of dust at multiple locations and to improve inspection accuracy, when stripe component pixels are not continuously detected, It is characterized in that the number of consecutive pixels is used to detect as a broken stripe defect. This takes advantage of the fact that the defect of broken stripes is larger than that of dust.

【0035】本実施例の処理を図24のフローチャート
に示す。本実施例では、検査ライン上に設定されるウィ
ンドウ内に縞の成分画素が検出されなかった場合に、連
続してとぎれている画素数Gをカウントする。連続して
とぎれている画素数Gが設定値以上であれば不良と判定
される。連続してとぎれている画素数Gをカウントして
いる途中で縞の成分画素が検出された場合、カウント値
はG=0にリセットされる。これを検査ラインの終わり
まで繰り返し、連続してとぎれている画素数Gが設定値
を越えなければ、良品候補と判定し、次の検査ラインに
ついて同様の検査を行う。
The processing of this embodiment is shown in the flowchart of FIG. In this embodiment, when no stripe component pixel is detected in the window set on the inspection line, the number G of pixels that are continuously interrupted is counted. If the number G of pixels that are continuously interrupted is equal to or greater than the set value, it is determined as a defect. If a stripe component pixel is detected while counting the number G of pixels that are continuously interrupted, the count value is reset to G = 0. This is repeated until the end of the inspection line, and if the number G of pixels that are continuously discontinuous does not exceed the set value, it is determined as a good product candidate, and the same inspection is performed on the next inspection line.

【0036】例えば、図23の場合、検査ライン上の一
部の画素については縞の成分画素(図中の○で示す)が
存在していないが、連続してとぎれている画素数Gに着
目すると、上側の例(a)ではG=3、下側の例(b)
ではG=1となる。その間にしきい値を設定すれば、上
側の例(a)は不良、下側の例(b)は良品(ゴミが付
着している)と判定することができる。
For example, in the case of FIG. 23, stripe component pixels (indicated by circles in the figure) do not exist for some of the pixels on the inspection line, but attention is paid to the number G of pixels that are continuously interrupted. Then, in the upper example (a), G = 3, and in the lower example (b)
Then G = 1. If a threshold value is set in the meantime, it can be determined that the example (a) on the upper side is defective and the example (b) on the lower side is non-defective (with dust attached).

【0037】(実施例8)図25は本発明の実施例8の
説明図である。本実施例は、図8(a)に示すように、
縞全体で見ることで不良となる場合と、図8(b)に示
すように、縞全体で見ることで良品となる場合とを区別
するものであり、その処理の内容を図26に示す。本実
施例では、実施例2において、縞の成分画素が検出され
なかった場合にその画素数を縞全体で加算し、とぎれ画
素数Gの総和が縞全体として設定値以上であれば不良と
判定するものである。このように、縞全体を見ることで
良品の部分的なばらつきを吸収し、不良の有無を正しく
認識することができる。
(Embodiment 8) FIG. 25 is an explanatory diagram of Embodiment 8 of the present invention. In this embodiment, as shown in FIG.
The case where a defect is observed by viewing the entire stripe and the case where a defective product is obtained by viewing the entire stripe as shown in FIG. 8B are distinguished, and the content of the processing is shown in FIG. In the present embodiment, in the second embodiment, when the stripe component pixel is not detected, the number of pixels is added for the entire stripe, and if the sum of the number of broken pixels G is equal to or larger than the set value for the entire stripe, it is determined to be defective. To do. As described above, by observing the entire stripe, it is possible to absorb the partial variation of the non-defective product and correctly recognize the presence or absence of the defect.

【0038】(実施例9)本実施例は、図27に示すよ
うに、良品画像から作成された検査ライン上の微分方向
値を求め、微分方向値の良品パターンを予め作成する。
例えば、直線の場合には同一の微分方向値が並び、また
波形、円形などの場合には連続的に微分方向値が変化す
る。ところが、被検査画像の縞模様に曲がりの欠陥が発
生した場合には、図28に示すように、微分方向値のパ
ターンに乱れが生じる。この乱れに着目することで縞の
曲がりの欠陥を検出することができる。
(Embodiment 9) In this embodiment, as shown in FIG. 27, the differential direction value on the inspection line created from the non-defective product image is obtained, and a non-defective product pattern of the differential direction value is created in advance.
For example, in the case of a straight line, the same differential direction values are arranged, and in the case of a waveform or a circle, the differential direction values change continuously. However, when a bending defect occurs in the striped pattern of the inspection image, the pattern of the differential direction values is disturbed as shown in FIG. 28. By paying attention to this disorder, it is possible to detect the defect of the stripe bending.

【0039】図29〜図31は本実施例による処理の詳
細を示しており、図29は微分方向値の良品パターンの
作成処理、図30は被検査画像での微分方向値パターン
の抽出処理、図31は微分方向値の良品パターンと被検
査画像の変化パターンの比較処理をそれぞれ示してい
る。
29 to 31 show the details of the process according to the present embodiment. FIG. 29 is a process for creating a non-defective pattern having a differential direction value, and FIG. 30 is a process for extracting a differential direction value pattern from an image to be inspected. FIG. 31 shows the comparison processing of the non-defective pattern of the differential direction value and the change pattern of the inspection image.

【0040】まず、図29の微分方向値の良品パターン
の作成処理では、被検査ライン作成時の良品画像を使用
し、検査ライン上の微分方向値を取得し、微分方向値の
配列に追加する。これを検査ラインの終点まで繰り返す
ことにより、検査ラインLnの微分方向値変化パターン
として記憶し、同じことを全検査ラインについて実施す
る。これにより、図27に示すような微分方向値の良品
パターンが得られる。
First, in the process of creating a non-defective pattern of differential direction values in FIG. 29, a non-defective image at the time of creating a line to be inspected is used to acquire differential direction values on the inspection line and add them to the array of differential direction values. . By repeating this until the end point of the inspection line, it is stored as a differential direction value change pattern of the inspection line Ln, and the same is performed for all inspection lines. As a result, a non-defective pattern having differential direction values as shown in FIG. 27 is obtained.

【0041】次に、図30の被検査画像での微分方向値
パターンの抽出処理では、被検査画像を撮像し、微分画
像、微分方向値画像、エッジ延長画像等を求める画像処
理を行い、縞の特徴抽出処理を行う。次に、図8に示す
縞探索ライン上の画素を走査し、エッジ延長フラグが存
在し、且つある微分値以上の画素を縞の成分画素として
記憶する。この処理を縞探索ラインの終点まで繰り返
す。これにより、縞探索ライン上の縞成分画素が縞部ア
ドレスn(Xn,Yn)として記憶される。縞探索ライ
ン上の縞成分画素のアドレスが検索されれば、縞部アド
レスnを起点として、実施例1の条件1及び条件2を満
たす画素を追跡する図13で示した追跡処理を行い、縞
の特徴ラインを抽出する。この特徴ラインに対して、図
29で示した微分方向値の変化パターンの作成処理を行
うことにより、図28に示すような被検査画像での微分
方向値の変化パターンが得られる。
Next, in the process of extracting the differential direction value pattern from the image to be inspected in FIG. 30, the image to be inspected is picked up and image processing for obtaining a differential image, a differential direction value image, an edge extension image, etc. Feature extraction processing is performed. Next, the pixels on the stripe search line shown in FIG. 8 are scanned, and pixels having an edge extension flag and having a certain differential value or more are stored as stripe component pixels. This process is repeated until the end of the stripe search line. As a result, the stripe component pixel on the stripe search line is stored as the stripe portion address n (Xn, Yn). When the address of the stripe component pixel on the stripe search line is searched, the tracking processing shown in FIG. 13 for tracking the pixel satisfying the conditions 1 and 2 of the first embodiment is performed by using the stripe address n as a starting point. The characteristic line of is extracted. The differential direction value change pattern shown in FIG. 28 is obtained by performing the differential direction value change pattern creation process shown in FIG. 29 on this feature line.

【0042】次に、図31の微分方向値の良品パターン
と被検査画像の変化パターンの比較処理では、図29の
処理で得られた良品パターン配列と、図30の処理で得
られた被検査画像の変化パターンを比較し、良品の微分
方向値と被検査画像の微分方向値が一致していれば、次
の画素を照合し、予め記憶しておいた配列の全てについ
て微分方向値が一致していれば、良品候補と判定し、同
じ処理を全検査ラインについて同様に実施する。いずれ
かの検査ラインのいずれかの画素において、良品の微分
方向値と被検査画像の微分方向値とが一致しなければ、
縞の曲がり欠陥が存在するとして、不良と判定する。
Next, in the process of comparing the non-defective pattern of the differential direction value of FIG. 31 and the change pattern of the image to be inspected, the non-defective pattern array obtained in the process of FIG. 29 and the inspected image obtained in the process of FIG. The change patterns of the images are compared, and if the differential direction value of the non-defective product and the differential direction value of the inspected image match, the next pixel is collated, and the differential direction values of all the previously stored arrays are set to the same value. If so, it is determined to be a good product candidate, and the same processing is similarly performed for all inspection lines. If the differential direction value of the non-defective product and the differential direction value of the image to be inspected do not match in any pixel of any of the inspection lines,
It is determined that there is a bending defect of the stripe and it is defective.

【0043】例えば、縞部が直線の場合、微分方向値の
良品パターンは、図27に示すように、同一の微分方向
値がA−A−A−A−と並ぶはずであるが、図28のよ
うに、A−B−C−A−D−E−Aとなる箇所が有れ
ば、縞の曲がり欠陥が存在すると判定する。また、縞部
が波形の場合、微分方向値の良品パターンは、図27に
示すように、周期的に同じパターンを繰り返すはずであ
るが、図28に示すように、パターンが乱れる箇所があ
れば、縞の曲がり欠陥が存在すると判定する。次の実施
例では、この波形のパターンについて、その周期性を利
用して欠陥を検出する方法について説明する。
For example, when the striped portion is a straight line, the non-defective pattern of the differential direction values should have the same differential direction values aligned with AAAA, as shown in FIG. 27. As described above, if there is a portion that becomes A-B-C-C-A-D-E-A, it is determined that there is a fringe bending defect. Further, when the striped portion is a waveform, the good product pattern of the differential direction value should repeat the same pattern periodically as shown in FIG. 27. However, as shown in FIG. 28, if there is a portion where the pattern is disturbed. , It is determined that there is a stripe defect. In the next embodiment, a method of detecting a defect in the pattern of this waveform by utilizing its periodicity will be described.

【0044】(実施例10)本実施例は、縞部が波形の
場合について、その周期性を利用して検査精度を高める
方法である。波形の縞の良品変化パターンは、例えば、
図27に示すように、特徴画像の左からA−B−C−D
−E−F−A−B−C−D−E−F−A−B−Cのよう
に周期的に変化する。この例では、6画素毎に同じ微分
方向値が出現することが良品パターンから判断される。
したがって、良品画像の場合、6画素毎に微分方向値の
差をとると、A−A=0、B−B=0、…、F−F=0
というように、微分方向値の差は常に0となる。一方、
縞の曲がり欠陥が発生すると、例えば、図28に示すよ
うに、微分方向値の変化パターンは、特徴画像の左から
A−B−C−D−E−F−C−A−A−A−E−F−A
−B−Cとなり、6画素毎に微分方向値の差をとると、
差分の絶対値が少なくとも1以上となる箇所が存在す
る。そこで、この微分方向値の差の値を比較することで
縞の曲がりの欠陥を検出することが可能となる。
(Embodiment 10) This embodiment is a method for improving the inspection accuracy by utilizing the periodicity of the case where the stripe portion is a waveform. The non-defective change pattern of the waveform stripe is, for example,
As shown in FIG. 27, from the left of the characteristic image, ABCD
-E-F-A-B-C-D-D-E-F-A-B-C changes periodically. In this example, it is determined from the non-defective pattern that the same differential direction value appears every 6 pixels.
Therefore, in the case of a non-defective image, if the differential direction values are taken every 6 pixels, A−A = 0, BB = 0, ..., F−F = 0
Thus, the difference between the differential direction values is always 0. on the other hand,
When a striped bending defect occurs, for example, as shown in FIG. 28, the differential direction value change pattern is A-B-C-D-E-F-C-A-A-A- from the left of the characteristic image. E-F-A
-B-C, and if the difference in differential direction value is taken for every 6 pixels,
There is a location where the absolute value of the difference is at least 1. Therefore, by comparing the values of the difference between the differential direction values, it becomes possible to detect the defect of the stripe bending.

【0045】図32〜図34は本実施例による処理の詳
細を示しており、図32は良品パターンの微分方向値の
差分の配列の作成処理、図33は被検査画像での微分方
向値の差分の配列の作成処理、図34は微分方向値の差
分の良品パターンと被検査画像の微分方向値の差分の変
化パターンの比較処理をそれぞれ示している。
32 to 34 show the details of the processing according to the present embodiment. FIG. 32 is a processing for creating an array of differences in the differential direction values of non-defective patterns, and FIG. 33 is a diagram showing the differential direction values in the image to be inspected. FIG. 34 shows the difference array creation processing, and FIG. 34 shows the comparison processing of the difference pattern of the differential direction value difference and the change pattern of the differential direction value difference of the inspection image.

【0046】まず、図32の良品パターンの微分方向値
の差分の配列の作成処理では、図29の微分方向値の良
品パターンを取得した後、ある設定画素だけ離した画素
の微分方向値の差分を算出し、微分方向値の差分の配列
に追加する。これを検査ラインの終点まで繰り返すこと
により、検査ラインLnの微分方向値の差分の変化パタ
ーンとして記憶し、同じことを全検査ラインについて実
施する。
First, in the process of creating the differential direction value difference array of the non-defective pattern of FIG. 32, the non-defective pattern of the differential direction values of FIG. 29 is acquired, and then the differential direction value difference of the pixels separated by a certain set pixel is obtained. Is calculated and added to the array of differential direction value differences. By repeating this to the end point of the inspection line, it is stored as a change pattern of the difference in the differential direction value of the inspection line Ln, and the same is performed for all the inspection lines.

【0047】次に、図33の被検査画像での微分方向値
の差分の配列の作成処理では、図30の被検査画像に対
する微分方向値の変化パターンを取得した後、ある設定
画素だけ離した画素の微分方向値の差分を算出し、微分
方向値の差分の配列に追加する。これを特徴ラインの終
点まで繰り返すことにより、特徴ラインの微分方向値の
差分の変化パターンとして記憶し、同じことを全特徴ラ
インについて実施する。
Next, in the process of creating the array of the differential direction value differences in the image to be inspected in FIG. 33, after the change pattern of the differential direction values to the image to be inspected in FIG. 30 is acquired, a certain set pixel is separated. The difference between the differential direction values of the pixels is calculated and added to the array of differential direction value differences. By repeating this up to the end point of the characteristic line, it is stored as a change pattern of the difference in the differential direction value of the characteristic line, and the same thing is performed for all the characteristic lines.

【0048】次に、図34の微分方向値の差分の良品パ
ターンと被検査画像の微分方向値の差分の変化パターン
の比較処理では、図32の処理で得られた微分方向値の
差分の良品パターン配列と、図33の処理で得られた被
検査画像の微分方向値の差分の変化パターンを比較し、
良品の微分方向値の差分と被検査画像の微分方向値の差
分が一致していれば、次の画素を照合し、予め記憶して
おいた配列の全てについて微分方向値の差分が一致して
いれば、良品候補と判定し、同じ処理を全検査ラインに
ついて同様に実施する。いずれかの検査ラインのいずれ
かの画素において、良品の微分方向値の差分と被検査画
像の微分方向値の差分とが一致しなければ、縞の曲がり
欠陥が存在するとして、不良と判定する。なお、本実施
例では、波形の1周期と差分を取るための設定画素数を
一致させる例を示したが、設定画素数は波形の1周期に
限定されるものではない。
Next, in the comparison processing of the non-defective product pattern of the differential direction value difference of FIG. 34 and the change pattern of the differential direction value difference of the image to be inspected, the non-defective product of the differential direction value difference obtained in the process of FIG. The pattern array is compared with the change pattern of the difference in the differential direction value of the image to be inspected obtained by the processing of FIG. 33,
If the difference in the differential direction value of the non-defective product and the difference in the differential direction value of the image to be inspected match, the next pixel is checked, and the difference in the differential direction value is the same for all of the arrays stored in advance. If so, it is determined to be a good product candidate, and the same processing is similarly performed for all inspection lines. If the difference in the differential direction value of the non-defective product and the difference in the differential direction value of the image to be inspected do not match in any pixel of any of the inspection lines, it is determined that there is a bending defect of stripes and it is determined as defective. In the present embodiment, an example in which the number of set pixels for obtaining a difference is made equal to one period of the waveform, but the number of set pixels is not limited to one period of the waveform.

【0049】(実施例11)図35は本発明の実施例1
1の説明図である。本実施例は、良品画像から求めた検
査ライン上に濃度測定用ウィンドウを設置し、被検査画
像の各画素間の濃度を比較する。図示された例では、濃
度測定用ウィンドウとして縦1画素×横4画素のスティ
ックマスクを検査ラインに沿って設置している。スティ
ックマスクはこの濃度差比較を行いながら検査ライン上
を始点から終点まで移動する。図中、白丸は縞部画素、
黒丸は背景部画素を示している。良品の場合には、ステ
ィックマスクが縞のエッジ部を移動することになり、濃
度差は小さな値を持つことになる。ところが、縞の曲が
り・とぎれなどの欠陥がある箇所になるところでは、ス
ティックマスクが縞のエッジ部と背景部にかかることに
なり、ここに濃度差が生じる。この濃度差に着目するこ
とで、縞の曲がり・とぎれの欠陥を検出することが可能
となる。
(Embodiment 11) FIG. 35 shows Embodiment 1 of the present invention.
It is explanatory drawing of 1. In this embodiment, a density measuring window is installed on the inspection line obtained from the non-defective image, and the densities of the respective pixels of the image to be inspected are compared. In the illustrated example, a stick mask of vertical 1 pixel × horizontal 4 pixels is installed along the inspection line as a density measurement window. The stick mask moves from the start point to the end point on the inspection line while performing the density difference comparison. In the figure, white circles are stripe pixels,
Black circles indicate background pixels. In the case of a non-defective product, the stick mask moves along the edge portion of the stripe, and the density difference has a small value. However, at a place where there is a defect such as bending and breaking of stripes, the stick mask is applied to the edge portion and the background portion of the stripe, resulting in a density difference. By paying attention to this density difference, it becomes possible to detect the defect of fringe bending / break.

【0050】図36は本実施例による処理の詳細を示し
ている。まず、図15で説明した手法により被検査対象
画像を走査して、縞成分画素を探索する。すなわち、
「微分値が所定値以上でなおかつエッジ延長フラグが存
在する画素」という条件を満たす画素を被検査対象画像
における縞成分画素とし、この縞成分画素を通るように
検査ラインを設定するものであるが、その際、「良品画
像から検査ラインを作成するときに検出した縞成分画素
と被検査対象画像で検出した縞成分画素の微分方向値の
差が設定値より小さい。」という条件を満たすことを確
認することにより、異なる縞に対する検査ラインの設定
を防止する。この検査ライン上に図35に示すようにス
ティックマスクを設置し、スティックマスク上での濃度
差を算出する。濃度差がある設定値以上であれば不良と
判定する。濃度差がある設定値以上でなければ、スティ
ックマスクを次の画素に移動させながら濃度差の比較を
繰り返し、検査ラインの始点から終点までスティックマ
スクを移動させる。以上の処理を次の検査ラインについ
ても同様に繰り返し、すべての検査ラインについて不良
が発見されなければ、良品と判定される。
FIG. 36 shows details of the processing according to this embodiment. First, the image to be inspected is scanned by the method described with reference to FIG. 15 to search for stripe component pixels. That is,
Pixel components in the image to be inspected are defined as pixels that satisfy the condition "a pixel whose differential value is greater than or equal to a predetermined value and an edge extension flag exists", and an inspection line is set so as to pass through these stripe component pixels. At that time, the condition that "the difference between the differential direction values of the stripe component pixels detected when creating the inspection line from the non-defective image and the stripe component pixels detected in the image to be inspected is smaller than the set value" is satisfied. The confirmation prevents the setting of inspection lines for different stripes. A stick mask is installed on this inspection line as shown in FIG. 35, and the density difference on the stick mask is calculated. If the density difference is equal to or larger than a set value, it is determined to be defective. If the density difference is not equal to or more than a set value, the density difference comparison is repeated while moving the stick mask to the next pixel, and the stick mask is moved from the start point to the end point of the inspection line. The above process is similarly repeated for the next inspection line, and if no defect is found in all the inspection lines, it is determined as a non-defective product.

【0051】(実施例12)図37は本発明の実施例1
2による処理を示すフローチャートであり、上述の実施
例11の濃度差を縞1本毎に加算する点を特徴とする。
実施例11では、スティックマスク上の画素間で濃度比
較を行うことで欠陥検出を行っているが、この場合、1
画素から2画素程度のゴミなどの影響により良品部であ
っても大きな濃度差が現れることがある。ところが、実
際の縞の曲がりにおいては、例えば、分解能が500μ
mの場合、10画素程度の大きさを持つため、濃度比較
を行った際に複数回濃度差が大きくなることが考えられ
る。そこで、この濃度差を縞1本ごとに蓄積することで
良品部との差を大きくすることができ、検査の信頼性の
向上を図ることができる。
(Embodiment 12) FIG. 37 shows Embodiment 1 of the present invention.
13 is a flowchart showing a process according to No. 2, and is characterized in that the density difference of the above-described Embodiment 11 is added for each stripe.
In the eleventh embodiment, the defect is detected by comparing the densities of the pixels on the stick mask.
A large density difference may appear even in a non-defective part due to the influence of dust or the like from pixels to about 2 pixels. However, in actual bending of stripes, for example, the resolution is 500 μ.
In the case of m, since it has a size of about 10 pixels, it is considered that the density difference becomes large a plurality of times when the density comparison is performed. Therefore, by accumulating this density difference for each stripe, the difference from the non-defective part can be increased, and the reliability of the inspection can be improved.

【0052】図37のフローチャートと図36のフロー
チャートの相違点は、濃度差がある設定値以上と判定さ
れたときに、図36では直ちに不良と判定していたとこ
ろを、図37では濃度差を加算して、その総和がある設
定値以上となったときに不良と判定している点が異な
る。なお、加算された濃度差の総和は1本の検査ライン
についての検査が終了するたびに初期値0にリセットさ
れるので、縞1本毎に濃度差の総和を加算していること
になる。これにより、真の欠陥部と良品部とを区別する
ことができる。
The difference between the flowchart of FIG. 37 and the flowchart of FIG. 36 is that when it is determined that the density difference is greater than or equal to a set value, in FIG. The difference is that when they are added and the total sum exceeds a certain set value, it is determined to be defective. Since the added sum of the density differences is reset to the initial value 0 every time the inspection for one inspection line is completed, the sum of the density differences is added for each stripe. This makes it possible to distinguish the true defective portion from the non-defective portion.

【0053】[0053]

【発明の効果】請求項1の発明によれば、良品の画像か
ら抽出された縞の特徴ラインを被検査対象画像に対する
検査ラインとしたので、任意の縞模様の検査対象物に対
して、検査ラインを自動的に設定することができ、この
検査ライン上を検査することにより、縞部分の欠陥を検
出することができる。請求項2の発明によれば、検査ラ
イン上に任意の大きさのウィンドウを設定し、該ウィン
ドウ内で縞の成分画素を探索するようにしたので、ウィ
ンドウの大きさを適切に設計することにより、良品レベ
ルの微細な曲がりやとぎれを許容することができる。
According to the invention of claim 1, since the characteristic line of the stripe extracted from the image of the non-defective product is used as the inspection line for the image to be inspected, the object to be inspected having an arbitrary striped pattern is inspected. The line can be set automatically, and the defect on the stripe portion can be detected by inspecting on this inspection line. According to the invention of claim 2, a window having an arbitrary size is set on the inspection line, and the component pixels of the stripe are searched in the window. Therefore, by appropriately designing the size of the window, It is possible to tolerate fine bends and breaks on a non-defective level.

【0054】請求項3の発明によれば、検査ラインから
の距離を算出し、算出された距離が連続してある設定値
以上である場合にその距離を加算し、加算された距離が
所定値以上であるときには欠陥があると判定するように
したので、1点だけで見ると微細な変化であっても、連
続した場合には曲がりとして不良と判定されるような欠
陥を検出できる。請求項4の発明によれば、検査ライン
からの距離を蓄積し、縞1本分毎に合計することにより
良品との差を大きくし、検査精度を向上させることがで
きるので、縞1本として見たときに不良と判定されるよ
うな微細な縞の曲がりの欠陥を検出することができる。
請求項5の発明によれば、検査ラインからの距離を蓄積
し、すべての縞について合計することにより良品との差
を大きくし、検査精度を向上させることができるので、
縞全体として見たときに不良と判定されるような微細な
縞の曲がりの欠陥を検出することができる。
According to the invention of claim 3, the distance from the inspection line is calculated, and when the calculated distance is continuously equal to or more than a set value, the distance is added, and the added distance is a predetermined value. Since it is determined that there is a defect when the above is the case, it is possible to detect a defect that is judged to be defective as a bend when it is continuous even if it is a minute change when viewed from only one point. According to the invention of claim 4, since the distance from the inspection line is accumulated and summed up for each stripe, the difference from the non-defective product can be increased and the inspection accuracy can be improved. It is possible to detect a defect of a fine stripe bending that is judged to be defective when viewed.
According to the invention of claim 5, by accumulating the distance from the inspection line and summing all the stripes, the difference from the non-defective product can be increased and the inspection accuracy can be improved.
It is possible to detect a defect such as a minute bending of a stripe that is determined to be defective when viewed as the entire stripe.

【0055】請求項6の発明によれば、縞の成分画素が
検出されなかった回数が所定値を越える場合に欠陥があ
ると判定することにより、縞のとぎれの欠陥を検出でき
る。請求項7の発明によれば、縞の成分画素が連続して
検出されなかった場合にその連続回数が所定値を越える
場合に縞のとぎれを検出するようにしたから、複数箇所
でのゴミなどの影響により複数点の縞成分画素が検出さ
れない場合に不良となることを防止し、検査精度を上げ
ることができる。請求項8の発明によれば、縞の成分画
素が検出されなかった場合にその画素数を縞全体で加算
し、とぎれ画素数の総和が縞全体として所定値以上であ
れば不良と判定するものであるから、縞全体を見ること
で良品の部分的なばらつきを吸収し、不良の有無を正し
く認識することができる。
According to the invention of claim 6, when the number of times that the component pixel of the stripe is not detected exceeds a predetermined value, it is determined that there is a defect, so that the defect of the stripe discontinuity can be detected. According to the invention of claim 7, when the stripe component pixel is not continuously detected, the break of the stripe is detected when the number of consecutive times exceeds a predetermined value. It is possible to prevent the defect from occurring when the stripe component pixels at a plurality of points are not detected due to the influence of, and to improve the inspection accuracy. According to the invention of claim 8, when the component pixel of the stripe is not detected, the number of pixels is added to the entire stripe, and if the total number of the broken pixels is equal to or more than a predetermined value for the entire stripe, it is determined to be defective. Therefore, by observing the entire stripe, it is possible to absorb the partial variation of non-defective products and correctly recognize the presence or absence of defects.

【0056】請求項9の発明によれば、良品画像から求
められた検査ライン上の各画素について、微分方向値の
良品パターンを予め作成し、被検査画像の特徴ライン上
の各画素について作成した微分方向値の変化パターンと
比較することにより、縞の曲がりの欠陥を微分方向値の
変化パターンの乱れとして検出することができる。請求
項10の発明によれば、微分方向値の変化パターンを比
較する際に、予め設定された画素毎に求めた微分方向値
の差分に着目したので、波形の縞模様のように周期性を
有する縞の検査に利用すれば、周期性の乱れを利用して
縞部の欠陥を検出することができる。
According to the ninth aspect of the present invention, a non-defective pattern of differential direction values is created in advance for each pixel on the inspection line obtained from the non-defective image, and created for each pixel on the characteristic line of the inspected image. By comparing with the change pattern of the differential direction value, the defect of the stripe bending can be detected as the disturbance of the change pattern of the differential direction value. According to the tenth aspect of the invention, when comparing the change patterns of the differential direction values, attention is paid to the difference between the differential direction values obtained for each pixel set in advance. If it is used to inspect the fringes that it has, it is possible to detect the defect in the fringe portion by utilizing the disorder of the periodicity.

【0057】請求項11の発明によれば、検査ライン上
に任意の大きさの濃度測定用のウィンドウを設定し、こ
のウィンドウを検査ラインに沿って移動させながらウィ
ンドウの各画素間の濃度差を求めることにより、縞上の
欠陥を検出するようにしたから、縞の曲がりやとぎれを
検出することができる。請求項12の発明によれば、濃
度差を加算して、良品との差を大きくすることにより、
検査精度の向上を図り、縞上の微細な欠陥を検出でき
る。
According to the eleventh aspect of the present invention, a window for density measurement having an arbitrary size is set on the inspection line, and while the window is moved along the inspection line, the density difference between the pixels of the window is determined. Since the defect on the stripe is detected by the determination, it is possible to detect the bending or the break of the stripe. According to the invention of claim 12, by adding the density difference to increase the difference from the non-defective product,
It is possible to improve inspection accuracy and detect fine defects on stripes.

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

【図1】本発明の外観検査方法が検査対象とする縞模様
とその欠陥を例示的に示す正面図である。
FIG. 1 is a front view exemplifying a striped pattern to be inspected by a visual inspection method of the present invention and its defects.

【図2】本発明の外観検査方法を実施するための装置の
概観を示す斜視図である。
FIG. 2 is a perspective view showing an overview of an apparatus for carrying out the appearance inspection method of the present invention.

【図3】本発明の外観検査方法を実施するためのシステ
ム構成を示すブロック図である。
FIG. 3 is a block diagram showing a system configuration for implementing the appearance inspection method of the present invention.

【図4】本発明の外観検査方法を実施するための画像処
理装置の詳細な構成を示すブロック図である。
FIG. 4 is a block diagram showing a detailed configuration of an image processing apparatus for carrying out the appearance inspection method of the present invention.

【図5】図4の画像処理装置で用いる局所並列ウィンド
ウの説明図である。
5 is an explanatory diagram of a local parallel window used in the image processing apparatus of FIG.

【図6】図4の画像処理装置で作成する微分画像の説明
図である。
6 is an explanatory diagram of a differential image created by the image processing apparatus of FIG.

【図7】図4の画像処理装置で作成するエッジ画像の説
明図である。
7 is an explanatory diagram of an edge image created by the image processing apparatus of FIG.

【図8】本発明の実施例1で用いる縞探索ラインの説明
図である。
FIG. 8 is an explanatory diagram of fringe search lines used in the first embodiment of the present invention.

【図9】図3の画像処理装置で使用する微分方向値の説
明図である。
9 is an explanatory diagram of differential direction values used in the image processing apparatus of FIG.

【図10】本発明の実施例1による縞成分画素の追跡方
法を示す説明図である。
FIG. 10 is an explanatory diagram showing a method of tracking fringe component pixels according to the first embodiment of the present invention.

【図11】本発明の実施例1の検査ラインを用いた検査
方法の説明図である。
FIG. 11 is an explanatory diagram of an inspection method using the inspection line according to the first embodiment of the present invention.

【図12】本発明の実施例1の縞探索ライン上で縞成分
画素を走査する処理を示すフローチャートである。
FIG. 12 is a flowchart showing a process of scanning stripe component pixels on a stripe search line according to the first embodiment of the present invention.

【図13】本発明の実施例1の追跡処理を示すフローチ
ャートである。
FIG. 13 is a flowchart showing tracking processing according to the first embodiment of the present invention.

【図14】本発明の実施例2の縞成分検出用ウィンドウ
を用いた縞成分画素の探索方法を示す説明図である。
FIG. 14 is an explanatory diagram showing a method of searching for stripe component pixels using a stripe component detection window according to the second embodiment of the present invention.

【図15】本発明の実施例2の縞探索ライン上で縞成分
画素を走査する処理を示すフローチャートである。
FIG. 15 is a flowchart showing a process of scanning stripe component pixels on a stripe search line according to the second embodiment of the present invention.

【図16】本発明の実施例2の縞の検査ライン上での縞
成分画素の探索処理を示すフローチャートである。
FIG. 16 is a flowchart showing a process for searching for stripe component pixels on a stripe inspection line according to the second embodiment of the present invention.

【図17】本発明の実施例3における検査ラインからの
距離の算出とその加算方法を示す説明図である。
FIG. 17 is an explanatory diagram showing a method of calculating a distance from an inspection line and an addition method thereof according to the third embodiment of the present invention.

【図18】本発明の実施例3の処理を示すフローチャー
トである。
FIG. 18 is a flowchart showing a process of Example 3 of the present invention.

【図19】本発明の実施例4の処理を示すフローチャー
トである。
FIG. 19 is a flowchart showing the processing of the fourth embodiment of the present invention.

【図20】本発明の実施例5の処理を示すフローチャー
トである。
FIG. 20 is a flowchart showing a process of a fifth embodiment of the present invention.

【図21】本発明の実施例6の説明図である。FIG. 21 is an explanatory diagram of Example 6 of the present invention.

【図22】本発明の実施例6の処理を示すフローチャー
トである。
FIG. 22 is a flowchart showing the processing of the sixth embodiment of the present invention.

【図23】本発明の実施例7の説明図である。FIG. 23 is an explanatory diagram of Example 7 of the present invention.

【図24】本発明の実施例7の処理を示すフローチャー
トである。
FIG. 24 is a flowchart showing the processing of the seventh embodiment of the present invention.

【図25】本発明の実施例8の説明図である。FIG. 25 is an explanatory diagram of Example 8 of the present invention.

【図26】本発明の実施例8の処理を示すフローチャー
トである。
FIG. 26 is a flowchart showing a process of Example 8 of the present invention.

【図27】本発明の実施例9で作成する微分方向値の良
品変化パターンを例示的に示す説明図である。
FIG. 27 is an explanatory diagram exemplarily showing a non-defective product change pattern of differential direction values created in Example 9 of the present invention.

【図28】本発明の実施例9で検出する縞の曲がり欠陥
発生時の変化パターンを例示的に示す説明図である。
FIG. 28 is an explanatory diagram exemplarily showing a change pattern when a fringe bending defect is detected, which is detected in Example 9 of the present invention.

【図29】本発明の実施例9の微分方向値の良品パター
ンの作成処理を示すフローチャートである。
FIG. 29 is a flow chart showing a process for creating a non-defective pattern of differential direction values according to the ninth embodiment of the present invention.

【図30】本発明の実施例9の被検査画像での微分方向
値パターンの抽出処理を示すフローチャートである。
FIG. 30 is a flowchart showing a process of extracting a differential direction value pattern from an image to be inspected according to Example 9 of the present invention.

【図31】本発明の実施例9の微分方向値の良品パター
ンと被検査画像での微分方向値パターンの比較処理を示
すフローチャートである。
FIG. 31 is a flow chart showing a process of comparing a non-defective product pattern of differential direction values and a differential direction value pattern in an image to be inspected of Example 9 of the present invention.

【図32】本発明の実施例10の良品パターンの微分方
向値の差分の配列の作成処理を示すフローチャートであ
る。
FIG. 32 is a flowchart showing a process of creating an array of differences in differential direction values of non-defective patterns according to the tenth embodiment of the present invention.

【図33】本発明の実施例10の被検査画像での微分方
向値の差分の配列の作成処理を示すフローチャートであ
る。
FIG. 33 is a flowchart showing a process of creating an array of differential direction value differences in an image to be inspected according to Example 10 of the present invention.

【図34】本発明の実施例10の微分方向値の差分の良
品パターンと被検査画像の変化パターンの比較処理を示
すフローチャートである。
FIG. 34 is a flow chart showing a process of comparing a non-defective pattern of a difference in differential direction value and a change pattern of an image to be inspected with each other in Example 10 of the present invention.

【図35】本発明の実施例11及び12における画素間
の濃度比較方法を示す説明図である。
FIG. 35 is an explanatory diagram showing a method of comparing densities between pixels in Examples 11 and 12 of the present invention.

【図36】本発明の実施例11の処理を示すフローチャ
ートである。
FIG. 36 is a flowchart showing the processing of the eleventh embodiment of the present invention.

【図37】本発明の実施例12の処理を示すフローチャ
ートである。
FIG. 37 is a flow chart showing processing of embodiment 12 of the present invention.

【符号の説明】[Explanation of symbols]

1 CCDカメラ 2 被検査物 3 LED光源 4 画像処理装置 1 CCD camera 2 Inspected 3 LED light source 4 Image processing device

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平10−208066(JP,A) 特開 平4−188800(JP,A) 特開 平1−207878(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06T 1/00 300 G01N 21/88 ─────────────────────────────────────────────────── ─── Continuation of the front page (56) Reference JP 10-208066 (JP, A) JP 4-188800 (JP, A) JP 1-207878 (JP, A) (58) Field (Int.Cl. 7 , DB name) G06T 1/00 300 G01N 21/88

Claims (12)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 縞模様を有する検査対象物の縞部分に
発生する欠陥を検出するための検査方法であって、 検査対象物を撮像する工程と、 撮像により得られた濃淡画像に対して少なくとも微分処
理を含む前処理を施して濃淡変化を特徴抽出した画像を
取得する工程と、 特徴抽出された良品の画像に対して、縞と交わるように
予め設定された縞探索ライン上を走査して縞の成分画素
を検出し、検出された縞の成分画素を起点として縞の成
分画素を追跡処理することにより縞の特徴ラインを背景
から分離して抽出する工程と、 良品の画像から抽出された縞の特徴ラインを被検査対象
画像に対する検査ラインとし、検査ラインに沿って被検
査対象画像を検査することによって欠陥を検出する工程
とを有することを特徴とする外観検査方法。
1. An inspection method for detecting a defect occurring in a striped portion of an inspection object having a striped pattern, comprising a step of imaging the inspection object, and at least a grayscale image obtained by the imaging. A process of performing pre-processing including differential processing to obtain an image in which the grayscale changes are feature-extracted, and the feature-extracted non-defective image is scanned on a preset stripe search line so as to intersect the stripes. The process of detecting the stripe component pixels and separating the feature lines of the stripe from the background by tracing the stripe component pixels starting from the detected stripe component pixels, and the process of extracting from the good image An appearance inspection method comprising: a step of detecting a defect by inspecting an image to be inspected along the inspection line, using a stripe characteristic line as an inspection line to the image to be inspected.
【請求項2】 欠陥を検出する工程では、検査ライン
上に任意の大きさの縞成分検出用のウィンドウを設定
し、このウィンドウを検査ラインに沿って移動させなが
らウィンドウ内で縞の成分画素が検出されるか否かを判
定することを特徴とする請求項1記載の外観検査方法。
2. In the step of detecting a defect, a window for detecting a stripe component having an arbitrary size is set on the inspection line, and while the window is moved along the inspection line, the stripe component pixel is detected in the window. The appearance inspection method according to claim 1, wherein it is determined whether or not it is detected.
【請求項3】 縞成分検出用のウィンドウ内に縞の成
分画素が検出されたときに、検出された縞の成分画素と
検査ラインとの距離を算出し、算出された距離が連続し
てある設定値以上である場合にその距離を加算し、加算
された距離が所定値以上であるときには欠陥があると判
定することを特徴とする請求項2記載の外観検査方法。
3. When a stripe component pixel is detected in a stripe component detection window, the distance between the detected stripe component pixel and the inspection line is calculated, and the calculated distances are continuous. 3. The appearance inspection method according to claim 2, wherein when the distance is equal to or larger than a set value, the distance is added, and when the added distance is equal to or larger than a predetermined value, it is determined that there is a defect.
【請求項4】 縞成分検出用のウィンドウ内に縞の成
分画素が検出されたときに、検出された縞の成分画素と
検査ラインとの距離を算出し、算出された距離を縞1本
分毎に加算し、加算された距離が縞1本分に対する許容
値として予め決められた所定値以上であるときには欠陥
があると判定することを特徴とする請求項2記載の外観
検査方法。
4. When a stripe component pixel is detected in a stripe component detection window, the distance between the detected stripe component pixel and the inspection line is calculated, and the calculated distance is equivalent to one stripe. 3. The appearance inspection method according to claim 2, wherein the defects are determined to be defective when the added distance is equal to or larger than a predetermined value that is a predetermined allowable value for one stripe.
【請求項5】 縞成分検出用のウィンドウ内に縞の成
分画素が検出されたときに、検出された縞の成分画素と
検査ラインとの距離を算出し、算出された距離をすべて
の縞について加算し、加算された距離が縞全体に対する
許容値として予め決められた所定値以上であるときには
欠陥があると判定することを特徴とする請求項2記載の
外観検査方法。
5. When a stripe component pixel is detected in the stripe component detection window, the distance between the detected stripe component pixel and the inspection line is calculated, and the calculated distance is calculated for all stripes. 3. The appearance inspection method according to claim 2, wherein when the added distances are equal to or more than a predetermined value that is predetermined as an allowable value for the entire stripe, it is determined that there is a defect.
【請求項6】 縞成分検出用のウィンドウ内に縞の成
分画素が検出されなかったときに、その回数を計数し、
計数値が縞のとぎれの許容値として予め決められた所定
値を越えるときは欠陥があると判定することを特徴とす
る請求項2記載の外観検査方法。
6. When the stripe component pixel is not detected within the stripe component detection window, the number of times is counted,
3. The appearance inspection method according to claim 2, wherein it is determined that there is a defect when the count value exceeds a predetermined value that is predetermined as a permissible value of the stripe break.
【請求項7】 縞成分検出用のウィンドウ内に縞の成
分画素が連続して検出されなかったときに、その連続回
数を計数し、計数値が縞のとぎれの許容値として予め決
められた所定値を越えるときは欠陥があると判定するこ
とを特徴とする請求項2記載の外観検査方法。
7. When a stripe component pixel is not continuously detected in a stripe component detection window, the number of consecutive stripes is counted, and the counted value is a predetermined value determined as an allowable value of the stripe break. The appearance inspection method according to claim 2, wherein when the value exceeds the value, it is determined that there is a defect.
【請求項8】 縞成分検出用のウィンドウ内に縞の成
分画素が検出されなかったときに、その回数を縞全体に
ついて計数し、計数値が縞全体に対する許容値として予
め決められた所定値を越えるときは欠陥があると判定す
ることを特徴とする請求項2記載の外観検査方法。
8. When a stripe component pixel is not detected in the stripe component detection window, the number of times is counted for the entire stripe, and the count value is a predetermined value which is predetermined as an allowable value for the entire stripe. 3. The appearance inspection method according to claim 2, wherein when it exceeds, it is determined that there is a defect.
【請求項9】 良品の画像から抽出された検査ライン
の各画素について、濃淡変化の方向を示す微分方向値の
変化パターンを予め基準パターンとして作成し、被検査
画像から抽出された縞の特徴ラインの各画素について求
めた微分方向値の変化パターンを前記基準パターンと比
較し、その相違点を検出することにより縞の欠陥を検出
することを特徴とする請求項1記載の外観検査方法。
9. A characteristic line of stripes extracted from an image to be inspected, in which a change pattern of a differential direction value indicating a direction of a change in shading is created in advance as a reference pattern for each pixel of an inspection line extracted from a non-defective image. 2. The appearance inspection method according to claim 1, wherein the variation pattern of the differential direction value obtained for each pixel is compared with the reference pattern and the difference is detected to detect the stripe defect.
【請求項10】 良品の画像から抽出された検査ライ
ンの各画素について、濃淡変化の方向を示す微分方向値
の変化パターンを予め基準パターンとして作成し、この
基準パターンについて予め設定された画素離れた位置で
の微分方向値の差分を予め基準差分として求めておき、
被検査画像から抽出された縞の特徴ラインの各画素につ
いて求めた微分方向値の変化パターンについて前記基準
差分を求めたときと同じ画素離れた位置での微分方向値
の差分のパターンを求め、基準差分と比較し、その相違
点を検出することにより縞の欠陥を検出することを特徴
とする請求項1記載の外観検査方法。
10. For each pixel of the inspection line extracted from the image of the non-defective product, a change pattern of the differential direction value indicating the direction of the change in gray scale is created in advance as a reference pattern, and pixels set in advance for the reference pattern are separated from each other. The difference in the differential direction value at the position is obtained in advance as the reference difference,
Obtain a differential direction value difference pattern at the same pixel distant position as the reference difference for the change pattern of the differential direction value obtained for each pixel of the striped characteristic line extracted from the image to be inspected. The appearance inspection method according to claim 1, wherein the defect of the stripe is detected by comparing the difference with the difference and detecting the difference.
【請求項11】 欠陥を検出する工程では、検査ライ
ン上に任意の大きさの濃度測定用のウィンドウを設定
し、このウィンドウを検査ラインに沿って移動させなが
らウィンドウの各画素間の濃度差を求めることにより、
縞上の欠陥を検出することを特徴とする請求項1記載の
外観検査方法。
11. In the step of detecting a defect, a window for density measurement having an arbitrary size is set on an inspection line, and while the window is moved along the inspection line, the density difference between pixels of the window is measured. By asking
The appearance inspection method according to claim 1, wherein defects on the stripes are detected.
【請求項12】 濃度測定用のウィンドウの各画素間
の濃度差を加算し、加算された濃度差の総和が予め決め
られた所定値以上であるときには欠陥があると判定する
ことを特徴とする請求項11記載の外観検査方法。
12. A density difference between pixels of a density measurement window is added, and it is determined that there is a defect when the total sum of the added density differences is equal to or more than a predetermined value. The appearance inspection method according to claim 11.
JP30279298A 1998-10-23 1998-10-23 Appearance inspection method Expired - Lifetime JP3509581B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP30279298A JP3509581B2 (en) 1998-10-23 1998-10-23 Appearance inspection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP30279298A JP3509581B2 (en) 1998-10-23 1998-10-23 Appearance inspection method

Publications (2)

Publication Number Publication Date
JP2000132685A JP2000132685A (en) 2000-05-12
JP3509581B2 true JP3509581B2 (en) 2004-03-22

Family

ID=17913183

Family Applications (1)

Application Number Title Priority Date Filing Date
JP30279298A Expired - Lifetime JP3509581B2 (en) 1998-10-23 1998-10-23 Appearance inspection method

Country Status (1)

Country Link
JP (1) JP3509581B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010237157A (en) * 2009-03-31 2010-10-21 Fujifilm Corp Surface inspection device
CN112489058A (en) * 2020-12-03 2021-03-12 山东承势电子科技有限公司 Efficient and accurate stripe direction estimation method

Also Published As

Publication number Publication date
JP2000132685A (en) 2000-05-12

Similar Documents

Publication Publication Date Title
US4974261A (en) Optical surface inspection method
JP6620477B2 (en) Method and program for detecting cracks in concrete
US6876445B2 (en) Method for analyzing defect data and inspection apparatus and review system
US6535621B1 (en) Defect integrated processing apparatus and method thereof
EP1867979B1 (en) Method and apparatus for recognizing repeating patterns
JP3324699B2 (en) Method and apparatus for measuring fiber diameter distribution
JP3890844B2 (en) Appearance inspection method
JPH06207909A (en) Inspection apparatus for surface defect
JP3509581B2 (en) Appearance inspection method
JP4293653B2 (en) Appearance inspection method
JP4403036B2 (en) Soot detection method and apparatus
JP3508518B2 (en) Appearance inspection method
JP2007057705A (en) Inspection method and inspection apparatus of display panel
JP3044951B2 (en) Circular container inner surface inspection device
JPH0718811B2 (en) Defect inspection method
JP4956077B2 (en) Defect inspection apparatus and defect inspection method
JP2686053B2 (en) Defect inspection method by visual inspection
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP2008026186A (en) Method and apparatus for detecting gaps by image processing
JP2006226834A (en) Surface inspection device and surface inspection method
JPH08190633A (en) Defect judging method
JP6185539B2 (en) Optical connector ferrule end face inspection device and inspection program
JP2004125629A (en) Defect detection apparatus
JPH0772909B2 (en) Welding condition judgment method by visual inspection
JP2011153874A (en) Apparatus, system and method for visual inspection

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20031209

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20031222

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

Free format text: PAYMENT UNTIL: 20080109

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090109

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090109

Year of fee payment: 5

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20090109

Year of fee payment: 5

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20100109

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100109

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110109

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 9

EXPY Cancellation because of completion of term