[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

JP2005130000A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2005130000A
JP2005130000A JP2003360339A JP2003360339A JP2005130000A JP 2005130000 A JP2005130000 A JP 2005130000A JP 2003360339 A JP2003360339 A JP 2003360339A JP 2003360339 A JP2003360339 A JP 2003360339A JP 2005130000 A JP2005130000 A JP 2005130000A
Authority
JP
Japan
Prior art keywords
data
hsv
color
rgb
image processing
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
JP2003360339A
Other languages
Japanese (ja)
Inventor
Naoki Kato
直樹 加藤
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.)
Asti Corp
Original Assignee
Asti Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Asti Corp filed Critical Asti Corp
Priority to JP2003360339A priority Critical patent/JP2005130000A/en
Publication of JP2005130000A publication Critical patent/JP2005130000A/en
Pending legal-status Critical Current

Links

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

【課題】 照明の状況や対象物の色変化等に影響されることなく、目的の色を確実に抽出することを可能にする画像処理装置を提供することにある。
【解決手段】 撮像されたカラー画像データをRGB(R:赤、G:緑、B:青)データとして格納するRGBデータ格納手段と、上記RGBデータ格納手段に格納されたRGBデータをHSV(H:色相、S:彩度、V:輝度)データに変換するRGB/HSV変換手段と、上記RGB/HSV変換手段によって変換されたHSVデータを格納するHSVデータ格納手段と、上記HSVデータ格納手段に格納されているHSVデータと予め設定されている抽出色基準データとを比較すると共に演算して濃淡画像データを得る濃淡画像抽出手段と、を具備したもの。
【選択図】 図2
PROBLEM TO BE SOLVED: To provide an image processing apparatus capable of reliably extracting a target color without being affected by illumination conditions or color change of an object.
An RGB data storage unit that stores captured color image data as RGB (R: red, G: green, B: blue) data, and RGB data stored in the RGB data storage unit are converted into HSV (H : Hue, S: Saturation, V: Luminance) RGB / HSV conversion means for conversion to data, HSV data storage means for storing HSV data converted by the RGB / HSV conversion means, and HSV data storage means A gray-scale image extracting unit that compares the stored HSV data with preset extraction color reference data and obtains gray-scale image data by calculation.
[Selection] Figure 2

Description

本願発明は、撮像されたカラー画像データから任意の色を抽出する画像処理装置に係り、特に、RGB(R:赤、G:緑、B:青)データをHSV(H:色相、S:彩度、V:輝度)データに変換して所定の演算処理を施すことにより、2値化画像データではなく所望の濃淡画像データを得ることができるように工夫したものに関する。   The present invention relates to an image processing apparatus that extracts an arbitrary color from captured color image data. In particular, RGB (R: red, G: green, B: blue) data is converted into HSV (H: hue, S: chromatic). The present invention relates to a device that is devised so that desired grayscale image data can be obtained instead of binarized image data by performing predetermined calculation processing after conversion into data.

従来の画像処理装置は概略次のような構成になっている。まず、カラーカメラ等の撮像手段によって撮影されたカラー画像が、コンピュータ内のメモリエリア上に、RGB(R:赤、G:緑、B:青)データとして格納される。この格納されたRGB(R:赤、G:緑、B:青)データから所定の色抽出処理を行うものである。 A conventional image processing apparatus has the following general configuration. First, a color image taken by an imaging means such as a color camera is stored as RGB (R: red, G: green, B: blue) data in a memory area in the computer. A predetermined color extraction process is performed from the stored RGB (R: red, G: green, B: blue) data.

すなわち、R:赤、G:緑、B:青の各3原色に対して、抽出する色のデータ範囲を設定し、コンピュータ内のメモリエリア上に格納されているRGB(R:赤、G:緑、B:青)データに対して、設定された抽出色のデータ範囲内であるか否か判定が施される。これを図6を参照して説明する。図6(a)は抽出上限値が抽出下限値よりも大きい場合の例であり、図6(b)は抽出上限値が抽出下限値よりも小さい場合の例である。 That is, for each of the three primary colors R: red, G: green, and B: blue, the data range of the color to be extracted is set, and RGB (R: red, G: stored in the memory area in the computer). It is determined whether or not the data is within the data range of the set extraction color for the data (green, B: blue). This will be described with reference to FIG. FIG. 6A shows an example when the extraction upper limit value is larger than the extraction lower limit value, and FIG. 6B shows an example when the extraction upper limit value is smaller than the extraction lower limit value.

まず、図6(a)に示す場合には、「測定値の色レベル値が抽出下限値以上」、且つ、「測定値の色レベル値が抽出上限値以下」の二つの抽出条件を満足するか否かが判別され、範囲内であれば「1」、範囲外であれば「0」となる。同様に、図6(b)に示す場合には、「測定値の色レベル値が抽出上限値以下」、且つ、「測定値の色レベル値が抽出下限値以上」の何れか一つを満足するか否かが判別され、範囲内であれば「1」、範囲外であれば「0」となる。   First, in the case shown in FIG. 6A, the two extraction conditions of “the color level value of the measured value is equal to or higher than the extraction lower limit value” and “the color level value of the measured value is equal to or lower than the upper limit value of extraction” are satisfied. It is determined whether it is within the range, “1”, otherwise “0”. Similarly, in the case shown in FIG. 6B, either one of “the color level value of the measured value is not more than the extraction upper limit value” and “the color level value of the measured value is not less than the extraction lower limit value” is satisfied. It is determined whether or not to be performed, and is “1” if it is within the range, and “0” if it is outside the range.

そして、何れの場合にも、判定結果は2値、すなわち、「1」或いは「0」として出力される。又、全画素に対して同様の判定を行い2値化データを得るものである。そして、得られた2値化データを使用して2値化画像を作成してこれを抽出画像とするものである。 In any case, the determination result is output as a binary value, that is, “1” or “0”. Further, the same determination is performed for all the pixels to obtain binarized data. Then, using the obtained binarized data, a binarized image is created and used as an extracted image.

具体的に示すと、例えば、図7に示すようなカラー画像がある。これは、例えば、カラーカメラによって4本のカラー蛍光ペンを撮影したものである。各カラー蛍光ペンは、本体101とキャップ103を備えていて、キャップ103にはクリップ105が取り付けられている。上記キャップ103の一部、具体的には、上端頭部、下端部、フック105部に色が付いており、その他の個所は黒色である。
尚、図では、便宜上全て「白・黒」にて表示されているが、実際には、符号「O」で示す個所が「オレンジ」、符号「P」で示す個所が「ピンク」、符号「G」で示す個所が「グリーン」、符号「Y」で示す個所が「黄色」であり、その他地の色(この場合には黒)がそのまま表われている。
そして、図7に示すカラー画像に対して、例えば、「オレンジ」を抽出する画像処理を施すことにより、図8に示すような2値化画像データを得ることができるものである。図8に示す2値化画像においては、2値化処理されて「1」と判別された個所のみが「白」で表示され、その他の部分は「黒」で表示されているものである。図7中符号「O」で示すオレンジ色の個所は、図8では「白」で表示されており、同時に、紛らわしい個所についても一部「白」として表示されている。
Specifically, for example, there is a color image as shown in FIG. In this case, for example, four color fluorescent pens are photographed by a color camera. Each color highlighter includes a main body 101 and a cap 103, and a clip 105 is attached to the cap 103. Part of the cap 103, specifically, the upper end head portion, the lower end portion, and the hook 105 portion are colored, and the other portions are black.
In the drawing, for convenience, all are displayed in “white / black”, but in actuality, the portion indicated by the symbol “O” is “orange”, the portion indicated by the symbol “P” is “pink”, and the symbol “ The portion indicated by “G” is “green”, the portion indicated by the symbol “Y” is “yellow”, and the other background color (in this case, black) appears as it is.
Then, for example, by performing image processing for extracting “orange” on the color image shown in FIG. 7, binary image data as shown in FIG. 8 can be obtained. In the binarized image shown in FIG. 8, only the portion that has been binarized and determined to be “1” is displayed in “white”, and the other portions are displayed in “black”. In FIG. 7, the orange portion indicated by the symbol “O” is displayed as “white” in FIG. 8, and at the same time, some confusing portions are also displayed as “white”.

尚、本願発明との直接的な関係はないと思われるが、この種の画像処理装置を開示するものとして、例えば、特許文献1、特許文献2、特許文献3、特許文献4等がある。 Although it seems that there is no direct relationship with the present invention, there are, for example, Patent Document 1, Patent Document 2, Patent Document 3, Patent Document 4 and the like that disclose this type of image processing apparatus.

特開2002−298083号公報JP 2002-298083 A 特開2002−163650号公報JP 2002-163650 A 特開2002−131133号公報JP 2002-131133 A 特開2002−49916号公報JP 2002-49916 A

上記従来の構成によると次のような問題があった。
すなわち、従来の画像処理装置の場合には、RGB(R:赤、G:緑、B:青)の3原色に対して抽出する色のデータ範囲を設定して該データ範囲内に入るか否かを判別するようにしている。しかしながら、この場合には、照明の状況や対象物の色変化等に起因して、目的の色が抽出されない場合があった。これは、対象物が同じ色であっても、照明の状況によって、輝度や彩度が変わることに起因する。
このような問題に対しては、色を抽出する際、輝度や彩度に対しての抽出度合を調整できるように別途処理する必要があるが、それは極めて煩雑な処理であった。
又、抽出される画像データが2値化画像であるため、「白」で表示される部分と「黒」で表示される部分の2色のみの表現となり、この画像内から色抽出をする対象物を認識する事がきわめて困難であるという問題があった。
さらに、対象物が正確に識別できない場合、対象物以外の色も抽出色の範囲として判別されてしまう可能性があり、その結果、目的の色以外の色も抽出してしまうことになってしまう。
The conventional configuration has the following problems.
That is, in the case of a conventional image processing apparatus, whether or not a data range of colors to be extracted is set for the three primary colors RGB (R: red, G: green, B: blue) and falls within the data range. I am trying to determine. However, in this case, the target color may not be extracted due to lighting conditions or color change of the object. This is because even if the object has the same color, the luminance and saturation change depending on the lighting conditions.
For such a problem, when extracting a color, it is necessary to perform a separate process so that the degree of extraction with respect to luminance and saturation can be adjusted, which is a very complicated process.
In addition, since the extracted image data is a binary image, only the two colors of the portion displayed in “white” and the portion displayed in “black” are expressed. There was a problem that it was extremely difficult to recognize things.
Furthermore, if the object cannot be accurately identified, colors other than the object may be determined as the extracted color range, and as a result, colors other than the target color will be extracted. .

本発明はこのような点に基づいてなされたものでその目的とするところは、照明の状況や対象物の色変化等に影響されることなく、目的の色を確実に抽出することを可能にする画像処理装置を提供することにある。   The present invention has been made on the basis of such points, and the object of the present invention is to reliably extract the target color without being affected by the lighting conditions or the color change of the object. Another object is to provide an image processing apparatus.

