JP2004246717A - Image discriminator - Google Patents
Image discriminator Download PDFInfo
- Publication number
- JP2004246717A JP2004246717A JP2003037153A JP2003037153A JP2004246717A JP 2004246717 A JP2004246717 A JP 2004246717A JP 2003037153 A JP2003037153 A JP 2003037153A JP 2003037153 A JP2003037153 A JP 2003037153A JP 2004246717 A JP2004246717 A JP 2004246717A
- Authority
- JP
- Japan
- Prior art keywords
- rgb
- ratios
- image
- ratio
- values
- 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.)
- Granted
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、画像識別装置に関する。
【0002】
【従来の技術】
従来、例えば特開平4−369087号公報に記載されているような、色により物体を認識する画像識別装置が知られている。
【0003】
【特許文献1】
特開平4−369087号公報
【0004】
【発明が解決しようとする課題】
従来の画像識別装置は、識別精度が高くない問題点と、対象物が暗い場合に誤検出しやすい問題点があった。
【0005】
本発明は、このような従来の技術的課題を解決するためになされたもので、色識別精度が高く、また対象物が暗い場合にも正確に色識別できる画像識別装置を提供することを目的とする。
【0006】
【課題を解決するための手段】
請求項1の発明は、画像入力部と演算処理部とを備え、前記演算処理部は、前記画像入力部に入力された原画像から所望の対象画像を予め設定した設定色に基づいて識別する画像識別装置であって、前記演算処理部は、前記設定色のRGB値であるR0、G0、B0を予め記憶し、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求め、前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求め、前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を評価値Nとし、前記評価値Nが所定のしきい値以上となるRGB値R1、G1、B1を有する前記画素を対象画素として抽出し、前記対象画素の分布に応じて前記対象画像を識別する識別手段を有することを特徴とするものである。
【0007】
請求項2の発明は、画像入力部と演算処理部とを備え、前記演算処理部は、前記画像入力部に入力された原画像から所望の対象画像を予め設定した設定色に基づいて識別する画像識別装置であって、前記演算処理部は、前記設定色のRGB値であるR0、G0、B0を予め記憶し、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求め、前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求める一方、該画素の明るさ情報Tを求め、前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を積Sとし、前記積Sと前記明るさ情報Tとの積S×Tを評価値Uとし、評価値Uが所定のしきい値以上となるRGB値R1、G1、B1及び前記明るさ情報Tを有する前記画素を対象画素として抽出し、前記対象画素の分布に応じて前記対象画像を識別する識別手段を有することを特徴とするものである。
【0008】
ここで、前記明るさ情報Tには、前記画素のRGB値の和であるF=R1+G1+B1を利用することができる。
【0009】
【発明の実施の形態】
以下、本発明の実施の形態を図に基づいて詳説する。図1に本発明の第1の実施の形態の画像識別装置を組み込んだロボット1の概略図を示す。ロボット1の頭部2の鼻先にはビデオカメラ3が取り付けてある。ロボット1の目の部分は赤外線受光部4になっている。ロボット1の耳にはマイクロホン5が取り付けてあり、音や声を入力することが可能である。
【0010】
頭部2はロボット1の胴体6に取り付けてある。この頭部2は、2自由度のアクチュエータを介して取り付けてあり、左右・上下に動かすことが可能である。
【0011】
ロボット1の胴体6には4本の脚7が取り付けてある。この脚7もアクチュエータを介して取り付けてあり、歩行が可能であり、自身の姿勢も制御できる。図1において、8はスピーカ、9はしつけボタンである。なお、このロボット1の駆動機構は一般的なものであり、詳細については図示していない。
【0012】
ロボット1の鼻先のビデオカメラ3から出力された映像情報は、原画像として後述する内部のCPU11に送られ、このCPU11により画像認識処理など行い、これをもとに動作などに反映させる。例えば、好きな色のボールが転がっていればこれを識別して追いかけたり、嫌いなものがあればこれから退避したりする行動をとるように設定するのである。
【0013】
図2にロボット1の制御系のブロック図を示す。ロボット1の動作制御はCPU11により予め組み込んであるソフトウェアプログラムを実行することによって行うものであるが、ここではCPU11の演算処理を機能別に分けて説明する。
【0014】
ビデオカメラ3からCPU11の画像入力ポート12に映像信号Y(輝度)、U(色差)、V(色差)と同期信号Vs、Hsが出力される。CPU11では、ビデオカメラ3からの同期信号Vs、Hsに同期して画像入力ポート12よりデータを取り込み、画像データ処理部13において画像データ処理を行う。
【0015】
この画像データ処理部13では、入力したYUVデータをRGB値に変換する等の処理を行う。このYUVデータのRGB値への変換は、下記のとおりである。
【0016】
【数1】
R=Y+1.402V
G=Y−0.714V−0.344U
B=Y+1.772U
画像データ処理部13ではビデオカメラ3からの各画素のYUVデータに対して画素毎にRGB値を求める。
【0017】
次に、この画素毎のRGB値を基にして、この画素が識別対象物の色を有しているか否かを全体制御部14で判定する。
【0018】
そして、画像データ中に、識別対象物の色を有する画素を所定値以上の数検出した場合(この方法についての詳細は後述する)、識別対象物がビデオカメラ3の前に存在すると判断し、これに対応してロボット1の行動パターンを決定し、動作制御部15に指示する。動作制御部15は指示された行動パターンを実現するために各部駆動モータ21と発音部22を動作制御し、ロボット1を頭部2を動かしたり、脚7で歩かせたり、またほえる声をスピーカ8から出させる等の動作をさせる。
【0019】
全体制御部14による画像識別処理は、図3のフローチャートの手順による。予め、所望の多数の対象物それぞれについて、識別すべき色のRGB値とこのRGB値を組み合わせた比率とを求める。これらの値はCPU11に記憶させておく(ステップS1)。
【0020】
例1として、対象物が黄色のテニスボールの場合、R0=176、G0=189、B0=80とであり、各色の比率C、D、Eは、次の通りである。
【0021】
【数2】
C=R0/G0=176/189≒0.931
D=G0/B0=189/80≒2.36
E=B0/R0=80/176≒0.455
ある対象物の画像信号がビデオカメラ3からCPU11に入力されると、CPU11では、入力した各画素のRGBの組合せの比率を計算する。ここでは、RGB信号は、R1=130、G1=143、B1=61であったとする。すると、各色の比率H、I、Jは次の演算で得る(ステップS2)。
【0022】
【数3】
H=R1/G1=130/143≒0.909
I=G1/B1=143/61≒2.34
J=B1/R1=61/130≒0.469
そして各組合せに対応したC−H間、D−I間、E−J間の第1の比率K1=H/C、L1=I/D、M1=J/Eを求める。そして、この第1の比率K1、L1、M1が1を超えないように除数と被除数を設定して第2の比率K2、L2、M2を求める(ステップS3)。例えば、K1に関して、H>CであればK2=1/K1とし、H≦CであればK2=K1として第2の比率K2を求める。D−I間、E−J間の第2の比率L2、M2についても同様である。
【0023】
これにより、上記の例1(黄色のテニスボール)においては、次のようにしてC−H間、D−I間、E−J間の第2の比率K2、L2、M2を求める。
【0024】
【数4】
K2=K1=H/C=0.909/0.931≒0.976
L2=L1=I/D=2.34/2.36≒0.991
M2=1/M1=E/J=0.455/0.469≒0.970
次に、これらを乗算して評価値Nを求める(ステップS4)。
【0025】
【数5】
次に、例2について示す。当例では、画素のRGB値がR1=70、G1=172、B1=125であり、この場合に、K2、L2、M2、Nの各値を求める方法を以下に説明する。
【0026】
まず、各色の比率H、I、Jは次のようになる。
【0027】
【数6】
H=R1/G1=70/172≒0.407
I=G1/B1=172/125≒1.38
J=B1/R1=125/70≒1.79
そして、各組合せに対応したC−H、D−I、E−Jの比率を求める。このときにも、比率は1を超えないように除数と被除数を決定する。
【0028】
【数7】
K2=K1=H/C=0.407/0.931≒0.437
L2=L1=I/D=1.38/2.36≒0.585
M2=1/M1=E/J=0.455/1.79≒0.254
これらを乗算して評価値Nを求める。
【0029】
【数8】
ここで、予めしきい値S1を0.7に設定していた場合、例1の画素はその評価値Nがしきい値よりも大きいので、その画素を所望の対象物の画像に含まれる画素として認識する(ステップS4,S6,S7)。この場合の判定を、「OK判定」と称する。
【0030】
一方、例2の画素はその評価値Nがしきい値よりも小さいので、その画素を所望の対象物の画像に含まれない画素として認識する(ステップS4,S6,S8)。この場合の判定を、「NG判定」と称する。
【0031】
以上説明した方法は、RGBの各比率をもとに計算しているので、輝度による影響を受けない。このため、画像が明るい場合でも暗い場合でも、良好な画像識別が可能である。また、各要素の比率を乗算して評価値Nを求めているので、色の差を大きな数値差として得られ、精度の良い識別が可能である。
【0032】
次に、本発明の第2の実施の形態について説明する。第2の実施の形態の画像識別装置の機能構成は第1の実施の形態と共通である。そして全体制御部14における処理機能において、第1の実施の形態における評価値Nを求めるステップまでの処理は共通であるので、それ以降の処理機能について以下に詳述する。
【0033】
当実施の形態における全体制御部14は、例えばペットロボットなど安価なカメラを画像入力手段として使用する場合のように、得られる画像信号のS/Nが良好でないときに、明るさ成分を含めて識別させることが可能になり、具体的には、評価値Nに明るさ情報Tを乗じた第2の評価値で評価する機能を備えている。
【0034】
この明るさ情報Tとしては、輝度信号Yを使用することができる。具体的には、入力した輝度信号Y値の正規化値を評価値Nに乗算する。つまり、輝度信号Yの最大値がYMAX=255である場合、Y/255を乗算して第2の評価値Pを、
【数9】
P=N×(Y/255)
として求め(ステップS5)、この値を予め設定したしきい値S2と比較する(ステップS6)。
【0035】
この場合、第2の評価値Pが1に近いほど識別したい色に近いことになる。つまり、明るく、かつS/N良く撮影された状態の信号でOK判定となったことになる(ステップS6,S7)。そして暗くて、色信号がノイズに埋もれた状態で得られた値は評価が下がることになり、曖昧な値はキャンセルされる(ステップS6,S8)。
【0036】
従って、良好なS/Nの色信号のみを対象にOK判定するので暗い画像であっても高精度の識別が可能となる。
【0037】
なお、この輝度信号Yは上述のように入力のY値を用いてもよいし、ビデオカメラ3からの入力がRGB信号の場合にはYを演算により求めてもよい。また、明るさ情報TとしてR1+G1+B1の値を使用してもよい。
【0038】
CPU11は、この方法で得られた識別結果をもとに全体の制御プログラムの流れを決め、動作制御を行う。
【0039】
まず、上述した処理で得られた画素毎の色識別結果から、原画像に所望の対象物が含まれているか否かを判定する。この判定処理の一例を説明する。
【0040】
所望の対象物の色であるとの判定(上述のOK判定)を縦横に隣接する4つの画素において得られた場合に、この所望の対象物がカメラ前方に存在すると判定する。
【0041】
また、所望の対象物の色であるとの判定を複数の画素領域でそれぞれ独立に得られた場合は、縦横に連続する画素数が多い方の領域を所望の対象物であると判定する。
【0042】
この判定処理は、本画像識別装置に搭載するCPU11の性能により、またカメラ3の受像素子の画素数により適宜に設定すべきものである。いずれの処理方法においても、OK判定により抽出した対象画素の画像上の分布に応じて対象物とする領域を識別するように設定すればよい。
【0043】
CPU11は、上述のように原画像中に所望の対象物を識別すると、予め記憶した、その対象物に応じた仕草を実行するようにロボットの動作を制御する。例えば、各関節のモータ21を制御することによってロボットを歩行させたり、首を回させたりする。また発音部22に指示を出し、スピーカ8から鳴き声を出させたりする。この制御により、ロボットに好みのものを追いかけさせたり、危険なものから退避させたりすることが可能となる。
【0044】
なお、本発明の技術的思想には次の画像識別処理方法、画像識別処理プログラムも含むものである。
【0045】
(1)コンピュータに原画像を入力し、入力された原画像から所望の対象画像を予め設定した設定色に基づいて識別する画像識別方法であって、前記設定色のRGB値であるR0、G0、B0を予め記憶するステップと、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求めるステップと、前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求め、前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を評価値Nとするステップと、前記評価値Nが所定のしきい値以上となるRGB値R1、G1、B1を有する前記画素を対象画素として抽出するステップと、前記対象画素の分布に応じて前記対象画像を識別するステップとを有する画像識別方法。
【0046】
(2)コンピュータに原画像を入力し、入力された原画像から所望の対象画像を予め設定した設定色に基づいて識別する画像識別方法であって、前記設定色のRGB値であるR0、G0、B0を予め記憶するステップと、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求めるステップと、前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求める一方、該画素の明るさ情報Tを求め、前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を積Sとし、前記積Sと前記明るさ情報Tとの積S×Tを評価値Uとするステップと、評価値Uが所定のしきい値以上となるRGB値R1、G1、B1及び前記明るさ情報Tを有する前記画素を対象画素として抽出するステップと、前記対象画素の分布に応じて前記対象画像として識別するステップとを有することを特徴とする画像識別方法。
【0047】
(3)設定色のRGB値であるR0、G0、B0を予め記憶装置に記憶するステップと、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求めるステップと、前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求め、前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を評価値Nとするステップと、前記評価値Nが所定のしきい値以上となるRGB値R1、G1、B1を有する前記画素を対象画素として抽出するステップと、前記対象画素の分布に応じて前記対象画像を識別するステップとをコンピュータに実行させる画像識別プログラム。
【0048】
(4)設定色のRGB値であるR0、G0、B0を予め記憶装置に記憶するステップと、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求めるステップと、前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求める一方、該画素の明るさ情報Tを求め、前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を積Sとし、前記積Sと前記明るさ情報Tとの積S×Tを評価値Uとするステップと、評価値Uが所定のしきい値以上となるRGB値R1、G1、B1及び前記明るさ情報Tを有する前記画素を対象画素として抽出するステップと、前記対象画素の分布に応じて前記対象画像として識別するステップとをコンピュータに実行させる画像識別プログラム。
【0049】
【発明の効果】
以上のように本発明によれば、識別のしきい値をRGB信号の各比率をもとに求めているので、輝度による影響を受けずに画像識別でき、この結果、明るい場合でも暗い場合でも画像識別を良好に行うことができる。また、各要素の比率を乗算しているので、色の差が大きな数値差として得られ、精度良い識別が可能である。
【0050】
また本発明によれば、画像中の暗い部分におけるS/Nが悪い曖昧な画像情報による評価をキャンセルすることができ、画像識別結果の信頼度を上げることができる。
【図面の簡単な説明】
【図1】本発明の1つの実施の形態の画像識別装置を搭載したロボットの斜視図。
【図2】上記実施の形態の画像識別装置の機能ブロック図。
【図3】上記実施の形態による画像識別処理のフローチャート。
【符号の説明】
1 ロボット
3 ビデオカメラ
11 CPU
12 画像入力ポート
13 画像データ処理部
14 全体制御部
15 動作制御部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image identification device.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, there has been known an image identification apparatus for recognizing an object based on a color, as described in, for example, Japanese Patent Application Laid-Open No. 4-369087.
[0003]
[Patent Document 1]
JP-A-4-369087
[Problems to be solved by the invention]
The conventional image identification device has a problem that the identification accuracy is not high and a problem that it is easy to make an erroneous detection when the target is dark.
[0005]
The present invention has been made to solve such a conventional technical problem, and has as its object to provide an image identification device having high color identification accuracy and capable of accurately performing color identification even when an object is dark. And
[0006]
[Means for Solving the Problems]
The invention according to
[0007]
The invention according to
[0008]
Here, as the brightness information T, F = R1 + G1 + B1, which is the sum of the RGB values of the pixel, can be used.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a schematic diagram of a
[0010]
The
[0011]
Four
[0012]
The video information output from the
[0013]
FIG. 2 shows a block diagram of a control system of the
[0014]
Video signals Y (luminance), U (color difference), V (color difference) and synchronization signals Vs and Hs are output from the
[0015]
The image
[0016]
(Equation 1)
R = Y + 1.402V
G = Y-0.714V-0.344U
B = Y + 1.772U
The image
[0017]
Next, based on the RGB values of each pixel, the
[0018]
Then, when the number of pixels having the color of the object to be identified is equal to or more than a predetermined value in the image data (the details of this method will be described later), it is determined that the object to be identified exists before the
[0019]
The image identification processing by the
[0020]
As an example 1, when the target object is a yellow tennis ball, R0 = 176, G0 = 189, and B0 = 80, and the ratios C, D, and E of the respective colors are as follows.
[0021]
(Equation 2)
C = R0 / G0 = 176/189 ≒ 0.931
D = G0 / B0 = 189/80 ≒ 2.36
E = B0 / R0 = 80/176 ≒ 0.455
When an image signal of a certain object is input from the
[0022]
[Equation 3]
H = R1 / G1 = 130/143 ≒ 0.909
I = G1 / B1 = 143/61 ≒ 2.34
J = B1 / R1 = 61/130 ≒ 0.469
Then, first ratios K1 = H / C, L1 = I / D, and M1 = J / E between CH, DI, and EJ corresponding to each combination are obtained. Then, the divisor and the dividend are set so that the first ratios K1, L1, and M1 do not exceed 1, and the second ratios K2, L2, and M2 are obtained (step S3). For example, regarding K1, K2 = 1 / K1 if H> C, and K2 = K1 if H ≦ C, and the second ratio K2 is determined. The same applies to the second ratios L2 and M2 between DI and EJ.
[0023]
Thus, in the above example 1 (yellow tennis ball), the second ratios K2, L2, and M2 between CH, DI, and EJ are determined as follows.
[0024]
(Equation 4)
K2 = K1 = H / C = 0.909 / 0.931 ≒ 0.976
L2 = L1 = I / D = 2.34 / 2.36 ≒ 0.991
M2 = 1 / M1 = E / J = 0.455 / 0.469 ≒ 0.970
Next, these are multiplied to obtain an evaluation value N (step S4).
[0025]
(Equation 5)
Next, Example 2 will be described. In this example, the RGB values of the pixel are R1 = 70, G1 = 172, and B1 = 125. In this case, a method of obtaining the respective values of K2, L2, M2, and N will be described below.
[0026]
First, the ratios H, I, and J of the respective colors are as follows.
[0027]
(Equation 6)
H = R1 / G1 = 70/172 ≒ 0.407
I = G1 / B1 = 172/125 ≒ 1.38
J = B1 / R1 = 125/70 ≒ 1.79
Then, the ratio of CH, DI, and EJ corresponding to each combination is obtained. At this time, the divisor and the dividend are determined so that the ratio does not exceed 1.
[0028]
(Equation 7)
K2 = K1 = H / C = 0.407 / 0.931 ≒ 0.437
L2 = L1 = I / D = 1.38 / 2.36 ≒ 0.585
M2 = 1 / M1 = E / J = 0.455 / 1.79 ≒ 0.254
The evaluation value N is obtained by multiplying these.
[0029]
(Equation 8)
Here, if the threshold value S1 is set to 0.7 in advance, since the evaluation value N of the pixel of Example 1 is larger than the threshold value, the pixel is included in the image of the desired object. (Steps S4, S6, S7). The determination in this case is referred to as “OK determination”.
[0030]
On the other hand, since the evaluation value N of the pixel of Example 2 is smaller than the threshold value, the pixel is recognized as a pixel not included in the image of the desired target (steps S4, S6, and S8). The determination in this case is referred to as “NG determination”.
[0031]
In the method described above, since the calculation is performed based on each ratio of RGB, the calculation is not affected by the luminance. For this reason, good image identification is possible regardless of whether the image is bright or dark. Further, since the evaluation value N is obtained by multiplying the ratio of each element, the color difference can be obtained as a large numerical difference, and identification with high accuracy is possible.
[0032]
Next, a second embodiment of the present invention will be described. The functional configuration of the image identification device according to the second embodiment is common to that of the first embodiment. In the processing functions of the
[0033]
When the S / N of the obtained image signal is not good, such as when using an inexpensive camera such as a pet robot as an image input unit, the
[0034]
As the brightness information T, a brightness signal Y can be used. Specifically, the evaluation value N is multiplied by the normalized value of the input luminance signal Y value. That is, when the maximum value of the luminance signal Y is YMAX = 255, the second evaluation value P is multiplied by Y / 255,
(Equation 9)
P = N × (Y / 255)
(Step S5), and compares this value with a preset threshold value S2 (step S6).
[0035]
In this case, the closer the second evaluation value P is to 1, the closer to the color to be identified. In other words, it is determined that the signal is OK in a state where the image is captured brightly and with good S / N (steps S6 and S7). Then, the value obtained when the color signal is dark and the color signal is buried in noise is reduced in evaluation, and the ambiguous value is canceled (steps S6 and S8).
[0036]
Therefore, since the OK determination is performed only on the color signal of the good S / N, it is possible to identify the dark image with high accuracy.
[0037]
As the luminance signal Y, the Y value of the input may be used as described above, or when the input from the
[0038]
The
[0039]
First, it is determined whether or not a desired object is included in the original image from the color identification result for each pixel obtained in the above-described processing. An example of this determination processing will be described.
[0040]
When it is determined that the color of the desired object is the color of the desired object (OK determination described above) at four pixels adjacent in the vertical and horizontal directions, it is determined that the desired object exists in front of the camera.
[0041]
If the determination that the color of the desired object is obtained is obtained independently for each of the plurality of pixel regions, the region in which the number of pixels that are continuous vertically and horizontally is large is determined to be the desired object.
[0042]
This determination process should be appropriately set according to the performance of the
[0043]
When the desired object is identified in the original image as described above, the
[0044]
The technical idea of the present invention includes the following image identification processing method and image identification processing program.
[0045]
(1) An image identification method for inputting an original image to a computer and identifying a desired target image from the input original image based on a preset set color, wherein the RGB values R0 and G0 of the set color are provided. , B0 in advance, obtaining the set RGB ratios C = R0 / G0, D = G0 / B0, E = B0 / R0 from the RGB values, and for each pixel of the original image, the RGB of the pixel. From the values R1, G1, and B1, original RGB ratios H = R1 / G1, I = G1 / B1, and J = B1 / R1 are obtained, and a ratio K1 = H, which is a ratio between the set RGB ratio and the original RGB ratio. / C, L1 = I / D, M1 = J / E. If the values of the ratios K1, L1, and M1 are 1 or less, K2 = K1, L2 = L1, M2 = M1, and the ratio K1 , L1, and M1 exceed 1, K2 = / K1, L2 = 1 / L1, M2 = 1 / M1, calculating K2 × L2 × M2 which is a product of the ratios K2, L2, M2, and setting the value as an evaluation value N; Extracting, as target pixels, the pixels having RGB values R1, G1, and B1 that are equal to or larger than a predetermined threshold, and identifying the target image according to the distribution of the target pixels. .
[0046]
(2) An image identification method for inputting an original image to a computer and identifying a desired target image from the input original image based on a preset setting color, wherein R0 and G0 are RGB values of the setting color. , B0 in advance, obtaining the set RGB ratios C = R0 / G0, D = G0 / B0, E = B0 / R0 from the RGB values, and for each pixel of the original image, the RGB of the pixel. While the original RGB ratios H = R1 / G1, I = G1 / B1, and J = B1 / R1 are obtained from the values R1, G1, and B1, the brightness information T of the pixel is obtained, and the set RGB ratio and the original RGB ratio are obtained. The ratios K1 = H / C, L1 = I / D, and M1 = J / E, which are ratios to the RGB ratios, are obtained. If the values of the ratios K1, L1, and M1 are 1 or less, K2 = K1, L2. = L1, M2 = M1, and the ratio K1, L1, M Is greater than 1, K2 = 1 / K1, L2 = 1 / L1, M2 = 1 / M1, and K2.times.L2.times.M2, which is the product of the ratios K2, L2, and M2, is calculated. A product S, and a product S × T of the product S and the brightness information T as an evaluation value U; and RGB values R1, G1, B1, and the evaluation value U being equal to or greater than a predetermined threshold value. An image identification method, comprising: extracting the pixel having the brightness information T as a target pixel; and identifying the target image according to a distribution of the target pixel as the target image.
[0047]
(3) storing the RGB values R0, G0, and B0 of the set color in a storage device in advance; Determining, for each pixel of the original image, an original RGB ratio H = R1 / G1, I = G1 / B1, and J = B1 / R1 from RGB values R1, G1, and B1 of the pixel; A ratio K1 = H / C, L1 = I / D, M1 = J / E, which is a ratio between the RGB ratio and the original RGB ratio, is obtained. When the values of the ratios K1, L1, and M1 are 1 or less, K2 = K1, L2 = L1, M2 = M1, and when the values of the ratios K1, L1, M1 exceed 1, K2 = 1 / K1, L2 = 1 / L1, M2 = 1 / M1, and K2 × L2 × M2 which is a product of the ratios K2, L2 and M2 is obtained, and the value is evaluated as an evaluation value N And extracting the pixels having the RGB values R1, G1, and B1 for which the evaluation value N is equal to or greater than a predetermined threshold value as target pixels, and extracting the target image according to the distribution of the target pixels. An image identification program for causing a computer to execute the identifying step.
[0048]
(4) storing the RGB values R0, G0, and B0 of the set color in a storage device in advance; Determining the original RGB ratios H = R1 / G1, I = G1 / B1, and J = B1 / R1 from the RGB values R1, G1, and B1 of each pixel of the original image. The brightness information T of the pixel is obtained, and the ratios K1 = H / C, L1 = I / D, and M1 = J / E, which are the ratios of the set RGB ratio and the original RGB ratio, are obtained. When each value of M1 is 1 or less, K2 = K1, L2 = L1, and M2 = M1. When each value of the ratios K1, L1, and M1 exceeds 1, K2 = 1 / K1, L2 = 1. / L1, M2 = 1 / M1, and K2 which is the product of the ratios K2, L2, M2 Calculating L2 × M2 and defining the value as a product S; and setting a product S × T of the product S and the brightness information T as an evaluation value U; and RGB in which the evaluation value U is not less than a predetermined threshold value. An image identification program for causing a computer to execute a step of extracting the pixel having the values R1, G1, B1, and the brightness information T as a target pixel, and a step of identifying the pixel as the target image according to the distribution of the target pixels.
[0049]
【The invention's effect】
As described above, according to the present invention, since the threshold value for identification is determined based on each ratio of the RGB signals, image identification can be performed without being affected by luminance. As a result, even when bright or dark, Image identification can be performed well. Further, since the ratio of each element is multiplied, a color difference is obtained as a large numerical difference, and identification with high accuracy is possible.
[0050]
Further, according to the present invention, it is possible to cancel the evaluation based on ambiguous image information having a poor S / N in a dark portion in an image, and to increase the reliability of the image identification result.
[Brief description of the drawings]
FIG. 1 is a perspective view of a robot equipped with an image identification device according to one embodiment of the present invention.
FIG. 2 is a functional block diagram of the image identification device according to the embodiment.
FIG. 3 is a flowchart of an image identification process according to the embodiment.
[Explanation of symbols]
1
12
Claims (2)
前記演算処理部は、前記画像入力部に入力された原画像から所望の対象画像を予め設定した設定色に基づいて識別する画像識別装置であって、
前記演算処理部は、
前記設定色のRGB値であるR0、G0、B0を予め記憶し、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求め、
前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求め、
前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、
前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、
前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、
前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を評価値Nとし、
前記評価値Nが所定のしきい値以上となるRGB値R1、G1、B1を有する前記画素を対象画素として抽出し、
前記対象画素の分布に応じて前記対象画像を識別する識別手段を有することを特徴とする画像識別装置。An image input unit and an arithmetic processing unit are provided,
The arithmetic processing unit is an image identification device that identifies a desired target image from an original image input to the image input unit based on a preset setting color,
The arithmetic processing unit,
The RGB values R0, G0, and B0 of the set color are stored in advance, and the set RGB ratios C = R0 / G0, D = G0 / B0, and E = B0 / R0 are obtained from the RGB values.
For each pixel of the original image, an original RGB ratio H = R1 / G1, I = G1 / B1, and J = B1 / R1 are determined from RGB values R1, G1, and B1 of the pixel,
A ratio K1 = H / C, L1 = I / D, M1 = J / E, which is a ratio between the set RGB ratio and the original RGB ratio, is obtained,
When the values of the ratios K1, L1, and M1 are 1 or less, K2 = K1, L2 = L1, and M2 = M1,
When the values of the ratios K1, L1, and M1 exceed 1, K2 = 1 / K1, L2 = 1 / L1, and M2 = 1 / M1,
K2 × L2 × M2 which is a product of the ratios K2, L2, and M2 is obtained, and the obtained value is used as an evaluation value N
The pixels having the RGB values R1, G1, and B1 in which the evaluation value N is equal to or greater than a predetermined threshold value are extracted as target pixels,
An image identification apparatus, comprising: identification means for identifying the target image according to the distribution of the target pixels.
前記演算処理部は、前記画像入力部に入力された原画像から所望の対象画像を予め設定した設定色に基づいて識別する画像識別装置であって、
前記演算処理部は、
前記設定色のRGB値であるR0、G0、B0を予め記憶し、該RGB値から設定RGB比率C=R0/G0、D=G0/B0、E=B0/R0を求め、
前記原画像の画素毎に、該画素のRGB値であるR1、G1、B1から原RGB比率H=R1/G1、I=G1/B1、J=B1/R1を求める一方、該画素の明るさ情報Tを求め、
前記設定RGB比率と前記原RGB比率との比である比率K1=H/C、L1=I/D、M1=J/Eを求め、
前記比率K1、L1、M1の各値が1以下の場合は、K2=K1、L2=L1、M2=M1とし、
前記比率K1、L1、M1の各値が1を超える場合は、K2=1/K1、L2=1/L1、M2=1/M1とし、
前記比率K2、L2、M2の積であるK2×L2×M2を求めてその値を積Sとし、
前記積Sと前記明るさ情報Tとの積S×Tを評価値Uとし、
評価値Uが所定のしきい値以上となるRGB値R1、G1、B1及び前記明るさ情報Tを有する前記画素を対象画素として抽出し、
前記対象画素の分布に応じて前記対象画像を識別する識別手段を有することを特徴とする画像識別装置。An image input unit and an arithmetic processing unit,
The arithmetic processing unit is an image identification device that identifies a desired target image from an original image input to the image input unit based on a preset color set in advance,
The arithmetic processing unit,
The RGB values R0, G0, and B0 of the set color are stored in advance, and the set RGB ratios C = R0 / G0, D = G0 / B0, and E = B0 / R0 are obtained from the RGB values.
For each pixel of the original image, the original RGB ratio H = R1 / G1, I = G1 / B1, and J = B1 / R1 are determined from the RGB values R1, G1, and B1 of the pixel, and the brightness of the pixel is determined. Ask for information T,
A ratio K1 = H / C, L1 = I / D, M1 = J / E, which is a ratio between the set RGB ratio and the original RGB ratio, is obtained,
When the values of the ratios K1, L1, and M1 are 1 or less, K2 = K1, L2 = L1, and M2 = M1,
When the values of the ratios K1, L1, and M1 exceed 1, K2 = 1 / K1, L2 = 1 / L1, and M2 = 1 / M1,
K2 × L2 × M2 which is a product of the ratios K2, L2 and M2 is obtained, and the value is defined as a product S,
A product S × T of the product S and the brightness information T is defined as an evaluation value U,
The pixels having the RGB values R1, G1, B1 and the brightness information T for which the evaluation value U is equal to or greater than a predetermined threshold value are extracted as target pixels,
An image identification apparatus, comprising: identification means for identifying the target image according to the distribution of the target pixels.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003037153A JP4023330B2 (en) | 2003-02-14 | 2003-02-14 | Image identification device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003037153A JP4023330B2 (en) | 2003-02-14 | 2003-02-14 | Image identification device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004246717A true JP2004246717A (en) | 2004-09-02 |
JP4023330B2 JP4023330B2 (en) | 2007-12-19 |
Family
ID=33022051
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003037153A Expired - Fee Related JP4023330B2 (en) | 2003-02-14 | 2003-02-14 | Image identification device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4023330B2 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4499825B1 (en) * | 2009-09-30 | 2010-07-07 | 広行 遠藤 | 2D code, 2D code reader and program |
US8714456B2 (en) | 2009-09-30 | 2014-05-06 | Shift Co. Ltd. | Two-dimensional code, two-dimensional code reader, and program |
-
2003
- 2003-02-14 JP JP2003037153A patent/JP4023330B2/en not_active Expired - Fee Related
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4499825B1 (en) * | 2009-09-30 | 2010-07-07 | 広行 遠藤 | 2D code, 2D code reader and program |
JP2011076395A (en) * | 2009-09-30 | 2011-04-14 | Hiroyuki Endo | Two-dimensional code, two-dimensional code reader and program |
US8714456B2 (en) | 2009-09-30 | 2014-05-06 | Shift Co. Ltd. | Two-dimensional code, two-dimensional code reader, and program |
Also Published As
Publication number | Publication date |
---|---|
JP4023330B2 (en) | 2007-12-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8416987B2 (en) | Subject tracking apparatus and control method therefor, image capturing apparatus, and display apparatus | |
US7593552B2 (en) | Gesture recognition apparatus, gesture recognition method, and gesture recognition program | |
CN103098076B (en) | Gesture recognition system for TV control | |
JP5567853B2 (en) | Image recognition apparatus and method | |
KR101303877B1 (en) | Method and apparatus for serving prefer color conversion of skin color applying face detection and skin area detection | |
JP6587435B2 (en) | Image processing apparatus, information processing method, and program | |
US8830374B2 (en) | Image capture device with first and second detecting sections for detecting features | |
JPH1186004A (en) | Moving body tracking device | |
JP4682820B2 (en) | Object tracking device, object tracking method, and program | |
US10013632B2 (en) | Object tracking apparatus, control method therefor and storage medium | |
US20070031033A1 (en) | Method and apparatus for converting skin color of image | |
JP6362085B2 (en) | Image recognition system, image recognition method and program | |
KR20100075167A (en) | Apparatus and method for capturing digital image using face recognition function | |
JPWO2019003973A1 (en) | Face authentication device, face authentication method and program | |
US20130321404A1 (en) | Operating area determination method and system | |
US8369619B2 (en) | Method and apparatus for skin color correction and digital photographing apparatus using both | |
JP2000105819A (en) | Face image area detecting device | |
US20220321792A1 (en) | Main subject determining apparatus, image capturing apparatus, main subject determining method, and storage medium | |
JP2012531652A (en) | Gesture recognition using chroma key | |
JP2011089784A (en) | Device for estimating direction of object | |
US20240104769A1 (en) | Information processing apparatus, control method, and non-transitory storage medium | |
JP4717445B2 (en) | Image processing system, image processing device, game device, program, information storage medium, and image processing method | |
JP4390487B2 (en) | Head region extraction device | |
US9323981B2 (en) | Face component extraction apparatus, face component extraction method and recording medium in which program for face component extraction method is stored | |
JP2011071925A (en) | Mobile tracking apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050330 |
|
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: 20070911 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070924 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4023330 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101012 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101012 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20111012 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121012 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121012 Year of fee payment: 5 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313111 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20121012 Year of fee payment: 5 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20131012 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |