JP2002163650A - Color extracting image processing device and color extracting method - Google Patents

Color extracting image processing device and color extracting method

Info

Publication number
JP2002163650A
JP2002163650A JP2000359233A JP2000359233A JP2002163650A JP 2002163650 A JP2002163650 A JP 2002163650A JP 2000359233 A JP2000359233 A JP 2000359233A JP 2000359233 A JP2000359233 A JP 2000359233A JP 2002163650 A JP2002163650 A JP 2002163650A
Authority
JP
Japan
Prior art keywords
color
pixels
reference area
extracted
gloss
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
JP2000359233A
Other languages
Japanese (ja)
Inventor
Masatoshi Fujiwara
正年 藤原
Akira Nagaoka
暁 長岡
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP2000359233A priority Critical patent/JP2002163650A/en
Publication of JP2002163650A publication Critical patent/JP2002163650A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Spectrometry And Color Measurement (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Investigating Or Analysing Materials By Optical Means (AREA)
  • Image Processing (AREA)
  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Processing Of Color Television Signals (AREA)
  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To decide whether it is the same color or not with high reproducibility regardless of the presence of gloss. SOLUTION: A color image picked up by a color TV camera 11 is displayed on a display device 16. When a reference area including a color to be extracted is designated within the display device 16 and when the inside of the reference area has gloss, the range of the same color is determined by an RGB color system and when the inside of the reference area does not have gloss, the range of the same color is determined by hue, saturation and lightness. Further, when an examination area is designated in the color image, corresponding to whether the color selected in the reference area has gloss or not, any one range of the same color is used and a pixel within the relevant range is extracted from the examination area and displayed on the display device 16.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、色抽出画像処理装
置および色抽出方法に関するものである。
The present invention relates to a color extraction image processing apparatus and a color extraction method.

【0002】[0002]

【従来の技術】一般に、カラー画像における色の特定に
は、カラー画像の各画素毎の色と等色する原刺激の混合
量である三刺激値を用いている。カラー画像はR(70
0.0nm),G(546.1nm),B(435.8
nm)の3色を原刺激に用いているから、色を特定する
には、R,G,Bの三刺激値によって色を表すRGB表
色系が採用される。以下では、原刺激を[R][G]
[B]のようにブラケット付きの符号は色刺激を表すも
のとし、R,G,Bのようにブラケットなしの符号は三
刺激値を表すものとする。すなわち、色[F]と等色す
る三刺激値は次式で表されるから、三刺激値R,G,B
によって色を特定することができる。 [F]=R[R]+G[G]+B[B] ところで、カラー画像は対象物をカラーTVカメラのよ
うな撮像装置で撮像して得られるものが多く、実際には
同色であっても対象物への照射光量のむらによって三刺
激値R,G,Bが異なることがある。このように、三刺
激値R,G,Bが異なっているだけで同色と判断されな
いのでは現実にそぐわないから、カラー画像内での色を
特定する場合は、対象物への照射光量のむらを考慮して
三刺激値R,G,Bにそれぞれ範囲を設定し、三刺激値
R,G,Bのいずれもが設定範囲を超えなければ同色と
判断することが考えられている。しかしながら、三刺激
値について範囲を設定した場合には不要な色領域までも
含まれ、同色ではない場合にも同色と判断してしまうと
いう問題が生じる。
2. Description of the Related Art Generally, a color in a color image is specified by using a tristimulus value which is a mixed amount of original stimuli having the same color as the color of each pixel of the color image. The color image is R (70
0.0 nm), G (546.1 nm), B (435.8)
Since the three colors (nm) are used as the primary stimuli, an RGB color system that represents the colors by the tristimulus values of R, G, and B is used to specify the colors. In the following, the primary stimulus is [R] [G]
Symbols with brackets, such as [B], represent color stimuli, and symbols without brackets, such as R, G, B, represent tristimulus values. That is, since the tristimulus values that match the color [F] are represented by the following equations, the tristimulus values R, G, and B
Can specify the color. [F] = R [R] + G [G] + B [B] By the way, many color images are obtained by imaging an object with an imaging device such as a color TV camera. The tristimulus values R, G, and B may vary depending on the unevenness in the amount of light applied to the target. As described above, it is not appropriate if the same color is not determined because the three stimulus values R, G, and B are different from each other. Therefore, when specifying the color in the color image, the unevenness of the irradiation light amount to the object is considered. It is considered that a range is set for each of the tristimulus values R, G, and B, and if all of the tristimulus values R, G, and B do not exceed the set ranges, it is considered that the colors are the same. However, when a range is set for the tristimulus values, an unnecessary color area is also included, and a problem arises in that the color is determined to be the same even when the color is not the same.

【0003】上述のような問題を解決するために、特開
平11−134503号公報に開示された技術では、非
抽出対象とする画素の三刺激値R,G,Bに関連する値
を含まない範囲内で抽出対象のR,G,Bの範囲を設定
している。また、三刺激値R,G,Bに対して範囲を設
定するほか、R−G値、B−G値、R−B値のような差
分値についての範囲を付加したり、三刺激値R,G,B
を色相、彩度、明度に変換しこれらの値について範囲を
設定したり、これらの値の差分値について範囲を設定し
たりする技術も同公報には開示されている。
In order to solve the above-mentioned problem, the technique disclosed in Japanese Patent Application Laid-Open No. 11-134503 does not include values related to tristimulus values R, G, and B of a pixel to be extracted. The range of R, G, B to be extracted is set within the range. Also, in addition to setting ranges for the tristimulus values R, G, and B, ranges for difference values such as RG values, BG values, and RB values are added, and the tristimulus values R , G, B
The publication also discloses a technique of converting into hue, saturation, and lightness and setting a range for these values, and setting a range for a difference value between these values.

【0004】上述した問題を解決する技術としては、特
公平7−92401号公報に記載されているように、カ
ラー画像から得られる三刺激値R,G,Bを色相、彩
度、明度、色調角、色調長に変換し、これらの5成分の
うち色相と色調角とを含む少なくとも3成分について範
囲を設定することにより、範囲内の色を同色と判断して
いる。また、表色系としてL* * * 表色系を採用で
きることが記載されている。上記公報には色調角および
色調長は、明度と彩度とからなる色調面における色調ベ
クトルの角度および長さにそれぞれ相当することが記載
されている。
As a technique for solving the above-mentioned problem, as described in Japanese Patent Publication No. Hei 7-92401, tristimulus values R, G, and B obtained from a color image are converted into hue, saturation, lightness, and color tone. The color in the range is determined to be the same color by converting into the angle and the color tone length and setting the range for at least three components including the hue and the color tone angle among these five components. It also describes that an L * a * b * color system can be adopted as a color system. The above publication describes that the color tone angle and color tone length correspond to the angle and length of a color tone vector on a color tone surface composed of lightness and chroma, respectively.

【0005】[0005]

【発明が解決しようとする課題】上述のように、カラー
画像内での対象物の色は対象物への照射光量に応じて変
化するものであり、とくに、近年ますます小型化してき
ているチップ部品の半田メッキの良否の判定やリレー端
子の汚れなどの外観検査を行う場合には、対象物が金、
銀、銅などの金属であって光沢を有しているものである
から、対象物を撮像する位置と光源の位置との関係や光
源の明るさによってカラー画像内での対象物の色に大き
な変化が生じ、光沢を考慮していない従来の技術では同
色か否かの判定が困難である。
As described above, the color of an object in a color image changes according to the amount of light applied to the object, and in particular, chips which have been increasingly miniaturized in recent years. When determining the quality of solder plating on parts or performing an appearance inspection such as dirt on relay terminals, the target object should be gold,
Since it is a metal such as silver or copper and has luster, the color of the object in the color image may be large depending on the relationship between the position where the object is imaged and the position of the light source and the brightness of the light source. A change occurs, and it is difficult to determine whether or not the colors are the same using the conventional technology that does not consider the gloss.

【0006】本発明は上記事由に鑑みて為されたもので
あり、その目的は、光沢を有していない領域だけではな
く光沢を有する領域についても同色か否かの判定を再現
性よく行うことを可能とした色抽出画像処理装置および
色抽出方法を提供することにある。
The present invention has been made in view of the above circumstances, and an object of the present invention is to determine with good reproducibility whether or not not only a region having no gloss but also a region having gloss has the same color. It is an object of the present invention to provide a color extraction image processing device and a color extraction method which can realize the above.

【0007】[0007]

【課題を解決するための手段】請求項1の発明は、RG
B表色系の三刺激値を各画素の値とするカラー画像につ
いて抽出しようとする色を含む基準領域を指定する基準
領域設定手段と、基準領域内が光沢をもつときにRGB
表色系で同色の範囲を決定する第1の抽出範囲設定手段
と、基準領域内が光沢をもたないときに色相と彩度と明
度とにより同色の範囲を決定する第2の抽出範囲設定手
段と、基準領域と同色の画素を抽出しようとするカラー
画像に対して検査領域を指定する検査領域設定手段と、
検査領域から抽出すべき色が光沢をもつか否かに応じて
第1の抽出範囲設定手段と第2の抽出範囲設定手段との
一方により決定した同色の範囲を用い、当該範囲内の画
素を検査領域から抽出する色抽出手段とを備えるもので
ある。
According to the first aspect of the present invention, an RG
A reference region setting means for specifying a reference region including a color to be extracted from a color image having tristimulus values of the B color system as values of respective pixels; and RGB when the reference region has gloss.
First extraction range setting means for determining the same color range in the color system, and second extraction range setting for determining the same color range based on hue, saturation, and brightness when the reference region has no gloss Means, an inspection area setting means for specifying an inspection area for a color image from which pixels of the same color as the reference area are to be extracted,
Using the same color range determined by one of the first extraction range setting means and the second extraction range setting means depending on whether the color to be extracted from the inspection area has gloss, pixels in the range are determined. Color extraction means for extracting from the inspection area.

【0008】請求項2の発明は、請求項1の発明におい
て、第1の抽出範囲設定手段では全画素のR/BとG/
Bとの値の各平均値を中心として同色の範囲を決定する
ものである。
According to a second aspect of the present invention, in the first aspect of the invention, the first extraction range setting means sets the R / B and G /
The range of the same color is determined around each average value of the values of B and B.

【0009】請求項3の発明は、請求項1の発明におい
て、第1の抽出範囲設定手段では全画素のR−BとG−
Bとの値の各平均値を中心として同色の範囲を決定する
ものである。
According to a third aspect of the present invention, in the first aspect of the present invention, the first extraction range setting means sets RB and G-
The range of the same color is determined around each average value of the values of B and B.

【0010】請求項4の発明は、請求項1ないし請求項
3の発明において、前記基準領域内の全画素のR/Bと
G/Bとの値の各平均値または前記基準領域内の全画素
のR−BとG−Bとの値の各平均値とあらかじめ設定し
た判定値との大小関係により基準領域内が光沢をもつか
否かを判定する光沢判定手段を備え、前記光沢判定手段
による判定結果を提示する判定結果提示手段を備えるも
のである。
According to a fourth aspect of the present invention, in the first to third aspects, the average value of the R / B and G / B values of all the pixels in the reference area or the total value of the R / B and G / B values in the reference area is obtained. A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relationship between each average value of the RB and GB values of the pixel and a preset judgment value; Is provided with a determination result presenting means for presenting the determination result according to.

【0011】請求項5の発明は、請求項1ないし請求項
3の発明において、前記基準領域内の全画素のR/Bと
G/Bとの値の各平均値または前記基準領域内の全画素
のR−BとG−Bとの値の各平均値とあらかじめ設定し
た判定値との大小関係により基準領域内が光沢をもつか
否かを判定する光沢判定手段を備え、前記光沢判定手段
による判定結果を登録する基準色登録手段と、基準色登
録手段により登録された結果を用いて第1の抽出範囲設
定手段と第2の抽出範囲設定手段とを選択する選択手段
を備えるものである。
According to a fifth aspect of the present invention, in the first to third aspects of the present invention, the average value of the R / B and G / B values of all the pixels in the reference area or the total value of the R / B and G / B values in the reference area is obtained. A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relationship between each average value of the RB and GB values of the pixel and a preset judgment value; And a selection means for selecting a first extraction range setting means and a second extraction range setting means using the result registered by the reference color registration means. .

【0012】請求項6の発明は、請求項1ないし請求項
3の発明において、前記基準領域内の全画素のR/Bと
G/Bとの値の各平均値または前記基準領域内の全画素
のR−BとG−Bとの値の各平均値とあらかじめ設定し
た判定値との大小関係により基準領域内が光沢をもつか
否かを判定する光沢判定手段を備え、前記光沢判定手段
による判定結果を用いて第1の抽出範囲設定手段と第2
の抽出範囲設定手段とを選択する自動選択手段を備える
ものである。
According to a sixth aspect of the present invention, in the first to third aspects, the average value of the R / B and G / B values of all the pixels in the reference area or the total value of the R / B and G / B values in the reference area is obtained. A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relationship between each average value of the RB and GB values of the pixel and a preset judgment value; The first extraction range setting means and the second
Automatic selection means for selecting the extraction range setting means.

【0013】請求項7の発明は、RGB表色系の三刺激
値を各画素の値とするカラー画像について抽出しようと
する色を含むように指定された基準領域内が、光沢をも
つときにはRGB表色系で同色の範囲を決定し光沢を持
たないときにはRGB表色系とは異なる表色系で同色の
範囲を決定し、次に、基準領域と同色の画素を抽出しよ
うとするカラー画像に対して設定した検査領域から抽出
すべき色が光沢をもつか否かに応じて前記2種類の範囲
の一方を選択して当該範囲内の画素を検査領域から抽出
することを特徴とする。
According to a seventh aspect of the present invention, when a reference area designated to include a color to be extracted from a color image having tristimulus values of the RGB color system as the values of each pixel includes a color to be extracted, if the reference area has a gloss, the RGB is used. When the same color range is determined in the color system, and when there is no gloss, the same color range is determined in a color system different from the RGB color system, and then the pixels of the same color as the reference area are extracted. The method is characterized in that one of the two ranges is selected according to whether or not the color to be extracted from the inspection area set has gloss, and pixels within the range are extracted from the inspection area.

【0014】請求項8の発明は、請求項7の発明におい
て、前記基準領域内の全画素のR/BとG/Bとの値の
各平均値とあらかじめ設定した判定値との大小関係によ
り基準領域内が光沢をもつか否かを判定することを特徴
とする。
According to an eighth aspect of the present invention, in accordance with the seventh aspect of the present invention, the magnitude relationship between the average value of the R / B and G / B values of all the pixels in the reference area and a predetermined judgment value is determined. It is characterized in that it is determined whether or not the reference area has gloss.

【0015】請求項9の発明は、請求項7の発明におい
て、前記基準領域内の全画素のR−BとG−Bとの値の
各平均値とあらかじめ設定した判定値との大小関係によ
り基準領域内が光沢をもつか否かを判定することを特徴
とする。
According to a ninth aspect of the present invention, in accordance with the seventh aspect of the present invention, the magnitude relationship between each average value of RB and GB values of all pixels in the reference area and a predetermined judgment value is determined. It is characterized in that it is determined whether or not the reference area has gloss.

【0016】[0016]

【発明の実施の形態】(第1の実施の形態)以下に説明
する本実施形態では、図1に示す画像処理装置を用い
る。この画像処理装置は、撮像装置としてのカラーTV
カメラ11により対象物を含む空間領域を撮像し、カラ
ーTVカメラ11により得られたカラー画像内から、指
定した色の画素を抽出するものである。色の指定にはキ
ーボードやマウスなどからなる入力装置18を用いる。
カラーTVカメラ11により得られたカラー画像は入力
回路12によりデジタル信号に変換され、RGB表色系
による三刺激値R,G,Bに対応した各色の信号値が各
別に画像取込メモリ13R,13G,13Bに格納され
る。画像取込メモリ13R,13G,13Bに格納され
た三刺激値R,G,Bは、数1に示す色変換式を用いて
表色系が変換される。ここで、数1では三刺激値をX,
Y,Zと表しており、右辺の第1項はRGB表色系の三
刺激値R,G,Bの1次変換であるが、右辺の第2項と
して非線形な補正項を含んでおり、XYZ表色系の三刺
激値に補正を加えた形になっている。この補正項により
人間の色に対する感覚尺度に適合させることが可能にな
る。本実施形態において用いる表色系はXYZ表色系に
補正を加えた形になるから補正XYZ表色系と呼ぶこと
にする。数1においてa〜rは、カラーTVカメラ11
の分光感度に応じた係数である。ただし、カラーTVカ
メラ11が決まれば定数として扱うことができる。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) In this embodiment described below, the image processing apparatus shown in FIG. 1 is used. This image processing device is a color TV as an imaging device.
The camera 11 captures an image of a space area including an object, and extracts a pixel of a specified color from a color image obtained by the color TV camera 11. An input device 18 including a keyboard, a mouse, and the like is used to specify a color.
The color image obtained by the color TV camera 11 is converted into a digital signal by the input circuit 12, and the signal values of each color corresponding to the tristimulus values R, G, and B according to the RGB color system are separately stored in the image capture memory 13R, 13G and 13B. The tristimulus values R, G, and B stored in the image capture memories 13R, 13G, and 13B are converted into a color system using a color conversion formula shown in Expression 1. Here, in Equation 1, the tristimulus values are X,
The first term on the right side is a primary conversion of the tristimulus values R, G, and B of the RGB color system, but includes a nonlinear correction term as the second term on the right side. The correction is made to the tristimulus values of the XYZ color system. This correction term makes it possible to adapt to a sensation measure for human color. Since the color system used in the present embodiment has a form obtained by adding a correction to the XYZ color system, it will be referred to as a corrected XYZ color system. In the expression 1, a to r represent the color TV camera 11
Is a coefficient corresponding to the spectral sensitivity of However, if the color TV camera 11 is determined, it can be treated as a constant.

