JP6614658B2 - Color recognition apparatus, color recognition method, and program - Google Patents

Color recognition apparatus, color recognition method, and program Download PDF

Info

Publication number
JP6614658B2
JP6614658B2 JP2015252481A JP2015252481A JP6614658B2 JP 6614658 B2 JP6614658 B2 JP 6614658B2 JP 2015252481 A JP2015252481 A JP 2015252481A JP 2015252481 A JP2015252481 A JP 2015252481A JP 6614658 B2 JP6614658 B2 JP 6614658B2
Authority
JP
Japan
Prior art keywords
value
array
hue
saturation
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2015252481A
Other languages
Japanese (ja)
Other versions
JP2017118363A (en
Inventor
淳哉 榎
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.)
NEC Solutions Innovators Ltd
Original Assignee
NEC Solutions Innovators 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 NEC Solutions Innovators Ltd filed Critical NEC Solutions Innovators Ltd
Priority to JP2015252481A priority Critical patent/JP6614658B2/en
Publication of JP2017118363A publication Critical patent/JP2017118363A/en
Application granted granted Critical
Publication of JP6614658B2 publication Critical patent/JP6614658B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、特定の色を認識するための色認識装置及び色認識方法に関し、更には、これらを実現するためのプログラムに関する。   The present invention relates to a color recognition apparatus and a color recognition method for recognizing a specific color, and further relates to a program for realizing these.

近年、種々の分野で、画像から、特定の色の部分を抽出することが行われている。例えば、人の手又は顔を検出するために、画像から、領域を抽出することが行われている(例えば、特許文献1参照)。   In recent years, extraction of a specific color portion from an image has been performed in various fields. For example, in order to detect a human hand or face, a region is extracted from an image (see, for example, Patent Document 1).

具体的には、特許文献1は、画面上の肌色の領域を抽出することによって人の手の認識を行う、手形状認識装置を開示している。特許文献1に開示された手形状認識装置は、入力された画像に対して、予め作成された肌色のテンプレート値との相関値を算出し、相関値に基づいて、入力された画像から肌色の領域を抽出する。   Specifically, Patent Document 1 discloses a hand shape recognition device that recognizes a human hand by extracting a skin color region on a screen. The hand shape recognition device disclosed in Patent Document 1 calculates a correlation value with a template value of a skin color created in advance for an input image, and based on the correlation value, determines the skin color of the skin color from the input image. Extract regions.

また、特許文献1に開示された手形状認識装置では、テンプレート値は、RGBデータで与えられており、適宜更新される。テンプレート値の更新は、抽出された肌色領域の平均値と、テンプレート値との平均を求め、求めた値を、最新のテンプレート値とすることによって行われる。このため、特許文献1に開示された手形状認識装置によれば、システムの負担を軽減しつつ、正確に肌色の領域を抽出できると考えられる。   Further, in the hand shape recognition device disclosed in Patent Document 1, the template value is given as RGB data and is updated as appropriate. The template value is updated by obtaining the average of the extracted skin color area average and the template value, and setting the obtained value as the latest template value. For this reason, according to the hand shape recognition device disclosed in Patent Document 1, it is considered that the skin color region can be accurately extracted while reducing the burden on the system.

特開平11−167455号公報JP-A-11-167455

しかしながら、画像の手段となるカメラには、通常、オートホワイトバランス機能が付加されているため、画像中の肌色の領域の明るさは、撮影された環境に応じて大きく変化してしまう。このため、上記特許文献1に開示された手形状認識装置では、テンプレート値が適宜実行されるにもかかわらず、例えば、被写体が日向から日陰に移動するような状況下で検出精度が大きく低下してしまう場合がある。   However, since an auto white balance function is usually added to a camera serving as an image means, the brightness of a skin color region in an image greatly varies depending on the environment where the image is taken. For this reason, in the hand shape recognition device disclosed in Patent Document 1, the detection accuracy is greatly reduced, for example, in a situation where the subject moves from the sun to the shade, although the template value is appropriately executed. May end up.

本発明の目的の一例は、上記問題を解消し、撮影環境に左右されることなく、特定の色を精度良く検出し得る、色認識装置、色認識方法、及びプログラムを提供することにある。   An object of the present invention is to provide a color recognition device, a color recognition method, and a program capable of solving the above-described problem and detecting a specific color with high accuracy without being influenced by a shooting environment.

上記目的を達成するため、本発明の一側面における色認識装置は、対象画像における特定の色の領域を認識するための装置であって、
前記特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、前記キャリブレーション画像の拡張配列を作成する、拡張配列作成部と、
前記キャリブレーション画像の前記拡張配列を、色相、彩度、及び明度によって規定される配列に変換する、配列変換部と、
変換後の前記キャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する、ヒストグラム作成部と、
前記対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度に
よって規定された前記対象画像の配列を作成し、作成した前記対象画像の配列と前記ヒストグラムとを用いて、前記対象画像における前記特定の色の領域を認識する、色認識部と、
を備えていることを特徴とする。
In order to achieve the above object, a color recognition apparatus according to one aspect of the present invention is an apparatus for recognizing a specific color region in a target image,
From the calibration image having the specific color area, the R value, the G value, and the B value are specified for each pixel constituting the area, and each value is multiplied by a plurality of coefficients set in stages. An extended array creating unit for creating an extended array of the calibration images;
An array conversion unit that converts the extended array of the calibration image into an array defined by hue, saturation, and brightness;
A histogram creation unit that creates a two-dimensional histogram from the expanded array of the calibration images after conversion, with one axis as hue and the other axis as saturation;
An array of the target image defined by hue, saturation, and brightness is created from the R value, G value, and B value of each pixel constituting the target image, and the created array of the target image and the histogram And a color recognition unit for recognizing the specific color region in the target image,
It is characterized by having.

また、上記目的を達成するため、本発明の一側面における色認識方法は、対象画像における特定の色の領域を認識するための方法であって、
(a)前記特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、前記キャリブレーション画像の拡張配列を作成する、ステップと、
(b)前記キャリブレーション画像の前記拡張配列を、色相、彩度、及び明度によって規定される配列に変換する、ステップと、
(c)変換後の前記キャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する、ステップと、
(d)前記対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度によって規定された前記対象画像の配列を作成し、作成した前記対象画像の配列と前記ヒストグラムとを用いて、前記対象画像における前記特定の色の領域を認識する、ステップと、
を有することを特徴とする。
In order to achieve the above object, a color recognition method according to one aspect of the present invention is a method for recognizing a specific color region in a target image,
(A) A R value, a G value, and a B value are specified for each pixel constituting the calibration image having the specific color region, and a plurality of coefficients set in stages for each value. Multiplying to create an expanded array of the calibration images; and
(B) converting the expanded array of the calibration images into an array defined by hue, saturation, and brightness;
(C) creating a two-dimensional histogram from the expanded array of the converted calibration images, with one axis as hue and the other axis as saturation;
(D) An array of the target image defined by hue, saturation, and brightness is created from the R value, G value, and B value of each pixel constituting the target image, and the created target image array Recognizing a region of the specific color in the target image using the histogram and the histogram; and
It is characterized by having.

