JPH04308979A - Method for identifying color - Google Patents

Method for identifying color

Info

Publication number
JPH04308979A
JPH04308979A JP3101987A JP10198791A JPH04308979A JP H04308979 A JPH04308979 A JP H04308979A JP 3101987 A JP3101987 A JP 3101987A JP 10198791 A JP10198791 A JP 10198791A JP H04308979 A JPH04308979 A JP H04308979A
Authority
JP
Japan
Prior art keywords
mark
color
image data
binarized
component
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
JP3101987A
Other languages
Japanese (ja)
Inventor
Yoshimi Niihara
良美 新原
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.)
Mazda Motor Corp
Original Assignee
Mazda 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 Mazda Motor Corp filed Critical Mazda Motor Corp
Priority to JP3101987A priority Critical patent/JPH04308979A/en
Publication of JPH04308979A publication Critical patent/JPH04308979A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Spectrometry And Color Measurement (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Input (AREA)
  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)

Abstract

PURPOSE:To provide the color identifying method which can easily identify colors in a short time and can be practically used for a production line or a check line. CONSTITUTION:The luminance of an RGB component contained in the mark colors of defect marks M1-M3 is set beforehand as a judgement threshold value for binarizing the RGB component of image data, and the respective component of R, G and B in the image data of image signals supplied from a color camera are binarized by the respective judgement threshold values for the RGB components of the respective mark colors as mentioned above. Then, three pairs of binary data for the respective mark colors obtained as the result are ANDed and based on the AND, the respective mark colors are identified.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明はカラー色の識別方法に関
し、特に検出対象色を簡単に且つ短時間に識別し得るよ
うなカラー色の識別方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color identification method, and more particularly to a color identification method that allows a color to be detected to be easily and quickly identified.

【0002】0002

【従来技術】近年、製品の組立や検査においては作業の
自動化を図る為、部品や製品の形状又はそれらに印され
た文字やマークなどの形状を自動的に識別する技術以外
に、部品や製品のカラー色又はそれらに印されたマーク
などのカラー色を検出対象色として自動的に識別する技
術の開発が進められている。従来、前記カラー色を識別
する方法としては、カラー色をカラーのCCDカメラで
撮像し、そのRGB成分からなる画像信号をA/D変換
したカラー画像データを用い、画素毎のカラー画像デー
タに種々の色彩距離変換演算や濃淡化演算を実行し、そ
れらの演算結果から画素に関する輝度、色相及び彩度を
求めて画素毎に色を識別し、同様の演算を全画素につい
て繰り返し実行してカラー色を識別する方法が用いられ
ていた。
[Prior Art] In recent years, in order to automate work in product assembly and inspection, in addition to technology that automatically identifies the shape of parts and products, or the shapes of characters and marks marked on them, Development of technology is underway to automatically identify colors such as colors or marks marked on them as detection target colors. Conventionally, the method for identifying colors uses color image data obtained by capturing an image of a color with a color CCD camera and A/D converting the image signal consisting of RGB components, and various types of color image data are used for each pixel. Perform color distance conversion calculations and gradation calculations, determine the brightness, hue, and saturation for each pixel from the results of these calculations, identify the color for each pixel, and repeat the same calculations for all pixels to determine the color. A method of identifying was used.

【0003】0003

【発明が解決しようとする課題】前記従来のカラー色を
識別する方法においては、画素毎に複雑且つ膨大な演算
処理を必要とし、この演算処理を例えば約2万画素のカ
ラー画像データに施してカラー色を識別しようとすると
カラー色の識別に長時間要するため、従来の識別方法を
、生産ラインや検査ラインにおいて実用化することがで
きないという問題がある。加えて、ソフトウェアも複雑
且つ膨大なものとなり、ソフトウェアのコストの点から
も不利である。
[Problems to be Solved by the Invention] The conventional method for identifying colors requires complex and enormous arithmetic processing for each pixel, and this arithmetic processing is performed on, for example, color image data of approximately 20,000 pixels. Since it takes a long time to identify colors, there is a problem in that conventional identification methods cannot be put to practical use on production lines or inspection lines. In addition, the software becomes complex and enormous, which is disadvantageous in terms of software cost.

【0004】本発明の目的は、カラー色を簡単に且つ短
時間に識別することが出来、生産ラインや検査ラインに
おいて実用化し得るようなカラー色の識別方法を提供す
ることである。
An object of the present invention is to provide a method for identifying colors that can be easily and quickly identified and that can be put to practical use on production lines and inspection lines.

【0005】[0005]

【課題を解決するための手段】本発明に係るカラー色の
識別方法は、1又は複数の検出対象色をカラーのCCD
カメラで撮像し、そのRGB成分からなる画像信号をA
/D変換したカラー画像データを用いて検出対象色を識
別する方法において、前記各検出対象色の画像データに
含まれるRGB成分の3つの輝度を、画像データのRG
B成分を夫々2値化する為の判定しきい値であって判定
しきい値以上のときに「1」とする判定しきい値として
予め設定し、前記カメラから供給される各撮像画面毎の
画像信号の画像データのRGBの各成分を、各検出対象
色のRGB成分の各判定しきい値でもって2値化処理し
、その結果得られた各検出対象色毎の3組の2値化デー
タの論理積を求め、その論理積に基いて前記各検出対象
色を識別するものである。
[Means for Solving the Problems] A color identification method according to the present invention includes detecting one or more detection target colors using a color CCD.
A camera captures an image signal consisting of RGB components.
In a method for identifying a detection target color using /D-converted color image data, the three luminances of RGB components included in the image data of each detection target color are
It is a judgment threshold for binarizing each B component, and is set in advance as a judgment threshold that is set to "1" when it is equal to or higher than the judgment threshold. Each of the RGB components of the image data of the image signal is binarized using each determination threshold value of the RGB component of each detection target color, and the resulting three sets of binarization are obtained for each detection target color. The logical product of the data is calculated, and each detection target color is identified based on the logical product.

