JPH10170451A - Defect-inspecting apparatus - Google Patents

Defect-inspecting apparatus

Info

Publication number
JPH10170451A
JPH10170451A JP32927796A JP32927796A JPH10170451A JP H10170451 A JPH10170451 A JP H10170451A JP 32927796 A JP32927796 A JP 32927796A JP 32927796 A JP32927796 A JP 32927796A JP H10170451 A JPH10170451 A JP H10170451A
Authority
JP
Japan
Prior art keywords
defect
image
inspection apparatus
difference
defect inspection
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.)
Pending
Application number
JP32927796A
Other languages
Japanese (ja)
Inventor
Naomichi Mine
直道 嶺
Fumio Shibata
文男 柴田
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.)
Omron Corp
Original Assignee
Omron Corp
Omron Tateisi Electronics Co
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 Omron Corp, Omron Tateisi Electronics Co filed Critical Omron Corp
Priority to JP32927796A priority Critical patent/JPH10170451A/en
Publication of JPH10170451A publication Critical patent/JPH10170451A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a defect-inspecting apparatus which can correctly inspect the presence/absence of a defect irrespective of a shape and a size of an object to be inspected. SOLUTION: An illumination of a specific pattern is projected to an object to be inspected. The object to be inspected is photographed by an image input part 1. A direction in which a brightness of an input image changes is obtained at a direction-calculating part 2. A direction in which a brightness of a good object changes is obtained at a good object direction-calculating part 3. A difference value of direction data obtained at the direction-calculating part 2 and good object direction-calculating part 3 is evaluated for every pixel at a direction difference-evaluating part 4, thereby obtaining a direction difference evaluation image. A degree and a position of a defect are detected by a defect- detecting part 5 on the basis of the direction difference evaluation image.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、缶やシート状物
(紙や布等)等の製品の欠陥の有無を検査する欠陥検査
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a defect inspection apparatus for inspecting products such as cans and sheets (paper, cloth, etc.) for defects.

【0002】[0002]

【従来の技術】被検査対象物の汚れや傷等の欠陥を検査
する欠陥検査装置として次のようなものがある。即ち、
被検査対象物をカメラによって撮像することにより得ら
れるアナログビデオ信号をA/D変換して被検査対象物
を表す濃淡画像データを得る。被検査対象物の欠陥は、
その欠陥を表す画素がその回りの画素に比べて濃度が異
なる。従って、濃淡画像を微分処理し、エッジ強度画像
を得た後、所定の大きさのウインドウを画像内で走査
し、ウインドウ内のエッジ強度の和を欠陥度とし、欠陥
度が所定のしきい値よりも大きい場合を欠陥として検出
する装置である。
2. Description of the Related Art There are the following defect inspection apparatuses for inspecting defects such as dirt and scratches on an object to be inspected. That is,
A / D conversion is performed on an analog video signal obtained by capturing an image of the object to be inspected by a camera to obtain grayscale image data representing the object to be inspected. The defect of the inspected object is
The density of the pixel representing the defect is different from that of the surrounding pixels. Therefore, after a grayscale image is differentiated and an edge strength image is obtained, a window of a predetermined size is scanned in the image, the sum of the edge strengths in the window is defined as a defect degree, and the defect degree is determined by a predetermined threshold value. This is a device that detects a case where the size is larger than a defect.

【0003】[0003]

【発明が解決しようとする課題】このような装置におい
ては、欠陥を表す画素とその回りの画素との濃度差が大
きい場合と濃度差が小さい場合とでは、欠陥度の大きさ
が異なる。このため、汚れや傷等の多種類の欠陥が画像
内に混在する場合には、しきい値の決定が困難である。
又、濃度差が小さい傷を見落とすという問題点がある。
更に、被検査対象物の曲面を検査する場合には、一様な
照明を当てることが困難な場合があり、そのような場合
には、シェーディングの影響により欠陥以外の部分を欠
陥とみなすという問題点がある。
In such an apparatus, the degree of defect differs between a case where the density difference between a pixel representing a defect and the surrounding pixels is large and a case where the density difference is small. Therefore, when many types of defects such as dirt and scratches are mixed in an image, it is difficult to determine the threshold value.
Further, there is a problem that a flaw having a small density difference is overlooked.
Further, when inspecting a curved surface of an object to be inspected, it may be difficult to illuminate uniformly, and in such a case, a problem that a portion other than a defect is regarded as a defect due to the influence of shading. There is a point.

【0004】従って、本発明は、そのような従来の問題
点に着目してなされたもので、被検査対象物の形状や大
小にかかわらず、欠陥の有無を正確に検査することがで
きる欠陥検査装置を提供することを目的としている。
Accordingly, the present invention has been made in view of such a conventional problem, and is capable of accurately inspecting for the presence or absence of a defect regardless of the shape or size of an object to be inspected. It is intended to provide a device.

【0005】[0005]

【課題を解決するための手段】前記目的を達成するため
に、本発明の請求項1の欠陥検査装置は、被検査対象物
に特定パターンの照明を当てる照明手段と、照明された
被検査対象物を撮像する画像入力手段と、入力画像の明
るさの変化する方向を求める方向算出手段と、良品の明
るさの変化する方向を求める良品方向算出手段と、方向
算出手段と良品方向算出手段より得られる方向データの
差値を画素毎に評価し、方向差評価画像を求める方向差
評価手段と、方向差評価画像に基づき、欠陥の度合いと
位置を検出する欠陥検出手段とを備えることを特徴とす
る。
In order to achieve the above object, a defect inspection apparatus according to a first aspect of the present invention comprises: an illuminating means for illuminating an object to be inspected with a specific pattern; Image input means for imaging an object, direction calculating means for determining the direction in which the brightness of the input image changes, non-defective direction calculating means for determining the direction in which the brightness of the non-defective product changes, and direction calculating means and non-defective direction calculating means. It is characterized by comprising direction difference evaluation means for evaluating a difference value of obtained direction data for each pixel to obtain a direction difference evaluation image, and defect detection means for detecting a degree and a position of a defect based on the direction difference evaluation image. And