【0017】[0017]

【数1】 (Equation 1)

【0018】RGB表色系の三刺激値R,G,Bから求
めた補正XYZ表色系の三刺激値X,Y,Zに数2を適
用すれば色相(H)、彩度(C)、明度(L)を求める
ことができる。色相(H)、彩度(C)、明度(L)
は、三刺激値X,Y,ZをCIELAB色空間(L*
* * 色空間)にマッピングすれば、CIELAB色空
間での座標値L* ,a* ,b* に基づいて求めることが
できる。
By applying Equation 2 to the tristimulus values X, Y, and Z of the corrected XYZ color system obtained from the tristimulus values R, G, and B of the RGB color system, the hue (H) and the saturation (C) , Lightness (L). Hue (H), saturation (C), lightness (L)
Calculates the tristimulus values X, Y, and Z in the CIELAB color space (L * a
(* b * color space), it can be obtained based on the coordinate values L * , a * , b * in the CIELAB color space.

【0019】[0019]

【数2】 (Equation 2)

【0020】ここに、数1および数2によれば、色相
(H)、彩度(C)、明度(L)はRGB表色系の三刺
激値R,G,Bのみを変数として求めることができるか
ら、RGB表色系の三刺激値R,G,Bと色相(H)、
彩度(C)、明度(L)とを対応付けるテーブルを作成
することができる。そこで、このようなテーブルをルッ
クアップテーブル14として設けておくことにより、画
像取込メモリ13R,13G,13Bに格納された各画
素ごとの信号値から、色相(H)、彩度(C)、明度
(L)をただちに求めることができる。この処理はCP
U10が行っており、作業中の値や演算結果は演算用メ
モリ15に格納される。すなわち、各画素ごとの色相
(H)、彩度(C)、明度(L)は演算用メモリ15に
格納される。
Here, according to equations (1) and (2), the hue (H), saturation (C), and lightness (L) are obtained by using only the tristimulus values R, G, and B of the RGB color system as variables. , The tristimulus values R, G, B of the RGB color system and the hue (H),
A table for associating the saturation (C) and the lightness (L) can be created. Therefore, by providing such a table as the lookup table 14, the hue (H), saturation (C), saturation (C), and the like can be obtained from the signal values for each pixel stored in the image capture memories 13R, 13G, and 13B. The brightness (L) can be obtained immediately. This process is CP
U10 performs the operation and stores the values and operation results in the operation memory 15. That is, the hue (H), saturation (C), and lightness (L) of each pixel are stored in the calculation memory 15.

【0021】本実施形態では、CRTのようなディスプ
レイ装置16を用いており、ディスプレイ装置16には
表示用回路17を通して画像が表示される。また、入力
装置18ではディスプレイ装置16に表示しようとする
部分を指定する機能を有する。本実施形態では、カラー
TVカメラ11により撮像したカラー画像内から特定の
色範囲を抽出する際に光沢を持つ色か光沢を持たない色
かを選択することが可能になっている。つまり、抽出す
べき色をディスプレイ装置16の画面に表示された色か
ら選択する「基準色登録・選択処理」を行って抽出すべ
き色を決定し、その後に、決定された色と同色とみなせ
る範囲内の色を含む領域を自動的に抽出して抽出した領
域のみをディスプレイ装置16に表示する「色抽出処
理」を行うのであって、「基準色登録・選択処理」の際
には、図2に示すように、ディスプレイ装置16の画面
上に「1.1光沢をもった色」「1.2光沢をもたない
色」が選択可能なメニューを表示し、どちらの領域を抽
出するかの指示が可能になっている。
In the present embodiment, a display device 16 such as a CRT is used, and an image is displayed on the display device 16 through a display circuit 17. The input device 18 has a function of designating a portion to be displayed on the display device 16. In the present embodiment, when extracting a specific color range from a color image captured by the color TV camera 11, it is possible to select a color having gloss or a color having no gloss. In other words, the color to be extracted is determined by performing “reference color registration / selection processing” for selecting the color to be extracted from the colors displayed on the screen of the display device 16, and then it can be regarded as the same color as the determined color. A “color extraction process” is performed in which an area including a color within the range is automatically extracted and only the extracted area is displayed on the display device 16. As shown in FIG. 2, a menu in which “1.1 glossy color” and “1.2 non-glossy color” can be selected is displayed on the screen of the display device 16 to determine which area is to be extracted. Instructions are available.

【0022】光沢をもった色を抽出するように指示した
場合には、図3に示す手順で処理を行う。まず、カラー
TVカメラ11により対象物が撮像されると画像取込メ
モリ13R,13G,13Bに格納されカラー画像が表
示用回路17を通してディスプレイ装置16に表示され
る。ここで、使用者は抽出しようとする領域を入力装置
18によって指定する。たとえば、図4に示すように、
ディスプレイ装置16の画面上に対象物1が表示され、
対象物1において抽出すべき領域D1と抽出の必要がな
い領域D2とが存在するときに、抽出すべき領域D1の
色を取り出すための基準領域Dbをマウスなどを用いて
指定する(S1)。つまり、ディスプレイ装置16およ
び入力装置18により基準領域設定手段が構成される。
基準領域Dbはほぼ同じ色とみなせる範囲で指定する。
基準領域Dbが指定されると、CPU10では、基準領
域Db内の各画素について、それぞれR/B、G/Bの
2種類の値を求める(S2)。その後、各種類の値の平
均値RBm,GBmを求め、求めた平均値RBm,GB
mにそれぞれ規定の余裕値α,βを加減算して抽出すべ
き上限値と下限値とを設定する。つまり、R/Bに対し
ては上限値t1=RBm+α、下限値t2=RBm−α
となり、G/Bに対しては上限値s1=GBm+β、下
限値s2=GBm−βになる。求めた上限値t1,s1
および下限値t2,s2は演算用メモリ15に格納され
る(S3)。上限値t1,s1および下限値t2,s2
が決定されると、R/Bの値およびG/Bの値に関して
抽出すべき範囲は、RBm−α<R/B<RBm+αG
Bm−β<G/B<GBm+βという条件を満たすR/
Bの値およびG/Bの値ということになる。ここで、余
裕値α,βには、ディスプレイ装置16の画面内で指定
した領域における各種類の値R/B,G/Bの分散を用
いるようにすれば、上限値および下限値を自動的に決定
することができる。また、分散に一定の規則で補正を加
えて値を余裕値α,βとして用いてもよい。このよう
に、CPU10の動作によって第1の抽出範囲設定手段
が実現されている。
When an instruction to extract a glossy color is issued, the processing is performed according to the procedure shown in FIG. First, when an object is imaged by the color TV camera 11, the image is stored in the image capturing memories 13R, 13G, and 13B, and a color image is displayed on the display device 16 through the display circuit 17. Here, the user specifies an area to be extracted by using the input device 18. For example, as shown in FIG.
The object 1 is displayed on the screen of the display device 16,
When there is an area D1 to be extracted in the object 1 and an area D2 that does not need to be extracted, a reference area Db for extracting the color of the area D1 to be extracted is designated using a mouse or the like (S1). That is, the display device 16 and the input device 18 constitute reference area setting means.
The reference area Db is specified within a range that can be regarded as substantially the same color.
When the reference area Db is designated, the CPU 10 obtains two values of R / B and G / B for each pixel in the reference area Db (S2). After that, the average values RBm and GBm of the values of the respective types are obtained, and the obtained average values RBm and GB are obtained.
An upper limit value and a lower limit value to be extracted are set by adding and subtracting prescribed margin values α and β to m, respectively. That is, for R / B, the upper limit value t1 = RBm + α and the lower limit value t2 = RBm−α
And the upper limit s1 = GBm + β and the lower limit s2 = GBm−β for G / B. Obtained upper limit values t1, s1
And the lower limit values t2 and s2 are stored in the calculation memory 15 (S3). Upper limit value t1, s1 and lower limit value t2, s2
Is determined, the range to be extracted for the value of R / B and the value of G / B is RBm−α <R / B <RBm + αG
R / which satisfies the condition of Bm-β <G / B <GBm + β
That is, the value of B and the value of G / B. Here, if the variance of each type of value R / B and G / B in the area specified in the screen of the display device 16 is used as the margin values α and β, the upper limit value and the lower limit value are automatically set. Can be determined. Alternatively, the variance may be corrected according to a certain rule, and the values may be used as margin values α and β. As described above, the operation of the CPU 10 implements a first extraction range setting unit.

【0023】上述のようにして抽出すべき色の範囲を決
定した後には、ディスプレイ装置16の画面に表示され
た画像内から指定された色の範囲に属する画素を抽出し
てディスプレイ装置16の画面に表示する「色抽出処
理」を行う。色抽出処理は、図5に示す手順を有し、使
用者は対象物がディスプレイ装置16に表示された状態
において入力装置18によって領域を指定する。ただ
し、図6に示すように、指定する検査領域Daは抽出し
ようとする領域D1を包含するように設定する。検査領
域Daを設定する検査領域設定手段は、ディスプレイ装
置16と入力装置18とにより実現される。検査領域D
aが指定されると、図5に示すように、CPU10では
検査領域Daの中の各画素について、それぞれR/B、
G/Bの2種類の値を求める(S1)。求めた2種類の
値がともに「基準色登録・選択処理」において設定した
上限値t1,s1および下限値t2,s2により規定さ
れた範囲内であるという条件を満たすときに(S2)、
その画素を抽出し(S3)、一方でも条件が満たされな
いときにはその画素は抽出しない(S4)。このような
処理を検査領域Daの中のすべての画素について行えば
(S5)、基準領域Dbから抽出した画素の色と同色の
範囲内である画素群を検査領域Daから抽出することが
できる。このようにして検査領域Daから抽出した画素
は、図7に示すように、ディスプレイ装置16の画面に
そのまま表示され、検査領域Da内から抽出されなかっ
た画素および検査領域Da外の画素は、いずれもR=G
=B=0の画素として扱われ、ディスプレイ装置16に
は表示されない。要するに、カラー画像から抽出された
画素のみがディスプレイ装置16の画面に表示されるこ
とになる。
After the range of colors to be extracted is determined as described above, pixels belonging to the specified color range are extracted from the image displayed on the screen of the display device 16 and the screen of the display device 16 is extracted. Perform the "color extraction process" displayed in. The color extraction process has a procedure shown in FIG. 5, and the user specifies an area with the input device 18 while the target object is displayed on the display device 16. However, as shown in FIG. 6, the designated inspection area Da is set to include the area D1 to be extracted. The inspection area setting means for setting the inspection area Da is realized by the display device 16 and the input device 18. Inspection area D
When “a” is designated, as shown in FIG. 5, the CPU 10 performs R / B and R / B conversion for each pixel in the inspection area Da.
Two values of G / B are obtained (S1). When both of the obtained two types of values satisfy the condition of being within the range defined by the upper limit values t1, s1 and the lower limit values t2, s2 set in the “reference color registration / selection process” (S2),
The pixel is extracted (S3), and if the condition is not satisfied, the pixel is not extracted (S4). If such processing is performed for all the pixels in the inspection area Da (S5), a group of pixels within the same color range as the color of the pixels extracted from the reference area Db can be extracted from the inspection area Da. The pixels extracted from the inspection area Da in this way are displayed on the screen of the display device 16 as shown in FIG. 7, and the pixels not extracted from the inspection area Da and the pixels outside the inspection area Da Also R = G
= B = 0 and is not displayed on the display device 16. In short, only the pixels extracted from the color image are displayed on the screen of the display device 16.

【0024】上述した処理は光沢をもつ領域を抽出しよ
うとする場合であるが、光沢をもたない領域を抽出しよ
うとするときには以下の手順で処理を行う。この場合も
光沢を持つ領域を抽出しようとする場合と同様に、まず
「基準色登録・選択処理」を行う。この処理では、図8
に示すように、まずディスプレイ装置16に表示された
カラー画像から抽出しようとする領域D1の色を含む基
準領域Dbを使用者が入力装置18によって指定する
(S1)。基準領域Dbはほぼ同じ色とみなせる範囲で
指定され、基準領域Dbが指定されると、CPU10で
は基準領域Db内の各画素について、それぞれ色相
(H)、彩度(C)、明度(L)を求める(S2)。つ
まり、ルックアップテーブル14を用いて三刺激値R,
G,Bから色相(H)、彩度(C)、明度(L)への変
換を行う。その後、色相(H)、彩度(C)、明度
(L)についてそれぞれ平均値Hm,Cm,Lmを求
め、求めた平均値Hm,Cm,Lmにそれぞれ規定の余
裕値γ、δ、εを加減算して抽出すべき上限値と下限値
とを設定する。つまり、色相(H)に対しては上限値h
1=Hm+γ、下限値h2=Hm−γとなり、彩度
(C)に対しては上限値c1=Cm+δ、下限値c2=
Cm−δとなり、明度(L)に対しては上限値l1=L
m+ε、下限値l2=Lm−εとなる。求めた上限値h
1,c1,l1および下限値h2,c2,l2は演算用
メモリ15に格納される(S3)。なお、余裕値γ,
δ,εには、ディスプレイ装置16の画面内で指定した
基準領域Dbでの色相(H)、彩度(C)、明度(L)
の分散を用いて、上限値および下限値を自動的に決定し
たり、分散に補正を加えて上限値および下限値を設定し
てもよい。このように、CPU10により第2の抽出範
囲設定手段が実現されている。
The above-described processing is for the case of extracting a glossy area. When extracting a non-glossy area, the processing is performed in the following procedure. In this case, similarly to the case where a glossy area is to be extracted, first, “reference color registration / selection processing” is performed. In this process, FIG.
As shown in (1), the user first specifies the reference area Db including the color of the area D1 to be extracted from the color image displayed on the display device 16 by the input device 18 (S1). The reference area Db is specified in a range that can be regarded as substantially the same color. When the reference area Db is specified, the CPU 10 determines the hue (H), the saturation (C), and the brightness (L) for each pixel in the reference area Db. (S2). That is, the tristimulus values R,
G and B are converted into hue (H), saturation (C), and lightness (L). Thereafter, average values Hm, Cm, and Lm are determined for the hue (H), saturation (C), and lightness (L), respectively, and the determined average values Hm, Cm, and Lm are respectively replaced with prescribed margin values γ, δ, and ε. An upper limit value and a lower limit value to be extracted by addition and subtraction are set. That is, for the hue (H), the upper limit h
1 = Hm + γ, lower limit h2 = Hm−γ, and upper limit c1 = Cm + δ and lower limit c2 =
Cm−δ, and the upper limit l1 = L for the lightness (L)
m + ε, and the lower limit l2 = Lm−ε. The calculated upper limit h
1, c1, l1 and the lower limit values h2, c2, l2 are stored in the operation memory 15 (S3). Note that the margin values γ,
In δ and ε, hue (H), saturation (C), and lightness (L) in the reference area Db specified in the screen of the display device 16 are shown.
The upper limit and the lower limit may be automatically determined using the variance, or the upper limit and the lower limit may be set by correcting the variance. As described above, the CPU 10 implements a second extraction range setting unit.

【0025】上述のようにして抽出すべき色の範囲を決
定した後には、ディスプレイ装置16の画面に表示され
た画像内から指定された色の範囲に属する画素を抽出し
てディスプレイ装置16の画面に表示する「色抽出処
理」を行う。つまり、CPU10により色抽出手段が実
現される。光沢をもたない対象物の色抽出処理は、図9
に示す手順を有し、まず使用者は対象物がディスプレイ
装置16に表示された状態において入力装置18によっ
て抽出すべき領域D1の全体を包含するように検査領域
Daを指定する。検査領域Daが指定されると、CPU
10では検査領域Daの中の各画素について、それぞれ
ルックアップテーブル14を用いて色相(H)、彩度
(C)、明度(L)を求める(S1)。各画素について
色相(H)、彩度(C)、明度(L)のいずれもが上述
した上限値h1,c1,l1と下限値h2,c2,l2
との間であるときには(S2)、さらに数3を用いて色
差を求め、色差が規定の範囲内であるときに(S3)、
その画素を抽出する(S4)。また、ステップS2にお
いて色相(H)、彩度(C)、明度(L)のいずれかが
上限値h1,c1,l1と下限値h2,c2,l2とに
より規定された範囲から逸脱する場合や、数3において
色差が規定の範囲を超えているときには、画素を抽出し
ない(S5)。数3においてΔH* 、ΔL* 、ΔC*
それぞれ各画素の色相(H)、彩度(C)、明度(L)
と、平均値Hm,Cm,Lmとの差(色相差、明度差、
彩度差という)を表す。
After the range of colors to be extracted is determined as described above, pixels belonging to the specified range of colors are extracted from the image displayed on the screen of the display device 16 and the screen of the display device 16 is extracted. Perform the "color extraction process" displayed in. That is, the CPU 10 implements a color extracting unit. The color extraction processing for an object having no luster is shown in FIG.
First, the user designates the inspection area Da so as to cover the entire area D1 to be extracted by the input device 18 while the object is displayed on the display device 16. When the inspection area Da is designated, the CPU
In step 10, the hue (H), saturation (C), and lightness (L) are obtained for each pixel in the inspection area Da using the lookup table 14 (S1). For each pixel, the hue (H), saturation (C), and brightness (L) are all the upper limit values h1, c1, and l1 and the lower limit values h2, c2, and l2.
When (S2), the color difference is further obtained by using Equation 3, and when the color difference is within a specified range (S3),
The pixel is extracted (S4). In addition, when any of the hue (H), the saturation (C), and the lightness (L) deviate from the range defined by the upper limit h1, c1, l1 and the lower limit h2, c2, l2 in step S2, If the color difference exceeds the specified range in Equation 3, no pixel is extracted (S5). In Equation 3, ΔH * , ΔL * , and ΔC * are the hue (H), saturation (C), and brightness (L) of each pixel, respectively.
And the average values Hm, Cm, Lm (hue difference, lightness difference,
Saturation difference).

【0026】[0026]

【数3】 (Equation 3)

【0027】このような処理を検査領域Daの中のすべ
ての画素について行えば(S6)、基準領域Dbから抽
出した画素の色と同色の範囲内である画素群を検査領域
Daから抽出することができる。このようにして検査領
域Daから抽出した画素は、ディスプレイ装置16の画
面にそのまま表示され、検査領域Da内から抽出されな
かった画素および検査領域Da外の画素は、いずれもR
=G=B=0の画素として扱われる。その結果、カラー
画像から抽出された画素のみがディスプレイ装置16の
画面に表示されることになる。
If such processing is performed for all the pixels in the inspection area Da (S6), a pixel group within the same color range as the color of the pixels extracted from the reference area Db is extracted from the inspection area Da. Can be. The pixels extracted from the inspection area Da in this manner are displayed on the screen of the display device 16 as they are, and both the pixels not extracted from the inspection area Da and the pixels outside the inspection area Da are R
= G = B = 0. As a result, only the pixels extracted from the color image are displayed on the screen of the display device 16.

【0028】なお、数3により色差を求める代わりに数
4により色差を求めてもよい。数4はCIELAB色空
間での色差であって、ΔL* ,Δa* ,Δb* はそれぞ
れ各画素の明度指数L* 、色座標a* ,b* とそれぞれ
の平均値L* m,a* m,b * mとの差である。
It should be noted that instead of obtaining the color difference from Equation 3,
4, the color difference may be obtained. Number 4 is CIELAB color sky
Color difference between ΔL*, Δa*, Δb*Each
The brightness index L of each pixel*, Color coordinates a*, B*And each
Average value L*m, a*m, b *m.

【0029】[0029]

【数4】 (Equation 4)

【0030】以上説明したように、光沢をもつ色と光沢
をもたない色とを使用者が識別していろの抽出方法を異
ならせているから、光沢をもつ色であっても再現性のよ
い色の抽出が可能になるのである。
As described above, since the method of extracting the difference between a user having a glossy color and a color having no glossiness by the user is different, the reproducibility of the color having the glossiness can be improved. Good colors can be extracted.

【0031】(第2の実施の形態)本実施形態では、第
1の実施の形態と同様に、光沢をもつ色と光沢をもたな
い色との抽出方法を使用者が選択するものである。第1
の実施の形態においては、光沢をもつ色を抽出するため
に着目する変数として、R/B,G/Bを用いたが、本
実施形態ではR−B,G−Bを用いる。つまり、図10
に示すように、抽出すべき領域D1の色を取り出すため
の基準領域Dbをマウスなどを用いて使用者が指定した
後(S1)、基準領域Db内の各画素について、CPU
10がそれぞれR−B、G−Bの2種類の値を求める
(S2)。その後、各種類の値の平均値RBm,GBm
を求め、求めた平均値RBm,GBmにそれぞれ規定の
余裕値α,βを加減算して抽出すべき上限値と下限値と
を設定する。つまり、R−Bに対しては上限値t1=R
Bm+α、下限値t2=RBm−αとなり、G−Bに対
しては上限値s1=GBm+β、下限値s2=GBm−
βになる。求めた上限値t1,s1および下限値t2,
s2は演算用メモリ15に格納される(S3)。上限値
t1,s1および下限値t2,s2が決定されると、R
−Bの値およびG−Bの値に関して抽出すべき範囲は、 RBm−α<R−B<RBm+α GBm−β<G−B<GBm+β となるR−Bの値およびG−Bの値ということになる。
(Second Embodiment) In this embodiment, as in the first embodiment, the user selects a method for extracting a glossy color and a glossy color. . First
In the embodiment, R / B and G / B are used as variables of interest for extracting a glossy color. However, in this embodiment, RB and GB are used. That is, FIG.
As shown in (1), after the user designates a reference region Db for extracting the color of the region D1 to be extracted by using a mouse or the like (S1), the CPU performs processing on each pixel in the reference region Db.
10 finds two values, RB and GB, respectively (S2). After that, the average value RBm, GBm of each type of value
Is determined, and upper and lower limits to be extracted are set by adding and subtracting predetermined margin values α and β to the calculated average values RBm and GBm, respectively. That is, for RB, the upper limit value t1 = R
Bm + α, lower limit t2 = RBm−α, and upper limit s1 = GBm + β, lower limit s2 = GBm− for GB.
Becomes β. The obtained upper limit value t1, s1 and lower limit value t2,
s2 is stored in the operation memory 15 (S3). When the upper limit value t1, s1 and the lower limit value t2, s2 are determined, R
The ranges to be extracted with respect to the value of -B and the value of GB are RB value and GB value such that RBm-α <RB <RBm + α GBm-β <GB <GBm + β become.

【0032】上述のようにして抽出すべき色の範囲を決
定した後には、ディスプレイ装置16の画面に表示され
た画像内から指定された色の範囲に属する画素を抽出し
てディスプレイ装置16の画面に表示する「色抽出処
理」を行う。色抽出処理は、図11に示す手順を有し、
使用者は対象物がディスプレイ装置16に表示された状
態において入力装置18によって検査領域Daを指定す
る。検査領域Daが指定されると、CPU10では検査
領域Daの中の各画素について、それぞれR−B、G−
Bの2種類の値を求める(S1)。求めた2種類の値が
ともに「基準色登録・選択処理」において設定した上限
値t1,s1および下限値t2,s2により規定された
範囲内であるという条件を満たすときに(S2)、その
画素を抽出し(S3)、一方でも条件が満たされないと
きにはその画素は抽出しない(S4)。このような処理
を検査領域Daの中のすべての画素について行えば(S
5)、基準領域Dbから抽出した画素の色と同色の範囲
内である画素群を検査領域Daから抽出することができ
る。こうして検査領域Daから抽出した画素は、ディス
プレイ装置16の画面にそのまま表示され、検査領域D
a内から抽出されなかった画素および検査領域Da外の
画素は、いずれもR=G=B=0の画素として扱われ
る。その結果、カラー画像から抽出された画素のみがデ
ィスプレイ装置16の画面に表示される。
After the range of colors to be extracted is determined as described above, pixels belonging to the specified range of colors are extracted from the image displayed on the screen of the display device 16 and the screen of the display device 16 is extracted. Perform the "color extraction process" displayed in. The color extraction process has a procedure shown in FIG.
The user specifies the inspection area Da with the input device 18 while the target object is displayed on the display device 16. When the inspection area Da is specified, the CPU 10 determines whether each pixel in the inspection area Da has RB, G-
Two kinds of values of B are obtained (S1). When the two types of values satisfy the condition that both values are within the range defined by the upper limit values t1 and s1 and the lower limit values t2 and s2 set in the “reference color registration / selection process” (S2), the pixel of interest is determined. Is extracted (S3), and if the condition is not satisfied, the pixel is not extracted (S4). If such processing is performed for all pixels in the inspection area Da, (S
5) A pixel group in the same color range as the color of the pixel extracted from the reference area Db can be extracted from the inspection area Da. The pixels extracted from the inspection area Da are displayed on the screen of the display device 16 as they are,
Pixels not extracted from inside a and pixels outside the inspection area Da are both treated as pixels of R = G = B = 0. As a result, only the pixels extracted from the color image are displayed on the screen of the display device 16.

【0033】光沢をもたない画素を抽出する処理につい
ては第1の実施の形態と同様であり、また他の構成およ
び動作についても第1の実施の形態と同様であるから説
明を省略する。
The processing for extracting pixels having no gloss is the same as in the first embodiment, and the other configurations and operations are the same as those in the first embodiment, so description thereof will be omitted.

【0034】(第3の実施の形態)上述した実施形態で
は、基準領域Dbが光沢をもつ領域か否を使用者が判断
していたが、本実施形態は図14に示すように、基準領
域Dbを使用者が指定すると(S1)、基準領域Dbに
ついて光沢をもつ領域の処理がよいか光沢をもたない処
理がよいかを判定し(すなわち、光沢判定手段を備
え)、判定結果を使用者に提示する機能(すなわち、判
定結果提示手段)を付加したものである。本実施形態で
は、基準領域Dbが光沢をもつか否かを判定するため
に、R/B,G/Bの2種類の値について、光沢をもつ
場合と光沢をもたない場合との判定値をあらかじめ設定
してある。しかして、基準領域Dbの各画素についてR
/B,G/B求め(S2)、求めたR/B,G/Bの値
の平均値RBm,GBmを演算メモリ14に格納すると
ともに平均値RBm,GBmと判定値との差によって、
基準領域Dbが光沢をもつ領域か否かを判定する(S
3)。要するに平均値RBm,GBmと判定値との差が
小さいほうを判定結果として採用する。
(Third Embodiment) In the above-described embodiment, the user determines whether or not the reference area Db is a glossy area. However, in the present embodiment, as shown in FIG. When the user designates Db (S1), it is determined whether the reference area Db should be processed in a glossy area or a non-glossy processing (that is, provided with a gloss determination means), and the determination result is used. This function is provided with a function of presenting to a user (that is, determination result presenting means). In the present embodiment, in order to determine whether or not the reference area Db has gloss, two types of values of R / B and G / B are used to determine whether the reference area Db has gloss or has no gloss. Is set in advance. Thus, for each pixel in the reference area Db, R
/ B, G / B are obtained (S2), and the average values RBm, GBm of the obtained R / B, G / B values are stored in the arithmetic memory 14, and the difference between the average values RBm, GBm and the judgment value is calculated by
It is determined whether or not the reference area Db is a glossy area (S
3). In short, the smaller of the difference between the average values RBm, GBm and the determination value is adopted as the determination result.

【0035】上述の判定を行うために、本実施形態で
は、図12に示すように、ディスプレイ装置16に、
「1.基準色登録・選択」と「2.光沢をもった色(検
査用)」と「3.光沢をもたない色(検査用)」の3つ
の選択肢を有するメニュー画面を表示する。「基準色登
録・選択処理」では上述のように基準領域Dbを指定
し、これによって基準領域Dbが光沢をもつ領域か否か
が判定される。たとえば、基準領域Dbが光沢をもたな
い領域であれば、図13に示すように、ディスプレイ装
置16の画面に「光沢をもたない色のプログラムを選択
してください」などというメッセージが提示されること
になる(S4,S5)。
In order to make the above determination, in the present embodiment, as shown in FIG.
A menu screen having three options of “1. Register and select reference color”, “2. Color with gloss (for inspection)”, and “3. Color without gloss (for inspection)” is displayed. In the “reference color registration / selection processing”, the reference area Db is specified as described above, and it is determined whether or not the reference area Db is a glossy area. For example, if the reference area Db is an area having no gloss, a message such as “Please select a program with no gloss” is presented on the screen of the display device 16 as shown in FIG. (S4, S5).

【0036】このような判定結果が出力された後には、
判定結果に応じて、「2.光沢をもった色(検査用)」
あるいは「3.光沢をもたない色(検査用)」を選択す
る。それぞれの処理は、第1の実施の形態あるいは第2
の実施の形態における図2に示したメニュー画面におい
て、「1.1光沢をもった色」を選択した場合、あるい
は「1.2光沢をもたない色」を選択した場合と同様で
ある。ただし、基準領域Dbはすでに選択しているか
ら、基準領域Dbを選択する処理は省略することができ
る。他の構成および動作は第1の実施の形態あるいは第
2の実施の形態と同様である。
After such a judgment result is output,
According to the judgment result, “2. Glossy color (for inspection)”
Alternatively, select “3. Glossless color (for inspection)”. Each process is performed according to the first embodiment or the second embodiment.
This is the same as selecting “1.1 glossy color” or selecting “1.2 non-glossy color” on the menu screen shown in FIG. 2 in the embodiment. However, since the reference region Db has already been selected, the process of selecting the reference region Db can be omitted. Other configurations and operations are the same as those of the first embodiment or the second embodiment.

【0037】(第4の実施の形態)本実施形態は、第3
の実施の形態と同様の方法を用いて、使用者が指定した
基準領域Dbについて光沢をもつ領域か光沢をもたない
領域かの判断を行うが(口達判定手段を備え)、判定結
果を使用者に示すのではなく、判定結果に基づいて以後
の処理を決定するようにしたものである。すなわち、判
定結果が光沢をもつ領域であれば図2に示した第1の実
施の形態のステップS3から処理を行って抽出すべき色
の範囲を決定し、判定結果が光沢をもたない領域であれ
ば図8に示した第1の実施の形態のステップS2から処
理を行って抽出すべき色の範囲を決定する。したがっ
て、本実施形態では、図15に示すように、「1.基準
色登録・選択」と「2.検査」との2種類の選択肢を有
したメニューをディスプレイ装置16の画面に表示す
る。
(Fourth Embodiment) This embodiment is a third embodiment.
By using the same method as that of the first embodiment, it is determined whether the reference region Db specified by the user is a glossy region or a non-glossy region (provided with a mouth determination means). Instead of indicating to the user, subsequent processing is determined based on the determination result. That is, if the determination result is a glossy region, the processing is performed from step S3 of the first embodiment shown in FIG. 2 to determine the range of colors to be extracted, and the determination result indicates that the region has no gloss. If so, the process is performed from step S2 of the first embodiment shown in FIG. 8 to determine the range of colors to be extracted. Therefore, in the present embodiment, as shown in FIG. 15, a menu having two types of options, “1. Reference color registration / selection” and “2. Inspection”, is displayed on the screen of the display device 16.

【0038】本実施形態においては、「基準色登録・選
択処理」が選択されると、図16に示すように、使用者
が色を抽出しようとする基準領域Dbを指定し(S
1)、基準領域Dbの各画素についてR/B,G/B求
め(S2)、求めたR/B,G/Bの値の平均値RB
m,GBmを演算メモリ14に格納するとともに平均値
RBm,GBmと判定値との差によって、基準領域Db
が光沢をもつ領域か否かを判定する(S3)。判定結果
が光沢をもつ領域であるときには、第1の実施の形態に
おいて説明したように、R/B,G/Bの値の平均値R
Bm,GBmを中心にして余裕値α,βの幅をもたせる
ことによって、光沢をもつ領域にする上限値t1,c1
および下限値t2,s2を設定して演算メモリ14に格
納する(S4)。一方、判定結果が光沢をもたない領域
であるときには、基準領域Dbの各画素の色相(H)、
彩度(C)、明度(L)の平均値を求め、各平均値を中
心に余裕度γ,δ,εの幅をもたせることによって、光
沢をもたない領域に対する上限値h1,c1,l1およ
び下限値h2,c2,l2を設定して演算メモリ14に
格納する(S5)。上述のようにして基準領域Dbの画
素に基づいて抽出すべき色の範囲を設定することができ
るのである(この手順により基準色登録手段が実現され
る)。
In this embodiment, when "reference color registration / selection processing" is selected, the user designates a reference area Db from which a color is to be extracted, as shown in FIG.
1) R / B and G / B are obtained for each pixel in the reference area Db (S2), and the average value RB of the obtained R / B and G / B values
m, GBm are stored in the arithmetic memory 14, and the difference between the average values RBm, GBm and the determination value is used to determine the reference area Db.
It is determined whether or not is a glossy area (S3). When the result of the determination is a glossy region, as described in the first embodiment, the average value R / B and G / B values R
Upper limits t1 and c1 for providing glossy areas by giving margins α and β around Bm and GBm.
And the lower limit values t2 and s2 are set and stored in the operation memory 14 (S4). On the other hand, when the determination result is a region having no gloss, the hue (H) of each pixel in the reference region Db,
The average values of the saturation (C) and the lightness (L) are obtained, and the margins γ, δ, and ε are provided around the respective average values, so that the upper limit values h1, c1, and l1 for the region having no gloss are obtained. And the lower limit values h2, c2, and l2 are set and stored in the operation memory 14 (S5). As described above, the range of colors to be extracted can be set based on the pixels in the reference area Db (this procedure implements a reference color registration unit).

【0039】その後、「2.検査」を選択すると、第1
の実施の形態と同様にまず検査領域Daを指定すること
になる。ここで、基準領域Dbが光沢をもつ領域と判定
されていたか、光沢をもたない領域と判定されていたか
に応じて、光沢をもつ領域あるいは光沢をもたない領域
の処理が選択して行われる(この手順により選択手段が
実現される)。つまり、図5あるいは図11の処理を行
うか、図9の処理を行うことになる。他の構成および動
作は第1の実施の形態と同様である。
Thereafter, when "2. Inspection" is selected, the first
First, the inspection area Da is specified as in the embodiment. Here, depending on whether the reference area Db has been determined to be a glossy area or a non-glossy area, the processing of the glossy area or the non-glossy area is selected and executed. (The selection means is realized by this procedure). That is, the processing of FIG. 5 or 11 is performed, or the processing of FIG. 9 is performed. Other configurations and operations are the same as those of the first embodiment.

【0040】(第5の実施の形態)上述した各実施形態
では、基準領域Dbから抽出すべき色の範囲を求める処
理「基準色登録・選択処理」と、検査領域Daの中で所
望の色の画素を抽出する処理「色抽出処理」とが連続的
に行われず、「基準色登録・選択処理」の後に使用者が
「色抽出処理」を起動する構成としていたが、本実施形
態では「基準色登録・選択処理」の後に使用者による操
作を伴うことなく「色抽出処理」が自動的に起動される
ようにしたものである。
(Fifth Embodiment) In each of the above-described embodiments, a process for determining a range of colors to be extracted from the reference region Db, a "reference color registration / selection process", and a process for selecting a desired color in the inspection region Da The process of extracting the pixels of “color extraction process” is not performed continuously, and the user starts the “color extraction process” after the “reference color registration / selection process”. After the “reference color registration / selection processing”, the “color extraction processing” is automatically activated without any operation by the user.

【0041】すなわち、本実施形態の処理手順は図17
ないし図19に示すようになっている。上述した各実施
形態から明らかなように、「基準色登録・選択処理」で
は使用者による基準領域Dbの指定が必要であり、「色
抽出処理」では使用者による検査領域Daの指定が必要
である。したがって、「基準色登録・選択処理」と「色
抽出処理」との間に使用者による操作を伴わないように
するには、「基準色登録・選択処理」に先だって、図2
0に示すように、基準領域Dbと検査領域Daの両方を
指定しておくことが必要になる。
That is, the processing procedure of this embodiment is the same as that of FIG.
Or as shown in FIG. As is clear from the above-described embodiments, the “reference color registration / selection processing” requires the user to specify the reference area Db, and the “color extraction processing” requires the user to specify the inspection area Da. is there. Therefore, in order to prevent the user from performing an operation between the “reference color registration / selection process” and the “color extraction process”, the process shown in FIG.
As shown by 0, it is necessary to specify both the reference area Db and the inspection area Da.

【0042】しかして、図17に示すように、まずカラ
ーTVカメラ11により撮像したカラー画像をディスプ
レイ装置16に表示した状態で基準領域Dbと検査領域
Daの両方を指定する(S1)。次に、基準領域Dbの
各画素についてR/B,G/B求め(S2)、求めたR
/B,G/Bの値の平均値RBm,GBmを演算メモリ
14に格納するとともに平均値RBm,GBmとあらか
じめ設定した判定値との差によって、基準領域Dbが光
沢をもつ領域か否かを判定する(S3)。この処理によ
り光沢判定手段が実現される。判定結果が光沢をもつ領
域であるときには、第1の実施の形態において説明した
ように、R/B,G/Bの値の平均値RBm,GBmを
中心にして余裕値α,βの幅をもたせることによって、
光沢をもつ領域にする上限値t1,s1および下限値t
2,s2を設定して演算メモリ14に格納し(S4)、
図18に示した光沢をもつ色抽出処理に移行する(S
5)。一方、判定結果が光沢をもたない領域であるとき
には、基準領域Dbの各画素の三刺激値R,G,Bの値
を色相(H)、彩度(C)、明度(L)に変換し(S
6)、求めた色相(H)、彩度(C)、明度(L)の平
均値を中心に余裕度γ,δ,εの幅をもたせることによ
って、光沢をもたない領域に対する上限値h1,c1,
l1および下限値h2,c2,l2を設定して演算メモ
リ14に格納し(S7)、図19に示した光沢をもたな
い色抽出処理に移行する(S8)。要するに、光沢判定
手段の判定結果に基づいて適正な色抽出処理が自動的に
選択されるのであり、この処理により自動選択手段が実
現されている。
As shown in FIG. 17, first, both the reference area Db and the inspection area Da are designated in a state where the color image picked up by the color TV camera 11 is displayed on the display device 16 (S1). Next, R / B and G / B are obtained for each pixel of the reference area Db (S2), and the obtained R is calculated.
The average values RBm and GBm of the values / B and G / B are stored in the arithmetic memory 14, and the difference between the average values RBm and GBm and a predetermined determination value determines whether the reference region Db is a glossy region. A determination is made (S3). This processing implements a gloss determination unit. When the determination result is a glossy region, as described in the first embodiment, the widths of the margin values α and β around the average values RBm and GBm of the R / B and G / B values are set. By giving
Upper limit values t1 and s1 and lower limit value t to be a glossy region
2, s2 are set and stored in the operation memory 14 (S4),
The process proceeds to the glossy color extraction process shown in FIG. 18 (S
5). On the other hand, when the determination result is a region having no gloss, the values of the tristimulus values R, G, and B of each pixel in the reference region Db are converted into hue (H), saturation (C), and brightness (L). (S
6) The upper limit value h1 for the region having no gloss by giving the widths of the margins γ, δ, ε around the average values of the obtained hue (H), saturation (C), and lightness (L). , C1,
l1 and the lower limit values h2, c2, and l2 are set and stored in the operation memory 14 (S7), and the process proceeds to the glossless color extraction process shown in FIG. 19 (S8). In short, an appropriate color extraction process is automatically selected based on the determination result of the gloss determination unit, and this process implements an automatic selection unit.