上記目的を達成するべく本願発明の請求項1による画像処理装置は、撮像されたカラー画像データをRGB(R:赤、G:緑、B:青)データとして格納するRGBデータ格納手段と、上記RGBデータ格納手段に格納されたRGBデータ(R:赤、G:緑、B:青)をHSV(H:色相、S:彩度、V:輝度)データに変換するRGB/HSV変換手段と、 上記RGB/HSV変換手段によって変換されたHSV(H:色相、S:彩度、V:輝度)データを格納するHSVデータ格納手段と、上記HSVデータ格納手段に格納されているHSV(H:色相、S:彩度、V:輝度)データと予め設定されている抽出色基準データとを比較すると共に演算して濃淡画像データを得る濃淡画像データ抽出手段と、を具備したことを特徴とするものである。
又、請求項2による画像処理装置は、請求項1記載の画像処理装置において、上記濃淡画像データ抽出手段は、上記HSV(H:色相、S:彩度、V:輝度)データと抽出色基準データとの差(ΔH、ΔS、ΔV)を算出する差分データ算出手段と、上記該差分データ算出手段により算出された差分データ(ΔH、ΔS、ΔV)を集約演算処理して濃淡画像データを得る集約演算処理手段と、を備えているものであることを特徴とするものである。
又、請求項3による画像処理装置は、請求項2記載の画像処理装置において、上記濃淡画像データ抽出手段は、上記差分データ算出手段によって得られる差分データ(ΔH、ΔS、ΔV)に任意の係数を乗算して抽出感度を調整する係数乗算手段を備えていて、上記集約演算処理手段は上記係数乗算手段によって得られた係数乗算差分データ(ΔH´、ΔS´、ΔV´)に基づいて集約演算処理して濃淡画像データを得ることを特徴とするものである。
又、請求項4による画像処理装置は、請求項3記載の画像処理装置において、上記係数は「0」以上の任意の値であることを特徴とするものである。
又、請求項5による画像処理装置は、請求項3又は請求項4記載の画像処理装置において、上記集約演算処理手段は次に示す式に基づいて集約演算処理を施して濃淡値を求めるものであることを特徴とするものである。
(N−ΔH´)×(N−ΔS´)×(N−ΔV´)/N
但し、N:階調数
In order to achieve the above object, an image processing apparatus according to claim 1 of the present invention comprises RGB data storage means for storing captured color image data as RGB (R: red, G: green, B: blue) data; RGB / HSV conversion means for converting RGB data (R: red, G: green, B: blue) stored in the RGB data storage means into HSV (H: hue, S: saturation, V: luminance) data; HSV data storage means for storing HSV (H: hue, S: saturation, V: luminance) data converted by the RGB / HSV conversion means; and HSV (H: hue) stored in the HSV data storage means. , S: chroma, V: luminance) data and grayscale image data extraction means for comparing grayscale data and preset grayscale data to obtain grayscale image data. It is.
An image processing apparatus according to claim 2 is the image processing apparatus according to claim 1, wherein the grayscale image data extracting means includes the HSV (H: hue, S: saturation, V: luminance) data and an extracted color reference. Difference data calculation means for calculating a difference (ΔH, ΔS, ΔV) from the data, and difference data (ΔH, ΔS, ΔV) calculated by the difference data calculation means are subjected to aggregation calculation processing to obtain grayscale image data. And an aggregating operation processing means.
According to a third aspect of the present invention, in the image processing apparatus according to the second aspect, the grayscale image data extracting means adds an arbitrary coefficient to the difference data (ΔH, ΔS, ΔV) obtained by the difference data calculating means. Is multiplied by the coefficient multiplication means for adjusting the extraction sensitivity, and the aggregation calculation processing means is an aggregation calculation based on the coefficient multiplication difference data (ΔH ′, ΔS ′, ΔV ′) obtained by the coefficient multiplication means. Processing is performed to obtain grayscale image data.
According to a fourth aspect of the present invention, in the image processing apparatus according to the third aspect, the coefficient is an arbitrary value equal to or greater than “0”.
An image processing apparatus according to claim 5 is the image processing apparatus according to claim 3 or 4, wherein the aggregation calculation processing means performs an aggregation calculation process based on the following expression to obtain a gray value. It is characterized by being.
(N−ΔH ′) × (N−ΔS ′) × (N−ΔV ′) / N 2
N: Number of gradations

以上詳述したように本発明による画像処理装置によると次のような効果を奏することができる。
まず、従来のように、RGB(R:赤、G:緑、B:青)データに基づいた2値化画像ではなく、HSV(H:色相、S:彩度、V:輝度)データに基づいた濃淡画像を得るようにしているので、照明の状況や対象物の色変化等に影響されることなく対象物を明確に識別することが可能になると共に、抽出色と他の色との近似を視覚的に把握することができるようになった。
又、濃淡画像抽出手段を、上記HSVデータと抽出色基準データとの差(ΔH、ΔS、ΔV)を算出する差分データ算出手段と、上記該差分データ算出手段により算出された差分データ(ΔH、ΔS、ΔV)を集約演算処理して濃淡画像データを得る集約演算処理手段とから構成し、且つ、上記差分データ算出手段によって得られる差分データ(ΔH、ΔS、ΔV)に任意の係数を乗算して抽出感度を調整する係数乗算手段を設けた場合には、抽出感度を適宜調整してより鮮明な濃淡画像データを得ることができるようになる。
又、濃淡画像データをみながら各種数値、例えば、係数等を適宜調整することにより、抽出色の設定・調整が可能であるので、抽出したい色を簡単に設定して得ることができるものである。
そして、例えば、このような画像処理装置を、各種の検査、例えば、基板上に各種の電装部品が正確に実装されているか否かを判別する検査に適用した場合には、精度の高い検査を簡単に行うことができるようになるものである。
As described above in detail, the image processing apparatus according to the present invention can provide the following effects.
First, not based on a binarized image based on RGB (R: red, G: green, B: blue) data as in the past, but based on HSV (H: hue, S: saturation, V: luminance) data. As a result, it is possible to clearly identify the object without being affected by lighting conditions or color changes of the object, and approximate the extracted color to other colors. Can be grasped visually.
Further, the grayscale image extracting means includes difference data calculating means for calculating differences (ΔH, ΔS, ΔV) between the HSV data and the extracted color reference data, and difference data (ΔH, ΔS, ΔV) is composed of aggregation calculation processing means for obtaining grayscale image data by performing aggregation calculation processing, and the difference data (ΔH, ΔS, ΔV) obtained by the difference data calculation means is multiplied by an arbitrary coefficient. When coefficient multiplication means for adjusting the extraction sensitivity is provided, it is possible to adjust the extraction sensitivity as appropriate to obtain clearer gray image data.
In addition, it is possible to set and adjust the extraction color by appropriately adjusting various numerical values, for example, coefficients, etc. while viewing the grayscale image data, so that the color to be extracted can be easily set and obtained. .
For example, when such an image processing apparatus is applied to various inspections, for example, inspections for determining whether or not various electrical components are correctly mounted on a substrate, a highly accurate inspection is performed. It will be easy to do.

