JP2007172397A - Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device - Google Patents

Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device Download PDF

Info

Publication number
JP2007172397A
JP2007172397A JP2005370889A JP2005370889A JP2007172397A JP 2007172397 A JP2007172397 A JP 2007172397A JP 2005370889 A JP2005370889 A JP 2005370889A JP 2005370889 A JP2005370889 A JP 2005370889A JP 2007172397 A JP2007172397 A JP 2007172397A
Authority
JP
Japan
Prior art keywords
edge gradient
target pixel
pixel
spot defect
comparison
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.)
Withdrawn
Application number
JP2005370889A
Other languages
Japanese (ja)
Inventor
Koichi Kojima
広一 小島
Hironari Ichikawa
裕也 市川
Takushi Murakami
拓史 村上
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2005370889A priority Critical patent/JP2007172397A/en
Publication of JP2007172397A publication Critical patent/JP2007172397A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an edge gradient detection method capable of detecting an edge gradient with high accuracy. <P>SOLUTION: This edge gradient detection method has: a first edge gradient calculation process S92 for finding a luminance change rate of a target pixel selected in an imaged image and each first comparison pixel disposed adjacently to the target pixel around the target pixel; a second edge gradient calculation process S93 for finding a luminance change rate of the target pixel selected in the imaged image and each second comparison pixel disposed apart from the target pixel as compared with the first comparison pixel around the target pixel; and an edge gradient composition process S96 for setting the luminance change rate having a maximum absolute value among the respective luminance change rates calculated in the first and second edge gradient calculation processes as an edge gradient value of the target pixel. Because finding and composing the edge gradient of the first comparison pixel adjacent to the target pixel and the edge gradient of the second comparison pixel, edge components in various kinds of directions each including even high frequency component can be easily detected with high accuracy. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、液晶パネル等の表示デバイスやその応用製品であるプロジェクタ等の製造における検査工程等の各種製品の検査工程において、エッジ勾配を精度よく自動的に検出するエッジ勾配検出方法及び装置と、このエッジ勾配検出方法及び装置を用いたシミ欠陥検出方法及び装置に関する。   The present invention provides an edge gradient detection method and apparatus that automatically and accurately detects an edge gradient in an inspection process of various products such as an inspection process in the manufacture of a display device such as a liquid crystal panel and its application product, such as a projector, The present invention relates to a spot defect detection method and apparatus using the edge gradient detection method and apparatus.

TFTパネル等のLCDパネル検査においてシミやムラと呼ばれる面系欠陥は、形状が不定でありコントラストも低いため、検査装置で自動検出することは困難であった。このため、検査は未だ検査員の目視で行われているのが現状であり、製造コスト削減のために検査の自動化が急務になっている。
なお、シミやムラ欠陥とは、表示画面のある領域が他の領域と輝度の差がある状態であり、ある程度の範囲で、周りに比べて明るい部分や暗い部分がある状態をいう。なお、通常、欠陥面積が比較的狭い場合をシミ欠陥、比較的大きい場合をムラ欠陥と呼ぶことが多い。但し、厳密な定義はないため、本発明では、シミ欠陥やムラ欠陥などの面系欠陥を総称してシミ欠陥と称する。
In the inspection of LCD panels such as TFT panels, surface defects called spots and unevenness are difficult to detect automatically with an inspection apparatus because of their indefinite shape and low contrast. For this reason, the inspection is still carried out by the inspector's visual observation, and there is an urgent need to automate the inspection in order to reduce manufacturing costs.
Note that a spot or uneven defect is a state in which an area on a display screen has a difference in luminance from other areas, and in a certain range, there is a brighter or darker part than the surrounding area. Usually, a case where the defect area is relatively small is often referred to as a spot defect, and a case where the defect area is relatively large is often referred to as a mura defect. However, since there is no strict definition, in the present invention, surface system defects such as a spot defect and a mura defect are collectively referred to as a spot defect.

このようなシミ欠陥を目視検査した場合の欠陥良品レベル判断では、欠陥の面積やコントラスト特徴量だけではなく、欠陥のエッジ部分の輝度変化率(エッジ勾配)も大きな影響を与える。従って、シミ欠陥を画像処理することで欠陥検査を自動化する場合も、欠陥のエッジ勾配を精度よく検出することが求められている。   When such a spot defect is visually inspected, the defect non-defective product level determination has a great influence not only on the defect area and contrast feature amount but also on the luminance change rate (edge gradient) of the edge portion of the defect. Accordingly, even when defect inspection is automated by performing image processing on a spot defect, it is required to accurately detect the edge gradient of the defect.

ところで、画像処理において、エッジ勾配を求める方法としては、従来より、ソーベル(Sobel)フィルタや、プレビット(Prewitt)フィルタを用いる方法が知られている(例えば、非特許文献1参照)。   By the way, as a method for obtaining an edge gradient in image processing, a method using a Sobel filter or a Prebitt filter has been conventionally known (for example, see Non-Patent Document 1).

これらの各フィルタは3×3のフィルタを用いることが多く、例えば、図19(A),(B)に示すプレビットフィルタのように、X方向のエッジ勾配を求めるfxフィルタと、Y方向のエッジ勾配を求めるfyフィルタとを用い、検査対象の画素(各フィルタの中心座標)の1画素前と1画素後ろの各画素の差分を求めて検査対象画素のエッジ勾配を求めている。   Each of these filters often uses a 3 × 3 filter. For example, as in the prebit filter shown in FIGS. 19A and 19B, an fx filter that obtains an edge gradient in the X direction, Using the fy filter for obtaining the edge gradient, the difference between each pixel one pixel before and one pixel behind the pixel to be inspected (center coordinates of each filter) is obtained to obtain the edge gradient of the pixel to be inspected.

高木幹雄,下田陽久監修、「画像解析ハンドブック」、初版、財団法人東京大学出版会、1991年1月17日、p.550−555Supervised by Mikio Takagi and Yoshihisa Shimoda, "Image Analysis Handbook", First Edition, The University of Tokyo Press, January 17, 1991, p.550-555

しかしながら、前記各フィルタは、検査対象画素の1画素前と1画素後ろの各画素の差分を求めて検査対象画素のエッジ勾配を求めているため、図20(A),(B)に示すように、輝度変化が異なる場合でも同じ輝度変化率(エッジ勾配)で検出してしまうことがあり、必ずしも精度が高いものではなかった。
すなわち、検査対象画素Bと、その1画素前画素A、1画素後画素Bの各輝度値が、例えば、図20(A)に示すように「0,1,2」と徐々に大きくなっている場合と、図20(B)に示すように「0,2,2」と急激に変化している場合に各フィルタを適用しても、いずれの結果もエッジ勾配(図20の勾配線ga、gb)は同じ傾きになってしまう。このように従来のフィルタでは、エッジ部分の輝度変化状態が異なる場合でも正確に検出できない場合があるという問題があった。
However, each of the filters obtains the edge gradient of the pixel to be inspected by obtaining the difference between each pixel one pixel before and one pixel behind the pixel to be inspected, and therefore, as shown in FIGS. 20 (A) and 20 (B). Even when the luminance change is different, detection may be performed with the same luminance change rate (edge gradient), and the accuracy is not necessarily high.
That is, the luminance values of the pixel B to be inspected, the pixel A before the pixel A, and the pixel B after the pixel are gradually increased to “0, 1, 2” as shown in FIG. Even if each filter is applied in the case where the filter is applied and when it is abruptly changed to “0, 2, 2” as shown in FIG. 20B, both results are the edge gradient (gradient line ga in FIG. 20). , Gb) have the same inclination. As described above, the conventional filter has a problem in that it may not be accurately detected even when the luminance change state of the edge portion is different.

さらに、3×3のフィルタを用いているため、検出できるエッジ勾配方向は8方向のみに限定され、それ以上の精度でエッジ勾配を検出することができないという問題もあった。   Furthermore, since a 3 × 3 filter is used, the edge gradient direction that can be detected is limited to only eight directions, and there is a problem that the edge gradient cannot be detected with higher accuracy.

また、エッジ勾配を精度よく検出できなかったため、シミ欠陥を自動的に検出する場合に、シミ欠陥も精度良く検出することができないという問題もあった。   In addition, since the edge gradient cannot be detected with high accuracy, there is also a problem that when the stain defect is automatically detected, the stain defect cannot be detected with high accuracy.

本発明は、上述のような課題に鑑みてなされたものであり、エッジ勾配を精度良く検出できるエッジ勾配検出方法及び装置と、シミ欠陥を精度良く検出できるシミ欠陥検出方法及び装置を提供することを目的とする。   The present invention has been made in view of the problems as described above, and provides an edge gradient detection method and apparatus capable of accurately detecting an edge gradient, and a stain defect detection method and apparatus capable of accurately detecting a spot defect. With the goal.

本発明のエッジ勾配検出方法は、撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素に隣接して配置された各第1比較画素との輝度変化率をそれぞれ求める第1エッジ勾配算出工程と、撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第1比較画素よりも離れて配置された各第2比較画素との輝度変化率をそれぞれ求める第2エッジ勾配算出工程と、前記第1および第2エッジ勾配算出工程で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とするエッジ勾配合成工程と、を備えることを特徴とする。   The edge gradient detection method of the present invention is a first method for obtaining a luminance change rate between a target pixel selected in a captured image and each first comparison pixel arranged around the target pixel and adjacent to the target pixel. Luminance change rates of the edge gradient calculation step, the target pixel selected in the captured image, and the second comparison pixels arranged around the target pixel and further away from the first comparison pixel than the target pixel, respectively A second edge gradient calculation step to be obtained; an edge gradient synthesis step in which the luminance change rate calculated in the first and second edge gradient calculation steps has the maximum absolute value as the edge gradient value of the target pixel; It is characterized by providing.

本発明では、第1エッジ勾配算出工程において、対象画素とこの対象画素に隣接する第1比較画素との間の輝度変化率(エッジ勾配)を算出し、第2エッジ勾配算出工程において、対象画素とこの対象画素から離れて配置された第2比較画素との間の輝度変化率(エッジ勾配)を算出しているので、輝度が急激に変化するエッジ部や、ある程度なだらかに変化するエッジ部などの様々なエッジ部分のエッジ勾配を精度良く検出することができる。
また、対象画素と各比較画素との距離が異なるエッジ勾配を算出してその結果を合成しているので、高周波成分まで含んだエッジ成分を精度良く検出することができる。
さらに、対象画素に隣接する第1比較画素では最大8方向のエッジ勾配しか検出できないが、第2比較画素では例えば12方向や16方向などのより多くの方向のエッジ勾配を検出できるため、エッジ勾配の検出精度をより一層向上でき、高周波成分まで含んだ様々な方向のエッジ成分を容易にかつ精度良く検出・評価することができる。
In the present invention, the luminance change rate (edge gradient) between the target pixel and the first comparison pixel adjacent to the target pixel is calculated in the first edge gradient calculating step, and the target pixel is calculated in the second edge gradient calculating step. Since the luminance change rate (edge gradient) between the pixel and the second comparison pixel arranged away from the target pixel is calculated, an edge portion where the luminance changes abruptly, an edge portion where the luminance changes gently to some extent, etc. It is possible to accurately detect the edge gradients of various edge portions.
In addition, since edge gradients having different distances between the target pixel and each comparison pixel are calculated and the results are synthesized, edge components including high frequency components can be detected with high accuracy.
Furthermore, the first comparison pixel adjacent to the target pixel can only detect edge gradients in a maximum of 8 directions, but the second comparison pixel can detect edge gradients in more directions such as 12 directions and 16 directions. Detection accuracy can be further improved, and edge components in various directions including high-frequency components can be detected and evaluated easily and accurately.

ここで、請求項1に記載のエッジ勾配検出方法において、前記各エッジ勾配算出工程は、対象画素の輝度をO、n番目の比較画素の輝度をSn、対象画素の座標を(X,Y)、比較画素の座標を(Xn,Yn)、対象画素とn番目の比較画素の距離をD(O,Sn)とした場合、エッジ勾配(輝度変化率)gnおよび距離D(O,Sn)を以下の式1,2で求めることが好ましい。 Here, in the edge gradient detection method according to claim 1, in each of the edge gradient calculation steps, the luminance of the target pixel is O, the luminance of the nth comparison pixel is Sn, and the coordinates of the target pixel are (X 0 , Y 0 ), the coordinate of the comparison pixel is (Xn, Yn), and the distance between the target pixel and the nth comparison pixel is D (O, Sn), the edge gradient (luminance change rate) gn and the distance D (O, Sn) ) Is preferably obtained by the following formulas 1 and 2.

Figure 2007172397
Figure 2007172397

Figure 2007172397
Figure 2007172397

このような構成であれば、エッジ勾配gnを容易に算出することができ、エッジ検出処理も短時間で実行できる。また、対象画素および比較画素の各座標によって各画素間の距離を求めているので、エッジ勾配を精度良く求めることができる。   With such a configuration, the edge gradient gn can be easily calculated, and the edge detection process can be executed in a short time. In addition, since the distance between the pixels is obtained from the coordinates of the target pixel and the comparison pixel, the edge gradient can be obtained with high accuracy.

また、撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第2比較画素よりも離れて配置された各第3比較画素との輝度変化率をそれぞれ求める第3エッジ勾配算出工程を備え、前記エッジ勾配合成工程は、第1〜3の各エッジ勾配算出工程で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とすることが好ましい。   Further, a third edge for respectively obtaining a luminance change rate between the target pixel selected in the captured image and each third comparison pixel arranged around the target pixel and further away from the second comparison pixel than the target pixel. A gradient calculating step, wherein the edge gradient synthesizing step uses the luminance change rate calculated in each of the first to third edge gradient calculating steps as the edge gradient value of the target pixel having the maximum absolute value. Is preferred.

このような構成であれば、対象画素と各比較画素との距離が異なるエッジ勾配をさらに算出して合成しているので、高周波成分まで含んだエッジ成分をよりいっそう精度良く検出することができる。   With such a configuration, since the edge gradients having different distances between the target pixel and each comparison pixel are further calculated and combined, the edge component including the high frequency component can be detected with higher accuracy.