【0006】[0006]

【作用】本発明に係るカラー色の識別方法においては、
1又は複数の検出対象色を識別するときには、先ず、各
検出対象色をカラーのCCDカメラで撮像し、そのRG
B成分からなる画像信号をA/D変換したカラー画像デ
ータに含まれるRGB成分の3つの輝度を、画像データ
のRGB成分を夫々2値化する為の判定しきい値であっ
て判定しきい値以上のときに「1」とする判定しきい値
として予め設定する。次に、CCDカメラから供給され
る各撮像画面毎の画像信号の画像データのRGB成分を
、各検出対象色のRGB成分の各判定しきい値でもって
2値化処理する。このとき、例えば画像信号に複数の検
出対象色のうちの1つの検出対象色が含まれているとす
ると、この画像信号の画像データのRBG成分を各検出
対象色のRGB成分の各判定しきい値で2値化処理した
2値化データのうち、画像信号に含まれている検出対象
色のRGB成分の各判定しきい値で2値化処理したRG
B成分の2値化データの検出対象色に対応する部分だけ
が夫々「1」として2値化され、検出対象色に対応する
部分以外の部分は「1」又は「0」として2値化される
。次に、各検出対象色のRGB成分の各判定しきい値で
2値化処理した各検出対象色毎の3組の2値化データの
論理積を求める。このとき、画像信号に含まれた検出対
象色の各判定しきい値で2値化処理した3組の2値化デ
ータの論理積には、検出対象色に対応する部分だけが「
1」として表されている。次に、各検出対象色毎の前記
論理積に基いて前記各検出対象色を識別する。
[Operation] In the color identification method according to the present invention,
When identifying one or more detection target colors, first, each detection target color is imaged with a color CCD camera, and its RG
A determination threshold for converting the three luminances of RGB components included in color image data obtained by A/D conversion of an image signal consisting of B components into binarization of each of the RGB components of the image data. In the above cases, a determination threshold value of "1" is set in advance. Next, the RGB components of the image data of the image signal for each imaging screen supplied from the CCD camera are binarized using the respective determination thresholds for the RGB components of each detection target color. At this time, for example, if the image signal contains one detection target color out of a plurality of detection target colors, the RBG components of the image data of this image signal are set to the respective determination thresholds of the RGB components of each detection target color. Among the binarized data that has been binarized by value, RG has been binarized by each judgment threshold of the RGB components of the detection target color included in the image signal.
Only the portions of the B component binarized data that correspond to the detection target color are binarized as “1”, and the portions other than the portions corresponding to the detection target color are binarized as “1” or “0”. Ru. Next, the logical product of the three sets of binarized data for each detection target color that has been binarized using each determination threshold value of the RGB components of each detection target color is determined. At this time, in the AND of the three sets of binarized data that have been binarized using each judgment threshold for the detection target color included in the image signal, only the portion corresponding to the detection target color is "
1”. Next, each detection target color is identified based on the logical product for each detection target color.

【0007】このように、各検出対象色の画像信号をA
/D変換したカラー画像データに含まれるRGB成分の
3つの輝度を、画像データのRGB成分を夫々2値化す
る為の判定しきい値として予め設定し、カメラから供給
される各撮像画面毎の画像信号の画像データのRGB成
分を各検出対象色の各判定しきい値で2値化処理し、そ
の結果得られた各検出対象色毎の3組の2値化データの
論理積を求め、その論理積に基いて各検出対象色を識別
するので、簡単に且つ短時間に画像データから検出対象
色を識別することが出来、この識別方法を生産ラインや
検査ラインにおいて実用化することが出来る。  また
、画像データから検出対象色を識別するための複雑且つ
膨大な演算処理を省略出来、検出対象色を識別するため
のソフトウェアを極めて簡単化出来るので、ソフトウェ
アのコストを低減することが出来る。
In this way, the image signal of each detection target color is
The three luminances of the RGB components included in the /D-converted color image data are set in advance as judgment thresholds for binarizing the RGB components of the image data, and Binarize the RGB components of the image data of the image signal using each determination threshold value for each detection target color, and calculate the logical product of the three sets of binarized data for each detection target color obtained as a result, Since each detection target color is identified based on the logical product, the detection target color can be easily and quickly identified from image data, and this identification method can be put to practical use on production lines and inspection lines. . Further, the complicated and enormous calculation process for identifying the detection target color from the image data can be omitted, and the software for identifying the detection target color can be extremely simplified, so that the cost of the software can be reduced.

【0008】[0008]

【発明の効果】本発明に係るカラー色の識別方法によれ
ば以上作用の項で説明したように、各検出対象色のRG
B成分の3つの輝度を、画像データのRGB成分を夫々
2値化する為の判定しきい値として予め設定し、カメラ
から供給される各撮像画面毎の画像信号の画像データの
RGB成分を各検出対象色の各判定しきい値で2値化処
理し、その結果得られた各検出対象色毎の3組の2値化
データの論理積を求め、その論理積に基いて各検出対象
色を識別するので、簡単に且つ短時間に画像データから
検出対象色を識別することが出来ること、この識別方法
を生産ラインや検査ラインにおいて実用化することが出
来ること、画像データから検出対象色を識別するための
複雑且つ膨大な演算処理を省略出来、検出対象色を識別
するためのソフトウェアも極めて簡単化出来るので、ソ
フトウェアのコストを低減することが出来ること、など
の効果が得られる。
Effects of the Invention According to the color identification method according to the present invention, as explained in the operation section above, the RG of each detection target color is
The three luminances of the B component are set in advance as judgment thresholds for binarizing the RGB components of the image data, and the RGB components of the image data of the image signal for each imaging screen supplied from the camera are set in advance. Perform binarization processing using each judgment threshold for each detection target color, calculate the logical product of the three sets of binarized data for each detection target color, and calculate each detection target color based on the logical product. , the color to be detected can be easily and quickly identified from image data, this identification method can be put to practical use on production lines and inspection lines, and the color to be detected can be identified from image data. Complex and enormous arithmetic processing for identification can be omitted, and the software for identifying the detection target color can be extremely simplified, resulting in effects such as a reduction in software costs.

