JPH05314252A - Color converting device and object inspecting device - Google Patents

Color converting device and object inspecting device

Info

Publication number
JPH05314252A
JPH05314252A JP4137698A JP13769892A JPH05314252A JP H05314252 A JPH05314252 A JP H05314252A JP 4137698 A JP4137698 A JP 4137698A JP 13769892 A JP13769892 A JP 13769892A JP H05314252 A JPH05314252 A JP H05314252A
Authority
JP
Japan
Prior art keywords
green
red
conversion
blue
signals
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.)
Withdrawn
Application number
JP4137698A
Other languages
Japanese (ja)
Inventor
Kazunori Hayashi
和慶 林
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP4137698A priority Critical patent/JPH05314252A/en
Publication of JPH05314252A publication Critical patent/JPH05314252A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Closed-Circuit Television Systems (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To properly convert red, green and blue signals to hue, saturation and lightness signals without being affected by any environmental change by converting the red, green and blue signals according to a correctable conversion function and outputting those signals. CONSTITUTION:The color signals in the three colors of red, green and blue inputted from a camera 3 receive the compensation of half tone by non-linear conversion tables 12R, 12G and 12B and are respectively converted to linear characteristics. The tables 12R-12B are look-up tables to be rewritten by a CPU 16. The values of the tables 12R-12B are set from a ratio between the values of the red, green and blue signals obtained by photographing a gray sample and the original red, green and blue values of the gray sample. The red, green and blue signals outputted from the tables 12R-12B are converted to the signals of hue H, saturation S and lightness I by an RGB-H conversion part 13H, RGB-S conversion part 13S and RGB-I conversion part 13I.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、赤、緑および青信号
を、色相、彩度および明度信号に変換する色変換装置お
よびこれを利用した物体検査装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a color conversion device for converting red, green and blue signals into hue, saturation and brightness signals and an object inspection device using the same.

【0002】[0002]

【従来の技術】従来は、所定の変換関数に基づいて、
赤、緑および青信号から一意に定まる色相、彩度および
明度信号を得ている。
2. Description of the Related Art Conventionally, based on a predetermined conversion function,
The hue, saturation, and brightness signals that are uniquely determined from the red, green, and blue signals are obtained.

【0003】[0003]

【発明が解決しようとする課題】ところが、同じ色見本
であっても、それを映像信号に変換するカメラなどの入
力装置の特性、その画像を取り込んだときの周囲の明る
さ、照明の色温度によって、赤、緑、青の値が変化し、
色相、彩度、明度の値も変化する。
However, even if the same color sample is used, the characteristics of the input device such as a camera that converts it into a video signal, the ambient brightness when the image is captured, and the color temperature of the illumination. Changes the values of red, green, and blue,
The values of hue, saturation, and brightness also change.

【0004】それを補正するために、カメラのホワイト
バランス調整などが一般に行われている。しかしそれら
は線形な補償しか得られず、また手動で行われる。
In order to correct it, white balance adjustment of a camera is generally performed. However, they only give linear compensation and are done manually.

【0005】その結果、画像処理において入力画像の変
化を吸収しなければならず、また、その変化が線形でな
い場合もあり、精度や処理時間に悪影響を与える。
As a result, changes in the input image must be absorbed in image processing, and the changes may not be linear, which adversely affects accuracy and processing time.

【0006】本発明は、このような状況に鑑みてなされ
たものであり、環境の変化に影響されず、赤、緑および
青信号を、色相、彩度および明度信号に正しく変換でき
るようにすることを目的とする。
The present invention has been made in view of such circumstances, and makes it possible to correctly convert red, green, and blue signals into hue, saturation, and lightness signals without being affected by environmental changes. With the goal.

【0007】[0007]

【課題を解決するための手段】請求項1に記載の色変換
装置は、赤、緑および青信号を補正可能変換関数に従っ
て変換して出力する第1変換手段(例えば、実施例の線
形変換部10R、10Gおよび10B、ならびに非線形
変換テーブル12R、12Gおよび12B)と、この第
1変換手段から出力される赤、緑および青信号を、色
相、彩度および明度信号に変換する第2変換手段(例え
ば、実施例のRGB‐H変換部13H、RGB‐S変換
部13SおよびRGB‐I変換部13I)とを備えるこ
とを特徴とする。
According to a first aspect of the present invention, there is provided a color conversion device for converting red, green and blue signals according to a correctable conversion function and outputting the converted signals (for example, the linear conversion section 10R of the embodiment). 10G and 10B, and non-linear conversion tables 12R, 12G and 12B), and second conversion means (for example, the second conversion means for converting the red, green and blue signals output from the first conversion means into hue, saturation and lightness signals). The RGB-H conversion unit 13H, the RGB-S conversion unit 13S, and the RGB-I conversion unit 13I) of the embodiment are provided.