この際、前記第2比較画素は、第1比較画素に隣接して配置され、第3比較画素は第2比較画素の周囲に隣接して配置されていることが好ましい。
このように構成すれば、第1比較画素によって対象画素から距離1画素分のエッジ勾配を検出でき、第2比較画素によって対象画素から距離2画素分のエッジ勾配を検出でき、第3比較画素によって対象画素から距離3画素分のエッジ勾配を検出できる。このため、高周波成分まで含んだシミ欠陥のエッジ部分の輝度変化を精度よく検出できる。
At this time, it is preferable that the second comparison pixel is disposed adjacent to the first comparison pixel, and the third comparison pixel is disposed adjacent to the periphery of the second comparison pixel.
With this configuration, the first comparison pixel can detect the edge gradient for one pixel from the target pixel, the second comparison pixel can detect the edge gradient for two pixels from the target pixel, and the third comparison pixel An edge gradient corresponding to a distance of 3 pixels from the target pixel can be detected. For this reason, it is possible to accurately detect the luminance change of the edge portion of the spot defect including the high frequency component.

本発明のシミ欠陥検出方法は、シミ欠陥検査対象を撮像した画像からシミ欠陥領域を抽出するシミ欠陥領域抽出工程と、前記シミ欠陥領域の各画素に対して請求項1から請求項4のいずれかに記載のエッジ勾配検出方法を実行し、各対象画素のエッジ勾配値のうち、絶対値が最大のものをシミ欠陥領域のエッジ勾配値とするエッジ勾配検出工程と、前記シミ欠陥領域の面積を算出する面積算出工程と、前記シミ欠陥領域のコントラストを求めるコントラスト算出工程と、前記エッジ勾配、面積、コントラストの3種類の特徴値に基づいて前記シミ欠陥領域の欠陥ランクを評価する欠陥ランク評価工程と、を備えていることを特徴とする。   The spot defect detection method of the present invention is a spot defect area extraction step for extracting a spot defect area from an image obtained by imaging a spot defect inspection target, and any one of claims 1 to 4 for each pixel of the spot defect area. An edge gradient detection step in which the edge gradient value of each target pixel having the maximum absolute value among the edge gradient values of each target pixel is set as the edge gradient value of the stain defect region, and the area of the stain defect region An area calculating step for calculating the contrast, a contrast calculating step for obtaining the contrast of the spot defect area, and a defect rank evaluation for evaluating the defect rank of the spot defect area based on the three types of feature values of the edge gradient, area, and contrast And a process.

このような本発明では、シミ欠陥を、エッジ勾配、面積、コントラストの3種類の特徴値に基づいて評価し、ランク付けすることができるので、精度良く検出することができる。特に、エッジ勾配を精度よくかつ自動的に検出できるので、シミ欠陥を精度良くかつ自動的に検出することができ、液晶パネルなどの検査作業の効率化を実現できる。   In the present invention, a spot defect can be evaluated and ranked based on three types of feature values of edge gradient, area, and contrast, and therefore can be detected with high accuracy. In particular, since the edge gradient can be detected accurately and automatically, a spot defect can be detected accurately and automatically, and the efficiency of inspection work for a liquid crystal panel or the like can be realized.

本発明のエッジ勾配検出装置は、撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素に隣接して配置された各第1比較画素との輝度変化率をそれぞれ求める第1エッジ勾配算出手段と、撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第1比較画素よりも離れて配置された各第2比較画素との輝度変化率をそれぞれ求める第2エッジ勾配算出手段と、前記第1および第2エッジ勾配算出手段で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とするエッジ勾配合成手段と、を備えることを特徴とする。   The edge gradient detection device according to the present invention is a first method for obtaining a luminance change rate between a target pixel selected in a captured image and each first comparison pixel arranged around the target pixel and adjacent to the target pixel. Luminance change rates of the edge gradient calculating means, the target pixel selected in the captured image, and the second comparison pixels arranged around the target pixel and further away from the first comparison pixel than the target pixel, respectively Second edge gradient calculating means to be obtained; and edge gradient synthesizing means that uses an edge gradient value of the target pixel that has a maximum absolute value among the luminance change rates calculated by the first and second edge gradient calculating means; It is characterized by providing.

このような本発明では、前記エッジ勾配検出方法と同様に、輝度が急激に変化するエッジ部や、ある程度なだらかに変化するエッジ部などの様々なシミ欠陥のエッジ部分の勾配を精度良く検出することができる。また、対象画素と各比較画素との距離が異なるエッジ勾配を算出してその結果を合成しているので、高周波成分まで含んだ様々な方向のエッジ成分を容易にかつ精度良く検出・評価することができる。   In the present invention, as in the edge gradient detection method, it is possible to accurately detect the gradients of the edge portions of various spot defects such as the edge portion where the luminance changes abruptly and the edge portion where the luminance changes gently to some extent. Can do. In addition, since edge gradients with different distances between the target pixel and each comparison pixel are calculated and synthesized, the edge components in various directions including high-frequency components can be detected and evaluated easily and accurately. Can do.

本発明のシミ欠陥検出装置は、シミ欠陥検査対象を撮像した画像からシミ欠陥領域を抽出するシミ欠陥領域抽出手段と、シミ欠陥領域において選択された対象画素と、この対象画素の周囲にかつ対象画素に隣接して配置された各第1比較画素との輝度変化率をそれぞれ求める第1エッジ勾配算出手段と、シミ欠陥領域において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第1比較画素よりも離れて配置された各第2比較画素との輝度変化率をそれぞれ求める第2エッジ勾配算出手段と、前記第1および第2エッジ勾配算出手段で算出された各輝度変化率のうち、絶対値が最大のものをシミ欠陥領域のエッジ勾配値とするエッジ勾配合成手段と、前記シミ欠陥領域の面積を算出する面積算出手段と、前記シミ欠陥領域のコントラストを求めるコントラスト算出手段と、前記エッジ勾配、面積、コントラストの3種類の特徴値に基づいて前記シミ欠陥領域の欠陥ランクを評価する欠陥ランク評価手段と、を備えていることを特徴とする。   The spot defect detection apparatus according to the present invention includes a spot defect area extracting unit that extracts a spot defect area from an image obtained by imaging a spot defect inspection target, a target pixel selected in the spot defect area, and a target pixel around the target pixel. A first edge gradient calculating means for obtaining a luminance change rate with each of the first comparison pixels arranged adjacent to the pixel, a target pixel selected in the spot defect area, and surrounding the target pixel and from the target pixel A second edge gradient calculating means for obtaining a luminance change rate with each of the second comparison pixels arranged apart from the first comparison pixel; and each of the luminance changes calculated by the first and second edge gradient calculating means. An edge gradient synthesis unit that uses an edge rate having a maximum absolute value among the ratios as an edge gradient value of the spot defect region; an area calculation unit that calculates an area of the spot defect region; Contrast calculation means for obtaining a contrast, and defect rank evaluation means for evaluating a defect rank of the spot defect region based on the three types of feature values of the edge gradient, area, and contrast.

このような本発明では、前記シミ欠陥検出方法と同様に、シミ欠陥を、エッジ勾配、面積、コントラストの3種類の特徴値に基づいて評価し、ランク付けすることができるので、シミ欠陥を精度良くかつ自動的に検出することができ、液晶パネルなどの検査作業の効率化を実現できる。   In the present invention, the spot defect can be evaluated and ranked based on three kinds of feature values of edge gradient, area, and contrast, as in the spot defect detection method. It can detect well and automatically, and can realize the efficiency of inspection work such as liquid crystal panel.

なお、エッジ勾配検出装置およびシミ欠陥検出装置においても、撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第2比較画素よりも離れて配置された各第3比較画素との輝度変化率をそれぞれ求める第3エッジ勾配算出手段を設け、前記エッジ勾配合成手段は、第1〜3の各エッジ勾配算出手段で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とするように構成してもよい。   In the edge gradient detection device and the spot defect detection device, the target pixel selected in the captured image and each third comparison arranged around the target pixel and further away from the target pixel than the second comparison pixel. Third edge gradient calculating means for obtaining a luminance change rate with respect to each pixel is provided, and the edge gradient combining means has a maximum absolute value among the luminance change rates calculated by the first to third edge gradient calculating means. May be used as the edge gradient value of the target pixel.

図1は本発明の実施の形態に係るシミ欠陥検出装置の構成を示すブロック図である。
図1において、1は検査対象である液晶パネル(液晶ライトバルブ)、2は画像投影装置であるプロジェクタであり、液晶パネル1を外部からセットできるようになっている。3は液晶パネル1に各種パターンを出力するパターン生成装置であるパターンジェネレータ、4はスクリーン、5はスクリーン4に投影された画像を撮影する撮像手段であるCCDカメラであり、液晶パネル1の解像度以上の解像度を有するCCDを搭載している。6はパターンジェネレータ3及びCCDカメラ5を制御し、液晶パネル1のシミ欠陥を検出する画像処理手段であるコンピュータ装置、7はコンピュータ装置6に接続された表示装置である。
FIG. 1 is a block diagram showing the configuration of a spot defect detection apparatus according to an embodiment of the present invention.
In FIG. 1, reference numeral 1 denotes a liquid crystal panel (liquid crystal light valve) to be inspected, and reference numeral 2 denotes a projector which is an image projection device, which can set the liquid crystal panel 1 from the outside. Reference numeral 3 denotes a pattern generator that is a pattern generation device that outputs various patterns to the liquid crystal panel 1. Reference numeral 4 denotes a screen. Reference numeral 5 denotes a CCD camera that is an image pickup unit that captures an image projected on the screen 4. It has a CCD with a resolution of. Reference numeral 6 denotes a computer device which is an image processing means for controlling the pattern generator 3 and the CCD camera 5 to detect a spot defect in the liquid crystal panel 1, and 7 is a display device connected to the computer device 6.

コンピュータ装置6は、画像入力手段60と、背景画像差分処理手段61と、表示エリア抽出手段62と、縮小画像作成手段63と、シミ欠陥強調処理手段64と、ノイズ除去手段65と、シミ欠陥抽出処理手段66と、blob処理手段67と、エッジ勾配検出手段69と、欠陥ランク分類処理手段68とから構成されている。   The computer device 6 includes an image input unit 60, a background image difference processing unit 61, a display area extraction unit 62, a reduced image creation unit 63, a spot defect enhancement processing unit 64, a noise removal unit 65, and a spot defect extraction. The processing unit 66, the blob processing unit 67, the edge gradient detection unit 69, and the defect rank classification processing unit 68 are configured.

コンピュータ装置6の画像入力手段60には、CCDカメラ5で撮像された取込画像の画像データが入力される。その取込画像は図示しない記憶手段に記憶される。従って、画像入力手段60によってCCDカメラ5を用いて検査対象を撮像する撮像工程(画像入力工程)が実施される。
背景画像差分処理手段61は、入力画像と予め作成された背景画像との差を取って検査対象以外のものによって生じる欠陥状の輝度変化を除去した背景差分画像を得る背景画像差分処理工程を実施する。表示エリア抽出手段62は、背景差分画像から被検査部の画像部分だけを抽出する表示エリア抽出工程を実施する。CCDカメラ5で検査対象であるTFTパネルを撮像した際に、TFTパネル全体を撮像するにはパネル周囲も多少写さなければならない。このため撮像画像におけるパネル投影画像の周囲には、パネルとは関係のないデータが存在し、また投影画像も長方形ではなく歪んでいる。このため、表示エリア抽出手段62は、TFTパネル投影画像の部分のみを切り出す処理を行い、検査対象画像を作成する。
Image data of the captured image captured by the CCD camera 5 is input to the image input means 60 of the computer device 6. The captured image is stored in a storage means (not shown). Accordingly, an imaging process (image input process) is performed in which the inspection target is imaged using the CCD camera 5 by the image input means 60.
The background image difference processing means 61 carries out a background image difference processing step for obtaining a background difference image in which a difference between an input image and a background image created in advance is removed and defective luminance changes caused by things other than the inspection target are removed. To do. The display area extracting means 62 performs a display area extracting step of extracting only the image portion of the part to be inspected from the background difference image. When an image of a TFT panel to be inspected is picked up by the CCD camera 5, in order to pick up an image of the entire TFT panel, the surroundings of the panel must be somewhat copied. For this reason, there is data unrelated to the panel around the panel projection image in the captured image, and the projection image is not rectangular but distorted. Therefore, the display area extraction unit 62 performs a process of cutting out only the portion of the TFT panel projection image, and creates an inspection target image.

縮小画像作成手段63は、表示エリア抽出手段62で抽出された画像から縮小画像を作成する縮小画像作成工程を実施する。例えば、縮小画像作成手段63は、撮像画像において比較的大きなシミ欠陥を検出するために、撮像した画像を1/8サイズに縮小する処理を行う。後述するように、シミ欠陥強調処理手段64で使用するシミ欠陥強調フィルタは、それぞれ強調可能なシミの大きさがある程度決められている。このため、同一のシミ欠陥強調フィルタを利用していても、画像自体を縮小してシミ欠陥の大きさも小さくすることで、画像を縮小しない場合に比べて、相対的に大きなシミ欠陥を検出することができる。なお、小さなシミ欠陥を検出する場合には、縮小画像作成手段63による縮小画像作成工程を実施しなくてもよい。   The reduced image creating unit 63 performs a reduced image creating step of creating a reduced image from the image extracted by the display area extracting unit 62. For example, the reduced image creating means 63 performs a process of reducing the captured image to 1/8 size in order to detect a relatively large spot defect in the captured image. As will be described later, the size of the stain that can be emphasized is determined to some extent in the stain defect enhancement filter used in the stain defect enhancement processing means 64. For this reason, even if the same spot defect emphasis filter is used, a relatively large spot defect is detected by reducing the size of the spot defect by reducing the size of the image itself as compared with the case where the image is not reduced. be able to. Note that when a small spot defect is detected, the reduced image creating step by the reduced image creating means 63 may not be performed.