更に、上記目的を達成するため、本発明の一側面におけるプログラムは、コンピュータによって、対象画像における特定の色の領域を認識するためのプログラムであって、
前記コンピュータに、
(a)前記特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、前記キャリブレーション画像の拡張配列を作成する、ステップと、
(b)前記キャリブレーション画像の前記拡張配列を、色相、彩度、及び明度によって規定される配列に変換する、ステップと、
(c)変換後の前記キャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する、ステップと、
(d)前記対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度によって規定された前記対象画像の配列を作成し、作成した前記対象画像の配列と前記ヒストグラムとを用いて、前記対象画像における前記特定の色の領域を認識する、ステップと、
を実行させることを特徴とする。
Furthermore, in order to achieve the above object, a program according to one aspect of the present invention is a program for recognizing a specific color region in a target image by a computer,
In the computer,
(A) R value, G value, and B value are specified for each pixel constituting the calibration image having the specific color area, and a plurality of coefficients set stepwise for each value Multiplying to create an expanded array of the calibration images; and
(B) converting the expanded array of the calibration images into an array defined by hue, saturation, and brightness;
(C) creating a two-dimensional histogram from the expanded array of the converted calibration images, with one axis as hue and the other axis as saturation;
(D) An array of the target image defined by hue, saturation, and brightness is created from the R value, G value, and B value of each pixel constituting the target image, and the created target image array Recognizing a region of the specific color in the target image using the histogram and the histogram; and
Is executed.

以上のように、本発明によれば、撮影環境に左右されることなく、特定の色を精度良く検出することができる。   As described above, according to the present invention, it is possible to accurately detect a specific color without being influenced by the shooting environment.

図1は、本発明の実施の形態における色認識装置の概略構成を示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of a color recognition apparatus according to an embodiment of the present invention. 図2は、本発明の実施の形態における色認識装置の具体的構成を示すブロック図である。FIG. 2 is a block diagram showing a specific configuration of the color recognition apparatus according to the embodiment of the present invention. 図3は、本発明の実施の形態で用いられるキャリブレーション画像の一例を示す図である。FIG. 3 is a diagram showing an example of a calibration image used in the embodiment of the present invention. 図4は、本発明の実施の形態で作成される拡張配列の一例を示す図である。FIG. 4 is a diagram showing an example of the extended array created in the embodiment of the present invention. 図5は、本発明の実施の形態で用いられるルックアップテーブルの一例を示す図である。FIG. 5 is a diagram showing an example of a lookup table used in the embodiment of the present invention. 図6は、本発明の実施の形態における色認識装置のキャリブレーション処理時の動作を示すフロー図である。FIG. 6 is a flowchart showing an operation during the calibration process of the color recognition apparatus according to the embodiment of the present invention. 図7は、本発明の実施の形態における色認識装置の認識処理時の動作を示すフロー図である。FIG. 7 is a flowchart showing the operation during the recognition processing of the color recognition apparatus in the embodiment of the present invention. 図8は、本発明の実施の形態における色認識装置を実現するコンピュータの一例を示すブロック図である。FIG. 8 is a block diagram illustrating an example of a computer that implements the color recognition apparatus according to the embodiment of the present invention.

(実施の形態)
以下、本発明の実施の形態における、色認識装置、色認識方法、及びプログラムについて、図1〜図8を参照しながら説明する。
(Embodiment)
Hereinafter, a color recognition device, a color recognition method, and a program according to an embodiment of the present invention will be described with reference to FIGS.

[装置構成]
最初に、本発明の実施の形態における色認識装置の構成について図1を用いて説明する。図1は、本発明の実施の形態における色認識装置の概略構成を示すブロック図である。
[Device configuration]
First, the configuration of the color recognition apparatus according to the embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing a schematic configuration of a color recognition apparatus according to an embodiment of the present invention.

図1に示す本実施の形態における色認識装置100は、対象画像における特定の色の領域を認識するための装置である。図1に示すように、色認識装置は、拡張配列作成部10と、配列変換部20と、ヒストグラム作成部30と、色認識部40とを備えている。   A color recognition apparatus 100 according to the present embodiment shown in FIG. 1 is an apparatus for recognizing a specific color area in a target image. As shown in FIG. 1, the color recognition apparatus includes an extended array creation unit 10, an array conversion unit 20, a histogram creation unit 30, and a color recognition unit 40.

拡張配列作成部10は、特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、キャリブレーション画像の拡張配列を作成する。   The extended array creation unit 10 identifies the R value, the G value, and the B value for each pixel constituting the calibration image having a specific color area, and is set stepwise for each value. Multiply multiple coefficients to create an expanded array of calibration images.

配列変換部20は、拡張配列作成部10によって作成されたキャリブレーション画像の拡張配列を、色相、彩度、及び明度によって規定される配列に変換する。ヒストグラム作成部30は、変換後のキャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する。   The array conversion unit 20 converts the extended array of calibration images created by the extended array creation unit 10 into an array defined by hue, saturation, and brightness. The histogram creation unit 30 creates a two-dimensional histogram from the expanded array of converted calibration images with one axis as hue and the other axis as saturation.

色認識部40は、まず、対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度によって規定された対象画像の配列を作成する。続いて、色認識部40は、作成した対象画像の配列と、ヒストグラム作成部30によって作成されたヒストグラムとを用いて、対象画像における特定の色の領域を認識する。   First, the color recognition unit 40 creates an array of target images defined by hue, saturation, and brightness from the R value, G value, and B value of each pixel constituting the target image. Subsequently, the color recognizing unit 40 recognizes a specific color region in the target image by using the created array of target images and the histogram created by the histogram creating unit 30.

このように、本実施の形態では、まず、ヒストグラムは、キャリブレーション画像から作成されているので、そのビンは特定の色を強調したものとなっている。また、ヒストグラムの作成に際して、キャリブレーション画像のRGB値が拡張され、その上で色空間の変換が行なわれるので、ヒストグラムは、特定の色の環境による変化に対応したものとなる。このため、本実施の形態によれば、撮影環境に左右されることなく、特定の色を精度良く認識することが可能となる。   As described above, in this embodiment, first, since the histogram is created from the calibration image, the bin emphasizes a specific color. Further, when the histogram is created, the RGB values of the calibration image are expanded and the color space is converted thereon, so that the histogram corresponds to a change due to a specific color environment. For this reason, according to the present embodiment, it is possible to accurately recognize a specific color without being influenced by the shooting environment.