【0008】請求項2に記載の色変換装置は、第1変換
手段が、赤、緑および青信号を受けて、これらに対応し
て記憶されている赤、緑および青変換テーブル値を出力
する書換可能変換テーブル(例えば、実施例の非線形変
換テーブル12R、12Gおよび12B)を有し、この
変換テーブルの値が、グレイサンプルを撮影して得られ
る赤、緑および青信号の値と、グレイサンプルの本来の
赤、緑および青の値との比率から設定されることを特徴
とする。
According to another aspect of the color conversion device of the present invention, the first conversion means receives the red, green and blue signals and outputs the red, green and blue conversion table values stored corresponding to these signals. Possible conversion table (for example, the non-linear conversion tables 12R, 12G and 12B of the embodiment), and the values of this conversion table are the values of the red, green and blue signals obtained by photographing the gray sample and the original value of the gray sample. It is characterized in that it is set from the ratio with the red, green and blue values of.

【0009】請求項3に記載の物体検査装置は、物体を
撮影することにより得られる赤、緑および青信号を補正
可能変換関数に従って変換して出力する第1変換手段
(例えば、実施例の線形変換部10R、10Gおよび1
0B、ならびに非線形変換テーブル12R、12Gおよ
び12B)と、この第1変換手段から出力される赤、緑
および青信号を、色相、彩度および明度信号に変換する
第2変換手段(例えば、実施例のRGB‐H変換部13
H、RGB‐S変換部13SおよびRGB‐I変換部1
3I)とを備え、第2変換手段の出力に基づいて物体の
色が適当か否か判断することを特徴とする。
An object inspection apparatus according to a third aspect of the present invention is a first conversion means (for example, the linear conversion of the embodiment) which converts and outputs red, green and blue signals obtained by photographing an object according to a correctable conversion function. Parts 10R, 10G and 1
0B, and non-linear conversion tables 12R, 12G and 12B), and second conversion means (for example, in the embodiment) for converting the red, green and blue signals output from the first conversion means into hue, saturation and lightness signals. RGB-H converter 13
H, RGB-S converter 13S and RGB-I converter 1
3I) and determining whether the color of the object is appropriate based on the output of the second conversion means.

【0010】請求項4に記載の物体検査装置は、第1変
換手段が、前記赤、緑および青信号を受けて、これらに
対応して記憶されている赤、緑および青変換テーブル値
を出力する書換可能変換テーブル(例えば、実施例の非
線形変換テーブル12R、12Gおよび12B)を有
し、この変換テーブルの値が、グレイサンプルを撮影し
て得られる赤、緑および青信号の値と、前記グレイサン
プルの本来の赤、緑および青の値との比率から設定され
ることを特徴とする。
In the object inspection apparatus according to the present invention, the first conversion means receives the red, green and blue signals and outputs the red, green and blue conversion table values stored corresponding to these signals. A rewritable conversion table (for example, the non-linear conversion tables 12R, 12G and 12B of the embodiment), and the values of the conversion table are the values of red, green and blue signals obtained by photographing a gray sample and the gray sample It is characterized by being set from the ratio with the original red, green and blue values of.

【0011】[0011]

【作用】請求項1の構成の色変換装置においては、赤、
緑および青信号が、補正可能変換関数に従って変換して
出力される。従って、環境の変化に応じて変換関数を補
正することにより、正しく色変換を行うことができる。
In the color conversion device having the structure of claim 1, red,
The green and blue signals are converted and output according to the correctable conversion function. Therefore, correct color conversion can be performed by correcting the conversion function according to the change in the environment.

【0012】請求項2の構成の色変換装置においては、
書換可能変換テーブルの値が、グレイサンプルを撮影し
て得られる赤、緑および青信号の値と、グレイサンプル
の本来の赤、緑および青の値との比率から設定される。
従って、環境の変化に応じて変換関数を非線形に補正す
ることも可能となり、より正確に色変換を行うことがで
きる。
According to another aspect of the color conversion device of the present invention,
The value of the rewritable conversion table is set from the ratio of the red, green and blue signal values obtained by photographing the gray sample and the original red, green and blue values of the gray sample.
Therefore, the conversion function can be corrected non-linearly according to the change of environment, and the color conversion can be performed more accurately.

【0013】請求項3の構成の物体検査装置において
は、赤、緑および青信号が、補正可能変換関数に従って
変換して出力される。従って、環境の変化に応じて変換
関数を補正することにより、正しく物体の色が適当か否
か判断することができる。
In the object inspection apparatus of the third aspect, the red, green and blue signals are converted and output according to the correctable conversion function. Therefore, by correcting the conversion function according to the change in the environment, it is possible to correctly determine whether or not the color of the object is appropriate.

【0014】請求項4の構成の物体検査装置において
は、書換可能変換テーブルの値が、グレイサンプルを撮
影して得られる赤、緑および青信号の値と、グレイサン
プルの本来の赤、緑および青の値との比率から設定され
る。従って、環境の変化に応じて変換関数を非線形に補
正することも可能となり、より正確に物体の色が適当か
否か判断することができる。
In the object inspection apparatus having the structure of the fourth aspect, the values of the rewritable conversion table are the values of red, green and blue signals obtained by photographing the gray sample and the original red, green and blue of the gray sample. It is set from the ratio with the value of. Therefore, it is possible to correct the conversion function non-linearly according to changes in the environment, and it is possible to more accurately determine whether or not the color of the object is appropriate.

