JPH03218447A - Picture data converting method - Google Patents

Picture data converting method

Info

Publication number
JPH03218447A
JPH03218447A JP1419490A JP1419490A JPH03218447A JP H03218447 A JPH03218447 A JP H03218447A JP 1419490 A JP1419490 A JP 1419490A JP 1419490 A JP1419490 A JP 1419490A JP H03218447 A JPH03218447 A JP H03218447A
Authority
JP
Japan
Prior art keywords
image data
degree
data
linear
original image
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
JP1419490A
Other languages
Japanese (ja)
Inventor
Kazuo Fujimori
藤森 一雄
Takahiro Fukui
福井 貴弘
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP1419490A priority Critical patent/JPH03218447A/en
Publication of JPH03218447A publication Critical patent/JPH03218447A/en
Pending legal-status Critical Current

Links

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

PURPOSE:To obtain picture data emphasizing a linear fault part by comparing luminance distribution pattern data in a direction to cross the reference linear fault part with source picture data, calculating the degree of coincidence and defining it as new picture data. CONSTITUTION:The source picture data obtained by picking the image of a work W surface are extracted by a cross filter 21 and the degree of coincident with the pattern data is calculated. Based on this degree of coincidence, the picture data are calculated. Since these pattern data are prepared from the luminance data obtained by picking up the image of the linear reference fault part, when the linear fault such as cruck, etc., is generated on the surface of the work W, the part is brightly projected and displayed on a CRT 13 while emphasizing the linear fault part. From the shape of the cross filter 21, the fault part is emphasized and displayed even when it is formed in any direction such as longitudinal, lateral and oblique directions. Therefore, by such a picture data converter, the linear fault part on the work surface is easily inspected.

Description

【発明の詳細な説明】 艮服の旦豹 [産業上の利用分野] 本発明は画像データ変換方法に関し、詳しくはワークの
表面に形成された線状の欠陥部を強調した画像データを
作成する画像データ変換方法に関する。
[Detailed Description of the Invention] A Dangerous Leopard in a Costume [Industrial Application Field] The present invention relates to an image data conversion method, and more specifically, to create image data that emphasizes linear defects formed on the surface of a workpiece. This invention relates to an image data conversion method.

[従来の技術] 従来、ワーク表面に形成された欠陥部の検査を、テレビ
カメラにより撮像して得られたワーク表面の画像データ
に基づいて行なう方法がある。このような画像データに
基づいて検査を行なう方法は、例えば、特開昭60−1
14750号公報に開示されている。画像データは、ワ
ーク表面からの反射光の強度差、即ち、輝度によるもの
であることから、欠陥部が的確に捉えられない場合があ
り、画像の鮮鋭化が求められる。この鮮鋭化1友通常、
微分,′ラプラシアン等による処理にて行なわれている
[Prior Art] Conventionally, there is a method of inspecting defective portions formed on the surface of a workpiece based on image data of the surface of the workpiece obtained by imaging with a television camera. A method of conducting an inspection based on such image data is described, for example, in Japanese Patent Application Laid-Open No. 60-1
It is disclosed in Japanese Patent No. 14750. Since the image data is based on the difference in intensity of light reflected from the surface of the workpiece, that is, the brightness, there are cases where defective parts cannot be accurately captured, and therefore, sharpening of the image is required. This sharpening usually involves
This is done using processes such as differentiation and Laplacian.

[発明が解決しようとする課題] しかしながら、このような微分処理等を行なうと、以下
のような問題が生じていた。
[Problems to be Solved by the Invention] However, when such differential processing and the like are performed, the following problems occur.