続いて、図2を用いて、本発明の実施の形態における色認識装置の構成を更に具体的に説明する。図2は、本発明の実施の形態における色認識装置の具体的構成を示すブロック図である。また、以降では、認識対象となる特定の色が肌色である場合を例に挙げて説明する。   Next, the configuration of the color recognition apparatus in the embodiment of the present invention will be described more specifically with reference to FIG. FIG. 2 is a block diagram showing a specific configuration of the color recognition apparatus according to the embodiment of the present invention. Further, hereinafter, a case where the specific color to be recognized is a skin color will be described as an example.

図2に示すように、本実施の形態における色認識装置100は、上述した、拡張配列作成部10、配列変換部20、ヒストグラム作成部30、及び色認識部40に加えて、キャリブレーション処理部50と、記憶部60と、画像取得部70とを備えている。   As shown in FIG. 2, the color recognition apparatus 100 according to the present embodiment includes a calibration processing unit in addition to the above-described extended array creation unit 10, array conversion unit 20, histogram creation unit 30, and color recognition unit 40. 50, a storage unit 60, and an image acquisition unit 70.

このうち、画像取得部70は、外部から、対象画像の画像データ(以下「対象画像データ」と表記する。)、及びキャリブレーション画像の元となる画像データが入力されてくると、これらを取得する。また、画像取得部70は、対象画像データを取得した場合は、これを色認識部40に入力する。   Among these, the image acquisition unit 70 receives the image data of the target image (hereinafter referred to as “target image data”) and the image data that is the basis of the calibration image from the outside. To do. Further, when the target image data is acquired, the image acquisition unit 70 inputs the target image data to the color recognition unit 40.

更に、画像取得部70は、キャリブレーション画像の元となる画像データが入力されてくると、画像データから、キャリブレーション画像となる部分の画像データのみを抽出する。そして、画像取得部70は、取り出した画像データ(以下「キャリブレーション用画像データ」と表記する。)を、拡張配列作成部10に入力する。   Furthermore, when the image data that is the basis of the calibration image is input, the image acquisition unit 70 extracts only the image data of the portion that becomes the calibration image from the image data. Then, the image acquisition unit 70 inputs the extracted image data (hereinafter referred to as “calibration image data”) to the extended array creation unit 10.

また、本実施の形態では、例えば、図3に示すように、画像取得部70は、キャリブレーション画像の元となる画像データが入力されてくると、この画像データによって特定される画像71を、表示装置(図2において図示せず)の画面に表示することもできる。この場合、図3に示すように、画像取得部70は、更に、キャリブレーション画像72となる部分の指定を受け付け、指定された部分(キャリブレーション画像72)の画像データを抽出し、これをキャリブレーション画像データとして拡張配列作成部10に入力する。   In the present embodiment, for example, as shown in FIG. 3, when image data that is the basis of a calibration image is input, the image acquisition unit 70 displays an image 71 specified by the image data. It can also be displayed on the screen of a display device (not shown in FIG. 2). In this case, as shown in FIG. 3, the image acquisition unit 70 further receives designation of a part to be the calibration image 72, extracts image data of the designated part (calibration image 72), and calibrates this. The image data is input to the extended array creation unit 10 as image data.

図3は、本発明の実施の形態で用いられるキャリブレーション画像の一例を示す図である。図3の例では、特定の色が肌色であるため、画像71としては、人の手が被写体となった画像が用いられている。また、キャリブレーション画像72としては、手のひらの一部分の画像が用いられている。   FIG. 3 is a diagram showing an example of a calibration image used in the embodiment of the present invention. In the example of FIG. 3, since the specific color is a skin color, the image 71 is an image in which a human hand is the subject. Further, as the calibration image 72, an image of a part of the palm is used.

また、拡張配列作成部10は、キャリブレーション画像データが入力されると、キャリブレーション画像データから画素毎に、R値、G値、及びB値を特定し、特定した各値に、段階的に設定された係数を乗算する。具体的には、本実施の形態では、図4に示すように、拡張配列作成部10は、R値、G値、B値のそれぞれに、0.7〜1.3の範囲内にある係数を0.05刻みで乗算して、拡張配列を作成する。   Further, when the calibration image data is input, the extended array creation unit 10 specifies the R value, the G value, and the B value for each pixel from the calibration image data, and gradually increases the specified value to each specified value. Multiply the set coefficient. Specifically, in the present embodiment, as shown in FIG. 4, the extended array creation unit 10 uses coefficients that are in the range of 0.7 to 1.3 for each of the R value, the G value, and the B value. Is multiplied by 0.05 to create an expanded array.

図4は、本発明の実施の形態で作成される拡張配列の一例を示す図である。図4の例では、1画素分の拡張配列のみを示している。例えば、キャリブレーション画像の画素数が50×50であるとすると、拡張配列の大きさは、50×50×3×13となる。また、上述の係数は、肌色を認識する場合の一例であるが、係数間の間隔、係数の数は、色認識装置100の性能に応じて適宜設定される。   FIG. 4 is a diagram showing an example of the extended array created in the embodiment of the present invention. In the example of FIG. 4, only the extended array for one pixel is shown. For example, if the number of pixels of the calibration image is 50 × 50, the size of the expanded array is 50 × 50 × 3 × 13. Moreover, although the above-mentioned coefficient is an example when skin color is recognized, the interval between coefficients and the number of coefficients are appropriately set according to the performance of the color recognition apparatus 100.

更に、本実施の形態では、乗算される係数は、認識対象となる色に応じて設定される。例えば、各係数の設定は、波長成分の組成に応じて、特定の値に乗算する係数のみとしたり、特定の値に乗算する係数の値を大きくしたりすることによって、行なわれる。具体的には、赤の波長成分が多い色が認識対象となる場合であれば、R値に乗算される係数の値が大きくなるように、又はR値に乗算される係数のみとなるように、各係数の設定が行なわれる。   Furthermore, in the present embodiment, the coefficient to be multiplied is set according to the color to be recognized. For example, each coefficient is set by setting only a coefficient to be multiplied by a specific value or increasing the value of the coefficient to be multiplied by the specific value according to the composition of the wavelength component. Specifically, if a color with many red wavelength components is to be recognized, the coefficient value multiplied by the R value is increased, or only the coefficient multiplied by the R value is provided. Each coefficient is set.

配列変換部20は、本実施の形態では、一般的なRGB空間からHSV空間への変換処理を用いることで、拡張配列を、色相、彩度、及び明度によって規定される配列に変換することができる。   In the present embodiment, the array conversion unit 20 can convert an extended array into an array defined by hue, saturation, and brightness by using a conversion process from a general RGB space to an HSV space. it can.

