JPH05298443A - Color picture area extracting device - Google Patents

Color picture area extracting device

Info

Publication number
JPH05298443A
JPH05298443A JP4125448A JP12544892A JPH05298443A JP H05298443 A JPH05298443 A JP H05298443A JP 4125448 A JP4125448 A JP 4125448A JP 12544892 A JP12544892 A JP 12544892A JP H05298443 A JPH05298443 A JP H05298443A
Authority
JP
Japan
Prior art keywords
data
color
colors
area
color image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP4125448A
Other languages
Japanese (ja)
Inventor
Susumu Aoki
晋 青木
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.)
Takaoka Toko Co Ltd
Original Assignee
Takaoka Electric Mfg Co Ltd
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 Takaoka Electric Mfg Co Ltd filed Critical Takaoka Electric Mfg Co Ltd
Priority to JP4125448A priority Critical patent/JPH05298443A/en
Publication of JPH05298443A publication Critical patent/JPH05298443A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)
  • Image Analysis (AREA)

Abstract

PURPOSE:To stably extract a specified color area without being influenced by the variation of the level of brightness on the basis of the picture data of three colors, red, green and blue obtained from the signal of a CCD camera, etc., and in addition, to extract it even without converting into saturation, lightness and chromaticity. CONSTITUTION:This color picture area extracting device is constituted of a comparison circuit 1 which compares color picture data RD, GD, BD of three colors red, green and blue, and outputs maximum value data MD among them, normalization circuits 21 to 23 which obtain color picture normalized data RA, GA, BA by dividing the color picture data RD, GD, BD of three colors by the maximum value data MD from the comparison circuit 1, and a CPI 4 which obtains the sum of squares of the differences of the color picture normalized data corresponding to each picture element and the neighboring picture element, and divides the area by labeling it on the basis of the obtained sum of squares of the differences, and compares the mean value of the color picture normalized data of three colors of each area with the color picture normalized data of the color to be extracted, and extracts the area of the color close to it.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は赤、緑、青のカラー画
像データを用いて特定の色の領域を抽出する装置に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a device for extracting a specific color area using red, green and blue color image data.

【0002】[0002]

【従来の技術】従来、CCDカメラ等からのカラー画像
を処理して得られたカラー情報に基づき特定の色の領域
を抽出する場合においては、画像全体のうち赤、緑、青
の3色のカラー画像データが、それぞれがあらかじめ定
められた範囲にある画素を選び出し領域を抽出する方法
や、各画素の赤、緑、青の3色カラー画像データから彩
度、明度、色度に変換して抽出すべき色の彩度、明度、
色度と前記各画素の彩度、明度、色度から抽出すべき色
と各画素との色差を求めて、あらかじめ定められた範囲
にある色差の画素を選び出し領域を抽出する方法がとら
れる。
2. Description of the Related Art Conventionally, in the case of extracting a region of a specific color based on color information obtained by processing a color image from a CCD camera or the like, three colors of red, green and blue in the entire image are extracted. The color image data is a method of selecting pixels in a predetermined range and extracting an area, or converting the red, green, and blue color image data of each pixel into saturation, brightness, and chromaticity. Saturation, brightness of the color to be extracted,
A method of obtaining a color difference between each pixel and a color to be extracted from the chromaticity and the saturation, lightness, and chromaticity of each pixel, selecting a pixel having a color difference within a predetermined range, and extracting an area is used.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
前者の方法においては画像によっては明るさのレベルが
変化して同じ色でありながら赤、緑、青の3色のカラー
画像データの大きさが互いに比例して上下し同じ色と判
断できなくなる。
However, in the former method of the related art, the size of the color image data of three colors of red, green, and blue is the same although the brightness level changes depending on the image. It will go up and down in proportion to each other and it will not be possible to judge the same color.

【0004】また、後者の方法においては赤、緑、青の
3色のカラー画像データから彩度、明度、色度に変換し
さらに色度を求める必要があり、計算量が多くなる。
Further, in the latter method, it is necessary to convert the color image data of three colors of red, green and blue into the saturation, the brightness and the chromaticity and further calculate the chromaticity, which increases the amount of calculation.