【0015】[0015]

【実施例】図1は、本発明の物体検査装置の一実施例を
示す。この例は、ベルトコンベア上の検査対象対象物体
の色が正しいか否か検査する装置である。検査対象物体
1は、次々に、コンベア2に載せられて検査される。ビ
デオカメラ3は、物体1の画像を撮影し、画像処理装置
4は、カメラ3の出力信号に基づいて、物体1の色を判
断し、オペレータに対し、モニタテレビ5で良品か不良
品かを知らせる。この実施例では、蛍光灯などの照明6
の明るさの変動に対し、既知の色サンプル7を使用し
て、画像処理装置4の色変換特性を変えることにより、
その影響を取り除くことができる。
FIG. 1 shows an embodiment of the object inspection apparatus of the present invention. This example is an apparatus that inspects whether or not the color of the inspection target object on the belt conveyor is correct. The inspection object 1 is placed on the conveyor 2 and inspected one after another. The video camera 3 captures an image of the object 1, and the image processing device 4 determines the color of the object 1 based on the output signal of the camera 3 and asks the operator whether the monitor TV 5 is good or defective. Inform. In this embodiment, lighting 6 such as a fluorescent lamp is used.
By changing the color conversion characteristic of the image processing device 4 using the known color sample 7 with respect to the fluctuation of the brightness of
The effect can be removed.

【0016】図2は、図1に示された画像処理装置4の
一構成例を示す。カメラ3からの入力信号は赤、緑、青
の3色のカラー信号である。これらを、それぞれ、線形
変換部10R、10Gおよび10Bに入力する。線形変
換部10R、10Gおよび10Bは、白の色サンプル7
を使用して、赤、緑、青のどの色も同じ信号レベルにな
るように調整される。線形変換部10R、10Gおよび
10Bは、例えば、利得可変型の増幅器によって構成で
き、CPU16の出力ポート17からの信号で調整され
る。
FIG. 2 shows an example of the configuration of the image processing device 4 shown in FIG. Input signals from the camera 3 are three color signals of red, green and blue. These are input to the linear conversion units 10R, 10G, and 10B, respectively. The linear conversion units 10R, 10G, and 10B use the white color sample 7
Are used to adjust the red, green, and blue colors to the same signal level. The linear conversion units 10R, 10G, and 10B can be configured by, for example, variable gain amplifiers, and are adjusted by a signal from the output port 17 of the CPU 16.

【0017】線形変換部10R、10Gおよび10Bの
出力信号は、それぞれ、A/D変換部11R、11Gお
よび11Bに入力され、ディジタル信号に変換される。
この例では、8ビット量子化、即ち0から255までの
ディジタル信号に変換される。A/D変換部11R、1
1Gおよび11Bの出力信号は、それぞれ、非線形変換
テーブル12R、12Gおよび12Bによって中間色の
補償を受け、線形な特性に変換される。非線形変換テー
ブル12R、12Gおよび12Bは、CPU16によっ
て書き換える事ができるルックアップテーブルである。
書き換えを行うために、CPU16と、非線形変換テー
ブル12R、12Gおよび12Bとは、アドレスおよび
データバスで接続されている。
The output signals of the linear converters 10R, 10G and 10B are input to the A / D converters 11R, 11G and 11B, respectively, and converted into digital signals.
In this example, 8-bit quantization, that is, conversion into a digital signal from 0 to 255 is performed. A / D converter 11R, 1
The output signals of 1G and 11B are compensated for intermediate colors by the non-linear conversion tables 12R, 12G and 12B, respectively, and converted into linear characteristics. The non-linear conversion tables 12R, 12G and 12B are lookup tables that can be rewritten by the CPU 16.
For rewriting, the CPU 16 and the non-linear conversion tables 12R, 12G and 12B are connected by an address and data bus.

【0018】非線形変換テーブル12R、12Gおよび
12Bから出力される赤、緑および青信号は、RGB‐
H変換部13H、RGB‐S変換部13SおよびRGB
‐I変換部13Iによって、色相、彩度、明度(H,
S,I)の信号に変換される。これらの変換にはルック
アップテーブルが使用され、RGB‐Lab,RGB‐
マンセルなどの変換が行われる。CPU16の出力ポー
ト17の制御により、RGB‐H変換部13H、RGB
‐S変換13SおよびRGB‐I変換部13Iを使用せ
ずに、非線形変換テーブル12R、12Gおよび12B
から出力される赤、緑および青信号をバイパスさせるこ
とができる。
The red, green and blue signals output from the nonlinear conversion tables 12R, 12G and 12B are RGB-
H conversion unit 13H, RGB-S conversion unit 13S and RGB
The -I conversion unit 13I causes the hue, the saturation, and the brightness (H,
S, I) signals are converted. A lookup table is used for these conversions, and RGB-Lab, RGB-
Conversion of Munsell etc. is performed. By controlling the output port 17 of the CPU 16, the RGB-H conversion units 13H, RGB
-S conversion 13S and RGB-I conversion unit 13I are not used, and non-linear conversion tables 12R, 12G, and 12B are used.
It is possible to bypass the red, green and blue signals output by the.