また、ヒストグラム作成部30は、本実施の形態では、変換後の配列から、明度の成分を除去し、残った成分を用いて、2次元のヒストグラムを作成する。更に、このとき、ヒストグラム作成部30は、ノイズの除去のため、作成したヒストグラムから、色相の値が閾値以下又は閾値未満となるビンを除去することができる。具体的には、ヒストグラム作成部30は、色相の値が閾値以下又は閾値未満となるビンを特定し、特定したビンの色相
の値をゼロに設定する。
In the present embodiment, the histogram creation unit 30 removes the lightness component from the array after conversion, and creates a two-dimensional histogram using the remaining components. Further, at this time, the histogram creation unit 30 can remove bins whose hue values are equal to or less than the threshold or less than the threshold from the created histogram in order to remove noise. Specifically, the histogram creation unit 30 identifies bins where the hue value is less than or less than the threshold value, and sets the hue value of the identified bin to zero.

キャリブレーション処理部50は、ヒストグラムを用いて共分散行列を求め、求めた共分散行列を用いて、キャリブレーション画像における、色相の値と彩度の値との組合せ毎のマハラノビス距離を算出する。   The calibration processing unit 50 obtains a covariance matrix using the histogram, and calculates a Mahalanobis distance for each combination of the hue value and the saturation value in the calibration image using the obtained covariance matrix.

具体的には、ヒストグラムの各ビンにおける色相の値をH、彩度の値をSとするとき、H、Sで示されるHS平面上の座標(極座標系)を直交座標系に変換した値を入力ベクトルx、入力ベクトルの数をn、入力ベクトルの平均ベクトルをμとすると、キャリブレーション処理部50は、下記の数1を用いて、共分散行列Σを求め、更に、求めた共分散行列Σを下記数2に適用することで、HとSとの組合せ(H,S)毎のマハラノビス距離Dを算出することができる。なお、i及びjは、ぞれぞれ、0から255の任意の整数である。 Specifically, when the hue value in each bin of the histogram is H i and the saturation value is S j , the coordinates (polar coordinate system) on the HS plane indicated by H i and S j are orthogonal coordinates. When the converted value is an input vector x k , the number of input vectors is n, and the average vector of the input vectors is μ, the calibration processing unit 50 obtains a covariance matrix Σ using the following formula 1, and the covariance matrix Σ obtained by applying the following equation 2, H i and S combination of j (H i, S j) can be calculated Mahalanobis distance D for each. Note that i and j are arbitrary integers from 0 to 255, respectively.

Figure 0006614658
Figure 0006614658

Figure 0006614658
Figure 0006614658

また、キャリブレーション処理部50は、算出した各マハラノビス距離を、色相及び彩度によって規定される2次元配列(以下「ルックアップテーブル」と表記する。)に格納する。本実施の形態では、マハラノビス距離が格納されたルックアップテーブルは、テーブル格納部60に記憶される。図5は、本発明の実施の形態で用いられるルックアップテーブルの一例を示す図である。   The calibration processing unit 50 stores the calculated Mahalanobis distances in a two-dimensional array (hereinafter referred to as “look-up table”) defined by hue and saturation. In the present embodiment, the lookup table in which the Mahalanobis distance is stored is stored in the table storage unit 60. FIG. 5 is a diagram showing an example of a lookup table used in the embodiment of the present invention.

色認識部40は、本実施の形態では、上述した配列変換部20と同様に、RGB空間からHSV空間への変換処理を用いて、対象画像の配列を作成する。また、色認識部40は、本実施の形態では、作成した対象画像の配列を、上述のルックアップテーブルに照合して、対象画像を構成する画素毎のマハラノビス距離を特定する。続いて、色認識部40は、特定したマハラノビス距離に基づいて、対象画像における特定の色の領域を認識する。   In the present embodiment, the color recognition unit 40 creates an array of target images using a conversion process from the RGB space to the HSV space in the same manner as the array conversion unit 20 described above. In this embodiment, the color recognition unit 40 collates the created array of target images with the above-described lookup table, and specifies the Mahalanobis distance for each pixel constituting the target image. Subsequently, the color recognition unit 40 recognizes a specific color region in the target image based on the specified Mahalanobis distance.

具体的には、色認識部40は、対象画像の画素毎に、対象画像の配列から、色相の値Hと彩度の値Sとを特定し、更に、特定した値(H,S)をルックアップテーブルに照合し、特定した値(H,S)が対応しているマハラノビス距離を特定する。続いて、色認識部40は、画素毎に、特定したマハラノビス距離と設定された閾値とを対比して、マハラノビス距離が閾値以下となる画素を特定し、特定した画素で構成される領域を特定の色の領域と判断する。   Specifically, the color recognition unit 40 specifies the hue value H and the saturation value S from the array of the target image for each pixel of the target image, and further specifies the specified value (H, S). The Mahalanobis distance corresponding to the specified value (H, S) is specified by collating with the lookup table. Subsequently, for each pixel, the color recognition unit 40 compares the specified Mahalanobis distance with a set threshold value, specifies a pixel whose Mahalanobis distance is equal to or less than the threshold value, and specifies an area composed of the specified pixels. It is determined that the color area.

[装置動作]
次に、本発明の実施の形態における色認識装置100の動作について図6及び図7を用いて説明する。また、以下の説明においては、適宜図1〜図5を参酌する。また、本実施の形態では、色認識装置100を動作させることによって、色認識方法が実施される。よって、本実施の形態における色認識方法の説明は、以下の色認識装置100の動作説明に代える。
[Device operation]
Next, the operation of the color recognition apparatus 100 according to the embodiment of the present invention will be described with reference to FIGS. In the following description, FIGS. 1 to 5 are referred to as appropriate. In the present embodiment, the color recognition method is implemented by operating the color recognition apparatus 100. Therefore, the description of the color recognition method in the present embodiment is replaced with the following description of the operation of the color recognition apparatus 100.

まず、図6を用いて、色認識装置100がキャリブレーション処理を実行する際の動作について説明する。図6は、本発明の実施の形態における色認識装置のキャリブレーション処理時の動作を示すフロー図である。   First, the operation when the color recognition apparatus 100 executes the calibration process will be described with reference to FIG. FIG. 6 is a flowchart showing an operation during the calibration process of the color recognition apparatus according to the embodiment of the present invention.

図6に示すように、最初に、画像取得部70は、キャリブレーション画像の元となる画像データを取得する(ステップA1)。具体的には、本実施の形態では、外部の装置(図示せず)から、人の手の画像データ、又は顔の画像データが送信されてくると、画像取得部70は、送信されてきた画像データを取得する。   As shown in FIG. 6, first, the image acquisition unit 70 acquires image data that is the basis of a calibration image (step A1). Specifically, in the present embodiment, when image data of a human hand or face image data is transmitted from an external device (not shown), the image acquisition unit 70 is transmitted. Get image data.