以下、図1乃至図5を参照して本発明の一実施の形態を説明する。
図1は、本発明の一実施の形態による画像処理装置を含んだ画像処理システムの構成を概念的に示す図であり、まず、撮像手段としてのカラーカメラ1がある。このカラーカメラによって対象物を撮影してカラー画像を得るものである。上記カラーカメラ1は、画像入力ボード3を介して、CPU(中央演算処理装置)5に接続されている。
Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
FIG. 1 is a diagram conceptually showing the configuration of an image processing system including an image processing apparatus according to an embodiment of the present invention. First, there is a color camera 1 as an imaging means. A color image is obtained by photographing an object with this color camera. The color camera 1 is connected to a CPU (Central Processing Unit) 5 through an image input board 3.

又、上記CPU5には、ハードディスクドライブ(HDD)7、ランダムアクセスメモリ(RAM)9、フラットパネルディスプレイ(FPD)11が接続されている。又、本実施の形態による画像処理装置の実体としての色抽出処理ソフトウェアは、上記HDD7に格納されている。そして、処理時には、上記CPU5からの指令によって上記HDD7からRAM9上にロードされ処理が実行されることになる。   The CPU 5 is connected to a hard disk drive (HDD) 7, a random access memory (RAM) 9, and a flat panel display (FPD) 11. Further, color extraction processing software as an entity of the image processing apparatus according to the present embodiment is stored in the HDD 7. At the time of processing, it is loaded from the HDD 7 onto the RAM 9 according to a command from the CPU 5 and executed.

又、上記カラーカメラ1によって撮影されたカラー画像は画像入力ボード3を介して、上記RAM9上のカラーメモリ空間に格納されることになる。そして、上記CPU5によって所定の画像処理が施され、所望の濃淡抽出画像データを得ることになる。又、得られた濃淡抽出画像データは上記FPD11上に表示されることになる。   A color image taken by the color camera 1 is stored in the color memory space on the RAM 9 via the image input board 3. Then, predetermined image processing is performed by the CPU 5, and desired grayscale extracted image data is obtained. Further, the obtained grayscale extracted image data is displayed on the FPD 11.

次に、上記HDD7に格納されている色抽出処理ソフトウェアの実体を図2を参照して説明する。
まず、カラーメモリR(赤)チャンネル21、カラーメモリG(緑)チャンネル23、カラーメモリB(青)チャンネル25があり、これらカラーメモリR(赤)チャンネル21、カラーメモリG(緑)チャンネル23、カラーメモリB(青)チャンネル25には、カラーカメラ1によって撮影されたカラー画像データがRGB(R:赤、G:緑、B:青)データとして夫々格納されることになる。
Next, the substance of the color extraction processing software stored in the HDD 7 will be described with reference to FIG.
First, there is a color memory R (red) channel 21, a color memory G (green) channel 23, and a color memory B (blue) channel 25. These color memory R (red) channel 21, color memory G (green) channel 23, In the color memory B (blue) channel 25, color image data photographed by the color camera 1 is stored as RGB (R: red, G: green, B: blue) data, respectively.

又、色空間変換処理手段27があり、上記カラーメモリR(赤)チャンネル21、カラーメモリG(緑)チャンネル23、カラーメモリB(青)チャンネル25に夫々格納されているRGB(R:赤、G:緑、B:青)データは、この色空間変換処理手段27によってHSV(H:色相、S:彩度、V:輝度)データに変換されることになる。そして、変換されたHSV(H:色相、S:彩度、V:輝度)データは、カラーメモリH(色相)チャンネル29、カラーメモリS(彩度)チャンネル31、カラーメモリV(輝度)チャンネル33に夫々格納されることになる。 In addition, color space conversion processing means 27 is provided, and RGB (R: red, The G: green, B: blue) data is converted into HSV (H: hue, S: saturation, V: luminance) data by the color space conversion processing means 27. The converted HSV (H: Hue, S: Saturation, V: Luminance) data is stored in a color memory H (hue) channel 29, a color memory S (saturation) channel 31, and a color memory V (luminance) channel 33. Will be stored respectively.

又、差分演算処理手段35があり、この差分演算処理手段35は、予め設定・入力されている抽出色基準データ37と、上記カラーメモリH(色相)チャンネル29、カラーメモリS(彩度)チャンネル31、カラーメモリV(輝度)チャンネル33に夫々格納されているHSV(H:色相、S:彩度、V:輝度)データとを対比して、次の式(I)、(II)、(III)に示すような差分データ(ΔH、ΔS、ΔV)を算出する。その際、抽出色の色データ値が画像の色データ値よりも大きい場合もあり、その場合には「−」の値となるため、差分値は絶対値とする。
色相差分値ΔH=|画像の色相値−抽出色の色相値|―――(I)
彩度差分値ΔS=|画像の彩度値−抽出色の彩度値|―――(II)
輝度差分値ΔV=|画像の輝度値−抽出色の輝度値|―――(III)
尚、上記差分データ(ΔH、ΔS、ΔV)を図で示すと、図3(a)に示すようなものである。
Further, there is a difference calculation processing means 35. The difference calculation processing means 35 includes the extracted color reference data 37 set and inputted in advance, the color memory H (hue) channel 29, and the color memory S (saturation) channel. 31 and HSV (H: Hue, S: Saturation, V: Luminance) data respectively stored in the color memory V (luminance) channel 33 are compared with the following equations (I), (II), ( Difference data (ΔH, ΔS, ΔV) as shown in III) is calculated. At this time, the color data value of the extracted color may be larger than the color data value of the image. In this case, the value is “−”, and thus the difference value is an absolute value.
Hue difference value ΔH = | Hue value of image−Hue value of extracted color | ---- (I)
Saturation difference value ΔS = | Saturation value of image−Saturation value of extracted color | —―― (II)
Brightness difference value ΔV = | Brightness value of image−Brightness value of extracted color | --- (III)
The difference data (ΔH, ΔS, ΔV) is shown in FIG. 3A.