【0043】ところで、ステップS4において上限値t
1,s1および下限値t2,s2を設定した場合には、
図18の処理に自動的に移行する。図18に示す処理
は、図5に示した第1の実施の形態における光沢をもつ
場合の色抽出処理と同様の処理であって、検査領域Da
の中の各画素について、それぞれR/B、G/Bの2種
類の値を求める(S9)。求めた2種類の値がともに上
限値t1,s1および下限値t2,s2により規定され
た範囲内であるという条件を満たすときに(S10)、
その画素を抽出し(S11)、一方でも条件が満たされ
ないときにはその画素は抽出しない(S12)。このよ
うな処理を検査領域Daの中のすべての画素について行
えば(S13)、基準領域Dbから抽出した画素の色と
同色の範囲内である画素群を検査領域Daから抽出する
ことができる。このようにして検査領域Daから抽出し
た画素は、図21に示すように、ディスプレイ装置16
の画面にそのまま表示され、検査領域Da内から抽出さ
れなかった画素および検査領域Da外の画素は、いずれ
もR=G=B=0の画素として扱われ、結果的にカラー
画像から抽出された画素のみがディスプレイ装置16の
画面に表示される。
Incidentally, in step S4, the upper limit value t
1, s1 and lower limit values t2, s2,
The processing automatically shifts to the processing in FIG. The processing shown in FIG. 18 is the same as the color extraction processing in the case of having gloss in the first embodiment shown in FIG.
The two types of values R / B and G / B are obtained for each pixel in (S9). When satisfying the condition that both of the obtained values are within the range defined by the upper limit values t1 and s1 and the lower limit values t2 and s2 (S10),
The pixel is extracted (S11), and if the condition is not satisfied, the pixel is not extracted (S12). If such processing is performed for all the pixels in the inspection area Da (S13), it is possible to extract from the inspection area Da a pixel group that is within the same color range as the color of the pixel extracted from the reference area Db. Pixels extracted from the inspection area Da in this way are, as shown in FIG.
And the pixels not extracted from the inspection area Da and the pixels outside the inspection area Da are both treated as R = G = B = 0 pixels, and as a result, are extracted from the color image. Only the pixels are displayed on the screen of the display device 16.

【0044】一方、ステップS7において上限値h1,
c1,l1および下限値h2,c2,l2を設定した場
合には、図19の処理に自動的に移行する。図19に示
す処理は図9に示した第1の実施の形態における光沢を
もたない場合の色抽出処理と同様の処理であって、検査
領域Daの中の画素について、それぞれルックアップテ
ーブル14を用いて色相(H)、彩度(C)、明度
(L)を求める(S14)。各画素について色相
(H)、彩度(C)、明度(L)のいずれもが上述した
上限値h1,c1,l1と下限値h2,c2,l2との
間であるときには(S15)、第1の実施の形態と同様
にして色差を求め、色差が規定の範囲内であるときに
(S16)、その画素を抽出する(S17)。また、ス
テップS15において色相(H)、彩度(C)、明度
(L)のいずれかが上限値h1,c1,l1と下限値h
2,c2,l2とにより規定された範囲から逸脱する場
合や、ステップS16において色差が規定の範囲を超え
ているときには、画素を抽出しない(S18)。このよ
うな処理を検査領域Daの中のすべての画素について行
えば(S19)、基準領域Dbから抽出した画素の色と
同色の範囲内である画素群を検査領域Daから抽出する
ことができる。このようにして検査領域Daから抽出し
た画素は、ディスプレイ装置16の画面にそのまま表示
され、検査領域Da内から抽出されなかった画素および
検査領域Da外の画素は、いずれもR=G=B=0の画
素として扱われる。その結果、図21に示すようにカラ
ー画像から抽出された画素のみがディスプレイ装置16
の画面に表示されることになる。
On the other hand, in step S7, the upper limit value h1,
When c1, l1 and the lower limit values h2, c2, l2 are set, the processing automatically shifts to the processing in FIG. The process shown in FIG. 19 is the same as the color extraction process in the case where there is no gloss in the first embodiment shown in FIG. Is used to determine hue (H), saturation (C), and lightness (L) (S14). When all of the hue (H), saturation (C), and lightness (L) of each pixel are between the above-described upper limit values h1, c1, and l1 and the lower limit values h2, c2, and l2 (S15), The color difference is obtained in the same manner as in the first embodiment, and when the color difference is within a specified range (S16), the pixel is extracted (S17). In step S15, any one of the hue (H), the saturation (C), and the lightness (L) is set to the upper limit h1, c1, l1 and the lower limit h.
If the color difference deviates from the range defined by 2, 2, and 2, or if the color difference exceeds the specified range in step S16, no pixel is extracted (S18). If such processing is performed for all the pixels in the inspection area Da (S19), it is possible to extract from the inspection area Da a pixel group that is in the same color range as the color of the pixel extracted from the reference area Db. The pixels extracted from the inspection area Da in this way are displayed as they are on the screen of the display device 16, and the pixels not extracted from the inspection area Da and the pixels outside the inspection area Da are both R = G = B = It is treated as a 0 pixel. As a result, only the pixels extracted from the color image are displayed on the display device 16 as shown in FIG.
Will be displayed on the screen.

【0045】他の構成および動作については第1の実施
の形態と同様である。なお、第3の実施の形態ないし第
5の実施の形態において、光沢がある場合について基準
領域Dbから抽出すべき色の範囲を決定する際に、R/
B,G/Bの値を用いていることを想定しているが、第
2の実施の形態のように、この処理についてR−B,G
−Bの値を用いてもよいのはもちろんのことである。ま
た、第3の実施の形態ないし第5の実施の形態におい
て、光沢をもつか否かの判定を行うために、基準領域D
bの中の画素についてR/B,G/Bの各平均値を求め
て判定値と比較しているが、R−B,G−Bの各平均値
を求めて判定値と比較してもよい。
Other structures and operations are the same as those of the first embodiment. In the third to fifth embodiments, when determining the range of colors to be extracted from the reference area Db when gloss is present, R / R
It is assumed that the values of B and G / B are used. However, as in the second embodiment, this process is performed using RB and G / B.
It goes without saying that the value of -B may be used. In addition, in the third to fifth embodiments, the reference region D
Although the average value of R / B and G / B is obtained for the pixel in b and compared with the determination value, the average value of R-B and GB is calculated and compared with the determination value. Good.

【0046】なお、R/B,G/Bを用いて光沢を持つ
領域が金系、銀系、銅系のいずれかを判定する条件、お
よびR−B,G−Bを用いて光沢を持つ領域が金系、銀
系、銅系のいずれかを判定する条件を表1に一例として
示す。判定条件は升目内の条件が成立したときに、それ
ぞれ金系、銀系、銅系の各色であることを意味する。
A region having a gloss using R / B and G / B has a condition for judging any of gold, silver, and copper, and has a gloss using RB and GB. Table 1 shows an example of a condition for determining whether the region is gold, silver, or copper. The determination condition means that when the condition in the cell is satisfied, the colors are gold, silver, and copper, respectively.

【0047】[0047]

【表1】 [Table 1]

【0048】[0048]

【発明の効果】請求項1の発明は、RGB表色系の三刺
激値を各画素の値とするカラー画像について抽出しよう
とする色を含む基準領域を指定する基準領域設定手段
と、基準領域内が光沢をもつときにRGB表色系で同色
の範囲を決定する第1の抽出範囲設定手段と、基準領域
内が光沢をもたないときに色相と彩度と明度とにより同
色の範囲を決定する第2の抽出範囲設定手段と、基準領
域と同色の画素を抽出しようとするカラー画像に対して
検査領域を指定する検査領域設定手段と、検査領域から
抽出すべき色が光沢をもつか否かに応じて第1の抽出範
囲設定手段と第2の抽出範囲設定手段との一方により決
定した同色の範囲を用い、当該範囲内の画素を検査領域
から抽出する色抽出手段とを備えるものであり、抽出し
ようとする色が光沢をもつ領域から抽出されたか否かに
応じて検査領域から抽出すべき色の範囲を異ならせてお
り、光沢をもつ場合ともたない場合とにそれぞれ適した
技術を適用して、色の抽出を再現性よく行うことができ
る。また、光沢をもつ場合にはRGB表色系で色を抽出
し、光沢をもたない場合には色相と彩度と明度とを用い
るから、人間の間隔尺度に近い色の抽出が可能になる。
According to the first aspect of the present invention, there is provided a reference area setting means for designating a reference area including a color to be extracted from a color image having a tristimulus value of an RGB color system as a value of each pixel, and a reference area. First extraction range setting means for determining a range of the same color in the RGB color system when the inside has a gloss, and a range of the same color based on hue, saturation, and brightness when the reference region has no gloss. Second extraction range setting means for determining, inspection area setting means for specifying an inspection area for a color image from which pixels of the same color as the reference area are to be extracted, and whether the color to be extracted from the inspection area has gloss. A color extraction unit that uses a range of the same color determined by one of the first extraction range setting unit and the second extraction range setting unit depending on whether the pixel is within the range and extracts pixels within the range from the inspection area Color to be extracted is glossy The range of colors to be extracted from the inspection area is made different depending on whether or not it is extracted from the area that has the gloss, and the color extraction is reproduced by applying the technology appropriate for the case with and without the gloss. It can be done well. In addition, when there is gloss, colors are extracted using the RGB color system, and when there is no gloss, hue, saturation, and lightness are used. Therefore, it is possible to extract colors close to the human interval scale. .

【0049】請求項2の発明は、請求項1の発明におい
て、第1の抽出範囲設定手段では全画素のR/BとG/
Bとの値の各平均値を中心として同色の範囲を決定する
ものであり、除算を行うことによって感度の高い色の抽
出が可能になる。
According to a second aspect of the present invention, in the first aspect of the present invention, the first extraction range setting means sets R / B and G /
The range of the same color is determined centering on each average value of the values of B, and a highly sensitive color can be extracted by performing the division.

【0050】請求項3の発明は、請求項1の発明におい
て、第1の抽出範囲設定手段では全画素のR−BとG−
Bとの値の各平均値を中心として同色の範囲を決定する
ものであり、有効数字を考慮したり0での除算を考慮す
る必要がなく、演算が容易である。
According to a third aspect of the present invention, in the first aspect of the invention, the first extraction range setting means sets the RB and G-
The range of the same color is determined centering on each average value of the values B and B. There is no need to consider significant figures or division by 0, and the calculation is easy.

【0051】請求項4の発明は、請求項1ないし請求項
3の発明において、前記基準領域内の全画素のR/Bと
G/Bとの値の各平均値または前記基準領域内の全画素
のR−BとG−Bとの値の各平均値とあらかじめ設定し
た判定値との大小関係により基準領域内が光沢をもつか
否かを判定する光沢判定手段を備え、光沢判定手段によ
る判定結果を提示する判定結果提示手段を備えるもので
あり、光沢の有無についての判定結果を使用者に提示す
ることによって、色に関する知識の少ない使用者であっ
ても色の抽出作業が可能になる。
According to a fourth aspect of the present invention, in the first to third aspects of the present invention, the average value of the R / B and G / B values of all the pixels in the reference area or the total value of the R / B and G / B values in the reference area is obtained. A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relationship between each of the average values of the RB and GB values of the pixel and a predetermined judgment value; It is provided with a judgment result presenting means for presenting the judgment result, and by presenting the judgment result on the presence or absence of gloss to the user, even a user with little knowledge of the color can extract the color. .