次に、画像取得部70は、ステップA1で取得した画像データから、キャリブレーション画像となる部分の画像データを抽出する(ステップA2)。具体的には、図3に示すように、画像取得部70は、ステップA1で取得した画像データによって特定される画像71を、表示装置の画面に表示し、キャリブレーション画像72となる部分の指定を受け付け、指定が行なわれると、指定された部分の画像データを抽出する。   Next, the image acquisition unit 70 extracts image data of a portion to be a calibration image from the image data acquired in step A1 (step A2). Specifically, as shown in FIG. 3, the image acquisition unit 70 displays an image 71 specified by the image data acquired in step A <b> 1 on the screen of the display device, and specifies a portion to be the calibration image 72. When the designation is performed, the image data of the designated portion is extracted.

次に、拡張配列作成部10は、ステップA2で抽出した画像データの各画素のR値、G値、B値を取得する(ステップA3)。続いて、拡張配列作成部10は、各画素のR値、G値、B値のそれぞれに、段階的に設定された係数を乗算して、拡張配列を作成する(ステップA4)。   Next, the extended array creation unit 10 acquires the R value, G value, and B value of each pixel of the image data extracted in step A2 (step A3). Subsequently, the expanded array creating unit 10 creates an expanded array by multiplying each of the R value, G value, and B value of each pixel by a coefficient set in stages (step A4).

次に、配列変換部20は、拡張配列の色空間を、RGB空間からHSV空間へと変換し、色素、彩度、及び明度で規定される配列を作成する(ステップA5)。   Next, the array conversion unit 20 converts the color space of the extended array from the RGB space to the HSV space, and creates an array defined by the pigment, saturation, and lightness (step A5).

次に、ヒストグラム作成部30は、色空間が変換された配列から、明度の成分を除去して、色相及び彩度による2次元のヒストグラムを算出する(ステップA6)。また、ステップA6では、ヒストグラム作成部30は、ノイズを除去するために、色相の値が閾値以下又は閾値未満となるビンを特定し、特定したビンの色相の値をゼロに設定する。   Next, the histogram creating unit 30 removes the lightness component from the array in which the color space is converted, and calculates a two-dimensional histogram based on hue and saturation (step A6). In Step A6, in order to remove noise, the histogram creation unit 30 identifies a bin whose hue value is less than or less than a threshold value, and sets the hue value of the identified bin to zero.

次に、キャリブレーション処理部50は、ステップA6で作成されたヒストグラムを用いて、共分散行列を求める(ステップA7)。ステップA7により、肌色に相当する色空間が特定されることになる。   Next, the calibration processing unit 50 obtains a covariance matrix using the histogram created in step A6 (step A7). In step A7, a color space corresponding to the skin color is specified.

その後、キャリブレーション処理部50は、色相の値と彩度の値との組合せ毎に、マハラノビス距離を算出し、得られた各マハラノビス距離を、ルックアップテーブルに格納する(ステップA8)。ステップA8の実行により、ルックアップテーブルが完成するので、キャリブレーション処理は終了する。   Thereafter, the calibration processing unit 50 calculates the Mahalanobis distance for each combination of the hue value and the saturation value, and stores the obtained Mahalanobis distance in the lookup table (step A8). Since the look-up table is completed by executing step A8, the calibration process ends.

続いて、図7を用いて、色認識装置100が認識処理を実行する際の動作について説明する。図7は、本発明の実施の形態における色認識装置の認識処理時の動作を示すフロー図である。   Next, an operation when the color recognition apparatus 100 executes the recognition process will be described with reference to FIG. FIG. 7 is a flowchart showing the operation during the recognition processing of the color recognition apparatus in the embodiment of the present invention.

図7に示すように、最初に、画像取得部70は、認識対象となる画像の画像データ(対象画像データ)を取得する(ステップB1)。具体的には、本実施の形態では、外部の装置(図示せず)から、対象画像データが送信されてくると、画像取得部70は、送信されてきた画像データを取得する。   As shown in FIG. 7, first, the image acquisition unit 70 acquires image data (target image data) of an image to be recognized (step B1). Specifically, in the present embodiment, when target image data is transmitted from an external device (not shown), the image acquisition unit 70 acquires the transmitted image data.

次に、色認識部40は、ステップB1で取得した画像データの各画素のR値、G値、B値を取得する(ステップB2)。続いて、色認識部40は、取得したR値、G値、B値を元に、RGB空間からHSV空間への変換処理を行なって、色相、彩度、及び明度によっ
て規定された、対象画像の配列を作成する。(ステップB3)。
Next, the color recognition unit 40 acquires the R value, the G value, and the B value of each pixel of the image data acquired in step B1 (step B2). Subsequently, the color recognition unit 40 performs a conversion process from the RGB space to the HSV space based on the acquired R value, G value, and B value, and the target image defined by the hue, saturation, and brightness. Create an array of (Step B3).

次に、色認識部40は、ステップB3で得られた配列から、対象画像の画素毎に、色相の値Hと彩度の値Sとを特定する。続いて、色認識部40は、特定した値(H,S)を、ステップA8で得られたルックアップテーブルに照合し、特定した値(H,S)が対応しているマハラノビス距離を特定する(ステップB4)。   Next, the color recognizing unit 40 specifies a hue value H and a saturation value S for each pixel of the target image from the array obtained in step B3. Subsequently, the color recognition unit 40 collates the specified value (H, S) with the lookup table obtained in step A8, and specifies the Mahalanobis distance corresponding to the specified value (H, S). (Step B4).

次に、色認識部40、画素毎に、ステップB4で特定したマハラノビス距離と設定された閾値とを対比して、マハラノビス距離が閾値以下となる画素を特定し、特定した画素で構成される領域を特定の色の領域と判断する(ステップB5)。   Next, the color recognition unit 40, for each pixel, compares the Mahalanobis distance specified in step B4 with the set threshold value, specifies a pixel whose Mahalanobis distance is equal to or less than the threshold value, and includes the specified pixels. Is determined to be a specific color area (step B5).

以上のように本実施の形態では、キャリブレーション画像のRGB空間が拡張され、拡張されたRGB空間から、特定の色の認識に必要なヒストグラムが生成されているので、撮影環境に左右されることなく、特定の色を精度良く認識することが可能となる。   As described above, in the present embodiment, the RGB space of the calibration image is expanded, and a histogram necessary for recognition of a specific color is generated from the expanded RGB space. Therefore, it becomes possible to recognize a specific color with high accuracy.

また、本実施の形態では、予め、色相及び彩度の組毎のマハラノビス距離がルックアップテーブルに登録されており、認識時には、各画素の色相及び彩度を求めるだけで、画素毎のマハラノビス距離が特定され、直ぐに各画素が特定の色かどうかを判断できる。このため、特定の色の認識処理における負荷の軽減も可能となる。   In the present embodiment, the Mahalanobis distance for each set of hue and saturation is registered in the lookup table in advance, and at the time of recognition, the Mahalanobis distance for each pixel is obtained simply by obtaining the hue and saturation of each pixel. Is immediately determined, and it can be immediately determined whether each pixel has a specific color. For this reason, it is possible to reduce the load in the recognition process of a specific color.

なお、本実施の形態では、キャリブレーション処理は、ステップA1〜A6までで終了していても良い。この場合は、認識処理において、ステップB3の実行後に、ステップA7及びA8が実行され、その後に、ステップB4及びB5が実行される。   In the present embodiment, the calibration process may be completed in steps A1 to A6. In this case, in the recognition process, after execution of step B3, steps A7 and A8 are executed, and thereafter steps B4 and B5 are executed.

[プログラム]
本発明の実施の形態におけるプログラムは、コンピュータに、図6に示すステップA1〜A8、図7に示すステップB1〜B5を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態における色認識装置と色認識方法とを実現することができる。この場合、コンピュータのCPU(Central Processing Unit)は、拡張配列作成部10、配列変換部20、ヒストグラム作成部30、色認識部40、キャリブレーション処理部50及び画像取得部70として機能し、処理を行なう。
[program]
The program in the embodiment of the present invention may be a program that causes a computer to execute steps A1 to A8 shown in FIG. 6 and steps B1 to B5 shown in FIG. By installing and executing this program on a computer, the color recognition apparatus and the color recognition method in the present embodiment can be realized. In this case, a central processing unit (CPU) of the computer functions as an extended array creation unit 10, an array conversion unit 20, a histogram creation unit 30, a color recognition unit 40, a calibration processing unit 50, and an image acquisition unit 70, and performs processing. Do.

なお、本実施の形態におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、拡張配列作成部10、配列変換部20、ヒストグラム作成部30、色認識部40、キャリブレーション処理部50及び画像取得部70として機能しても良い。また、記憶部60は、本実施の形態におけるプログラムを実行するコンピュータとは別のコンピュータ上に構築されていても良い。   Note that the program in the present embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as the extended array creation unit 10, the array conversion unit 20, the histogram creation unit 30, the color recognition unit 40, the calibration processing unit 50, and the image acquisition unit 70, respectively. The storage unit 60 may be constructed on a computer different from the computer that executes the program in the present embodiment.

ここで、本実施の形態におけるプログラムを実行することによって、色認識装置100を実現するコンピュータについて図8を用いて説明する。図8は、本発明の実施の形態における色認識装置を実現するコンピュータの一例を示すブロック図である。   Here, a computer that realizes the color recognition apparatus 100 by executing the program according to the present embodiment will be described with reference to FIG. FIG. 8 is a block diagram illustrating an example of a computer that implements the color recognition apparatus according to the embodiment of the present invention.

図8に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。   As shown in FIG. 8, the computer 110 includes a CPU 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These units are connected to each other via a bus 121 so that data communication is possible.

CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コ
ード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。
The CPU 111 performs various calculations by developing the program (code) in the present embodiment stored in the storage device 113 in the main memory 112 and executing them in a predetermined order. The main memory 112 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory). Further, the program in the present embodiment is provided in a state of being stored in a computer-readable recording medium 120. Note that the program in the present embodiment may be distributed on the Internet connected via the communication interface 117.

また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。   Specific examples of the storage device 113 include a hard disk drive and a semiconductor storage device such as a flash memory. The input interface 114 mediates data transmission between the CPU 111 and an input device 118 such as a keyboard and a mouse. The display controller 115 is connected to the display device 119 and controls display on the display device 119.

データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。   The data reader / writer 116 mediates data transmission between the CPU 111 and the recording medium 120, and reads a program from the recording medium 120 and writes a processing result in the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and another computer.

また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記憶媒体、又はCD−ROM(Compact Disk Read Only Memory)などの光学記憶媒体が挙げられる。   Specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark)) and SD (Secure Digital), magnetic storage media such as a flexible disk, or CD- An optical storage medium such as ROM (Compact Disk Read Only Memory) can be used.

以上のように、本発明によれば、撮影環境に左右されることなく、特定の色、例えば、肌色を精度良く検出することができる。本発明は、特定の色を認識することが必要なシステム、例えば、手認識による入力が行なわれるシステム、人の顔を認識するシステム等に有用である。   As described above, according to the present invention, it is possible to accurately detect a specific color, for example, a skin color, regardless of the shooting environment. The present invention is useful for a system that needs to recognize a specific color, for example, a system that performs input by hand recognition, a system that recognizes a human face, and the like.

10 拡張配列作成部
20 配列変換部
30 ヒストグラム作成部
40 色認識部
50 キャリブレーション処理部
60 記憶部
70 画像取得部
100 色認識装置
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
DESCRIPTION OF SYMBOLS 10 Extended arrangement | sequence creation part 20 Array conversion part 30 Histogram creation part 40 Color recognition part 50 Calibration process part 60 Memory | storage part 70 Image acquisition part 100 Color recognition apparatus 110 Computer 111 CPU
112 Main Memory 113 Storage Device 114 Input Interface 115 Display Controller 116 Data Reader / Writer 117 Communication Interface 118 Input Device 119 Display Device 120 Recording Medium 121 Bus

Claims (12)