シミ欠陥強調処理手段64は、画像に対してシミ欠陥強調フィルタ(シミ欠陥検出フィルタ)を適用してシミ欠陥を強調して検出するシミ欠陥強調処理工程を実施する。
ノイズ除去手段65は、シミ欠陥強調処理手段64で得られた結果に対してメディアンフィルタを適用してノイズを除去するノイズ除去工程を実施する。
The spot defect enhancement processing unit 64 performs a spot defect enhancement process step of enhancing and detecting a spot defect by applying a spot defect enhancement filter (stain defect detection filter) to the image.
The noise removing unit 65 performs a noise removing step of removing noise by applying a median filter to the result obtained by the spot defect enhancement processing unit 64.

シミ欠陥抽出処理手段66は、ノイズ除去手段65で処理された結果を所定の閾値と比較してシミ欠陥候補を抽出する。なお、シミ欠陥には、他の画素部分に対して輝度値が高い白シミ欠陥と、輝度値が低い黒シミ欠陥とがある。このため、閾値としては、白シミ欠陥閾値と、黒シミ欠陥閾値とが設定され、白シミ欠陥閾値と比較することで白シミ欠陥候補が抽出され、黒シミ欠陥閾値と比較することで黒シミ欠陥候補が抽出される。
blob処理手段67は、欠陥候補として抽出した領域の面積と、平均輝度を求めるblob処理工程を実施する。
The spot defect extraction processing unit 66 extracts a spot defect candidate by comparing the result processed by the noise removing unit 65 with a predetermined threshold. Note that the spot defect includes a white spot defect having a high luminance value with respect to other pixel portions and a black spot defect having a low luminance value. For this reason, the white spot defect threshold value and the black spot defect threshold value are set as the threshold values, and the white spot defect candidate is extracted by comparing with the white spot defect threshold value, and the black spot defect threshold value is compared with the black spot defect threshold value. A defect candidate is extracted.
The blob processing means 67 performs a blob processing step for obtaining the area of the region extracted as the defect candidate and the average luminance.

エッジ勾配検出手段(エッジ勾配検出装置)69は、表示エリア抽出手段62で抽出された画像に対して本発明のエッジ勾配検出方法を適用し、シミ欠陥候補領域における最大のエッジ勾配を検出するエッジ勾配検出工程を実施する。なお、エッジ勾配とは、エッジ部分における輝度変化率を意味し、具体的には前記画像の2つの画素間の輝度差を、その画素間の距離で除算したものである。   Edge gradient detection means (edge gradient detection device) 69 applies the edge gradient detection method of the present invention to the image extracted by the display area extraction means 62 and detects the maximum edge gradient in the spot defect candidate region. A gradient detection step is performed. The edge gradient means the rate of change in luminance at the edge portion. Specifically, the difference in luminance between two pixels of the image is divided by the distance between the pixels.

欠陥ランク分類処理手段68は、blob処理手段67で求めた面積および平均輝度と、エッジ勾配検出手段69で求めたエッジ勾配とに基づいてシミ欠陥のランクを評価し、今回の検査対象がどの欠陥ランクに該当するかを分類する欠陥ランク分類工程を実施する。
従って、本実施形態では、シミ欠陥抽出処理手段66、blob処理手段67、エッジ勾配検出手段69、欠陥ランク分類処理手段68を備えてシミ欠陥検出装置が構成されている。
The defect rank classification processing means 68 evaluates the rank of the spot defect based on the area and average luminance obtained by the blob processing means 67 and the edge gradient obtained by the edge gradient detection means 69, and which defect is the object to be inspected this time. A defect rank classification process is performed for classifying whether the rank is satisfied.
Therefore, in the present embodiment, the spot defect detection apparatus is configured to include the spot defect extraction processing unit 66, the blob processing unit 67, the edge gradient detection unit 69, and the defect rank classification processing unit 68.

次に、本発明の実施の形態によるシミ欠陥検出装置の動作について説明する。
図2はこの実施の形態のシミ欠陥検出装置の動作を説明するためのフローチャートである。図2に示す動作はコンピュータ装置6上で実行されるプログラムにより実現されている。
まず、プロジェクタ2に検査対象の液晶パネル1をセットし、コンピュータ装置6によりパターンジェネレータ3を制御して液晶パネル1上に特定の明るさのパターンを表示させ、それをプロジェクタ2によりスクリーン4に投影する。そして、スクリーン4上に投影された画像をCCDカメラ5で撮影し、その撮影データの画像をコンピュータ装置6に出力し、コンピュータ装置6によりシミ欠陥検出処理を行い、液晶パネル1のシミ欠陥の検出結果を表示装置7に表示する。
Next, the operation of the spot defect detection apparatus according to the embodiment of the present invention will be described.
FIG. 2 is a flowchart for explaining the operation of the spot defect detection apparatus of this embodiment. The operation shown in FIG. 2 is realized by a program executed on the computer device 6.
First, the liquid crystal panel 1 to be inspected is set in the projector 2, the pattern generator 3 is controlled by the computer device 6 to display a specific brightness pattern on the liquid crystal panel 1, and this is projected onto the screen 4 by the projector 2. To do. Then, the image projected on the screen 4 is photographed by the CCD camera 5, the image of the photographed data is output to the computer device 6, and a spot defect detection process is performed by the computer device 6 to detect a spot defect in the liquid crystal panel 1. The result is displayed on the display device 7.

ここで、コンピュータ装置6によるシミ欠陥検出の動作について図2のフローチャートに基づいて説明する。
まず、スクリーン4上に投影された画像をCCDカメラ5で撮影し、その撮影データの画像がコンピュータ装置6の画像入力手段60に取り込まれ、画像入力工程(撮像工程)が行われる(ステップS1)。このとき撮影データは、図示しないA/D変換器により、例えば4096階調(12ビット)のデジタルデータとして、コンピュータ装置6に取り込まれる。なお、撮像データは、4096階調のものに限らず、1024階調(10ビット)のデータでもよいし、256階調(8ビット)のデータでもよい。階調が大きいほど高精度の処理が可能になるが、その分、高階調のデータ取得が可能な高価なCCDカメラ5が必要となるため、撮像データの階調は欠陥検査対象等に応じて必要な階調に設定すればよい。
次に、背景画像差分処理手段61は、取り込まれた画像データの中から、照明やレンズなど液晶パネル以外のものによって生じる欠陥状の輝度変化を除去するための背景画像差分処理工程を行う(ステップS2)。
Here, the operation of spot defect detection by the computer device 6 will be described based on the flowchart of FIG.
First, an image projected on the screen 4 is photographed by the CCD camera 5, and an image of the photographed data is taken into the image input means 60 of the computer device 6, and an image input process (imaging process) is performed (step S1). . At this time, the photographing data is taken into the computer device 6 as digital data of, for example, 4096 gradations (12 bits) by an A / D converter (not shown). Note that the imaging data is not limited to 4096 gradations, and may be 1024 gradations (10 bits) or 256 gradations (8 bits). The higher the gradation, the higher the accuracy of processing becomes possible. However, since an expensive CCD camera 5 capable of acquiring high gradation data is required, the gradation of the imaged data depends on the defect inspection target or the like. What is necessary is just to set to a required gradation.
Next, the background image difference processing means 61 performs a background image difference processing step for removing defective luminance changes caused by things other than the liquid crystal panel such as illumination and lenses from the captured image data (step) S2).

この背景画像差分処理工程は、図3(A)に示す入力画像(投影画像)から図3(B)に示す背景画像を減算して、図3(C)に示す背景差分画像を作成する。背景画像は、液晶パネル1を除いた光学系の輝度変化の画像である。投影ランプや投射レンズによる欠陥上の輝度変化は、入力画像および背景画像の両方に生じるため、入力画像から背景画像を減算すれば、背景差分画像においては、投影ランプや投射レンズなど液晶パネル以外のものによって生じる欠陥上の輝度変化成分は除去される。   In this background image difference processing step, the background image shown in FIG. 3C is created by subtracting the background image shown in FIG. 3B from the input image (projected image) shown in FIG. The background image is an image of luminance change of the optical system excluding the liquid crystal panel 1. Since the luminance change on the defect due to the projection lamp and the projection lens occurs in both the input image and the background image, if the background image is subtracted from the input image, the background difference image is not a liquid crystal panel such as a projection lamp or a projection lens. The luminance change component on the defect caused by the object is removed.

続いて、表示エリア抽出手段62は、被検査部の画面部分だけを抽出する表示エリア抽出処理工程を行う(ステップS3)。
表示エリア抽出処理工程は、図4(A)に示す被検査部画像(背景差分画像)の四隅の座標をパターンマッチング処理(画像データの四隅付近の数十画素×数十画素の4つの小領域に対して、それぞれ予め用意した4つの隅基準画像とパターンマッチング処理を行い、四隅の座標を特定する)により検出し、この四隅の座標の位置関係が長方形になるようにアフィン変換することで表示エリアを抽出する。これによって、図4(B)に示すように、スクリーン4上の周囲の縁部が除去され、且つ正確な長方形とされた画面部分だけが抽出される。
Subsequently, the display area extracting means 62 performs a display area extracting process for extracting only the screen portion of the part to be inspected (step S3).
In the display area extraction processing step, the coordinates of the four corners of the inspected part image (background difference image) shown in FIG. 4A are subjected to pattern matching processing (four small regions of several tens of pixels by several tens of pixels near the four corners of the image data). The four corner reference images prepared in advance are subjected to pattern matching processing and the coordinates of the four corners are specified), and the display is performed by affine transformation so that the positional relationship of the coordinates of the four corners is rectangular. Extract area. As a result, as shown in FIG. 4B, the peripheral edge on the screen 4 is removed, and only the screen portion having an accurate rectangle is extracted.

次に、縮小画像作成手段63は、表示エリア抽出処理された検査対象画像を縮小する縮小画像作成処理工程を行う(ステップS4)。
この縮小画像作成処理工程は、検査対象画像から所定サイズ、例えば1/4サイズに縮小した画像を作成する。具体的には、1/4サイズの縮小画像を作成する場合には、検査対象画像の4画素の平均値を1画素とすることで1/2サイズの縮小画像を作成し、この1/2の縮小画像の4画素の平均値を1画素とすることで1/4サイズの縮小画像を作成する。
Next, the reduced image creating means 63 performs a reduced image creating process for reducing the inspection target image that has undergone the display area extraction process (step S4).
In the reduced image creation processing step, an image reduced to a predetermined size, for example, 1/4 size, is created from the inspection target image. Specifically, when a 1/4 size reduced image is created, a 1/2 size reduced image is created by setting the average value of 4 pixels of the inspection target image to 1 pixel. A reduced image of ¼ size is created by setting the average value of four pixels of the reduced image to one pixel.

従って、平坦化処理された原画像が1300×1000の130万画素とすると、1/2の縮小画像は650×500の32.5万画素、1/4の縮小画像は325×250の8万1250画素を有することになる。
このように、所定サイズの縮小画像を作成するのは、後述するシミ欠陥強調フィルタは所定の大きさのシミ欠陥を強調するように設計されており、画像サイズを縮小することで、縮小前の画像サイズのままでは後述するシミ欠陥強調フィルタで強調できない比較的大きなシミを、画像サイズを縮小することで強調できるようにするためのものである。
Therefore, if the flattened original image is 1.3 million pixels of 1300 × 1000, the reduced image of ½ is 325,000 pixels of 650 × 500, and the reduced image of ¼ is 80,000 of 325 × 250. It will have 1250 pixels.
In this way, a reduced image of a predetermined size is created because a stain defect enhancement filter, which will be described later, is designed to emphasize a spot defect of a predetermined size, and by reducing the image size, This is to make it possible to emphasize a relatively large spot that cannot be emphasized by a spot defect enhancement filter, which will be described later, by reducing the image size.

次に、シミ欠陥強調処理手段64は、作成された縮小画像に対してシミ欠陥を強調するシミ欠陥強調処理工程を行う(ステップS5)。このシミ欠陥強調処理工程は、そのままでは微少なレベルの白シミ欠陥・黒シミ欠陥の検出が難しいために、画像の中のシミ欠陥のみを強調するものである。
なお、所定サイズのシミ欠陥のみを検出する場合には、作成された縮小画像に対して、1種類のシミ欠陥強調フィルタを適用すればよいが、サイズの異なるシミ欠陥も検出する場合には、検出対象となるシミ欠陥のサイズが異なる複数種類のシミ欠陥強調フィルタを適用し、所定サイズのシミ欠陥を検出すればよい。
Next, the spot defect emphasis processing means 64 performs a spot defect emphasis process step for emphasizing a spot defect on the created reduced image (step S5). This spot defect enhancement processing step emphasizes only a spot defect in an image because it is difficult to detect a minute level of white spot defect / black spot defect as it is.
In addition, when detecting only a spot defect of a predetermined size, it suffices to apply one kind of spot defect enhancement filter to the created reduced image, but when detecting a spot defect having a different size, A plurality of types of spot defect enhancement filters having different sizes of spot defects to be detected may be applied to detect a spot defect of a predetermined size.

シミ欠陥強調フィルタは、図5に示すように、設定した検出領域の中心画素を対象画素とし、この対象画素の周囲に略円状に配置され、かつ対象画素から所定長さ離れて配置された輝度比較画素を設けている。
そして、対象画素を挟んで対称位置に配置された2つの輝度比較画素を1セットとし、すべての輝度比較画素をセットに分ける。そして、対象画素の輝度値から各セットの輝度比較画素の平均輝度値を引いて差Fを求める。すなわち、対象画素の輝度値を「O」、輝度比較画素の各輝度値を「S1〜S32」とした際に、以下の式3〜18を用いて差F1〜F16を算出する。
As shown in FIG. 5, the spot defect enhancement filter has a central pixel in a set detection region as a target pixel, is arranged in a substantially circular shape around the target pixel, and is arranged a predetermined length away from the target pixel. A luminance comparison pixel is provided.
Then, two luminance comparison pixels arranged at symmetrical positions with the target pixel in between are set as one set, and all luminance comparison pixels are divided into sets. Then, the difference F is obtained by subtracting the average luminance value of each set of luminance comparison pixels from the luminance value of the target pixel. That is, when the luminance value of the target pixel is “O” and the luminance values of the luminance comparison pixels are “S1 to S32”, the differences F1 to F16 are calculated using the following equations 3 to 18.