【0019】RGB‐H変換部13H、RGB‐S変換
13SおよびRGB‐I変換部13Iからそれぞれ出力
される色相、彩度および明度信号(データ)は、それぞ
れフレームメモリ14H、14Sおよび14Hに記憶さ
れる。CPU16は、フレームメモリ14H、14Sお
よび14Hから検査対象物体2の色相、彩度および明度
データを得て、プログラム・データメモリ18に予め記
憶したデータと比較し、その結果を、フレームメモリ1
9H、19Sおよび19Iに記憶し、HSI‐R変換部
20R、HSI‐G変換部20GおよびHSI‐B変換
部20Bで赤、緑および青の信号に戻し、D/A変換部
21R、21Gおよび21Bを介してモニタテレビに表
示する。
The hue, saturation and lightness signals (data) output from the RGB-H converter 13H, RGB-S converter 13S and RGB-I converter 13I are stored in frame memories 14H, 14S and 14H, respectively. It The CPU 16 obtains the hue, saturation, and brightness data of the inspection object 2 from the frame memories 14H, 14S, and 14H, compares them with the data stored in the program / data memory 18 in advance, and compares the result with the frame memory 1
9H, 19S and 19I, and the HSI-R converter 20R, HSI-G converter 20G and HSI-B converter 20B restore the red, green and blue signals to the D / A converters 21R, 21G and 21B. To monitor TV via.

【0020】図3は、CPU16の処理の全体の流れを
示している。処理は大きく、色変換回路の調整および検
査対象物体1の色を記憶する色調整(ステップS1)
と、実際に対象物体1をベルトコンベア2に流して検査
する運用(ステップS2)とに分けられる。
FIG. 3 shows the overall flow of processing by the CPU 16. The processing is large, and the color conversion circuit is adjusted and the color of the object 1 to be inspected is stored (step S1).
And the operation (step S2) of actually injecting the target object 1 onto the belt conveyor 2 to inspect.

【0021】図4は、図3に示されたステップS1の色
調整の処理の流れを示す。初期化(ステップS11)の
後、ダイナミックレンジを有効に使うために白レベル調
整が行われ(ステップS12)、非線型の要因を取り除
くための中間レベル調整が行われ(ステップS13)、
検査対象物体1の色が記憶される(ステップS14)。
FIG. 4 shows the flow of color adjustment processing in step S1 shown in FIG. After the initialization (step S11), the white level is adjusted to effectively use the dynamic range (step S12), and the intermediate level is adjusted to remove the non-linear factor (step S13).
The color of the inspection object 1 is stored (step S14).

【0022】図5は、図4のステップS11に示された
初期化の具体例を示す。まず、線型変換部10R、10
Gおよび10Bの利得が1に設定される(ステップS2
1)。そして、非線型変換テーブル12R、12Gおよ
び12Bの出力が入力に等しくされる(ステップS2
2)。この初期化によって、入力信号が何も処理されず
に、そのまま色変換されることになる。
FIG. 5 shows a specific example of the initialization shown in step S11 of FIG. First, the linear conversion units 10R, 10
The gains of G and 10B are set to 1 (step S2
1). Then, the outputs of the nonlinear conversion tables 12R, 12G, and 12B are made equal to the inputs (step S2).
2). By this initialization, the input signal is subjected to color conversion without any processing.

【0023】図6は、図4のステップS12に示された
白レベル調整の具体例を示す。まず、CPU16の出力
ポート17の制御により、RGB‐H変換部13H、R
GB‐S変換部13SおよびRGB‐I変換部13Iを
使用せず、信号をバイパスさせておく(ステップS3
1)。そして、マンセル標準色標の白サンプルをカメラ
3で撮影し(ステップS32)、赤、緑、青それぞれに
ついてA/D変換後のディジタル信号が最高レベルにな
るように調整する。8ビットの量子化では255が最高
レベルになるので、これを越えたかどうか判断するため
に、それより1だけ小さい254になるように調整す
る。
FIG. 6 shows a concrete example of the white level adjustment shown in step S12 of FIG. First, the RGB-H conversion units 13H and R are controlled by the output port 17 of the CPU 16.
The signal is bypassed without using the GB-S converter 13S and the RGB-I converter 13I (step S3
1). Then, a white sample of Munsell standard color chart is photographed by the camera 3 (step S32), and adjustment is performed so that the digital signals after A / D conversion become the highest level for each of red, green and blue. In the case of 8-bit quantization, 255 is the highest level, so in order to judge whether or not it exceeds 254, it is adjusted to 254, which is 1 smaller than that.