又、感度演算処理手段39があり、この感度演算処理手段39は、上記差分演算処理手段35によって演算・算出された差分データ(ΔH、ΔS、ΔV)に対して、予め設定・入力されている感度データ41を乗算して、次の式(IV)、(V)、(VI)に示すような係数乗算差分データ(ΔH´、ΔS´、ΔV´)を算出するものである。又、感度係数は「0」以上の値であり、例えば、0は差分値が0となり、10は差分値が10倍となる。
係数乗算色相差分値ΔH´=色相差分値ΔH×色相感度係数(0以上)―――(IV)
係数乗算彩度差分値ΔS´=彩度差分値ΔS×彩度感度係数(0以上)―――(V)
係数乗算輝度差分値ΔV´=輝度差分値ΔV×輝度感度係数(0以上)―――(VI)
Further, there is a sensitivity calculation processing means 39, and this sensitivity calculation processing means 39 is preset and inputted to the difference data (ΔH, ΔS, ΔV) calculated and calculated by the difference calculation processing means 35. By multiplying the sensitivity data 41, coefficient multiplication difference data (ΔH ′, ΔS ′, ΔV ′) as shown in the following equations (IV), (V), (VI) is calculated. Further, the sensitivity coefficient is a value equal to or greater than “0”. For example, 0 indicates a difference value of 0 and 10 indicates a difference value of 10 times.
Coefficient multiplication hue difference value ΔH ′ = hue difference value ΔH × hue sensitivity coefficient (0 or more) --- (IV)
Coefficient Multiply Saturation Difference Value ΔS ′ = Saturation Difference Value ΔS × Saturation Sensitivity Coefficient (0 or More) --- (V)
Coefficient multiplication luminance difference value ΔV ′ = luminance difference value ΔV × luminance sensitivity coefficient (0 or more) --- (VI)

又、色成分集約演算処理手段43があり、この色成分集約演算処理手段43は、上記感度演算処理手段39によって算出された係数乗算差分データ(ΔH´、ΔS´、ΔV´)に対して、次の式(VII)に示す処理を施し、それによって、濃淡データを算出すると共に、該濃淡データに基づいて所望の濃淡画像データ45を得るものである。
濃淡値=(N−ΔH’)×(N−ΔS’)×(N−ΔV’)/N2
―――(VII)
但し、
N:階調数、この実施の形態の場合には255
上記式(VII)によって算出された濃淡値と測定値との関係を図3(b)に示す。
In addition, there is a color component aggregation calculation processing unit 43, and the color component aggregation calculation processing unit 43 is for the coefficient multiplication difference data (ΔH ′, ΔS ′, ΔV ′) calculated by the sensitivity calculation processing unit 39. The processing shown in the following formula (VII) is performed, thereby calculating grayscale data and obtaining desired grayscale image data 45 based on the grayscale data.
Gray value = (N−ΔH ′) × (N−ΔS ′) × (N−ΔV ′) / N2
――― (VII)
However,
N: number of gradations, 255 in this embodiment
FIG. 3B shows the relationship between the gray value calculated by the above formula (VII) and the measured value.

以上の構成を基に図4のフローチャートを参照しながらその作用を説明する。
まず、ステップS1において、カラー画像色空間変換処理を実行する。これによって、RGB(R:赤、G:緑、B:青)データがHSV(H:色相、S:彩度、V:輝度)データに変換されることになる。以下、上記変換されたHSV(H:色相、S:彩度、V:輝度)データに基づいて、X・Y軸方向の全ての画素に対して所定の画像処理を実行していくものである。
Based on the above configuration, the operation will be described with reference to the flowchart of FIG.
First, in step S1, a color image color space conversion process is executed. As a result, RGB (R: red, G: green, B: blue) data is converted to HSV (H: hue, S: saturation, V: luminance) data. Hereinafter, based on the converted HSV (H: Hue, S: Saturation, V: Luminance) data, predetermined image processing is executed for all pixels in the X and Y axis directions. .

すなわち、ステップS2に移行して、Y軸アドレスの全てについて画像処理が完了したか否かが判別される。すべての画素に対して所定の画像処理が完了している場合には、ステップS3に移行して、抽出画像の作成が実行され、その後終了となる。これに対して、完了していないと判別された場合には、ステップS4に移行する。このステップS4では、X軸アドレスについて画像処理が完了しているか否かが判別される。完了している場合には、ステップS5に移行して、Y軸アドレスインクリメント処理が実行され、その後、ステップS1に戻る。これに対して、完了していないと判別された場合には、ステップS6に移行することになる。
尚、このステップS6以降が最も重要な画像処理の内容である。
That is, the process proceeds to step S2, and it is determined whether or not image processing has been completed for all of the Y-axis addresses. If the predetermined image processing has been completed for all the pixels, the process proceeds to step S3, the creation of the extracted image is executed, and the process ends thereafter. On the other hand, if it is determined that the process has not been completed, the process proceeds to step S4. In step S4, it is determined whether or not image processing has been completed for the X-axis address. If completed, the process proceeds to step S5, Y-axis address increment processing is executed, and then the process returns to step S1. On the other hand, if it is determined that the process has not been completed, the process proceeds to step S6.
Note that the contents of the most important image processing are after step S6.