【0009】[0009]

【実施例】以下、本発明の実施例について図面に基いて
説明する。本実施例は、自動車製造工場の水研加工ライ
ンにおける車体に印された塗装欠陥を示す欠陥マークの
マーク色の識別方法に本発明を適用したものである。 尚、車体の前後左右を基準に前後左右を定義して説明す
る。
Embodiments Hereinafter, embodiments of the present invention will be described with reference to the drawings. In this embodiment, the present invention is applied to a method for identifying the color of a defect mark indicating a paint defect marked on a car body in a water polishing line of an automobile manufacturing factory. Note that the description will be made by defining front, rear, left, and right based on the front, rear, left, and right of the vehicle body.

【0010】前記水研加工ラインLについて簡単に説明
する。図1に示すように、中塗塗装ライン(図示略)の
下流側に設けられた水研加工ラインLには、上流側から
検査マーキングステーションL1、マーク検出ステーシ
ョンL2、研磨ステーションL3及び水洗ステーション
L4が設けられている。検査マーキングステーションL
1には、検査員m1・m2が配置され、黒色に中塗りさ
れた車体Bは検査マーキングステーションL1に搬送さ
れ、検査員m1・m2により車体Bの塗装面の目視検査
が行われる。検査員m1・m2は塗装面にピンポールや
タレなどの塗装欠陥を発見すると、塗装欠陥部位に施す
べき研磨の研磨グレードに対応させて色別に設定された
3つのマークスタンプのうちの対応するものを選択して
塗装欠陥部位に欠陥マークMをつける。表1に示すよう
に、欠陥度合が著しく重研磨が必要な部位には黄緑色の
欠陥マークM1が、中研磨が必要な部位には橙色の欠陥
マークM2が、軽研磨が必要な部位には黄色の欠陥マー
クM3がつけられるようになっており、また、これら欠
陥マークMには「1」〜「3」の数値が研磨グレードを
示すデータ値として夫々割付けられている。尚、欠陥マ
ークMの大きさは直径約10mmである。
The water polishing line L will be briefly explained. As shown in FIG. 1, the water polishing line L provided downstream of the intermediate coating line (not shown) includes an inspection marking station L1, a mark detection station L2, a polishing station L3, and a water washing station L4 from the upstream side. It is provided. Inspection marking station L
1, inspectors m1 and m2 are arranged, and the vehicle body B coated with black is transported to the inspection marking station L1, where the inspectors m1 and m2 visually inspect the painted surface of the vehicle body B. When inspectors m1 and m2 find paint defects such as pinholes or sagging on the paint surface, they will select the corresponding one of the three color-coded mark stamps that correspond to the polishing grade that should be applied to the paint defect area. Select and attach a defect mark M to the defective part of the coating. As shown in Table 1, areas with significant defects that require heavy polishing are marked with a yellow-green defect mark M1, areas that require medium polishing are marked with an orange defect mark M2, and areas that require light polishing are marked with a yellow-green defect mark M2. Yellow defect marks M3 are attached, and numerical values from "1" to "3" are assigned to each of these defect marks M as data values indicating the polishing grade. Note that the size of the defect mark M is approximately 10 mm in diameter.

【表1】[Table 1]

【0011】マーク検出ステーションL2には、車体B
につけられた欠陥マークMを検出するためのマーク検出
装置10・10Aが設けられ、マーク検出装置10は車
体Bの左半部につけられた欠陥マークMを検出し、マー
ク検出装置10Aは車体Bの右半部につけられた欠陥マ
ークMを検出するようになっている。研磨ステーション
L3には、塗装欠陥部位を研磨するための研磨装置50
・50Aが設けられ、研磨装置50はマーク検出装置1
0からの検出データを受けて車体Bの左半部の欠陥部位
を研磨し、研磨装置50Aはマーク検出装置10Aから
の検出データを受けて車体Bの右半部の欠陥部位を研磨
するようになっている。水洗ステーションL4には複数
の水洗シャワー1と水洗ブラシ2・3が設けられ、研磨
後の車体Bの水洗いをするようになっている。
At the mark detection station L2, the vehicle body B
Mark detection devices 10 and 10A are provided to detect defective marks M placed on the left half of the vehicle body B, and the mark detection device 10A detects the defective marks M placed on the left half of the vehicle body B. A defective mark M placed on the right half is detected. The polishing station L3 includes a polishing device 50 for polishing defective parts of the paint.
・50A is provided, and the polishing device 50 is the mark detection device 1
The polishing device 50A receives the detection data from the mark detection device 10A and polishes the defective portion on the left half of the vehicle body B. It has become. The washing station L4 is provided with a plurality of washing showers 1 and washing brushes 2 and 3, and is designed to wash the car body B after polishing.