【0005】そこでこの発明は、カラー画像データによ
り特定色の領域を抽出する場合において、明るさのレベ
ルが変化しても安定して領域を抽出することができ、し
かも赤、緑、青の3色のカラー画像データから彩度、明
度、色度の変換や色差を求めることなく特定色の領域を
抽出することができるようにしたものである。
Therefore, according to the present invention, when a specific color area is extracted from color image data, the area can be stably extracted even when the brightness level changes, and the three areas of red, green and blue are extracted. The area of a specific color can be extracted from the color image data of a color without converting the saturation, lightness, and chromaticity or obtaining the color difference.

【0006】[0006]

【課題を解決するための手段】この発明においては、カ
ラー画像を構成する赤、緑、青の3色のカラー画像デー
タの各画素毎に前記3色のカラー画像データのうち明る
さの度合いを示す明度に対応する最大値データを求める
比較回路と、明るさのレベルを揃えるために前記の3色
のカラー画像データを前記最大値データで割り3色のカ
ラー画像正規化データを求める正規化回路とを備えて、
求められた前記3色のカラー画像正規化データより対象
となるカラー画像を2個以上の領域に分割して、その分
割された各領域毎に前記3色のカラー画像正規化データ
の平均値のうちあらかじめ定めた抽出すべき色の3色の
カラー画像正規化データに近い前記3色のカラー画像デ
ータの平均値の領域を選択する。
According to the present invention, the degree of brightness of the color image data of the three colors is determined for each pixel of the color image data of the three colors of red, green and blue forming a color image. A comparison circuit for obtaining maximum value data corresponding to the indicated lightness, and a normalization circuit for obtaining color image normalized data of three colors by dividing the color image data of the three colors by the maximum value data in order to make the brightness levels uniform. With and
The target color image is divided into two or more areas from the obtained color image normalized data of the three colors, and the average value of the color image normalized data of the three colors is calculated for each of the divided areas. The area of the average value of the color image data of the three colors close to the color image normalized data of the three colors of the predetermined colors to be extracted is selected.

【0007】[0007]

【作用】前記のように構成された、この発明のカラー画
像領域抽出装置においては、明るさのレベルの変化に左
右されることなく安定して、しかも赤、緑、青の3色の
画像データから彩度、明度、色度への変換や色差を求め
る必要なく、特定の色の領域を抽出する事ができる。
In the color image area extracting apparatus of the present invention constructed as described above, the image data of three colors of red, green and blue are stable without being influenced by the change of the brightness level. It is possible to extract a region of a specific color without the need to convert from Saturation, Lightness, Chromaticity or to obtain the color difference.

【0008】[0008]

【実施例】以下図面を参照して本発明を詳細に説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS The present invention will be described in detail below with reference to the drawings.

【0009】図1は全体のブロック図で、1はRD、G
D、BDの3色のカラー画像データを比較してこのうち
最大値データMDを出力する比較回路、21、22、2
3はそれぞれ3色のカラー画像データRD、GD、BD
を比較回路1からの最大値データMDで割ることによ
り、カラー画像正規化データRA、GA、BAを求める
正規化回路、31、32、33はそれぞれ、正規化回路
21、22、23からのカラー画像正規化データRA、
GA、BAを格納するフレームメモリ、4は各画素と近
傍の画素のそれぞれに対応するフレームメモリ31、3
2、33に蓄えられているカラー画像正規化データMR
A、MGA、MBAの差の二乗和を求め、求められた差
の二乗和よりラベル付けを行い領域を分割し、この分割
された各領域の3色のカラー画像正規化データの平均値
を求めてあらかじめ求めた抽出すべき色のカラー画像正
規化データと比較して近い色の領域を抽出するCPU、
5は領域を分割するときにラベル付けするのに用いさら
に抽出された領域の最終結果を格納するラベル画像メモ
リである。
FIG. 1 is an overall block diagram, 1 is RD, G
Comparing circuits for comparing the color image data of three colors of D and BD and outputting the maximum value data MD among them, 21, 22, 2
3 is color image data RD, GD, BD of 3 colors respectively
Is divided by the maximum value data MD from the comparison circuit 1 to obtain the color image normalized data RA, GA, BA, and the reference numerals 31, 32, 33 indicate the colors from the normalized circuits 21, 22, 23, respectively. Image normalization data RA,
Frame memories for storing GA and BA, 4 are frame memories 31, 3 respectively corresponding to each pixel and neighboring pixels.
Color image normalized data MR stored in 2, 33
The sum of squares of the differences of A, MGA, and MBA is obtained, the obtained sum of squares of the differences is labeled, the region is divided, and the average value of the three color image normalized data of each divided region is obtained. CPU for extracting a region of a similar color by comparing with the color image normalized data of the color to be extracted which is obtained in advance,
Reference numeral 5 is a label image memory which is used for labeling when the area is divided and further stores the final result of the extracted area.