すなわち、ステップS6においては、色相差分処理が実行される。つまり、色相差分データ(ΔH)を算出するものである。次に、ステップS7に移行して、色相感度演算処理を実行する。すなわち、上記色相差分データΔHに対して任意の係数を乗算して、係数乗算色相差分データ(ΔH´)を算出するものである。次に、ステップS8に移行して、彩度差分演算処理が実行される。つまり、彩度差分データ(ΔS)を算出するものである。次に、ステップS9に移行して、彩度感度演算処理を実行する。すなわち、上記彩度差分データ(ΔS)に対して任意の係数を乗算して、係数乗算彩度差分データ(ΔS´)を算出するものである。   That is, in step S6, hue difference processing is executed. That is, the hue difference data (ΔH) is calculated. Next, the process proceeds to step S7, and hue sensitivity calculation processing is executed. That is, the hue difference data ΔH is multiplied by an arbitrary coefficient to calculate coefficient multiplied hue difference data (ΔH ′). Next, it transfers to step S8 and a saturation difference calculation process is performed. That is, the saturation difference data (ΔS) is calculated. Next, it transfers to step S9 and performs a saturation sensitivity calculation process. That is, the coefficient saturation saturation difference data (ΔS ′) is calculated by multiplying the saturation difference data (ΔS) by an arbitrary coefficient.

次に、ステップS10に移行して、輝度差分演算処理が実行される。つまり、輝度差分データ(ΔV)を算出するものである。次に、ステップS11に移行して、輝度感度演算処理を実行する。すなわち、上記輝度差分データ(ΔV)に対して任意の係数を乗算して、係数乗算輝度差分データ(ΔV´)を算出するものである。ここまでの処理によって、任意の画素に関する係数乗算差分データ(ΔH´、ΔS´、ΔV´)を得ることができたものである。   Next, it transfers to step S10 and a brightness | luminance difference calculation process is performed. That is, luminance difference data (ΔV) is calculated. Next, it transfers to step S11 and performs a brightness sensitivity calculation process. That is, the luminance difference data (ΔV) is calculated by multiplying the luminance difference data (ΔV) by an arbitrary coefficient. Through the processing so far, coefficient multiplication difference data (ΔH ′, ΔS ′, ΔV ′) relating to an arbitrary pixel has been obtained.

次に、ステップS12に移行して、色成分集約演算処理を実行する。すなわち、前記式(VII)に基づいて濃淡値を算出する処理を実行するものである。次に、ステップS13に移行して、X軸アドレスインクリメント処理を実行し、ステップS4に戻るものである。以下、同様の処理を繰り返し実行することにより、X・Y軸方向の全ての画素に対して所定の画像処理を実行していくものであり、それによって、濃淡値を算出して、所望の濃淡値画像データを得るものである。   Next, the process proceeds to step S12, and color component aggregation calculation processing is executed. That is, a process for calculating a gray value based on the formula (VII) is executed. Next, the process proceeds to step S13, an X-axis address increment process is executed, and the process returns to step S4. Thereafter, the same processing is repeatedly executed to execute predetermined image processing on all the pixels in the X and Y axis directions, thereby calculating a gray value and obtaining a desired gray level. Value image data is obtained.

上記のような処理によって得られた濃淡画像データの例を図5に示す。図5は、従来例の説明で使用した図7のカラー画像に対応したものである。この図5に示す本実施の形態による濃淡画像データと図8に示した従来の2値化画像データとを対比すると、本実施の形態による濃淡画像データの場合には、抽出色(この場合には「オレンジ」)に近い色程白く表示され、遠い色程黒く表示されているのがわかる。具体的には、オレンジに近い色であるグリーン、黄色はオレンジに対して離れた色であるピンクに対してより白く表示されている。   An example of grayscale image data obtained by the above processing is shown in FIG. FIG. 5 corresponds to the color image of FIG. 7 used in the description of the conventional example. When the grayscale image data according to this embodiment shown in FIG. 5 is compared with the conventional binarized image data shown in FIG. 8, in the case of the grayscale image data according to this embodiment, the extracted color (in this case) Can be seen that the color closer to “orange” is displayed in white and the color farther away is displayed in black. Specifically, green and yellow, which are colors close to orange, are displayed whiter than pink, which is a color distant from orange.

以上本実施の形態によると次のような効果を奏することができるものである。
まず、従来のように、RGB(R:赤、G:緑、B:青)データに基づいた2値化画像ではなく、HSV(H:色相、S:彩度、V:輝度)データに基づいた濃淡画像を得るようにしているので、照明の状況や対象物の色変化等に影響されることなく対象物を明確に識別することが可能になると共に、抽出色と他の色との近似を視覚的に把握することができるようになった。
又、濃淡画像抽出手段を、上記HSVデータと抽出色基準データとの差(ΔH、ΔS、ΔV)を算出する差分データ算出手段と、上記該差分データ算出手段により算出された差分データ(ΔH、ΔS、ΔV)を集約演算処理して濃淡画像データを得る集約演算処理手段と、から構成し、且つ、上記差分データ算出手段によって得られる差分データ(ΔH、ΔS、ΔV)に任意の係数を乗算して抽出感度を調整する係数乗算手段を設けた場合には、抽出感度を適宜調整してより鮮明な濃淡画像データを得ることができるようになった。
又、濃淡画像データをみながら各種数値を調整することにより(例えば、係数等)、抽出色の設定・調整が可能であるので、抽出したい色を簡単に設定して得ることができるものである。
As described above, according to this embodiment, the following effects can be obtained.
First, not based on a binarized image based on RGB (R: red, G: green, B: blue) data as in the past, but based on HSV (H: hue, S: saturation, V: luminance) data. As a result, it is possible to clearly identify the object without being affected by lighting conditions or color changes of the object, and approximate the extracted color to other colors. Can be grasped visually.
Further, the grayscale image extracting means includes difference data calculating means for calculating differences (ΔH, ΔS, ΔV) between the HSV data and the extracted color reference data, and difference data (ΔH, And an aggregation calculation processing means for obtaining grayscale image data by performing an aggregation calculation process on ΔS, ΔV), and multiplying the difference data (ΔH, ΔS, ΔV) obtained by the difference data calculation means by an arbitrary coefficient In the case where coefficient multiplication means for adjusting the extraction sensitivity is provided, it is possible to obtain clearer grayscale image data by appropriately adjusting the extraction sensitivity.
Also, by adjusting various numerical values (for example, coefficients, etc.) while looking at the grayscale image data, the extraction color can be set and adjusted, so that the color to be extracted can be easily set and obtained. .