【0012】次に、マーク検出ステーションL2に設け
られたマーク検出装置10・10Aについて説明する。 但し、マーク検知装置10・10Aは同様の構成なので
、マーク検出装置10について説明する。図2に示すよ
うに、マーク検出装置10は、多関節型のマーク検出ロ
ボット11と、マーク検出ロボット11のハンド12の
先端に設けられ車体Bの塗装面を予め設定された小検査
領域S毎に撮像する為の撮像装置20と、ロボット11
を駆動制御するとともに撮像装置20からの画像信号を
画像処理するための制御装置30とで構成されている。 撮像装置20は、ロボット11のハンド12に装着され
た支持部材21と、支持部材21の支持部21aに所定
の取付角度で設けられ小検査領域Sに照射光を投光する
ための投光器22と、支持部21bに所定の取付角度で
設けられ投光器22で照射された小検査領域Sを撮像す
るカラーのCCDカメラ23とで構成されている。 制御装置30は、メイン制御ユニット31とロボット制
御ユニット32と投光器制御ユニット33と画像処理ユ
ニット34とで構成され、車体Bがマーク検出ステーシ
ョンL2の所定位置に搬送されると、メイン制御ユニッ
ト31から投光器制御ユニット33に制御信号が出力さ
れて投光器22が起動されるとともに、メイン制御ユニ
ット31からロボット制御ユニット32に起動指令信号
が出力され、予め設定された制御プログラムに基いてロ
ボット制御ユニット32によりロボット11が駆動制御
され、撮像装置20はロボット11のハンド12を介し
て各小検査領域Sを撮像し得る所定位置に亙って順次移
動し、CCDカメラ23により各小検査領域Sを撮像す
る。CCDカメラ23で撮像された小検査領域Sの画像
信号は画像処理ユニット34に入力され、画像処理ユニ
ット34において画像信号から欠陥マークMが検出され
てそのマーク色(研磨グレード)と位置とが記憶され、
車体Bの検査終了後、検出された全ての欠陥マークMの
マーク色と位置との検出データはメイン制御ユニット3
1に入力され、メイン制御ユニット31から研磨装置5
0に転送されるようになっている。尚、研磨装置50・
50Aは夫々研磨ロボットと制御装置とで構成されてい
る。
Next, the mark detection devices 10 and 10A provided at the mark detection station L2 will be explained. However, since the mark detection devices 10 and 10A have the same configuration, only the mark detection device 10 will be described. As shown in FIG. 2, the mark detection device 10 includes an articulated mark detection robot 11 and a hand 12 of the mark detection robot 11. an imaging device 20 for capturing an image, and a robot 11
The control device 30 is configured to drive and control the image pickup device 20 and to perform image processing on the image signal from the imaging device 20. The imaging device 20 includes a support member 21 attached to the hand 12 of the robot 11, and a light projector 22 installed at a predetermined angle on the support portion 21a of the support member 21 for projecting irradiation light onto the small inspection area S. , and a color CCD camera 23 that is installed at a predetermined angle on the support portion 21b and captures an image of the small inspection area S illuminated by the projector 22. The control device 30 includes a main control unit 31, a robot control unit 32, a floodlight control unit 33, and an image processing unit 34. When the vehicle body B is transported to a predetermined position of the mark detection station L2, the main control unit 31 A control signal is output to the projector control unit 33 to start the projector 22, and at the same time, a start command signal is output from the main control unit 31 to the robot control unit 32, and the robot control unit 32 operates based on a preset control program. The robot 11 is driven and controlled, and the imaging device 20 sequentially moves through the hand 12 of the robot 11 to predetermined positions where each small inspection area S can be imaged, and the CCD camera 23 images each small inspection area S. . The image signal of the small inspection area S captured by the CCD camera 23 is input to the image processing unit 34, where the defect mark M is detected from the image signal and its mark color (polishing grade) and position are memorized. is,
After the inspection of the vehicle body B is completed, the detection data of the mark colors and positions of all detected defective marks M is sent to the main control unit 3.
1, and the polishing device 5 is input from the main control unit 31.
0. In addition, the polishing device 50
50A each consists of a polishing robot and a control device.

【0013】次に、画像処理ユニット34について説明
する。図3に示すように、画像処理ユニット34は、C
CDカメラ23から入力されるRGB成分からなる画像
信号を増幅などのアナログ処理する信号処理部35と、
信号処理部35で処理された画像信号のRGB成分を夫
々8ビット階調の輝度にて256段階のディジタル値の
画像データに変換するA/D変換部36と、画像データ
を記憶する画像メモリ部37と、後述する欠陥マーク検
出制御の制御プログラムが格納されたプログラムメモリ
部38と、メイン制御ユニット31とのデータの入出力
の為の入出力インターフェイス部39及びマイクロプロ
セッサ部40とで構成され、各部35〜40は図示のよ
うにバスで接続されている。
Next, the image processing unit 34 will be explained. As shown in FIG. 3, the image processing unit 34
a signal processing unit 35 that performs analog processing such as amplification on an image signal composed of RGB components inputted from the CD camera 23;
An A/D conversion unit 36 that converts the RGB components of the image signal processed by the signal processing unit 35 into image data of 256 levels of digital values at 8-bit gradation brightness, and an image memory unit that stores the image data. 37, a program memory section 38 storing a control program for defective mark detection control to be described later, an input/output interface section 39 for inputting and outputting data to and from the main control unit 31, and a microprocessor section 40. Each part 35-40 is connected by a bus as shown.

【0014】次に、前記欠陥マーク検出制御の制御プロ
グラムに予め設定されている各欠陥マークMのマーク色
の判定しきい値について説明する。判定しきい値は、C
CDカメラ23から供給される画像信号の画像データの
RGB成分を、夫々判定しきい値以上のときに「1」と
して2値化するためのしきい値であって、実験的に求め
たものである。即ち、黒色に中塗りされた車体Bに各欠
陥マークMを印してそれをCCDカメラ23で撮像し、
その画像信号をA/D変換した画像データに含まれるR
GB成分の3つの輝度分布の平均値を各欠陥マークM毎
に求め、それらを表1に示すように各欠陥マークMのマ
ーク色の判定しきい値として設定したものであり、これ
ら判定しきい値はデータとしてテーブルに予め設定され
ている。
Next, a description will be given of the mark color determination thresholds for each defective mark M, which are preset in the control program for the defective mark detection control. The judgment threshold is C
This threshold value is used to binarize the RGB components of the image data of the image signal supplied from the CD camera 23 as "1" when each is equal to or higher than the determination threshold value, and is determined experimentally. be. That is, each defect mark M is marked on the car body B, which is coated in black, and is imaged by the CCD camera 23.
R included in the image data obtained by A/D converting the image signal
The average value of the three brightness distributions of the GB components is determined for each defective mark M, and these are set as the mark color determination threshold for each defective mark M as shown in Table 1. The values are preset in the table as data.