F1 =O−(S1 + S17)/ 2 …(3)
F2 =O−(S2 + S18)/ 2 …(4)
F3 =O−(S3 + S19)/ 2 …(5)
F4 =O−(S4 + S20)/ 2 …(6)
F5 =O−(S5 + S21)/ 2 …(7)
F6 =O−(S6 + S22)/ 2 …(8)
F7 =O−(S7 + S23)/ 2 …(9)
F8 =O−(S8 + S24)/ 2 …(10)
F9 =O−(S9 + S25)/ 2 …(11)
F10=O−(S10 + S26)/ 2 …(12)
F11=O−(S11 + S27)/ 2 …(13)
F12=O−(S12 + S28)/ 2 …(14)
F13=O−(S13 + S29)/ 2 …(15)
F14=O−(S14 + S30)/ 2 …(16)
F15=O−(S15 + S31)/ 2 …(17)
F16=O−(S16 + S32)/ 2 …(18)
F1 = O- (S1 + S17) / 2 (3)
F2 = O- (S2 + S18) / 2 (4)
F3 = O- (S3 + S19) / 2 (5)
F4 = O- (S4 + S20) / 2 ... (6)
F5 = O- (S5 + S21) / 2 (7)
F6 = O- (S6 + S22) / 2 (8)
F7 = O- (S7 + S23) / 2 (9)
F8 = O- (S8 + S24) / 2 (10)
F9 = O- (S9 + S25) / 2 (11)
F10 = O− (S10 + S26) / 2 (12)
F11 = O- (S11 + S27) / 2 (13)
F12 = O- (S12 + S28) / 2 (14)
F13 = O- (S13 + S29) / 2 (15)
F14 = O− (S14 + S30) / 2 (16)
F15 = O− (S15 + S31) / 2 (17)
F16 = O- (S16 + S32) / 2 (18)

シミ欠陥強調フィルタは、以上の計算を行ったあと、F1からF16の各値の中から絶対値が最小となるものを選択し、その値をシミ強調の結果とする。
例えば、輝度比較画素で囲まれたエリア内に欠陥が存在しない場合、対象画素の輝度値と各輝度比較画素の輝度値は殆ど差が無い状態になる。従って、上記F1からF16は、いずれも小さな値になる。
一方、図6に示すように、輝度比較画素で囲まれたエリア内に他の部分に比べて明るい白シミ欠陥70が存在し、対象画素がその一部である場合、対象画素に比べて各輝度比較画素の輝度値は低くなる。従って、上記F1からF16は、シミ欠陥70が無い場合に比べて、大きな値になる。
After performing the above calculation, the spot defect enhancement filter selects a value having the minimum absolute value from the values F1 to F16, and uses the value as the result of the spot enhancement.
For example, when there is no defect in the area surrounded by the luminance comparison pixels, there is almost no difference between the luminance value of the target pixel and the luminance value of each luminance comparison pixel. Accordingly, F1 to F16 are all small values.
On the other hand, as shown in FIG. 6, when a white spot defect 70 brighter than other parts is present in the area surrounded by the luminance comparison pixels and the target pixel is a part thereof, each of the pixels is compared with the target pixel. The luminance value of the luminance comparison pixel becomes low. Accordingly, the above F1 to F16 are larger than the case where there is no spot defect 70.

また、図7に示すように、対象画素とともに、一部の輝度比較画素がシミ欠陥70に含まれている場合には、シミ欠陥70に含まれる輝度比較画素を有するセットの輝度平均値は、シミ欠陥70に含まれる輝度比較画素が無いセットの輝度平均値に比べて大きくなり、その分、対象画素の輝度値との差は小さくなる。
同様に、図8に示すように、スジ状欠陥71が存在している場合には、スジ状欠陥71に含まれる輝度比較画素を有するセットの輝度平均値=(S2+S18)/2は、スジ状欠陥71に含まれる対象画素の輝度値Oとほぼ同じとなるため、それらの差は小さくなる。
In addition, as shown in FIG. 7, when some luminance comparison pixels are included in the spot defect 70 together with the target pixel, the average luminance value of the set having the luminance comparison pixels included in the spot defect 70 is It becomes larger than the luminance average value of the set having no luminance comparison pixel included in the spot defect 70, and the difference from the luminance value of the target pixel is reduced accordingly.
Similarly, as shown in FIG. 8, when the stripe defect 71 exists, the luminance average value = (S2 + S18) / 2 of the set having the luminance comparison pixels included in the stripe defect 71 is a stripe shape. Since the luminance value O of the target pixel included in the defect 71 is substantially the same, the difference therebetween becomes small.

従って、図6に示すように、輝度比較画素で囲まれたエリア内にシミ欠陥70が存在する場合には、上記F1からF16はいずれも比較的大きな値になる。一方、シミ欠陥が存在しない場合や、図8のようにスジ状欠陥71が存在する場合、さらには図7のように輝度比較画素で囲まれたエリア内にシミ欠陥70が納まっていない場合には、上記F1からF16の少なくとも1つは小さな値になる。このため、上記F1からF16の値から絶対値が最小となるものを選択すれば、対象画素を含み、かつ、輝度比較画素で囲まれたエリア内に納まるシミ欠陥70が存在するか否かを検出できるので、この絶対値の最小となる値を各対象画素のシミ欠陥強調値として記憶すればよい。   Therefore, as shown in FIG. 6, when the spot defect 70 exists in the area surrounded by the luminance comparison pixels, F1 to F16 are all relatively large values. On the other hand, when there is no spot defect, when there is a streak-like defect 71 as shown in FIG. 8, or when the spot defect 70 does not fit in the area surrounded by the luminance comparison pixels as shown in FIG. , At least one of F1 to F16 is a small value. Therefore, if a value having the minimum absolute value is selected from the values F1 to F16, it is determined whether or not there is a spot defect 70 that includes the target pixel and falls within the area surrounded by the luminance comparison pixels. Since it can be detected, the minimum value of the absolute value may be stored as the spot defect enhancement value of each target pixel.

なお、図5に示すシミ欠陥強調フィルタは、対象画素から上下、左右の輝度比較画素までの距離が6画素分であり、対象画素と他の輝度比較画素との間の距離もおおむね6画素分である。本実施形態のシミ欠陥強調フィルタは、輝度比較画素で囲まれた面積よりも一回り小さい面積のシミ欠陥の抽出に適している。すなわち、シミ欠陥強調フィルタは、各輝度比較画素で囲まれたエリア内の面積に比べて測定対象のシミの面積が大きいと、その輪郭部分のみが強調され、シミ部分全体を強調することができない。従って、対象画素と輝度比較画素間の距離によって検出可能なシミ欠陥のサイズが異なる。このため、以下の説明において、各シミ欠陥強調フィルタにおいて、対象画素と輝度比較画素間の距離がnのものを距離n画素フィルタと呼ぶ。例えば、図5に示すシミ欠陥強調フィルタは、距離6画素フィルタである。   In the spot defect enhancement filter shown in FIG. 5, the distance from the target pixel to the vertical and horizontal luminance comparison pixels is six pixels, and the distance between the target pixel and the other luminance comparison pixels is also approximately six pixels. It is. The spot defect enhancement filter of the present embodiment is suitable for extracting a spot defect having an area that is slightly smaller than the area surrounded by the luminance comparison pixels. That is, when the area of the measurement target stain is larger than the area within the area surrounded by each luminance comparison pixel, the stain defect enhancement filter emphasizes only the outline portion and cannot emphasize the entire stain portion. . Accordingly, the size of the spot defect that can be detected differs depending on the distance between the target pixel and the luminance comparison pixel. For this reason, in the following description, in each spot defect emphasis filter, a pixel having a distance between the target pixel and the luminance comparison pixel of n is called a distance n pixel filter. For example, the spot defect enhancement filter shown in FIG. 5 is a 6-pixel distance filter.

なお、距離6画素のフィルタでは、16個のセットで2次差分処理を行っているが、この数はフィルタの距離nが変わると変わることになる。
この処理を画面全体に適用することで、シミ欠陥を強調した画像を得ることができる。但し、前述したように、対象画素と輝度比較画素との距離が1種類のフィルタだけでは、様々な欠陥サイズに対応できない。例えば、図5で示す距離6画素フィルタでは、直径11までのサイズのシミ欠陥しか検出できない。このため、本実施形態では、対象画素と輝度比較画素との距離を何段階か変えて処理を行い、様々なサイズのシミ欠陥に対応した強調画像を得るようにしている。
具体的には、距離3、距離6、距離12画素フィルタの3つのフィルタを用いて、シミ欠陥強調処理を行っている。すなわち、距離12画素フィルタを使えば、直径23のシミ欠陥まで検出可能ということになるが、フィルタに対して十分に小さい欠陥では、対象と比較している画素との距離が遠く、正確な結果が出ない。このため、距離3及び距離6画素フィルタを併用し、シミ欠陥検出精度を向上させている。
この処理で3枚のシミ強調画像を得ることができるので、最後にそれぞれの画像の同ポイントの処理結果画素の輝度比較を行い、絶対値が最大となる値をシミ欠陥強調結果とすることで、1枚のシミ強調画像として合成する。
In the filter with a distance of 6 pixels, the secondary difference processing is performed with 16 sets, but this number changes as the filter distance n changes.
By applying this process to the entire screen, it is possible to obtain an image in which a spot defect is emphasized. However, as described above, it is not possible to deal with various defect sizes with only one type of filter having a distance between the target pixel and the luminance comparison pixel. For example, the distance 6 pixel filter shown in FIG. 5 can detect only a spot defect having a diameter up to 11 diameters. For this reason, in the present embodiment, processing is performed by changing the distance between the target pixel and the luminance comparison pixel in several stages, and enhanced images corresponding to spot defects of various sizes are obtained.
Specifically, the spot defect emphasis process is performed using three filters of distance 3, distance 6, and distance 12 pixels. In other words, if a 12-pixel filter is used, it is possible to detect a spot defect having a diameter of 23. However, if the defect is sufficiently small compared to the filter, the distance from the pixel being compared with the target is long and an accurate result is obtained. Does not come out. For this reason, the distance 3 and 6 pixel filters are used in combination to improve the spot defect detection accuracy.
Since three stain-enhanced images can be obtained by this processing, the brightness of the processing result pixels at the same point in each image is finally compared, and the value having the maximum absolute value is used as the stain defect enhancement result. The image is synthesized as a single spot-enhanced image.

ここで、本実施形態のシミ欠陥強調処理工程S5の処理を説明する。本実施形態では、1/4に縮小された画像に対して3種類のシミ欠陥強調フィルタを適用している。具体的には、距離3,6,12画素フィルタの各シミ欠陥強調フィルタを適用している。そして、距離3,6,12画素フィルタのシミ欠陥強調フィルタの適用結果を合成して合成処理結果を求めている。
ここで、距離の異なる複数のシミ欠陥強調フィルタを用いているのは、前述の通り、様々なサイズのシミ欠陥を検出するためである。すなわち、処理対象画素からの距離が6画素のシミ欠陥強調フィルタのみを用いると、検出できるシミ欠陥のサイズが限定されてしまう(約12画素サイズ近辺のシミ欠陥までしか検出できない)。
そこで、本実施形態では、画面内に存在する様々なサイズのシミ欠陥に対応するため、3画素、6画素、12画素と、3段階に距離を変えて強調処理を行うことにより、様々なサイズのシミ欠陥を強調している。
Here, the process of the spot defect emphasis process step S5 of the present embodiment will be described. In this embodiment, three types of spot defect enhancement filters are applied to an image reduced to ¼. Specifically, each spot defect emphasis filter of distance 3, 6, 12 pixel filter is applied. Then, the result of synthesis processing is obtained by synthesizing the application result of the spot defect enhancement filter of the distance 3, 6, 12 pixel filter.
Here, the plurality of spot defect emphasis filters having different distances are used for detecting spot defects of various sizes as described above. That is, if only the stain defect enhancement filter whose distance from the processing target pixel is 6 pixels is used, the size of the stain defect that can be detected is limited (only a stain defect in the vicinity of about 12 pixel size can be detected).
Therefore, in the present embodiment, in order to deal with spot defects of various sizes existing in the screen, the enhancement processing is performed by changing the distance in three steps, that is, three pixels, six pixels, and twelve pixels. Emphasizes spot defects.

また、強調結果を合成処理しているのは、検出精度を向上させるためである。すなわち、それぞれの強調結果からシミ欠陥を抽出して個別に評価した場合、1つのシミ欠陥が3画素と6画素の強調結果に分割されて検出されることがあり、実際のシミ欠陥と強調結果が一致しない場合がある。そこで、結果を一致させるため複数の強調結果を合成することで、分離したシミ欠陥を1つに合成して検出精度を向上させている。   The reason why the enhancement results are combined is to improve detection accuracy. That is, when spot defects are extracted from each enhancement result and evaluated individually, one spot defect may be detected by being divided into enhancement results of 3 pixels and 6 pixels. May not match. Therefore, by combining a plurality of enhancement results to match the results, the separated spot defects are combined into one to improve detection accuracy.

ここで、合成処理は、各フィルタの強調結果において、同じ位置の画素の強調結果値を比較し、それらの中で絶対値が最大となる値をその合成結果としたものである。
なお、シミ欠陥強調フィルタの距離が、シミ欠陥の大きさに比べて非常に大きい場合、輝度比較画素が他のシミ領域に位置するとそのシミ欠陥に影響されてシミを正しく検出することができない。このため、シミ欠陥強調フィルタは、検出しようとするシミ欠陥の大きさよりも僅かに大きいもの、例えば1〜3画素程度の寸法分、大きいものを用いることが好ましい。
従って、距離3,6,12画素の各フィルタの強調結果を合成するようにすれば、距離3,6,12の各サイズに対応したシミ欠陥が強調されて検出することができる。
Here, the synthesis processing is to compare the enhancement result values of the pixels at the same position in the enhancement results of each filter, and use the value having the maximum absolute value as the synthesis result.
When the distance of the spot defect emphasis filter is very large compared to the size of the spot defect, if the brightness comparison pixel is located in another spot area, the spot cannot be correctly detected due to the spot defect. For this reason, it is preferable to use a stain defect enhancement filter having a size slightly larger than the size of the stain defect to be detected, for example, a size of about 1 to 3 pixels.
Therefore, if the enhancement results of the filters of the distances 3, 6, and 12 pixels are synthesized, the spot defect corresponding to each size of the distances 3, 6, and 12 can be enhanced and detected.

次に、ノイズ除去手段65は、前記シミ欠陥強調処理工程の結果に対して、メディアンフィルタを掛けて、ノイズにより分離している欠陥成分をつなげて平滑化し、シミ欠陥以外のノイズを除去するノイズ除去処理工程(平滑化処理:3×3メディアン処理)を実施する(S6)。メディアンフィルタとしては、例えば3×3の9画素の各輝度値のメディアン値(中央値)を3×3の中心に位置する対象画素の輝度値とするようなメディアンフィルタを利用すればよい。   Next, the noise removing means 65 applies a median filter to the result of the spot defect enhancement processing step to connect and smooth the defect components separated by noise, and removes noise other than the spot defect. A removal process step (smoothing process: 3 × 3 median process) is performed (S6). As the median filter, for example, a median filter may be used in which the median value (median value) of each luminance value of 9 pixels of 3 × 3 is used as the luminance value of the target pixel located at the center of 3 × 3.

次に、シミ欠陥抽出処理手段66は、ノイズが除去されたシミ欠陥強調画像に対して、白シミ欠陥を切り出す閾値と、黒シミ欠陥を切り出す閾値を設定し、各シミ欠陥候補の領域を切り出すシミ欠陥抽出処理工程を実施する(S7)。ここで、各閾値は、画像の状況に合わせて最適な値を設定すればよい。例えば、シミ欠陥強調画像(合成画像)のシミ強調値(輝度値)の平均値と、その標準偏差を求め、以下の式で閾値を設定する。
白シミ欠陥閾値 wslevel=avr+α1・σ+β1
黒シミ欠陥閾値 bslevel=avr−α2・σ+β2
ここで、avrは合成画像の平均値、σは合成画像の標準偏差、α1,α2,β1,β2は任
意の数で検査対象となる画像の状況で適宜決定される。
Next, the spot defect extraction processing unit 66 sets a threshold value for cutting out a white spot defect and a threshold value for cutting out a black spot defect with respect to the spot defect enhanced image from which noise has been removed, and cuts out areas for each spot defect candidate. A spot defect extraction process is performed (S7). Here, each threshold value may be set to an optimum value according to the situation of the image. For example, the average value of the spot emphasis value (luminance value) of the spot defect emphasis image (composite image) and its standard deviation are obtained, and the threshold value is set by the following equation.
White spot defect threshold wslevel = avr + α1 ・ σ + β1
Black spot defect threshold bslevel = avr−α2 ・ σ + β2
Here, avr is an average value of the composite image, σ is a standard deviation of the composite image, α1, α2, β1, and β2 are arbitrarily determined depending on the situation of the image to be inspected.

次に、blob処理手段67は、白シミ欠陥候補画像と、黒シミ欠陥候補画像に対し、欠陥候補として切り出した領域の面積と、平均輝度(コントラスト)を求めるblob処理工程を実施する(S8)。   Next, the blob processing means 67 carries out a blob processing step for obtaining the area of the region cut out as a defect candidate and the average luminance (contrast) for the white spot defect candidate image and the black spot defect candidate image (S8). .

一方、エッジ勾配検出手段69は、表示エリア抽出工程S3で抽出された画像に対してエッジ勾配を検出するエッジ勾配検出処理工程を行う(ステップS9)。
エッジ勾配検出手段69は、具体的には、図9に示すように、第1エッジ勾配算出手段691、第2エッジ勾配算出手段692、第3エッジ勾配算出手段693、エッジ勾配合成手段694を備えている。
そして、エッジ勾配検出手段69は、エッジ勾配検出処理工程S9では、まず、対象画素を選択する(S91)。具体的には、エッジ勾配検出手段69は、表示エリア抽出工程S3で抽出された画像の全画素から対象画素を1つずつ順次選択する。なお、この際、シミ欠陥抽出処理工程S7で抽出されたシミ欠陥領域部分の画素のみを対象画素としてもよい。但し、本実施形態のように、表示エリア抽出工程S3で抽出された画像の全画素を対象としたほうが、シミ欠陥強調処理工程S5やシミ欠陥抽出処理工程S7で検出できなかった欠陥部分も評価でき、不良品検出の精度を向上できる点で好ましい。
On the other hand, the edge gradient detection means 69 performs an edge gradient detection processing step for detecting the edge gradient on the image extracted in the display area extraction step S3 (step S9).
Specifically, the edge gradient detection unit 69 includes a first edge gradient calculation unit 691, a second edge gradient calculation unit 692, a third edge gradient calculation unit 693, and an edge gradient synthesis unit 694, as shown in FIG. ing.
In the edge gradient detection processing step S9, the edge gradient detection unit 69 first selects a target pixel (S91). Specifically, the edge gradient detecting unit 69 sequentially selects target pixels one by one from all the pixels of the image extracted in the display area extracting step S3. At this time, only the pixel in the spot defect region extracted in the spot defect extraction processing step S7 may be set as the target pixel. However, as in this embodiment, when all the pixels of the image extracted in the display area extraction step S3 are targeted, the defect portion that cannot be detected in the stain defect enhancement processing step S5 or the stain defect extraction processing step S7 is also evaluated. This is preferable in that the accuracy of defective product detection can be improved.

対象画素が選択されると、第1エッジ勾配算出手段691は、図11に示すエッジ勾配検出フィルタF1を用いて距離1画素のエッジ勾配値を算出する(S92)。
エッジ勾配検出フィルタF1は、設定した検出領域の中心画素を対象画素とし、この対象画素の周囲に略円状に配置され、かつ対象画素に隣接つまり1画素分離れて配置された画素を第1比較画素とし、対象画素と各第1比較画素間のエッジ勾配(輝度変化率)をそれぞれ算出し、その絶対値が最大のものを対象画素における距離1画素のエッジ勾配値と設定するものである。
When the target pixel is selected, the first edge gradient calculating unit 691 calculates an edge gradient value of one pixel using the edge gradient detection filter F1 shown in FIG. 11 (S92).
The edge gradient detection filter F1 uses the center pixel of the set detection region as a target pixel, and the first pixel is arranged in a substantially circular shape around the target pixel and adjacent to the target pixel, that is, separated by one pixel. As a comparison pixel, an edge gradient (luminance change rate) between the target pixel and each first comparison pixel is calculated, and the one having the maximum absolute value is set as the edge gradient value of one pixel distance in the target pixel. .

次に、第2エッジ勾配算出手段692は、図12に示すエッジ勾配検出フィルタF2を用いて距離2画素のエッジ勾配値を算出する(S93)。
エッジ勾配検出フィルタF2もエッジ勾配検出フィルタF1と同様のものであり、設定した検出領域の中心画素を対象画素とし、この対象画素の周囲に略円状に配置され、かつ前記第1比較画素に隣接つまり対象画素からおおよそ2画素分離れて配置された画素を第2比較画素とし、対象画素と各第2比較画素間のエッジ勾配(輝度変化率)をそれぞれ算出し、その絶対値が最大のものを対象画素における距離2画素のエッジ勾配値と設定するものである。
Next, the second edge gradient calculating means 692 calculates the edge gradient value of the distance 2 pixels using the edge gradient detection filter F2 shown in FIG. 12 (S93).
The edge gradient detection filter F2 is the same as the edge gradient detection filter F1, and the center pixel of the set detection area is set as a target pixel, is arranged in a substantially circular shape around the target pixel, and the first comparison pixel includes An adjacent pixel, that is, a pixel arranged approximately two pixels away from the target pixel is used as the second comparison pixel, and an edge gradient (luminance change rate) between the target pixel and each second comparison pixel is calculated, and the absolute value is the maximum. This is set as an edge gradient value of a distance of 2 pixels in the target pixel.

次に、第3エッジ勾配算出手段693は、図13に示すエッジ勾配検出フィルタF3を用いて距離3画素のエッジ勾配値を算出する(S94)。
エッジ勾配検出フィルタF3もエッジ勾配検出フィルタF1,F2と同様のものであり、設定した検出領域の中心画素を対象画素とし、この対象画素の周囲に略円状に配置され、かつ前記第2比較画素に隣接つまり対象画素からおおよそ3画素分離れて配置された画素を第3比較画素とし、対象画素と各第3比較画素間のエッジ勾配(輝度変化率)をそれぞれ算出し、その絶対値が最大のものを対象画素における距離3画素のエッジ勾配値と設定するものである。
Next, the third edge gradient calculating unit 693 calculates an edge gradient value of a distance of 3 pixels using the edge gradient detection filter F3 shown in FIG. 13 (S94).
The edge gradient detection filter F3 is the same as the edge gradient detection filters F1 and F2, and the center pixel of the set detection region is set as a target pixel, is arranged in a substantially circular shape around the target pixel, and the second comparison A pixel adjacent to the pixel, that is, a pixel arranged approximately three pixels away from the target pixel is set as a third comparison pixel, and an edge gradient (luminance change rate) between the target pixel and each of the third comparison pixels is calculated, and an absolute value thereof is calculated. The maximum value is set as the edge gradient value of a distance of 3 pixels in the target pixel.

ここで、各フィルタF1〜F3によるエッジ勾配値の具体的な算出手順を説明する。
各フィルタF1〜F3は、対象画素の輝度値から各比較画素の輝度値を引き、その輝度差を対象画素および比較画素間の長さ(距離)で割って、対象画素と各比較画素間のエッジ勾配を算出する。
例えば、図12のエッジ勾配検出フィルタF2では、対象画素の輝度値を「O」、比較画素の各輝度値を「S1〜S12」、対象画素および各比較画素の距離をD(O,S1)〜D(O,S12)とした際に、以下の式19〜30を用いてエッジ勾配g1〜g12を算出する。
Here, the specific calculation procedure of the edge gradient value by each filter F1-F3 is demonstrated.
Each filter F1 to F3 subtracts the luminance value of each comparison pixel from the luminance value of the target pixel, divides the luminance difference by the length (distance) between the target pixel and the comparison pixel, and Edge gradient is calculated.
For example, in the edge gradient detection filter F2 of FIG. 12, the luminance value of the target pixel is “O”, the luminance values of the comparison pixels are “S1 to S12”, and the distance between the target pixel and each comparison pixel is D (O, S1). ˜D (O, S12), the edge gradients g1 to g12 are calculated using the following formulas 19 to 30.

g1=(O−S1)/D(O,S1) …(19)
g2=(O−S2)/D(O,S2) …(20)
g3=(O−S3)/D(O,S3) …(21)
g4=(O−S4)/D(O,S4) …(22)
g5=(O−S5)/D(O,S5) …(23)
g6=(O−S6)/D(O,S6) …(24)
g7=(O−S7)/D(O,S7) …(25)
g8=(O−S8)/D(O,S8) …(26)
g9=(O−S9)/D(O,S9) …(27)
g10=(O−S10)/D(O,S10) …(28)
g11=(O−S11)/D(O,S11) …(29)
g12=(O−S12)/D(O,S12) …(30)
g1 = (O−S1) / D (O, S1) (19)
g2 = (O−S2) / D (O, S2) (20)
g3 = (O−S3) / D (O, S3) (21)
g4 = (O−S4) / D (O, S4) (22)
g5 = (O−S5) / D (O, S5) (23)
g6 = (O−S6) / D (O, S6) (24)
g7 = (O−S7) / D (O, S7) (25)
g8 = (O−S8) / D (O, S8) (26)
g9 = (O−S9) / D (O, S9) (27)
g10 = (O−S10) / D (O, S10) (28)
g11 = (O−S11) / D (O, S11) (29)
g12 = (O−S12) / D (O, S12) (30)

そして、算出されたエッジ勾配g1〜g12の中で絶対値が最大となるものを選択し、エッジ勾配検出フィルタF2で検出された対象画素のエッジ勾配値とする。他のフィルタF1,F3も同様の処理を行って各エッジ勾配値を算出する。
ここで、対象画素および輝度比較画素間の距離は、XY座標上の2点間の距離を求める式を利用して算出できる。例えば、距離D(O,S1)を求める場合、対象画素の座標を(X,Y)、比較画素の座標を(X,Y)とすると、距離D(O,S1)は式31で求められる。
Then, the calculated edge gradients g1 to g12 having the maximum absolute value are selected and set as the edge gradient value of the target pixel detected by the edge gradient detection filter F2. The other filters F1 and F3 perform the same processing to calculate each edge gradient value.
Here, the distance between the target pixel and the luminance comparison pixel can be calculated using an expression for obtaining a distance between two points on the XY coordinates. For example, when obtaining the distance D (O, S1), assuming that the coordinates of the target pixel are (X O , Y O ) and the coordinates of the comparison pixel are (X 1 , Y 1 ), the distance D (O, S1) is an expression. 31.

Figure 2007172397
Figure 2007172397

第3エッジ勾配算出工程S94が終了すると、エッジ勾配検出手段69は、検査対象画素の選択が終了したか否かを判断する(S95)。ここで、画像全体の画素に対して検査が終了していない場合には、前記各エッジ勾配算出工程S91〜S93を繰り返し実行する。   When the third edge gradient calculating step S94 is completed, the edge gradient detecting unit 69 determines whether the selection of the inspection target pixel is completed (S95). Here, when the inspection has not been completed for the pixels of the entire image, each of the edge gradient calculation steps S91 to S93 is repeatedly executed.

一方、画像全体の画素に対して検査が終了している場合には、エッジ勾配合成手段694によりエッジ勾配合成工程が行われる(S96)。
エッジ勾配合成手段694は、各エッジ勾配検出フィルタF1〜F3による検出結果を合成する。具体的には、各対象画素におけるエッジ勾配検出フィルタF1〜F3のエッジ勾配値のうちの絶対値が最大のものをその対象画素の合成結果としている。
以上によってエッジ勾配検出処理工程S9が完了する。
On the other hand, when the inspection has been completed for the pixels of the entire image, the edge gradient synthesis unit 694 performs an edge gradient synthesis step (S96).
The edge gradient synthesis unit 694 synthesizes the detection results obtained by the edge gradient detection filters F1 to F3. Specifically, the maximum value of the edge gradient values of the edge gradient detection filters F1 to F3 in each target pixel is the combined result of the target pixel.
Thus, the edge gradient detection processing step S9 is completed.