尚、本発明は前記一実施の形態に限定されるものではい。
例えば、前記一実施の形態では、感度演算処理を実行する場合を例に挙げて説明したが、感度演算を実行しない実施の形態も本願発明の範囲である。
又、撮像手段としては、図示したようなカラーカメラ以外にも公知の様々なものが使用可能である。
The present invention is not limited to the one embodiment.
For example, in the above-described embodiment, the case where the sensitivity calculation process is executed has been described as an example, but an embodiment in which the sensitivity calculation is not executed is also within the scope of the present invention.
In addition to the color camera as shown, various known devices can be used as the imaging means.

本願発明は撮像されたカラー画像データから任意の色を抽出する画像処理装置に係り、特に、RGB(R:赤、G:緑、B:青)データをHSV(H:色相、S:彩度、V:輝度)データに変換して演算処理することにより、照明の状況や対象物の色変化等に影響されることなく所望の濃淡画像データを得ることができるように工夫したものであって、例えば、各種の検査において有効に利用されるものである。   The present invention relates to an image processing apparatus that extracts an arbitrary color from captured color image data. In particular, RGB (R: red, G: green, B: blue) data is converted into HSV (H: hue, S: saturation). , V: Luminance) data is converted into data and processed so that desired grayscale image data can be obtained without being affected by lighting conditions or color change of the object. For example, it is effectively used in various inspections.

本発明の一実施の形態を示す図で、画像処理装置を含む画像処理システムの構成を示すブロック図である。1 is a diagram illustrating an embodiment of the present invention, and is a block diagram illustrating a configuration of an image processing system including an image processing apparatus. 本発明の一実施の形態を示す図で、画像処理装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of an image processing apparatus according to an embodiment of the present invention. 本発明の一実施の形態を示す図で、図3(a)は色抽出の概念を説明する為の図、図3(b)は濃淡値を説明する為の図である。FIG. 3A is a diagram illustrating an embodiment of the present invention, FIG. 3A is a diagram for explaining the concept of color extraction, and FIG. 3B is a diagram for explaining grayscale values. 本発明の一実施の形態を示す図で、画像処理装置による画像処理の内容を順次説明する為のフローチャートである。1 is a diagram illustrating an embodiment of the present invention, and is a flowchart for sequentially explaining the contents of image processing by an image processing apparatus. FIG. 本発明の一実施の形態を示す図で、画像処理装置による画像処理によって得られた濃淡画像データを示す図である。It is a figure which shows one embodiment of this invention, and is a figure which shows the grayscale image data obtained by the image processing by an image processing apparatus. 従来例を示す図で、図6(a)、(b)は従来の画像処理の概念を説明するための図である。FIGS. 6A and 6B are diagrams for explaining the concept of conventional image processing. 従来例を示す図で、撮像されたカラー画像を示す図である。It is a figure which shows a prior art example, and is a figure which shows the imaged color image. 従来例を示す図で、画像処理された後の2値化画像データを示す図である。It is a figure which shows a prior art example, and is a figure which shows the binarized image data after image processing.

符号の説明Explanation of symbols

1 カラーカメラ
3 画像入力ボード
5 CPU
7 HDD
9 RAM
11 FPD
21 カラーメモリR(赤)チャンネル
23 カラーメモリG(緑)チャンネル
25 カラーメモリB(青)チャンネル
27 色空間変換処理手段
29 カラーメモリH(色相)チャンネル
31 カラーメモリS(彩度)チャンネル
33 カラーメモリV(輝度)チャンネル
35 差分演算処理手段
39 感度演算処理手段
43 色成分集約演算処理手段





















1 Color Camera 3 Image Input Board 5 CPU
7 HDD
9 RAM
11 FPD
21 Color memory R (red) channel 23 Color memory G (green) channel 25 Color memory B (blue) channel 27 Color space conversion processing means 29 Color memory H (hue) channel 31 Color memory S (saturation) channel 33 Color memory V (luminance) channel 35 Difference calculation processing means 39 Sensitivity calculation processing means 43 Color component aggregation calculation processing means





















Claims (5)