【0015】次に、欠陥マーク検出制御ついて、図4・
図5のフローチャートに基いて説明する。但し、図中S
i(i=1、2、・・・)は各ステップを示す。尚、こ
の制御はマーク検出装置10・10Aについて同様なの
でマーク検出装置10における制御について説明する。 制御が開始すると、カウンタ及びメモリのクリア等の初
期化が行われ(S1)、次に、車体Bがマーク検出ステ
ーションL2の所定位置に搬送され、撮像装置20がロ
ボット11のハンド12を介して最初に撮像する小検査
領域Sの撮像位置に移動して撮像が可能になると(S2
:Yes)、次にCCDカメラ23で小検査領域Sが撮
像されその1画面分の画像信号が入力される(S3)。 次に、入力された画像信号のRGB成分が夫々画素毎に
A/D変換され(S4)、A/D変換されたRGB成分
の画像データは夫々画像メモリ部37に記憶される(S
5)。即ち、図6に1例として示すように、撮像した小
検査領域Sに黄緑色の欠陥マークM1と橙色の欠陥マー
クM2と黄色の欠陥マークM3とがつけられていたとす
ると、その小検査領域Sについての画像データのRGB
成分の夫々の欠陥マークM1〜M3の画素に対応する部
分には、夫々欠陥マークM1〜M3のマーク色のRGB
成分の輝度値が画像データとして含まれている。 次に、画像メモリ部37から画像データのR成分が読込
まれ(S6)、次に欠陥マークM1のマーク色のR成分
の判定しきい値が設定され(S7)、次にこの判定しき
い値により画像データのR成分が2値化処理され(S8
)、次に2値化処理された2値化データが画像メモリ部
37に記憶される(S9)。S7の2値化処理において
、画像データのR成分のうち欠陥マークM1の部分は、
図7に実線の丸印で示したように、自身の判定しきい値
で2値化されるので「1」として2値化され、欠陥マー
クM2の部分はそのR成分が判定しきい値より大きいの
で同様に「1」として2値化され、欠陥マークM3の部
分はそのR成分が判定しきい値より小さいので、図7に
2点鎖線の丸印で示したように、「0」として2値化さ
れる。尚、欠陥マークM1〜M3以外の部分は黒色なの
で「0」として2値化される。
Next, regarding defect mark detection control, FIG.
This will be explained based on the flowchart in FIG. However, S in the diagram
i (i=1, 2, . . . ) indicates each step. Note that this control is the same for the mark detection devices 10 and 10A, so the control in the mark detection device 10 will be explained. When the control starts, initialization such as clearing the counter and memory is performed (S1), and then the vehicle body B is transported to a predetermined position of the mark detection station L2, and the imaging device 20 is When moving to the imaging position of the small inspection area S to be imaged first and imaging becomes possible (S2
:Yes), then the small inspection area S is imaged by the CCD camera 23, and the image signal for one screen is input (S3). Next, the RGB components of the input image signal are A/D converted for each pixel (S4), and the image data of the A/D converted RGB components are stored in the image memory section 37 (S4).
5). That is, as shown in FIG. 6 as an example, if a yellow-green defect mark M1, an orange defect mark M2, and a yellow defect mark M3 are attached to the imaged small inspection area S, then the small inspection area S RGB of image data about
In the portion corresponding to the pixel of each defective mark M1 to M3 of the component, RGB of the mark color of the defective mark M1 to M3, respectively.
The brightness values of the components are included as image data. Next, the R component of the image data is read from the image memory unit 37 (S6), then a determination threshold value for the R component of the mark color of the defective mark M1 is set (S7), and then this determination threshold value is set (S7). The R component of the image data is binarized (S8
), and then the binarized data subjected to the binarization process is stored in the image memory section 37 (S9). In the binarization process of S7, the defect mark M1 portion of the R component of the image data is
As shown by the solid circle in Fig. 7, it is binarized at its own judgment threshold, so it is binarized as "1", and the R component of the defect mark M2 part is lower than the judgment threshold. Since it is large, it is similarly binarized as "1", and since the R component of the defect mark M3 part is smaller than the determination threshold, it is binarized as "0" as shown by the double-dashed line circle in FIG. Binarized. Incidentally, since the portions other than the defect marks M1 to M3 are black, they are binarized as "0".