【0006】この装置によれば、明るさの変化する方向
を用いて欠陥を検出する構成であるので、欠陥とその周
囲の画素の濃度値の差に影響されず、従来困難であった
低コントラストの欠陥の検出が可能となる。又、欠陥の
種別に影響されず、一定のしきい値での欠陥の判定が可
能となる。又、請求項5の欠陥検査装置は、被検査対象
物に特定パターンの照明を当てる照明手段と、照明され
た被検査対象物を撮像する画像入力手段と、入力画像よ
り或る特定の基準位置を算出する基準位置算出手段と、
基準位置からの相対位置より良品の明るさの変化する方
向を求める良品方向算出手段と、方向算出手段と良品方
向算出手段より得られる方向データの差値を画素毎に評
価し、方向差評価画像を求める方向差評価手段と、方向
差評価画像に基づき、欠陥の度合いと位置を検出する欠
陥検出手段とを備えることを特徴とする。
According to this device, since the defect is detected using the direction in which the brightness changes, the device is not affected by the difference between the density value of the defect and the density value of the pixels around the defect. Can be detected. Further, it is possible to determine a defect at a fixed threshold value without being affected by the type of the defect. A defect inspection apparatus according to a fifth aspect of the present invention includes an illuminating means for illuminating the inspection object with a specific pattern, an image input means for imaging the illuminated inspection object, and a specific reference position based on the input image. Reference position calculating means for calculating
A non-defective direction calculating means for determining a direction in which the brightness of the non-defective product changes from a relative position from the reference position, and a difference value of direction data obtained by the direction calculating means and the non-defective direction calculating means for each pixel, and a direction difference evaluation image And a defect detecting means for detecting the degree and position of the defect based on the direction difference evaluation image.

【0007】この装置によれば、上記請求項1の効果に
加えて、基準位置からの相対位置の情報より簡単に良品
方向を算出することが可能である。
According to this device, in addition to the effect of the first aspect, it is possible to easily calculate the non-defective direction from the information of the relative position from the reference position.

【0008】[0008]

【発明の実施の形態】以下、本発明を実施の形態に基づ
いて説明する。 <実施形態1>図1は、一実施形態に係る欠陥検査装置
の構成を示すブロック図である。この実施形態の欠陥検
査装置は、照明手段(図示せず)により照明された被検
査対象物の濃淡画像を入力する画像入力部1と、入力さ
れた画像より明るさの変化する方向(以下、「入力濃度
勾配方向」と呼ぶ)を各画素毎に求める方向算出部2
と、良品において本来あるべき明るさの変化する方向
(以下、「モデル濃度勾配方向」と呼ぶ)を各画素毎に
求める良品方向算出部3と、各画素毎に入力濃度勾配方
向とモデル濃度勾配方向との差値の評価値を求め、評価
値画像を作成する方向差評価部4と、或るウインドウを
評価値画像上で走査し、そのウインドウ内の評価値の合
計値をしきい値と比較することにより、欠陥の位置とそ
の度合いを検出する欠陥検出部5とからなる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described below based on embodiments. <First Embodiment> FIG. 1 is a block diagram showing a configuration of a defect inspection apparatus according to one embodiment. The defect inspection apparatus according to this embodiment includes an image input unit 1 for inputting a grayscale image of an inspection target illuminated by an illumination unit (not shown), and a direction in which brightness changes from the input image (hereinafter, referred to as a “brightness”). Direction calculating unit 2 for determining “input density gradient direction” for each pixel
A non-defective direction calculating unit 3 for obtaining, for each pixel, a direction in which brightness should change in a non-defective product (hereinafter referred to as a “model density gradient direction”); an input density gradient direction and a model density gradient for each pixel A direction difference evaluator 4 for obtaining an evaluation value of a difference value from a direction and creating an evaluation value image, and scanning a certain window on the evaluation value image and setting a total value of the evaluation values in the window as a threshold value The defect detection unit 5 detects the position of the defect and the degree of the defect by comparison.

【0009】次に、このように構成した欠陥検査装置を
用いてシート(紙、布等)上の欠陥の有無を検査する例
について説明する。照明手段としては、シートの左から
右にかけて濃淡値が変化するような照明を当てることと
する。画像入力部1では、このような照明を当てたシー
トをカメラで撮影し、アナログビデオ信号をA/D変換
し、メモリに記憶する。
Next, a description will be given of an example of inspecting the presence or absence of a defect on a sheet (paper, cloth, etc.) by using the defect inspection apparatus thus configured. As the illuminating means, illuminating such that the gray value changes from the left to the right of the sheet is applied. The image input unit 1 captures the illuminated sheet with a camera, A / D converts an analog video signal, and stores the analog video signal in a memory.