【0052】請求項5の発明は、請求項1ないし請求項
3の発明において、前記基準領域内の全画素のR/Bと
G/Bとの値の各平均値または前記基準領域内の全画素
のR−BとG−Bとの値の各平均値とあらかじめ設定し
た判定値との大小関係により基準領域内が光沢をもつか
否かを判定する光沢判定手段を備え、光沢判定手段によ
る判定結果を登録する基準色登録手段と、基準色登録手
段により登録された結果を用いて第1の抽出範囲設定手
段と第2の抽出範囲設定手段とを選択する選択手段を備
えるものであり、基準色登録手段によって光沢の有無を
登録することにより、第1の抽出範囲設定手段と第2の
抽出範囲設定手段とのうち適正なほうが自動的に選択さ
れることになり、使い勝手が向上する。
According to a fifth aspect of the present invention, in the first to third aspects, the average value of the R / B and G / B values of all the pixels in the reference area or the total value of the R / B and G / B values in the reference area is obtained. A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relationship between each of the average values of the RB and GB values of the pixel and a predetermined judgment value; Reference color registration means for registering the determination result, and selection means for selecting the first extraction range setting means and the second extraction range setting means using the result registered by the reference color registration means, By registering the presence or absence of gloss by the reference color registration unit, the appropriate one of the first extraction range setting unit and the second extraction range setting unit is automatically selected, and the usability is improved.

【0053】請求項6の発明は、請求項1ないし請求項
3の発明において、前記基準領域内の全画素のR/Bと
G/Bとの値の各平均値または前記基準領域内の全画素
のR−BとG−Bとの値の各平均値とあらかじめ設定し
た判定値との大小関係により基準領域内が光沢をもつか
否かを判定する光沢判定手段を備え、光沢判定手段によ
る判定結果を用いて第1の抽出範囲設定手段と第2の抽
出範囲設定手段とを選択する自動選択手段を備えるもの
であり、光沢の有無を使用者が指定する必要がないか
ら、光沢の有無にかかわらず色の抽出を自動化すること
ができ、結果的に工場のラインなどにおいて光沢をもつ
部材ともたない部材とが混在して搬送されているような
場合でも対応可能になる。
According to a sixth aspect of the present invention, in the first to third aspects of the present invention, the average value of the R / B and G / B values of all the pixels in the reference area or the total value of the R / B and G / B values in the reference area is obtained. A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relationship between each of the average values of the RB and GB values of the pixel and a predetermined judgment value; The apparatus includes an automatic selection unit that selects the first extraction range setting unit and the second extraction range setting unit based on the determination result. It is not necessary for the user to specify the glossiness. In spite of this, it is possible to automate the color extraction, and as a result, it is possible to cope with a case where a glossy member and a non-glossy member are conveyed together in a factory line or the like.

【0054】請求項7の発明は、RGB表色系の三刺激
値を各画素の値とするカラー画像について抽出しようと
する色を含むように指定された基準領域内が、光沢をも
つときにはRGB表色系で同色の範囲を決定し光沢を持
たないときにはRGB表色系とは異なる表色系で同色の
範囲を決定し、次に、基準領域と同色の画素を抽出しよ
うとするカラー画像に対して設定した検査領域から抽出
すべき色が光沢をもつか否かに応じて前記2種類の範囲
の一方を選択して当該範囲内の画素を検査領域から抽出
することを特徴としており、抽出しようとする色が光沢
をもつ領域から抽出されたか否かに応じて検査領域から
抽出すべき色の範囲を異ならせており、光沢をもつ場合
ともたない場合とにそれぞれ適した技術を適用して、色
の抽出を再現性よく行うことができる。また、光沢をも
つ場合にはRGB表色系で色を抽出し、光沢をもたない
場合には色相と彩度と明度とを用いるから、人間の間隔
尺度に近い色の抽出が可能になる。
According to a seventh aspect of the present invention, when a reference area designated to include a color to be extracted for a color image having tristimulus values of the RGB color system as the values of respective pixels is included in the RGB, when there is gloss, When the same color range is determined in the color system, and when there is no gloss, the same color range is determined in a color system different from the RGB color system, and then the pixels of the same color as the reference area are extracted. The method is characterized in that one of the two types of ranges is selected according to whether or not the color to be extracted from the inspection area set has gloss, and pixels within the range are extracted from the inspection area. The range of colors to be extracted from the inspection area is made different depending on whether the color to be extracted is extracted from the glossy area, and the appropriate technology is applied to the case with or without the gloss. Color reproducibility It can be carried out. In addition, when there is gloss, colors are extracted using the RGB color system, and when there is no gloss, hue, saturation, and lightness are used. Therefore, it is possible to extract colors close to the human interval scale. .

【0055】請求項8の発明は、請求項7の発明におい
て、前記基準領域内の全画素のR/BとG/Bとの値の
各平均値とあらかじめ設定した判定値との大小関係によ
り基準領域内が光沢をもつか否かを判定することを特徴
としており、除算を行うことによって感度の高い色の抽
出が可能になる。
According to an eighth aspect of the present invention, in accordance with the seventh aspect of the present invention, the magnitude relationship between the average value of the R / B and G / B values of all the pixels in the reference area and a predetermined judgment value is determined. It is characterized in that it is determined whether or not the reference area has gloss. By performing the division, a highly sensitive color can be extracted.

【0056】請求項9の発明は、請求項7の発明におい
て、前記基準領域内の全画素のR−BとG−Bとの値の
各平均値とあらかじめ設定した判定値との大小関係によ
り基準領域内が光沢をもつか否かを判定することを特徴
としており、有効数字を考慮したり0での除算を考慮す
る必要がなく、演算が容易である。
According to a ninth aspect of the present invention, in accordance with the seventh aspect of the present invention, the average value of RB and GB values of all the pixels in the reference area is determined by a magnitude relation between a predetermined judgment value and each average value. It is characterized in that it is determined whether or not the inside of the reference area has gloss, and there is no need to consider significant figures or division by 0, and the calculation is easy.

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

【図1】本発明の第1の実施の形態を示すブロック図で
ある。
FIG. 1 is a block diagram showing a first embodiment of the present invention.

【図2】同上のメニュー画面を示す図である。FIG. 2 is a diagram showing a menu screen of the above.

【図3】同上の動作説明図である。FIG. 3 is an operation explanatory diagram of the above.

【図4】同上において基準領域を説明する図である。FIG. 4 is a diagram illustrating a reference region in the above embodiment.

【図5】同上の動作説明図である。FIG. 5 is an operation explanatory view of the above.

【図6】同上において検査領域を説明する図である。FIG. 6 is a diagram illustrating an inspection region in the above.

【図7】同上において結果の表示例を示す図である。FIG. 7 is a diagram showing a display example of a result in the above.

【図8】同上の動作説明図である。FIG. 8 is an operation explanatory view of the above.

【図9】同上の動作説明図である。FIG. 9 is an operation explanatory view of the above.

【図10】本発明の第2の実施の形態を示す動作説明図
である。
FIG. 10 is an operation explanatory view showing a second embodiment of the present invention.

【図11】同上の動作説明図である。FIG. 11 is an operation explanatory diagram of the above.

【図12】本発明の第3の実施の形態におけるメニュー
画面を示す図である。
FIG. 12 is a diagram showing a menu screen according to a third embodiment of the present invention.

【図13】同上におけるメッセージの表示例を示す図で
ある。
FIG. 13 is a diagram showing a display example of a message in the above.

【図14】本発明の第4の実施の形態を示す動作説明図
である。
FIG. 14 is an operation explanatory view showing a fourth embodiment of the present invention.

【図15】同上の動作説明図である。FIG. 15 is an explanatory diagram of the operation of the above.

【図16】同上の動作説明図である。FIG. 16 is an operation explanatory view of the above.

【図17】本発明の第5の実施の形態を示す動作説明図
である。
FIG. 17 is an operation explanatory view showing a fifth embodiment of the present invention.

【図18】同上の動作説明図である。FIG. 18 is an operation explanatory view of the above.

【図19】同上の動作説明図である。FIG. 19 is a diagram illustrating the operation of the above.

【図20】同上における基準領域と検査領域とを説明す
る図である。
FIG. 20 is a diagram illustrating a reference region and an inspection region in the above.

【図21】同上における結果の表示例を示す図である。FIG. 21 is a diagram showing a display example of a result in the above.

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