次に、欠陥ランク分類処理手段68は、算出された欠陥候補領域の面積、平均輝度およびエッジ勾配により、その画像におけるシミ欠陥のランクを分類する欠陥ランク分類工程を実施する(S10)。
具体的には、欠陥ランク分類処理手段68には、図15に示す判定閾値曲線TR1〜TR3が定義されており、欠陥候補領域の面積の値と平均輝度(コントラスト)の値とで特定される点が、図15の閾値曲線TR1〜TR3のグラフにおけるどのエリアに入るかを確認し、その良品ランク1〜3およびNG(不良品)と判断する。具体的には、コントラストが低いほどランク1(最もよい製品)と判断され、コントラストが高くなるほどランク2、ランク3、不良品と判断される。
Next, the defect rank classification processing means 68 performs a defect rank classification step of classifying the rank of the spot defect in the image based on the calculated area, average luminance, and edge gradient of the defect candidate area (S10).
Specifically, determination threshold curves TR1 to TR3 shown in FIG. 15 are defined in the defect rank classification processing unit 68, and are specified by the value of the area of the defect candidate region and the value of the average luminance (contrast). It is determined which area the point enters in the graph of the threshold curves TR1 to TR3 in FIG. 15, and it is determined as the non-defective product ranks 1 to 3 and NG (defective product). Specifically, the lower the contrast, the higher it is determined as rank 1 (the best product), and the higher the contrast, the higher it is determined as rank 2, rank 3, and defective products.

また、エッジ勾配検出手段69は、欠陥候補の傾きから判定閾値曲線TR1〜TR3の値を調整する。図15は、ある傾きの欠陥を用いて作成した判定閾値曲線であり、欠陥候補の傾きが小さくなるほど、人の判断では判定閾値曲線TR1〜TR3は小さい値となる。そこで、欠陥候補の傾きにより、図15の判定閾値曲線に係数(コントラスト閾値倍率)をかけて、判定閾値曲線を調整する。図14は、判定閾値曲線TR3を調整する値で、欠陥候補の傾きに対応するコントラスト閾値倍率をグラフにしたものである。欠陥候補の傾きにより、コントラスト閾値倍率を求めて、図15の判定閾値曲線TR3に係数をかけることで判定閾値曲線を再計算する。判定閾値曲線TR1、TR2についても、同様にコントラスト閾値倍率を求めておき、欠陥候補の傾きからコントラスト閾値倍率を求めて、判定閾値曲線TR1及びTR2を再計算する。新たに求められた判定閾値曲線TR1〜TR3から、欠陥良品ランクを判定することで、欠陥の傾きを考慮した欠陥良品ランク判定が可能となる。   In addition, the edge gradient detecting unit 69 adjusts the values of the determination threshold curves TR1 to TR3 from the gradient of the defect candidate. FIG. 15 is a determination threshold curve created using a defect having a certain inclination. As the inclination of the defect candidate becomes smaller, the determination threshold curves TR1 to TR3 become smaller in human judgment. Therefore, the determination threshold curve is adjusted by applying a coefficient (contrast threshold magnification) to the determination threshold curve of FIG. FIG. 14 is a value for adjusting the determination threshold curve TR3, and is a graph showing the contrast threshold magnification corresponding to the inclination of the defect candidate. The contrast threshold magnification is obtained from the inclination of the defect candidate, and the determination threshold curve is recalculated by applying a coefficient to the determination threshold curve TR3 in FIG. Concerning the determination threshold curves TR1 and TR2, the contrast threshold magnification is similarly obtained, the contrast threshold magnification is obtained from the inclination of the defect candidate, and the determination threshold curves TR1 and TR2 are recalculated. By determining the defective defective product rank from the newly obtained determination threshold curves TR1 to TR3, it is possible to determine the defective defective product rank in consideration of the inclination of the defect.

欠陥ランク分類処理手段68で求められた欠陥ランクは、表示装置7に表示され、検査員は検査対象の液晶パネル1の欠陥ランクを容易に把握することができる。
従って、本実施形態では、シミ欠陥抽出処理工程S7、blob処理工程S8、エッジ勾配検出処理工程S9、欠陥ランク分類工程S10により、シミ欠陥検出工程が構成されている。
The defect rank obtained by the defect rank classification processing means 68 is displayed on the display device 7, and the inspector can easily grasp the defect rank of the liquid crystal panel 1 to be inspected.
Therefore, in the present embodiment, the spot defect detection process is configured by the spot defect extraction process S7, the blob process S8, the edge gradient detection process S9, and the defect rank classification process S10.

図16〜18には、本発明と従来例によるエッジ勾配検出処理の具体例を示す。
図16は処理対象となる疑似シミ欠陥画像であり、白シミ欠陥を擬似的に作成している。図17は、そのシミ欠陥部分の撮像画像を未処理状態のまま拡大したものである。
図18は、対象画素および比較画素間が距離1画素のエッジ勾配検出フィルタF1を適用した結果と、距離2画素のエッジ勾配検出フィルタF2を適用した結果を合成したものである。
16 to 18 show specific examples of edge gradient detection processing according to the present invention and the conventional example.
FIG. 16 is a pseudo spot defect image to be processed, and a white spot defect is created in a pseudo manner. FIG. 17 is an enlarged view of the captured image of the spot defect portion in an unprocessed state.
FIG. 18 is a combination of the result of applying the edge gradient detection filter F1 having a distance of 1 pixel between the target pixel and the comparison pixel and the result of applying the edge gradient detection filter F2 having a distance of 2 pixels.

この実施の形態によれば、次のような効果がある。
(1)エッジ勾配検出手段69は、エッジ勾配検出フィルタF1〜F3を用いており、対象画素と比較画素が距離を1〜3画素の3段階に変更してエッジ勾配を算出しているので、輝度が急激に変化するエッジ部や、ある程度なだらかに変化するエッジ部などの様々なシミ欠陥のエッジ部分の勾配を精度良く検出することができる。
特に、距離1画素のエッジ勾配検出フィルタF1を用いてエッジ勾配値を算出する第1エッジ勾配算出手段691を設けたので、図20に示すような異なる勾配のエッジ部分も区別して検出でき、エッジ勾配を精度良く検出することができる。
また、第1エッジ勾配算出手段691では8方向のエッジ勾配しか検出できないが、12方向のエッジ勾配を検出できる第2エッジ勾配算出手段692と、16方向のエッジ勾配を検出できる第3エッジ勾配算出手段693をも受けたので、エッジ勾配の検出精度をより一層向上できる。
さらに、エッジ勾配合成手段694により各エッジ勾配算出手段691〜693の算出結果を合成しているので、高周波成分まで含んだ様々な方向のエッジ勾配を容易にかつ精度良く検出・評価することができる。
According to this embodiment, there are the following effects.
(1) Since the edge gradient detection means 69 uses the edge gradient detection filters F1 to F3, and the target pixel and the comparison pixel change the distance in three stages of 1 to 3 pixels, the edge gradient is calculated. It is possible to accurately detect the gradient of the edge portion of various spot defects such as an edge portion where the luminance changes rapidly and an edge portion where the luminance changes gently to some extent.
In particular, since the first edge gradient calculation means 691 for calculating the edge gradient value using the edge gradient detection filter F1 with a distance of 1 pixel is provided, edge portions having different gradients as shown in FIG. The gradient can be detected with high accuracy.
In addition, the first edge gradient calculation unit 691 can detect only the edge gradient in eight directions, but the second edge gradient calculation unit 692 that can detect the edge gradient in 12 directions and the third edge gradient calculation that can detect the edge gradient in 16 directions. Since the means 693 is also received, the detection accuracy of the edge gradient can be further improved.
Further, since the edge gradient synthesis means 694 synthesizes the calculation results of the edge gradient calculation means 691 to 693, it is possible to easily and accurately detect and evaluate edge gradients in various directions including high frequency components. .

(2)各エッジ勾配算出手段691〜693は、対象画素および比較画素の座標から各画素間の距離を求めているので、エッジ勾配をより高精度に検出できる。すなわち、各フィルタF1〜F3はマトリックス状に配列されているため、各比較画素の中心座標と対象画素の中心座標との距離には「ばらつき」が生じる。しかし、本実施形態では、各座標間の長さを算出しているので、正確な距離を求めることができ、この距離を用いて算出するエッジ勾配も精度の高いものにできる。 (2) Since each of the edge gradient calculating units 691 to 693 obtains the distance between the pixels from the coordinates of the target pixel and the comparison pixel, the edge gradient can be detected with higher accuracy. That is, since each of the filters F1 to F3 is arranged in a matrix, a “variation” occurs in the distance between the center coordinates of each comparison pixel and the center coordinates of the target pixel. However, in the present embodiment, since the length between the coordinates is calculated, an accurate distance can be obtained, and the edge gradient calculated using this distance can be highly accurate.

(3)欠陥ランク分類処理手段68は、blob処理手段67で求められた欠陥候補の面積、平均輝度(コントラスト)と、エッジ勾配検出手段69で求められたエッジ勾配との3種類の特徴値に基づいて、検査対象の液晶パネル1のランクを評価しているので、検査員の目視検査結果に近いランク評価を自動的に行うことができる。 (3) The defect rank classification processing unit 68 uses the three types of feature values of the defect candidate area and average luminance (contrast) obtained by the blob processing unit 67 and the edge gradient obtained by the edge gradient detection unit 69. Based on this, the rank of the liquid crystal panel 1 to be inspected is evaluated, so that rank evaluation close to the visual inspection result of the inspector can be automatically performed.

(4)シミ欠陥強調処理手段64は、対象画素から所定距離離れて、かつ、対象画像の周囲に配置された輝度比較画素の輝度値に基づいてシミ欠陥を強調するシミ欠陥強調フィルタを用いているので、例えば、輝度比較画素を対象画素に対して上下左右のみに配置した場合に比べて、面状に広がるシミを確実に検出することができる。
その上、シミ欠陥強調フィルタは、前記各輝度比較画素を、前記対象画素を挟んで対称位置に配置された2つの輝度比較画素毎のセットに分け、前記対象画素の輝度値と各セットの2つの輝度比較画素の平均輝度値との差の値を求め、各セットの差の値のうち、絶対値が最小となるものを選択してシミ欠陥強調値としている。このため、スジ状欠陥がある場合や、輝度比較画素の一部が欠陥に含まれている場合には、シミ欠陥強調値が小さくなり、輝度比較画素で囲まれたエリア内にシミ欠陥が納まっている場合のみシミ欠陥強調値が大きくなり、シミ欠陥強調値を所定の閾値と比較することで、スジ状欠陥などを排除でき、シミ欠陥のみを高精度に検出することができる。
(4) The spot defect enhancement processing means 64 uses a spot defect enhancement filter that emphasizes a spot defect based on the luminance value of a luminance comparison pixel arranged at a predetermined distance from the target pixel and around the target image. Therefore, for example, as compared with the case where the luminance comparison pixels are arranged only in the upper, lower, left, and right directions with respect to the target pixel, it is possible to reliably detect a spot spreading in a planar shape.
In addition, the stain defect enhancement filter divides each luminance comparison pixel into a set of two luminance comparison pixels arranged at symmetrical positions across the target pixel, and the luminance value of the target pixel and 2 of each set. A difference value from the average luminance value of the two luminance comparison pixels is obtained, and among the difference values of each set, the one having the smallest absolute value is selected and used as the spot defect enhancement value. For this reason, when there is a streak-like defect or when a part of the brightness comparison pixel is included in the defect, the spot defect enhancement value becomes small and the spot defect is contained in the area surrounded by the brightness comparison pixel. The spot defect emphasis value becomes large only when it is, and by comparing the spot defect emphasis value with a predetermined threshold, streaky defects and the like can be eliminated, and only the spot defect can be detected with high accuracy.

(5)本実施形態では、シミ強調フィルタは、対象画素を挟んで点対称の位置に配置された2つの輝度比較画素の輝度値における平均値を求めて対象画素と比較しているので、背景のシェーディングの影響を軽減でき、シミ欠陥をより高精度に検出することができる。すなわち、対象画素を挟んで点対称の位置に配置された2つの輝度比較画素の一方は、背景のシェーディングの影響によって、輝度値が高くなり、他方は小さくなることが多い。従って、これらの2つの輝度比較画素の平均輝度値を求めることでシェーディングの影響を平滑化でき、シミ欠陥をより高精度に検出することができる。 (5) In this embodiment, the spot enhancement filter obtains an average value of the luminance values of two luminance comparison pixels arranged at point-symmetric positions with the target pixel in between and compares it with the target pixel. The effect of shading can be reduced, and spot defects can be detected with higher accuracy. That is, one of the two luminance comparison pixels arranged at a point-symmetrical position across the target pixel has a high luminance value due to the influence of background shading, and the other is often small. Therefore, the influence of shading can be smoothed by obtaining the average luminance value of these two luminance comparison pixels, and a spot defect can be detected with higher accuracy.

(6)さらに、シミ欠陥強調フィルタは、対象画素と輝度比較画素の距離に応じて適宜設定することで、そのフィルタによって検出可能なシミ欠陥の大きさを設定できるので、検出したいサイズのシミ欠陥を容易に検出できる。
その上、各シミ欠陥のサイズに応じた複数のシミ欠陥強調フィルタを適用した場合も、それらの強調結果の合成結果のみを評価することで各サイズのシミ欠陥を容易に検出することができる。
(6) Furthermore, since the spot defect enhancement filter can be set appropriately according to the distance between the target pixel and the luminance comparison pixel, the size of the spot defect that can be detected by the filter can be set. Can be easily detected.
Moreover, even when a plurality of spot defect emphasis filters corresponding to the size of each spot defect are applied, it is possible to easily detect a spot defect of each size by evaluating only the synthesis result of the enhancement results.