【0010】方向算出部2では、メモリに記憶された入
力画像の画素値I(x,y)より入力濃度勾配方向Iθ
(x,y)を以下の式により求める。 Iθ(x,y) =atan2{Dx (x,y) ,Dy (x,y) } ここで、Dx (x,y) =I(x+1,y-1) +2I(x+1,y) +I
(x+1,y+1)−I(x-1,y-1) −2I(x-1,y) −I(x-1,y+1) Dy (x,y) =I(x+1,y+1) +2I(x,y+1) +I(x-1,y+
1)−I(x+1,y-1) −2I(x,y-1) −I(x-1,y-1) atan2とは、Dx ,Dy で表されるDx −Dy 座標の逆
正接関数を指す(図3参照)。入力濃度勾配方向算出手
法としては、Prewitt オペレータ等の他のオペレータで
も良い。この際、Dx (x,y)とDy (x,y)の値
が共に所定のしきい値以下の場合には、画像入力部1に
おけるA/D変換時におけるノイズの影響を受けて方向
が正確に求められていない可能性が高いので、方向が不
定であるとみなし、方向なし(ND)フラグを付ける。
又、方向が算出不能である画像端においても方向なし
(ND)フラグを付ける。
The direction calculating section 2 calculates the input density gradient direction Iθ from the pixel value I (x, y) of the input image stored in the memory.
(X, y) is obtained by the following equation. Iθ (x, y) = atan2 {D x (x, y), D y (x, y)} where D x (x, y) = I (x + 1, y−1) + 2I (x + 1, y) + I
(x + 1, y + 1 ) -I (x-1, y-1) -2I (x-1, y) -I (x-1, y + 1) D y (x, y) = I ( x + 1, y + 1) + 2I (x, y + 1) + I (x-1, y +
1) -I (x + 1, y-1) -2I (x, a y-1) -I (x- 1, y-1) atan2 is, D x, D x -D represented by D y Indicates the arctangent function of the y coordinate (see FIG. 3). As an input density gradient direction calculation method, another operator such as a Prewitt operator may be used. At this time, if the values of D x (x, y) and D y (x, y) are both equal to or smaller than a predetermined threshold, the image input unit 1 is affected by noise during A / D conversion. Since there is a high possibility that the direction has not been accurately obtained, the direction is considered to be indeterminate and a no-direction (ND) flag is set.
Also, a flag indicating no direction (ND) is set at the end of the image whose direction cannot be calculated.

【0011】良品方向算出部3では、モデル濃度勾配方
向を各画素について求め、メモリに記憶しておく。この
実施形態の場合には、画像の左側より照明を当てている
ため、各画素におけるモデル濃度勾配方向Mθ(x,
y)は左向き、即ち180°である。方向差評価部4に
おいては、各画素位置(x,y)における入力濃度勾配
方向Iθ(x,y)とモデル濃度勾配方向Mθ(x,
y)との差値ω(x,y)が以下の式により算出され
る。
The non-defective direction calculation unit 3 obtains the model density gradient direction for each pixel and stores it in a memory. In the case of this embodiment, since illumination is applied from the left side of the image, the model density gradient direction Mθ (x,
y) is to the left, ie 180 °. In the direction difference evaluation unit 4, the input density gradient direction Iθ (x, y) and the model density gradient direction Mθ (x, y) at each pixel position (x, y)
The difference value ω (x, y) from y) is calculated by the following equation.

【0012】 ω(x,y)=Iθ(x,y)−Mθ(x,y) このとき、Iθ(x,y)とMθ(x,y)のいずれか
がNDの場合には、ω(x,y)=NDとする。又、ω
(x,y)の評価値f[ω(x,y)]が以下の式によ
り算出される。これは、請求項9に従えば、 請求項10に従えば、 請求項11に従えば、一例として、 請求項12に従えば、一例として、 となる。算出後のf[ω(x,y)]は評価値画像E
(x,y)としてメモリに記憶される。
Ω (x, y) = Iθ (x, y) −Mθ (x, y) At this time, when either Iθ (x, y) or Mθ (x, y) is ND, ω (X, y) = ND. Also, ω
The evaluation value f [ω (x, y)] of (x, y) is calculated by the following equation. This is according to claim 9 According to claim 10, According to claim 11, as an example, According to claim 12, as an example, Becomes The calculated f [ω (x, y)] is the evaluation value image E
It is stored in the memory as (x, y).

【0013】欠陥検出部5においては、図4に示すよう
に、wx×wyの大きさのウインドウ〔基準位置(x,
y)を左上隅座標とする〕を評価値画像(大きさxs×
ys)上の検査可能領域(0,0)−(xs−wx,y
s−wy)で走査し、各ウインドウ位置においてウイン
ドウ内の評価値の総和S(x,y)、 を求める。その後、S(x,y)が所定のしきい値以上
であれば、その位置(x,y)に欠陥度S(x,y)の
欠陥があるとの判定を行う。
In the defect detector 5, as shown in FIG. 4, a window having a size of wx × wy [reference position (x,
y) is defined as the upper left corner coordinate) of the evaluation value image (size xs ×
ys) on testable area (0,0)-(xs-wx, y
s-wy), and at each window position, the sum S (x, y) of the evaluation values in the window, Ask for. Thereafter, if S (x, y) is equal to or greater than a predetermined threshold, it is determined that a defect having a defect degree S (x, y) exists at the position (x, y).