例えば、第12図に示すように、ある太さを有する線状
の欠陥部aを撮像し微分処理を行なうと輝度の変化率の
高い部位となる欠陥部aのエッジ法 2本の線分bとし
て画像が形成される。そのため、この線分bから1つの
欠陥部として形状を正しく認識するために、線分bで囲
まれた内部の塗りつぶし、線分bの膨張処理による分離
した線分bの一体化などの種々の処理が必要とされてい
j4 更に、これらの処理を実施すると、第13図に示
すように、線状の欠陥部以外の画像も残ってしまう。同
図(ア)は内部の塗りつぶし後の画像であり、同図(イ
)は複数の点状の像が膨張処理により結合されている画
像である。従って、ワークに生じたクラック等の線状の
欠陥部だけを検出しようとすると、線状以外の欠陥部と
区別するために、更に、細線化処理 縮退処理等の複雑
な処理が必要とさね処理時間が長くなると共に、設備も
大がかりなものになってしまう。また、検査精度も余り
よいものではなく、実際の製造ラインでの製品検査に(
,1,適したものではなかった本発明の画像データ変換
方法は上記課題を解決し、ワーク表面に生じた線状の欠
陥部を的確に検出できる画像データを作成することを目
的とする。
For example, as shown in FIG. 12, when a linear defect a with a certain thickness is imaged and differential processing is performed, the edge method of the defect a has a high rate of change in brightness.Two line segments b An image is formed as follows. Therefore, in order to correctly recognize the shape from this line segment b as a single defect, various methods such as filling in the interior surrounded by line segment b and integrating separated line segments b by expanding line segment b are performed. Furthermore, if these processes are performed, images other than linear defects will remain as shown in FIG. 13. The figure (A) is an image after the interior has been filled in, and the figure (B) is an image in which a plurality of point-like images are combined by dilation processing. Therefore, if you try to detect only linear defects such as cracks that occur in a workpiece, you will need to perform further complicated processing such as thinning processing and shrinkage processing in order to distinguish them from non-linear defects. The processing time becomes long and the equipment becomes large-scale. In addition, the inspection accuracy is not very good, and it is difficult to inspect products on the actual production line (
, 1. The purpose of the image data conversion method of the present invention, which was not suitable, is to solve the above-mentioned problems and to create image data that can accurately detect linear defects occurring on the surface of a workpiece.

及唄Ω構戒 かかる目的を達成する本発明の構成について以下説明す
る。
The structure of the present invention that achieves the above object will be described below.

[課題を解決するための手段1 本発明の画像データ変換方法は、第1図に例示するよう
1二 ワークの原画像データを、線状の欠陥部を強調した画像
データに変換する方法であって、線状に設定された第1
領域と、該第1領域に略直交し線状に設定された第2領
域とで上記原画像データを走査しつつ、該両領域に対応
する原画像データを抽出し(P1)、 基準の線状欠陥部を横断する方向の輝度分布パターンデ
ータと、上記抽出された第1領域および第2領域におけ
る原画像データとを比較して各々の一致度を算出し(P
2)、 上記算比された第1領域および第2領域の一致度に基づ
いて走査位置毎に輝度データを作成し(P3)、新たな
る画像データとすること乞要旨とする。
[Means for Solving the Problems 1] The image data conversion method of the present invention is a method of converting original image data of 12 workpieces into image data in which linear defects are emphasized, as illustrated in FIG. The first line is set linearly.
While scanning the original image data with a region and a second region set in a linear shape substantially perpendicular to the first region, original image data corresponding to both regions is extracted (P1), and a reference line is obtained. The brightness distribution pattern data in the direction across the defective portion is compared with the original image data in the first and second regions extracted above, and the degree of coincidence is calculated for each (P
2) Based on the degree of coincidence between the first area and the second area calculated above, brightness data is created for each scanning position (P3), and the data is created as new image data.

[作用] 上記構成を有する本発明の画像データ変換方法は、線状
に設定された第1領域とこれに略直行し線状に設定され
た第2領域とでワークの原画像データを走査しつつ、そ
の両領域に対応する原画像データを抽出し(P])、抽
出された両領域における原画像データとパターンデータ
とを比較し各々の一致度を算出する(P2)。このパタ
ーンデータ{表基準の線状欠陥部を横断する方向の輝度
分布であり、このパターンデータと第1および第2領域
から抽出された原画像データとの一致度が高ければ、基
準の線状欠陥部と類似した欠陥部の存在が分かる。従っ
て、第1,第2領域における一致度に基づいて走査位置
毎に輝度データを作成し、この輝度データを新たな画像
データとする(P3)と,ワーク表面の線状の欠陥部が
強調された画像データが得られる。
[Operation] The image data conversion method of the present invention having the above configuration scans the original image data of the workpiece with a first area set linearly and a second area substantially perpendicular thereto and set linearly. At the same time, the original image data corresponding to both regions are extracted (P]), and the original image data and pattern data in both extracted regions are compared to calculate the degree of matching for each (P2). This pattern data {is the brightness distribution in the direction that crosses the linear defect part based on the table standard, and if the degree of coincidence between this pattern data and the original image data extracted from the first and second areas is high, the standard linear defect The existence of a defective part similar to the defective part can be seen. Therefore, if brightness data is created for each scanning position based on the degree of coincidence in the first and second areas, and this brightness data is used as new image data (P3), linear defects on the workpiece surface will be emphasized. image data can be obtained.

[実施例] 以上説明した本発明の構成・作用を一層明らかにするた
めに、以下本発明の画像データ変換方法の好適な実施例
について説明する。
[Example] In order to further clarify the configuration and operation of the present invention described above, preferred embodiments of the image data conversion method of the present invention will be described below.

第2図は、その実施例方法がなされる画像データ変換装
置の概略構成図である。本画像データ変換装置は、コン
ベアCに載置され検査対象となるワークWを撮像するテ
レビカメラ1と、テレビカメラ1の出力する映像信号を
デジタル信号に変換するA/Dコンバータ3と、画像デ
ータを記憶するビデオRAM5と、算術論理演算回路と
して構成される周知のCPU7,ROM9,RAMII
と、表示手段としてのCRT13と、画像データをCR
T1 3に出力するCRTC15と、外部機器と情報の
授受包行なう外部機器インタフェース17とから構成さ
れる。尚、A/Dコンバータ3,ビデオRAM5,CP
IJ7,ROM9,RAMI1,CRTC15, 外部
インタフェース17はバス19により相互に接続されて
いる。
FIG. 2 is a schematic configuration diagram of an image data conversion apparatus in which the method of the embodiment is carried out. This image data conversion device includes a television camera 1 that images a workpiece W placed on a conveyor C to be inspected, an A/D converter 3 that converts a video signal output from the television camera 1 into a digital signal, and an image data a video RAM 5 storing
, a CRT 13 as a display means, and a CR for image data.
It is composed of a CRTC 15 that outputs to T13, and an external device interface 17 that exchanges information with external devices. In addition, A/D converter 3, video RAM 5, CP
IJ7, ROM9, RAMI1, CRTC15, and external interface 17 are interconnected by bus 19.

次に、画像データ変換装置が実行する画像データ変換処
理について説明する。第3図(戯画像デ一夕変換ルーチ
ンを示すフローチャートであり、このルーチンは、ワー
クWがコンベアCにより所定位置に搬送されてから起動
する。
Next, the image data conversion process executed by the image data conversion device will be described. FIG. 3 is a flowchart showing a graphic image data conversion routine, and this routine is started after the workpiece W is conveyed to a predetermined position by the conveyor C.

まず、テレビカメラ1が出力する画像データをA/Dコ
ンバータ3を介してビデオRAM5に取り込む(ステッ
プ]00)。従って、このビデオRAM5の所定領域に
は、ワークWの原画像(例えば、画素数640X400
)に対応した画像データ(以下、この画像データが変換
前であることから原画像データと呼ぶ)が格納される。
First, image data output from the television camera 1 is loaded into the video RAM 5 via the A/D converter 3 (step 00). Therefore, the original image of the workpiece W (for example, 640×400 pixels) is stored in a predetermined area of the video RAM 5.
) (hereinafter referred to as original image data since this image data is before conversion) is stored.

次1こ、ワークWの原画像から、第4図に示すように十
字型に領域が設定された十字フィルタ21内に対応する
位置の原画像データを抽出する(ステップ110)。
Next, from the original image of the work W, as shown in FIG. 4, original image data at a position corresponding to the cross filter 21 having a cross-shaped area set is extracted (step 110).

この十字フィルタ21は、縦・横各々9つの画素(交差
する中心の画素は共通)におけるデータを抽出できるよ
うに領域が設定されたものである。
This cross filter 21 has a region set so that it can extract data at nine pixels each in the vertical and horizontal directions (the pixel at the center of intersection is common).

ステップ110の処理は、この十字フィルタ21内にお
ける原画像データ(輝度データ)を、第5図に示すよう
に画面A左上の位置から抽出する処理である。第6図は
、この処理により抽出された原画像データD1を示す。
The process of step 110 is a process of extracting the original image data (luminance data) in the cross filter 21 from the upper left position of the screen A as shown in FIG. FIG. 6 shows the original image data D1 extracted by this process.

十字フィルタ21の交差部23におけるデータは、Xm
,nであり、交差部23の上方におけるデータは順に、
X m, n−1,  Xm, n−2,  X m,
 n−3,  X m, n−4であり、交差部の下方
におけるデータは順に、X m, n+1,  X m
, n+2,  X m, n+3, Xm,n+4で
ある。同様に、横方向におけるデータは左から順に、X
m−4,n,  Xm−3,n,  Xm−2,n, 
 Xm−1,n,  Xm,n (交差部23のデータ
) F  Xm+1,n,Xm+2,n,  Xm+3
,n,  Xm+4,nである。
The data at the intersection 23 of the cross filter 21 is
, n, and the data above the intersection 23 are in order:
X m, n-1, Xm, n-2, X m,
n-3, X m, n-4, and the data below the intersection are, in order, X m, n+1, X m
, n+2, X m, n+3, Xm, n+4. Similarly, data in the horizontal direction is from left to
m-4,n, Xm-3,n, Xm-2,n,
Xm-1, n, Xm, n (data of intersection 23) F Xm+1, n, Xm+2, n, Xm+3
, n, Xm+4, n.

ステップ110の処理が終了すると、抽出された原画像
データD1とパターンデータDo(後述する第8図に示
す)との一致度を算出する(ステップ120)。ここで
、まずパターンデータDoについての説明をする。
When the process of step 110 is completed, the degree of coincidence between the extracted original image data D1 and pattern data Do (shown in FIG. 8, which will be described later) is calculated (step 120). First, the pattern data Do will be explained.

パターンデータDOは、予め基準としての所定の線状の
欠陥部(以下、基準欠陥部と呼ぶ)を撮像し、その基準
欠陥部を垂直に横断する方向に捉えた輝度分布から作成
される。基準欠陥部乞垂直に横断する方向に走査して得
られた各サンプリング点での信号レベル(輝度を表す)
を第7図に示す。尚、サンプリング点は、撮像画面の一
画素に対応する。パターンデータDOは、このサンプリ
ングした9つの輝度データを、十字フィルタ21の縦お
よび横に各々位置付けて、第8図に示すように作成され
る。輝度データが最大値をとるサンプリング点の輝度デ
ータを十字フィルタ21の交差部23におけるデータと
し、隣合うサンプリング点の輝度データを上下左右に順
次位置づけて作成する。こうしで作成されたパターンデ
ータE左から横方向にY−4.0,  Y−3.0, 
 Y−2.0,  Y−1.0,Y0,0,  YO,
l,  Y0,2,  Y0,3,  Y0,4の輝度
データを有し、同様に縦方向には上からY0,4,  
Y0,3,Y0,2,  Y0,1,  YO,O, 
 YO,−1,  YO,−2,  YO,−3,YO
,−4の輝度データを有する。尚、本実施例では、パタ
ーンデータDOを構成する各輝度データは横方向と縦方
向とを同一の値としたが、基準欠陥部の撮像位置を90
度ずらした位置においても同様のサンプリングを行ない
、縦方向と横方向との輝度データを別々に求めて作成し
たものでもよく、二の場合には、一層正確なパターンデ
ータDOとなる。
The pattern data DO is created by capturing an image of a predetermined linear defect as a reference (hereinafter referred to as a reference defect) in advance and from a luminance distribution captured in a direction perpendicularly crossing the reference defect. Signal level (indicating brightness) at each sampling point obtained by scanning in a direction perpendicular to the reference defect area
is shown in Figure 7. Note that the sampling point corresponds to one pixel on the imaging screen. The pattern data DO is created by positioning the nine sampled luminance data vertically and horizontally of the cross filter 21, as shown in FIG. The brightness data of the sampling point where the brightness data takes the maximum value is taken as the data at the intersection 23 of the cross filter 21, and the brightness data of adjacent sampling points are sequentially positioned vertically and horizontally to create the data. Pattern data E created in this way: Y-4.0, Y-3.0, horizontally from the left
Y-2.0, Y-1.0, Y0,0, YO,
1, Y0,2, Y0,3, Y0,4, and similarly in the vertical direction from the top Y0,4,
Y0,3, Y0,2, Y0,1, YO,O,
YO, -1, YO, -2, YO, -3, YO
, -4. In this example, each luminance data constituting the pattern data DO has the same value in the horizontal and vertical directions, but the imaging position of the reference defect portion is set to 90.
Similar sampling may be performed at a position shifted by degrees, and luminance data in the vertical direction and horizontal direction may be obtained separately, and in the second case, the pattern data DO will be more accurate.

次に、抽出された原画像データD1とパターンデータD
Oとの一致度の算出について説明する。
Next, the extracted original image data D1 and pattern data D
Calculation of the degree of coincidence with O will be explained.

原画像データD1とパターンデータDOとの横方向の一
致度をgl  (m,  n)とすると、となり、原画
像データとパターンデータとの縦方向の一致度をg2 
(m,  n)とすると、となる。即ち、抽出した十字
フィルタ2]内の原画像データD1とパターンデータD
Oとを座標位置に対応させて乗算した合計値を、パター
ンデタDOの各座標位置におけるデータの2乗の合計値
で除した値を一致度としており、この一致度gl  (
m,  n)あるいはg2(m,n)の値が1に近い場
合(上一致度が高く、値]から遠ざかるほど一致度は低
いものとなる。
If the degree of coincidence in the horizontal direction between the original image data D1 and the pattern data DO is gl (m, n), then the degree of coincidence in the vertical direction between the original image data and the pattern data is g2
If (m, n), then That is, the original image data D1 and pattern data D in the extracted cross filter 2]
The degree of coincidence is calculated by dividing the total value obtained by multiplying O by the coordinate position corresponding to the coordinate position by the total value of the squares of the data at each coordinate position of the pattern data DO, and this degree of coincidence gl (
When the value of g2(m, n) or g2(m, n) is close to 1 (upper matching is high, value]), the matching becomes lower as it moves away from the value.

ステップ120の処理が終了すると、算出された一致度
gl  (m,  n),  g2 (m,  n)か
ら、輝度データを算出する処理を行なう(ステップ]3
0)。この処理は、一致度が値1に近いものほど輝度の
大きな(明るしり輝度データに変換する処理であり、以
下のようになされる。尚、以下の説明では、算出された
一致度gl  (m,  n),  g2 (m,  
n)を単に一致度×として説明する。
When the process of step 120 is completed, luminance data is calculated from the calculated degrees of coincidence gl (m, n), g2 (m, n) (step) 3
0). This process is a process in which the closer the matching degree is to the value 1, the larger the luminance (brightness luminance data), and is performed as follows.In the following explanation, the calculated matching degree gl (m , n), g2 (m,
n) will be explained simply as the degree of coincidence x.

この変換は、例えば、ビデオRAM5の1画素当りの輝
度分解能が8ビット、即ち、256階調であるとして、
第9図に示すような、一次関数の変換テーブルT1を用
いて行なう。輝度Gの値沫一致度Xが値1以下の場合に
は、 G=255x として算出し、一致度×が値1を超える場合には、 G=−2 5 5 x+5 1 0 として算出する。また、一致度Xが値2を超える場合に
はG=Oとする。尚、輝度Gは、ステップ120におい
て、算出された縦・横2つの一致度×に対して各々算出
される。そして、大きな値をとる側の輝度Gを、十字フ
ィルタ21の交差部23の座標位置の1画素分の画像デ
ータG(m,n)とする。
This conversion is performed, for example, assuming that the luminance resolution per pixel of the video RAM 5 is 8 bits, that is, 256 gradations.
This is performed using a linear function conversion table T1 as shown in FIG. When the degree of coincidence X of the brightness G is less than or equal to the value 1, it is calculated as G=255x, and when the degree of coincidence X exceeds the value 1, it is calculated as G=-255x+510. Furthermore, when the degree of coincidence X exceeds the value 2, G=O. Note that the brightness G is calculated in step 120 for each of the calculated vertical and horizontal matching degrees x. Then, the brightness G on the side having a larger value is set as image data G(m,n) for one pixel at the coordinate position of the intersection 23 of the cross filter 21.

また、本実施例で(友一次関数の変換テーブルT1を採
用したが、第10図に示すような、常用対数関数を用い
た変換テーブルT2を採用してもよい。この場合、輝度
Gの値は、一致度×が値1以下の場合には、 G=255 l og (10x) として算出し、一致度Xが値1を超える場合には、 G=−255log (10x)+512として算出す
る(×〉2の場合はG=0)。
In addition, in this embodiment, the conversion table T1 using a linear function is adopted, but a conversion table T2 using a common logarithmic function as shown in FIG. 10 may also be adopted. is calculated as G = 255 log (10x) when the degree of coincidence x is less than or equal to the value 1, and is calculated as G = -255 log (10x) + 512 when the degree of coincidence X exceeds the value 1 ( If ×〉2, G=0).

ステップ130の処理が終了すると、求められた画像デ
ータG (m,  n)を、ビデオRAM5に書き込む
処理を行なう(ステップ140)。尚、この画像データ
G(m,n)は、ステップ100にて原画像データが書
き込まれたビデオRAM5の記憶領域とは別に設けられ
た記憶領域に書き込まれる。続いて、ワークW表面が撮
像された1画面分の画像データG (m,  n)の書
き込みが終了したか否かを判断する(ステップ150)
。 「NO」と判断した場合には、十字フィルタ21を
1画素分走査させてステップ120の処理に戻る(ステ
ップ160)。即ち、ワークW表面が撮像された1画面
分の画像データG (m,  n)の書き込みが終了す
るまで、十字フィルタ21を走査することにより原画像
データD1の抽出位置を変更して、ステップ]]0〜1
40の処理を繰り返すのである。
When the process of step 130 is completed, the obtained image data G (m, n) is written into the video RAM 5 (step 140). Note that this image data G(m,n) is written in a storage area provided separately from the storage area of the video RAM 5 into which the original image data was written in step 100. Next, it is determined whether writing of one screen worth of image data G (m, n) in which the surface of the workpiece W is imaged has been completed (step 150).
. If the determination is "NO", the cross filter 21 is scanned by one pixel and the process returns to step 120 (step 160). That is, the extraction position of the original image data D1 is changed by scanning the cross filter 21 until the writing of one screen worth of image data G (m, n) in which the surface of the workpiece W is imaged is completed, and then step] ]0~1
40 processes are repeated.

ステップ150の判断がrYESJとなると、ビデオR
AM5に記憶された一画面分の画像データG (m, 
 n)をCRTC15を介してCRT 13に出力しく
ステップ170)、本画像データ変換ルーチンを終了す
る。
If the determination in step 150 is rYESJ, the video R
One screen worth of image data G (m,
n) is output to the CRT 13 via the CRTC 15 (step 170), and the main image data conversion routine ends.

以上説明した画像データ変換装置(上 ワークW表面を
撮像して得られた原画像データを、十字フィルタ21に
より抽出してパターンデータDoとの一致度を算出し、
この一致度に基づいて画像デ一タG (m,  n)を
求めている。そして、このパターンデータDOは、線状
の基準欠陥部を撮像して得られた輝度データから作成し
たものであることから、ワークW表面にクラック等の線
状の欠陥が生じている場合は、その部位をCRT1 3
に明るく映し出し、線状の欠陥部を強調して表示する。
The image data conversion device described above (above) extracts the original image data obtained by imaging the surface of the work W using the cross filter 21 and calculates the degree of coincidence with the pattern data Do,
Image data G (m, n) is obtained based on this degree of matching. Since this pattern data DO is created from the brightness data obtained by imaging the linear reference defect, if a linear defect such as a crack occurs on the surface of the workpiece W, CRT1 3
The image is displayed brightly, highlighting linear defects.

また、十字フィルタ21の形状から、縦槙  斜めの何
れの方向に形成された線状欠陥部であっても、その欠陥
部は強調して表示される。従って、この画像データ変換
装置により、ワークW表面の線状欠陥部の検査を容易に
行なうことができる。
Furthermore, due to the shape of the cross filter 21, the defect is highlighted and displayed regardless of whether it is formed vertically or diagonally. Therefore, with this image data conversion device, linear defects on the surface of the workpiece W can be easily inspected.

また、ワークW表面に形成された線状でない凹凸部や付
着した汚れ等1表 欠陥部として認識されないことから
、目的とする線状欠陥部のみが強調さ托従来のような複
雑な画像処理を行なう必要がなL〜従って、製造ライン
における製品の検査に法大がかりな装置を必要とせず、
短時間にしかも精度良く行なうことができる。
In addition, since non-linear irregularities formed on the surface of the workpiece W and adhered dirt are not recognized as defects, only the targeted linear defects are highlighted. There is no need to carry out inspection of products on the production line.
It can be done in a short time and with high precision.

以上本発明の実施例について説明したが、本発明はこう
した実施例に何等限定されるものではなく、例えば、計
算速度を速くするために、一致度gl  (m,  n
),  g2 (m,  n)を以下のように算出して
もよい。
Although the embodiments of the present invention have been described above, the present invention is not limited to these embodiments in any way. For example, in order to increase the calculation speed, the matching degree gl (m, n
), g2 (m, n) may be calculated as follows.

4 この場合は、第11図に示すような変換テーブルT3を
用いればよい。また、十字フィルタ21の画素数を増減
することも可能であり(縦,横方向に各々9〜15が最
適である)、本発明の要旨を逸脱しない範囲において、
種々なる態様で実施し得ることは勿論である。
4 In this case, a conversion table T3 as shown in FIG. 11 may be used. It is also possible to increase or decrease the number of pixels of the cross filter 21 (optimally 9 to 15 in each of the vertical and horizontal directions), without departing from the gist of the present invention.
Of course, it can be implemented in various ways.

発明の効果 以上詳述したように、本発明の画像データ変換方法によ
れば、ワークの原画像データを、第1,第2領域とから
抽出してパターンデータとの一致度を算出し、この一致
度に基づいて画像データを求めている。そして、このパ
ターンデータ{上基準の線状欠陥部から作成したもので
あることから、ワーク表面にクラック等の線状の欠陥が
生じている場合は、その部位は輝度の差異により強調し
て表示されるという優れた効果を奏する。また、第1領
域と第2領域とは、略直交して設定されることから、紘
槙  斜めの何れの方向に形成された線状欠陥部であっ
ても、その欠陥部は強調して捉えられる。しかも、ワー
ク表面に形成された線状でない凹凸部や付着した汚れ等
1上 欠陥部として認識されないことから、目的とする
線状欠陥部のみが強調さ札従来のような複雑な画像処理
を行なう必要がない。
Effects of the Invention As detailed above, according to the image data conversion method of the present invention, the original image data of the workpiece is extracted from the first and second regions, and the degree of matching with the pattern data is calculated. Image data is obtained based on the degree of matching. Since this pattern data is created from the linear defect part of the above standard, if a linear defect such as a crack occurs on the workpiece surface, that part will be highlighted and displayed due to the difference in brightness. It has an excellent effect of being In addition, since the first region and the second region are set to be approximately perpendicular to each other, the linear defect formed in any diagonal direction can be emphasized and captured. It will be done. Moreover, since non-linear irregularities formed on the surface of the workpiece or adhered dirt are not recognized as defects, only the targeted linear defects are highlighted, and complicated image processing like conventional tags is performed. There's no need.

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

第1図は本発明の基本的構成を例示するフローチャート
、第2図は画像データ変換装置の概略構成図J第3図は
画像データ変換ルーチンを示すフローチャニト、第4図
は十字フィルタの構成図、第5図は十字フィルタの走査
を示す説明図、第6図は抽出された原画像データの構成
図、第7図は基準欠陥部を撮像して得られた輝度を表す
グラフ、第8図はパターンデータの構成図、第9.10
,11図は一致度を輝度に変換するテーブルを表すグラ
フ、第12.13図は従来からの処理による画像を示す
説明図である。 1・・・テレビカメラ  5・・・ビデオRAM7・・
・CPU      9・・・ROM11・・・RAM
     13・・・CRT2]・・・十字フィルタ D1・・・原画像データ D2・・・パターンデータT
l,  T2,  T3・・・変換テーブルW・・・ワ
ーク
FIG. 1 is a flowchart illustrating the basic configuration of the present invention, FIG. 2 is a schematic configuration diagram of an image data conversion device, FIG. 3 is a flow chart showing an image data conversion routine, and FIG. 4 is a configuration diagram of a cross filter. Fig. 5 is an explanatory diagram showing the scanning of the cross filter, Fig. 6 is a configuration diagram of the extracted original image data, Fig. 7 is a graph showing the brightness obtained by imaging the reference defect part, and Fig. 8 is Configuration diagram of pattern data, Section 9.10
, 11 are graphs showing a table for converting the degree of coincidence into brightness, and FIGS. 12 and 13 are explanatory diagrams showing images obtained by conventional processing. 1...TV camera 5...Video RAM7...
・CPU 9...ROM11...RAM
13...CRT2]...Cross filter D1...Original image data D2...Pattern data T
l, T2, T3... Conversion table W... Work

Claims (1)

【特許請求の範囲】 1 ワークの原画像データを、線状の欠陥部を強調した
画像データに変換する方法であつて、線状に設定された
第1領域と、該第1領域に略直交し線状に設定された第
2領域とで上記原画像データを走査しつつ、該両領域に
対応する原画像データを抽出し、 基準の線状欠陥部を横断する方向の輝度分布パターンデ
ータと、上記抽出された第1領域および第2領域におけ
る原画像データとを比較して各々の一致度を算出し、 上記算出された第1領域および第2領域の一致度に基づ
いて走査位置毎に輝度データを作成し、新たなる画像デ
ータとする画像データ変換方法。
[Claims] 1. A method for converting original image data of a workpiece into image data that emphasizes a linear defect, the method comprising: a first region set linearly; and a method substantially perpendicular to the first region; While scanning the original image data with the second area set in a linear manner, extracting the original image data corresponding to both areas, and extracting the original image data corresponding to the two areas, and generating the brightness distribution pattern data in the direction across the reference linear defect part. , compare the original image data in the first region and the second region extracted above to calculate the degree of matching, and calculate the degree of matching for each of the extracted first and second regions for each scanning position based on the degree of matching of the first region and the second region calculated above. An image data conversion method that creates brightness data and uses it as new image data.
JP1419490A 1990-01-23 1990-01-23 Picture data converting method Pending JPH03218447A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1419490A JPH03218447A (en) 1990-01-23 1990-01-23 Picture data converting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1419490A JPH03218447A (en) 1990-01-23 1990-01-23 Picture data converting method

Publications (1)

Publication Number Publication Date
JPH03218447A true JPH03218447A (en) 1991-09-26

Family

ID=11854314

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1419490A Pending JPH03218447A (en) 1990-01-23 1990-01-23 Picture data converting method

Country Status (1)

Country Link
JP (1) JPH03218447A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5415523B2 (en) * 2009-03-19 2014-02-12 株式会社日立ハイテクノロジーズ Pattern inspection apparatus and inspection method therefor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5415523B2 (en) * 2009-03-19 2014-02-12 株式会社日立ハイテクノロジーズ Pattern inspection apparatus and inspection method therefor

Similar Documents

Publication Publication Date Title
JP2001264257A (en) Image defect detection device, image defect detection method, and storage medium storing procedure of image defect detection method
JP2005172559A (en) Line defect detection method and apparatus for panel
US20230296531A1 (en) Information processing apparatus, information processing method, and information processing program
JP2005345290A (en) Streak defect detection method and apparatus
JP2004219291A (en) Screen line defect detection method and apparatus
JP3127598B2 (en) Method for extracting density-varying constituent pixels in image and method for determining density-fluctuation block
JPH03218447A (en) Picture data converting method
JP2003510568A (en) LCD inspection method and LCD inspection apparatus by pattern comparison
JP2710527B2 (en) Inspection equipment for periodic patterns
JPH08145907A (en) Inspection equipment of defect
JPH03175343A (en) Method for extracting flaw by inspection appearance
JPH0735699A (en) Surface defect detection method and apparatus
JP2006145228A (en) Nonuniformity defect detection method and apparatus
JPS6385432A (en) Inspecting method for linear defect
JP7821245B1 (en) Container visual inspection system
JP7821246B1 (en) Container visual inspection system
JPH0310107A (en) Inspecting method utilizing gradation pattern matching
JP2001258054A (en) Image quality inspection apparatus and luminance center of gravity detection apparatus used therefor
JP2005205748A (en) Printed matter inspection device, printed matter inspection method
JP3333050B2 (en) Shape measuring method and shape measuring device
JPH03160309A (en) Image quality testing apparatus
JPH07192134A (en) Image processing method
JP4121628B2 (en) Screen inspection method and apparatus
JPH1152904A (en) Testing method for lcd panel
JPH064665A (en) Boundary extraction method and apparatus