撮像されたカラー画像データをRGB(R:赤、G:緑、B:青)データとして格納するRGBデータ格納手段と、
上記RGBデータ格納手段に格納されたRGBデータ(R:赤、G:緑、B:青)をHSV(H:色相、S:彩度、V:輝度)データに変換するRGB/HSV変換手段と、
上記RGB/HSV変換手段によって変換されたHSV(H:色相、S:彩度、V:輝度)データを格納するHSVデータ格納手段と、
上記HSVデータ格納手段に格納されているHSV(H:色相、S:彩度、V:輝度)データと予め設定されている抽出色基準データとを比較すると共に演算して濃淡画像データを得る濃淡画像データ抽出手段と、
を具備したことを特徴とする画像処理装置。
RGB data storage means for storing captured color image data as RGB (R: red, G: green, B: blue) data;
RGB / HSV conversion means for converting RGB data (R: red, G: green, B: blue) stored in the RGB data storage means into HSV (H: hue, S: saturation, V: luminance) data; ,
HSV data storage means for storing HSV (H: hue, S: saturation, V: luminance) data converted by the RGB / HSV conversion means;
The light and shade to obtain light and shade image data by comparing and calculating HSV (H: hue, S: saturation, V: luminance) data stored in the HSV data storage means and preset extraction color reference data. Image data extraction means;
An image processing apparatus comprising:
請求項1記載の画像処理装置において、
上記濃淡画像データ抽出手段は、
上記HSV(H:色相、S:彩度、V:輝度)データと抽出色基準データとの差(ΔH、ΔS、ΔV)を算出する差分データ算出手段と、
上記該差分データ算出手段により算出された差分データ(ΔH、ΔS、ΔV)を集約演算処理して濃淡画像データを得る集約演算処理手段と、
を備えているものであることを特徴とする画像処理装置。
The image processing apparatus according to claim 1.
The grayscale image data extraction means includes:
Difference data calculation means for calculating a difference (ΔH, ΔS, ΔV) between the HSV (H: hue, S: saturation, V: luminance) data and the extracted color reference data;
Aggregation calculation processing means for obtaining density image data by performing aggregation calculation processing on the difference data (ΔH, ΔS, ΔV) calculated by the difference data calculation means;
An image processing apparatus comprising:
請求項2記載の画像処理装置において、
上記濃淡画像データ抽出手段は、
上記差分データ算出手段によって得られる差分データ(ΔH、ΔS、ΔV)に任意の係数を乗算して抽出感度を調整する係数乗算手段を備えていて、
上記集約演算処理手段は上記係数乗算手段によって得られた係数乗算差分データ(ΔH´、ΔS´、ΔV´)に基づいて集約演算処理して濃淡画像データを得ることを特徴とする画像処理装置。
The image processing apparatus according to claim 2.
The grayscale image data extraction means includes:
Coefficient multiplication means for adjusting the extraction sensitivity by multiplying the difference data (ΔH, ΔS, ΔV) obtained by the difference data calculation means by an arbitrary coefficient,
An image processing apparatus characterized in that the aggregation calculation processing means obtains grayscale image data by performing aggregation calculation processing based on the coefficient multiplication difference data (ΔH ′, ΔS ′, ΔV ′) obtained by the coefficient multiplication means.
請求項3記載の画像処理装置において、
上記係数は「0」以上の任意の値であることを特徴とする画像処理装置。
The image processing apparatus according to claim 3.
The image processing apparatus, wherein the coefficient is an arbitrary value equal to or greater than “0”.
請求項3又は請求項4記載の画像処理装置において、
上記集約演算処理手段は次に示す式に基づいて集約演算処理を施して濃淡値を求めるものであることを特徴とする画像処理装置。
(N−ΔH´)×(N−ΔS´)×(N−ΔV´)/N
但し、N:階調数
The image processing apparatus according to claim 3 or 4,
The image processing apparatus characterized in that the aggregation calculation processing means performs an aggregation calculation process based on the following formula to obtain a gray value.
(N−ΔH ′) × (N−ΔS ′) × (N−ΔV ′) / N 2
N: Number of gradations
JP2003360339A 2003-10-21 2003-10-21 Image processing device Pending JP2005130000A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003360339A JP2005130000A (en) 2003-10-21 2003-10-21 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003360339A JP2005130000A (en) 2003-10-21 2003-10-21 Image processing device

Publications (1)

Publication Number Publication Date
JP2005130000A true JP2005130000A (en) 2005-05-19

Family

ID=34640674

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003360339A Pending JP2005130000A (en) 2003-10-21 2003-10-21 Image processing device

Country Status (1)

Country Link
JP (1) JP2005130000A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010021990A (en) * 2008-06-13 2010-01-28 Seiko Epson Corp Image processor, integrated circuit device, and electronic apparatus
CN110382239A (en) * 2017-03-13 2019-10-25 太洋电机产业株式会社 Control device and check device
CN112667187A (en) * 2020-12-23 2021-04-16 深圳市尊正数字视频有限公司 Color matching method and system of monitor, intelligent terminal and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010021990A (en) * 2008-06-13 2010-01-28 Seiko Epson Corp Image processor, integrated circuit device, and electronic apparatus
CN110382239A (en) * 2017-03-13 2019-10-25 太洋电机产业株式会社 Control device and check device
CN112667187A (en) * 2020-12-23 2021-04-16 深圳市尊正数字视频有限公司 Color matching method and system of monitor, intelligent terminal and storage medium

Similar Documents

Publication Publication Date Title
US8090197B2 (en) Image data analysis apparatus, image data analysis method, and program
KR102334575B1 (en) Mura detection device and detection method of mura detection device
Finlayson et al. Hue that is invariant to brightness and gamma.
US6249601B1 (en) Method for determining color of illuminant and apparatus therefor
JP5037311B2 (en) Color reproduction system and method
US7599553B2 (en) Image processing apparatus and method that perform color matching using detected uniformity
CN112446864A (en) Flaw detection method, flaw detection device, flaw detection equipment and storage medium
WO2019210707A1 (en) Image sharpness evaluation method, device and electronic device
JP2001202508A (en) Method and device for converting color image and recording medium
JP7154786B2 (en) Image processing device, image processing method and program
JP3950551B2 (en) Image processing method, apparatus, and recording medium
US8019153B2 (en) Wide luminance range colorimetrically accurate profile generation method
WO2022120799A1 (en) Image processing method and apparatus, electronic device, and storage medium
KR102757063B1 (en) Color stain analyzing method and electronic device using the method
JP3708476B2 (en) Color gamut mapping system and method using composite color space
JP2005130000A (en) Image processing device
JP2014192859A (en) Color correction method, program, and device
CN109119046A (en) The regulating system and adjusting method of gray-scale intensity, memory
CN113554554B (en) Image color filtering method and device, electronic equipment and storage medium
CN114511459A (en) Color image contrast information calculation method and device
CN116645274A (en) Image processing method, device, electronic device, and computer-readable storage medium
JP7106318B2 (en) Image processing device, image processing method and program
US20030086607A1 (en) Image enhancement
JP2010145097A (en) Color unevenness inspection method, and inspection image data generation apparatus
CN113239770B (en) Financial statement accounting method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060719

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080605

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080617

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20081209