【0014】例えば、図5の(a)のように入力画像の
一部に欠陥(網掛け部分)がある場合を考える。その場
合の入力濃度勾配方向は図5の(b)のようになる。モ
デル濃度勾配方向は画像の左側より照明を当てているた
め図6の(c)とする。入力濃度勾配方向とモデル濃度
勾配方向との差は図6の(d)のようになる。請求項9
に従った評価関数fを用いた評価値画像は図7の
(e)、請求項10に従った評価関数fを用いた評価値
画像は図7の(f)、請求項11に従った評価関数fを
用いた評価値画像は図8の(g)、請求項12に従った
評価関数fを用いた評価値画像は図8の(h)のように
なる。それぞれの評価値画像上で4×4の大きさのウイ
ンドウを走査した場合の欠陥度は、図9の(i)、
(j)、(k)、図10の(l)のようになり、それぞ
れ欠陥検出のしきい値を6,10,8,10とすると、
網掛けの位置で欠陥が検出される。入力画像上での欠陥
が検出されたウインドウ位置は、図11の(m)の網掛
け位置であり、確かに欠陥部を検出できている。 <実施形態2>図12は、別実施形態に係る欠陥検査装
置の構成を示すブロック図である。この実施形態の欠陥
検査装置は、照明手段(図示せず)により照明された被
検査対象物の濃淡画像を入力する画像入力部1と、入力
された画像より明るさの変化する方向(以下、「入力濃
度勾配方向」と呼ぶ)を各画素毎に求める方向算出部2
と、入力画像中より或る特定の位置(以下、「基準位
置」と呼ぶ)を検出する基準位置算出部6と、良品にお
いて本来あるべき明るさの変化する方向(以下、「モデ
ル濃度勾配方向」と呼ぶ)を基準位置からの相対位置に
より各画素毎に求める良品方向算出部7と、各画素毎に
入力濃度勾配方向とモデル濃度勾配方向との差値の評価
値を求め、評価値画像を作成する方向差評価部4と、或
るウインドウを評価値画像上で走査し、そのウインドウ
内の評価値の合計値をしきい値と比較することにより、
欠陥の位置とその度合いを検出する欠陥検出部5とから
なる。
For example, consider a case where a part of the input image has a defect (shaded part) as shown in FIG. In this case, the direction of the input density gradient is as shown in FIG. The model density gradient direction is shown in FIG. 6C since illumination is applied from the left side of the image. The difference between the input density gradient direction and the model density gradient direction is as shown in FIG. Claim 9
The evaluation value image using the evaluation function f according to (e) of FIG. 7, the evaluation value image using the evaluation function f according to claim 10 is (f) of FIG. 7, and the evaluation according to claim 11. An evaluation value image using the function f is as shown in FIG. 8G, and an evaluation value image using the evaluation function f according to claim 12 is as shown in FIG. The degree of defect when a window of 4 × 4 size is scanned on each evaluation value image is shown in FIG.
(J), (k), and (l) in FIG. 10. Assuming that the thresholds of defect detection are 6, 10, 8, and 10, respectively,
A defect is detected at the shaded position. The window position where the defect on the input image is detected is the hatched position in FIG. 11 (m), and the defective portion can be detected. <Embodiment 2> FIG. 12 is a block diagram showing a configuration of a defect inspection apparatus according to another embodiment. The defect inspection apparatus according to the present embodiment includes an image input unit 1 for inputting a grayscale image of an inspection object illuminated by an illumination unit (not shown), and a direction in which brightness changes from the input image (hereinafter, referred to as an image input unit). Direction calculating unit 2 for determining “input density gradient direction” for each pixel
A reference position calculation unit 6 for detecting a specific position (hereinafter, referred to as a “reference position”) in the input image; and a direction in which brightness should change in a good product (hereinafter, “model density gradient direction”). ) Is calculated for each pixel based on the relative position from the reference position, and the evaluation value of the difference between the input density gradient direction and the model density gradient direction is calculated for each pixel, and the evaluation value image is calculated. By scanning a certain window on the evaluation value image and comparing the total value of the evaluation values in the window with a threshold value,
The defect detection unit 5 detects the position and the degree of the defect.

【0015】次に、このように構成した欠陥検査装置を
用いて缶内面の欠陥の有無を検査する例について説明す
る。照明手段としては、缶の中心から放射状に明るさが
変化するような照明を当てることとする〔図13の
(a)参照〕。画像入力部1及び方向算出部2の処理
は、実施形態1で説明したものと同一であり、説明は省
略する。
Next, a description will be given of an example of inspecting the inner surface of a can for the presence or absence of a defect using the defect inspecting apparatus thus configured. As the illuminating means, illuminating such that the brightness changes radially from the center of the can is applied (see FIG. 13A). The processing of the image input unit 1 and the direction calculation unit 2 is the same as that described in the first embodiment, and a description thereof will not be repeated.

【0016】基準位置算出部6では、缶の中心を基準位
置として検出する。検出手法の一例としては、図13の
(b)のように、入力画像中より、缶底面のエッジ上の
3点(x1,y1),(x2,y2),(x3,y3)
をテンプレート8,9,10を用いて求め、以下の連立
方程式を解くことにより基準位置(xc,yc)を求め
る。
The reference position calculator 6 detects the center of the can as a reference position. As an example of the detection method, as shown in FIG. 13B, three points (x1, y1), (x2, y2), (x3, y3) on the edge of the can bottom from the input image.
Is determined using the templates 8, 9, and 10, and the following simultaneous equations are solved to determine the reference position (xc, yc).

【0017】 (x1−xc)2 +(y1−yc)2 =r2 (x2−xc)2 +(y2−yc)2 =r2 (x3−xc)2 +(y3−yc)2 =r2 良品方向算出部7においては、以下の式より基準位置か
らの相対位置よりモデル濃度勾配方向Mθ(x,y)が
各画素毎に求められる。
(X1-xc) 2 + (y1-yc) 2 = r 2 (x2-xc) 2 + (y2-yc) 2 = r 2 (x3-xc) 2 + (y3-yc) 2 = r The non- defective product direction calculation unit 7 calculates the model density gradient direction Mθ (x, y) for each pixel from the relative position from the reference position according to the following equation.

【0018】 Mθ(x,y)=atan2(x−xc,y−yc) atan2は、実施形態1に示したものと同一である。
又、(x,y)=(xc,yc)の場合には、方向不定
となるため、 Mθ(xc,yc)=ND とする。
Mθ (x, y) = atan2 (xxc, y-yc) atan2 is the same as that shown in the first embodiment.
In the case of (x, y) = (xc, yc), the direction is uncertain, so that Mθ (xc, yc) = ND.