11 カラーTVカメラ 12 入力装置 13R,13G.13B 画像取込メモリ 14 ルックアップテーブル 15 演算用メモリ 16 ディスプレイ装置 17 表示用回路 18 入力装置 11 color TV camera 12 input device 13R, 13G. 13B Image capture memory 14 Look-up table 15 Operation memory 16 Display device 17 Display circuit 18 Input device

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.7 識別記号 FI テーマコート゛(参考) G01N 21/94 G01N 21/94 5C066 H04N 17/02 H04N 17/02 Z 5L096 Fターム(参考) 2G020 AA04 DA02 DA03 DA04 DA05 DA06 DA13 DA52 2G051 AA73 AB14 AB20 BA08 CA04 CB01 EA11 EA14 EA17 EA23 EB01 EB02 ED01 ED04 ED07 ED30 2G059 AA05 BB16 EE02 EE13 FF01 HH02 KK04 LL04 MM03 MM05 MM09 MM10 NN01 5B057 AA01 BA02 CA01 CA08 CA12 CA16 CB01 CB08 CB12 CB16 CC01 CE16 CH08 5C061 BB01 CC01 CC05 5C066 AA01 AA03 CA11 ED00 GA01 GA02 GA33 GB00 KD02 KD06 KE02 KE03 KE05 KE09 KG01 KP02 5L096 AA02 AA05 BA03 CA02 DA01 FA15 GA07 ──────────────────────────────────────────────────の Continued on the front page (51) Int.Cl. 7 Identification symbol FI Theme coat ゛ (Reference) G01N 21/94 G01N 21/94 5C066 H04N 17/02 H04N 17/02 Z 5L096 F-term (Reference) 2G020 AA04 DA02 DA03 DA04 DA05 DA06 DA13 DA52 2G051 AA73 AB14 AB20 BA08 CA04 CB01 EA11 EA14 EA17 EA23 EB01 EB02 ED01 ED04 ED07 ED30 2G059 AA05 BB16 EE02 EE13 FF01 HH02 KK04 LL04 MM03 MM01 MM05 MM05 MM05 AMM CH08 5C061 BB01 CC01 CC05 5C066 AA01 AA03 CA11 ED00 GA01 GA02 GA33 GB00 KD02 KD06 KE02 KE03 KE05 KE09 KG01 KP02 5L096 AA02 AA05 BA03 CA02 DA01 FA15 GA07

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 RGB表色系の三刺激値を各画素の値と
するカラー画像について抽出しようとする色を含む基準
領域を指定する基準領域設定手段と、基準領域内が光沢
をもつときにRGB表色系で同色の範囲を決定する第1
の抽出範囲設定手段と、基準領域内が光沢をもたないと
きに色相と彩度と明度とにより同色の範囲を決定する第
2の抽出範囲設定手段と、基準領域と同色の画素を抽出
しようとするカラー画像に対して検査領域を指定する検
査領域設定手段と、検査領域から抽出すべき色が光沢を
もつか否かに応じて第1の抽出範囲設定手段と第2の抽
出範囲設定手段との一方により決定した同色の範囲を用
い、当該範囲内の画素を検査領域から抽出する色抽出手
段とを備えることを特徴とする色抽出画像処理装置。
1. A reference area setting means for designating a reference area including a color to be extracted from a color image having a tristimulus value of an RGB color system as a value of each pixel. First to determine the same color range in RGB color system
Extraction range setting means, second extraction range setting means for determining the same color range based on hue, saturation and lightness when the reference area has no gloss, and extracting pixels of the same color as the reference area. Inspection area setting means for specifying an inspection area for a color image to be extracted, and first and second extraction range setting means according to whether or not a color to be extracted from the inspection area has gloss. A color extraction unit that uses a range of the same color determined by one of the above and extracts pixels within the range from the inspection area.
【請求項2】 第1の抽出範囲設定手段では全画素のR
/BとG/Bとの値の各平均値を中心として同色の範囲
を決定することを特徴とする請求項1記載の色抽出画像
処理装置。
2. The method according to claim 1, wherein the first extraction range setting means sets the R of all pixels.
2. The color extraction image processing apparatus according to claim 1, wherein a range of the same color is determined centering on each average value of the values of / B and G / B.
【請求項3】 第1の抽出範囲設定手段では全画素のR
−BとG−Bとの値の各平均値を中心として同色の範囲
を決定することを特徴とする請求項1記載の色抽出画像
処理装置。
3. The first extraction range setting means sets R
2. The color extraction image processing apparatus according to claim 1, wherein the same color range is determined centering on each average value of -B and GB.
【請求項4】 前記基準領域内の全画素のR/BとG/
Bとの値の各平均値または前記基準領域内の全画素のR
−BとG−Bとの値の各平均値とあらかじめ設定した判
定値との大小関係により基準領域内が光沢をもつか否か
を判定する光沢判定手段を備え、光沢判定手段による判
定結果を提示する判定結果提示手段を備えることを特徴
とする請求項1ないし請求項3のいずれか1項に記載の
色抽出画像処理装置。
4. The R / B and G / R of all pixels in the reference area.
B and the average value of all the pixels in the reference area.
A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relation between each of the average values of -B and GB and a preset judgment value; The color extraction image processing apparatus according to any one of claims 1 to 3, further comprising a determination result presenting means for presenting.
【請求項5】 前記基準領域内の全画素のR/BとG/
Bとの値の各平均値または前記基準領域内の全画素のR
−BとG−Bとの値の各平均値とあらかじめ設定した判
定値との大小関係により基準領域内が光沢をもつか否か
を判定する光沢判定手段を備え、光沢判定手段による判
定結果を登録する基準色登録手段と、基準色登録手段に
より登録された結果を用いて第1の抽出範囲設定手段と
第2の抽出範囲設定手段とを選択する選択手段を備える
ことを特徴とする請求項1ないし請求項3のいずれか1
項に記載の色抽出画像処理装置。
5. The R / B and G / G of all pixels in the reference area.
B and the average value of all the pixels in the reference area.
A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relation between each of the average values of -B and GB and a preset judgment value; A reference color registration means for registering, and a selection means for selecting a first extraction range setting means and a second extraction range setting means using a result registered by the reference color registration means. Any one of claims 1 to 3
Item 10. The color extraction image processing device according to Item 1.
【請求項6】 前記基準領域内の全画素のR/BとG/
Bとの値の各平均値または前記基準領域内の全画素のR
−BとG−Bとの値の各平均値とあらかじめ設定した判
定値との大小関係により基準領域内が光沢をもつか否か
を判定する光沢判定手段を備え、光沢判定手段による判
定結果を用いて第1の抽出範囲設定手段と第2の抽出範
囲設定手段とを選択する自動選択手段を備えることを特
徴とする請求項1ないし請求項3のいずれか1項に記載
の色抽出画像処理装置。
6. The R / B and G / G of all pixels in the reference area.
B and the average value of all the pixels in the reference area.
A gloss judging unit for judging whether or not the reference area has gloss based on a magnitude relation between each of the average values of -B and GB and a preset judgment value; The color extraction image processing according to any one of claims 1 to 3, further comprising an automatic selection unit that selects the first extraction range setting unit and the second extraction range setting unit using the selection unit. apparatus.
【請求項7】 RGB表色系の三刺激値を各画素の値と
するカラー画像について抽出しようとする色を含むよう
に指定された基準領域内が、光沢をもつときにはRGB
表色系で同色の範囲を決定し光沢を持たないときにはR
GB表色系とは異なる表色系で同色の範囲を決定し、次
に、基準領域と同色の画素を抽出しようとするカラー画
像に対して設定した検査領域から抽出すべき色が光沢を
もつか否かに応じて前記2種類の範囲の一方を選択して
当該範囲内の画素を検査領域から抽出することを特徴と
する色抽出方法。
7. When a reference area designated to include a color to be extracted for a color image having a tristimulus value of the RGB color system as a value of each pixel includes a color to be extracted.
When the same color range is determined in the color system and there is no gloss, R
A range of the same color is determined in a color system different from the GB color system, and then the color to be extracted from the inspection region set for the color image from which a pixel of the same color as the reference region is to be extracted has gloss. A color extracting method, wherein one of the two types of ranges is selected depending on whether or not the pixels are selected, and pixels within the range are extracted from the inspection area.
【請求項8】 前記基準領域内の全画素のR/BとG/
Bとの値の各平均値とあらかじめ設定した判定値との大
小関係により基準領域内が光沢をもつか否かを判定する
ことを特徴とする請求項7記載の色抽出方法。
8. The R / B and G / R of all pixels in the reference area
8. The color extraction method according to claim 7, wherein it is determined whether or not the reference area has a gloss based on a magnitude relationship between each average value of B and a predetermined determination value.
【請求項9】 前記基準領域内の全画素のR−BとG−
Bとの値の各平均値とあらかじめ設定した判定値との大
小関係により基準領域内が光沢をもつか否かを判定する
ことを特徴とする請求項7記載の色抽出方法。
9. The RB and G-pixels of all pixels in the reference area.
8. The color extraction method according to claim 7, wherein it is determined whether or not the reference area has a gloss based on a magnitude relationship between each average value of B and a predetermined determination value.
JP2000359233A 2000-11-27 2000-11-27 Color extracting image processing device and color extracting method Withdrawn JP2002163650A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000359233A JP2002163650A (en) 2000-11-27 2000-11-27 Color extracting image processing device and color extracting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000359233A JP2002163650A (en) 2000-11-27 2000-11-27 Color extracting image processing device and color extracting method

Publications (1)

Publication Number Publication Date
JP2002163650A true JP2002163650A (en) 2002-06-07

Family

ID=18831019

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000359233A Withdrawn JP2002163650A (en) 2000-11-27 2000-11-27 Color extracting image processing device and color extracting method

Country Status (1)

Country Link
JP (1) JP2002163650A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006220437A (en) * 2005-02-08 2006-08-24 Omron Corp Substrate inspection device, method and device for setting parameter
US7126612B2 (en) 2003-09-29 2006-10-24 Canon Kabushiki Kaisha Image processing apparatus, image processing method, program, and storage medium
JP2010243353A (en) * 2009-04-07 2010-10-28 Ricoh Co Ltd Gloss feeling evaluation method, gloss feeling evaluation device, image evaluation device provided with the same, image evaluation method, and program for performing the same
JP2013011622A (en) * 2009-05-13 2013-01-17 Koh Young Technology Inc Method of measuring measurement target on printed circuit board
US9256912B2 (en) 2009-05-13 2016-02-09 Koh Young Technology Inc. Method of measuring measurement target
WO2021090395A1 (en) * 2019-11-06 2021-05-14 株式会社Fuji Image processing device, component mounting system, and image processing method
WO2021152924A1 (en) * 2020-01-31 2021-08-05 株式会社写真化学 Image processing device and image processing method
JP7287754B2 (en) 2016-11-11 2023-06-06 ザウラー インテリジェント テクノロジー エイ・ジー Method and apparatus for evaluating the quality of longitudinally moving stranded products

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7126612B2 (en) 2003-09-29 2006-10-24 Canon Kabushiki Kaisha Image processing apparatus, image processing method, program, and storage medium
JP2006220437A (en) * 2005-02-08 2006-08-24 Omron Corp Substrate inspection device, method and device for setting parameter
JP4539355B2 (en) * 2005-02-08 2010-09-08 オムロン株式会社 Substrate inspection device, parameter setting method and parameter setting device
JP2010243353A (en) * 2009-04-07 2010-10-28 Ricoh Co Ltd Gloss feeling evaluation method, gloss feeling evaluation device, image evaluation device provided with the same, image evaluation method, and program for performing the same
JP2013011622A (en) * 2009-05-13 2013-01-17 Koh Young Technology Inc Method of measuring measurement target on printed circuit board
US9256912B2 (en) 2009-05-13 2016-02-09 Koh Young Technology Inc. Method of measuring measurement target
JP7287754B2 (en) 2016-11-11 2023-06-06 ザウラー インテリジェント テクノロジー エイ・ジー Method and apparatus for evaluating the quality of longitudinally moving stranded products
WO2021090395A1 (en) * 2019-11-06 2021-05-14 株式会社Fuji Image processing device, component mounting system, and image processing method
WO2021152924A1 (en) * 2020-01-31 2021-08-05 株式会社写真化学 Image processing device and image processing method
JP2021124746A (en) * 2020-01-31 2021-08-30 株式会社写真化学 Image processing device and image processing method
JP7082426B2 (en) 2020-01-31 2022-06-08 株式会社写真化学 Image processing device and image processing method

Similar Documents

Publication Publication Date Title
US6249601B1 (en) Method for determining color of illuminant and apparatus therefor
JP3264273B2 (en) Automatic color correction device, automatic color correction method, and recording medium storing control program for the same
JP3723604B2 (en) Image dependent color saturation correction method and apparatus for natural scene image in electronic document
EP1489833A1 (en) Image processing apparatus, image processing method, color adjustment method, and color adjustment system
JP5195430B2 (en) Image processing method, image processing program, image processing apparatus, camera
CN111292246B (en) Image color correction method, storage medium, and endoscope
JPH11232442A (en) Red eye reduction system
JPH06333039A (en) Method and device for airbrushing
JPH05223642A (en) Method and apparatus for colorimetry
KR20070090224A (en) Method of electronic color image saturation processing
JP3539665B2 (en) Face area correction method, face area correction apparatus, and recording medium storing face area correction program
JPH0832827A (en) Gradation correction divice for digital image
JP2002163650A (en) Color extracting image processing device and color extracting method
JPH06121159A (en) Color image processor
JP2000050318A (en) Method for characterizing response function of output device, program product and system
CN110012277B (en) Automatic white balance method and device for portrait image
JP2005346474A (en) Image processing method and image processor and program and storage medium
JP2002131133A (en) Method for specifying color of image, method for extracting color of image, and image processor
JPH05205039A (en) Method and device for color image processing
JP2003299114A (en) Color extraction image processor and method for displaying extracted color
JPH03127284A (en) Color picture processing device
JP2002117402A (en) Image processing method and device thereof
JP7309415B2 (en) Image processing device, image processing method and program
JPH10341352A (en) Image processor
US6753908B1 (en) Linear matrix circuit

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: 20080205