【0010】図2は、カラー画像データの一例で、X、
Yは座標方向を表す。図2では、A、B、Cの3個の異
なる色の領域があり、ある横方向の1ラインY1におけ
る3色のカラー画像データRD、GD、BDは、図3で
示される。図3において領域Aは、同色つまり3色のカ
ラー画像データRD、GD、BDのデータそれぞれの比
率が一定であるが明るさのレベルが緩やかに変化してい
る。
FIG. 2 shows an example of the color image data, where X,
Y represents the coordinate direction. In FIG. 2, there are three different color areas A, B, and C, and the color image data RD, GD, and BD of three colors in one horizontal line Y1 are shown in FIG. In the area A in FIG. 3, the ratio of each of the color image data RD, GD, and BD of the same color, that is, three colors is constant, but the brightness level changes gently.

【0011】図3のデータRD、GD、BDが比較回路
1に入力されると最大値データMDは図4で示されるデ
ータとなる。
When the data RD, GD, BD of FIG. 3 are input to the comparison circuit 1, the maximum value data MD becomes the data shown in FIG.

【0012】正規化回路21、22、23それぞれによ
りデータRD、GD、BDを図4で示す最大値データM
Dで割りデータを正規化すると、それぞれ図5で示す3
色のカラー画像正規化データRA、GA、BAとなり、
これらのデータはそれぞれフレームメモリ31、32、
33に格納される。
The data RD, GD, and BD are converted into maximum value data M shown in FIG. 4 by the normalization circuits 21, 22, and 23, respectively.
When the divided data is normalized by D, it is 3 shown in FIG. 5, respectively.
It becomes the color image normalization data RA, GA, BA of the color,
These data are respectively stored in the frame memories 31, 32,
It is stored in 33.

【0013】CPU4は、フレームメモリ31、32、
33に蓄えられている3色のカラー画像正規化データM
RA、MGA、MBAを画像の左上から右下へラスター
走査で読みだしながらラベル付けをする。
The CPU 4 includes frame memories 31, 32,
3 color image normalization data M stored in 33
RA, MGA, and MBA are labeled from the upper left to the lower right of the image by raster scanning.

【0014】ラベル付けの方法としては、1から順に各
画素に番号をつけていくが、画像の1番左側の画素に
は、使われていない新しい番号を付ける。次に画像の1
番左側以外の画素については、読み出されたカラー画像
正規化データMRA、MGA、MBAとひとつ前つまり
すぐ左側の画素のカラー画像正規化データMRA、MG
A、MBAとのそれぞれの差をとり2乗和を求めこれが
あらかじめ定めたしきい値より小さければすぐ左側と同
じ番号をつけ、前記2乗和が前記しきい値より大きけれ
ば使われていない新しい番号を付ける。付けられた番号
はラベル画像メモリ5に蓄える。実施例においては、ラ
ベル画像メモリ5の内容は図6(a)となる。次に求め
られたラベル画像メモリ5の内容を、再びラスター走査
により読みだし、1番上のラインにおいては何もせず、
2番目以降のラインにおいては、各画素のカラー画像正
規化データMRA、MGA、MBAとすぐ上の画素のカ
ラー画像正規化データMRA、MGA、MBAとのそれ
ぞれの差をとり2乗和を求め前記しきい値より小さけれ
ば、ラベル画像メモリ5の全体の内容について対象画素
とすぐ上の画素のラベルの番号のうち大きい方を小さい
数字の方に置き換える。実施例においては図6(b)の
ように書き換えられる。
As a labeling method, each pixel is sequentially numbered from 1, but a new unused number is assigned to the leftmost pixel of the image. Next in image 1
For the pixels other than the leftmost pixel, the read color image normalization data MRA, MGA, MBA and the previous color image normalization data MRA, MG
If the difference between A and MBA is calculated and the sum of squares is smaller than a predetermined threshold value, the same number as that on the left side is given, and if the sum of squares is larger than the threshold value, a new unused sum is used. Number them. The assigned number is stored in the label image memory 5. In the embodiment, the contents of the label image memory 5 are as shown in FIG. Next, the contents of the label image memory 5 obtained are read again by raster scanning, and nothing is done on the top line,
In the second and subsequent lines, the sum of squares is calculated by taking the difference between the color image normalized data MRA, MGA, MBA of each pixel and the color image normalized data MRA, MGA, MBA of the pixel immediately above. If it is smaller than the threshold value, in the entire contents of the label image memory 5, the larger one of the label numbers of the target pixel and the pixel immediately above is replaced with the smaller number. In the embodiment, it can be rewritten as shown in FIG.