【0019】方向差評価部4においては、実施形態1と
同様の手法で評価値画像E(x,y)が求められる。こ
の実施形態においては、評価関数として請求項10及び
請求項12に従ったもののみを用いる。これは、モデル
濃度勾配方向においては図14の(a)のように、全て
の画素が中心から放射状外向きに方向が広がっているの
に対し、入力濃度勾配方向においては、図14の(b)
のように、缶の底面エッジ部(点線部)において放射状
内向きに方向が発生する可能性があるからである。即
ち、方向が180°反転する可能性があるからである。
このため、方向差ωが180°の場合は、欠陥とみなさ
ない処理を入れる必要性があるためである。
In the direction difference evaluation section 4, an evaluation value image E (x, y) is obtained in the same manner as in the first embodiment. In this embodiment, only the functions according to claims 10 and 12 are used as the evaluation function. This is because, in the model density gradient direction, as shown in FIG. 14A, all the pixels extend radially outward from the center, whereas in the input density gradient direction, FIG. )
This is because a direction may be generated radially inward at the bottom edge portion (dotted line portion) of the can. That is, the direction may be inverted by 180 °.
Therefore, when the direction difference ω is 180 °, it is necessary to perform processing that is not regarded as a defect.

【0020】欠陥検出部5の処理は、実施形態1と同一
である。例えば、図15の(a)のように入力画像の一
部に欠陥(濃度値30の網掛け部分)がある場合を考え
る。又、入力画像中には、缶の底面エッジ(濃度値5の
網掛け部分)が映っているものとする。その場合の入力
濃度勾配方向は図15の(b)のようになる。一方、基
準位置算出部6において缶の底面エッジ上の3点をサー
チにより求め、中心位置(xc,yc)=(8,8)を
求める。よって、モデル濃度勾配方向は図16の(c)
のようになる。又、入力濃度勾配方向とモデル濃度勾配
方向との差は図16の(d)のようになる。
The processing of the defect detector 5 is the same as that of the first embodiment. For example, consider a case where a part of the input image has a defect (shaded part of the density value 30) as shown in FIG. Also, it is assumed that the bottom edge of the can (shaded portion with a density value of 5) is reflected in the input image. In this case, the input density gradient direction is as shown in FIG. On the other hand, the reference position calculation unit 6 finds three points on the bottom edge of the can by searching, and finds the center position (xc, yc) = (8, 8). Therefore, the model density gradient direction is shown in FIG.
become that way. The difference between the input density gradient direction and the model density gradient direction is as shown in FIG.

【0021】上記(方向差評価部4の説明)したよう
に、缶の底面エッジ部において、入力濃度勾配方向とモ
デル濃度勾配方向が180°異なる部分がある〔図16
の(d)の網掛け部分〕。請求項10に従った評価関数
fを用いた評価値画像は図17の(e)、請求項12に
従った評価関数fを用いた評価値画像は図17の(f)
のようになる。それぞれの評価値画像上で4×4の大き
さのウインドウを走査した場合の欠陥度は、図18の
(g),(h)のようになり、それぞれの欠陥検出のし
きい値を8,9とすると、網掛けの位置で欠陥が検出さ
れる。入力画像上での欠陥が検出されたウインドウ位置
は、図19の(i)の網掛けの位置であり、確かに欠陥
部を検出できている。
As described above (description of the direction difference evaluator 4), there is a portion at the bottom edge of the can where the direction of the input density gradient differs from the direction of the model density gradient by 180 ° [FIG.
(D) shaded portion]. An evaluation value image using the evaluation function f according to claim 10 is shown in FIG. 17E, and an evaluation value image using the evaluation function f according to claim 12 is shown in FIG.
become that way. The degree of defect when a window of 4 × 4 size is scanned on each evaluation value image is as shown in (g) and (h) of FIG. Assuming that 9, the defect is detected at the shaded position. The window position where the defect on the input image is detected is the hatched position in FIG. 19 (i), and the defective portion can be detected.

【0022】[0022]

【発明の効果】以上説明したように、請求項1によれ
ば、明るさの変化する方向を用いて欠陥を検出する構成
としたので、欠陥とその周囲の画素の濃度値の差に影響
されず、従来困難であった低コントラストの欠陥の検出
が可能となる。又、欠陥の種別に影響されず、一定のし
きい値での欠陥の判定が可能となる。
As described above, according to the first aspect, since the defect is detected by using the direction in which the brightness changes, it is influenced by the difference between the density value of the defect and the pixels surrounding the defect. Thus, it is possible to detect a low-contrast defect, which has been difficult in the past. Further, it is possible to determine a defect at a fixed threshold value without being affected by the type of the defect.

【0023】請求項2によれば、照明を当てる位置情報
より良品方向算出手段の方向データを簡単に算出するこ
とが可能となる。請求項3,4によれば、被検査対象物
のムラ等の低コントラストの欠陥を検出することが可能
となる。請求項5によれば、請求項1の効果に加えて、
基準位置からの相対位置の情報より簡単に良品方向を算
出することが可能となる。
According to the second aspect, it is possible to easily calculate the direction data of the non-defective product direction calculating means from the position information of the illumination. According to the third and fourth aspects, it is possible to detect a low-contrast defect such as unevenness of the inspection object. According to claim 5, in addition to the effect of claim 1,
The non-defective product direction can be easily calculated from the information on the relative position from the reference position.

【0024】請求項6,7によれば、基準位置を原点と
した場合の各画素の位置での位置ベクトルを、良品が本
来あるべき明るさの変化する方向とすることができ、簡
易に方向を算出することができる。請求項8によれば、
缶内面の汚れや傷等を検出することが可能である。請求
項9によれば、良品が本来あるべき方向と入力画像より
得られる方向が同一の方向であれば、良品とみなすこと
が可能である。又、その度合いを角度差に応じて連続的
に変化させることが可能である。
According to the sixth and seventh aspects, the position vector at the position of each pixel when the reference position is set as the origin can be set to the direction in which the brightness of a good product should change, and the direction can be easily determined. Can be calculated. According to claim 8,
It is possible to detect dirt and scratches on the inner surface of the can. According to the ninth aspect, if the direction in which the non-defective product should be originally and the direction obtained from the input image are the same, it can be regarded as a non-defective product. Further, the degree can be continuously changed according to the angle difference.