【0016】次に、3種類のマーク色に対応する判定し
きい値が設定される毎にカウントするカウンタが1つイ
ンクリメントされ(S10)、次にカウンタの数値が「
3」か否かが判定され(S11)、この場合Noなので
S7に移行し、S7において欠陥マークM2のマーク色
のR成分の判定しきい値が設定され、以下前記同様にS
8〜S11が実行され、次にS11においてカウンタの
数値が判定されると、この場合もNoなのでS7に移行
し、S7において欠陥マークM3のマーク色のR成分の
判定しきい値が設定され、以下前記同様にS8〜S11
が実行される。S8において、欠陥マークM2のR成分
の判定しきい値で画像データのR成分が2値化処理され
ると、図11に示したように、画像データのR成分のう
ち欠陥マークM1の部分は、そのR成分が判定しきい値
より小さいので「0」として2値化され、欠陥マークM
2の部分は自身の判定しきい値で2値化されるので「1
」として2値化され、欠陥マークM3の部分は、そのR
成分が判定しきい値より小さいので「0」として2値化
される。また、S8において、欠陥マークM3のR成分
の判定しきい値で画像データのR成分が2値化処理され
ると、画像データの欠陥マークM1〜M3の部分はいづ
れもそのR成分が判定しきい値に以上なので、図15に
示したように、それらの部分全て「1」として2値化さ
れる。次にS11においてカウンタの数値が「3」か否
かが判定されると、YesなのでS12に移行する。
Next, a counter is incremented by one each time the judgment thresholds corresponding to the three types of mark colors are set (S10), and then the value of the counter becomes "
3" (S11), and in this case, since it is No, the process moves to S7. In S7, the judgment threshold of the R component of the mark color of the defective mark M2 is set.
8 to S11 are executed, and then in S11 the value of the counter is determined. Since the result is No in this case as well, the process moves to S7, and in S7, a determination threshold value for the R component of the mark color of the defective mark M3 is set. Hereinafter, S8 to S11 as above
is executed. In S8, when the R component of the image data is binarized using the judgment threshold for the R component of the defect mark M2, as shown in FIG. , the R component is smaller than the determination threshold, so it is binarized as "0" and the defect mark M
The 2 part is binarized using its own judgment threshold, so it is ``1''.
", and the defect mark M3 is binarized as
Since the component is smaller than the determination threshold, it is binarized as "0". Further, in S8, when the R component of the image data is binarized using the determination threshold for the R component of the defect mark M3, the R component is determined for each of the defect marks M1 to M3 of the image data. Since the threshold value is exceeded, all of those parts are binarized as "1" as shown in FIG. 15. Next, in S11, it is determined whether the counter value is "3" or not, and since it is YES, the process moves to S12.

【0017】S12において、画像メモリ部37から画
像データのG成分が読込まれ、このG成分について欠陥
マークM1〜M3のG成分の判定しきい値により前記S
7〜S11と同様のS13〜S17の処理が実行される
。この結果、夫々図8・図12・図16に示したような
2値化データが得られ、これら2値化データは画像メモ
リ部37に記憶される。次にS18に移行すると、画像
メモリ部37から画像データのB成分が読込まれ、この
B成分について欠陥マークM1〜M3のB成分の判定し
きい値により前記S7〜S11と同様のS19〜S23
の処理が実行される。この結果、夫々図9・図13・図
17に示したような2値化データが得られ、これら2値
化データは画像メモリ部37に記憶される。
In S12, the G component of the image data is read from the image memory unit 37, and the G component of the defect marks M1 to M3 is determined based on the determination threshold of the G component of the defect marks M1 to M3.
Processes S13 to S17 similar to steps S7 to S11 are executed. As a result, binarized data as shown in FIGS. 8, 12, and 16 are obtained, and these binarized data are stored in the image memory section 37. Next, in S18, the B component of the image data is read from the image memory section 37, and the B component of the defect marks M1 to M3 is determined in steps S19 to S2, which are similar to S7 to S11, based on the determination threshold of the B component of the defect marks M1 to M3.
processing is executed. As a result, binarized data as shown in FIGS. 9, 13, and 17 are obtained, and these binarized data are stored in the image memory section 37.

【0018】次に、各欠陥マークM1〜M3のRGB成
分の各判定しきい値で2値化処理した各欠陥マーク色毎
の3組の2値化データが画像メモリ部37から読込まれ
(S24)、次に3組の2値化データの論理積が求めら
れる(S25)。この結果、欠陥マークM1のRGB成
分の各判定しきい値で2値化処理した3組の2値化デー
タ(図7〜図9)の論理積は、図10に示すように、欠
陥マークM1の部分だけが「1」として表された欠陥マ
ークM1の画像データとなり、欠陥マークM2のRGB
成分の各判定しきい値で2値化処理した3組の2値化デ
ータ(図11〜図13)の論理積は、図14に示すよう
に、欠陥マークM2の部分だけが「1」として表された
欠陥マークM2の画像データとなり、欠陥マークM3の
RGB成分の各判定しきい値で2値化処理した3組の2
値化データ(図15〜図17)の論理積は、図18に示
すように、欠陥マークM3の部分だけが「1」として表
された欠陥マークM3の画像データとなる。
Next, three sets of binarized data for each defect mark color are read from the image memory section 37 (S24). ), and then the logical product of the three sets of binarized data is calculated (S25). As a result, as shown in FIG. 10, the logical product of the three sets of binarized data (FIGS. 7 to 9) that have been binarized using the respective judgment thresholds for the RGB components of the defective mark M1 is Only the part becomes the image data of the defective mark M1 expressed as "1", and the RGB of the defective mark M2
As shown in FIG. 14, the logical product of three sets of binarized data (FIGS. 11 to 13) that have been binarized using each determination threshold value for each component shows that only the defect mark M2 is "1". The image data of the represented defect mark M2 is obtained, and three sets of 2
The logical product of the valued data (FIGS. 15 to 17) becomes image data of the defective mark M3 in which only the portion of the defective mark M3 is expressed as "1", as shown in FIG. 18.

