JPH10289319A - Method and device for checking stripe-shaped defect - Google Patents

Method and device for checking stripe-shaped defect

Info

Publication number
JPH10289319A
JPH10289319A JP9115184A JP11518497A JPH10289319A JP H10289319 A JPH10289319 A JP H10289319A JP 9115184 A JP9115184 A JP 9115184A JP 11518497 A JP11518497 A JP 11518497A JP H10289319 A JPH10289319 A JP H10289319A
Authority
JP
Japan
Prior art keywords
pixel
pixels
streak
point
contour
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.)
Granted
Application number
JP9115184A
Other languages
Japanese (ja)
Other versions
JP3855360B2 (en
Inventor
Hideji Shinoki
秀次 篠木
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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Priority to JP11518497A priority Critical patent/JP3855360B2/en
Publication of JPH10289319A publication Critical patent/JPH10289319A/en
Application granted granted Critical
Publication of JP3855360B2 publication Critical patent/JP3855360B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Testing Or Measuring Of Semiconductors Or The Like (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To exactly detect stripe-shaped defects on the surface of object by adding a specified point to a concerned pixel when the angle difference of maximum and next lightness points on a contour estimated for the concerned pixel is a specified value, binarizing the pixel based on this point, removing isolate points and deleting a small area. SOLUTION: An image on the surface of object is optically inputted as a digital image, any arbitrary pixel is defined as the concerned pixel, and the set of pixels arranged in a square away from this concerned pixel for (k) pieces is defined as contour pixels. When a difference Θ between the angles of semistraight lines drawn to a maximum lightness point M1 and a next lightness point M2 among these contour pixels is close to π, that pixel is judged as the candidate point of stripe-shaped defect, and the fixed point is added to the concerned image. Further, among the nearby pixels included in the square estimated around the concerned pixel, the point of central pixel having a stripe direction toward the concerned pixel is added to the point of concerned pixel. Then, the pixels are binarized based on these points, the isolate points are removed and the small areas are deleted so that the stripe-shaped defect area can be found.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は物体面の上に存在す
る筋状の欠陥の検出方法に関する。筋状の欠陥であるか
ら一方に長くてそれと直交する方向には短いという異方
性のある欠陥である。線状欠陥と言う事もできる。長く
細い連続した欠陥である。直線とは限らない。曲線であ
る事もある。その場合もある程度曲率半径が大きいもの
を意味する。欠陥は画面上に1本とは限らず、複数本存
在することもある。また交差する線状の欠陥であること
もある。ここではそれら連続した線状の欠陥を筋状欠陥
と呼ぶ。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for detecting streak-like defects existing on an object surface. Since it is a streak-like defect, it is an anisotropic defect that is longer on one side and shorter in a direction perpendicular to it. It can also be called a linear defect. It is a long and thin continuous defect. Not necessarily a straight line. It may be a curve. In this case, it also means that the radius of curvature is large to some extent. The number of defects is not limited to one on the screen, and there may be a plurality of defects. In addition, there may be intersecting linear defects. Here, these continuous linear defects are called streak defects.

【0002】局在した丸型、角型欠陥、幅広の欠陥など
は筋状欠陥には含まれない。柔らかい素材が凹凸ある物
体に接触して擦れると筋状の欠陥が発生する。例えばフ
ァイバ端面の線状の傷、プラスチック板に付いた線状の
傷などがここで言う筋状の欠陥である。平滑であるべき
面に、偶然にできた連続線状の傷、これの検出をここで
は問題にする。
[0002] Localized round, square and wide defects are not included in streak defects. When a soft material is rubbed in contact with an uneven object, a streak-like defect occurs. For example, linear scratches on the end face of the fiber and linear scratches on the plastic plate are the streak-like defects referred to herein. The detection of a continuous linear flaw on a surface to be smooth, which is an issue here, is of interest here.

【0003】[0003]

【従来の技術】 特開平8−247957号「液晶基板またはICウ
エハの外観検査用の欠陥検出方法及び欠陥検出装置」
は、配線パターンやデバイス格子状に設けたSiウエハ
やガラス基板の様々な欠陥を光学的に検出する装置に関
する。これはデバイスを作成したウエハや基板には様々
な欠陥がある、という。そして光学的に欠陥を検出する
のであるが、種類の異なる欠陥を検出するには光の当て
方も異なる。ショットズレという欠陥の検出には斜めか
ら回折光線を照射する必要があるという。ぴんとズレの
場合は、斜めからの散乱光を当てる必要があると述べて
いる。膜厚のムラや飛び散りのような欠陥の場合は直角
上方から干渉光を当てる必要がある、という。3種類の
欠陥検出のために3方向から光を当てて画像処理するの
が良いのであるが、それでは時間がかかり過ぎる。
2. Description of the Related Art JP-A-8-247957, "Defect detection method and defect detection apparatus for visual inspection of liquid crystal substrate or IC wafer"
The present invention relates to an apparatus for optically detecting various defects on a wiring pattern or a Si wafer or a glass substrate provided in a device lattice shape. This means that the wafer or substrate on which the device was made has various defects. Defects are detected optically, but the way of irradiating light is different for detecting defects of different types. It is said that it is necessary to irradiate a diffraction light obliquely to detect a shot shift defect. It states that in the case of a gap, it is necessary to apply oblique scattered light. In the case of defects such as unevenness in film thickness or scattering, it is necessary to irradiate interference light from above at right angles. It is better to perform image processing by irradiating light from three directions for the detection of three types of defects, but this takes too much time.

【0004】そこで3種類の光を同時にウエハ、基板に
当てて回折光、散乱光、干渉光の全部を画像として得て
これから各種の欠陥を求めようというのである。検査時
間を短縮するのが目的である。画像処理の詳細について
は述べていない。3種類の光線が必要で同時に当てると
いう工夫について述べているだけである。縦横の格子配
線の方向が決まっておりこれに直交する方向に回折光を
照射すると述べている。平坦な鏡面に偶然生じた傷など
の検出を目的にしていない。筋状欠陥のようなものは分
からない。
Therefore, three types of light are simultaneously applied to a wafer and a substrate to obtain all of diffracted light, scattered light, and interference light as an image, and various defects are to be obtained. The purpose is to reduce the inspection time. The details of the image processing are not described. It merely describes the ingenuity that three types of light beams are required and applied simultaneously. It states that the directions of the vertical and horizontal grid wirings are determined, and that the diffracted light is irradiated in a direction perpendicular to the directions. It is not intended to detect accidental scratches on a flat mirror surface. I don't know anything like streak defects.

【0005】 川島純彦「シリーズ:話題の製品と技
術 汎用画像処理装置について」画像ラボ 1995年
6月号(P75)は、汎用画像処理装置には様々の機能
のものがあり、2値化関数、エッジ抽出、中心線検出、
膨張関数、収縮関数、穴埋め、孤立点除去、細線化、輪
郭点抽出、特徴点抽出関数、面積計測関数、重心測定関
数などがあると述べている。これはそのうち2値化関数
が最も重要であると述べ現状の2値化関数の問題を述べ
ている。二値化をすると多くの特徴が除かれてしまい、
欲しい情報が消えてしまう。これが問題であると言って
いる。単純にコントラストを強調して二値化しても効果
はないといっている。筆者は画素によって異なる閾値を
用いて二値化することによって人間の目で見たのと同じ
ような画像認識ができるといっている。しかしこれも筋
状欠陥のような連続細線の欠陥の認識については述べる
ところがない。
[0005] Sumika Kawashima, "Series: Topic Products and Technologies About General-purpose Image Processing Devices," Image Lab, June 1995 (P75) states that general-purpose image processing devices have various functions, Edge extraction, center line detection,
It states that there are an expansion function, a contraction function, filling in holes, removal of isolated points, thinning, contour point extraction, feature point extraction function, area measurement function, centroid measurement function, and the like. This states that the binarization function is the most important among them, and states the problem of the current binarization function. Binarization removes many features,
The information you want disappears. He says this is the problem. He said that simply enhancing the contrast and binarizing it had no effect. The author states that by performing binarization using a different threshold value for each pixel, image recognition similar to that seen by human eyes can be achieved. However, there is no description about the recognition of a continuous thin line defect such as a line defect.

【0006】 特開平6−105157号「2値画像
生成方法およびその装置」は、原画像と、これを1画素
分ずらした画像との差画像を求め、差画像のプラス側と
マイナス側の和を各々求め、その値をエッジ値とし、あ
る閾値より小さいエッジ値は落とし、残りのエッジ値を
積分し、さらにある閾値によって二値化する。1画素ず
らした画像と原画増の差分の画像は、濃淡の変化がある
ところで値を持つ。これの和を求めると濃淡の連続変化
を急峻な非連続階段変化に変える。変化分(微分)のう
ち小さいものを捨てる。これでノイズやシェーディング
などの淡い濃淡変化は捨象することができる。その後積
分すると、矩形状の原画像に似たものが再生される。こ
れはノイズを落とすだけでなく、波形整形回路も兼ねて
いる。さらに閾値と比較して二値化するので、淡いノイ
ズなどのない二値化画像を生成できる。しかし、斑点
や、濃いノイズがある場合において傷の検出にはこれは
用いることができない。結局ノイズの濃度変化は淡いも
のであるという前提に立っているといえる。濃い斑点の
場合はそのような操作で落とす事はできない。淡い傷は
消えてしまう。
Japanese Patent Application Laid-Open No. 6-105157 discloses a “binary image generating method and apparatus” which obtains a difference image between an original image and an image obtained by shifting the original image by one pixel, and sums the plus side and the minus side of the difference image. Are determined as edge values, edge values smaller than a certain threshold value are dropped, the remaining edge values are integrated, and further binarized by a certain threshold value. The image shifted by one pixel and the image of the difference of the original image increase have a value where there is a change in shading. When the sum of them is obtained, the continuous change of the shading is changed to a steep discontinuous step change. Discard small change (differential). With this, light gray-scale changes such as noise and shading can be neglected. After integration, an image resembling a rectangular original image is reproduced. This not only reduces noise, but also functions as a waveform shaping circuit. Further, since the image is binarized in comparison with the threshold value, a binarized image free of faint noise or the like can be generated. However, this cannot be used to detect flaws when there are spots or dark noise. After all, it can be said that it is based on the premise that the noise density change is faint. In the case of a dark spot, it cannot be removed by such an operation. The light scratches disappear.

【0007】 特開平7−30753号「2値化処理
方法および装置」は原画像と、これを1画素以上ずらし
た画像との差分画像を求め、差分画像の濃度をある閾値
によって二値化するが、その閾値を順次変えてゆく。そ
うしてノイズをカットして二値化できるとしている。微
分して二値化するのは、と同じ思想に基づいている。
これもシェーディングやノイズの明暗変化が小さいとし
てノイズなどを除去している。傷の検出については述べ
るところがない。まして傷とその他の欠陥に明暗変化の
差がないときには両者を相互に区別することができな
い。上記の〜のいずれによっても筋状欠陥(線状の
傷)を検出することはできない。
[0007] Japanese Patent Application Laid-Open No. 7-30753 discloses a "binarization processing method and apparatus" that obtains a difference image between an original image and an image obtained by shifting the original image by one or more pixels, and binarizes the density of the difference image by a certain threshold value. However, the threshold value is sequentially changed. It says that noise can be cut and binarized. Differentiating and binarizing is based on the same idea.
This also removes noise and the like assuming that shading and noise change in noise is small. There is no mention of flaw detection. Furthermore, when there is no difference between light and dark changes in the scratch and other defects, the two cannot be distinguished from each other. No streak defect (linear scratch) can be detected by any of the above.

【0008】[0008]

【発明が解決しようとする課題】例えば樹脂製のバルブ
シートを問題にする。温水と冷水が同じ蛇口から出る水
道栓は内部で温水管と冷水管から水を合体させて出口管
に送り出すようになっている。温水管、冷水管からの流
入量H、Cを調整するために回転する弁体(バルブシー
ト)を用いる。これは摺動特性に優れた樹脂シートを使
う。例えば柔軟な樹脂層の表裏を硬質被膜によって被覆
した材料を適当な形状に裁断したものをバルブシートと
する。バルブシートは円周状に設けられた温水入口、冷
水入口、出口の3つの開口の上を滑るので耐摩耗性が良
いものでないといけない。さらに長寿命であることが要
求される。表面に傷があっては破損、破断の原因にな
る。
For example, a problem arises with a valve seat made of resin. Hot water and cold water come out of the same faucet, and the faucet internally combines water from the hot and cold water pipes and sends it out to the outlet pipe. A rotating valve body (valve seat) is used to adjust the inflow amounts H and C from the hot water pipe and the cold water pipe. This uses a resin sheet having excellent sliding characteristics. For example, a material in which a soft resin layer is coated on the front and back with a hard coating and cut into an appropriate shape is defined as a valve seat. Since the valve seat slides over the three openings of the hot water inlet, the cold water inlet, and the outlet provided in the circumference, it must have good wear resistance. It is required to have a longer life. Scratches on the surface can cause breakage and breakage.

【0009】そこで樹脂性のバルブシートは平坦平滑で
無傷でなくてはならない。製造工程において表面に直線
状の傷が付く事がある。傷付いたものは検査して排除す
る必要がある。従来は目視検査によっていた。1枚1枚
検査者が目で見て傷の有無を検査する。しかし人手によ
る目視検査は人によってばらつきがある。同じ人でも体
調により時刻により合否の判断が変わる。さらに検査コ
ストが嵩むという難点があった。目視に頼らず自動的に
傷検査できる技術が望まれる。
Therefore, the resinous valve seat must be flat, smooth and intact. In the manufacturing process, linear scratches may be formed on the surface. Damaged items need to be inspected and eliminated. Conventionally, visual inspection was used. Each inspector visually inspects for scratches. However, manual visual inspection varies from person to person. The same person's pass / fail judgment changes according to the physical condition. Further, there is a problem that the inspection cost increases. There is a need for a technique that can automatically perform a flaw inspection without relying on visual observation.

【0010】あるいはまた光ファイバの端面にも筋状の
欠陥が生じることがある。長い光ファイバを刃物で切っ
て適当な長さにし研磨するので、端面に傷が付く事もあ
る。端面の傷は光を散乱させる可能性があり好ましくな
い。そこで検査者が顕微鏡で観察して傷のあるものは除
くことになっている。これも人によってばらつきがあ
る。光ファイバ端面の検査も自動化することが望まし
い。
[0010] Alternatively, a streak-like defect may also occur on the end face of the optical fiber. Since a long optical fiber is cut with a knife to a suitable length and polished, the end face may be damaged. Scratches on the end face may undesirably scatter light. Therefore, the inspector observes with a microscope and removes any scratches. This also varies from person to person. It is also desirable to automate the inspection of the optical fiber end face.

【0011】このような要望に応え、物体表面の筋状の
欠陥を的確に検出できる方法を提供することが、本発明
の第1の目的である。斑点状の孤立した欠陥は無視して
筋状の欠陥だけの検出できる方法を提供することが本発
明の第2の目的である。浅くて凹凸の差が小さい筋状欠
陥でも過たず検出できる方法を提供する事が本発明の第
3の目的である。筋状欠陥をもつ製品の欠陥の度合いを
評価して不良品を自動的に排除できるようにすることが
本発明の第4の目的である。
It is a first object of the present invention to provide a method capable of accurately detecting streak-like defects on the surface of an object in response to such a demand. It is a second object of the present invention to provide a method capable of detecting only streak-like defects ignoring spot-like isolated defects. It is a third object of the present invention to provide a method capable of detecting even a streak defect which is shallow and has a small difference in unevenness. A fourth object of the present invention is to evaluate the degree of defect of a product having streak defects so that defective products can be automatically eliminated.

【0012】[0012]

【課題を解決するための手段】本発明の筋状欠陥の検出
方法は、対象物表面の像を光学的に入力し、デジタル画
像とし、各画素の明度情報を画像メモリに記憶させ、全
画素から順に取った任意の画素を注目画素Dj として、
注目画素Dj からk個離れた正方形に並ぶ画素集合を輪
郭画素Nkとし、明度情報から輪郭画素Nkのうち最大
又は最小の明度を持つ画素M1を求め、その画素M1の
周辺u画素分を除いた残りの輪郭画素Nkのうち最大又
は最小の明度を持つ画素M2を求め、注目画素からM
1、M2に引いたふたつの半直線の角度の差Θがπ−α
≦Θ≦π+α(0<α≦π/3)である場合にその画素
が筋状欠陥の候補点Fj と判断し、結果画像メモリの注
目画素Dj に一定の得点C1をプラスする処理を輪郭画
素Nkを変えて複数回行い、注目画素Dj から注目画素
M1へ引いた半直線の方向として注目画素の筋方向Lj
を求め筋方向収容メモリのDj の位置に収容し、同じ操
作を原画像の全ての画素{Dj }に対して行い、候補得
点{Fj }と筋方向{Lj }を求め、再び全画素から順
に取った任意の画素を注目画素Dj とし、その周囲にW
×Wの正方形に含まれる近傍画素のうち筋方向が注目画
素を向いている求心画素Dk を求め求心画素Dk の候補
得点Fk を注目画素の候補得点Fj に加え、結果画像メ
モリに格納し、同じ操作を全ての画素について行い、相
加された候補得点{Fj }を得て、ある閾値Qによって
画素を二値化し、Fj ≧Qである画素の集合である筋状
欠陥領域Gmを求める。
According to the method of detecting a streak defect of the present invention, an image of the surface of an object is optically input, converted into a digital image, brightness information of each pixel is stored in an image memory, and all pixels are detected. any pixel taken in the order as the pixel of interest D j from
The set of pixels arranged in a square from the pixel of interest D j k-pieces apart and contour pixels Nk, obtains pixel M1 with a maximum or minimum lightness of the outline pixels Nk from brightness information, except for the peripheral u pixels of the pixel M1 Out of the remaining contour pixels Nk, a pixel M2 having the maximum or minimum brightness is obtained, and M
1. The difference 角度 between the angles of the two half-lines drawn on M2 is π-α
≦ Θ ≦ π + α that pixel if it is (0 <α ≦ π / 3 ) is determined as a candidate point F j of the line defect, the process of plus a constant scoring C1 to the pixel of interest D j of the result image memory The contour pixel Nk is changed a plurality of times, and the streak direction L j of the pixel of interest is determined as the direction of the half line drawn from the pixel of interest D j to the pixel of interest M1.
Accommodated at the position of D j Determination trace direction accommodating memory, do the same for all pixels of the original image {D j}, determine the candidate score {F j} and streak direction {L j}, again any pixel taken sequentially from all the pixels to the target pixel D j, W therearound
Among the neighboring pixels included in the × W square, a centripetal pixel D k whose streak direction is directed to the target pixel is obtained, a candidate score F k of the centripetal pixel D k is added to the candidate score F j of the target pixel, and the resultant image memory is stored in the result image memory. Then, the same operation is performed for all the pixels, an added candidate score {F j } is obtained, the pixels are binarized by a certain threshold Q, and a streak defect which is a set of pixels satisfying F j ≧ Q is obtained. The area Gm is obtained.

【0013】さらに、筋状欠陥領域から孤立点を除去
し、孤立点のない筋状欠陥を求める。筋状欠陥の面積S
(m)を測定し、許容面積S0 と比較してそれより大き
い場合はその製品が不良品であると判断する。
Further, isolated points are removed from the streak defect area, and a streak defect having no isolated points is obtained. Area S of streak defect
(M) is measured, and if it is larger than the allowable area S 0 , it is determined that the product is defective.

【0014】[0014]

【発明の実施の形態】本発明は検査対象物についた筋状
の欠陥(傷)を画像処理によって自動的に検出する手段
を提供する。対象物の像をカメラによって撮像し、画像
を画素に分解し画素には明度をデータとして与え、画素
ごとにそれが筋状欠陥候補であるからどうかを判断する
操作をおこなう。筋状欠陥という言葉は長いので以後単
純に傷と表現することもある。以下にそれぞれの手順の
詳細について説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention provides means for automatically detecting streak-like defects (scratches) on an inspection object by image processing. An image of the object is taken by a camera, the image is decomposed into pixels, brightness is given to the pixels as data, and an operation is performed for each pixel to determine whether or not it is a line defect candidate. Since the word streak defect is long, it is sometimes simply referred to as a scratch. The details of each procedure will be described below.

【0015】1.光学的画像入力…対象物に光を当てて
TVカメラで撮像する。対象物からの反射光がTVカメ
ラの画像になる。画像は例えば512×512の縦横の
画素に分割される。画素はDj によって以後表現する。
jが画素の番号である。x方向y方向のふたつのサフィ
ックスを纏めてjと書いている。それぞれの画素は明る
さつまり明度の諧調をもつ。諧調は例えば256段階で
ある。色彩は不要である。明度情報だけでよい。明度と
いうのは画素の明るさである。濃淡ともいうし、濃度と
も諧調ともいう。ここでは明度という言葉を使う。画素
データは画像メモリに蓄積される。
1. Optical image input: An image is taken with a TV camera by irradiating an object with light. The reflected light from the object becomes an image of the TV camera. The image is divided into, for example, 512 × 512 vertical and horizontal pixels. Pixels are hereinafter represented by D j .
j is the number of the pixel. The two suffixes in the x and y directions are collectively written as j. Each pixel has brightness, that is, brightness gradation. The gradation is, for example, 256 steps. No color is required. Only the brightness information is required. Brightness is the brightness of a pixel. It is also called shading, density and gradation. Here we use the word brightness. Pixel data is stored in the image memory.

【0016】2.注目画素の設定…画像の画素ひとつ一
つについて以下に述べる同じ操作を行う。現在その操作
を行っている画素を注目画素Dj と呼ぶことにする。ラ
スター順に操作対象の画素つまり注目画素を変えてゆ
く。最上行の最左列の画素から左向きに1行の画素の処
理を行い、2行目の最左画素に移りその行の画素の処理
をする。このように行毎に同じ操作をして最下段の右画
素にいたる。
2. Target pixel setting: The same operation described below is performed for each pixel of the image. It will be referred to as pixels that are currently performing the operation as a pixel of interest D j. The operation target pixel, that is, the target pixel is changed in the raster order. The processing of the pixels in one row is performed leftward from the pixels in the leftmost column of the uppermost row, and the process proceeds to the leftmost pixel in the second row to process the pixels in that row. In this manner, the same operation is performed for each row to reach the lower right pixel.

【0017】3.輪郭の設定…注目画素Dj を中心とす
る正方形の辺上に並ぶ画素列を輪郭Nと呼ぶ。輪郭の大
きさは整数kによって表現する。注目画素から縦横斜め
にk離れた画素を含む正方形よりなる群をNkとする。
つまり1辺が(2k+1)の正方形の大きさの輪郭をk
という。図6に輪郭の定義を示す。N1というのは注目
画素Dj のすぐ周りの(3×3)正方形の8画素であ
る。N2はその次の(5×5)正方形の16画素であ
る。一般にNkは8k個の画素の集合である。Nkは注
目画素Dj において一つ決まる。注目画素Dj が異なれ
ばNkも違う。いわばNk(Dj )と書くべきものであ
るが、簡単のためにNkと書く。
3. The pixel rows arranged on a square of the sides around the set ... pixel of interest D j contour is referred to as a contour N. The size of the contour is represented by an integer k. A group consisting of squares including pixels that are vertically and horizontally diagonally separated by k from the target pixel is defined as Nk.
In other words, the outline of a square whose side is (2k + 1) is k
That. FIG. 6 shows the definition of the contour. N1 is a (3 × 3) square eight pixels immediately around the target pixel Dj. N2 is the next (5 × 5) square 16 pixels. Generally, Nk is a set of 8k pixels. Nk is determined one in the pixel of interest D j. If the pixel of interest D j is different Nk also different. It should be written as Nk (D j ), but it is written as Nk for simplicity.

【0018】通常の画像処理において輪郭線というの
は、二値画像の黒画素の最外周の画素列をいう。不定型
で物体の像の外殻線を意味する。アウトラインともいう
このような輪郭線と、本発明の輪郭は截然と違う。本発
明は、注目画素の周りに(2k+1)の大きさの正方形
を想定しこれを輪郭といっているのである。従来の輪郭
線と混同してはいけない。
In the ordinary image processing, the contour line refers to the outermost pixel row of the black pixels of the binary image. It is irregular and means the outer shell line of the image of the object. Such a contour line, also called an outline, is clearly different from the contour of the present invention. In the present invention, a square having a size of (2k + 1) is assumed around the pixel of interest, and this is referred to as a contour. Don't be confused with traditional contours.

【0019】連続する複数の輪郭Nk(k=s〜e)に
対して同じ処理を繰り返し行う。Nsは最小の輪郭、N
eは最大の輪郭である。梨地模様などがある場合は、k
=1、2と言った注目画素に隣接する画素は処理に含め
ない。小さく丸い斑点などを落とすためにkをある程度
大きく取るのである。たとえばs=6、e=9のように
する。層でない場合はs=1から始めることもできる。
最小(開始)輪郭Ns、最大(終了)輪郭Neのs,e
は自由に設定できるパラメータとなりうる。
The same processing is repeated for a plurality of continuous contours Nk (k = s to e). Ns is the minimum contour, N
e is the maximum contour. If there is a satin pattern, k
Pixels adjacent to the pixel of interest such as = 1 and 2 are not included in the processing. In order to remove small round spots, k is increased to some extent. For example, s = 6 and e = 9. If it is not a layer, one can start with s = 1.
S, e of the minimum (start) contour Ns and the maximum (end) contour Ne
Can be a parameter that can be set freely.

【0020】4.最大(最小)明度点M1の決定…注目
画素Dj のある輪郭Nk(s≦k≦e)の8k個の画素
の内で最大(或いは最小)明度を持つ画素を求める。最
大明度を求めるか最小明度を求めるかというのは、対象
物と筋状欠陥の性質による。対象物に比較して傷(筋状
欠陥)が明るい場合は最大明度の画素を、暗い場合は最
小明度の画素を選ぶ。最大(或いは最小)というのは不
便であるから以後、最大明度ということにする。
4. Obtain the pixel having the maximum (or minimum) brightness among the 8k pixels maximum (minimum) determining lightness point M1 ... contour of the pixel of interest D j Nk (s ≦ k ≦ e). Whether to determine the maximum brightness or the minimum brightness depends on the nature of the object and the streak defect. If the scratch (streak defect) is brighter than the target object, the pixel with the maximum brightness is selected, and if it is dark, the pixel with the minimum brightness is selected. Since the maximum (or minimum) is inconvenient, it is hereinafter referred to as the maximum brightness.

【0021】図3にN2の離隔から最大明度点を求める
場合を例示する。全ての画素の明度Lj が既に画像メモ
リに入っているので、輪郭Nk上の最大明度点はすぐに
見つかる。これを最大明度点M1とよぶ。これは筋状欠
陥の一部である可能性のある画素である。最大明度点M
1というのは、あくまで注目画素Dj と輪郭Nkの関数
である。Dj とNkを決めると一つの最大明度点M1が
決まる。いわばM1(Dj 、Nk)と書くべきものであ
る。M1は全画像中で最大の明度を持つ点という意味で
はない。誤解してはいけない。
FIG. 3 illustrates a case where the maximum lightness point is obtained from the separation of N2. Since lightness L j of all pixels already in the image memory, the maximum brightness point on the contour Nk is found immediately. This is called the maximum lightness point M1. This is a pixel that may be part of a streak defect. Maximum lightness point M
Because 1 is a function of only the target pixel D j and the contour Nk. One of maximum brightness point M1 when determining the D j and Nk is determined. In other words, it should be written as M1 (D j , Nk). M1 does not mean that the point has the maximum brightness in the entire image. Don't get me wrong.

【0022】5.次点明度点M2の決定…同じ注目画素
j 、輪郭Nkにおいて最大明度点M1とその近傍u画
素を除いた輪郭Nkにおいて、最大又は最小の明度を持
つ画素を求める。欠陥が明るい場合は明度の高いもの
を、欠陥が暗い場合は明度の低いものを探索する。区別
すると煩雑になるから、最大明度点につぐ明度(又は暗
度)のものを次点明度点M2という。これもDj 、Nk
が決まって初めて決まるものである。図4に輪郭N2の
場合の次点明度点の決定を示す。最大明度点M1と次点
明度点M2は同じ輪郭Nk上の最大の明度の点と、次点
の明度を持つ点である。
5. Decision ... same pixel of interest D j next mark lightness point M2, the contour Nk, excluding the maximum brightness point M1 and its neighboring u pixel in the contour Nk, obtain the pixel having the maximum or minimum brightness. If the defect is bright, the one with high brightness is searched, and if the defect is dark, one with low brightness is searched. Since the distinction becomes complicated, the lightness (or darkness) following the maximum lightness point is referred to as a next-point lightness point M2. This is also D j , Nk
Is determined only once. FIG. 4 shows the determination of the next lightness point in the case of the contour N2. The maximum lightness point M1 and the next lightness point M2 are a point having the maximum lightness on the same contour Nk and a point having the next lightness.

【0023】但しM1に隣接する画素が次点の場合は意
味がないので、M1と離れた次点明度点を探す必要があ
る。そのためにM1とその近傍u画素(例えば前後1〜
2画素分)を除いた(8k−1−2u)点から、次点明
度点を探す。前後1画素を除く場合は、8k−3画素か
ら、前後2画素を除く場合は8k−5画素から次点明度
点M2を探すことになる。次点明度点M2も筋状欠陥の
一部になる可能性のある点である。こうしてDj の輪郭
Nk上にふたつの傷の一部である可能性ある点が抽出さ
れたことになる。
However, since there is no meaning when the pixel adjacent to M1 is the next point, it is necessary to search for the next lightness point distant from M1. For this purpose, M1 and its adjacent u pixels (for example,
From the (8k-1-2u) points excluding (2 pixels), the next lightness point is searched. The next lightness point M2 is searched from 8k-3 pixels when removing one pixel before and after, and from 8k-5 pixels when removing two pixels before and after. The next-point lightness point M2 is also a point that may become a part of the streak defect. Thus some point be part of the two wounds will have been extracted on the contour Nk of D j.

【0024】6.M1、M2の方向差計測…注目画素D
j から最大明度点M1、次点明度点M2へ引いたふたつ
の半直線のなす角度Θがπに十分に近いかどうかを調べ
る。これは注目画素Dj が傷(筋状欠陥)の一部である
かどうかを評価する手順である。最大明度点、次点明度
点が傷の一部である可能性は高い。しかし注目画素を中
心として枠(輪郭)を設定して明度を調べているのは、
枠上の画素が傷の一部であるかどうかと調べるのではな
く、注目画素が傷の一部かどうかを調べる為である。傷
(筋状欠陥)が注目画素を通っていれば最大明度点、注
目画素、次点明度点がほぼ一直線に並ぶはずである。も
しも直線上にあれば、注目画素から最大明度点、次点明
度点に引いた半直線のなす角度はπである。
6. Measurement of direction difference between M1 and M2: target pixel D
It is checked whether or not the angle Θ formed by the two half lines drawn from j to the maximum lightness point M1 and the next lightness point M2 is sufficiently close to π. This is a procedure that the pixel of interest D j to assess whether a part of the wound (line defect). It is highly possible that the maximum lightness point and the next lightness point are part of the scratch. However, when setting the frame (contour) around the pixel of interest and checking the brightness,
This is not for checking whether the pixel on the frame is a part of the flaw but for checking whether the pixel of interest is a part of the flaw. If the scratch (streak defect) passes through the pixel of interest, the maximum lightness point, the pixel of interest, and the next lightness point should be substantially aligned. If it is on a straight line, the angle formed by a half line drawn from the target pixel to the maximum lightness point and the next lightness point is π.

【0025】そのような理由でΘがπに近いかどうかを
調べる。図4にその手順を示す。M1とM2が注目画素
に関して点対称であればΘがπである。しかし完全に点
対称でなくてもそれからのずれが僅かであれば注目画素
が傷の一部でありうる。ずれのマージンをαとして、角
度差Θがπ±αであれば、注目画素が傷(筋状欠陥)の
一部である可能性が強いと判断する。筋状欠陥の一部で
ある可能性のある点を「筋状欠陥候補」あるいは単に
「候補」と呼ぶ。つまり π−α<Θ<π+α (1) である場合、注目画素を筋状欠陥の候補とする。αはπ
/3以下の定数である(0<α≦π/3)。
It is checked whether 調 べ る is close to π for such a reason. FIG. 4 shows the procedure. If M1 and M2 are point-symmetric with respect to the pixel of interest, Θ is π. However, the pixel of interest may be a part of the flaw even if it is not completely point-symmetric but only slightly deviates therefrom. If the deviation margin is α and the angle difference 、 is π ± α, it is determined that the pixel of interest is likely to be a part of a flaw (streak defect). Points that may be part of the streak defect are referred to as “streak defect candidates” or simply “candidates”. That is, when π−α <Θ <π + α (1), the target pixel is set as a candidate for a line defect. α is π
/ 3 or less (0 <α ≦ π / 3).

【0026】画素は点であるから候補点と言うべきであ
るが簡単のため候補という。図5に示すように、原画像
の原画像メモリに対応して結果収容画像メモリというも
のを作成する。これは原画像メモリと同じ寸法をもち画
素が1:1対応している。結果収容画像は各画素が筋状
欠陥の一部である可能性を示す筋得点Fj を蓄積すべき
画像である。はじめ全ての画素はFj =0にリセットさ
れていて、筋状欠陥である可能性を候補得点Fj にして
加点してゆく。もし、注目画素Dj が(1)を満たすな
らこれは候補である。その場合結果収容画像の注目画素
j に対応する箇所にC1の得点を加える。(1)を満
たさない場合は加点しない。
Although a pixel is a point, it should be called a candidate point, but for simplicity, it is called a candidate. As shown in FIG. 5, a result storage image memory is created corresponding to the original image memory of the original image. This has the same dimensions as the original image memory and has a 1: 1 correspondence between pixels. The result-accommodated image is an image in which a streak score Fj indicating that each pixel may be a part of a streak defect is to be accumulated. At first, all the pixels are reset to F j = 0, and the possibility of being a line defect is added as a candidate score F j . If this if the pixel of interest D j satisfy (1) is a candidate. Add scores C1 at a position corresponding to the pixel of interest D j in that case results accommodating image. If (1) is not satisfied, no points will be added.

【0027】7.輪郭を変えて繰り返し…一つの輪郭N
sについて前述のような最大明度点、次点明度点、角度
差を求めて注目画素が傷の候補であることを示す得点を
計算した。同じ注目画素Dj について、同じことを複数
の輪郭について行う。どうして複数の輪郭について同じ
事を繰り返すのか?図4で輪郭N2について最大明度
点、次点明度点を求めているが注目画素については明度
を調べていない。直接注目画素が傷中の画素であるとい
うことは確認されていない。だからこの段階で、傷中の
画素である可能性がある画素は注目画素を中心としてふ
たつしか見つかっていないのである。これでは不十分で
ある。たまたま孤立した傷がN2の上に存在下という事
も有り得る。もしも最大明度点や次点明度点が本当に傷
の上の点であるとすれば、ふたつの点を結んだ直線の延
長上にも傷上の点があるはずである。筋状欠陥であるか
ら欠陥点が直線上に並んでいなくてはならない。
7. Change contour and repeat ... one contour N
For s, the maximum lightness point, the next lightness point, and the angle difference as described above were obtained, and a score indicating that the target pixel was a flaw candidate was calculated. For the same pixel of interest D j, it does the same for a plurality of contours. Why repeat the same thing for multiple contours? In FIG. 4, the maximum lightness point and the next lightness point are obtained for the contour N2, but the lightness is not checked for the pixel of interest. It has not been confirmed that the pixel of interest is directly a damaged pixel. Therefore, at this stage, only two pixels that may be flawed pixels are found around the pixel of interest. This is not enough. It is possible that an isolated wound happens to be on N2. If the maximum lightness point or the next lightness point is really the point above the wound, there should be a point on the wound on the extension of the straight line connecting the two points. Since the defect is a streak defect, the defect points must be aligned on a straight line.

【0028】であるから一つの輪郭上だけでなく、それ
を囲む複数の輪郭においても最大明度点、次点明度点を
求めてゆかなくてはならないのである。そこでNsの次
に、Ns+1の輪郭について同じように最大明度点M
1、次点明度点M2、角度差Θを求める。これは先ほど
のNsのM1、M2とはもちろん違う。ただし注目画素
j は同じ点である。輪郭Nkは同じ注目画素について
同心上のものを想定するからである。そしてΘが(1)
式を満たすと、結果収容画像の同じDj に得点C1を加
点する。(1)を満たさない場合は加点しない。
Therefore, the maximum lightness point and the next lightness point must be obtained not only on one outline but also on a plurality of outlines surrounding the outline. Then, after Ns, the maximum brightness point M is similarly set for the contour of Ns + 1.
1. The next-point lightness point M2 and the angle difference Θ are obtained. This is, of course, different from the Ns M1 and M2 described above. However, the pixel of interest D j is the same point. This is because the contour Nk is assumed to be concentric for the same target pixel. And Θ is (1)
When the expression is satisfied, the score C1 is added to the same D j of the result accommodation image. If (1) is not satisfied, no points will be added.

【0029】このように輪郭Nk(k=s、…、e)に
ついて同じ操作を行う。(e−s+1)回同様のことを
実行する。繰り返しの数m=(e−s+1)は、2以上
であるが、目的の画像の性質などによって適当に決め
る。注目画素Dj はm回の操作によって、0〜mCの得
点Fj を得る。これは図5の結果収容画像のDj の欄に
記憶される。得点Fj が高いほど、注目画素が傷の一部
である可能性が高い。注目画素自体の明度を全く問題に
しないで輪郭の明度から中心にある注目画素の傷である
確率を与えるものである。また輪郭相互の連関は全く考
慮していない。
As described above, the same operation is performed for the contour Nk (k = s,..., E). The same operation is performed (e−s + 1) times. The number of repetitions m = (e−s + 1) is 2 or more, but is appropriately determined according to the properties of the target image. Target pixel D j by m single operation to obtain a score F j of 0~MC. Which is stored in the column of D j results accommodating image in FIG. The higher the score Fj , the higher the possibility that the pixel of interest is a part of the scratch. It does not matter the brightness of the target pixel itself, and gives the probability that the target pixel at the center is flawed from the brightness of the contour. Also, the relationship between the contours is not considered at all.

【0030】Ns〜Neについて同じことを繰り返すが
隣接輪郭で最大明度点、次点明度点がどのように分布す
るか?ということは問題にしていない。それぞれの輪郭
における最大明度点や次点明度点も直線上に並ぶはずで
ある。しかし隣接輪郭間での最大明度点、次点明度点相
互の配置の連関については調べていない。つねに注目画
素Dj とこれらM1、M2のなす角度がπ近くであるか
どうかだけを問題にしている。これは計算を複雑にしな
いためである。隣接輪郭間で最大明度点、次点明度点の
分布の相関を入れるとさらに確度の高い計算ができるで
あろう。
The same is repeated for Ns to Ne, but how are the maximum lightness points and the next lightness points distributed in adjacent contours? That is not a problem. The maximum lightness point and the next lightness point in each contour should also be aligned on a straight line. However, the relationship between the arrangement of the maximum lightness point and the next lightness point between adjacent contours is not examined. Always angle of the pixel of interest D j and these M1, M2 is the only problem whether near [pi. This is because the calculation is not complicated. If the correlation between the distribution of the maximum lightness point and the distribution of the next lightness point between adjacent contours is included, more accurate calculation will be possible.

【0031】8.筋方向の賦与…注目画素Dj の方向と
いうものを定義しこれをDj に賦与する。画素は一つの
点で、点は本来方向のないものである。であるから画素
に方向があると言うのはいかにも変である。いかにも変
であるがそれにもかかわらず本発明は注目画素に方向と
いうものを想定する。この点が本発明の重要な特徴のひ
とつである。それ以外にも幾つも方向が出てくるので、
画素に付ける方向をここでは「筋方向」(L)と呼ぶ。
j画素の筋方向をLj によって表すことにする。これは
筋状欠陥(傷)の上に注目画素が存在するとして傷の方
向を表すために定義するものである。
8. Impart of muscle direction ... to define what that direction of the pixel of interest D j to impart this to the D j. A pixel is a single point, and the point is essentially non-directional. Therefore, it is strange that a pixel has a direction. This is strange, but nevertheless the present invention assumes a direction to the pixel of interest. This is one of the important features of the present invention. There are many other directions as well,
The direction attached to the pixel is referred to herein as the "streak direction" (L).
muscle direction of j pixel to be represented by L j. This is defined to indicate the direction of the flaw assuming that the target pixel exists on the streak defect (flaw).

【0032】傷方向を示すものとして筋方向は幾何学的
な意味をもつ。本来画素は点に過ぎない。しかし傷の上
にあるとすれば傷の方向によって画素自体も方向づけら
れるという思想である。注目画素が傷の上にない場合も
筋方向Lを定義する。この段階で、注目画素が傷の上に
あるかないか分からないのであるから、傷(筋状欠陥)
上にない注目画素についても方向Lは定義されるわけで
ある。その場合、方向は傷の方向であるという明確な幾
何学的意味を持たない。
The streak direction has a geometrical meaning to indicate the direction of the flaw. Originally, a pixel is just a point. However, the idea is that if it is over the flaw, the pixel itself is also oriented according to the direction of the flaw. The line direction L is also defined when the pixel of interest is not over the scratch. At this stage, it is not known whether or not the pixel of interest is on the scratch, so the scratch (streak defect)
The direction L is also defined for a pixel of interest not above. In that case, the direction does not have a definite geometric meaning that it is the direction of the wound.

【0033】方向といっても連続量では扱い難いので、
縦横斜めの8方向だけに類別する。つまり注目画素の周
りの空間を、x軸となす角度が、337.5゜、22.
5゜、67.5゜、112.5゜、157.5゜、20
2.5゜、247.5゜、292.5゜の半直線によっ
て分割し、8方向a、b、c、d、−a、−b、−c、
−dに分類する。図19に8方向の分類を示す。実際に
は正負は問わないので、4方向a、b、c、dに縮約さ
れる。図20に正負の区別を捨象した4方向の分類を示
す。筋方向Lは4つの値を取る変数である。
Since it is difficult to handle the direction with a continuous amount,
Classify only into 8 vertical and horizontal directions. That is, the angle between the space around the pixel of interest and the x-axis is 337.5 °, 22.
5 ゜, 67.5 ゜, 112.5 ゜, 157.5 ゜, 20
Divided by a half line of 2.5 °, 247.5 °, 292.5 °, and divided into eight directions a, b, c, d, −a, −b, −c,
-D. FIG. 19 shows the classification in eight directions. Actually, it does not matter whether the sign is positive or negative. FIG. 20 shows classification in four directions in which the distinction between positive and negative is omitted. The muscle direction L is a variable that takes four values.

【0034】それでは画素Dj の筋方向Lj をどのよう
にすれば最も的確に与える事ができるか?これが問題で
ある。 (i)注目画素Dj からm個の輪郭に対するm個の最大
明度点M1に半直線を引く。その半直線がm個とも4方
向分類の範囲で合致すれば合致した方向をDj の筋方向
とする。注目画素から最大明度点M1に引いた半直線を
M1半直線と簡単に呼ぶことにする。上の規則はm個の
M1半直線が共に4分類のひとつに入る場合はその方向
をDj の筋方向とするということである。
[0034] So how can give the most accurate if the muscle direction L j of the pixel D j? This is the problem. (I) to the m maximum brightness point M1 for the m contour from the pixel of interest D j catching half line. Its half-line is the direction that matches when matching the range of the m least four directions classification and streak direction of D j. A half line drawn from the target pixel to the maximum lightness point M1 will be simply called an M1 half line. The above rules when entering one of the m M1 half lines are both 4 classification is that it its direction and streak direction of D j.

【0035】(ii)m個のM1半直線が合致しない場
合はDj の筋方向を決めるためのいくつかの方法があ
る。 (iia)最多法:m個のM1半直線の4方向分類にお
いて最も多い方向を筋方向Lとして採用するという方法
である。m個のM1半直線の方向が全部一致しないとし
ても過半数はひとつの分類に入ることであろう。 (iib)コントラスト法:M1半直線に直交する方向
と、M1半直線の方向で明度の差が最も大きくなるよう
なM1の方向を筋方向Lとして採用するという方法であ
る。傷が伸びる方向と、直角方向では明度がクッキリと
相違するはずだからである。 (iic)平均法:m個のM1半直線の角度の平均値を
求めて平均値の方向を筋方向Lとして採用するという方
法である。
[0035] (ii) if the m M1 half-line does not match There are several methods for determining the muscle direction D j. (Ii) Maximum method: A method in which the most frequent direction in the four directions of m M1 half-lines is adopted as the muscle direction L. Even if the directions of the m M1 half-lines do not all match, the majority will fall into one category. (Iib) Contrast method: A method in which the direction of M1 that maximizes the difference in brightness between the direction orthogonal to the M1 half-line and the direction of the M1 half-line is adopted as the streak direction L. This is because the brightness should be clearly different between the direction in which the scratch grows and the direction at right angles. (Iic) Average method: A method in which the average value of the angles of m M1 half-lines is determined, and the direction of the average value is adopted as the muscle direction L.

【0036】全てのM1半直線方向が合致しないときは
上記の3つのどの方法によって、D j の筋方向を決めて
も良い。ただし、これが一致しないときはDj が傷上の
点でない可能性が高い。筋方向Lj はDj が傷の上にあ
る時に初めて傷の方向を暗示するという意味がある。D
j が傷上にない場合は筋方向Lj はそもそも意味がな
い。意味がないのでその決定が多少の誤差を含んでも良
いわけである。であるから(iia)〜(iic)のど
の方法で決めても大差がない。
When all M1 semi-linear directions do not match
By any of the above three methods, D j Determine the muscle direction
Is also good. However, if they do not match, Dj Is on the wound
Most likely not a point. Muscle direction Lj Is Dj Is on the wound
It only means to suggest the direction of the wound when it is done. D
j If there is no over the wound, line direction Lj In the first place it makes no sense
No. It doesn't make sense, so the decision may contain some errors
That's why. (Iia)-(iic) throat
There is no big difference even if you decide by the method of.

【0037】9.注目画素を変えた2〜7の操作の繰り
返し…以上のステップによって、ひとつの注目画素Dj
について最大明度点M1、次点明度点M2、方向差Θの
抽出、候補としての得点Fj の計算、筋方向Lj の賦与
などが実行できた。Dj についてのデータとして候補得
点Fj と筋方向Lj が得られている。そのようなことを
画像の中の全ての画素について順に行う。例えば1.で
述べたようにラスター順に同じ操作を繰り返す。
9. Repeat the operations 2 to 7 with the target pixel changed ... By the above steps, one target pixel D j
Maximum brightness point M1, the next mark lightness point M2, the extraction of directional difference Θ for the calculation of the score F j as a candidate, and confer muscle direction L j could be performed. As data on D j , a candidate score F j and a muscle direction L j are obtained. Such a process is sequentially performed for all the pixels in the image. For example, 1. Repeat the same operation in raster order as described in.

【0038】画素の数をRとし、画素に0、1、2、
…、R−1の番号を付す。Rは画素の総数で、横の画素
数と縦の画素数の積である。j=0、1、…、R−1と
進めて行き、全画素{Dj }についての得点{Fj }、
筋方向{Lj }などを求める。これらは前記の結果収容
画像メモリに記憶される。得点Fj が大きい画素は筋状
欠陥上の画素である確率が高い。つまり得点は欠陥上の
画素である確率を示す指標と考えることができる。しか
しこれが高いというだけでその画素が傷の一部と判断す
るのは早計である。高得点の画素同士が連続的に線状に
並んでいるということを確認する必要がある。以下のス
テップは連続性を筋状欠陥の属性として調べるためのも
のである。
It is assumed that the number of pixels is R, and 0, 1, 2,.
.., R-1. R is the total number of pixels and is the product of the number of horizontal pixels and the number of vertical pixels. j = 0,1, ..., will promote the R-1, the score for all pixels {D j} {F j} ,
The muscle direction {L j } is determined. These are stored in the result storage image memory. Pixel score F j is large is a high probability that the pixel on the line defect. That is, the score can be considered as an index indicating the probability of being a pixel on the defect. However, it is premature to judge that the pixel is part of the scratch just because it is high. It is necessary to confirm that pixels with high scores are continuously arranged in a line. The following steps are for examining continuity as an attribute of streak defects.

【0039】10.求心画素の点数を追加(連結処理)
…注目画素Dj というものを再び想定する。前回のFj
とLj と求める時と同じように、ラスター順にひとつひ
とつ同じような操作を繰り返すようになっている。注目
画素Dj を中心としてサイズがW×Wの正方形Tjを考
える。Wは3、5、7などの奇数である。それが含む画
素の数はW2 −1である。これらの画素群Tjは先述の
輪郭ではない。輪郭と区別するためこの正方形は注目画
素Dj の”近傍”Tjということにする。その要素を
{Dk }とする。近傍の画素Dk には筋方向Lk と得点
k がすでに付けられている。
10. Added the number of centered pixels (consolidation processing)
... again assumed to be that the pixel of interest D j. Previous F j
In the same way, which is to repeat each and every similar operation in raster order and when to seek and L j. Consider a square Tj having a size of W × W centering on a target pixel Dj. W is an odd number such as 3, 5, 7, or the like. It contains W 2 -1 pixels. These pixel groups Tj are not the contours described above. The square to distinguish it from contour will be called "near" Tj of the pixel of interest D j. Let that element be {D k }. The neighboring pixel D k is already provided with the line direction L k and the score F k .

【0040】近傍画素Dk のうち筋方向Lk が中心の注
目画素Dj の得点Fk の合計ΣFkを注目画素の得点に
加える。これがここにおけるステップの操作である。分
かりにくい操作であるから順に詳しく説明する。
The sum ΔF k of the scores F k of the target pixel D j centered on the muscle direction L k among the neighboring pixels D k is added to the score of the target pixel. This is the operation of the steps here. Since the operation is difficult to understand, it will be described in detail in order.

【0041】近傍画素W2 −1のうち、筋方向Lk が注
目画素Dj を向くものだけを選ぶ。図8にこれを示す。
これはW=3の最小の近傍の場合であるが、それ以上の
寸法の近傍でも同様である。筋方向は正負の区別がない
ので4方向の区別しかない。矢印の向きはどちらでも良
いのである。8つの近傍画素を80〜87とする。近傍
画素80の筋方向はy(上下)方向であり中心のDj
向いていない。画素81の筋方向はx(水平)方向であ
りDj を向いていない。83もDj を向いていない。8
4もDj を向かない。86も斜めを向いておりDj を向
かない。87も横を向いておりDj を向かない。これら
のDj を向かない近傍画素は捨てる。このような画素は
散漫画素と名付ける。
[0041] Among the neighboring pixels W 2 -1, pick only the muscle direction L k faces the pixel of interest D j. FIG. 8 illustrates this.
This is the case in the vicinity of the minimum of W = 3, but the same is true in the vicinity of a larger dimension. Since there is no distinction of the muscle direction between positive and negative, there are only four directions. The direction of the arrow may be either. The eight neighboring pixels are 80 to 87. Muscle direction of neighboring pixels 80 is not fit to D j of the center is y (vertical) direction. Muscle direction of the pixel 81 is not fit to be D j is x (horizontal) direction. 83 also does not face the D j. 8
4 does not face D j either. 86 is also not suitable for the D j faces the diagonal. 87 is also not suitable for the D j is facing sideways. Those neighboring pixels not facing D j are discarded. Such pixels are termed scattered pixels.

【0042】82はDj の方向を向いている。85もD
j の方向を向いている。Dj の方向を向く筋方向を持つ
画素を求心画素と呼ぶことにする。82、85のような
筋方向が注目画素を向く画素(求心画素)をもつという
事は、注目画素が筋状欠陥の一部である可能性が高いと
いうことである。筋方向はM1の方向でありM1は筋状
欠陥の一部である可能性があるので、近傍画素が注目画
素に向かう筋方向を持てば、注目画素が筋状欠陥である
可能性が高いということになる。このように本発明は注
目画素の性質を、その周りの画素の性質によって明らか
にするという遠近法的な手法を採用する。そのような立
場から、注目画素を向く筋方向を持つ画素82、85を
選択し、これら求心画素の点数C82、C85の和を、注目
画素の点数Fj に加える。つまり前回に求めた注目画素
のFj に、求心画素の点数の和ΣFk を加えたものを新
たに、注目画素の点数とする。Fj +ΣFk →Fj とす
るのである。
[0042] 82 is oriented in the direction of D j. 85 is also D
It is pointing in the direction of j . Pixels having a streak direction oriented at D j is called a centripetal pixel. The fact that the streak direction such as 82 or 85 has a pixel (centripetal pixel) that points to the target pixel means that the target pixel is likely to be a part of the streak defect. Since the streak direction is the direction of M1 and M1 may be a part of the streak defect, if the neighboring pixel has a streak direction toward the target pixel, it is highly likely that the target pixel is the streak defect. Will be. As described above, the present invention employs a perspective method of clarifying the properties of the target pixel by the properties of surrounding pixels. From such a standpoint, the pixels 82 and 85 having the streak direction facing the target pixel are selected, and the sum of the scores C 82 and C 85 of the centered pixels is added to the score F j of the target pixel. That is, a value obtained by adding the sum ΣF k of the scores of the centered pixels to F j of the target pixel obtained last time is newly set as the score of the target pixel. F j + ΣF k → F j .

【0043】以上の例は、W=3の8近傍だけを問題に
する場合である。しかしW=4の15近傍、W=5の2
4近傍でもおなじようなことができる。ただしその場合
は4方向に量子化された筋方向が注目画素を絶対に向か
ないという画素が発生する。これらの近傍画素は初めか
ら散漫画素であるということになる。
The above example is a case where only the neighborhood of 8 where W = 3 is considered. However, W = 4 near 15 and W = 5 2
The same can be done in the vicinity of 4. However, in this case, there occurs a pixel in which the streak direction quantized in four directions does not always face the target pixel. These neighboring pixels are scattered pixels from the beginning.

【0044】求心画素をもつ注目画素は筋状欠陥の一部
である可能性が強いが、それなら求心画素ひとつについ
てある一定点を加えるということもありうる。しかしこ
こでは求心画素の得点を加える。それも意味のあること
である。注目画素が求心画素を持つとして、求心画素自
体の値の大きい方が、注目画素が筋状欠陥である確率が
大きい訳である。それで求心画素の得点を、注目画素の
候補得点に加えているのである。そのような操作を、全
ての画素{Dj }について付け加える。筋状欠陥上にあ
る画素は相互に点数を加え合うので傷(筋状欠陥)を強
く浮かび上がらせることができる。これを連結処理と呼
ぶ。
The pixel of interest having a centripetal pixel is likely to be a part of a streak defect, and in that case, a certain point may be added for each centripetal pixel. However, here, the score of the centripetal pixel is added. That is also significant. Assuming that the target pixel has a centripetal pixel, the larger the value of the centripetal pixel itself is, the higher the probability that the target pixel is a line defect is. Thus, the score of the centered pixel is added to the candidate score of the target pixel. Such an operation is added for all the pixels {D j }. The pixels on the streak defect add scores to each other, so that a flaw (streak defect) can be strongly highlighted. This is called connection processing.

【0045】候補得点の多い画素は筋状欠陥の上の点で
ある可能性が高い。そしてある得点Q(閾値)以上の画
素を選び出す。Fj ≧Qを満たすもののみが傷を形成す
るものとするのである。しかし図9のように連続する画
素を必ず選ぶとは限らない。得点の高い画素が近傍画素
として相互に得点を加え合った結果、高得点を得たので
あるから、それらの画素は縦横斜めに連結している可能
性が高いはずである。これも本発明の極めて精緻な工夫
を凝らした点である。分かりにくい操作であるから、詳
しく述べた。
Pixels with many candidate scores are likely to be points above streak defects. Then, pixels having a score Q (threshold) or more are selected. Only those that satisfy F j ≧ Q are considered to form flaws. However, continuous pixels are not always selected as shown in FIG. Since pixels having a high score added each other as neighboring pixels to obtain a high score, it is highly probable that those pixels are connected vertically and horizontally and diagonally. This is also a point where the present invention has been elaborated. The operation is difficult to understand, so I described it in detail.

【0046】11.連結処理画像の二値化処理……Fj
≧Qを満足する画素を筋状欠陥を構成する候補として抽
出したが、これを白に、そうでないところ(Fj <Q)
は黒というふうに二値化する。これまでは256諧調と
いうふうになっていたがここで二値化して2諧調にす
る。多くの場合面積を持つ領域が選び出される。この領
域は筋状欠陥の候補領域Gmということにする。mは領
域番号である。筋状欠陥の候補とそうでないものに截然
と分けられる。筋状欠陥であるものが初めて線状の連続
体として現れる。二値化によって筋状欠陥を検出できた
ことになる。傷検出ということであれば以上のステップ
で終わりである。以下に述べるのは、筋状欠陥検出の結
果を使って不良品検査を行い、不良品を除去する検査工
程を示す。
11. Binarization processing of concatenated processing image Fj
Pixels satisfying ≧ Q are extracted as candidates for forming a streak defect, but are extracted in white, and in other cases (F j <Q)
Is binarized as black. Until now, 256 gradations have been used, but here binarization is performed to obtain 2 gradations. In many cases, a region having an area is selected. This region is referred to as a line-like defect candidate region Gm. m is an area number. It is clearly divided into streak defect candidates and those that are not. Streaky defects first appear as linear continuum. This means that the streak defect has been detected by the binarization. This is the end of the above steps in the case of flaw detection. The following describes an inspection process in which a defective product is inspected using the result of the line defect detection and the defective product is removed.

【0047】12.孤立点除去…前段での処理は連結処
理とは言うものの連続性そのものを抽出していないので
孤立点なども含まれる恐れがある。そこで候補領域から
孤立点を探してこれを排除する。孤立点というのは、ひ
とつの白画素が孤立して存在することである。これは各
画素Dj の8近傍を調べることによってなされる。孤立
点を排除すると、少なくとも白画素は2画素以上の群を
なすことになる。
12. Isolated point removal: Although the processing in the preceding stage is a concatenation process, since the continuity itself is not extracted, isolated points may be included. Therefore, an isolated point is searched for from the candidate area and eliminated. An isolated point means that one white pixel exists in isolation. This is done by examining the 8-neighborhood pixels D j. Excluding the isolated points means that at least white pixels form a group of two or more pixels.

【0048】13.筋状欠陥の面積計測…筋状欠陥が多
すぎると不良品、筋状欠陥があってもある程度S0 以下
なら良品であるとする。筋状欠陥の全面積をS(m)し
てその面積を測定する。そこでS(m)<S0 ならばこ
れは良品と判断する。S(m)≧S0 ならこのように広
い筋状欠陥をもつ品物は不良品と判断する。そして、不
良品は自動的に除去する。これによって良否検査の自動
化が可能になる。
13. The line defect of the area measurement ... line defect is too large, the defective, even if a line defect and a non-defective if somewhat S 0 or less. The entire area of the streak defect is S (m) and the area is measured. Therefore, if S (m) <S 0 , this is determined to be good. If S (m) ≧ S 0, an article having such a wide streak defect is determined to be defective. Then, defective products are automatically removed. This enables the quality inspection to be automated.

【0049】[0049]

【実施例】図1によって本発明の筋状欠陥検出の手順を
再び説明する。プログラムの開始20に続いて、光学的
に画像入力21を行う。デジタル画像になるので、画素
毎の明度(暗度)の情報が得られる。次に画素ごとに筋
状欠陥の候補を検出22する。これはすでに述べている
ように、注目画素の周りに輪郭Nkを定義し、輪郭上で
最大明度点M1と次点明度点M2を求め、注目画素から
M1、M2に引いた半直線のなす角度Θがπに近いかど
うか調べ、πに近いと、処理結果画像に+Cを加える。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The procedure for detecting streak defects according to the present invention will be described again with reference to FIG. Subsequent to the start 20 of the program, an image input 21 is performed optically. Since the image is a digital image, lightness (darkness) information for each pixel can be obtained. Next, a line defect candidate is detected 22 for each pixel. As described above, this defines an outline Nk around the pixel of interest, finds the maximum lightness point M1 and the next lightness point M2 on the outline, and forms an angle formed by a half line drawn from the pixel of interest to M1 and M2. It is checked whether Θ is close to π. If Θ is close to π, + C is added to the processing result image.

【0050】その部分の詳細は図2に描いてある。出発
輪郭Nsを適当に選び、処理を開始する。処理輪郭の選
択は斑点や照明ムラその他のノイズの性質によって決ま
る。斑点を落とすためには、sを5或いは6というよう
にし、注目画素と輪郭が離隔するようにする。初期輪郭
Nsから最終輪郭Neにいたるまで同じ操作34〜40
を繰り返す。初めはN=Nsとして初期輪郭から始め
る。
The details of that part are depicted in FIG. The starting contour Ns is appropriately selected, and the process is started. The choice of the processing contour depends on the nature of the spots, uneven lighting and other noise. In order to remove speckles, s is set to 5 or 6, and the target pixel and the contour are separated. The same operation 34-40 from the initial contour Ns to the final contour Ne
repeat. Initially, the process is started from the initial contour with N = Ns.

【0051】一般に輪郭Nk(k=s、…、e)につい
て説明する。その輪郭上で明度の最大値をとる画素M1
を求める。これは明るい傷の場合である。暗い傷の場合
は明度の最小値をとる画素をM1とする。ふたつの場合
にいちいち言及するのは煩雑であるから、明るい傷を対
象とし、明度最大点をM1とする。M1の周辺をマスク
して、次に明度の高い画素M2を探す。周辺u画素をマ
スクするのは、M1の近くに次点の画素が存在する確率
は高いがそれはM1に釣られて明度が高くなっているだ
けで、筋上の2点として抽出するには不適当だからであ
る。M1とは離れたところにある次点明度の点M2を求
めることができたので、注目画素からM1、M2に半直
線を引きその挟角をΘとする。これを方向差と表現して
いる。
The outline Nk (k = s,..., E) will be described in general. The pixel M1 having the maximum value of lightness on the contour
Ask for. This is the case for a light wound. In the case of a dark flaw, the pixel having the minimum value of lightness is M1. Since it is complicated to refer to each of the two cases, the brightest scratch is targeted, and the maximum lightness point is M1. The area around M1 is masked, and the next brighter pixel M2 is searched. Masking the surrounding u pixels is because the probability that the next pixel exists near M1 is high, but it is only the brightness that has been caught by M1 and it is not possible to extract it as two points on the line. Because it is appropriate. Since the next lightness point M2 distant from M1 has been obtained, a half line is drawn from the target pixel to M1 and M2, and the included angle is defined as Θ. This is expressed as a direction difference.

【0052】方向差Θが、π−α<Θ<π+αであるか
どうかを調べる。つまり、M1、M2が注目画素を挟ん
で反対方向にあるかどうかを調べているのである。M
1、M2ともに明度が高いので筋状欠陥上の点である確
率が高い。これが注目画素の反対側にあれば注目画素自
体が筋状欠陥の上にある確率が高いということになる。
それで上記の不等式によって反対側にあるかどうかを調
べる。αは余裕度であるが、π/3以下の正の値であ
る。もしもΘがほぼπであれば注目画素が筋状欠陥候補
点であるから、処理結果画像メモリの注目画素の欄に、
C1を加える。C1は予め決めた定数である。Θがπで
ない場合は、C1を加えない。処理結果画像の値Fj
初め0にリセットしてある。
It is checked whether or not the direction difference Θ is π−α <π <π + α. That is, it is checked whether M1 and M2 are in opposite directions with respect to the target pixel. M
Since both 1 and M2 have high lightness, there is a high probability that they are points on streak defects. If this is on the opposite side of the target pixel, it means that there is a high probability that the target pixel itself is above the streak defect.
So we check if it is on the other side by the above inequality. α is a margin, but a positive value of π / 3 or less. If Θ is approximately π, the pixel of interest is a streak defect candidate point.
Add C1. C1 is a predetermined constant. If Θ is not π, C1 is not added. The value F j of the processing result image is initially reset to zero.

【0053】ある輪郭についてこのような事をしたあと
は、N=N+1とし、その次の輪郭について同様なステ
ップ34〜39を行う。NがNeになるまで同じことを
繰り返す。注目画素には最大でF=C(e−s+1)の
得点が与えられる。同時に注目画素からM1の方向を筋
方向Lとして注目画素に与える。
After doing this for a certain contour, N = N + 1, and similar steps 34 to 39 are performed for the next contour. The same is repeated until N becomes Ne. The target pixel is given a score of F = C (e−s + 1) at the maximum. At the same time, the direction of M1 from the target pixel is given to the target pixel as the streak direction L.

【0054】図1のステップ「全画素完了」24に戻
る。以上のような得点Fj の計算と筋方向Lj の計算は
全ての注目画素に対して行う。全画素終了24というの
は、同様の計算を全ての画素(j=0、1、2…、R−
1)について行ったという事を意味する。ここまでで全
画素{Dj }について、候補得点{Fj }、筋方向{L
j }のデータが得られている。
Returning to the step "complete all pixels" 24 in FIG. The calculation of the score F j and the calculation of the line direction L j as described above are performed for all the target pixels. The end of all pixels 24 means that the same calculation is performed for all pixels (j = 0, 1, 2,..., R−
It means that you went about 1). Up to this point, for all the pixels {D j }, the candidate score {F j }, the line direction {L}
jタ data is obtained.

【0055】次に筋状欠陥候補の連結処理25というス
テップをおこなう。これはたびたび説明したが画素群を
直接に連結するわけではない。W×Wの近傍画素のうち
筋方向が中心を向く画素の得点を、中央の注目画素の得
点に加えて筋方向が向かい合うような画素の筋状欠陥候
補としての得点を増強する操作である。詳細なステップ
は図7に示される。開始43から始まる。全画素をラス
ター順にひとつひとつ同じ処理をする。処理の対象にな
っている画素を注目画素とここでも呼ぶことにする。注
目画素Dj の周囲にW×Wの正方形である近傍というも
のを想定する。近傍画素Dk の筋方向Lj を調べる。近
傍画素Dk の筋方向Lk が、中心にある注目画素Dj
向いているもの(求心画素)を(正負は考えない)選択
する。これがステップ45である。
Next, a step called a linking process 25 of streak defect candidates is performed. Although this has been often described, the pixel groups are not directly connected. This operation is to add the score of a pixel whose stripe direction is toward the center among the W × W neighboring pixels to the score of the central target pixel and to increase the score of a pixel whose stripe direction is opposite as a stripe defect candidate. The detailed steps are shown in FIG. Begins at start 43. The same processing is performed on all pixels one by one in raster order. The pixel to be processed is also referred to as a pixel of interest here. Around the pixel of interest D j assume something called near a square W × W. Check streak direction L j neighboring pixels D k. Muscle direction L k neighboring pixels D k is, those facing the pixel of interest D j in the center (the centripetal pixel) (positive and negative do not think) Select. This is step 45.

【0056】ついで求心画素Dk の候補得点Fk の和Σ
k を計算する。これが「該当画素の結果収納画像のデ
ータ総和計算」46の意味するところである。求心画素
の得点の合計ΣFk を、中心の注目画素の得点Fj にく
わえ、それを新たな得点Fjとする。Fj +ΣFk →Fj
とするのである。これがステップ46「総和データ加
算」である。連結処理というが直接に連結操作している
のではなく、つながりあう画素に得点を加算しているの
である。注目画素Dj を変え全ての画素について同様の
加算を行う。ここで図1のステップ26の「全画素完
了」に戻る。
Next, the sum 候補 of the candidate score F k of the centered pixel D k
Calculate F k . This is the meaning of the “calculation of the data sum of the result storage image of the corresponding pixel” 46. The sum of the scores of the centered pixels ΣF k is added to the score F j of the central target pixel, and this is set as a new score F j . F j + ΣF k → F j
That is. This is step 46 "sum total data addition". The connection process does not directly perform the connection operation, but adds the score to the connected pixels. The same addition is performed for all the pixels by changing the target pixel Dj. Here, the process returns to "all pixels completed" in step 26 of FIG.

【0057】筋状欠陥候補の画素はすでに高得点を得て
いる。そうでない画素は0点かあるいはそれに近い低得
点しか持たない。ここである閾値Ftと得点Fj を比較
し全画素を二値化する。Fj ≧Ftなら筋状欠陥画素と
する。Fj <Ftならば筋状欠陥でないとするのであ
る。これが連結処理画像の2値化27である。
The pixel of the line defect candidate has already obtained a high score. Other pixels have only a low score at or near zero. Here, the threshold value Ft and the score Fj are compared to binarize all pixels. If F j ≧ Ft, a line defect pixel is determined. If F j <Ft, it is determined that there is no streak defect. This is the binarization 27 of the connection processing image.

【0058】次に孤立点除去28をおこなう。筋状欠陥
として意味のない小さい面積の孤立点を排除する。残っ
たものは筋状欠陥(傷)である。斑点やシェーディング
のようなものはすでに落ちている。ここまでで筋状欠陥
の検出は完了している。検出はこれまでの操作によって
完全に行われる。
Next, isolated point removal 28 is performed. An isolated point having a small area that is meaningless as a streak defect is eliminated. What remains is a streak defect (scratch). Things like spots and shading have already fallen. The detection of the streak defect is completed by this point. The detection is completely performed by the previous operation.

【0059】以下は、自動的に不良品を選別排除するた
めの手順である。筋状欠陥Gmの面積S(m)を測定す
る。これがステップ29である。それらの総面積を一定
値S0 と比較する。総面積S(m)がS0 以下であれば
その程度の欠陥があっても良品と判断する。筋状欠陥総
面積S(m)がS0 以上(S(m)≧S0 )であればこ
のような長い筋状欠陥を持つものは不良品と判断する。
不良品と判断されたものは排除する。これがステップ3
0である。ここまでくると良品だけが残る。
The following is a procedure for automatically sorting out defective products. The area S (m) of the line defect Gm is measured. This is step 29. Comparing their total area to a constant value S 0. If the total area S (m) is equal to or less than S 0 , it is determined that the product is good even if there is such a defect. Line defect total area S (m) is S 0 or more (S (m) ≧ S 0 ) as long as those having such a long line defect is judged to be defective.
Items determined to be defective are excluded. This is step 3
0. At this point, only good products remain.

【0060】[実施例1(アクリル板上の傷)]白色ア
クリル板に付いた傷を本発明の方法によって検出した。
原画像は図11に示すものである。白色のアクリル板に
筋状に傷が入ると周りよりも暗い線になる。そのほかに
照明むら(シェーディング)91が存在する。これは暗
い線で図示したが実際は連続的に明度が変化しているも
ので画像中央付近では明るく、画像外周に行くに従い順
次暗くなって行くものである。背景(バックグラウン
ド)よりも傷が暗いので、暗度を計測対象とすべきであ
る。M1は最小明度点を、M2は最次点明度点というべ
きである。しかしこれまでM1は最大明度点、M2は次
点明度点と言ってきたので、対応して明度を暗度と置き
換えて同じような言い方をするべきである。M1は最大
暗度点、M2は次点暗度点というべきであるが、これま
での用語に慣れているので、ここでは明度という言葉を
使い、M1は最大明度点、M2は次点明度点という言い
方をする。
Example 1 (Scratch on Acrylic Plate) A scratch on a white acrylic plate was detected by the method of the present invention.
The original image is shown in FIG. When a streak is formed on a white acrylic plate, it becomes a darker line than the surrounding area. In addition, illumination unevenness (shading) 91 exists. Although this is shown as a dark line, in reality the brightness is continuously changing, and it is bright near the center of the image and darkens gradually toward the outer periphery of the image. Since the scratch is darker than the background (background), the darkness should be measured. M1 should be the minimum lightness point, and M2 should be the next point lightness point. However, since M1 has been referred to as the maximum lightness point and M2 has been referred to as the next lightness point, the same expression should be used in place of replacing lightness with darkness. M1 should be the maximum darkness point, M2 should be the next darkness point, but since we are used to terms so far, we will use the word lightness here, M1 is the maximum lightness point, and M2 is the next lightness point. I say that.

【0061】図10にテストに用いたシステムの構成を
示す。被検査物であるアクリル板1に光源2からの検査
光を照射する。検査光はハーフミラー3によって反射し
て被検査物1に当てる。被検査物(アクリル板)1から
反射光が出て、CCDカメラ4に入射する。これはレン
ズによって被検査物の像を結像するが、画像情報が、二
次元CCDにより2次元画素に分解される。これがA/
D変換器5によってデジタル信号に変換される。明度
(暗度)信号が各画素毎にデジタル信号として原画像メ
モリ6に収納される。演算処理部7は先述の操作を全て
の画素について実行する。
FIG. 10 shows the configuration of the system used for the test. The inspection light from the light source 2 is applied to the acrylic plate 1 which is the inspection object. The inspection light is reflected by the half mirror 3 and impinges on the inspection object 1. The reflected light is emitted from the inspection object (acrylic plate) 1 and enters the CCD camera 4. This forms an image of the inspection object with a lens, and the image information is decomposed into two-dimensional pixels by a two-dimensional CCD. This is A /
The signal is converted into a digital signal by the D converter 5. A lightness (darkness) signal is stored in the original image memory 6 as a digital signal for each pixel. The arithmetic processing unit 7 executes the above-described operation for all pixels.

【0062】パラメータはC1=4、Ns=1、Ne=
6、W=13、α=π/4とした。輪郭のスタートをs
=1としている。これは注目画素に隣接するところの輪
郭から始めるということである。斑点のようなものがな
いのでそのようなものを落とす必要がない。
The parameters are C1 = 4, Ns = 1, Ne =
6, W = 13 and α = π / 4. Start the contour
= 1. This means starting from the contour adjacent to the pixel of interest. There is no such thing as spots so there is no need to drop such things.

【0063】まず原画像メモリ6の画素毎のデータをも
とにして、ラスター順に注目画素Dj を取って行く。あ
る注目画素Dj について輪郭Nkに於ける、最大明度点
M1、次点明度点M2、角度差Θを求める。3π/4≦
Θ≦5π/4であれば注目画素に候補得点4点を加え
る。6つの輪郭全てについてΘがその範囲にあれば24
点の得点を得る。このように全ての画素について、筋状
欠陥としての候補点Fjを計算し、これを結果画像メモ
リ8(図5の結果収納画像のメモリ)に収容する。これ
は順に全ての画素{Dj }について行う。全ての画素に
ついて得点{Fj}が結果画像メモリ8に蓄積される。
[0063] The first data of each pixel of the original image memory 6 based on, go take a pixel of interest D j in raster order. In for a certain pixel of interest D j to the contour Nk, maximum brightness point M1, the next mark lightness point M2, determining the angle difference theta. 3π / 4 ≦
If Θ ≦ 5π / 4, four candidate scores are added to the target pixel. 24 if 6 is in that range for all six contours
Get points score. Thus for all the pixels, it calculates the candidate point F j as line defect, to accommodate this result image memory 8 (memory results stored image in FIG. 5). This is performed for all the pixels {D j } in order. Scores {F j } for all pixels are stored in the result image memory 8.

【0064】最大明度点M1の方向から各画素Dj につ
いての筋方向Lj も同時に決まるからこれも全画素{D
j }について、全筋方向{Lj }を求め筋方向メモリ9
に収容する。
[0064] This is also all the pixels from the muscle direction L j is also determined simultaneously for each pixel D j from the direction of the maximum brightness point M1 {D
j }, all muscle directions {L j } are obtained and a muscle direction memory 9
Housed in

【0065】全画素から、再び任意の注目画素Dj を取
る。Dj の周りに13×13の近傍画素(168個)D
k を想定する。筋方向Lk が注目画素Dj を向いている
求心画素の候補得点を全部合計(ΣFk )して、注目画
素の得点Fj に加える(Fj+ΣFk →Fj )。その操
作を全部の画素{Dj }について行う。相加された得点
{Fj }を得る。得点Fj を閾値Qと比較してこれより
得点が大きいものと小さいものに二値化する。得点が大
きいものは連結した筋状欠陥領域になる。二値化データ
は二値化画像メモリ10に格納する。
[0065] from all the pixels, again take any of the pixel of interest D j. 13 × 13 neighboring pixels (168) D around D j
Assume k . The candidate scores of the afferent pixels whose muscle direction L k is directed to the target pixel D j are summed up (ΔF k ) and added to the target pixel score F j (F j + ΔF k → F j ). The operation is performed for all the pixels {D j }. An added score {F j } is obtained. The score F j is compared with a threshold value Q, and is binarized into a score higher than the score Q and a score lower than the score. Those with higher scores are connected streaky defect areas. The binarized data is stored in the binarized image memory 10.

【0066】その結果として得られた筋状欠陥の画像を
D/A変換してモニタ13に画像処理の結果を表示す
る。その結果を図12に示す。シェーディング91が除
かれ、傷(筋状欠陥)90のみを抽出した結果になって
いる。本発明の優れた点を表している。筋状欠陥検出は
以上で終わりである。
The image of the streak defect obtained as a result is D / A converted and the result of the image processing is displayed on the monitor 13. FIG. 12 shows the result. The shading 91 is removed, and only the flaw (streak defect) 90 is extracted. This shows the advantages of the present invention. This is the end of the line defect detection.

【0067】傷のみを抽出した結果から筋状欠陥を持つ
不良品の検査を自動化することができる。二値化して生
じた、筋状欠陥領域から孤立点除去を行い、さらに面積
計算して、欠陥の面積S(m)を許容面積S0 と比較
し、S(m)≧S0 ならこれは大きすぎる筋状欠陥を持
つ品物ということになるから、不良品として排除する。
面積計測によって判定された結果はデジタル入出力11
(図10)によって外部に信号として出力されるので、
外部の制御装置を用いて自動的に不良品を除くことがで
きる。
Inspection of defective products having streak defects can be automated based on the result of extracting only scratches. An isolated point is removed from the streak defect area generated by binarization, the area is further calculated, the defect area S (m) is compared with the allowable area S 0, and if S (m) ≧ S 0, this is Since the product has an excessively large streak defect, it is excluded as a defective product.
The result determined by the area measurement is a digital input / output 11
(FIG. 10) is output to the outside as a signal.
Defective products can be automatically removed using an external control device.

【0068】同じ被検査物を従来の単純二値化法によっ
て処理した結果を図13と図14に示す。図13のもの
はシェーディングを排除するのに成功している。これは
閾値を高くした為である。閾値が高いと弱い暗領域であ
るシェーディング91は消える。しかしそのかわり傷の
一部が消えてしまい、不連続な傷92になってしまって
いる。一部の筋状欠陥を見逃すおそれが強い。図14の
ものは閾値を下げて傷92が消えないようにしている。
しかしそのかわりにシェーディング91の部分が全て影
になってしまい著しい誤動作を引き起こしている。単純
二値化法に基づく図13、14のいずれも傷のみを綺麗
に抽出することができない。
FIGS. 13 and 14 show the results of processing the same inspection object by the conventional simple binarization method. The one in FIG. 13 is successful in eliminating shading. This is because the threshold value was increased. If the threshold is high, the shading 91 which is a weak dark area disappears. However, some of the scratches have disappeared, resulting in discontinuous scratches 92. There is a strong possibility that some streak defects are overlooked. In FIG. 14, the threshold is lowered so that the scratch 92 does not disappear.
However, instead, the shading 91 is entirely shaded, causing a remarkable malfunction. In both of FIGS. 13 and 14 based on the simple binarization method, only the flaw cannot be extracted cleanly.

【0069】[実施例2(焼結部品の傷)]アルミナの
焼結部材の表面の傷を本発明の方法によって検出した。
焼結部材をCCDカメラで撮像した原画を図15に示
す。長い傷94が存在する。焼結部材であるから良好品
であっても表面に細かい斑点95がある。これは傷94
ではなく焼結体の表面にはつきものである。斑点95は
不良品である印ではない。であるから傷抽出において斑
点が抽出されないようにしなければならない。従来の二
値化法ではいかにしても斑点が最終結果に残り、傷抽出
ができなかった。本発明はそのような場合に顕著な効果
を発揮する。傷は明るいので、この例では明度の大きい
点を傷候補として検出する。最大明度点、次点明度点と
いうのは文字どおり明度が最大、次点ということであ
る。
Example 2 (Scratch on Sintered Parts) Scratch on the surface of the alumina sintered member was detected by the method of the present invention.
FIG. 15 shows an original image of the sintered member taken by a CCD camera. There are long scratches 94. Since it is a sintered member, even a good product has fine spots 95 on the surface. This is scratch 94
Instead, it is inherent to the surface of the sintered body. The spot 95 is not a mark indicating a defective product. Therefore, it is necessary to prevent spots from being extracted in the wound extraction. In the conventional binarization method, spots remain in the final result anyway, and the flaw extraction cannot be performed. The present invention has a remarkable effect in such a case. Since the flaw is bright, a point having a large brightness is detected as a flaw candidate in this example. The maximum brightness point and the next brightness point are literally the maximum brightness and the next brightness point.

【0070】パラメータは、C1=4、Ns=6、Ne
=9、W=9、α=π/4である。輪郭のうち、注目画
素に近いN1〜N5を省くのは斑点のような短い丸い欠
陥を排除する為である。斑点の最大のものの直径が5画
素分よりも小さいのでN6以上に遠いものを使えば斑点
を検出しないようにできる。それでN6〜N9の4重の
輪郭で最大明度点M1、次点明度点M2、角度差Θを求
める。ある輪郭Nk上で最大明度点M1を求める。
The parameters are C1 = 4, Ns = 6, Ne
= 9, W = 9, α = π / 4. The reason why N1 to N5 close to the pixel of interest are omitted from the contour is to eliminate short round defects such as spots. Since the diameter of the largest spot is smaller than 5 pixels, the spot can be prevented from being detected if a spot farther than N6 is used. Then, the maximum lightness point M1, the next lightness point M2, and the angle difference Θ are obtained for the quadruple contours N6 to N9. A maximum lightness point M1 is found on a certain contour Nk.

【0071】この近くのu個の画素をマスクして次点明
度点M2を求める。さらに角度差Θを計算し、これが3
π/4〜5π/4であれば注目画素の候補得点Fj に4
を加える。4重の輪郭の全部でΘがその範囲にあれば得
点16を得る事になる。またM1の方向から筋方向Lj
を求める。そのような操作を全部の画素に対して行い、
候補得点{Fj }、筋方向{Lj }の集合を得る。
The next u lightness point M2 is obtained by masking the u pixels in the vicinity. Further, the angle difference 計算 is calculated, and this is 3
π / 4~5π / if 4 of the pixel of interest candidate score F j to 4
Add. If Θ is within the range of all four contours, score 16 will be obtained. Also, from the direction of M1 to the muscle direction Lj
Ask for. Perform such an operation on all pixels,
A set of candidate scores {F j } and muscle directions {L j } is obtained.

【0072】さらに注目画素を新たに設定し、9×9の
近傍画素(80画素)のうち、注目画素を向く筋方向L
k をもつ求心画素の得点Fk を、注目画素の得点に加え
る。こうして全ての画素について連結操作を行う。つい
で二値化して傷上の点の集合である領域と、傷でない背
景に分ける。その結果を図16に示す。傷の像96が正
しく得られている。斑点は消えて背景97と区別がつか
ないようになっている。斑点が消去される理由は、輪郭
Ns〜Neが注目画素から離れたところに設定されてい
るからである。
Further, a new pixel of interest is newly set, and among the 9 × 9 neighboring pixels (80 pixels), a streak direction L toward the pixel of interest is set.
the score F k of centripetal pixels having a k, added to the score of the pixel of interest. Thus, the connection operation is performed for all the pixels. Then, the image is binarized and divided into an area which is a set of points on the wound and a background which is not a scratch. FIG. 16 shows the result. The wound image 96 is correctly obtained. The speckles disappear and cannot be distinguished from the background 97. The reason why the speckles are erased is that the contours Ns to Ne are set at positions away from the pixel of interest.

【0073】単純二値化する従来法では図17、図18
のようになる。図17は斑点を薄くするために二値化の
閾値を高く取った例である。斑点95の像99は微弱に
なっているが出現している。閾値を高くして斑点を消去
しようとしているが失敗している。それのみならず傷9
4の像98が途切れてしまっている。閾値が高いので筋
状欠陥の細い部分が切れてしまうのである。これではい
けない。図18の実施例では、傷の像が途切れないよう
に閾値を低くしている。傷の像100は途切れないが、
斑点の像101がかえって強調される。これもいけな
い。単純二値化では傷のみを上手く抽出することができ
ない。本発明の面目躍如たるところである。
In the conventional method of simple binarization, FIGS.
become that way. FIG. 17 is an example in which the threshold value for binarization is set high in order to reduce the spots. The image 99 of the spot 95 is faint but appears. An attempt to eliminate speckles by increasing the threshold has failed. Not only that but also wound 9
The image 98 of No. 4 has been interrupted. Since the threshold value is high, a thin portion of the line defect is cut off. This should not be. In the embodiment of FIG. 18, the threshold value is set low so that the image of the scratch is not interrupted. The wound image 100 is not interrupted,
The speckle image 101 is rather emphasized. I can't do this either. With simple binarization, it is not possible to successfully extract only a flaw. This is an aspect of the present invention.

【0074】以上の操作によって筋状欠陥が抽出された
のである。さらに筋状欠陥から孤立点を除去し、筋状欠
陥の面積S(m)を計測し、許容面積S0 と比較し、S
(m)≧S0 であればこれは不良品であると判断する。
筋状欠陥が大きすぎるものは、不良品であるが、本発明
によれば自動的に判定して不良品を弁別排除することが
できる。
The line defect is extracted by the above operation. Further, an isolated point is removed from the streak defect, the area S (m) of the streak defect is measured, compared with the allowable area S 0, and S
If (m) ≧ S 0 , this is determined to be defective.
A streak defect that is too large is a defective product. However, according to the present invention, the defective product can be automatically discriminated and discriminated and eliminated.

【0075】[0075]

【発明の効果】本発明は、注目画素に輪郭というものを
想定し、輪郭上で最大明度点M1、次点明度点M2を探
しその角度差Θがπに近いときに、注目画素に得点C1
を加え、さらに、注目画素の周りにW×Wの近傍画素を
想定しその中で注目画素を向く筋方向を持つ求心画素の
得点を、注目画素の得点に加え、得点によって画素を二
値化して、孤立点除去し、面積測定して小面積のものを
削除して、筋状欠陥の像を得るようになっている。単純
な二値化と違って、筋状欠陥の上にある画素の得点を増
やすような方策が施されているので、斑点やシェーディ
ングなどを除去できる。筋状欠陥を的確に自動的に検出
できる。バルブのシートなどの傷、光ファイバ端面の傷
の検出などに用いることができる。
According to the present invention, assuming that the pixel of interest is a contour, the maximum brightness point M1 and the next brightness point M2 are searched on the contour, and when the angle difference Θ is close to π, the score C1 is assigned to the pixel of interest.
Is added, and the score of a centripetal pixel having a streak direction facing the pixel of interest is assumed in the vicinity of the pixel of interest, and the score of the centripetal pixel is added to the score of the pixel of interest. Then, an isolated point is removed, an area is measured, and a small area is deleted to obtain an image of a streak defect. Unlike simple binarization, since a measure is taken to increase the score of a pixel located above a streak defect, spots, shading, and the like can be removed. Streak defects can be accurately and automatically detected. It can be used for detecting flaws on valve seats, flaws on optical fiber end faces, and the like.

【0076】例えば30mmφのバルブシートの場合、
縦横512×512画素の画面によって画像処理すると
して、一画素当たりの対象物長さは、30mm/512
=60μmとなる。傷の幅は60μmより大きいものも
小さいものもあるが本発明の方法によって誤りなく筋状
欠陥を抽出することができる。例えば250μmφの光
ファイバの端面の場合、縦横512×512画素の画面
によって画像処理すると、一画素当たりの長さは250
μm/512=0.5μmとなる。
For example, in the case of a 30 mmφ valve seat,
Assuming that image processing is performed on a screen of 512 × 512 pixels, the object length per pixel is 30 mm / 512.
= 60 μm. Although the width of the flaw is larger or smaller than 60 μm, the method of the present invention can extract streak defects without error. For example, in the case of an end face of an optical fiber having a diameter of 250 μm, if image processing is performed on a screen of 512 × 512 pixels, the length per pixel is 250 μm.
μm / 512 = 0.5 μm.

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

【図1】本発明の筋状欠陥の検出方法の主要な部分の手
順を示すフローチャート。
FIG. 1 is a flowchart showing a procedure of a main part of a streak defect detection method according to the present invention.

【図2】本発明の筋状欠陥の検出方法のうちM1とM2
から注目画素が筋状欠陥の一部であるかどうかを評価す
るための部分のフローチャート。
FIG. 2 shows M1 and M2 among the streak defect detection methods of the present invention.
5 is a flowchart of a part for evaluating whether or not the target pixel is a part of the streak defect.

【図3】注目画素の周りに正方形状の輪郭N1、N2、
…を定義し、その中で最大または最小の明度をもつ画素
M1を検出する操作を説明するための輪郭の図。
FIG. 3 shows a square outline N1, N2,
.. Are defined, and outlines for explaining an operation of detecting a pixel M1 having the maximum or minimum brightness in the definition.

【図4】注目画素の周りに定義した輪郭N1、N2…に
おいて、最大又は最小明度の画素M1とその付近u画素
分をマスクして、残りの画素から最も明度が高いか、或
いは明度が低い画素M2(次点明度点)を検出する操作
を説明するための輪郭の図。
FIG. 4 is a diagram showing the outline of pixels N1, N2,... Defined around a pixel of interest, by masking the pixel M1 having the maximum or minimum brightness and u pixels in the vicinity thereof, and having the highest brightness or the lowest brightness from the remaining pixels. FIG. 9 is a contour diagram for explaining an operation of detecting a pixel M2 (next brightness point).

【図5】対象物をカメラで撮って、画素毎の情報に分解
して、画素ごとに明度情報を格納したデジタル原画像
と、任意の注目画素の輪郭上のM1とM2の角度Θがπ
に近いときに注目画素のC1を加算しこれを記憶させる
ための結果収容画像との図。
FIG. 5 is a photograph of an object taken by a camera, decomposed into information for each pixel, and a digital original image storing brightness information for each pixel, and the angle Θ between M1 and M2 on the contour of an arbitrary pixel of interest is π.
FIG. 9 is a diagram illustrating a result accommodation image for adding C1 of a target pixel and storing the result when C1 is close to the target pixel.

【図6】注目画素の周りに定義される輪郭の例を示す
図。注目画素からk個離れた画素を含む正方形が輪郭N
kである。
FIG. 6 is a diagram illustrating an example of an outline defined around a target pixel. The square containing k pixels away from the target pixel is the contour N
k.

【図7】本発明の筋状欠陥の検出方法のうちW×Wの近
傍画素のなかで注目画素を向く筋方向をもつ画素の得点
を、注目画素の得点に加える操作を説明するフローチャ
ート。
FIG. 7 is a flowchart illustrating an operation of adding a score of a pixel having a streak direction toward a target pixel among neighboring pixels of W × W to the target pixel score in the streak defect detection method of the present invention.

【図8】注目画素の周りにW×Wの正方形の近傍を定義
し近傍画素のなかで注目画素を向く筋方向をもつ画素を
求心画素とし、注目画素を向かない筋方向を持つ画素を
散漫画素として、求心画素の点数を、注目画素の候補点
数に加える操作を説明するためのW=3の場合の図。
FIG. 8 defines a neighborhood of a W × W square around a pixel of interest, sets a pixel having a streak direction facing the pixel of interest as a centered pixel among neighboring pixels, and diffuses a pixel having a stripe direction not facing the pixel of interest. FIG. 13 is a diagram illustrating a case where W = 3 for describing an operation of adding the number of centered pixels as a pixel to the candidate number of a pixel of interest.

【図9】近傍画素のうち、筋方向が注目画素を向く画
素、つまり求心画素として選択された画素を説明するた
めの図。
FIG. 9 is a diagram for explaining a pixel whose streak direction is directed to a target pixel, that is, a pixel selected as a centripetal pixel among neighboring pixels.

【図10】本発明の筋状欠陥の検出方法を実行するため
の装置の概略構成図。
FIG. 10 is a schematic configuration diagram of an apparatus for executing the streak defect detection method of the present invention.

【図11】傷のあるアクリル板を被検査物として本発明
の筋状欠陥検出をする場合の原画像。
FIG. 11 is an original image when a streak defect of the present invention is detected using a scratched acrylic plate as an inspection object.

【図12】図11の傷のあるアクリル板を被検査物とし
て、本発明の方法によって筋状欠陥を検出した結果の画
像。
FIG. 12 is an image showing the result of detecting streak defects by the method of the present invention using the scratched acrylic plate of FIG. 11 as an inspection object.

【図13】シェーディングを除去するため閾値を高くし
た従来の単純二値化法による欠陥検出の結果を示す画
像。傷が半ば消滅してしまう。
FIG. 13 is an image showing a result of defect detection by a conventional simple binarization method in which a threshold value is increased to remove shading. The wound disappears halfway.

【図14】傷がとぎれないように閾値を低くした従来の
単純二値化法による欠陥検出の結果を示す画像。傷は保
存されるがシェーディングが肥大して大きく広い欠陥像
となる。
FIG. 14 is an image showing a result of defect detection by a conventional simple binarization method in which a threshold value is reduced so that a scratch is not broken. The scratches are preserved, but the shading is enlarged, resulting in a large and wide defect image.

【図15】焼結部材の傷検出に本発明の方法を実施する
場合の原画像。
FIG. 15 is an original image when the method of the present invention is applied to the detection of a scratch on a sintered member.

【図16】図15の原画像に対して本発明の方法を実施
した結果を示す処理画像。
FIG. 16 is a processed image showing a result of performing the method of the present invention on the original image of FIG. 15;

【図17】図15の原画像に対して、斑点を除くために
閾値を高くした従来の単純二値化法による欠陥検出の結
果を示す画像。斑点は減っているが傷が途切れてしまっ
ている。
17 is an image showing a result of defect detection by a conventional simple binarization method in which a threshold value is increased in order to remove speckles from the original image of FIG. The spots have decreased, but the wound has been interrupted.

【図18】図15の原画像に対して、傷が途切れないよ
うに閾値を低くして単純二値化した従来法の結果を示す
画像。傷は途切れないが斑点が強調されて肥大化してい
る。
FIG. 18 is an image showing a result of a conventional method in which a threshold value is reduced so that a scratch is not interrupted on the original image of FIG. The wound is not interrupted, but the spots are emphasized and enlarged.

【図19】筋方向を8方向に量子化するために、全方位
を45度ずつ8方位a、b、c,d、−a、−b、−
c、−dに分割したことを説明する図。
FIG. 19 is a view showing eight directions a, b, c, d, -a, -b, and-in all directions of 45 degrees in order to quantize the muscle direction into eight directions.
The figure explaining that it divided | segmented to c and -d.

【図20】筋方向は正負を考慮しないので、8方向であ
ったものを4方向に量子化するために、全方位を45度
ずつ8方位a、b、c、dに分割し、反対向きの方位は
同じ記号を付して同方向とみなすようにしていることを
説明する図。
FIG. 20 does not consider the direction of the streaks, so that all directions are divided into eight directions a, b, c, and d by 45 degrees in order to quantize the directions from the eight directions into the four directions. FIG. 9 is a diagram for explaining that the directions are given the same symbols and regarded as the same direction.

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

1 アクリル板 2 光源 3 ハーフミラー 4 CCDカメラ 5 A/D変換器 6 原画像メモリ 7 演算処理部 8 結果画像メモリ 9 筋方向メモリ 10 二値画像メモリ 11 デジタル出力 12 D/A変換器 13 モニタ DESCRIPTION OF SYMBOLS 1 Acrylic board 2 Light source 3 Half mirror 4 CCD camera 5 A / D converter 6 Original image memory 7 Arithmetic processing part 8 Result image memory 9 Strike direction memory 10 Binary image memory 11 Digital output 12 D / A converter 13 Monitor

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 対象物表面の像を光学的に入力し、デジ
タル画像とし、各画素の明度情報を画像メモリに記憶さ
せ、全画素から順に取った任意の画素を注目画素Dj
して、注目画素Dj からk個離れた正方形に並ぶ画素集
合を輪郭画素Nkとし、明度情報から輪郭画素Nkのう
ち最大又は最小の明度を持つ画素M1を求め、その画素
M1の周辺u画素分を除いた残りの輪郭画素Nkのうち
最大又は最小の明度を持つ画素M2を求め、注目画素か
らM1、M2に引いたふたつの半直線の角度の差Θがπ
−α≦Θ≦π+α(0<α≦π/3)である場合にその
画素が筋状欠陥の候補点Fj と判断し、結果画像メモリ
の注目画素Dj に一定の得点C1を加算しΘがそうでな
いときは加算しない処理を輪郭画素NkをNsからNe
まで変えて複数回行い、注目画素Dj から注目画素M1
へ引いた半直線の方向として注目画素の筋方向Lj を求
め筋方向収容メモリのDj の位置に収容し、同じ操作を
原画像の全ての画素{Dj }に対して行い、候補得点
{Fj }と筋方向{Lj }を求め、再び全画素から順に
取った任意の画素を注目画素Dj とし、その周囲にW×
Wの正方形に含まれる近傍画素のうち筋方向が注目画素
を向いている求心画素Dk を求め求心画素Dk の候補得
点Fk を注目画素の候補得点Fj に加え、結果画像メモ
リに格納し、同じ操作を全ての画素について行い、相加
された候補得点{Fj }を得て、ある閾値Qによって画
素を二値化し、Fj ≧Qである画素の集合である筋状欠
陥領域Gmを求めることを特徴とする筋状欠陥の検査方
法。
1. A type the image of the object surface optically, and the digital image, the brightness information of each pixel is stored in the image memory, an arbitrary pixel taken sequentially from all the pixels as a pixel of interest D j, attention pixels from D j and k pieces apart contour pixels Nk the set of pixels arranged in a square, seeking pixel M1 with a maximum or minimum lightness of the outline pixels Nk lightness information, excluding the peripheral u pixels of the pixel M1 A pixel M2 having the maximum or minimum brightness is obtained from the remaining contour pixels Nk, and the angle difference Θ between two half lines drawn from the target pixel to M1 and M2 is π
Determines that -α ≦ Θ ≦ π + α ( 0 <α ≦ π / 3) in which the candidate point F j of the pixel is the line defect if, by adding the target pixel D constant scoring C1 to j of the result image memory If Θ is not the case, the processing of not adding the contour pixel Nk from Ns to Ne
By changing to do more than once, the attention from the pixel of interest D j pixel M1
Accommodated at the position of D j muscle direction L j a determined muscle direction accommodating the memory of the target pixel as the direction of the half line drawn to perform the same operation for all the pixels of the original image {D j}, candidate score {F j } and streak direction {L j } are obtained, and an arbitrary pixel taken again from all the pixels is set as a target pixel D j, and W ×
W a candidate score F k centripetal pixels D k determined centripetal pixels D k that among trace direction is oriented target pixel neighboring pixels included in a square applied to a candidate score F j of the pixel of interest, the results stored in the image memory Then, the same operation is performed on all pixels to obtain an added candidate score {F j }, binarize the pixels by a certain threshold Q, and obtain a streak defect area which is a set of pixels where F j ≧ Q. An inspection method for streak defects, wherein Gm is obtained.
【請求項2】 輪郭Nkの開始輪郭Nsのsの値を2以
上の整数として、注目画素から離隔した輪郭Nkについ
て最大明度点或いは最小明度点M1、次点明度点M2を
取ることによって、斑点のように長さの短いものの像を
排除できるようにした事を特徴とする請求項1に記載の
筋状欠陥の検査方法。
2. Assuming that the value of s of the start contour Ns of the contour Nk is an integer of 2 or more, the maximum lightness point or the minimum lightness point M1 and the next lightness point M2 are obtained for the contour Nk separated from the pixel of interest. 2. The inspection method for streak defects according to claim 1, wherein an image having a short length is removed.
【請求項3】筋状欠陥領域から孤立点を除去し、筋状欠
陥の面積S(m)を測定し、許容面積S0 と比較してそ
れより大きい場合はその製品が不良品であると判断する
ようにしたことを特徴とする請求項1に記載の筋状欠陥
の検査方法。
3. The isolated point is removed from the line defect region, measuring the area of the line defect S (m), the greater than compared to the allowable area S 0 is the product is defective 2. The inspection method for streak defects according to claim 1, wherein the judgment is made.
【請求項4】 対象物表面の像を光学的に入力し明度分
布を持つ像を画素に分解するカメラと、各画素の明度情
報をアナログ値からデジタル値に変換するA/D変換器
と、原画像の各画素の明度値をデジタル値として記憶す
る原画像メモリと、原画像メモリと同じ寸法をもち各画
素が筋状欠陥である可能性を表す得点を格納する結果画
像メモリと、原画像メモリと同じ寸法を持ち各画素にお
いて明度最大画素(又は最小画素)M1へ引いた半直線
の方向をその画素の筋方向として記憶する筋方向メモリ
と、全画素から順に取った任意の画素を注目画素Djと
して、注目画素Djからk個離れた正方形に並ぶ画素集
合を輪郭画素Nkとし、明度情報から輪郭画素Nkのう
ち最大又は最小の明度を持つ画素M1を求め、その画素
M1の周辺u画素分を除いた残りの輪郭画素Nkのうち
最大又は最小の明度を持つ画素M2を求め、注目画素か
らM1、M2に引いたふたつの半直線の角度の差Θがπ
−α≦Θ≦π+α(0<α≦π/3)である場合にその
画素が筋状欠陥の候補点Fjと判断し、結果画像メモリ
の注目画素Djに一定の得点C1を加算しΘがそうでな
いときは加算しない処理を輪郭画素NkをNsからNe
まで変えて複数回行い、注目画素Djから注目画素M1
へ引いた半直線の方向として注目画素の筋方向Ljを求
め筋方向収容メモリのDjの位置に収容し、同じ操作を
原画像の全ての画素{Dj}に対して行い、候補得点
{Fj}と筋方向{Lj}を求め、再び全画素から順に
取った任意の画素を注目画素Djとし、その周囲にW×
Wの正方形に含まれる近傍画素のうち筋方向が注目画素
を向いている求心画素Dkを求め求心画素Dkの候補得
点Fkを注目画素の候補得点Fjに加え、結果画像メモ
リに格納し、同じ操作を全ての画素について行い、相加
された候補得点{Fj}を得て、ある閾値Qによって画
素を二値化し、Fj≧Qである画素の集合である筋状欠
陥領域Gmを求める演算処理部と、Fj≧Qである画素
からなる画像を記憶する2値画像メモリと、原画像メモ
リ、結果画像メモリ、筋方向収納メモリ、2値画像メモ
リに収容される画素明度、方向の情報をデジタル値から
アナログ値に変換するD/A変換器と、デジタル/アナ
ログ変換された値を用いて原画像メモリ、結果画像メモ
リ、筋方向収容メモリ、2値画像メモリの内容を表示す
るモニタと、筋状欠陥の大きさ、位置、などを出力する
出力装置とを含むことを特徴とする筋状欠陥の検査装
置。
4. A camera for optically inputting an image of an object surface and decomposing an image having a brightness distribution into pixels, an A / D converter for converting brightness information of each pixel from an analog value to a digital value, An original image memory that stores the brightness value of each pixel of the original image as a digital value, a result image memory that has the same dimensions as the original image memory, and stores a score indicating that each pixel may be a streak defect, Attention is paid to a streak direction memory which has the same size as the memory and stores the direction of a half line drawn to the maximum brightness (or minimum pixel) M1 in each pixel as a streak direction of the pixel, and an arbitrary pixel taken in order from all pixels As the pixel Dj, a pixel set arranged in a square separated by k pieces from the pixel of interest Dj is defined as a contour pixel Nk, and a pixel M1 having the maximum or minimum brightness among the contour pixels Nk is obtained from the brightness information, and u pixels around the pixel M1 are determined. Minute Pixel M2 having the maximum or minimum brightness among the remaining contour pixels Nk excluding the above is obtained, and the difference 角度 between the angles of the two half lines drawn from the target pixel to M1 and M2 is π
When −α ≦ Θ ≦ π + α (0 <α ≦ π / 3), the pixel is determined to be a candidate point Fj of a streak defect, and a certain score C1 is added to the target pixel Dj of the result image memory to obtain Θ. Otherwise, the process of not adding is performed by changing the contour pixel Nk from Ns to Ne.
To the target pixel M1
The line direction Lj of the pixel of interest is determined as the direction of the drawn half-line, and stored at the position of Dj in the line direction storage memory, and the same operation is performed on all the pixels {Dj} of the original image to obtain the candidate score {Fj} And a line direction {Lj}, an arbitrary pixel taken in order from all the pixels again is set as a target pixel Dj, and W ×
Among the neighboring pixels included in the square of W, a centripetal pixel Dk whose streak direction is directed to the target pixel is obtained, a candidate score Fk of the centripetal pixel Dk is added to the candidate score Fj of the target pixel, the result is stored in the result image memory, and the same operation is performed. Is performed on all the pixels, an added candidate score {Fj} is obtained, the pixels are binarized by a certain threshold value Q, and a line defect area Gm which is a set of pixels satisfying Fj ≧ Q is obtained. And a binary image memory for storing an image composed of pixels satisfying Fj ≧ Q, and information of pixel brightness and direction stored in the original image memory, the result image memory, the streak direction storage memory, and the binary image memory. A digital-to-analog (D / A) converter for converting an image into an analog value, a monitor for displaying the contents of an original image memory, a result image memory, a streak direction storage memory, and a binary image memory using the digital / analog converted values; Size of Recessed, position, the inspection apparatus of the line defect, characterized in that it comprises an output device and for outputting the like.
【請求項5】演算処理部は、さらに筋状欠陥領域Gmか
ら孤立点を除去し、筋状欠陥の面積S(m)を測定し、
許容面積S0 と比較してそれより大きい場合はその製品
が不良品であると判断し、不良品であることを外部に出
力するようにしたことを特徴とする請求項4に記載の筋
状欠陥の検査装置。
5. The arithmetic processing unit further removes an isolated point from the streak defect area Gm, measures an area S (m) of the streak defect,
If compared to the allowable area S 0 greater than it determines the product as defective, streaky claim 4, characterized in that so as to output to the outside to be a defective Defect inspection equipment.
JP11518497A 1997-04-16 1997-04-16 Method and apparatus for inspecting streak defects Expired - Fee Related JP3855360B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11518497A JP3855360B2 (en) 1997-04-16 1997-04-16 Method and apparatus for inspecting streak defects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11518497A JP3855360B2 (en) 1997-04-16 1997-04-16 Method and apparatus for inspecting streak defects

Publications (2)

Publication Number Publication Date
JPH10289319A true JPH10289319A (en) 1998-10-27
JP3855360B2 JP3855360B2 (en) 2006-12-06

Family

ID=14656444

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11518497A Expired - Fee Related JP3855360B2 (en) 1997-04-16 1997-04-16 Method and apparatus for inspecting streak defects

Country Status (1)

Country Link
JP (1) JP3855360B2 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001194316A (en) * 1999-10-26 2001-07-19 Hitachi Ltd Method and device for non-destructive inspection
JP2005351910A (en) * 1999-10-26 2005-12-22 Hitachi Ltd Defect inspection method and its apparatus
US7899573B2 (en) 2008-06-16 2011-03-01 GM Global Technology Operations LLC Non-contact method and system for inspecting a multi-faceted machine surface
CN101995412A (en) * 2010-08-30 2011-03-30 中国科学院计算技术研究所 Robust glass scratch defect detection method and device thereof
CN103926256A (en) * 2014-03-20 2014-07-16 上海华力微电子有限公司 CMP scratch automatic detection system
JP2019066263A (en) * 2017-09-29 2019-04-25 清水建設株式会社 Crack detector, crack detection method, and computer program
WO2019088259A1 (en) * 2017-11-06 2019-05-09 Hoya株式会社 Processor for electronic endoscope, and electronic endoscope system
CN109934817A (en) * 2019-03-21 2019-06-25 大连大学 The external contouring deformity detection method of one seed pod
CN110182578A (en) * 2019-06-14 2019-08-30 上海洪海实业发展有限公司 A kind of segmentation calculates the method and apparatus and equipment of feeding deviation progress material correction
CN117491391A (en) * 2023-12-29 2024-02-02 登景(天津)科技有限公司 Glass substrate light three-dimensional health detection method and equipment based on chip calculation
CN117876468A (en) * 2024-03-12 2024-04-12 常州信息职业技术学院 Convex hull-based detection method and system for low-beam light type characteristic points of automobile lamplight

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005351910A (en) * 1999-10-26 2005-12-22 Hitachi Ltd Defect inspection method and its apparatus
JP2001194316A (en) * 1999-10-26 2001-07-19 Hitachi Ltd Method and device for non-destructive inspection
US7899573B2 (en) 2008-06-16 2011-03-01 GM Global Technology Operations LLC Non-contact method and system for inspecting a multi-faceted machine surface
CN101995412A (en) * 2010-08-30 2011-03-30 中国科学院计算技术研究所 Robust glass scratch defect detection method and device thereof
CN103926256A (en) * 2014-03-20 2014-07-16 上海华力微电子有限公司 CMP scratch automatic detection system
JP2019066263A (en) * 2017-09-29 2019-04-25 清水建設株式会社 Crack detector, crack detection method, and computer program
US11457795B2 (en) 2017-11-06 2022-10-04 Hoya Corporation Processor for electronic endoscope and electronic endoscope system
WO2019088259A1 (en) * 2017-11-06 2019-05-09 Hoya株式会社 Processor for electronic endoscope, and electronic endoscope system
CN109934817A (en) * 2019-03-21 2019-06-25 大连大学 The external contouring deformity detection method of one seed pod
CN109934817B (en) * 2019-03-21 2023-02-03 大连大学 Method for detecting malformation of external contour of fruit body
CN110182578A (en) * 2019-06-14 2019-08-30 上海洪海实业发展有限公司 A kind of segmentation calculates the method and apparatus and equipment of feeding deviation progress material correction
CN110182578B (en) * 2019-06-14 2021-02-02 上海洪海实业发展有限公司 Method, device and equipment for correcting material deviation by calculating material deviation in segmentation mode
CN117491391A (en) * 2023-12-29 2024-02-02 登景(天津)科技有限公司 Glass substrate light three-dimensional health detection method and equipment based on chip calculation
CN117491391B (en) * 2023-12-29 2024-03-15 登景(天津)科技有限公司 Glass substrate light three-dimensional health detection method and equipment based on chip calculation
CN117876468A (en) * 2024-03-12 2024-04-12 常州信息职业技术学院 Convex hull-based detection method and system for low-beam light type characteristic points of automobile lamplight
CN117876468B (en) * 2024-03-12 2024-05-10 常州信息职业技术学院 Convex hull-based detection method and system for low-beam light type characteristic points of automobile lamplight

Also Published As

Publication number Publication date
JP3855360B2 (en) 2006-12-06

Similar Documents

Publication Publication Date Title
JP3581314B2 (en) Automatic lens inspection system
KR100233218B1 (en) Opthalmic lens inspection method and apparatus
JP4351522B2 (en) Pattern defect inspection apparatus and pattern defect inspection method
US8582864B2 (en) Fault inspection method
CN113688807B (en) Self-adaptive defect detection method, device, recognition system and storage medium
US7764826B2 (en) Method and apparatus of reviewing defects on a semiconductor device
JP4250898B2 (en) Circuit pattern inspection method and apparatus
US4974261A (en) Optical surface inspection method
JP4254347B2 (en) Method and apparatus for detecting foreign matter in liquid in container
CN109934811A (en) A kind of optical element surface defect inspection method based on deep learning
JP2017049974A (en) Discriminator generator, quality determine method, and program
JPH0221541B2 (en)
JP3855360B2 (en) Method and apparatus for inspecting streak defects
JP3279868B2 (en) Defect inspection method and device for inspected pattern
CN115825103B (en) End detection system for angular port optical fiber array based on image technology
US5995212A (en) System and method for inspecting an optical fiber including an epoxy area surrounding the optical fiber
KR101828536B1 (en) Method and apparatus of panel inspection
JP2001118899A (en) Inspection apparatus for foreign object and pattern defect
US20230020684A1 (en) Laser based inclusion detection system and methods
CN113176275A (en) Method, device and system for retesting display panel
JP2004309426A (en) Method and apparatus for evaluating translucent substrate
US20130258320A1 (en) Method and apparatus for inspecting surface of a magnetic disk
JP2001034762A (en) Method and device for image processing checking
Lin et al. Defect detection system for optical element surface based on machine vision
JP4523310B2 (en) Foreign matter identification method and foreign matter identification device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060814

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20060822

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060904

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees