JP2002039949A - Method for regulating threshold used in coat defect inspecting step - Google Patents

Method for regulating threshold used in coat defect inspecting step

Info

Publication number
JP2002039949A
JP2002039949A JP2000218558A JP2000218558A JP2002039949A JP 2002039949 A JP2002039949 A JP 2002039949A JP 2000218558 A JP2000218558 A JP 2000218558A JP 2000218558 A JP2000218558 A JP 2000218558A JP 2002039949 A JP2002039949 A JP 2002039949A
Authority
JP
Japan
Prior art keywords
threshold
pixel
value
extracted
differential value
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
JP2000218558A
Other languages
Japanese (ja)
Inventor
Kiyoshi Yamada
清 山田
Masato Sakakibara
正人 榊原
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 JP2000218558A priority Critical patent/JP2002039949A/en
Publication of JP2002039949A publication Critical patent/JP2002039949A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Application Of Or Painting With Fluid Materials (AREA)
  • Coating Apparatus (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To realize a method for automatically obtaining a suitable value of a threshold though a threshold used for inspecting a coat defect is regulated by repeating a trial and an error at the present. SOLUTION: A method for regulating the threshold, used in a coat defect inspecting step, comprises a step S1 of photographing a coating surface 2 which does not have a defect to obtain a lightness of each pixel, a step S2 of space differentiating light information of the obtained each pixel to obtain a differential value 6 of each pixel, a step S3 of setting an initial threshold as the threshold, a step S4 of comparing the differential value of each pixel with the threshold, a step S5 of extracting a profile independent in a visual field of a profile of a pixel group in which the differential value is the threshold or larger, a step S6 of subtracting a first prescribed value from the threshold, a step S7 of repeating a cycle until an independent profile is extracted in the step S5 with the 'step S4, the step S5 and the step S6' as unit cycles, and a step S8 of adding a second prescribed value to the threshold, when the independent profile is extracted in the extracting step to decide the threshold.

Description

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

【0001】[0001]

【発明の属する技術分野】 本発明は、塗装された面、
例えば、塗装工程が終了した自動車ボディの塗面に存在
するかもしれない欠陥を検査する工程のための準備技術
に関する。
TECHNICAL FIELD The present invention relates to a painted surface,
For example, it relates to a preparation technique for a process of inspecting a painted surface of an automobile body after a painting process for a defect that may be present.

【0002】[0002]

【従来の技術】 塗面に存在するかもしれない欠陥の有
無を検査するために、通常は、塗面を撮影して画素毎の
明度を得る。そして得られた画素毎の明度を空間微分し
て画素毎の微分値を得る。その上で、画素毎の微分値を
閾値と比較し、微分値が閾値以上の画素群の輪郭を求
め、視野内で独立している輪郭を抽出する。塗面に欠陥
が存在していると独立した輪郭が抽出されるために、上
記の方法で欠陥の有無が検査できる。
2. Description of the Related Art In order to check for the presence of defects that may be present on a painted surface, the painted surface is usually photographed to obtain brightness for each pixel. Then, the obtained brightness of each pixel is spatially differentiated to obtain a differential value for each pixel. Then, the differential value of each pixel is compared with a threshold value, the contour of a pixel group whose differential value is equal to or greater than the threshold value is determined, and an independent contour is extracted in the visual field. If there is a defect on the painted surface, an independent contour is extracted, so that the presence or absence of a defect can be inspected by the above method.

【0003】[0003]

【発明が解決しようとする課題】 上記方法で正しい結
果を得るためには、閾値の値が適当な値に設定されてい
なければならない。閾値が大きすぎれば欠陥が見過ごさ
れ、閾値が小さすぎれば欠陥のない場合にも「欠陥有
り」と誤判別してしまう。現状では、閾値を適値に調整
する好適な手法がなく、試行錯誤を繰返して閾値を調整
している。このために、塗面欠陥検査工程で用いる閾値
を適値に調整するのに多大の時間を要している。そこ
で、本発明では、閾値の適値を自動的に得る方法を創作
した。
In order to obtain a correct result by the above method, the threshold value must be set to an appropriate value. If the threshold value is too large, the defect is overlooked, and if the threshold value is too small, even if there is no defect, it is erroneously determined that there is a defect. At present, there is no suitable method for adjusting the threshold to an appropriate value, and the threshold is adjusted by repeating trial and error. For this reason, it takes a lot of time to adjust the threshold value used in the coating surface defect inspection process to an appropriate value. Therefore, the present invention has created a method for automatically obtaining an appropriate threshold value.

【0004】[0004]

【課題を解決するための手段と作用と効果】 この発明
の方法は、塗面欠陥検査工程で用いる閾値を適値に調整
する方法である。この方法では図1に模式的に示すよう
に、欠陥のない塗面2を撮影して画素毎の明度4を得る
工程S1と、得られた画素毎の明度を空間微分して画素
毎の微分値6を得る工程S2と、閾値として初期閾値を
設定する工程S3と、画素毎の微分値を閾値と比較する
工程S4と、微分値が閾値以上の画素群の輪郭であって
視野内で独立している輪郭を抽出する工程S5と、閾値
から第1所定値だけ減じる工程S6と、前記の「比較工
程S4と抽出工程S5と減少工程S6」と単位サイクル
として前記抽出工程S5で独立輪郭が抽出されるまでそ
のサイクルを繰返す工程S7と、前記抽出工程S5で独
立輪郭が抽出されたときの閾値に第2所定値を加えて閾
値を決定する工程S8を有する。
Means for Solving the Problems, Functions and Effects The method of the present invention is a method for adjusting a threshold used in a paint surface defect inspection step to an appropriate value. In this method, as schematically shown in FIG. 1, a step S1 of photographing a painted surface 2 having no defect to obtain a brightness 4 of each pixel, and a spatial differentiation of the obtained brightness of each pixel to differentiate each pixel. A step S2 for obtaining a value 6, a step S3 for setting an initial threshold value as a threshold value, a step S4 for comparing a differential value for each pixel with a threshold value, A step S5 of extracting a contour that has been performed, a step S6 of subtracting the threshold value by a first predetermined value, and an independent contour in the extraction step S5 as a unit cycle with the “comparison step S4, extraction step S5, and reduction step S6”. The method includes a step S7 of repeating the cycle until extraction is performed, and a step S8 of adding a second predetermined value to a threshold when the independent contour is extracted in the extraction step S5 to determine the threshold.

【0005】この方法では、閾値の値を第1所定値だけ
小さくしながら(S6工程)、S5の抽出工程を繰返
す。最初は閾値が大きすぎるために、閾値以上の微分値
を持つ画素は抽出されない。閾値の値を第1所定値だけ
小さくしながらS5の抽出工程を繰返すうちに、閾値以
上の微分値を持つ画素群であって独立した輪郭を持つ画
素群が抽出され始める。図1は、n+1回目の抽出工程
で閾値以上の微分値を持つとともに独立した輪郭を持つ
画素群が抽出されたことを例示している。ここでは塗面
2に欠陥が存在していないことがわかっている。それに
もかかわらずに抽出される独立画素群は、ゆず肌または
オレンジピールと称される、欠陥にあたらない程度の不
規則性に相当する。即ち、S5の抽出工程を繰り返し実
行しているうちに閾値以上の微分値と独立した輪郭を持
つ画素群が抽出されるようになるのであるが、そのとき
の閾値はかろうじてゆず肌が検出できるレベルに調整さ
れている。この閾値は、塗面欠陥が存在すれば確実にそ
の欠陥を抽出できる値(レベル)である。しかるにゆず
肌まで検出してしまうという意味において小さすぎる。
S8の工程では、このときの閾値に第2所定値を加え
る。このようにして調整される閾値は、ゆず肌は抽出し
ないけれども塗面欠陥は抽出するレベルにあり、塗面欠
陥の検査に適したレベルである。なお、ここで言うゆず
肌またはオレンジピールは、特開平8−28557号公
報の「0003」の段落に記載されたものである。この
発明は、ゆず肌の存在を利用して閾値の適値を自動的に
得る方法であり、極めてユニークなものである。この発
明では、独立する輪郭を抽出することから照明の明暗パ
ターンが閾値の決定過程に悪影響を及ぼすことはない。
なおここで言う「独立した」とは、抽出された画素群が
同一直線上に点在して実質的には連続している場合を含
まない。閾値以上の画素群が同一直線上に点在している
場合には、ゆず肌でなく、照明の明暗パターンの境界領
域が断続的に抽出されているのであるから、ここでいう
独立にはあたらないのである。
In this method, the extraction step of S5 is repeated while reducing the threshold value by a first predetermined value (Step S6). Initially, pixels having a differential value equal to or larger than the threshold are not extracted because the threshold is too large. While repeating the extraction step of S5 while reducing the threshold value by the first predetermined value, a pixel group having a differential value equal to or greater than the threshold value and having an independent contour starts to be extracted. FIG. 1 illustrates that a pixel group having a differential value equal to or larger than a threshold value and having an independent contour is extracted in the (n + 1) th extraction step. Here, it is known that no defect exists on the painted surface 2. Nevertheless, the group of independent pixels extracted corresponds to a degree of irregularity that does not hit a defect, called citron skin or orange peel. That is, while repeatedly performing the extraction step of S5, a pixel group having a contour independent of a differential value equal to or greater than the threshold value is extracted, and the threshold value at this time is barely a level at which citron skin can be detected. Has been adjusted. This threshold value is a value (level) at which the paint surface defect can be reliably extracted if it exists. However, it is too small in the sense that even the skin is detected.
In the step S8, a second predetermined value is added to the threshold value at this time. The threshold value adjusted in this manner is at a level at which the painted surface defect is extracted although the citron skin is not extracted, and is a level suitable for the inspection of the painted surface defect. The citron skin or orange peel referred to here is described in paragraph [0003] of JP-A-8-28557. The present invention is a method for automatically obtaining an appropriate threshold value using the presence of citron skin, and is extremely unique. According to the present invention, since the independent contour is extracted, the brightness pattern of the illumination does not adversely affect the process of determining the threshold.
Here, “independent” does not include a case where the extracted pixel groups are scattered on the same straight line and are substantially continuous. In the case where pixel groups equal to or larger than the threshold value are scattered on the same straight line, the boundary area of the light and dark pattern of the illumination is intermittently extracted instead of the citron skin. There is no.

【0006】[0006]

【発明の実施の形態】 以下、本発明の閾値調整方法
を、自動車ボディの塗面欠陥検査工程の準備段階に適用
した実施の形態を説明する。このために、検査対象物で
ある塗装済み自動車ボディと同一条件の閾値調整用塗面
(図示省略)を準備する。この閾値調整用塗面は予め欠
陥のないことがわかっている塗面である。この閾値調整
用塗面には予め欠陥のないことが確認されている自動車
ボディの塗面を用いることができる。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, an embodiment in which a threshold value adjusting method of the present invention is applied to a preparation stage of a coating surface defect inspection process of an automobile body will be described. For this purpose, a painted surface for threshold adjustment (not shown) is prepared under the same conditions as the painted automobile body to be inspected. The painted surface for threshold adjustment is a painted surface that is known in advance to be free from defects. The painted surface of the automobile body, which is previously confirmed to be free from defects, can be used as the painted surface for threshold adjustment.

【0007】閾値調整用塗面(以下、単にテスト用塗面
という)を撮影するカメラ(図示省略)は、画素毎の明
度を電子計算機によって処理可能な情報として出力する
ものである。例えばCCDカメラ等のことを言う。本実
施の形態のカメラは、1画素あたり8ビットで光の強弱
レベルの信号を出力する。この結果、画素毎の明度を0
から255の256階調で撮影することができる。電子
計算機は、図12に示すように、プログラムに従って作
動することでカメラから送られてくる画素単位の明度情
報を視野毎に記憶する視野別画素単位明度情報記憶装置
122と、画素毎の明度情報の微分値を演算する微分演
算装置124と、画素毎の微分値を記憶する装置123
と、微分値を閾値と比較する比較演算装置126と、微
分値が閾値以上の画素群の輪郭であって視野内で独立し
ている輪郭を抽出する独立輪郭抽出装置128と、閾値
から所定値を減じたり加えたりする閾値演算装置130
を構成する。当然にCPU130とインターフェイス1
34を備えている。塗面を照明する照明装置(図示省
略)は、特許第263812号公報や特開平9−280
845公報に記載されているように、塗面上に明暗の縞
パターンが生じるように照明する。テスト用塗面と照明
装置の位置関係や照明方法は、実際の塗面欠陥検査工程
で用いるものと同一条件とする。
[0007] A camera (not shown) for photographing a threshold adjustment painted surface (hereinafter simply referred to as a test painted surface) outputs the brightness of each pixel as information that can be processed by an electronic computer. For example, it refers to a CCD camera or the like. The camera according to the present embodiment outputs a signal of the intensity level of light at 8 bits per pixel. As a result, the brightness of each pixel becomes 0
Can be taken at 256 gradations from 255 to 255. As shown in FIG. 12, the computer operates according to a program to store pixel-by-pixel brightness information sent from the camera for each view, and stores per-view pixel-unit brightness information storage device 122; And a device 123 for storing the differential value of each pixel
A comparison operation device 126 for comparing the differential value with a threshold value, an independent contour extracting device 128 for extracting a contour of a pixel group whose differential value is equal to or more than the threshold value and independent in the visual field, and a predetermined value from the threshold value. Calculation device 130 for reducing or adding
Is composed. Naturally, CPU 130 and interface 1
34. An illumination device (not shown) for illuminating a painted surface is disclosed in Japanese Patent No. 263812 and Japanese Patent Application Laid-Open No. 9-280.
As described in Japanese Patent No. 845, the illumination is performed so that a light and dark stripe pattern is formed on the painted surface. The positional relationship between the test painted surface and the lighting device and the lighting method are the same as those used in the actual painted surface defect inspection process.

【0008】図2に示されるフローチャートを用いて、
閾値調整手順を説明する。まず、前述した照明装置を点
灯する。次にカメラの絞りを調整する。撮影時にカメラ
が取り込む光量は、自動車ボディのボディカラーによっ
て異なる。そこで、車種によらずにほぼ一様な光量が得
られるように、自動車ボディのボディカラーにあわせて
調整したカメラの絞りで以下の処理を行う。
[0008] Using the flowchart shown in FIG.
The threshold adjustment procedure will be described. First, the lighting device described above is turned on. Next, adjust the aperture of the camera. The amount of light captured by the camera during shooting differs depending on the body color of the car body. Therefore, the following processing is performed with the aperture of the camera adjusted according to the body color of the vehicle body so that a substantially uniform light amount can be obtained regardless of the vehicle type.

【0009】工程S12で、テスト用塗面を撮影する。
この結果、テスト用塗面について、画素毎の明度が得ら
れる。この画素毎の明度情報が明度情報記憶装置122
に記憶される。図3に良く示されているように、テスト
用塗面は照明光をクリアに反射するために、鮮明な縞状
の明暗パターンが撮影される。図2中のグラフF4は、
明暗パターンの境界線に垂直な直線上での明度分布を示
した図である。横軸はその直線上の位置に対応する。縦
軸は明度に対応する。曲線52は位置−明度曲線であ
る。F2の図は、画素毎の明度を所定の値で二値化した
ものである。所定の値以上の明度を持つ画素は真白と
し、所定の値よりも小さな明度を持つ画素は真黒として
いる。
In step S12, a test painted surface is photographed.
As a result, the brightness of each pixel is obtained for the test painted surface. The brightness information for each pixel is stored in the brightness information storage device 122.
Is stored. As clearly shown in FIG. 3, the test painted surface reflects the illumination light clearly, so that a clear striped light-dark pattern is photographed. The graph F4 in FIG.
FIG. 4 is a diagram illustrating a lightness distribution on a straight line perpendicular to a boundary between light and dark patterns. The horizontal axis corresponds to the position on the straight line. The vertical axis corresponds to lightness. Curve 52 is a position-brightness curve. In the diagram of F2, the brightness of each pixel is binarized by a predetermined value. Pixels having brightness equal to or higher than a predetermined value are set to pure white, and pixels having brightness smaller than the predetermined value are set to black.

【0010】図2のステップS14では、電子計算機の
微分演算装置124が作動して微分処理する。この結
果、画素単位で微分値、即ち明度の変化量が得られる。
以下、「微分値」と「明度変化量」を同義に使う。図2
中のグラフF8は、明暗パターンの境界線に垂直な直線
上での微分値分布を示した図である。横軸はその直線上
の位置に対応する。縦軸は微分値ないし明度変化量に対
応する。後記するグラフF12、16、20の縦軸・横
軸も同様である。曲線54は位置―微分値曲線である。
後記する曲線56、60、64は曲線54に等しい。微
分処理することで得られた画素毎の微分値は、電子計算
機の画素単位の微分値記憶装置123に記憶される(ス
テップS14)。画素単位の微分値記憶装置123に
は、視野内の微分値分布図情報が記憶される。
In step S14 of FIG. 2, the differentiation operation device 124 of the electronic computer operates to perform a differentiation process. As a result, a differential value, that is, an amount of change in brightness is obtained for each pixel.
Hereinafter, “differential value” and “brightness change amount” are used synonymously. FIG.
The middle graph F8 is a diagram showing a differential value distribution on a straight line perpendicular to the boundary between the light and dark patterns. The horizontal axis corresponds to the position on the straight line. The vertical axis corresponds to the differential value or the brightness change amount. The same applies to the vertical and horizontal axes of graphs F12, 16, and 20 described later. Curve 54 is a position-differential value curve.
The curves 56, 60, 64 described below are equal to the curve 54. The differential value for each pixel obtained by performing the differentiation processing is stored in the differential value storage device 123 for each pixel of the electronic computer (step S14). The differential value storage device 123 for each pixel stores differential value distribution map information in the visual field.

【0011】ステップS16では、閾値として初期閾値
を設定する。この初期閾値は、過去のデータに基づいて
予め設定されている。即ち、照明の明暗の変化を検出し
ない程度に大きな値が設定されている。
In step S16, an initial threshold is set as the threshold. This initial threshold is set in advance based on past data. That is, a large value is set so as not to detect a change in the brightness of the illumination.

【0012】比較演算装置126は、ステップS14で
得られた画素ごとの微分値を閾値と比較する。その上
で、微分値が閾値以上であり、かつ輪郭が独立している
画素群の抽出を行う(ステップS18)。
The comparison operation unit 126 compares the differential value for each pixel obtained in step S14 with a threshold value. Then, a pixel group whose differential value is equal to or larger than the threshold value and whose contour is independent is extracted (step S18).

【0013】初期閾値は大きな値であるために、最初に
ステップS18を実行する場合、独立輪郭抽出装置12
8は独立輪郭を抽出しない。図2のグラフF12に良く
示されるように、初期閾値58は位置―微分値曲線56
のピーク値よりも大きいために、画像F10に良く示さ
れるように、微分値分布図を初期閾値58で二値化した
画像は真黒になり(F10参照)、明度変化量ないし微
分値が閾値以上の画素は抽出されない。図4は、微分値
を初期閾値58で二値化した実際の画像であり真黒であ
る。閾値以上の微分値を有する画素がないために、最初
はステップS20がノーとなり、ステップS22に進
む。
Since the initial threshold value is large, when step S18 is first executed, the independent contour extraction device 12
8 does not extract independent contours. As is well shown in the graph F12 of FIG.
, The image obtained by binarizing the differential value distribution map with the initial threshold value 58 becomes black (see F10), as shown in the image F10, and the brightness change amount or the differential value exceeds the threshold value. Are not extracted. FIG. 4 is an actual image obtained by binarizing the differential value with the initial threshold value 58 and is black. Since there is no pixel having a differential value equal to or larger than the threshold value, step S20 is initially NO, and the process proceeds to step S22.

【0014】ステップS22では、閾値が大きすぎるの
で、第1所定値だけ小さくする。この第1所定値は過去
のデータによって予め設定したものを用いる。閾値演算
装置130が新たな閾値を導出する。
In step S22, since the threshold value is too large, it is reduced by a first predetermined value. As the first predetermined value, a value set in advance based on past data is used. The threshold calculator 130 derives a new threshold.

【0015】この新たな閾値を用いて、前述したステッ
プS18、20を繰返す。2回目の閾値を用いても独立
輪郭抽出装置128が独立輪郭を抽出しない場合は、ス
テップS22において2回目の閾値から第1所定値だけ
減じて3回目の閾値を導出する。このように、ステップ
S18とステップS20とステップS22を単位サイク
ルとして、ステップS20で独立輪郭が抽出されるまで
そのサイクルを繰返す。図2の位置―微分値曲線54の
ピーク値の前後まで閾値が減少すると、微分値分布図を
二値化した画面に白い領域が現れ始める。図5は、この
状態での2値化画面を示す。この場合、微分値が閾値以
上の画素群が存在(その画素群が白く示されている)し
始める。このときに検出される画素群は、照明の明暗パ
ターンの境界領域に対応し、ほぼ同一直線状に乗ってい
る。この技術では、分断はされていても、同一直線状に
乗っている画素群は実質的には連続している為に、輪郭
が独立した画素群とはしない。図5の2値化画面をもた
らすときの閾値は、図2のステップS20で、独立した
輪郭をもたらす画素群が抽出されたとはしないのであ
る。従って、ステップS22で、閾値はさらに小さくさ
れる。徐々に小さくされる閾値が、グラフF16に示さ
れるように、位置―微分値曲線60のピークレベルより
も下がると、微分値分布図を閾値62で二値化したもの
は、画像F14に模式的に表わされるように、はっきり
した直線となる。この場合、閾値以上の微分値を持つ画
素群は直線的に連続し、視野内で独立する輪郭は抽出さ
れない。
Using the new threshold, steps S18 and S20 described above are repeated. When the independent contour extraction device 128 does not extract an independent contour even when the second threshold is used, a third threshold is derived by subtracting the first threshold from the second threshold in step S22. As described above, steps S18, S20, and S22 are set as a unit cycle, and the cycle is repeated until an independent contour is extracted in step S20. When the threshold value decreases to around the peak value of the position-differential value curve 54 in FIG. 2, a white area starts to appear on the binarized differential value distribution map screen. FIG. 5 shows a binarized screen in this state. In this case, a pixel group whose differential value is equal to or larger than the threshold value starts to exist (the pixel group is shown in white). The pixel group detected at this time corresponds to the boundary region of the light and dark pattern of the illumination, and rides substantially in the same straight line. In this technique, even though the pixels are divided, the pixel groups on the same straight line are substantially continuous, so that the pixel groups are not independent pixel groups. The threshold for providing the binarized screen in FIG. 5 does not mean that the pixel group providing an independent contour has been extracted in step S20 in FIG. Therefore, in step S22, the threshold value is further reduced. When the threshold value that is gradually reduced falls below the peak level of the position-differential value curve 60 as shown in a graph F16, the differential value distribution map binarized by the threshold value 62 is schematically shown in an image F14. As shown in FIG. In this case, a pixel group having a differential value equal to or larger than the threshold value is linearly continuous, and independent contours are not extracted in the visual field.

【0016】ところで、位置―微分値曲線は、照明パタ
ーンに対応する緩やかな波に、細かな波が重複したもの
である。この細かな波は、塗面のゆず肌に起因してい
る。テスト用塗面には欠陥が存在しない。前述したステ
ップS18、20、22を単位サイクルとした抽出処理
を繰返すうちに、閾値は徐々に下がり、図2のグラフF
20の位置―微分値曲線64のボトムレベルに近づく。
この場合、微分値を閾値と比較したときに、閾値以上の
微分値を持つ画素群であってその画素群を包み込む輪郭
が視野内で独立するものが抽出され始める。ここでは、
n+1回目のステップS22で、独立輪郭が抽出された
とする。グラフF20に模式的に良く示されているよう
に、n+1回目の閾値66は、位置―微分値曲線64の
ボトムレベルにあって、ゆず肌に起因する明度変化を検
出し始めたときのレベルである。このときには、画像F
18に模式的に示されているように、微分値分布図を二
値化した画面中に、独立輪郭70が抽出される。図6
は、画像F18に対応する実際の二値化画像である。明
暗パターンの境界領域とは別に、独立した輪郭が抽出さ
れている。テスト用塗面には欠陥がないことが予め確認
されており、このようにして抽出され始める独立した輪
郭はゆず肌に対応している。
Incidentally, the position-differential value curve is obtained by overlapping a gentle wave corresponding to an illumination pattern with a fine wave. These fine waves are caused by the citron skin on the painted surface. No defects are present on the test painted surface. The threshold value gradually decreases while repeating the extraction processing in which steps S18, S20, and S22 are performed as a unit cycle.
The position at 20 approaches the bottom level of the differential value curve 64.
In this case, when the differential value is compared with the threshold value, a pixel group having a differential value equal to or larger than the threshold value and whose contour enclosing the pixel group is independent in the visual field starts to be extracted. here,
It is assumed that an independent contour is extracted in the (n + 1) -th step S22. As schematically schematically shown in the graph F20, the threshold value 66 at the (n + 1) th time is at the bottom level of the position-differential value curve 64, and is the level at which the lightness change caused by yuzu skin starts to be detected. is there. At this time, the image F
As schematically shown in FIG. 18, the independent contour 70 is extracted in a screen obtained by binarizing the differential value distribution diagram. FIG.
Is an actual binarized image corresponding to the image F18. Independent of the boundary area of the light and dark pattern, an independent contour is extracted. It has been previously determined that the test painted surface is free of defects, and the independent contours that begin to be extracted in this way correspond to citron skin.

【0017】独立した輪郭を抽出し始めたn+1回目の
閾値は、塗面欠陥が存在すれば確実にその欠陥を抽出で
きる値(レベル)である。しかるに上述したように、ゆ
ず肌までをも抽出してしまう。そこで図2のステップS
26では、n+1回目の閾値に第2所定値を加える。こ
の第2所定値は過去のデータに基づいて予め設定されて
いる。閾値演算装置130は、n+1回目の閾値に第2
所定値だけ加えて閾値を決定するのである。このように
して調整された閾値(以下単に決定閾値という)は、ゆ
ず肌は抽出しないけれども塗面欠陥は抽出するレベルで
あり、塗面欠陥の検査に適したレベルである。決定閾値
を用いて画素―微分値分布図を2値化すれば、ゆず肌よ
りも大きな明度変化を有する塗面欠陥は確実に視野内で
独立する輪郭となって検出される。決定閾値によると、
塗面欠陥を確実に抽出することができる。
The threshold value of the (n + 1) th time at which the independent contour is started to be extracted is a value (level) at which a paint surface defect can be reliably extracted if it exists. However, as described above, even the yuzu skin is extracted. Therefore, step S in FIG.
At 26, the second predetermined value is added to the (n + 1) th threshold value. This second predetermined value is set in advance based on past data. The threshold value calculation device 130 sets the (n + 1) th threshold value to the second
The threshold is determined by adding a predetermined value. The threshold value adjusted in this manner (hereinafter simply referred to as a determination threshold value) is a level at which a painted surface defect is extracted although citron skin is not extracted, and is a level suitable for inspecting a painted surface defect. If the pixel-differential value distribution map is binarized using the decision threshold, a paint surface defect having a lightness change larger than that of citron skin is reliably detected as an independent contour in the visual field. According to the decision threshold,
Coating surface defects can be reliably extracted.

【0018】本実施形態の閾値調整方法で調整された決
定閾値を、自動車ボディの塗面欠陥検査工程に適用した
実施の形態を説明する。図8に模式的に示されるよう
に、検査対象物である自動車ボディ20は、パレット3
0に載せられた状態で矢印方向に送られる。この搬送方
向と直角方向に複数台(例えば10台)のカメラ1〜1
0が配置されている。このカメラ1〜10は、前述した
テスト用塗面を撮影したカメラと同様のものである。カ
メラ1〜10は、前述した電子計算機に接続されてい
る。図8に示す撮影装置にも、検査対象物を照明する装
置(図示省略)が設けられている。この照明装置は、前
述した照明装置と同様のものである。
An embodiment in which the determined threshold value adjusted by the threshold value adjusting method according to the present embodiment is applied to a coating surface defect inspection process of an automobile body will be described. As schematically shown in FIG. 8, an automobile body 20 to be inspected is a pallet 3
It is sent in the direction of the arrow with being placed on 0. A plurality (for example, 10) of cameras 1-1 in a direction perpendicular to the transport direction
0 is arranged. The cameras 1 to 10 are the same as the cameras that photographed the test painted surface described above. The cameras 1 to 10 are connected to the above-described computer. The imaging device shown in FIG. 8 is also provided with a device (not shown) for illuminating the inspection object. This lighting device is similar to the above-described lighting device.

【0019】パレット30に載せられた自動車ボディ2
0は図8の矢印方向に搬送される。搬送中に、自動車ボ
ディ20は、カメラ1〜10による撮影範囲に至る。本
実施形態では、自動車の幅方向に10台のカメラが設け
られている。自動車ボディ20は、幅方向に10の範囲
に区分されて撮影される。また、本実施形態では、各カ
メラの各回毎の撮影範囲は20cm×20cmに設定さ
れている。そこで自動車ボディ20が20cm弱搬送さ
れるごとに各カメラで撮影する。実際には、視野が少し
ずつ重複するように撮影される。即ちカメラ1〜10は
19cm間隔で配置され、各カメラは自動車ボディ20
が19cm搬送される毎に撮影する。実際には、パレッ
ト30が所定位置まで進んだときに1回目の撮影をし、
以後19cm進む毎に撮影する。撮影回数をアドレスと
いう。カメラの撮影範囲から自動車ボディ20の後端が
抜け出るまで撮影を繰返す。以上によって、自動車ボデ
ィ20全域は、図9に示されるように、カメラ数にアド
レス数を乗じた数の視野でカバーされる。図11に模式
的に良く示されているように、視野は図11中d(本実
施形態では、d=1cm)だけ重複するように撮影され
ているので、塗面全域が確実にカバーされる。
An automobile body 2 placed on a pallet 30
0 is conveyed in the direction of the arrow in FIG. During transportation, the vehicle body 20 reaches the shooting range of the cameras 1 to 10. In the present embodiment, ten cameras are provided in the width direction of the automobile. The car body 20 is photographed while being divided into ten ranges in the width direction. In this embodiment, the photographing range of each camera is set to 20 cm × 20 cm at each time. Therefore, each time the vehicle body 20 is conveyed slightly less than 20 cm, an image is taken with each camera. In practice, images are taken so that the fields of view slightly overlap. That is, cameras 1 to 10 are arranged at intervals of 19 cm, and each camera is
Is photographed every time 19 cm is transported. Actually, when the pallet 30 advances to a predetermined position, the first photographing is performed,
Thereafter, every time the camera advances 19 cm, a picture is taken. The number of times of shooting is called an address. The shooting is repeated until the rear end of the vehicle body 20 comes out of the shooting range of the camera. As described above, the entire area of the vehicle body 20 is covered by the number of cameras multiplied by the number of addresses, as shown in FIG. As schematically shown in FIG. 11, the field of view is photographed so as to overlap by d (d = 1 cm in this embodiment) in FIG. 11, so that the entire painted surface is reliably covered. .

【0020】自動車ボディ20のうちのある視野につい
て、得られた微分値を決定閾値で二値化した二値化画像
を図7に示す。決定閾値は、n+1回目の閾値に第2所
定値だけ加えた閾値である。この場合、ゆず肌は抽出さ
れない。図7中、独立した輪郭は塗面欠陥である。この
決定閾値を用いて、塗面欠陥を検査すると、欠陥のない
ものを欠陥ありと判定したり、欠陥のあるものを欠陥な
しと判定したりすることがなく、正確に判定できること
が確認された。
FIG. 7 shows a binarized image obtained by binarizing the obtained differential value with respect to a certain visual field of the automobile body 20 using a decision threshold. The decision threshold is a threshold obtained by adding a second predetermined value to the (n + 1) th threshold. In this case, citron skin is not extracted. In FIG. 7, the independent contour is a paint surface defect. Using this determined threshold value, when inspecting the paint surface defect, it was confirmed that the defect-free one was not determined to be defective, and the defective one was not determined to be no defect, and that the determination could be made accurately. .

【0021】本実施形態では、欠陥がたまたま照明の明
暗の境界領域内にある場合には、その欠陥が抽出できな
いことも考えられる。それを避けるための技術を図10
を用いて説明する。
In the present embodiment, when a defect happens to be in the boundary area between light and dark of the illumination, the defect may not be extracted. Figure 10 shows a technique for avoiding this.
This will be described with reference to FIG.

【0022】図10は画素―微分値分布図を決定閾値で
二値化したものである。図10中72は決定閾値以上の
微分値を持つ画素群であり、明度急変領域である。明度
急変領域72は真白で示される。図10中74は決定閾
値よりも小さい微分値を持つ画素群であり、明度緩変領
域である。明度緩変領域74は真黒で示される。欠陥が
明度急変領域72内にあるときは、欠陥に対応する独立
した輪郭が抽出できない。そこで、本実施形態では、1
視野を複数回ずつ撮影する。このとき、図10中明度急
変領域72の進行方向の幅aよりも大きく、進行方向の
ピッチbよりも小さい距離cだけずらして2回撮影す
る。ここで、cだけずらされた視野のセットを「1視
野」とする。図11は、撮影範囲の重複を模式的に示す
ものであり、視野1に対して、範囲1−1と1−2の2
回撮影する。重複領域が視野1である。同様に、視野2
に対して、範囲2−1と2−2の2回撮影する。重複領
域が視野2である。視野1と視野2はd(前記したよう
に約1cm)だけ重複している。このように、各視野毎
にわずかな距離(c)だけずらして2回撮影すると、い
ずれかの撮影画面では欠陥が明度急変領域72内に位置
していても、距離cだけずらして撮影された他の撮影画
面では、その欠陥が明度緩変領域74内に表われる。図
10では、一つの撮影画面では非明度急変領域72内に
あった塗面欠陥76が、もう一つの撮影画面では明度緩
変領域74内にあることを例示している。その結果、そ
のもう一つの撮影画面では明度緩変領74内に閾値以上
の微分値を有する独立輪郭が抽出され、塗面欠陥が抽出
される。1視野をわずかにずらしながら複数回撮影する
ことにより、視野内に塗面欠陥が存在する場合には洩ら
さずに抽出することができる。
FIG. 10 shows a pixel-differential value distribution diagram binarized using a decision threshold. In FIG. 10, reference numeral 72 denotes a pixel group having a differential value equal to or larger than the determination threshold, which is a brightness sudden change area. The brightness change area 72 is shown in pure white. In FIG. 10, reference numeral 74 denotes a pixel group having a differential value smaller than the determination threshold, which is a lightness slowly changing region. The lightness change region 74 is shown in black. When the defect is in the suddenly changing brightness region 72, an independent contour corresponding to the defect cannot be extracted. Therefore, in the present embodiment, 1
Shoot the field of view several times. At this time, the image is shot twice with a distance c larger than the width a in the traveling direction of the sharply changing area 72 in FIG. 10 and smaller than the pitch b in the traveling direction. Here, a set of visual fields shifted by c is referred to as “one visual field”. FIG. 11 schematically shows the overlapping of the photographing ranges.
Shoot twice. The overlapping area is the field of view 1. Similarly, field of view 2
Are photographed twice in the range 2-1 and 2-2. The overlapping area is the field of view 2. The visual field 1 and the visual field 2 overlap by d (about 1 cm as described above). As described above, when the image is shot twice with a slight distance (c) shifted for each field of view, the image is shot with a shift of the distance c even if the defect is located in the suddenly changing brightness area 72 on any of the shooting screens. On other photographing screens, the defect appears in the slowly changing brightness region 74. FIG. 10 exemplifies that the paint surface defect 76 which was in the non-brightness changing area 72 in one photographing screen is in the slowly changing area 74 in another photographing screen. As a result, an independent contour having a differential value equal to or larger than the threshold value is extracted from the other lightness screen in the lightness variation 74, and a paint surface defect is extracted. By photographing a plurality of times while slightly shifting one field of view, it is possible to extract, without leaking, if a paint surface defect exists in the field of view.

【0023】照明パターンは図10に良く示されるよう
に平行縞状の場合もあれば、格子縞状の場合もある。格
子縞上の場合、1視野を2枚以上撮影することが好まし
い。塗面のすべて位置が、いずれかの撮影画面で明度緩
変領域74内に位置するようにすることで、欠陥を洩ら
さずに抽出することができる。
The illumination pattern may be in the form of parallel stripes as shown in FIG. 10, or may be in the form of lattice stripes. In the case of a grid pattern, it is preferable to take two or more images in one visual field. By setting all the positions of the painted surface to be within the slowly changing brightness region 74 on any of the photographing screens, it is possible to extract defects without leaking.

【0024】ステップS16では、過去のデータに基づ
いて予め設定した初期閾値を用いているが、それに限ら
れない。ステップS14で得られた微分値のピーク値を
用いて設定する形態であっても良い。
In step S16, an initial threshold value set in advance based on past data is used, but the present invention is not limited to this. The setting may be made using the peak value of the differential value obtained in step S14.

【0025】ステップS22では、過去のデータに基づ
いて予め設定した第1所定値を用いているが、それに限
られない。微分値のピーク値とボトム値の差を利用して
設定する形態であっても良い。
In step S22, a first predetermined value set in advance based on past data is used, but the present invention is not limited to this. The mode may be set using the difference between the peak value and the bottom value of the differential value.

【0026】ステップS26では、過去のデータに基づ
いて予め設定した第2所定値を用いているが、それに限
られない。微分値の分布図情報に表れる細かな周期の波
の高さを利用して設定する形態であっても良い。
In step S26, the second predetermined value set in advance based on past data is used, but the present invention is not limited to this. The mode may be set by using the height of a wave having a fine cycle appearing in the distribution map information of the differential value.

【0027】本実施形態では、閾値調整を行うにあた
り、予め欠陥のないことを確認した自動車ボディを使用
している。これに代って、閾値調整用に特に作製した試
料を用いて決定閾値を調整しても良い。
In the present embodiment, when adjusting the threshold value, an automobile body that has been confirmed in advance to be free from defects is used. Alternatively, the determination threshold may be adjusted using a sample that has been specifically prepared for threshold adjustment.

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

【図1】 本発明の方法を模式的に説明する図である。FIG. 1 is a diagram schematically illustrating the method of the present invention.

【図2】 本実施形態の閾値調整手順を示したフローチ
ャートと模式画像等を示した図である。
FIG. 2 is a flowchart illustrating a threshold adjustment procedure and a schematic image of the embodiment.

【図3】 欠陥の無い塗面のカメラ撮影画面である。FIG. 3 is a camera photographing screen of a painted surface having no defect.

【図4】 閾値が大きいときの欠陥の無い塗面の微分値
の二値化画面である。
FIG. 4 is a binarized screen of differential values of a paint surface having no defect when a threshold value is large.

【図5】 閾値が大きいときの欠陥の無い塗面の微分値
の二値化画面である。
FIG. 5 is a binarized screen of differential values of a paint surface having no defect when a threshold value is large.

【図6】 閾値が小さいときの欠陥の無い塗面の微分値
の二値化画面である。
FIG. 6 is a binarized screen of a differential value of a paint surface having no defect when a threshold value is small.

【図7】 決定閾値で欠陥を有する塗面の微分値を二値
化した画面である。
FIG. 7 is a screen obtained by binarizing a differential value of a paint surface having a defect with a determined threshold.

【図8】 自動車ボディの塗面欠陥検査工程を模式的に
示した図である。
FIG. 8 is a view schematically showing a coating surface defect inspection process of an automobile body.

【図9】 各カメラの各回毎の撮影範囲を示した図であ
る。
FIG. 9 is a diagram showing a shooting range of each camera for each time.

【図10】欠陥を有する塗面の二値化画面を模式的に示
した図である。
FIG. 10 is a diagram schematically showing a binarized screen of a painted surface having a defect.

【図11】視野の重複を示す図である。FIG. 11 is a diagram showing overlap of visual fields.

【図12】電子計算機の構成を模式的に示した図であ
る。
FIG. 12 is a diagram schematically showing a configuration of an electronic computer.

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

54、56、60、64・・位置ー微分値曲線 66・・n+1回目閾値 70・・独立輪郭 54, 56, 60, 64: position-differential value curve 66: n + 1th threshold 70: independent contour

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 2G051 AA89 AB07 AB12 BB20 CA03 CA07 CC07 DA06 EA08 EA11 EA14 EB01 EB02 ED04 ED07 4D075 AA81 DB02 DC12 4F042 AA09 DH09 5B057 AA04 BA02 CA08 CA12 CA16 CB08 CB12 CB16 CC02 CE03 CE06 CE11 DA03 DA08 DB02 DB09 DC16  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 2G051 AA89 AB07 AB12 BB20 CA03 CA07 CC07 DA06 EA08 EA11 EA14 EB01 EB02 ED04 ED07 4D075 AA81 DB02 DC12 4F042 AA09 DH09 5B057 AA04 BA02 CA08 CA12 CA16 CB16 CE03 DA03 DB02 DB09 DC16

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 欠陥のない塗面を撮影して画素毎の明度
を得る工程と、得られた画素毎の明度を空間微分して画
素毎の微分値を得る工程と、閾値として初期閾値を設定
する工程と、画素毎の微分値を閾値と比較する工程と、
微分値が閾値以上の画素群の輪郭であって視野内で独立
している輪郭を抽出する工程と、閾値から第1所定値だ
け減じる工程と、前記の「比較工程と抽出工程と減少工
程」と単位サイクルとして前記抽出工程で独立輪郭が抽
出されるまでそのサイクルを繰返す工程と、前記抽出工
程で独立輪郭が抽出されたときの閾値に第2所定値を加
えて閾値を決定する工程を有する塗面欠陥検査工程で用
いる閾値調整方法。
A step of obtaining a lightness of each pixel by photographing a paint surface having no defect; a step of spatially differentiating the obtained lightness of each pixel to obtain a differential value for each pixel; Setting, and comparing the differential value of each pixel with a threshold,
A step of extracting a contour that is a contour of a pixel group whose differential value is equal to or larger than a threshold and is independent in the field of view; a step of subtracting the threshold from the threshold by a first predetermined value; And repeating the cycle until an independent contour is extracted in the extraction step as a unit cycle, and determining a threshold value by adding a second predetermined value to a threshold value when the independent contour is extracted in the extraction step. A threshold adjustment method used in the paint surface defect inspection process.
JP2000218558A 2000-07-19 2000-07-19 Method for regulating threshold used in coat defect inspecting step Pending JP2002039949A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000218558A JP2002039949A (en) 2000-07-19 2000-07-19 Method for regulating threshold used in coat defect inspecting step

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000218558A JP2002039949A (en) 2000-07-19 2000-07-19 Method for regulating threshold used in coat defect inspecting step

Publications (1)

Publication Number Publication Date
JP2002039949A true JP2002039949A (en) 2002-02-06

Family

ID=18713483

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000218558A Pending JP2002039949A (en) 2000-07-19 2000-07-19 Method for regulating threshold used in coat defect inspecting step

Country Status (1)

Country Link
JP (1) JP2002039949A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016014636A (en) * 2014-07-03 2016-01-28 クアーズテック株式会社 Inspection method and inspection apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016014636A (en) * 2014-07-03 2016-01-28 クアーズテック株式会社 Inspection method and inspection apparatus

Similar Documents

Publication Publication Date Title
JP4150390B2 (en) Appearance inspection method and appearance inspection apparatus
KR20090066212A (en) Defect detection method and defect detection apparatus
JP3185559B2 (en) Surface defect inspection equipment
JP4633245B2 (en) Surface inspection apparatus and surface inspection method
CN115917595A (en) Surface defect detection system
KR100668029B1 (en) Automatic Inspection of Print Quality Using an Elastic Model
CN111583258B (en) Defect detection method, device, system and storage medium
JP4322230B2 (en) Surface defect inspection apparatus and surface defect inspection method
JP6745150B2 (en) Lighting device and image inspection device
JPH0886633A (en) Surface defect inspecting device
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP2003167529A (en) Method and device for picture defect detection, and program for picture defect detection
JP3412366B2 (en) Coating smoothness inspection device
US7668344B2 (en) Stain inspection method and apparatus
JP4315243B2 (en) Evaluation method of color uniformity
JP2005283197A (en) Detecting method and system for streak defect of screen
JP2008070242A (en) Noise-removing method and apparatus, unevenness defect inspecting method and apparatus
JP6574402B2 (en) Image inspection apparatus, image inspection method, and image inspection program
JP3159063B2 (en) Surface defect inspection equipment
JP2002039949A (en) Method for regulating threshold used in coat defect inspecting step
JP3871963B2 (en) Surface inspection apparatus and surface inspection method
JPH1114334A (en) Defect detecting method and device of netset or wired glass
JP2710527B2 (en) Inspection equipment for periodic patterns
TW202240546A (en) Image augmentation techniques for automated visual inspection
JP4017585B2 (en) Paint surface inspection equipment

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20041112

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20041207

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050426