【0025】請求項10によれば、請求項9の効果に加
えて、良品が本来あるべき方向と180°異なる方向で
あっても、良品であるとみなすことが可能である。請求
項11によれば、良品が本来あるべき方向と入力画像よ
り得られる方向が或る一定範囲の間であれば、良品とみ
なすことが可能である。又、良品の方向と同一の方向と
みなす範囲xを変化させることが可能である。
According to the tenth aspect, in addition to the effect of the ninth aspect, it is possible to regard a non-defective product as a non-defective product even in a direction 180 ° different from the direction in which the non-defective product should be. According to the eleventh aspect, if the direction in which a good product should be originally and the direction obtained from the input image are within a certain fixed range, it can be regarded as a good product. Further, it is possible to change the range x regarded as the same direction as the direction of the non-defective product.

【0026】請求項12によれば、請求項11の効果に
加えて、良品が本来あるべき方向と180°異なる方向
であっても、良品であるとみなすことが可能である。
According to the twelfth aspect, in addition to the effect of the eleventh aspect, it is possible to regard a non-defective product as a non-defective product even in a direction different from the original direction by 180 °.

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

【図1】一実施形態に係る欠陥検査装置の構成を示すブ
ロック図である。
FIG. 1 is a block diagram showing a configuration of a defect inspection apparatus according to one embodiment.

【図2】シート(被検査対象物)の左から右にかけて濃
淡値が変化するような照明を示す図である。
FIG. 2 is a view showing illumination in which the gray value changes from left to right of a sheet (object to be inspected).

【図3】Dx −Dy 座標の逆正接関数を示す図である。3 is a diagram showing an inverse tangent function of the D x -D y coordinates.

【図4】xs×ysの大きさの評価値画像に対するwx
×wyの大きさのウインドウを示す図である。
FIG. 4 shows wx for an evaluation value image having a size of xs × ys
It is a figure which shows the window of the size of xwy.

【図5】一部に欠陥(網掛け部分)がある入力画像を示
す図、及びその入力濃度勾配方向を示す図である。
FIG. 5 is a diagram illustrating an input image partially having a defect (shaded portion), and a diagram illustrating an input density gradient direction thereof.

【図6】モデル濃度勾配方向を示す図、及び入力濃度勾
配方向とモデル濃度勾配方向との差を示す図である。
FIG. 6 is a diagram illustrating a model density gradient direction and a diagram illustrating a difference between an input density gradient direction and a model density gradient direction.

【図7】請求項9に従った評価関数fを用いた評価値画
像を示す図、及び請求項10に従った評価関数fを用い
た評価値画像を示す図である。
7 is a diagram showing an evaluation value image using an evaluation function f according to claim 9, and a diagram showing an evaluation value image using an evaluation function f according to claim 10. FIG.

【図8】請求項11に従った評価関数fを用いた評価値
画像を示す図、及び請求項12に従った評価関数fを用
いた評価値画像を示す図である。
8 is a diagram showing an evaluation value image using an evaluation function f according to claim 11, and a diagram showing an evaluation value image using an evaluation function f according to claim 12. FIG.

【図9】図7の(e),(f)及び図8の(g)の各評
価値画像上で4×4のウインドウを走査した場合の欠陥
度を示す図である。
9 is a diagram showing the degree of defect when a 4 × 4 window is scanned on each of the evaluation value images of (e), (f) and (g) of FIG. 7;

【図10】図8の(h)の評価値画像上で4×4のウイ
ンドウを走査した場合の欠陥度を示す図である。
FIG. 10 is a diagram showing the degree of defect when a 4 × 4 window is scanned on the evaluation value image of FIG. 8 (h).

【図11】入力画像上での欠陥が検出されたウインドウ
位置(網掛け位置)を示す図である。
FIG. 11 is a diagram showing a window position (shaded position) where a defect on the input image is detected.

【図12】別実施形態に係る欠陥検査装置の構成を示す
ブロック図である。
FIG. 12 is a block diagram illustrating a configuration of a defect inspection apparatus according to another embodiment.

【図13】缶(被検査対象物)の中心から放射状に明る
さが変化するような照明を示す図、及び入力画像中より
缶底面のエッジ上の3点を示す図である。
FIG. 13 is a diagram showing illumination such that brightness changes radially from the center of a can (object to be inspected), and a diagram showing three points on the edge of the bottom of the can from an input image.

【図14】モデル濃度勾配方向において全ての画素が中
心から放射状外向きに方向が広がっていることを示す
図、及び缶の底面エッジ部(点線部)において放射状内
向きに方向が発生することを示す図である。
FIG. 14 is a diagram showing that all pixels are radially outwardly extending from the center in the model density gradient direction, and that radially inwardly occurs at the bottom edge (dotted line) of the bottom of the can. FIG.

【図15】一部に欠陥(濃度値30の網掛け部分)があ
る入力画像を示す図、及びその入力濃度勾配方向を示す
図である。
FIG. 15 is a diagram illustrating an input image partially having a defect (shaded portion with a density value of 30) and a diagram illustrating the input density gradient direction.

【図16】モデル濃度勾配方向を示す図、及び入力濃度
勾配方向とモデル濃度勾配方向との差を示す図である。
FIG. 16 is a diagram illustrating a model density gradient direction and a diagram illustrating a difference between an input density gradient direction and a model density gradient direction.