【0024】すなわち、白サンプルを撮影した画像デー
タの赤信号を調べ(ステップS33)、それが254よ
り小さければ赤チャネルの線型変換部10Rの利得を上
げ(ステップS34)、255であれば利得を下げる
(ステップS35)。同様に緑信号のレベルを調べ(ス
テップS36)、それが254より小さければ緑チャネ
ルの線型変換部10Gの利得を上げ(ステップS3
7)、255であれば利得を下げる(ステップS3
8)。青信号についても同様である(ステップS39、
S40およびS41)。
That is, the red signal of the image data of the white sample is checked (step S33), and if it is smaller than 254, the gain of the red channel linear conversion unit 10R is increased (step S34), and if it is 255, the gain is increased. Lower (step S35). Similarly, the level of the green signal is checked (step S36), and if it is smaller than 254, the gain of the green channel linear conversion unit 10G is increased (step S3).
7) If 255, decrease gain (step S3)
8). The same applies to the green signal (step S39,
S40 and S41).

【0025】図7は、図4のステップS13に示された
中間レベル調整の具体例を示す。この処理では、カメラ
3および信号処理系の非線形性を取り除く。ここでも、
白レベル調整に引き続き、CPU16の出力ポート17
の制御により、RGB‐H変換部13H、RGB‐S変
換部13SおよびRGB‐I変換部13Iを使用せず信
号をバイパスさせておく。まず、マンセル標準色標のグ
レイサンプルを数種類用意する。そのグレイ値とその数
は任意であるが多いほど精度は高くなる。
FIG. 7 shows a specific example of the intermediate level adjustment shown in step S13 of FIG. In this process, the non-linearity of the camera 3 and the signal processing system is removed. even here,
Following the white level adjustment, output port 17 of CPU 16
The control bypasses the signal without using the RGB-H conversion unit 13H, the RGB-S conversion unit 13S, and the RGB-I conversion unit 13I. First, several kinds of Munsell standard color samples are prepared. The gray value and the number thereof are arbitrary, but the higher the value, the higher the accuracy.

【0026】まず、そのグレイサンプルを一つカメラ3
で撮影する(ステップS51)。そして、そのときの赤
信号、緑信号および青信号のレベルを記憶しておく(ス
テップS52、S53およびS54)。この処理を、サ
ンプルの数だけ繰り返す(ステップS55)。
First, one of the gray samples is taken by the camera 3
The image is taken with (step S51). Then, the levels of the red signal, the green signal, and the blue signal at that time are stored (steps S52, S53, and S54). This process is repeated for the number of samples (step S55).

【0027】次に、その記憶した値から、本来記憶され
るべき値(グレイサンプルの本来の値)との比率を計算
する(ステップS56)。これが変換テーブル12R、
12Bおよび12Gの値になる。計算した値は、グレイ
サンプルの数しか無いので、残りは補間する必要があ
る。この例では、ベジェ曲線で近似する(ステップS5
7)。そして、近似した値を変換テーブル12R、12
Bおよび12Gに書き込む(ステップS58)。
Next, the ratio with the value to be originally stored (the original value of the gray sample) is calculated from the stored value (step S56). This is the conversion table 12R,
The values are 12B and 12G. Since the calculated value has only the number of gray samples, the rest needs to be interpolated. In this example, the Bezier curve is approximated (step S5).
7). Then, the approximated values are converted into conversion tables 12R, 12
Write to B and 12G (step S58).

【0028】図8乃至図10は、図7のステップS56
乃至S58の処理を詳しく説明するものである。図8
は、変換テーブル12R、12Bおよび12Gの初期状
態を示す。変換テーブル12R、12Bおよび12Gの
出力値は入力値に等しい。図9は、複数のグレイサンプ
ルを撮影し、変換テーブル12R、12Bおよび12G
の値を求める過程を示している。図9中、黒丸は、グレ
イサンプルをカメラで撮影して得られた値である。×
は、本来得られるはずの値すなわち目標値を示してい
る。すなわち、黒丸は、座標(入力、撮影値)を示し、
×は、座標(入力、目標値)を示している。そこで(入
力、目標値)を得るためには、その入力に対し、$目標
値sub撮影値$を出力するようにすれば良い(三角
印)。これを何点か行う。図10は、これらを補間した
結果である。これを非線形変換テーブル12R、12B
および12Gに書き込む。
8 to 10 show step S56 of FIG.
The process from S58 to S58 will be described in detail. Figure 8
Shows the initial state of the conversion tables 12R, 12B and 12G. The output values of the conversion tables 12R, 12B and 12G are equal to the input values. FIG. 9 shows a plurality of gray samples taken and converted into conversion tables 12R, 12B and 12G.
The process of obtaining the value of is shown. In FIG. 9, black circles are values obtained by photographing a gray sample with a camera. ×
Indicates a value that should be originally obtained, that is, a target value. That is, the black circles indicate the coordinates (input, shooting value),
X indicates coordinates (input, target value). Therefore, in order to obtain (input, target value), the $ target value sub photographing value $ may be output for that input (triangle mark). Do some of this. FIG. 10 shows the result of interpolating these. This is the non-linear conversion table 12R, 12B
And write to 12G.