(7)本実施形態では、シミ欠陥強調値は、対象画素の輝度値と、輝度比較画素の輝度平均値とで算出され、対象画素および輝度比較画素間にある画素の輝度値は利用されていない。このため、シミ欠陥が、輝度比較画素で囲まれるエリアよりも小さく、かつ対象画素を含むものであれば、シミ欠陥のサイズがある程度変化しても、従来の検査員の目視による判定と同様にシミ欠陥を検出できる。このため、フィルタの距離サイズはあまり細かく設定する必要が無く、その分、フィルタ数を少なくでき、検査時間も短縮できる。 (7) In the present embodiment, the spot defect enhancement value is calculated from the luminance value of the target pixel and the average luminance value of the luminance comparison pixel, and the luminance value of the pixel between the target pixel and the luminance comparison pixel is used. Absent. For this reason, as long as the spot defect is smaller than the area surrounded by the luminance comparison pixels and includes the target pixel, even if the spot defect size changes to some extent, it is the same as the conventional visual inspection of the inspector. Spot defects can be detected. For this reason, it is not necessary to set the filter distance size very finely, and accordingly, the number of filters can be reduced and the inspection time can be shortened.

(8)白シミ欠陥および黒シミ欠陥は、共に同じシミ欠陥強調フィルタで強調でき、シミ欠陥抽出処理手段66で白シミ欠陥用の閾値と、黒シミ欠陥用の閾値とを使い分けるだけで、白シミ欠陥および黒シミ欠陥の両方を簡単に検出することができる。このため、各種のシミ欠陥を簡単な処理で効率的に検出することができる。 (8) Both the white spot defect and the black spot defect can be emphasized by the same spot defect enhancement filter, and the white spot defect processing unit 66 can use the white spot defect threshold and the black spot defect threshold separately. Both spot defects and black spot defects can be easily detected. For this reason, various stain defects can be efficiently detected by a simple process.

なお、本発明は、前記実施形態に限らない。
例えば、前記実施形態では、3種類のエッジ勾配検出フィルタF1〜F3を用いてエッジ勾配を求めていたが、対象画素と比較画素との距離1画素のエッジ勾配検出フィルタF1と、前記距離2画素のエッジ勾配検出フィルタF2または距離3画素のエッジ勾配検出フィルタF3のいずれか一方との2種類のフィルタを用いて検出してもよい。要するに、距離1のエッジ勾配検出フィルタF1を用いることで、輝度変化が急激なエッジ部分も精度良く検出でき、また、エッジ勾配検出フィルタF2,F3を用いることで、より多くの方向のエッジ勾配を検出でき、各フィルタの結果を合成することで高周波成分まで含んだ様々な方向のエッジ勾配を精度良く検出することができる。
なお、距離4画素以上のエッジ勾配検出フィルタを更に組み合わせても良いが、通常、エッジ部分の輝度勾配は距離3画素以下のフィルタで検出可能であるため、前記実施形態のように、距離1〜3画素のエッジ勾配検出フィルタF1〜F3を用いればエッジ勾配を精度よく検出できる。
The present invention is not limited to the above embodiment.
For example, in the embodiment, the edge gradient is obtained using the three types of edge gradient detection filters F1 to F3. However, the edge gradient detection filter F1 having a distance of 1 pixel between the target pixel and the comparison pixel and the distance of 2 pixels are described. Alternatively, the detection may be performed using two types of filters, the edge gradient detection filter F2 and the edge gradient detection filter F3 having a distance of 3 pixels. In short, the edge gradient detection filter F1 at the distance 1 can be used to accurately detect the edge portion where the luminance change is abrupt, and the edge gradients in more directions can be obtained by using the edge gradient detection filters F2 and F3. The edge gradients in various directions including high frequency components can be detected with high accuracy by combining the results of the filters.
Note that an edge gradient detection filter having a distance of 4 pixels or more may be further combined, but usually the luminance gradient of the edge portion can be detected by a filter having a distance of 3 pixels or less. If the edge gradient detection filters F1 to F3 of three pixels are used, the edge gradient can be detected with high accuracy.

また、前記実施形態では、エッジ勾配検出手段69はエッジ勾配検出処理工程S9において、表示エリア抽出工程S3で抽出された画像全体を対象画素としてエッジ勾配を算出していたが、シミ欠陥抽出処理手段66によって抽出されたシミ欠陥候補に含まれる画素を対象画素としてエッジ勾配を算出してもよい。このようにすれば、エッジ勾配の算出対象が少なくなり、効率的に処理できる。   In the embodiment, the edge gradient detection unit 69 calculates the edge gradient in the edge gradient detection processing step S9 using the entire image extracted in the display area extraction step S3 as the target pixel. The edge gradient may be calculated using a pixel included in the spot defect candidate extracted in 66 as a target pixel. In this way, the number of edge gradient calculation objects is reduced, and processing can be performed efficiently.

前記実施形態の欠陥ランク分類処理手段68は、図15の判定曲線グラフを用いて判定を行っていたが、エッジ勾配、コントラスト、面積の3つの軸を有する立体的な判定グラフを用いて判定を行ってもよい。
また、コントラストや欠陥面積を求める具体的な方法は前記実施形態のものに限らない。
The defect rank classification processing unit 68 of the above embodiment performs the determination using the determination curve graph of FIG. 15, but the determination is performed using a three-dimensional determination graph having three axes of edge gradient, contrast, and area. You may go.
Further, the specific method for obtaining the contrast and the defect area is not limited to that of the above embodiment.

前記実施形態では、エッジ勾配算出手段691〜693によって各エッジ勾配検出フィルタF1〜F3毎に絶対値が最大のエッジ勾配を求め、エッジ勾配合成手段694によってこの3つのエッジ勾配のなかで絶対値が最大のものを選択(合成)していたが、各フィルタF1〜F3で得られたすべてのエッジ勾配から直接絶対値が最大のものを選択して合成結果としてもよい。   In the embodiment, the edge gradient calculating means 691 to 693 obtains the edge gradient having the maximum absolute value for each of the edge gradient detection filters F1 to F3, and the edge gradient synthesizing means 694 calculates the absolute value among these three edge gradients. Although the maximum one is selected (synthesized), it is also possible to directly select the one having the maximum absolute value from all the edge gradients obtained by the filters F1 to F3 and obtain the result of synthesis.

エッジ勾配(輝度変化率)の算出方法は、前記実施形態のように、各画素の輝度差を求め、この輝度差を各画素間の距離で除算して求めるものに限らず、他の方法を用いてもよい。   The calculation method of the edge gradient (luminance change rate) is not limited to the method of obtaining the luminance difference of each pixel and dividing the luminance difference by the distance between the pixels, as in the above-described embodiment. It may be used.

シミ欠陥の検出対象としては、前記のようなTFT素子を用いた液晶ライトバルブに限られるものではなく、その他のダイオード素子を用いた液晶パネルやプラズマディスプレイ、有機ELディスプレイ、DMD(ダイレクト・ミラー・デバイス)などの表示体部品、ならびにそれらを使用した表示装置・製品の検査に利用することができるものであり、これらに使用した場合でも本発明の範囲から除外されるものでないことはいうまでもない。
さらに、本発明は、各種表示装置の検査に限らず、例えば、印刷物、家電製品のケースや車のボディなどにシミ状の傷がある場合、これらを撮像してシミ状の欠陥がある画像が得られればそのシミを検出できるので、各種製品の表面塗装や印刷物などのシミ検査に応用することもできる。
要するに、本発明は、周囲と輝度差があるシミであれば検出できるため、輝度シミ欠陥や色シミ欠陥の検出に利用できる。
The detection target of the spot defect is not limited to the liquid crystal light valve using the TFT element as described above, but a liquid crystal panel, plasma display, organic EL display, DMD (direct mirror mirror) using other diode elements. It can be used for inspection of display body parts such as devices) and display devices and products using them, and it goes without saying that even if used for these, they are not excluded from the scope of the present invention. Absent.
Furthermore, the present invention is not limited to the inspection of various display devices. For example, when there are spot-like scratches on a printed matter, a case of a household electrical appliance, a car body, or the like, an image with a spot-like defect is picked up. If it is obtained, the stain can be detected, so that it can also be applied to stain inspection of various products such as surface coating and printed matter.
In short, the present invention can be used to detect a brightness spot defect or a color spot defect because it can detect any spot having a brightness difference from the surroundings.

さらに、本発明のエッジ勾配検出方法および装置は、シミ欠陥の検出に限らず、画像処理等において輝度変化率が比較的大きなエッジ部分を検出する目的に広く利用できる。   Furthermore, the edge gradient detection method and apparatus of the present invention can be widely used not only for detection of spot defects but also for the purpose of detecting edge portions having a relatively large luminance change rate in image processing and the like.

本発明の実施の形態による画面のシミ欠陥検出装置のブロック構成図。The block block diagram of the spot defect detection apparatus of the screen by embodiment of this invention. 同シミ欠陥検出装置の動作を説明するためのフローチャート。The flowchart for demonstrating operation | movement of the said spot defect detection apparatus. 同シミ欠陥検出装置の背景画像差分処理を示す説明図。Explanatory drawing which shows the background image difference process of the same spot defect detection apparatus. 同シミ欠陥検出装置の表示エリア抽出処理を示す説明図。Explanatory drawing which shows the display area extraction process of the same spot defect detection apparatus. シミ欠陥強調フィルタの例を示す図。The figure which shows the example of a spot defect emphasis filter. シミ欠陥強調フィルタで検出されるシミ欠陥の例を示す図。The figure which shows the example of the spot defect detected with a spot defect emphasis filter. シミ欠陥強調フィルタで検出されないシミ欠陥の例を示す図。The figure which shows the example of the spot defect which is not detected with a spot defect emphasis filter. シミ欠陥強調フィルタで検出されないスジ状欠陥の例を示す図。The figure which shows the example of the stripe-shaped defect which is not detected with a spot defect emphasis filter. エッジ勾配検出手段の構成を示すブロック図。The block diagram which shows the structure of an edge gradient detection means. エッジ勾配検出処理工程を説明するフローチャート。The flowchart explaining an edge gradient detection process process. エッジ勾配検出フィルタの例を示す図。The figure which shows the example of an edge gradient detection filter. エッジ勾配検出フィルタの例を示す図。The figure which shows the example of an edge gradient detection filter. エッジ勾配検出フィルタの例を示す図。The figure which shows the example of an edge gradient detection filter. シミ欠陥の判定閾値曲線を示すグラフ。The graph which shows the judgment threshold curve of a spot defect. シミ欠陥の判定閾値曲線を示すグラフ。The graph which shows the judgment threshold curve of a spot defect. 擬似的なシミ欠陥を設けた画像を示す図。The figure which shows the image which provided the pseudo stain defect. シミ欠陥の非処理画像の拡大図。The enlarged view of the non-processed image of a spot defect. エッジ勾配検出フィルタの検出欠陥を合成した状態を示す図。The figure which shows the state which synthesize | combined the detection defect of the edge gradient detection filter. 従来のプレビットフィルタの例を示す図。The figure which shows the example of the conventional prebit filter. 従来のプレビットフィルタを用いた場合のエッジ勾配の算出例を示す図。The figure which shows the example of calculation of the edge gradient at the time of using the conventional prebit filter.

符号の説明Explanation of symbols

1…液晶パネル、2…プロジェクタ、3…パターンジェネレータ、4…スクリーン、5…CCDカメラ、6…コンピュータ装置、7…表示装置、60…画像入力手段、61…背景画像差分処理手段、62…表示エリア抽出手段、63…縮小画像作成手段、64…シミ欠陥強調処理手段、65…ノイズ除去手段、66…シミ欠陥抽出処理手段、67…blob処理手段、68…欠陥ランク分類処理手段、69…エッジ勾配検出手段、70…シミ欠陥、691…第1エッジ勾配算出手段、692…第2エッジ勾配算出手段、693…第3エッジ勾配算出手段、694…エッジ勾配合成手段。   DESCRIPTION OF SYMBOLS 1 ... Liquid crystal panel, 2 ... Projector, 3 ... Pattern generator, 4 ... Screen, 5 ... CCD camera, 6 ... Computer apparatus, 7 ... Display apparatus, 60 ... Image input means, 61 ... Background image difference processing means, 62 ... Display Area extraction means 63 ... Reduced image creation means 64 ... Blemish defect enhancement processing means 65 ... Noise removal means 66 ... Blemish defect extraction processing means 67 ... Blob processing means 68 68 Defect rank classification processing means 69 69 Edge Gradient detection means, 70 ... spot defects, 691 ... first edge gradient calculation means, 692 ... second edge gradient calculation means, 693 ... third edge gradient calculation means, 694 ... edge gradient synthesis means.

Claims (7)

撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素に隣接して配置された各第1比較画素との輝度変化率をそれぞれ求める第1エッジ勾配算出工程と、
撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第1比較画素よりも離れて配置された各第2比較画素との輝度変化率をそれぞれ求める第2エッジ勾配算出工程と、
前記第1および第2エッジ勾配算出工程で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とするエッジ勾配合成工程と、
を備えることを特徴とするエッジ勾配検出方法。
A first edge gradient calculating step for obtaining a luminance change rate between the target pixel selected in the captured image and each of the first comparison pixels arranged around the target pixel and adjacent to the target pixel;
Second edge gradient calculation for obtaining a luminance change rate between the target pixel selected in the captured image and each second comparison pixel arranged around the target pixel and further away from the first comparison pixel than the target pixel Process,
An edge gradient synthesis step in which the absolute value of the luminance change rates calculated in the first and second edge gradient calculation steps is the edge gradient value of the target pixel;
An edge gradient detection method comprising:
請求項1に記載のエッジ勾配検出方法において、
前記各エッジ勾配算出工程は、対象画素の輝度をO、n番目の比較画素の輝度をSn、対象画素の座標を(X,Y)、比較画素の座標を(Xn,Yn)、対象画素とn番目の比較画素の距離をD(O,Sn)とした場合、
輝度変化率gnを、
Figure 2007172397
距離D(O,Sn)を、
Figure 2007172397
で求めることを特徴とするエッジ勾配検出方法。
The edge gradient detection method according to claim 1,
In each of the edge gradient calculating steps, the brightness of the target pixel is O, the brightness of the nth comparison pixel is Sn, the coordinates of the target pixel are (X 0 , Y 0 ), and the coordinates of the comparison pixel are (X n , Y n ). When the distance between the target pixel and the nth comparison pixel is D (O, Sn),
The luminance change rate gn
Figure 2007172397
The distance D (O, Sn) is
Figure 2007172397
An edge gradient detection method characterized by:
請求項1または請求項2に記載のエッジ勾配検出方法において、
撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第2比較画素よりも離れて配置された各第3比較画素との輝度変化率をそれぞれ求める第3エッジ勾配算出工程を備え、
前記エッジ勾配合成工程は、第1〜3の各エッジ勾配算出工程で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とすることを特徴とするエッジ勾配検出方法。
The edge gradient detection method according to claim 1 or 2,
Third edge gradient calculation for determining the luminance change rate between the target pixel selected in the captured image and each third comparison pixel arranged around the target pixel and further away from the second comparison pixel than the target pixel With a process,
The edge gradient synthesizing step uses, as the edge gradient value of the target pixel, the one having the maximum absolute value among the luminance change rates calculated in the first to third edge gradient calculation steps. Detection method.
請求項3に記載のエッジ勾配検出方法において、
前記第2比較画素は、第1比較画素に隣接して配置され、第3比較画素は第2比較画素の周囲に隣接して配置されていることを特徴とするエッジ勾配検出方法。
The edge gradient detection method according to claim 3,
The edge gradient detection method, wherein the second comparison pixel is disposed adjacent to the first comparison pixel, and the third comparison pixel is disposed adjacent to the periphery of the second comparison pixel.
シミ欠陥検査対象を撮像した画像からシミ欠陥領域を抽出するシミ欠陥領域抽出工程と、
前記シミ欠陥領域の各画素に対して請求項1から請求項4のいずれかに記載のエッジ勾配検出方法を実行し、各対象画素のエッジ勾配値のうち、絶対値が最大のものをシミ欠陥領域のエッジ勾配値とするエッジ勾配検出工程と、
前記シミ欠陥領域の面積を算出する面積算出工程と、
前記シミ欠陥領域のコントラストを求めるコントラスト算出工程と、
前記エッジ勾配、面積、コントラストの3種類の特徴値に基づいて前記シミ欠陥領域の欠陥ランクを評価する欠陥ランク評価工程と、
を備えていることを特徴とするシミ欠陥検出方法。
A spot defect area extracting step for extracting a spot defect area from an image obtained by imaging a spot defect inspection target;
The edge gradient detection method according to any one of claims 1 to 4 is executed for each pixel in the stain defect area, and an edge gradient value having a maximum absolute value among the edge gradient values of each target pixel is stained. An edge gradient detection step for setting an edge gradient value of the region;
An area calculating step for calculating an area of the spot defect region;
A contrast calculating step for obtaining a contrast of the spot defect region;
A defect rank evaluation step for evaluating the defect rank of the spot defect region based on the three types of feature values of the edge gradient, area, and contrast;
A spot defect detection method comprising:
撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素に隣接して配置された各第1比較画素との輝度変化率をそれぞれ求める第1エッジ勾配算出手段と、
撮像画像において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第1比較画素よりも離れて配置された各第2比較画素との輝度変化率をそれぞれ求める第2エッジ勾配算出手段と、
前記第1および第2エッジ勾配算出手段で算出された各輝度変化率のうち、絶対値が最大のものを対象画素のエッジ勾配値とするエッジ勾配合成手段と、
を備えることを特徴とするエッジ勾配検出装置。
First edge gradient calculating means for obtaining a luminance change rate between the target pixel selected in the captured image and each of the first comparison pixels arranged around the target pixel and adjacent to the target pixel;
Second edge gradient calculation for obtaining a luminance change rate between the target pixel selected in the captured image and each second comparison pixel arranged around the target pixel and further away from the first comparison pixel than the target pixel Means,
An edge gradient synthesizing unit that sets an edge gradient value of the target pixel as the edge gradient value of the target pixel among the luminance change rates calculated by the first and second edge gradient calculating units;
An edge gradient detection apparatus comprising:
シミ欠陥検査対象を撮像した画像からシミ欠陥領域を抽出するシミ欠陥領域抽出手段と、
シミ欠陥領域において選択された対象画素と、この対象画素の周囲にかつ対象画素に隣接して配置された各第1比較画素との輝度変化率をそれぞれ求める第1エッジ勾配算出手段と、
シミ欠陥領域において選択された対象画素と、この対象画素の周囲にかつ対象画素から前記第1比較画素よりも離れて配置された各第2比較画素との輝度変化率をそれぞれ求める第2エッジ勾配算出手段と、
前記第1および第2エッジ勾配算出手段で算出された各輝度変化率のうち、絶対値が最大のものをシミ欠陥領域のエッジ勾配値とするエッジ勾配合成手段と、
前記シミ欠陥領域の面積を算出する面積算出手段と、
前記シミ欠陥領域のコントラストを求めるコントラスト算出手段と、
前記エッジ勾配、面積、コントラストの3種類の特徴値に基づいて前記シミ欠陥領域の欠陥ランクを評価する欠陥ランク評価手段と、
を備えていることを特徴とするシミ欠陥検出装置。
A spot defect area extracting means for extracting a spot defect area from an image obtained by imaging a spot defect inspection object;
First edge gradient calculating means for respectively determining a luminance change rate between the target pixel selected in the spot defect area and each first comparison pixel arranged around the target pixel and adjacent to the target pixel;
A second edge gradient for determining a luminance change rate between the target pixel selected in the spot defect area and each second comparison pixel arranged around the target pixel and away from the first comparison pixel from the target pixel A calculation means;
An edge gradient synthesizing unit that uses an edge gradient value of a spot defect region as the edge gradient value of the absolute value among the luminance change rates calculated by the first and second edge gradient calculating units;
Area calculating means for calculating the area of the spot defect region;
Contrast calculation means for obtaining the contrast of the spot defect area;
Defect rank evaluation means for evaluating the defect rank of the spot defect area based on the three types of feature values of the edge gradient, area, and contrast;
A spot defect detection apparatus comprising:
JP2005370889A 2005-12-22 2005-12-22 Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device Withdrawn JP2007172397A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005370889A JP2007172397A (en) 2005-12-22 2005-12-22 Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005370889A JP2007172397A (en) 2005-12-22 2005-12-22 Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device

Publications (1)

Publication Number Publication Date
JP2007172397A true JP2007172397A (en) 2007-07-05

Family

ID=38298860

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005370889A Withdrawn JP2007172397A (en) 2005-12-22 2005-12-22 Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device

Country Status (1)

Country Link
JP (1) JP2007172397A (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014197243A (en) * 2012-05-22 2014-10-16 株式会社リコー Pattern processor, pattern processing method and pattern processing program
KR101732384B1 (en) * 2016-02-23 2017-05-24 에이아이시스템즈 주식회사 Foreign substance inspection apparatus of cylinder
KR20190041009A (en) 2016-12-15 2019-04-19 오므론 가부시키가이샤 Inspection device, inspection method and program
CN109816621A (en) * 2017-11-16 2019-05-28 富士通株式会社 The detection device and method of abnormal hot spot, electronic equipment
CN111627009A (en) * 2020-05-27 2020-09-04 歌尔股份有限公司 Screen detection method and device and head-mounted display equipment
CN112085708A (en) * 2020-08-19 2020-12-15 浙江华睿科技有限公司 Method and equipment for detecting defects of straight line edge in product outer contour
CN112583999A (en) * 2020-12-02 2021-03-30 广州立景创新科技有限公司 Lens contamination detection method for camera module
CN112907518A (en) * 2021-01-29 2021-06-04 北京百度网讯科技有限公司 Detection method, apparatus, device, storage medium and program product
CN113031333A (en) * 2021-03-23 2021-06-25 滁州惠科光电科技有限公司 Method and device for determining cutting line of array substrate
CN113284154A (en) * 2021-05-25 2021-08-20 武汉钢铁有限公司 Steel coil end face image segmentation method and device and electronic equipment
CN115082429A (en) * 2022-07-20 2022-09-20 山东马勒铝业科技有限公司 Aluminum bar defect detection method based on image processing
CN116758083A (en) * 2023-08-21 2023-09-15 浙江莫克智造有限公司 Quick detection method for metal wash basin defects based on computer vision
CN117197130A (en) * 2023-11-03 2023-12-08 山东太阳耐磨件有限公司 Driving tooth angle defect identification method based on machine vision
CN117714866A (en) * 2024-02-06 2024-03-15 国网上海市电力公司 Cable channel three-light imaging method and system capable of adaptively focusing

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014197243A (en) * 2012-05-22 2014-10-16 株式会社リコー Pattern processor, pattern processing method and pattern processing program
KR101732384B1 (en) * 2016-02-23 2017-05-24 에이아이시스템즈 주식회사 Foreign substance inspection apparatus of cylinder
US10585045B2 (en) 2016-12-15 2020-03-10 Omron Corporation Inspecting device, inspecting method, and program
KR20190041009A (en) 2016-12-15 2019-04-19 오므론 가부시키가이샤 Inspection device, inspection method and program
CN109791089A (en) * 2016-12-15 2019-05-21 欧姆龙株式会社 Check device, inspection method and program
CN109816621A (en) * 2017-11-16 2019-05-28 富士通株式会社 The detection device and method of abnormal hot spot, electronic equipment
CN109816621B (en) * 2017-11-16 2023-05-16 富士通株式会社 Abnormal light spot detection device and method and electronic equipment
CN111627009A (en) * 2020-05-27 2020-09-04 歌尔股份有限公司 Screen detection method and device and head-mounted display equipment
CN111627009B (en) * 2020-05-27 2023-10-20 歌尔光学科技有限公司 Screen detection method and device and head-mounted display equipment
CN112085708A (en) * 2020-08-19 2020-12-15 浙江华睿科技有限公司 Method and equipment for detecting defects of straight line edge in product outer contour
CN112085708B (en) * 2020-08-19 2023-07-07 浙江华睿科技股份有限公司 Method and equipment for detecting defects of straight line edges in outer contour of product
CN112583999A (en) * 2020-12-02 2021-03-30 广州立景创新科技有限公司 Lens contamination detection method for camera module
CN112583999B (en) * 2020-12-02 2024-03-15 广州立景创新科技有限公司 Method for detecting lens dirt of camera module
CN112907518A (en) * 2021-01-29 2021-06-04 北京百度网讯科技有限公司 Detection method, apparatus, device, storage medium and program product
CN112907518B (en) * 2021-01-29 2023-07-14 北京百度网讯科技有限公司 Detection method, detection device, detection apparatus, detection storage medium, and detection program product
CN113031333A (en) * 2021-03-23 2021-06-25 滁州惠科光电科技有限公司 Method and device for determining cutting line of array substrate
CN113031333B (en) * 2021-03-23 2022-08-16 滁州惠科光电科技有限公司 Method and device for determining cutting line of array substrate
CN113284154B (en) * 2021-05-25 2022-04-26 武汉钢铁有限公司 Steel coil end face image segmentation method and device and electronic equipment
CN113284154A (en) * 2021-05-25 2021-08-20 武汉钢铁有限公司 Steel coil end face image segmentation method and device and electronic equipment
CN115082429A (en) * 2022-07-20 2022-09-20 山东马勒铝业科技有限公司 Aluminum bar defect detection method based on image processing
CN116758083A (en) * 2023-08-21 2023-09-15 浙江莫克智造有限公司 Quick detection method for metal wash basin defects based on computer vision
CN116758083B (en) * 2023-08-21 2023-10-31 浙江莫克智造有限公司 Quick detection method for metal wash basin defects based on computer vision
CN117197130A (en) * 2023-11-03 2023-12-08 山东太阳耐磨件有限公司 Driving tooth angle defect identification method based on machine vision
CN117197130B (en) * 2023-11-03 2024-01-26 山东太阳耐磨件有限公司 Driving tooth angle defect identification method based on machine vision
CN117714866A (en) * 2024-02-06 2024-03-15 国网上海市电力公司 Cable channel three-light imaging method and system capable of adaptively focusing

Similar Documents

Publication Publication Date Title
JP2007172397A (en) Edge gradient detection method, stain defect detection method, edge gradient detection device and stain defect detection device
JP4882529B2 (en) Defect detection method and defect detection apparatus
JP2007285754A (en) Flaw detection method and flaw detector
JP2008170325A (en) Stain flaw detection method and stain flaw detection device
JP2006258713A (en) Method and apparatus for detecting stain defect
JP5088165B2 (en) Defect detection method and defect detection apparatus
JP2009229197A (en) Linear defect detecting method and device
JP2009036582A (en) Inspection method, inspection device and inspection program of plane display panel
JP2004239733A (en) Defect detection method and apparatus of screen
JP4320990B2 (en) Screen defect detection method and apparatus, and screen defect detection program
JP2005345290A (en) Streak-like flaw detecting method and streak-like flaw detector
JP2005249415A (en) Stain defect detecting method and stain defect detector
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP2004212311A (en) Method and apparatus for detecting unevenness defect
JP2008014842A (en) Method and apparatus for detecting stain defects
JP2008070242A (en) Noise-removing method and apparatus, unevenness defect inspecting method and apparatus
JP2006275609A (en) Irregularity inspection device and irregularity inspection method for cyclic pattern
JP2007285868A (en) Luminance gradient detection method, flaw detection method, luminance gradient detector and flaw detector
JP2005283197A (en) Detecting method and system for streak defect of screen
JP2008171142A (en) Spot defect detection method and device
JP2006145228A (en) Unevenness defect detecting method and unevenness defect detector
JP5615252B2 (en) Appearance inspection device
JP2006133055A (en) Unevenness defect detection method and device, spatial filter, unevenness defect inspection system, and program for unevenness defect detection method
JP5239275B2 (en) Defect detection method and defect detection apparatus
JP2004219176A (en) Method and apparatus for detecting pixel irregulality failing

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070704

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20070813

A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20090303