【図17】請求項10に従った評価関数fを用いた評価
値画像を示す図、及び請求項12に従った評価関数fを
用いた評価値画像を示す図である。
FIG. 17 is a diagram showing an evaluation value image using an evaluation function f according to claim 10; and FIG. 17 is a diagram showing an evaluation value image using an evaluation function f according to claim 12.

【図18】図17の(e),(f)の各評価値画像上で
4×4のウインドウを走査した場合の欠陥度を示す図で
ある。
FIG. 18 is a diagram showing the degree of defect when a 4.times.4 window is scanned on each of the evaluation value images shown in FIGS. 17 (e) and 17 (f).

【図19】入力画像上での欠陥が検出されたウインドウ
位置(網掛け位置)を示す図である。
FIG. 19 is a diagram showing a window position (shaded position) where a defect on the input image is detected.

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

1 画像入力部 2 方向算出部 3,7 良品方向算出部 4 方向差評価部 5 欠陥検出部 6 基準位置算出部 DESCRIPTION OF SYMBOLS 1 Image input part 2 Direction calculation part 3, 7 Non-defective direction calculation part 4 Direction difference evaluation part 5 Defect detection part 6 Reference position calculation part

Claims (12)

【特許請求の範囲】[Claims] 【請求項1】被検査対象物に特定パターンの照明を当て
る照明手段と、 照明された被検査対象物を撮像する画像入力手段と、 入力画像の明るさの変化する方向を求める方向算出手段
と、 良品の明るさの変化する方向を求める良品方向算出手段
と、 方向算出手段と良品方向算出手段より得られる方向デー
タの差値を画素毎に評価し、方向差評価画像を求める方
向差評価手段と、 方向差評価画像に基づき、欠陥の度合いと位置を検出す
る欠陥検出手段とを備えることを特徴とする欠陥検査装
置。
An illumination unit configured to illuminate the inspection object with a specific pattern; an image input unit configured to capture an image of the illuminated inspection object; and a direction calculation unit configured to determine a direction in which the brightness of the input image changes. A non-defective direction calculating means for determining a direction in which the brightness of the non-defective product changes; a direction difference evaluating means for evaluating a difference value of direction data obtained by the direction calculating means and the non-defective direction calculating means for each pixel to obtain a direction difference evaluation image And a defect detecting means for detecting the degree and position of a defect based on the direction difference evaluation image.
【請求項2】前記特定のパターンの照明は、画像中にシ
ェーディングを生じさせる照明であることを特徴とする
請求項1記載の欠陥検査装置。
2. The defect inspection apparatus according to claim 1, wherein the illumination of the specific pattern is illumination that causes shading in an image.
【請求項3】前記被検査対象物は、同一濃度値を持つ対
象物であることを特徴とする請求項1又は請求項2記載
の欠陥検査装置。
3. The defect inspection apparatus according to claim 1, wherein the inspected objects are objects having the same density value.
【請求項4】前記被検査対象物は、同一濃度値を持つシ
ート状物であることを特徴とする請求項1、請求項2又
は請求項3記載の欠陥検査装置。
4. The defect inspection apparatus according to claim 1, wherein the inspection object is a sheet having the same density value.
【請求項5】被検査対象物に特定パターンの照明を当て
る照明手段と、 照明された被検査対象物を撮像する画像入力手段と、 入力画像より或る特定の基準位置を算出する基準位置算
出手段と、 基準位置からの相対位置より良品の明るさの変化する方
向を求める良品方向算出手段と、 方向算出手段と良品方向算出手段より得られる方向デー
タの差値を画素毎に評価し、方向差評価画像を求める方
向差評価手段と、 方向差評価画像に基づき、欠陥の度合いと位置を検出す
る欠陥検出手段とを備えることを特徴とする欠陥検査装
置。
5. An illuminating means for illuminating an object to be inspected with a specific pattern, an image input means for capturing an image of the illuminated object to be inspected, and a reference position calculation for calculating a specific reference position from an input image. Means, a non-defective direction calculating means for determining a direction in which the brightness of the non-defective product changes from a relative position from the reference position, and a difference value of direction data obtained by the direction calculating means and the non-defective direction calculating means is evaluated for each pixel, and the direction is evaluated. A defect inspection apparatus comprising: a direction difference evaluation unit that obtains a difference evaluation image; and a defect detection unit that detects a degree and a position of a defect based on the direction difference evaluation image.
【請求項6】前記特定のパターンの照明は、基準位置よ
り放射状に明るさが変化する照明であることを特徴とす
る請求項5記載の欠陥検査装置。
6. The defect inspection apparatus according to claim 5, wherein the illumination of the specific pattern is illumination whose brightness changes radially from a reference position.
【請求項7】前記照明手段は、基準位置から放射状に明
るさが変化する照明であり、前記基準位置は、同心円の
中心であり、前記被検査対象物は、同心円上に一様の濃
度値を持つ対象物であることを特徴とする請求項5又は
請求項6記載の欠陥検査装置。
7. The illumination means is illumination whose brightness changes radially from a reference position, wherein the reference position is a center of a concentric circle, and the object to be inspected has a uniform density value on the concentric circle. The defect inspection apparatus according to claim 5, wherein the defect inspection apparatus is an object having:
【請求項8】前記被検査対象物は、缶であることを特徴
とする請求項5、請求項6又は請求項7記載の欠陥検査
装置。
8. The defect inspection apparatus according to claim 5, wherein the object to be inspected is a can.
【請求項9】前記方向差評価手段は、方向データの差値
をωとした場合、−(90+360n)°≦ω≦(90
+360n)°の範囲(nは整数)では(1−cos
ω)とし、それ以外の範囲では1とし、方向が不定の場
合には0とすることを特徴とする請求項1、請求項2、
請求項3、請求項4、請求項5、請求項6、請求項7又
は請求項8記載の欠陥検査装置。
9. The directional difference evaluating means, where ω is the difference value of the directional data, is-(90 + 360n) ° ≦ ω ≦ (90
+ 360n) ° (n is an integer) in the range (1-cos
.omega.), 1 in other ranges, and 0 when the direction is undetermined.
The defect inspection apparatus according to claim 3, 4, 5, 5, 6, 7, or 8.
【請求項10】前記方向差評価手段は、方向データの差
値をωとした場合、−(45+180n)°≦ω≦(4
5+180n)°の範囲(nは整数)では(1−cos
2ω)とし、それ以外の範囲では1とし、方向が不定の
場合には0とすることを特徴とする請求項1、請求項
2、請求項3、請求項4、請求項5、請求項6、請求項
7又は請求項8記載の欠陥検査装置。
10. The direction difference evaluation means, wherein the difference value of the direction data is ω, where-(45 + 180n) ° ≦ ω ≦ (4
(1 + cos) in the range (5 + 180n) ° (n is an integer).
2ω), 1 in other ranges, and 0 when the direction is undefined. The defect inspection apparatus according to claim 7 or claim 8.
【請求項11】前記方向差評価手段は、方向データの差
値をωとした場合、−(x+360n)°≦ω≦(x+
360n)°の範囲(nは整数、xは定数)では0と
し、それ以外の範囲では1とし、方向が不定の場合には
0とすることを特徴とする請求項1、請求項2、請求項
3、請求項4、請求項5、請求項6、請求項7又は請求
項8記載の欠陥検査装置。
11. The directional difference evaluation means, wherein the difference value of the directional data is ω, where-(x + 360n) ° ≦ ω ≦ (x +
360n) In a range (n is an integer and x is a constant) of 0, it is set to 0, to 1 in other ranges, and to 0 when the direction is indeterminate. 9. The defect inspection apparatus according to claim 3, 4, 5, 5, 6, 7, or 8.
【請求項12】前記方向差評価手段は、方向データの差
値をωとした場合、−(x+180n)°≦ω≦(x+
180n)°の範囲(nは整数、xは定数)では0と
し、それ以外の範囲では1とし、方向が不定の場合には
0とすることを特徴とする請求項1、請求項2、請求項
3、請求項4、請求項5、請求項6、請求項7又は請求
項8記載の欠陥検査装置。
12. The directional difference evaluation means, wherein the difference value of the directional data is ω, where-(x + 180n) ° ≦ ω ≦ (x +
180n) In the range of (°, n is an integer and x is a constant), it is set to 0, set to 1 in other ranges, and set to 0 when the direction is undefined. 9. The defect inspection apparatus according to claim 3, 4, 5, 5, 6, 7, or 8.
JP32927796A 1996-12-10 1996-12-10 Defect-inspecting apparatus Pending JPH10170451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP32927796A JPH10170451A (en) 1996-12-10 1996-12-10 Defect-inspecting apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP32927796A JPH10170451A (en) 1996-12-10 1996-12-10 Defect-inspecting apparatus