【0029】図11は、図4のステップS14の検査対
象対象物体の色記憶処理の具体例を示す。この処理で
は、検査対象物体1を実際にカメラ3で撮影し、その色
を記憶する。まず、ここまで行っていたRGB‐H変換
部13H、RGB‐S変換部13SおよびRGB‐I変
換部13Iのバイパスを止め(ステップS61)、カメ
ラ3で検査対象物体1を撮影し(ステップS62)、そ
の色をH,S,I値で記憶する(ステップS63)。
FIG. 11 shows a specific example of the color storage processing of the object to be inspected in step S14 of FIG. In this process, the inspection target object 1 is actually photographed by the camera 3 and its color is stored. First, the bypass of the RGB-H conversion unit 13H, the RGB-S conversion unit 13S, and the RGB-I conversion unit 13I, which has been performed so far, is stopped (step S61), and the inspection target object 1 is photographed by the camera 3 (step S62). , The color is stored as H, S, I values (step S63).

【0030】図12は、図3のステップS2に示された
運用処理の具体例を示す。この処理では、検査対象物体
1は、ベルトコンベア2に載せられ次々運ばれてくるの
で一つずつ検査する。ここで照明6などの条件が変化し
ていないかどうか確認し、もし変化していればそれを補
正する必要があるので、検査対象物体1だけでなく、白
サンプル7も同時に流しておく。
FIG. 12 shows a specific example of the operation process shown in step S2 of FIG. In this process, the inspection object 1 is inspected one by one because it is placed on the belt conveyor 2 and is conveyed one after another. Here, it is necessary to check whether the conditions such as the illumination 6 have changed, and if they have changed, it is necessary to correct them, so that not only the inspection target object 1 but also the white sample 7 is flowed at the same time.

【0031】まず、カメラ3で撮影したものが、検査対
象物体1なのか色サンプル7なのか判断する(ステップ
S71)。検査対象物体1であれば、HSI値を検査対
象物体色記憶処理で記憶した値と比較し(ステップS7
2およびS73)、同じであれば良品(ステップS7
4)、違っていれば不良品(ステップS75)と判断す
る。
First, it is judged whether the object photographed by the camera 3 is the inspection object 1 or the color sample 7 (step S71). If it is the inspection object 1, the HSI value is compared with the value stored in the inspection object color storage process (step S7).
2 and S73), if they are the same, a non-defective product (step S7
4) If they are different, it is determined to be a defective product (step S75).

【0032】検査対象物体1でなく色サンプル7であっ
た時は、そのサンプルのRGB値が254かどうか比較
し(ステップS77)、同じであれば良い。違っていれ
ば線型変換部10R、10Gおよび10Bを白レベル調
整と同じに調整する(ステップS78)。
When the color sample 7 is not the object 1 to be inspected, the RGB values of the sample are compared to see if they are 254 (step S77). If they are different, the linear conversion units 10R, 10G, and 10B are adjusted in the same manner as the white level adjustment (step S78).

【0033】ここでは白サンプルを用いた例を示した
が、グレイサンプルでも良い。また検査対象物体1と同
時にサンプルをチェックできる構成も可能である。
Although an example using a white sample is shown here, a gray sample may be used. It is also possible to have a configuration in which the sample can be checked at the same time as the inspection target object 1.

【0034】上述の本発明の実施例によれば、色サンプ
ルによる補正を行った後は、画像処理アルゴリズムの中
で差を認識し、変化を吸収することは不要になる。また
補正も非線形に行える。すなわち、上記実施例により、
次の利点が得られる。 1)画像処理の処理時間を短縮でき、処理項目を減少さ
せることができる。 2)色変換前に、赤、緑、青の値を正規化することによ
り、色変換の精度を上げることができる。 3)非線形の補正を行うことができ、柔軟に対応でき
る。 4)画像処理装置からのコンピュータコントロールによ
り、自動的に調整できる。
According to the above-described embodiment of the present invention, it is not necessary to recognize the difference and absorb the change in the image processing algorithm after the correction by the color sample. In addition, the correction can be performed non-linearly. That is, according to the above embodiment,
You get the following benefits: 1) The processing time of image processing can be shortened and the number of processing items can be reduced. 2) The accuracy of color conversion can be improved by normalizing the values of red, green, and blue before color conversion. 3) Non-linear correction can be performed, and flexibility can be dealt with. 4) It can be automatically adjusted by computer control from the image processing device.

【0035】[0035]

【発明の効果】請求項1の色変換装置によれば、赤、緑
および青信号を、補正可能変換関数に従って変換して出
力するようにしたので、環境の変化に応じて変換関数を
補正することにより、正しく色変換を行うことができ
る。
According to the color conversion device of the first aspect, the red, green and blue signals are converted and output in accordance with the correctable conversion function, so that the conversion function is corrected according to the change of the environment. Thus, color conversion can be performed correctly.

【0036】請求項2の色変換装置によれば、書換可能
変換テーブルの値を、グレイサンプルを撮影して得られ
る赤、緑および青信号の値と、グレイサンプルの本来の
赤、緑および青の値との比率から設定するようにしたの
で、環境の変化に応じて変換関数を非線形に補正するこ
とも可能となり、より正確に色変換を行うことができ
る。
According to the color conversion device of the second aspect, the values of the rewritable conversion table are set to the values of the red, green and blue signals obtained by photographing the gray sample and the original red, green and blue of the gray sample. Since the setting is made from the ratio with the value, the conversion function can be corrected non-linearly according to the change of the environment, and more accurate color conversion can be performed.