【0015】次に、CPU4はラベル付けされた各領域
をラベル画像メモリ5を参照し、前記各領域毎の3色の
カラー画像正規化データMRA、MGA、MBAの平均
値を求める。求められた各領域の3色のカラー画像正規
化データMRA、MGA、MBAの平均値と抽出したい
色の3色のカラー画像正規化データのそれぞれのデータ
との差の2乗和をとり、求められた各領域の前記差の2
乗和のうち最小値の領域が抽出すべき領域であり、ラベ
ル画像メモリ5の対応するラベル番号の領域となる。
Next, the CPU 4 refers to the label image memory 5 for each labeled area, and obtains the average value of the color image normalized data MRA, MGA, MBA of three colors for each area. The sum of squares of the differences between the average values of the three color image normalized data MRA, MGA, and MBA of the respective areas obtained and the respective data of the three color image normalized data of the color to be extracted is calculated and obtained. 2 of the difference for each region
The area of the minimum value in the sum of multiplications is the area to be extracted, and is the area of the corresponding label number in the label image memory 5.

【0016】このようにして、カラー画像データを用い
て特定の色の領域を抽出する場合において、明るさレベ
ルの変化に左右されることなく安定して抽出することが
でき、しかも赤、緑、青の3色の画像データから直接抽
出を行うことができる。
In this way, when a specific color area is extracted using color image data, it can be stably extracted without being affected by changes in brightness level, and red, green, and Extraction can be performed directly from the image data of the three colors of blue.

【0017】なお、ラベル付けを行うときデータの差の
2乗和ではなくデータの差の絶対値の和を用いてもよい
し、領域分割後抽出したい色の3色のカラー画像正規化
データに最も近い領域を持ってくるのではなく、抽出し
たい色の3色のカラー画像正規化データに対してしきい
値を設定しそのしきい値内にある複数領域を抽出しても
よい。
Note that when labeling is performed, the sum of absolute values of data differences may be used instead of the sum of squares of data differences, and color image normalized data of three colors of a color to be extracted after area division may be used. Instead of bringing the closest area, a threshold value may be set for the color image normalized data of three colors of the color to be extracted, and a plurality of areas within the threshold value may be extracted.

【0018】[0018]

【発明の効果】この発明によれば、前述したように赤、
緑、青の3色のカラー画像データから、明るさのレベル
の変化に左右されることなく安定して、しかも赤、緑、
青の3色の画像データから彩度、明度、色度への変換や
色差を求める必要なく、特定の色の領域を抽出する事が
できる。しかも、領域抽出ばかりでなく抵抗器のカラー
コードやコネクタのケーブルの色の検査にも使用するこ
とができる。
According to the present invention, as described above, red,
From the color image data of 3 colors of green and blue, it is stable without being influenced by the change of the brightness level, and moreover, red, green,
It is possible to extract an area of a specific color without the need to convert the color data of the three colors of blue into the saturation, the brightness, and the chromaticity and to obtain the color difference. Moreover, it can be used not only for area extraction but also for inspection of the color code of the resistor and the color of the cable of the connector.

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

【図1】この発明のカラー画像領域抽出装置の一例を示
すブロック図である。
FIG. 1 is a block diagram showing an example of a color image area extraction device of the present invention.

【図2】カラー画像データの例を示す図である。FIG. 2 is a diagram showing an example of color image data.

【図3】赤、緑、青のカラー画像データの例を示す図で
ある。
FIG. 3 is a diagram showing an example of red, green, and blue color image data.

【図4】最大値データの例を示す図である。FIG. 4 is a diagram showing an example of maximum value data.

【図5】赤、緑、青のカラー画像正規化データの例を示
す図である。
FIG. 5 is a diagram showing an example of color image normalized data of red, green, and blue.

【図6】ラベル画像メモリの内部データを示す図であ
る。
FIG. 6 is a diagram showing internal data of a label image memory.

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