【0019】次に、前記論理積を求めて得られた各画像
データについてラベリング処理を施し(S26)、次に
ラベリング処理された各画像データについて欠陥マーク
M1〜M3の部分の重心位置が夫々演算され(S27)
、これら重心位置と欠陥マークM1〜M2が示す研磨デ
ータの数値とが対応づけられて記憶される(S28)。 この場合、欠陥マークM1〜M3の夫々の重心位置は、
撮像画像に設定したx・y座標系に対する重心のx・y
座標値が演算され記憶される。次に、全小検査領域Sに
ついてマーク検出が終了したか否かが判定され(S29
)、この場合終了していないので、S2に戻り、以下各
小検出領域S毎にS2〜S29が繰り返えされ、全小検
出領域Sについてマーク検出が終了すると(S29:Y
es)、表2に示すように、S28において記憶された
欠陥マークMの検出データが研磨装置50の制御装置に
転送される(S30)。尚、マーク検知装置10のマー
ク検出と並行してマーク検出装置10Aによるマーク検
出も実行され、マーク検出装置10Aから研磨装置50
Aに検知データが同様に転送され、これら検出データに
基いて研磨装置50・50Aにより車体Bの塗装欠陥部
位に研磨が施される。
Next, each image data obtained by calculating the logical product is subjected to labeling processing (S26), and then the centroid positions of the defect marks M1 to M3 are calculated for each image data subjected to the labeling processing. (S27)
, these center of gravity positions and the numerical values of the polishing data indicated by the defect marks M1 to M2 are stored in association with each other (S28). In this case, the center of gravity of each of the defect marks M1 to M3 is
x and y of the center of gravity for the x and y coordinate system set in the captured image
Coordinate values are calculated and stored. Next, it is determined whether mark detection has been completed for all the small inspection areas S (S29
), in this case, it has not finished, so the process returns to S2, and steps S2 to S29 are repeated for each small detection area S, and when mark detection is finished for all small detection areas S (S29: Y
es), as shown in Table 2, the detection data of the defect mark M stored in S28 is transferred to the control device of the polishing apparatus 50 (S30). Note that mark detection by the mark detection device 10A is also performed in parallel with mark detection by the mark detection device 10, and the mark detection device 10A performs mark detection by the polishing device 50.
The detected data is similarly transferred to A, and the paint defective portion of the vehicle body B is polished by the polishing devices 50 and 50A based on these detected data.

【表2】[Table 2]

【0020】このように、各欠陥マークM1〜M3の画
像信号をA/D変換したカラー画像データに含まれるR
GB成分の3つの輝度を、画像データのRGB成分を夫
々2値化する為の判定しきい値として予め設定し、カメ
ラ23から供給される各画像信号の画像データのRGB
成分を各欠陥マークM1〜M3の各判定しきい値で2値
化処理し、その結果得られた欠陥マーク色毎の3組の2
値化データの論理積を求め、その論理積に基いて各欠陥
マークM1〜M3を識別するので、簡単に且つ短時間に
画像データから欠陥マークMを識別することが出来る。 また、画像データから欠陥マークMを識別するための複
雑且つ膨大な演算処理を省略出来、欠陥マークMを識別
するためのソフトウェアを極めて簡単化出来るので、ソ
フトウェアのコストを低減することが出来る。尚、研磨
グレードは3段階に限らず2段階以上の種々の段階に設
定することも有り得るし、その場合欠陥マークMのマー
ク色は研磨グレードの段階に応じて色別すればよい。ま
た、欠陥マークMのマーク色は前記マーク色以外の種々
の色を用いることも可能である。更に、欠陥マークMの
マーク色の判定しきい値は前記値に限らず、各マーク色
のRGB成分の輝度分布の範囲内で小検査領域Sの撮像
条件に適応させて種々に設定してもよい。尚、前記カラ
ー色の識別方法は、塗装欠陥の欠陥マークの識別に限ら
ず、種々の部品や製品のカラー色又は部品や製品に印さ
れたマークの色の識別に適用出来ることは勿論である。
In this way, R contained in the color image data obtained by A/D converting the image signals of each defect mark M1 to M3.
The three luminances of the GB components are set in advance as judgment thresholds for binarizing the RGB components of the image data, respectively, and the RGB of the image data of each image signal supplied from the camera 23 is set in advance.
The components are binarized using each determination threshold value for each defect mark M1 to M3, and three sets of 2 for each defect mark color are obtained as a result.
Since the logical product of the value data is calculated and each defective mark M1 to M3 is identified based on the logical product, the defective mark M can be easily and quickly identified from the image data. Moreover, the complicated and enormous calculation process for identifying the defective mark M from image data can be omitted, and the software for identifying the defective mark M can be extremely simplified, so that the cost of the software can be reduced. Note that the polishing grade is not limited to three stages, but may be set to two or more various stages, and in that case, the mark color of the defect mark M may be differentiated according to the polishing grade stage. Further, as the mark color of the defect mark M, it is also possible to use various colors other than the above-mentioned mark color. Further, the mark color judgment threshold of the defect mark M is not limited to the above value, but may be set in various ways within the range of the luminance distribution of the RGB components of each mark color, adapting to the imaging conditions of the small inspection area S. good. It should be noted that the color identification method described above is not limited to the identification of defect marks of paint defects, but can of course be applied to the identification of the colors of various parts and products or the colors of marks marked on parts and products. .

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

【図1】水研加工ラインの平面図である。FIG. 1 is a plan view of a water polishing line.

【図2】マーク検出装置の全体構成図である。FIG. 2 is an overall configuration diagram of a mark detection device.

【図3】画像処理ユニットのブロック図である。FIG. 3 is a block diagram of an image processing unit.

【図4】マーク検出制御のルーチンのフローチャートの
一部である。
FIG. 4 is a part of a flowchart of a mark detection control routine.

【図5】マーク検出制御のルーチンのフローチャートの
一部である。
FIG. 5 is a part of a flowchart of a mark detection control routine.

【図6】小検査領域の画像の1例を示す説明図である。FIG. 6 is an explanatory diagram showing an example of an image of a small inspection area.

【図7】画像データのR成分を黄緑色のマーク色のR成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 7 is an explanatory diagram of binarized data obtained by binarizing the R component of image data using a determination threshold value for the R component of a yellow-green mark color.

【図8】画像データのG成分を黄緑色のマーク色のG成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 8 is an explanatory diagram of binarized data obtained by binarizing the G component of image data using a determination threshold value for the G component of a yellow-green mark color.

【図9】画像データのB成分を黄緑色のマーク色のB成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 9 is an explanatory diagram of binarized data obtained by binarizing the B component of image data using a determination threshold value for the B component of a yellow-green mark color.

【図10】図7〜図9に示す2値化データの論理積の説
明図である。
FIG. 10 is an explanatory diagram of logical product of the binarized data shown in FIGS. 7 to 9;