Publications (1)

Publication Number Publication Date
JPH10170451A true JPH10170451A (en) 1998-06-26

Family

ID=18219660

Family Applications (1)

Application Number Title Priority Date Filing Date
JP32927796A Pending JPH10170451A (en) 1996-12-10 1996-12-10 Defect-inspecting apparatus

Country Status (1)

Country Link
JP (1) JPH10170451A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020017052A (en) * 2000-08-28 2002-03-07 김수찬 Defect inspection method using automatized defect inspection system
JP2011117745A (en) * 2009-12-01 2011-06-16 Ckd Corp Tablet inspection apparatus and ptp packaging machine
JP2012021929A (en) * 2010-07-16 2012-02-02 Central Res Inst Of Electric Power Ind Abnormality detection method, abnormality detection apparatus and abnormality detection program for electric wire

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20020017052A (en) * 2000-08-28 2002-03-07 김수찬 Defect inspection method using automatized defect inspection system
JP2011117745A (en) * 2009-12-01 2011-06-16 Ckd Corp Tablet inspection apparatus and ptp packaging machine
JP2012021929A (en) * 2010-07-16 2012-02-02 Central Res Inst Of Electric Power Ind Abnormality detection method, abnormality detection apparatus and abnormality detection program for electric wire

Similar Documents

Publication Publication Date Title
JP3706051B2 (en) Pattern inspection apparatus and method
JP4633245B2 (en) Surface inspection apparatus and surface inspection method
JP2007155405A (en) Visual inspection method and visual inspection device
JP3688520B2 (en) Surface inspection apparatus and surface inspection method
JPH10170451A (en) Defect-inspecting apparatus
JP3508518B2 (en) Appearance inspection method
JP2000036033A (en) Brightness/darkness inspecting device/method
JP2004361085A (en) Visual examination device
JP2758823B2 (en) Weld appearance inspection method
JP2007081513A (en) Blot defect detecting method for solid-state imaging element
CN115375610A (en) Detection method and device, detection equipment and storage medium
JPH0718811B2 (en) Defect inspection method
JPH1038543A (en) Shape inspection method
JP2003329428A (en) Device and method for surface inspection
JP2686053B2 (en) Defect inspection method by visual inspection
JP2710685B2 (en) Defect detection method by visual inspection
JPH06160289A (en) Inner face inspection equipment for circular vessel
JP2000321038A (en) Method for detecting fault of pattern
JPH10208066A (en) Method for extracting edge line of check object and appearance check method using this method
JP2638121B2 (en) Surface defect inspection equipment
JP2001004330A (en) Image processor and its method
JPH0772909B2 (en) Welding condition judgment method by visual inspection
JP2803388B2 (en) Parts inspection equipment
JP3043530B2 (en) Dot pattern inspection equipment
JP2011153874A (en) Apparatus, system and method for visual inspection