対象画像における特定の色の領域を認識するための装置であって、
前記特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、前記キャリブレーション画像の拡張配列を作成する、拡張配列作成部と、
前記キャリブレーション画像の前記拡張配列を、色相、彩度、及び明度によって規定される配列に変換する、配列変換部と、
変換後の前記キャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する、ヒストグラム作成部と、
前記対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度によって規定された前記対象画像の配列を作成し、作成した前記配列から、前記画素毎に、色相の値と彩度の値とを特定し、前記画素毎に特定した前記色相の値及び前記彩度の値と前記2次元のヒストグラムとを用いて、前記対象画像における前記特定の色の領域を認識する、色認識部と、
を備えていることを特徴とする色認識装置。
A device for recognizing a specific color area in a target image,
From the calibration image having the specific color area, the R value, the G value, and the B value are specified for each pixel constituting the area, and each value is multiplied by a plurality of coefficients set in stages. An extended array creating unit for creating an extended array of the calibration images;
An array conversion unit that converts the extended array of the calibration image into an array defined by hue, saturation, and brightness;
A histogram creation unit that creates a two-dimensional histogram from the expanded array of the calibration images after conversion, with one axis as hue and the other axis as saturation;
An array of the target image defined by hue, saturation, and brightness is created from the R value, G value, and B value of each pixel that constitutes the target image, and from the created array, for each pixel Identifying a hue value and a saturation value, and using the hue value and the saturation value specified for each pixel and the two-dimensional histogram, the specific color of the target image A color recognition unit that recognizes an area;
A color recognition apparatus comprising:
前記2次元のヒストグラムを用いて共分散行列を求め、求めた前記共分散行列を用いて、前記キャリブレーション画像における、色相の値と彩度の値との組合せ毎のマハラノビス距離を算出し、算出した各マハラノビス距離を、色相及び彩度によって規定される2次元配列に格納する、キャリブレーション処理部を更に備え、
前記色認識部が、前記画素毎に特定した前記色相の値及び前記彩度の値を、前記2次元配列に照合して、前記対象画像を構成する画素毎のマハラノビス距離を特定し、特定したマハラノビス距離に基づいて、前記対象画像における前記特定の色の領域を認識する、
請求項1に記載の色認識装置。
A covariance matrix is obtained using the two-dimensional histogram, and a Mahalanobis distance for each combination of a hue value and a saturation value in the calibration image is calculated using the obtained covariance matrix. A calibration processing unit for storing each Mahalanobis distance in a two-dimensional array defined by hue and saturation;
The color recognition unit collates the hue value and the saturation value specified for each pixel with the two-dimensional array, specifies the Mahalanobis distance for each pixel constituting the target image, and specifies Recognizing the specific color region in the target image based on Mahalanobis distance;
The color recognition apparatus according to claim 1.
前記ヒストグラム作成部が、前記2次元のヒストグラムから、色相の値が閾値以下又は閾値未満となるビンを除去し、
前記キャリブレーション処理部が、前記ビンが除去された前記2次元のヒストグラムを用いて共分散行列を求める、
請求項2に記載の色認識装置。
The histogram creation unit removes bins whose hue values are less than or less than a threshold value from the two-dimensional histogram,
The calibration processing unit obtains a covariance matrix using the two-dimensional histogram from which the bins have been removed;
The color recognition apparatus according to claim 2.
前記複数の係数が、前記特定の色に応じて設定される、請求項1〜3のいずれかに記載の色認識装置。   The color recognition device according to claim 1, wherein the plurality of coefficients are set according to the specific color. 対象画像における特定の色の領域を認識するための方法であって、
(a)前記特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、前記キャリブレーション画像の拡張配列を作成する、ステップと、
(b)前記キャリブレーション画像の前記拡張配列を、色相、彩度、及び明度によって規定される配列に変換する、ステップと、
(c)変換後の前記キャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する、ステップと、
(d)前記対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度によって規定された前記対象画像の配列を作成し、作成した前記配列から、前記画素毎に、色相の値と彩度の値とを特定し、前記画素毎に特定した前記色相の値及び前記彩度の値と前記2次元のヒストグラムとを用いて、前記対象画像における前記特定の色の領域を認識する、ステップと、
を有することを特徴とする色認識方法。
A method for recognizing a specific color area in a target image,
(A) A R value, a G value, and a B value are specified for each pixel constituting the calibration image having the specific color region, and a plurality of coefficients set in stages for each value. Multiplying to create an expanded array of the calibration images; and
(B) converting the expanded array of the calibration images into an array defined by hue, saturation, and brightness;
(C) creating a two-dimensional histogram from the expanded array of the converted calibration images, with one axis as hue and the other axis as saturation;
(D) creating an array of the target image defined by hue, saturation, and brightness from the R value, G value, and B value of each pixel constituting the target image, and from the created array, For each pixel, specify a hue value and a saturation value, and use the hue value and the saturation value specified for each pixel and the two-dimensional histogram to specify the specification in the target image. Recognizing the color region of the step,
A color recognition method characterized by comprising:
(e)前記2次元のヒストグラムを用いて共分散行列を求め、求めた前記共分散行列を用いて、前記キャリブレーション画像における、色相の値と彩度の値との組合せ毎のマハラノビス距離を算出し、算出した各マハラノビス距離を、色相及び彩度によって規定される2次元配列に格納する、ステップを更に有し、
前記(d)のステップにおいて、前記画素毎に特定した前記色相の値及び前記彩度の値を、前記(e)のステップで得られた前記2次元配列に照合して、前記対象画像を構成する画素毎のマハラノビス距離を特定し、特定したマハラノビス距離に基づいて、前記対象画像における前記特定の色の領域を認識する、
請求項5に記載の色認識方法。
(E) A covariance matrix is obtained using the two-dimensional histogram, and a Mahalanobis distance for each combination of hue value and saturation value in the calibration image is calculated using the obtained covariance matrix. And storing each calculated Mahalanobis distance in a two-dimensional array defined by hue and saturation,
In the step (d), the hue value and the saturation value specified for each pixel are collated with the two-dimensional array obtained in the step (e) to construct the target image. Identifying the Mahalanobis distance for each pixel to be recognized, and recognizing the specific color region in the target image based on the identified Mahalanobis distance;
The color recognition method according to claim 5.
前記(c)のステップにおいて、前記2次元のヒストグラムから、色相の値が閾値以下又は閾値未満となるビンを除去し、
前記(e)のステップにおいて、前記ビンが除去された前記2次元のヒストグラムを用いて共分散行列を求める、
請求項6に記載の色認識方法。
In the step (c), bins whose hue values are less than or less than a threshold value are removed from the two-dimensional histogram,
In the step (e), a covariance matrix is obtained using the two-dimensional histogram from which the bin has been removed.
The color recognition method according to claim 6.
前記複数の係数が、前記特定の色に応じて設定される、請求項5〜7のいずれかに記載の色認識方法。   The color recognition method according to claim 5, wherein the plurality of coefficients are set according to the specific color. コンピュータによって、対象画像における特定の色の領域を認識するためのプログラムであって、
前記コンピュータに、
(a)前記特定の色の領域を有するキャリブレーション画像から、それを構成する画素毎に、R値、G値、及びB値を特定し、各値に、段階的に設定された複数の係数を乗算して、前記キャリブレーション画像の拡張配列を作成する、ステップと、
(b)前記キャリブレーション画像の前記拡張配列を、色相、彩度、及び明度によって規定される配列に変換する、ステップと、
(c)変換後の前記キャリブレーション画像の拡張配列から、一方の軸を色相とし、他方の軸を彩度とした、2次元のヒストグラムを作成する、ステップと、
(d)前記対象画像を構成する各画素のR値、G値、及びB値から、色相、彩度、及び明度によって規定された前記対象画像の配列を作成し、作成した前記配列から、前記画素毎に、色相の値と彩度の値とを特定し、前記画素毎に特定した前記色相の値及び前記彩度の値と前記2次元のヒストグラムとを用いて、前記対象画像における前記特定の色の領域を認識する、ステップと、
を実行させるプログラム。
A program for recognizing a specific color area in a target image by a computer,
In the computer,
(A) A R value, a G value, and a B value are specified for each pixel constituting the calibration image having the specific color region, and a plurality of coefficients set in stages for each value. Multiplying to create an expanded array of the calibration images; and
(B) converting the expanded array of the calibration images into an array defined by hue, saturation, and brightness;
(C) creating a two-dimensional histogram from the expanded array of the converted calibration images, with one axis as hue and the other axis as saturation;
(D) creating an array of the target image defined by hue, saturation, and brightness from the R value, G value, and B value of each pixel constituting the target image, and from the created array, For each pixel, specify a hue value and a saturation value, and use the hue value and the saturation value specified for each pixel and the two-dimensional histogram to specify the specification in the target image. Recognizing the color region of the step,
A program that executes
前記コンピュータに、
(e)前記2次元のヒストグラムを用いて共分散行列を求め、求めた前記共分散行列を用いて、前記キャリブレーション画像における、色相の値と彩度の値との組合せ毎のマハラノビス距離を算出し、算出した各マハラノビス距離を、色相及び彩度によって規定される2次元配列に格納する、ステップを更に実行させ、
前記(d)のステップにおいて、前記画素毎に特定した前記色相の値及び前記彩度の値を、前記(e)のステップで得られた前記2次元配列に照合して、前記対象画像を構成する画素毎のマハラノビス距離を特定し、特定したマハラノビス距離に基づいて、前記対象画像における前記特定の色の領域を認識する、
請求項9に記載のプログラム。
In the computer,
(E) A covariance matrix is obtained using the two-dimensional histogram, and a Mahalanobis distance for each combination of hue value and saturation value in the calibration image is calculated using the obtained covariance matrix. And storing each calculated Mahalanobis distance in a two-dimensional array defined by hue and saturation,
In the step (d), the hue value and the saturation value specified for each pixel are collated with the two-dimensional array obtained in the step (e) to construct the target image. Identifying the Mahalanobis distance for each pixel to be recognized, and recognizing the specific color region in the target image based on the identified Mahalanobis distance;
The program according to claim 9.
前記(c)のステップにおいて、前記2次元のヒストグラムから、色相の値が閾値以下又は閾値未満となるビンを除去し、
前記(e)のステップにおいて、前記ビンが除去された前記2次元のヒストグラムを用いて共分散行列を求める、
請求項10に記載のプログラム。
In the step (c), bins whose hue values are less than or less than a threshold value are removed from the two-dimensional histogram,
In the step (e), a covariance matrix is obtained using the two-dimensional histogram from which the bin has been removed.
The program according to claim 10.
前記複数の係数が、前記特定の色に応じて設定される、請求項9〜11のいずれかに記載のプログラム。
The program according to any one of claims 9 to 11, wherein the plurality of coefficients are set according to the specific color.
JP2015252481A 2015-12-24 2015-12-24 Color recognition apparatus, color recognition method, and program Active JP6614658B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015252481A JP6614658B2 (en) 2015-12-24 2015-12-24 Color recognition apparatus, color recognition method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015252481A JP6614658B2 (en) 2015-12-24 2015-12-24 Color recognition apparatus, color recognition method, and program