【0037】請求項3の物体検査装置によれば、赤、緑
および青信号を、補正可能変換関数に従って変換して出
力するようにしたので、環境の変化に応じて変換関数を
補正することにより、正しく物体の色が適当か否か判断
することができる。
According to the object inspection apparatus of the third aspect, the red, green and blue signals are converted and output according to the correctable conversion function. Therefore, by correcting the conversion function according to the change of the environment, It is possible to correctly judge whether or not the color of the object is appropriate.

【0038】請求項4の物体検査装置によれば、書換可
能変換テーブルの値を、グレイサンプルを撮影して得ら
れる赤、緑および青信号の値と、グレイサンプルの本来
の赤、緑および青の値との比率から設定するようにした
ので、環境の変化に応じて変換関数を非線形に補正する
ことも可能となり、より正確に物体の色が適当か否か判
断することができる。
According to the object inspection apparatus of the fourth aspect, the values of the rewritable conversion table are the values of the red, green and blue signals obtained by photographing the gray sample and the original red, green and blue of the gray sample. Since the setting is made based on the ratio with the value, the conversion function can be non-linearly corrected according to the change of the environment, and it can be more accurately determined whether the color of the object is appropriate.

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

【図1】本発明の物体検査装置の一実施例の構成を示す
概略構成図である。
FIG. 1 is a schematic configuration diagram showing a configuration of an embodiment of an object inspection apparatus of the present invention.

【図2】図1の画像処理装置4の一構成例すなわち本発
明の色変換装置の一実施例の構成を示すブロック図であ
る。
2 is a block diagram showing a configuration example of an image processing device 4 of FIG. 1, that is, a configuration of an embodiment of a color conversion device of the present invention.

【図3】図2の画像処理装置の処理全体を示すフローチ
ャートである。
FIG. 3 is a flowchart showing the overall processing of the image processing apparatus of FIG.

【図4】図2の画像処理装置の色調整処理の一例を示す
フローチャートである。
4 is a flowchart showing an example of color adjustment processing of the image processing apparatus of FIG.

【図5】図2の画像処理装置の初期化処理の一例を示す
フローチャートである。
5 is a flowchart showing an example of initialization processing of the image processing apparatus of FIG.

【図6】図2の画像処理装置の白レベル調整処理の一例
を示すフローチャートである。
FIG. 6 is a flowchart showing an example of white level adjustment processing of the image processing apparatus of FIG.

【図7】図2の画像処理装置の中間レベル調整処理の一
例を示すフローチャートである。
7 is a flowchart showing an example of an intermediate level adjustment process of the image processing apparatus of FIG.

【図8】非線形変換テーブル12R、12Gおよび12
Bの初期状態を示す図である。
FIG. 8 shows nonlinear conversion tables 12R, 12G and 12
It is a figure which shows the initial state of B.

【図9】複数のグレイサンプルを撮影し、変換テーブル
値を求める過程を示す図である。
FIG. 9 is a diagram showing a process of taking a plurality of gray samples and obtaining a conversion table value.

【図10】ベジェ曲線により補間した変換テーブ値を示
す図である。
FIG. 10 is a diagram showing conversion table values interpolated by a Bezier curve.

【図11】図2の画像処理装置の対象物体の色記憶処理
の一例を示すフローチャートである。
11 is a flowchart showing an example of color storage processing of a target object of the image processing apparatus of FIG.

【図12】図2の画像処理装置の運用すなわち物体の色
検査処理の一例を示すフローチャートである。
12 is a flowchart showing an example of the operation of the image processing apparatus of FIG. 2, that is, an example of an object color inspection process.

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