【図11】画像データのR成分を橙色のマーク色のR成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 11 is an explanatory diagram of binarized data obtained by binarizing the R component of image data using a determination threshold value for the R component of an orange mark color.

【図12】画像データのG成分を橙色のマーク色のG成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 12 is an explanatory diagram of binarized data obtained by binarizing the G component of image data using a determination threshold for the G component of the orange mark color.

【図13】画像データのB成分を橙色のマーク色のB成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 13 is an explanatory diagram of binarized data obtained by binarizing the B component of image data using a determination threshold for the B component of an orange mark color.

【図14】図11〜図13に示す2値化データの論理積
の説明図である。
FIG. 14 is an explanatory diagram of logical product of the binarized data shown in FIGS. 11 to 13;

【図15】画像データのR成分を黄色のマーク色のR成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 15 is an explanatory diagram of binarized data obtained by binarizing the R component of image data using the determination threshold value of the R component of the yellow mark color.

【図16】画像データのG成分を黄色のマーク色のG成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 16 is an explanatory diagram of binarized data obtained by binarizing the G component of image data using a determination threshold value for the G component of the yellow mark color.

【図17】画像データのB成分を黄色のマーク色のB成
分の判定しきい値で2値化処理した2値化データの説明
図である。
FIG. 17 is an explanatory diagram of binarized data obtained by binarizing the B component of image data using a determination threshold value for the B component of a yellow mark color.

【図18】図15〜図17に示す2値化データの論理積
の説明図である。
18 is an explanatory diagram of logical product of the binarized data shown in FIGS. 15 to 17. FIG.

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

M1〜M3    欠陥マーク 10・10A    マーク検出装置 23    CCDカメラ 34    画像処理ユニット M1~M3 Defect mark 10/10A mark detection device 23 CCD camera 34 Image processing unit

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】  1又は複数の検出対象色をカラーのC
CDカメラで撮像し、そのRGB成分からなる画像信号
をA/D変換したカラー画像データを用いて検出対象色
を識別する方法において、前記各検出対象色の画像デー
タに含まれるRGB成分の3つの輝度を、画像データの
RGB成分を夫々2値化する為の判定しきい値であって
判定しきい値以上のときに「1」とする判定しきい値と
して予め設定し、前記カメラから供給される各撮像画面
毎の画像信号の画像データのRGBの各成分を、各検出
対象色のRGB成分の各判定しきい値でもって2値化処
理し、その結果得られた各検出対象色毎の3組の2値化
データの論理積を求め、その論理積に基いて前記各検出
対象色を識別することを特徴とするカラー色の識別方法
[Claim 1] One or more detection target colors are color C.
In a method for identifying a detection target color using color image data obtained by capturing an image with a CD camera and A/D converting an image signal consisting of RGB components, three of the RGB components included in the image data of each detection target color are used. The brightness is set in advance as a determination threshold value for binarizing each of the RGB components of image data, which is set to "1" when the brightness is equal to or higher than the determination threshold value, and the luminance is supplied from the camera. The RGB components of the image data of the image signal for each imaging screen are binarized using the determination thresholds for the RGB components of each detection target color, and the resulting A color identification method, characterized in that the logical product of three sets of binary data is calculated, and each detection target color is identified based on the logical product.
JP3101987A 1991-04-06 1991-04-06 Method for identifying color Pending JPH04308979A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3101987A JPH04308979A (en) 1991-04-06 1991-04-06 Method for identifying color

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3101987A JPH04308979A (en) 1991-04-06 1991-04-06 Method for identifying color

Publications (1)

Publication Number Publication Date
JPH04308979A true JPH04308979A (en) 1992-10-30

Family

ID=14315194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3101987A Pending JPH04308979A (en) 1991-04-06 1991-04-06 Method for identifying color

Country Status (1)

Country Link
JP (1) JPH04308979A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021079728A1 (en) * 2019-10-25 2021-04-29

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2021079728A1 (en) * 2019-10-25 2021-04-29
WO2021079728A1 (en) * 2019-10-25 2021-04-29 日本電気株式会社 Defect position determination system, appearance inspection method, and program

Similar Documents

Publication Publication Date Title
EP1477765A1 (en) Method of detecting object of detection and device therefor, and method of inspecting object of inspection and device therefor
US5969753A (en) Method and system for detecting errors in a sample image
US5917957A (en) Method of and apparatus for processing an image
CN111999305B (en) Machine vision hardware system and hub spline combination gap vision detection method
CN109461156B (en) Threaded sealing plug assembly detection method based on vision
CN111426693A (en) Quality defect detection system and detection method thereof
CN113139943B (en) Method and system for detecting appearance defects of open circular ring workpiece and computer storage medium
JPH04308979A (en) Method for identifying color
CN116823771A (en) ZARA defect specification detection method, system and storage medium
JPH03175000A (en) Instrument for inspecting surface defect on press panel
JPH1010054A (en) Inspection device for surface defect
WO2021079727A1 (en) Appearance inspection device, appearance inspection method, and appearance inspection program
JP2973663B2 (en) Bottle mouth appearance inspection method
US7321679B2 (en) Machine for inspecting glass bottles
CN108460763B (en) Automatic detection and identification method for magnetic powder inspection image
JPH109835A (en) Surface flaw inspection apparatus
JP2011179987A (en) Method and device for measurement of residue
JPH09105723A (en) Inspection setting value input displaying method in defect inspection and device therefor
JPH10213420A (en) Formation of reference image used in pattern matching
JP2638121B2 (en) Surface defect inspection equipment
JP2000205846A (en) Device and method for inspecting painting for unevenness
JPH0514951B2 (en)
CN114140458B (en) Method for positioning defect position at edge of object to be measured by utilizing light intersection method
JPH0645845Y2 (en) Automatic surface smoothness inspection device
JPH01210807A (en) Automatic inspecting device for smoothness of paint film