Publications (2)

Publication Number Publication Date
JP2017118363A JP2017118363A (en) 2017-06-29
JP6614658B2 true JP6614658B2 (en) 2019-12-04

Family

ID=59232381

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015252481A Active JP6614658B2 (en) 2015-12-24 2015-12-24 Color recognition apparatus, color recognition method, and program

Country Status (1)

Country Link
JP (1) JP6614658B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3459950B2 (en) * 1997-04-30 2003-10-27 学校法人立命館 Face detection and face tracking method and apparatus
KR100499130B1 (en) * 2001-11-27 2005-07-04 삼성전자주식회사 Image retrieval method and apparatus independent of the illumination change
JP2004246424A (en) * 2003-02-10 2004-09-02 Masahide Kaneko Method for extracting skin color area
JP2005174247A (en) * 2003-12-15 2005-06-30 Canon Inc Image processor, image processing method, and program
JP5070116B2 (en) * 2008-04-16 2012-11-07 株式会社ニコンシステム Table data generation apparatus and table data generation method

Also Published As

Publication number Publication date
JP2017118363A (en) 2017-06-29

Similar Documents

Publication Publication Date Title
US10388018B2 (en) Image processing apparatus, image processing method, and storage medium
JP5297530B2 (en) Image processing apparatus and interface apparatus
US10216979B2 (en) Image processing apparatus, image processing method, and storage medium to detect parts of an object
JP4372051B2 (en) Hand shape recognition apparatus and method
US20160154469A1 (en) Mid-air gesture input method and apparatus
US9262690B2 (en) Method and device for detecting glare pixels of image
JP5870598B2 (en) Image white balance processing method and apparatus
US10692215B2 (en) Image processing apparatus, image processing method, and storage medium
JP5656768B2 (en) Image feature extraction device and program thereof
JP5887264B2 (en) Object recognition apparatus, method, program, and computer-readable medium storing the software
JP6261199B2 (en) Information processing apparatus, information processing method, and computer program
CN109871249B (en) Remote desktop operation method and device, readable storage medium and terminal equipment
JP6388507B2 (en) Image processing device
US9270883B2 (en) Image processing apparatus, image pickup apparatus, image pickup system, image processing method, and non-transitory computer-readable storage medium
JP6202938B2 (en) Image recognition apparatus and image recognition method
JP6614658B2 (en) Color recognition apparatus, color recognition method, and program
US11580620B2 (en) Image processing apparatus, image processing method, and non-transitory computer-readable medium
KR20150094108A (en) Method for generating saliency map based background location and medium for recording the same
KR101796551B1 (en) Speedy calculation method and system of depth information strong against variable illumination
US20170213103A1 (en) Image retrieving device, image retrieving method, and recording medium
JP2015176252A (en) Image processor and image processing method
JP6798690B2 (en) Image processing equipment, image processing methods, and programs
KR101937859B1 (en) System and Method for Searching Common Objects in 360-degree Images
KR101491334B1 (en) Apparatus and method for detecting color chart in image
KR20160060121A (en) Method for determining local differentiating color for image feature detectors

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180913

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190705

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190716

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190911

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20191008

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20191031

R150 Certificate of patent or registration of utility model

Ref document number: 6614658

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150