1 検査対象物体 3 ビデオカメラ 4 画像処理装置 5 モニタテレビ 7 色サンプル 10R,10G,10B 線形変換部 12R,12G,12B 非線形変換テーブル 13H RGB‐H変換部 13S RGB‐S変換部 13I RGB‐I変換部 16 CPU 1 Object to be inspected 3 Video camera 4 Image processing device 5 Monitor television 7 Color sample 10R, 10G, 10B Linear conversion unit 12R, 12G, 12B Non-linear conversion table 13H RGB-H conversion unit 13S RGB-S conversion unit 13I RGB-I conversion Part 16 CPU

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 赤、緑および青信号を、色相、彩度およ
び明度信号に変換する色変換装置において、 前記赤、緑および青信号を補正可能変換関数に従って変
換して出力する第1変換手段と、 前記第1変換手段から出力される赤、緑および青信号
を、色相、彩度および明度信号に変換する第2変換手段
とを備えることを特徴とする色変換装置。
1. A color conversion device for converting red, green and blue signals into hue, saturation and lightness signals, and first conversion means for converting and outputting the red, green and blue signals according to a correctable conversion function, A color conversion device comprising: second conversion means for converting the red, green, and blue signals output from the first conversion means into hue, saturation, and lightness signals.
【請求項2】 前記第1変換手段が、前記赤、緑および
青信号を受けて、これらに対応して記憶されている赤、
緑および青変換テーブル値を出力する書換可能変換テー
ブルを有し、この変換テーブルの値が、グレイサンプル
を撮影して得られる赤、緑および青信号の値と、前記グ
レイサンプルの本来の赤、緑および青の値との比率から
設定されることを特徴とする請求項1記載の色変換装
置。
2. The first conversion means receives the red, green and blue signals and stores the red signals corresponding thereto,
It has a rewritable conversion table that outputs green and blue conversion table values, and the values of this conversion table are the red, green and blue signal values obtained by photographing a gray sample, and the original red and green values of the gray sample. The color conversion device according to claim 1, wherein the color conversion device is set based on a ratio between the color conversion value and the value of blue.
【請求項3】 物体の色が適当か否か検査する物体検査
装置であって、 前記物体を撮影することにより得られる赤、緑および青
信号を補正可能変換関数に従って変換して出力する第1
変換手段と、 前記第1変換手段から出力される赤、緑および青信号
を、色相、彩度および明度信号に変換する第2変換手段
とを備え、前記第2変換手段の出力に基づいて前記物体
の色が適当か否か判断することを特徴とする物体検査装
置。
3. An object inspection apparatus for inspecting whether or not the color of an object is proper, wherein the red, green and blue signals obtained by photographing the object are converted and output according to a correctable conversion function.
A conversion means; and a second conversion means for converting the red, green, and blue signals output from the first conversion means into a hue, saturation, and lightness signal, and the object based on the output of the second conversion means. An object inspection device characterized by determining whether or not the color of the object is appropriate.
【請求項4】 前記第1変換手段が、前記赤、緑および
青信号を受けて、これらに対応して記憶されている赤、
緑および青変換テーブル値を出力する書換可能変換テー
ブルを有し、この変換テーブルの値が、グレイサンプル
を撮影して得られる赤、緑および青信号の値と、前記グ
レイサンプルの本来の赤、緑および青の値との比率から
設定されることを特徴とする請求項3記載の物体検査装
置。
4. The first conversion means receives the red, green and blue signals and stores the red signals corresponding to these signals,
It has a rewritable conversion table that outputs green and blue conversion table values, and the values of this conversion table are the red, green and blue signal values obtained by photographing a gray sample, and the original red and green values of the gray sample. 4. The object inspection apparatus according to claim 3, wherein the object inspection apparatus is set based on a ratio between the value of the color and the value of blue.
JP4137698A 1992-04-30 1992-04-30 Color converting device and object inspecting device Withdrawn JPH05314252A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4137698A JPH05314252A (en) 1992-04-30 1992-04-30 Color converting device and object inspecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4137698A JPH05314252A (en) 1992-04-30 1992-04-30 Color converting device and object inspecting device

Publications (1)

Publication Number Publication Date
JPH05314252A true JPH05314252A (en) 1993-11-26

Family

ID=15204725

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4137698A Withdrawn JPH05314252A (en) 1992-04-30 1992-04-30 Color converting device and object inspecting device

Country Status (1)

Country Link
JP (1) JPH05314252A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004279317A (en) * 2003-03-18 2004-10-07 Sumitomo Chem Co Ltd Painting management system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004279317A (en) * 2003-03-18 2004-10-07 Sumitomo Chem Co Ltd Painting management system

Similar Documents

Publication Publication Date Title
US7129456B2 (en) Method and apparatus for calculating image correction data and projection system
CN1956551B (en) Image processing method, image processing apparatus, imaging apparatus, imaging method
US7586521B2 (en) Automatic color calibration of an image sensor
JP2002510911A (en) Method and system for automatically calibrating a color-based machine imaging system
JPH05501793A (en) image correction circuit
JPH04172066A (en) Video camera
US5216493A (en) Multipoint digital automatic white balance for a video system
KR100590544B1 (en) Method and apparatus for converting the color temperature according to the luminance of image pixel
US7477294B2 (en) Method for evaluating and correcting the image data of a camera system
US5283635A (en) White balance adjusting device with plural thresholds for range control
KR940011702B1 (en) Image pickup device
KR100428522B1 (en) White balance circuit for a video camera
JP2723687B2 (en) Test equipment for driving circuits for display devices
JPH05314252A (en) Color converting device and object inspecting device
JPH04304093A (en) Digital automatic white balancing circuit
US5930401A (en) Shade gradation correction method and apparatus
JP2003298953A (en) Image processing apparatus and image processing method
JPS62200471A (en) Color image information input device
KR100436767B1 (en) Video displaying device capable of automatic controlling white-balance of plural externally-input signals and a method of controlling white-balance thereof
US5208664A (en) Image reading method and apparatus with coordination function between read value and original density
WO2016163102A1 (en) Imaging apparatus, imaging system, and imaging method
JPH08234302A (en) Digital camera
JPH11262021A (en) Color balance adjustment device
JPH08126022A (en) White balance adjustment circuit
JPS62200875A (en) Color image information input device

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 19990706