1 比較回路 21、22、23 正規化回路 31、32、33 フレームメモリ 4 CPU 5 ラベル画像メモリ 1 Comparing Circuit 21, 22, 23 Normalizing Circuit 31, 32, 33 Frame Memory 4 CPU 5 Label Image Memory

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 各画素ごとに赤、緑、青の3色のカラー
画像データのうちの最大値データを求める比較回路と、
各画素についての前記3色のカラー画像データを前記最
大値データで割ることにより3色のカラー画像正規化デ
ータを求める正規化回路とを備え、前記3色のカラー画
像正規化データから画像を2個以上の領域に分割してそ
の前記各領域の前記3色のカラー画像正規化データの平
均値のうち抽出すべき色の3色のカラー画像正規化デー
タに近い領域を選択することにより領域を抽出するカラ
ー画像領域抽出装置。
1. A comparison circuit for obtaining maximum value data of color image data of three colors of red, green and blue for each pixel,
A normalization circuit for obtaining the color image normalized data of the three colors by dividing the color image data of the three colors for each pixel by the maximum value data. The area is divided into a plurality of areas and the area is selected by selecting an area close to the color image normalized data of three colors of the color to be extracted from the average value of the color image normalized data of the three colors in each area. Color image area extraction device for extraction.
JP4125448A 1992-04-20 1992-04-20 Color picture area extracting device Pending JPH05298443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4125448A JPH05298443A (en) 1992-04-20 1992-04-20 Color picture area extracting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4125448A JPH05298443A (en) 1992-04-20 1992-04-20 Color picture area extracting device

Publications (1)

Publication Number Publication Date
JPH05298443A true JPH05298443A (en) 1993-11-12

Family

ID=14910338

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4125448A Pending JPH05298443A (en) 1992-04-20 1992-04-20 Color picture area extracting device

Country Status (1)

Country Link
JP (1) JPH05298443A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480624B1 (en) 1997-09-30 2002-11-12 Minolta Co., Ltd. Color discrimination apparatus and method
US6701010B1 (en) 1998-02-06 2004-03-02 Fujitsu Limited Color image processing apparatus and pattern extracting apparatus
US6771813B1 (en) 1998-12-09 2004-08-03 Fujitsu Limited Image processing apparatus and pattern extraction apparatus

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6480624B1 (en) 1997-09-30 2002-11-12 Minolta Co., Ltd. Color discrimination apparatus and method
US6701010B1 (en) 1998-02-06 2004-03-02 Fujitsu Limited Color image processing apparatus and pattern extracting apparatus
US6990235B2 (en) 1998-02-06 2006-01-24 Fujitsu Limited Color image processing apparatus and pattern extracting apparatus
US6771813B1 (en) 1998-12-09 2004-08-03 Fujitsu Limited Image processing apparatus and pattern extraction apparatus
US7280688B2 (en) 1998-12-09 2007-10-09 Fujitsu Limited Image processing apparatus and pattern extraction apparatus
US7349571B2 (en) 1998-12-09 2008-03-25 Fujitsu Limited Image processing apparatus and pattern extraction apparatus

Similar Documents

Publication Publication Date Title
CN110009607B (en) Display screen dead pixel detection method and device, computer equipment and storage medium
CN107590447A (en) A kind of caption recognition methods and device
CN107507144B (en) Skin color enhancement processing method and device and image processing device
CN112771604B (en) System and method for color mapping to improve viewing by a color vision deficiency observer
CN106815587B (en) Image processing method and device
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
CN108734074A (en) Fingerprint identification method and fingerprint identification device
CN111311500A (en) Method and device for carrying out color restoration on image
JP4807866B2 (en) Color reproduction processing switching device and readable recording medium
JPH05298443A (en) Color picture area extracting device
CN108322723B (en) Color distortion compensation method and device and television
CN111242087B (en) Object identification method and device
JP2004185183A (en) Image correction device, character recognition method, and image correction program
KR100230446B1 (en) Determination method for color of light from color image
JPH06274618A (en) Area identifying device
JP2000298725A (en) Device and method for detecting text data
JPH05165955A (en) Image processing method
JP2655838B2 (en) Image registration search method of image filling system
CN116095306A (en) Picture detection method, device, computer equipment and storage medium
JPH04282989A (en) Automatic tracking device
CN110225318A (en) Image processing equipment and image processing method
CN114286088A (en) Video screen splash detection method, device and storage medium applied to graphic processor
JPH05266251A (en) Character extracting device
CN115170407A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN116645274A (en) Image processing method, device, electronic equipment and computer readable storage medium