[go: up one dir, main page]

JP3752031B2 - Monochromatic conversion device and image processing device for color image - Google Patents

Monochromatic conversion device and image processing device for color image Download PDF

Info

Publication number
JP3752031B2
JP3752031B2 JP29425696A JP29425696A JP3752031B2 JP 3752031 B2 JP3752031 B2 JP 3752031B2 JP 29425696 A JP29425696 A JP 29425696A JP 29425696 A JP29425696 A JP 29425696A JP 3752031 B2 JP3752031 B2 JP 3752031B2
Authority
JP
Japan
Prior art keywords
color
image
color image
conversion
contrast
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.)
Expired - Fee Related
Application number
JP29425696A
Other languages
Japanese (ja)
Other versions
JPH10145612A (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.)
Mitutoyo Corp
Original Assignee
Mitutoyo 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 Mitutoyo Corp filed Critical Mitutoyo Corp
Priority to JP29425696A priority Critical patent/JP3752031B2/en
Publication of JPH10145612A publication Critical patent/JPH10145612A/en
Application granted granted Critical
Publication of JP3752031B2 publication Critical patent/JP3752031B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
この発明は、カラーCCDカメラ等の撮像手段で被測定対象を撮像して得られたカラー画像から測定すべきエッジを検出したり、必要な領域を認識するため、カラー画像からコントラスト画像を抽出するカラー画像の単色変換方式及び画像処理方式に関する。
【0002】
【従来の技術】
被測定対象物や被認識対象物のモノクロ画像から目的とする輪郭や形状を抽出する場合、通常は、多階調のモノクロ画像を所定のしきい値レベルで2値化することより、エッジ画像を抽出する。
一方、このような白黒画像に対してカラー画像では、対象物の光反射率等の表面物性と色彩の両方の情報を含んでいるため、画像信号の明るさの違いや色の違いを利用して、光反射率や色の異なる領域の境界線(対象物と背景領域との境界線)を検出したり、特定の色の領域を検出することができるという利点がある。これにより、寸法や形状を計測したり、存在の有無や位置を認識したりすることができる。
【0003】
ところで、一般にカラー画像は、赤(R)、緑(G)、青(B)の3色の画像、即ちR,G,Bの3つの二次元配列データから構成される。計測処理や認識処理のためには、このカラー画像を単色変換して1つの二次元配列データであるコントラスト画像を得、このコントラスト画像の濃度の二次元的分布から対象物の寸法や形状等を検出したり、対象物の存在の有無を検出したりする。従って、コントラスト画像は、カラー画像における明るさの違いや色の違いを明確に表現したものでなければならない。
【0004】
従来、カラー画像からコントラスト画像を抽出する方法としては、次の2つの方法が挙げられる。
(1)カラー画像の輝度をコントラスト画像とする方法
第1の方法は、NTSCカラー方式の輝度信号Yをコントラスト画像Fとする方法であり、コントラスト画像Fは、
【0005】
【数1】
F=0.30R+0.59G+0.11B
【0006】
のように変換される。このコントラスト画像Fは、カラーテレビ放送を白黒テレビで受像して得られる白黒映像と等価である。
しかし、この変換は各色成分の比が固定的な変換であるため、色が異なっても輝度がたまたま同一となる場合には、コントラスト画像上で色の異なる領域が区別できなくなることが生じる。
例えば図8(a)に示すように、対象画像S中に認識すべき2つの領域A,Bが含まれており、これらの領域A,Bの画像データが(R,G,B)の割合で表現してそれぞれ(150,0,0),(0,76,0)であるとすると、対象画像S上の水平走査ラインHに沿った各色の画像データは、図8(b)のR,G,Bのようになり、領域A,Bのコントラスト画像Fa,Fbは、
【0007】
【数2】

Figure 0003752031
【0008】
となるので、同図(b)に示すように、コントラスト画像F上で領域A,Bを区別することができない。
【0009】
(2)特定の色の画像をコントラスト画像とする方法
第2の方法は、特定の色を持つ領域を検出する際に、その色の画像をカラー画像から分離してコントラスト画像Fとする方法である。その色を例えば赤として、色ベクトル(RGBの混合比)を(1,0,0)とすると、コントラスト画像Fは、
【0010】
【数3】
Figure 0003752031
【0011】
のように変換される。この方法は、(1)の方法に比べると、検出したい色を指定することができる分だけ柔軟性が高いと言える。しかし、検出したい色の領域の隣接領域の色を考慮していないため、(1)の方法と同様、色の異なる領域が区別できなくなることが生じる。
例えば図8(a)の領域Aが赤(150,0,0)で、領域Bが黄色(150,150,0)である場合、水平走査ラインHに沿った各色の画像データは、同図(c)のR,G,Bのようになる。この場合、赤色領域を検出しようとすると、同図(c)のようにコントラスト画像Fは、Rと等しくなるので、領域A,Bを区別することができない。
【0012】
【発明が解決しようとする課題】
このように、従来のカラー画像の単色変換方式では、対象のカラー画像における具体的な色配置に拘わらず、常に同じ計算式でコントラスト画像を抽出したり、隣接領域や背景領域の色を考慮せずに抽出したい領域の色をコントラスト画像として抽出しているので、抽出されたコントラスト画像上で色の異なる領域を区別できないことがあるという問題がある。
【0013】
本発明は、このような点に鑑みなされたもので、色の異なる領域間の差異がコントラスト画像上で最も顕著に現れるようにカラー画像からコントラスト画像を抽出することができるカラー画像の単色変換装置を提供することを目的とする。
本発明はまた、そのようなカラー画像の単色変換装置を用いてカラー画像から対象物の測定や認識処理を高精度に行うことを可能にする画像処理装置を提供することを他の目的とする。
【0014】
【課題を解決するための手段】
本発明のカラー画像の単色変換装置は、カラー画像の各色成分を所定の比率で合成して単色のコントラスト画像を抽出するカラー画像の単色変換装置において、前記カラー画像に含まれる識別すべき各色の領域間でコントラスト差を強調するように前記カラー画像の各色成分の比率を決定する変換ベクトルを算出する変換ベクトル算出手段と、この変換ベクトル算出手段で算出された変換ベクトルを用いて前記カラー画像をコントラスト画像に変換するコントラスト画像変換手段とを備えたことを特徴とする。
【0015】
本発明によれば、カラー画像に含まれる識別すべき各色の領域間でコントラスト差を強調するようにカラー画像の各色成分の比率を決定するための変換ベクトルを使用してカラー画像からコントラスト画像を抽出する。このため、従来のように固定的な演算や特定の色を指定する方式とは異なり、隣接する領域間の色の違いがコントラスト画像において強調されることになり、異なる色の領域間を確実に区別することが可能になる。
【0016】
なお、変換ベクトルとしては、例えばコントラスト画像の分散を最大にするものを用いることができ、好適には、前記カラー画像の各色成分の平均値を算出し、これら各色成分の平均値と前記カラー画像を構成する各カラー画素データとから前記カラー画像の分散共分散行列を求め、この分散共分散行列の固有値のうち絶対値が最大の固有値に対応する固有ベクトルを算出することにより求められる。
この方式によれば、対象とするカラー画像に関する事前情報(領域中の識別すべき色の特定等)が一切不要であるため、コントラスト画像生成のための操作が極めて簡単になるという利点がある。
【0017】
また、前記変換ベクトルは、前記カラー画像に含まれる識別すべき各色の領域の代表色がそれぞれ事前情報として与えられる場合には、前記識別すべき各色の領域間で代表色を各色成分毎に比較して各色成分にそのコントラストの大きさに応じた重みが付与されるように決定されるものでもよい。
このように、事前情報として識別対象の各色の領域の代表色が与えられていると、変換ベクトルの算出のための演算処理量を非常に少なくすることができる。
【0018】
識別すべき各色の代表色を算出する方法としては、例えば次の2つの方式が考えられる。
第1の方式は、前記カラー画像の識別すべき各色の領域からそれぞれ部分領域を指定するための領域指定手段を備え、前記領域指定手段によってそれぞれ指定された各部分領域の色の平均値を前記各領域の代表色として算出する。
この方式は、領域を指定する操作が必要になるが、代表色を算出するための算出演算の処理量を少なくすることができるという利点がある。
【0019】
また、第2の方式は、前記カラー画像の各色成分の平均値を算出し、これら各色成分の平均値と前記カラー画像を構成する各カラー画素データとから前記カラー画像の分散共分散行列を求め、この分散共分散行列の固有値のうち絶対値が最大の固有値に対応する固有ベクトルを算出し、三次元色空間上の前記固有ベクトルの方向に前記カラー画像の各色成分の平均値を境として前記各カラー画素データをグループ分けし、これら各グループに属するカラー画素データの平均色を前記各領域の代表色とする。
この方式は、第1の方式よりも演算量が増えるが、識別すべき各色が含まれるようにカラー画像が得られれば、第1の方式のように領域の指定操作が不要になるので、操作は簡単になる。
【0020】
これらの方式は、被測定対象を撮像して得られたカラー画像から、被測定対象の境界を検出してその寸法や形状を計測する画像処理方式、並びに被認識対象を撮像して得られたカラー画像から、被認識対象の境界を検出して被認識対象を認識する画像処理方式等において、境界検出のためのコントラスト画像を得るのに応用できる。そして、これらの画像処理方式によれば、白黒画像を対象としたものよりもより多くの情報を含むカラー画像から対象物を高精度に測定したり認識したりすることが可能になる。
【0021】
【発明の実施の形態】
以下、図面を参照してこの発明の好ましい実施の形態について説明する。
図1は、この発明の実施例に係るカラー画像の単色変換方式の原理を説明するための図である。
図1(a)は、カラー画像からなる対象画像Sを示したもので、この対象画像Sには、識別すべき2つの領域A,Bが含まれている。ここでは、この対象画像Sにおける水平走査ラインHに沿った画像データから領域A,B間の差異が最も顕著に現れるようにコントラスト画像Fを抽出するための2つの方法を例示する。
【0022】
(1)カラー画像からコントラスト画像を抽出する方法(その1)
対象画像Sに含まれる各画素の座標値をij、画素ijのカラー画素データをベクトル表現でij=(Rij,Gij,Bij)T、変換ベクトルを=(Vr,Vg,Vb)Tとすると、コントラスト画像Fの各画素データFijは、下記数4のように求めることができる。
【0023】
【数4】
Figure 0003752031
【0024】
コントラスト画像F上でコントラストを最大にするには、コントラスト画像Fの分散Verを最大にすればよい。コントラスト画像Fの分散Verは、下記数5のように求められる。
【0025】
【数5】
Figure 0003752031
【0026】
ここで、Nは対象画像Sを構成する画素の数である。また、F(バー付き)は、コントラスト画像Fの平均画素レベルであり、(バー付き)をカラー画像の平均画素レベルとすると、次のように表すことができる。
【0027】
【数6】
Figure 0003752031
【0028】
数4及び数6より、数5は数7のようになる。
【0029】
【数7】
Figure 0003752031
【0030】
ここで、はカラー画像の分散共分散行列で、下記数8のように表される。
【0031】
【数8】
Figure 0003752031
【0032】
数7のVerを最大とする変換ベクトルは、分散共分散行列の固有値λのうち、絶対値が最大の固有値λMAXに対応する固有ベクトルとなるので、周知の反復法を用いてこれを求めることができる。
【0033】
即ち、まず分散供分散行列を求めた後、の初期値として例えば(1,1,1)Tを与え、下記数9の演算を複数回数繰り返して収束した値が求める変換ベクトルとなる。演算の回数は、処理速度と精度との兼ね合いで適当に設定する。
【0034】
【数9】
AV
【0035】
但し、この演算の過程では、Vr2+Vg2+Vb2=1となるように正規化されている必要がある。これにより、求められた変換ベクトルを用いて数4の演算を行い、目的とするコントラスト画像Fを求めることができる。
【0036】
例えば図1(a)の例において、領域Aの面積と領域Bの面積の比が1:8であるとし、図1(b)のように、領域Aの平均的なカラー画素データijが(150,0,0)T、領域Bの平均的なカラー画素データijが(0,76,0)Tである場合について考えると、各色の平均値は、
【0037】
【数10】
Figure 0003752031
【0038】
のようになるので、分散共分散行列は、数11のようになる。
【0039】
【数11】
Figure 0003752031
【0040】
この場合、反復法における1回の演算で収束し、求められる変換ベクトルは、=(0.892,-0.452,0)Tとなる。そこで、コントラスト画像FをF=0.892R−0.452Gとすると、図1の対象画像Sの水平走査ラインHに沿ったコントラスト画像Fは、図1(b)のようになり、隣接領域A,B間でコントラストの差が強調されるようなコントラスト画像Fを得ることができる。このようにコントラストを強調するために変換ベクトルの一部の係数がマイナス値になることもこの方式の一つの特徴と言える。
【0041】
また、図1(c)のように、領域Aの平均的なカラー画素データijが(150,0,0)T、領域Bの平均的なカラー画素データijが(150,150,0)Tである場合についても、上記と同様の計算を行うと、変換ベクトル=(0,−1,0)Tが求められ、コントラスト画像Fは、F=−Gとなって、図1(c)のように隣接領域A,B間のコントラスト差が強調されることになる。
【0042】
このように、コントラスト画像Fの分散の最大値が得られるような変換ベクトルを算出することにより、対象画像Sを与えるだけで、他の事前情報は全く必要とせずに対象画像S内の各色の領域間のコントラスト差を強調するようなコントラスト画像Fを抽出することができる。この方式は操作が簡単であるため、オートモードに適している。
【0043】
(2)カラー画像からコントラスト画像を抽出する方法(その2)
上述した方法(その1)は、事前情報が不要である分、演算処理がやや複雑であるが、事前情報として対象画像Sに含まれる識別したい領域の色の情報が予め与えられている場合には、以下に述べる方法が、少ない演算量で済むという点で有利である。ここで必要となる事前情報とは、識別したい領域、例えば図1(a)における領域A,Bの色の代表色(Ra,Ga,Ba),(Rb,Gb,Bb)であり、この代表色としては、色の平均値や予測値を用いることができる。変換ベクトル=(Vr,Vg,Vb)Tは、下記数12のように求めることができる。
【0044】
【数12】
Figure 0003752031
【0045】
これにより、得られた変換ベクトルを用いて数4の演算を行い、目的とするコントラスト画像Fを求めることができる。
この方法は、2つの領域A,Bで、コントラスト差の小さい色成分は小さい重み、コントラスト差の大きい色成分は大きい重みとなるように変換ベクトルの各係数を決定する方法であり、演算量は先の方法に比べて遥かに少ないため、例えば同種対象物の計測処理におけるリピートモード等に適している。
この方式で、図1(b),(c)の各場合の変換ベクトルを算出した場合でも、前記と同様、それぞれ=(0.892,-0.452,0)T=(0,−1,0)Tが求められる。
【0046】
この方法では、領域A,Bの代表色が予め事前情報として与えられている必要がある。そこで、次に領域A,Bの代表色を求める2つの方法について説明する。
(2−1)領域A,Bの代表色を求める方法(その1)
図2に示すように、オペレータがマンマシンインタフェースを使用して対象画像Sの識別したい領域A,Bから部分領域Sa,Sbを指定する。
領域A,Bの代表色(Ra,Ga,Ba),(Rb,Gb,Bb)を下記数13によって算出する。但し、Na,Nbはそれぞれ部分領域Sa,Sbの画素数である。
【0047】
【数13】
Figure 0003752031
【0048】
(2−2)領域A,Bの代表色を求める方法(その2)
カラー画像からコントラスト画像を抽出する方法(その1)により、カラー画像の平均値R,G,B(バー付き)と、変換ベクトルとを算出する。次に、数14のように、領域Aの代表色(Ra,Ga,Ba)を算出する。NaはLij≧0の条件を満たす画素の数である。
【0049】
【数14】
Figure 0003752031
【0050】
次に、数15のように、領域Bの代表色(Rb,Gb,Bb)を算出する。NbはLij<0の条件を満たす画素の数である。
【0051】
【数15】
Figure 0003752031
【0052】
この処理の意味を説明すれば次のようになる。即ち、いま、図3に示すようなカラー画像を表現するRGB空間を定義する。このRGB空間に数8で求めたカラー画像の平均値(R,G,B)(バー付き)をプロットすると図示のようになる。この平均値を通り、変換ベクトル=(Vr,Vg,Vb)を法線ベクトルとする平面SVをRGB空間上に配置すると、この平面SVを境にして対象画像Sの画素データを2つのグループa,bに分けることができる。即ち、平面SVの変換ベクトルが指し示す方向の側に位置する画素は数14におけるLij≧0の条件を満たす画素であり、これをグループaとする。また、平面SVの変換ベクトルが指し示す方向とは反対側に位置する画素は数15におけるLij<0の条件を満たす画素であり、これをグループbとする。このように、対象画像Sに含まれる各画素データを変換ベクトルの軸上に投影し、得られた2つの分布の平均値がそれぞれ領域A,Bの代表色(Ra,Ga,Ba),(Rb,Gb,Bb)である。
【0053】
なお、以上の説明では、カラー画像に含まれる色度情報のみならず明度情報も利用することを前提としている。このため、色が同じで明度が異なる領域間の識別も可能になる。もし、カラー画像から明度情報を除去して色度情報のみの比較を行いたい場合には、各処理の前段で、各カラー画素データijを下記数16のように正規化して色度画像の画素データijを求め、この色度画像の画素データijをカラー画素データとして上記の各処理を実行すればよい。
【0054】
【数16】
Figure 0003752031
【0055】
この変換によって色度画像は、r+g+b=1となるが、実際の処理では、r+g+b=126のように、所定の値を利用すれば良い。
このような変換を行うと次のような利点がある。一般に画像計測や画像認識の対象となるカラー画像は、対象物の形状や表面物性、更には照明むらの影響で同じ色であっても同じR,G,B値を持つことは少ない。しかし、一般に同じ色の領域において、明度のバラツキは大きくても色度のバラツキは比較的少ないことが知られている。即ち、カラー画像の色度情報は、光量変化や照明変化に比較的強い性質を持っていると言える。従って、色度情報を主とする処理を施すことにより、より安定な画像処理が可能になる。
【0056】
次に、以上の方式を非接触画像計測システムに具体的に適用した例について説明する。
図4は、この非接触画像計測システムの全体構成を示す斜視図である。
このシステムは、非接触画像計測型の三次元測定機1と、この三次元測定機1を駆動制御すると共に、必要なデータ処理を実行するコンピュータシステム2と、計測結果をプリントアウトするプリンタ3とにより構成されている。
【0057】
三次元測定機1は、次のように構成されている。即ち、架台11上には、ワーク12を載置する測定テーブル13が装着されており、この測定テーブル13は、図示しないY軸駆動機構によってY軸方向に駆動される。架台11の両側縁中央部には上方に延びる支持アーム14,15が固定されており、この支持アーム14,15の両上端部を連結するようにX軸ガイド16が固定されている。このX軸ガイド16には、撮像ユニット17が支持されている。撮像ユニット17は、図示しないX軸駆動機構によってX軸ガイド16に沿って駆動される。撮像ユニット17の下端部には、カラーCCDカメラ18が測定テーブル13と対向するように装着されている。また、撮像ユニット17の内部には、図示しない照明装置及びフォーカシング機構の他、カラーCCDカメラ18のZ軸方向の位置を移動させるZ軸駆動機構が内蔵されている。
【0058】
コンピュータシステム2は、コンピュータ本体21、キーボード22、ジョイスティックボックス23、マウス24及びCRTディスプレイ25を備えて構成されている。
コンピュータ本体21は、例えば図5に示すように構成されている。即ち、カラーCCDカメラ18から入力されるカラー画像情報は、インタフェース(以下、I/Fと呼ぶ)31を介してカラー画像メモリ32に格納される。カラー画像メモリ32に格納されたカラー画像情報は、表示制御部33を介してCRTディスプレイ25に表示される。一方、キーボード22とマウス24からのオペレータの指令は、I/F34を介してCPU35に伝えられる。CPU35は、前記のオペレータからの指令、又はプログラムメモリ36に格納されたプログラムに従って、指定領域の対象画像からコントラスト画像を抽出し、抽出されたコントラスト画像からエッジを検出すると共に、ワーク12の寸法や形状を計測するといった一連の処理を順次実行する。つまり、CPU35と所定のプログラムとで本発明の変換ベクトル算出手段及びコントラスト画像抽出手段を構成する。また、ワークメモリ37は、CPU35での各種処理のための作業領域を提供する。
【0059】
この計測システムは、例えばオートモードとマニュアルモードとを備え、各モードにおいて、シングルモード、ティーチングモード及びリピートモードのうちのいずれか1つの動作を実行する。CPU35は、オートモードでは、対象画像から自動的にコントラスト画像を抽出し、マニュアルモードでは、オペレータによるキーボード22とマウス24の操作で指定された部分領域に基づいてコントラスト画像を抽出する。また、CPU35は、これらの各モードにおいて、シングルモードでは、与えられた対象画像から1回だけの計測を行い、ティーチングモードでは、繰り返しの計測に必要な事前情報(識別すべき領域の代表色等)と処理のシーケンスとを測定のプログラムとしてプログラムメモリ36に記録し、リピートモードでは、ティーチングモードでプログラムメモリ36に記録された事前情報やプログラムに従って同種のワーク12を連続的に計測するための処理を実行する。
【0060】
図6は、オートモード時のコントラスト画像抽出処理を示すフローチャートである。
CPU35は、まず、測定モードを判別し(S1)、測定モードがシングルモードである場合には、前述したカラー画像からコントラスト画像を抽出する方法(その1)の手法を使用してコントラスト画像Fを抽出する。即ち、対象画像Sのカラー画素データの平均値R,G,B(バー付き)を前述した数8に基づいて算出し(S2)、カラー画像の分散共分散行列を数8に基づいて算出する(S3)。そして、数9に示した反復法により、行列の絶対値最大の固有値に対する固有ベクトルを変換ベクトルとして求め(S4)、得られた変換ベクトルを使用してコントラスト画像Fを算出する(S5)。
【0061】
測定モードがティーティングモードである場合には(S1)、上述したシングルモード時と同様の手法により行列の絶対値最大の固有値に対する固有ベクトルを算出し(S6〜S8)、領域A,Bの代表色を求める方法(その2)の手法を用いて、数14に基づき領域Aの代表色(Ra,Ga,Ba)を求め(S9)、数15に基づき領域Bの代表色(Rb,Gb,Bb)を求める(S10)。そして、求めた領域A,Bの代表色をプログラムメモリ36に記録する(S11)。
【0062】
測定モードがリピートモードである場合には(S1)、ティーティングモードで予め記録されている領域A,Bの代表色を読み込み(S12)、カラー画像からコントラスト画像を抽出する方法(その2)の手法を用い、数12に基づき変換ベクトルを算出し(S13)、得られた変換ベクトルを使用してコントラスト画像Fを算出する(S14)。
【0063】
一方、マニュアルモード時には、図7のような処理が実行される。
まず、測定モードがシングルモードである場合(S21)、オペレータの操作により、部分領域Sa,Sbを指定する(S22)。続いて、領域Saの平均色を領域Aの代表色として算出し(S23)、領域Sbの平均色を領域Bの代表色として算出する(S24)。そして、数12に基づいて変換ベクトルを算出し(S25)、得られた変換ベクトルを使用してコントラスト画像Fを算出する(S26)。
【0064】
測定モードがティーチングモードである場合には(S21)、シングルモードと同様にオペレータの操作により、部分領域Sa,Sbを指定し(S27)、領域Saの平均色を領域Aの代表色として算出すると共に(S23)、領域Sbの平均色を領域Bの代表色として算出する(S24)。そして、求められた領域A,Bの代表色をプログラムメモリ36に記録する(S30)。
【0065】
リピートモードでは、ティーティングモードで予め記録された領域A,Bの代表色を読み込み(S31)、数12に基づき変換ベクトルを算出し(S32)、得られた変換ベクトルを使用してコントラスト画像Fを算出する(S33)。
【0066】
このように、各種の測定モードに適した算出方法でコントラスト画像を抽出することにより、カラー画像から識別したい各色の領域のコントラスト差が強調されたコントラスト画像Fを抽出することができ、ワーク12の寸法や形状を精度良く測定することが可能となる。
【0067】
なお、上記実施例では、非接触画像計測システムに本発明を適用した例について説明したが、本発明は、画像認識装置等、コントラスト画像から必要な情報を抽出するあるゆる画像処理システムに適用可能であることはいうまでもない。
【0068】
【発明の効果】
以上述べたようにこの発明によれば、カラー画像に含まれる識別すべき各色の領域間でコントラスト差を強調するようにカラー画像の各色成分の比率を決定するための変換ベクトルを使用してカラー画像からコントラスト画像を抽出する。このため、従来のように固定的な演算や特定の色を指定する方式とは異なり、隣接する領域間の色の違いがコントラスト画像において強調されることになり、異なる色の領域間を確実に区別することが可能になるという効果を奏する。
【図面の簡単な説明】
【図1】 本発明の一実施例に係るカラー画像の単色変換方式を説明するための図である。
【図2】 同方式における2つの領域の代表値を求める第1の方法を説明するための図である。
【図3】 同方式における2つの領域の代表値を求める第2の方法を説明するための図である。
【図4】 同方式を適用した非接触画像計測システムの斜視図である。
【図5】 同システムにおけるコンピュータシステムの構成を示すブロック図である。
【図6】 同システムにおけるオートモードでのコントラスト画像の抽出手順を示すフローチャートである。
【図7】 同システムにおけるマニュアルモードでのコントラスト画像の抽出手順を示すフローチャートである。
【図8】 従来のカラー画像の単色変換方式を説明するための図である。
【符号の説明】
1…三次元測定機、2…コンピュータシステム、3…プリンタ、11…架台、12…ワーク、13…測定テーブル、14,15…支持アーム、16…X軸ガイド、17…撮像ユニット、18…カラーCCDカメラ、21…コンピュータ本体、22…キーボード、23…ジョイスティックボックス、24…マウス、25…CRTディスプレイ、31,34…インタフェース、32…カラー画像メモリ、33…表示制御部、35…CPU、36…プログラムメモリ、37…ワークメモリ。[0001]
BACKGROUND OF THE INVENTION
The present invention extracts a contrast image from a color image in order to detect an edge to be measured from a color image obtained by imaging an object to be measured by an imaging means such as a color CCD camera or to recognize a necessary region. The present invention relates to a monochrome conversion system and an image processing system for color images.
[0002]
[Prior art]
When extracting a target contour or shape from a monochrome image of an object to be measured or a recognition object, an edge image is usually obtained by binarizing a multi-tone monochrome image at a predetermined threshold level. To extract.
On the other hand, in contrast to such a black and white image, a color image contains information on both surface properties such as light reflectance of the object and color, and therefore uses the difference in brightness and color of the image signal. Thus, there is an advantage that it is possible to detect a boundary line (a boundary line between the object and the background area) of regions having different light reflectivities and colors, or to detect a specific color region. Thereby, a dimension and a shape can be measured, and the presence or absence and position of existence can be recognized.
[0003]
Incidentally, a color image is generally composed of three color images of red (R), green (G), and blue (B), that is, three two-dimensional array data of R, G, and B. For measurement processing and recognition processing, this color image is converted into a single color to obtain a contrast image, which is one two-dimensional array data, and the size, shape, etc. of the object are determined from the two-dimensional distribution of the density of the contrast image. It detects or detects the presence or absence of an object. Therefore, the contrast image must clearly express the difference in brightness and color in the color image.
[0004]
Conventional methods for extracting a contrast image from a color image include the following two methods.
(1) A method of setting the brightness of a color image as a contrast image
The first method is a method in which the luminance signal Y of the NTSC color system is used as a contrast image F.
[0005]
[Expression 1]
F = 0.30R + 0.59G + 0.11B
[0006]
Is converted as follows. This contrast image F is equivalent to a monochrome image obtained by receiving a color television broadcast on a monochrome television.
However, since this conversion is a conversion in which the ratio of each color component is fixed, if the luminance happens to be the same even if the colors are different, it may be impossible to distinguish the regions having different colors on the contrast image.
For example, as shown in FIG. 8A, the target image S includes two areas A and B to be recognized, and the ratio of the image data of these areas A and B is (R, G, B). 8 and (0, 76, 0), the image data of each color along the horizontal scanning line H on the target image S is represented by R in FIG. , G, and B, and the contrast images Fa and Fb of the regions A and B are
[0007]
[Expression 2]
Figure 0003752031
[0008]
Therefore, the areas A and B cannot be distinguished on the contrast image F as shown in FIG.
[0009]
(2) A method of making an image of a specific color a contrast image
The second method is a method of separating a color image from a color image to form a contrast image F when detecting a region having a specific color. If the color is red, for example, and the color vector (RGB mixing ratio) is (1, 0, 0), the contrast image F is
[0010]
[Equation 3]
Figure 0003752031
[0011]
Is converted as follows. It can be said that this method is more flexible than the method (1) because the color to be detected can be designated. However, since the color of the region adjacent to the color region to be detected is not taken into consideration, the regions having different colors may not be distinguished as in the method (1).
For example, when the area A in FIG. 8A is red (150, 0, 0) and the area B is yellow (150, 150, 0), the image data of each color along the horizontal scanning line H is shown in FIG. It becomes like R, G, B of (c). In this case, if the red area is to be detected, the contrast image F is equal to R as shown in FIG. 5C, and thus the areas A and B cannot be distinguished.
[0012]
[Problems to be solved by the invention]
As described above, in the conventional single color conversion method of a color image, a contrast image is always extracted with the same calculation formula regardless of the specific color arrangement in the target color image, and the colors of the adjacent region and the background region are taken into consideration. Therefore, since the color of the region desired to be extracted is extracted as a contrast image, there is a problem that regions having different colors may not be distinguished on the extracted contrast image.
[0013]
  The present invention has been made in view of the above points, and is a single color conversion of a color image that can extract a contrast image from a color image so that a difference between regions of different colors appears most conspicuously on the contrast image.apparatusThe purpose is to provide.
  The present invention also provides a monochrome conversion of such a color image.apparatusImage processing that enables accurate measurement and recognition of objects from color imagesapparatusFor other purposes.
[0014]
[Means for Solving the Problems]
  Monochromatic conversion of color image of the present inventionapparatusIs a single color conversion of a color image that extracts a single color contrast image by synthesizing each color component of the color image at a predetermined ratioapparatusA conversion vector calculating means for calculating a conversion vector for determining a ratio of each color component of the color image so as to enhance a contrast difference between areas of each color to be identified included in the color image, and the conversion vector calculating means And a contrast image converting means for converting the color image into a contrast image using the conversion vector calculated in (1).
[0015]
According to the present invention, a contrast image is obtained from a color image by using a conversion vector for determining a ratio of each color component of the color image so as to enhance a contrast difference between regions of each color to be identified included in the color image. Extract. For this reason, unlike the conventional method of specifying a fixed color or a specific color, the difference in color between adjacent areas is emphasized in the contrast image, so that the difference between the different color areas can be ensured. It becomes possible to distinguish.
[0016]
As the conversion vector, for example, a vector that maximizes the dispersion of the contrast image can be used. Preferably, an average value of each color component of the color image is calculated, and the average value of each color component and the color image are calculated. The color covariance matrix of the color image is obtained from each of the color pixel data that constitutes, and the eigenvector corresponding to the eigenvalue having the maximum absolute value among the eigenvalues of the variance covariance matrix is obtained.
This method has the advantage that the operation for generating the contrast image becomes extremely simple because there is no need for prior information about the target color image (specification of the color to be identified in the area, etc.).
[0017]
Further, when the representative color of each color area to be identified included in the color image is given as prior information, the conversion vector compares the representative color for each color component between the color areas to be identified. Then, it may be determined so that each color component is given a weight according to the magnitude of the contrast.
Thus, if the representative color of each color area to be identified is given as prior information, the amount of calculation processing for calculating the conversion vector can be greatly reduced.
[0018]
As a method for calculating the representative color of each color to be identified, for example, the following two methods are conceivable.
The first method includes a region designating unit for designating a partial region from each color region to be identified in the color image, and the average value of the color of each partial region designated by the region designating unit is calculated. Calculate as the representative color of each region.
Although this method requires an operation for designating an area, there is an advantage that the processing amount of the calculation operation for calculating the representative color can be reduced.
[0019]
In the second method, an average value of each color component of the color image is calculated, and a dispersion covariance matrix of the color image is obtained from the average value of each color component and each color pixel data constituting the color image. The eigenvector corresponding to the eigenvalue having the maximum absolute value among the eigenvalues of the variance-covariance matrix is calculated, and each color is defined with an average value of each color component of the color image as a boundary in the direction of the eigenvector in a three-dimensional color space. The pixel data is grouped, and the average color of the color pixel data belonging to each group is set as the representative color of each region.
This method requires more computation than the first method, but if a color image is obtained so that each color to be identified is included, the region designation operation is not required as in the first method. Will be easy.
[0020]
These methods were obtained by imaging the object to be recognized, as well as an image processing method for detecting the boundary of the object to be measured and measuring its dimensions and shape from the color image obtained by imaging the object to be measured. The present invention can be applied to obtaining a contrast image for boundary detection in an image processing method for recognizing a recognition target by detecting the boundary of the recognition target from a color image. According to these image processing methods, it is possible to measure and recognize an object with high accuracy from a color image including more information than that for a monochrome image.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Preferred embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a diagram for explaining the principle of a monochrome conversion system for a color image according to an embodiment of the present invention.
FIG. 1A shows a target image S composed of a color image, and the target image S includes two areas A and B to be identified. Here, two methods for extracting the contrast image F from the image data along the horizontal scanning line H in the target image S so that the difference between the areas A and B appears most notably will be exemplified.
[0022]
(1) Method for extracting a contrast image from a color image (part 1)
The coordinate value of each pixel included in the target image S is ij, and the color pixel data of the pixel ij is a vector representation.Cij = (Rij, Gij, Bij)T, Transform vectorV= (Vr, Vg, Vb)TThen, each pixel data Fij of the contrast image F can be obtained as in the following formula 4.
[0023]
[Expression 4]
Figure 0003752031
[0024]
In order to maximize the contrast on the contrast image F, the variance Ver of the contrast image F may be maximized. The variance Ver of the contrast image F is obtained as shown in Equation 5 below.
[0025]
[Equation 5]
Figure 0003752031
[0026]
Here, N is the number of pixels constituting the target image S. F (with a bar) is an average pixel level of the contrast image F,CColor image (with bar)CAssuming that the average pixel level is, it can be expressed as follows.
[0027]
[Formula 6]
Figure 0003752031
[0028]
From Equation 4 and Equation 6, Equation 5 becomes Equation 7.
[0029]
[Expression 7]
Figure 0003752031
[0030]
here,AIs a color imageCIs expressed as the following equation (8).
[0031]
[Equation 8]
Figure 0003752031
[0032]
Conversion vector that maximizes Ver in Equation 7VIs the variance-covariance matrixAOf the eigenvalues λ of, the eigenvalue λ having the maximum absolute valueMAXThe eigenvector corresponding toVTherefore, this can be obtained using a well-known iterative method.
[0033]
That is, first, the distribution matrixAAfter askingVFor example, (1, 1, 1)T, And the transformation vector obtained by the converged value obtained by repeating the following equation 9 a plurality of timesVIt becomes. The number of operations is set appropriately in consideration of the processing speed and accuracy.
[0034]
[Equation 9]
V=AV
[0035]
However, in the process of this calculationVVr2+ Vg2+ Vb2It needs to be normalized so that = 1. As a result, the obtained transformation vectorVThe target contrast image F can be obtained by performing the calculation of Equation 4 using
[0036]
For example, in the example of FIG. 1A, the ratio of the area A to the area B is 1: 8, and the average color pixel data of the area A as shown in FIG.Cij is (150, 0, 0)T, Average color pixel data of region BCij is (0,76,0)TWhen the case is, the average value of each color is
[0037]
[Expression 10]
Figure 0003752031
[0038]
So that the variance-covariance matrixAIs as shown in Equation 11.
[0039]
## EQU11 ##
Figure 0003752031
[0040]
In this case, the conversion vector that converges and is obtained by one operation in the iterative method.VIsV= (0.892, -0.452, 0)TIt becomes. Therefore, when the contrast image F is F = 0.892R−0.452G, the contrast image F along the horizontal scanning line H of the target image S in FIG. 1 becomes as shown in FIG. It is possible to obtain a contrast image F in which the difference in contrast is enhanced. Thus, it can be said that one of the features of this method is that some coefficients of the conversion vector have a negative value in order to enhance the contrast.
[0041]
Further, as shown in FIG. 1C, the average color pixel data of the area ACij is (150, 0, 0)T, Average color pixel data of region BCij is (150, 150, 0)TIf the same calculation as above is performed, the conversion vectorV= (0, -1, 0)TIn contrast image F, F = −G, and the contrast difference between adjacent areas A and B is enhanced as shown in FIG.
[0042]
In this way, a transformation vector that provides the maximum variance of the contrast image FVBy calculating, it is possible to extract a contrast image F that emphasizes the contrast difference between each color area in the target image S without giving any other prior information only by giving the target image S. . Since this method is easy to operate, it is suitable for the auto mode.
[0043]
(2) Method for extracting a contrast image from a color image (part 2)
The above-described method (part 1) is a little complicated because the prior information is unnecessary, but the information on the color of the region to be identified included in the target image S is given in advance as the prior information. Is advantageous in that the method described below requires a small amount of calculation. The prior information required here is a region to be identified, for example, representative colors (Ra, Ga, Ba), (Rb, Gb, Bb) of regions A and B in FIG. As the color, an average color value or a predicted value can be used. Transformation vectorV= (Vr, Vg, Vb)TCan be obtained as shown in Equation 12 below.
[0044]
[Expression 12]
Figure 0003752031
[0045]
The resulting transformation vectorVThe target contrast image F can be obtained by performing the calculation of Equation 4 using
In this method, in two regions A and B, a conversion vector is used so that a color component having a small contrast difference has a small weight and a color component having a large contrast difference has a large weight.VThe calculation amount is much smaller than that of the previous method, and is suitable for, for example, a repeat mode in the measurement processing of the same kind of object.
Even when the conversion vector in each case of FIGS. 1B and 1C is calculated by this method,V= (0.892, -0.452, 0)T,V= (0, -1, 0)TIs required.
[0046]
In this method, the representative colors of the areas A and B need to be given in advance as information. Therefore, next, two methods for obtaining the representative colors of the areas A and B will be described.
(2-1) Method for obtaining representative colors of areas A and B (part 1)
As shown in FIG. 2, the operator designates partial areas Sa and Sb from areas A and B to be identified of the target image S using a man-machine interface.
The representative colors (Ra, Ga, Ba) and (Rb, Gb, Bb) of the regions A and B are calculated by the following equation (13). However, Na and Nb are the numbers of pixels of the partial areas Sa and Sb, respectively.
[0047]
[Formula 13]
Figure 0003752031
[0048]
(2-2) Method for obtaining representative colors of areas A and B (part 2)
By the method (part 1) of extracting a contrast image from a color image, the average values R, G, B (with bars) of the color image and the conversion vectorVAnd calculate. Next, the representative colors (Ra, Ga, Ba) of the region A are calculated as in Expression 14. Na is the number of pixels that satisfy the condition of Lij ≧ 0.
[0049]
[Expression 14]
Figure 0003752031
[0050]
Next, the representative colors (Rb, Gb, Bb) of the region B are calculated as in Expression 15. Nb is the number of pixels that satisfy the condition of Lij <0.
[0051]
[Expression 15]
Figure 0003752031
[0052]
The meaning of this process will be described as follows. That is, an RGB space that represents a color image as shown in FIG. 3 is defined. Plotting average values (R, G, B) (with bars) of the color image obtained by Equation 8 in this RGB space is as shown in the figure. This average value passes through the transformation vectorVIf a plane SV having a normal vector of = (Vr, Vg, Vb) is arranged in the RGB space, the pixel data of the target image S can be divided into two groups a and b with this plane SV as a boundary. That is, the transformation vector of the plane SVVThe pixels located on the side in the direction indicated by are pixels satisfying the condition of Lij ≧ 0 in Equation 14, and this is group a. Also, the transformation vector of the plane SVVPixels located on the opposite side of the direction indicated by are pixels satisfying the condition of Lij <0 in Equation 15, and this is group b. In this way, each pixel data included in the target image S is converted into a conversion vector.VThe average values of the two distributions obtained by projecting onto the axes of the regions A and B are the representative colors (Ra, Ga, Ba) and (Rb, Gb, Bb), respectively.
[0053]
In the above description, it is assumed that not only chromaticity information included in a color image but also lightness information is used. For this reason, it is possible to distinguish between regions having the same color but different brightness. If you want to compare the chromaticity information only by removing the lightness information from the color image, each color pixel data is processed before each process.CPixel data of the chromaticity image by normalizing ij as shown in the following equation (16)cij is obtained and pixel data of this chromaticity imagecThe above processes may be executed using ij as color pixel data.
[0054]
[Expression 16]
Figure 0003752031
[0055]
By this conversion, chromaticity imagecR + g + b = 1, but in actual processing, a predetermined value may be used as r + g + b = 126.
Such conversion has the following advantages. In general, a color image that is an object of image measurement or image recognition rarely has the same R, G, and B values even if the color is the same due to the shape and surface physical properties of the object, and even illumination unevenness. However, it is generally known that in the same color region, even if the variation in brightness is large, the variation in chromaticity is relatively small. That is, it can be said that the chromaticity information of a color image has a relatively strong property against changes in light quantity and changes in illumination. Therefore, more stable image processing can be performed by performing processing mainly using chromaticity information.
[0056]
Next, an example in which the above method is specifically applied to a non-contact image measurement system will be described.
FIG. 4 is a perspective view showing the overall configuration of this non-contact image measurement system.
This system includes a non-contact image measurement type CMM 1, a computer system 2 that drives and controls the CMM 1, and executes necessary data processing, and a printer 3 that prints out measurement results. It is comprised by.
[0057]
The three-dimensional measuring machine 1 is configured as follows. That is, a measurement table 13 on which the workpiece 12 is placed is mounted on the gantry 11, and this measurement table 13 is driven in the Y-axis direction by a Y-axis drive mechanism (not shown). Support arms 14 and 15 extending upward are fixed to the center of both side edges of the gantry 11, and an X-axis guide 16 is fixed so as to connect both upper ends of the support arms 14 and 15. An imaging unit 17 is supported on the X-axis guide 16. The imaging unit 17 is driven along the X-axis guide 16 by an X-axis drive mechanism (not shown). A color CCD camera 18 is mounted on the lower end of the imaging unit 17 so as to face the measurement table 13. The imaging unit 17 incorporates a Z-axis drive mechanism that moves the position of the color CCD camera 18 in the Z-axis direction in addition to a lighting device and a focusing mechanism (not shown).
[0058]
The computer system 2 includes a computer main body 21, a keyboard 22, a joystick box 23, a mouse 24, and a CRT display 25.
The computer main body 21 is configured as shown in FIG. 5, for example. That is, color image information input from the color CCD camera 18 is stored in the color image memory 32 via an interface (hereinafter referred to as I / F) 31. The color image information stored in the color image memory 32 is displayed on the CRT display 25 via the display control unit 33. On the other hand, operator commands from the keyboard 22 and mouse 24 are transmitted to the CPU 35 via the I / F 34. The CPU 35 extracts a contrast image from the target image in the designated area in accordance with a command from the operator or a program stored in the program memory 36, detects an edge from the extracted contrast image, A series of processing such as measuring the shape is sequentially executed. That is, the CPU 35 and the predetermined program constitute the conversion vector calculation means and the contrast image extraction means of the present invention. Further, the work memory 37 provides a work area for various processes in the CPU 35.
[0059]
This measurement system includes, for example, an auto mode and a manual mode, and executes any one of a single mode, a teaching mode, and a repeat mode in each mode. In the auto mode, the CPU 35 automatically extracts a contrast image from the target image. In the manual mode, the CPU 35 extracts a contrast image based on a partial area designated by the operation of the keyboard 22 and the mouse 24 by the operator. Further, in each of these modes, the CPU 35 performs measurement only once from a given target image in the single mode, and in the teaching mode, prior information necessary for repeated measurement (representative colors of areas to be identified, etc.) ) And a processing sequence are recorded in the program memory 36 as a measurement program, and in the repeat mode, a process for continuously measuring the same type of workpiece 12 in accordance with the prior information and programs recorded in the program memory 36 in the teaching mode. Execute.
[0060]
FIG. 6 is a flowchart showing a contrast image extraction process in the auto mode.
First, the CPU 35 determines the measurement mode (S1). If the measurement mode is the single mode, the CPU 35 extracts the contrast image F using the method (part 1) of extracting the contrast image from the color image described above. Extract. That is, the average values R, G, and B (with bars) of the color pixel data of the target image S are calculated based on the above equation 8 (S2), and the variance-covariance matrix of the color imageAIs calculated based on Equation 8 (S3). Then, the matrix is obtained by the iterative method shown in Equation 9.AThe eigenvector for the largest eigenvalue of absolute value ofV(S4), and the obtained conversion vectorVIs used to calculate the contrast image F (S5).
[0061]
When the measurement mode is the teaching mode (S1), the matrix is obtained by the same method as in the single mode described above.AThe eigenvector for the eigenvalue with the maximum absolute value is calculated (S6 to S8), and the representative color (Ra, Ga) of the area A is calculated based on Equation 14 using the method (part 2) for obtaining the representative colors of the areas A and B. , Ba) is obtained (S9), and the representative colors (Rb, Gb, Bb) of the region B are obtained based on Equation 15 (S10). Then, the obtained representative colors of the areas A and B are recorded in the program memory 36 (S11).
[0062]
When the measurement mode is the repeat mode (S1), the representative color of the regions A and B recorded in advance in the teaching mode is read (S12), and a contrast image is extracted from the color image (part 2). Using the method, the transformation vector based on Equation 12V(S13), and the obtained conversion vectorVIs used to calculate the contrast image F (S14).
[0063]
On the other hand, in the manual mode, processing as shown in FIG. 7 is executed.
First, when the measurement mode is the single mode (S21), the partial areas Sa and Sb are designated by the operator's operation (S22). Subsequently, the average color of the area Sa is calculated as the representative color of the area A (S23), and the average color of the area Sb is calculated as the representative color of the area B (S24). And the transformation vector based on Equation 12V(S25) and the obtained conversion vectorVIs used to calculate the contrast image F (S26).
[0064]
When the measurement mode is the teaching mode (S21), the partial areas Sa and Sb are designated by the operator's operation as in the single mode (S27), and the average color of the area Sa is calculated as the representative color of the area A. At the same time (S23), the average color of the region Sb is calculated as the representative color of the region B (S24). Then, the obtained representative colors of the areas A and B are recorded in the program memory 36 (S30).
[0065]
In the repeat mode, the representative colors of the areas A and B recorded in advance in the teaching mode are read (S31), and the conversion vector is calculated based on Equation 12.VIs calculated (S32), and the obtained conversion vector is obtained.VIs used to calculate the contrast image F (S33).
[0066]
Thus, by extracting a contrast image by a calculation method suitable for various measurement modes, a contrast image F in which the contrast difference of each color region to be identified is emphasized can be extracted from the color image. It becomes possible to measure the size and shape with high accuracy.
[0067]
In the above embodiment, the example in which the present invention is applied to the non-contact image measurement system has been described. However, the present invention can be applied to any image processing system that extracts necessary information from a contrast image, such as an image recognition device. Needless to say.
[0068]
【The invention's effect】
As described above, according to the present invention, the color is determined using the conversion vector for determining the ratio of each color component of the color image so as to enhance the contrast difference between the regions of each color to be identified included in the color image. A contrast image is extracted from the image. For this reason, unlike the conventional method of specifying a fixed color or a specific color as in the past, the difference in color between adjacent areas is emphasized in the contrast image, and the difference between the different color areas is ensured. There is an effect that it becomes possible to distinguish.
[Brief description of the drawings]
FIG. 1 is a diagram for explaining a monochrome conversion system for a color image according to an embodiment of the present invention.
FIG. 2 is a diagram for explaining a first method for obtaining representative values of two areas in the same method.
FIG. 3 is a diagram for explaining a second method for obtaining representative values of two areas in the same method.
FIG. 4 is a perspective view of a non-contact image measurement system to which the same method is applied.
FIG. 5 is a block diagram showing a configuration of a computer system in the system.
FIG. 6 is a flowchart showing a contrast image extraction procedure in the auto mode in the system.
FIG. 7 is a flowchart showing a contrast image extraction procedure in a manual mode in the system.
FIG. 8 is a diagram for explaining a conventional single color conversion method for a color image;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... CMM, 2 ... Computer system, 3 ... Printer, 11 ... Mount, 12 ... Workpiece, 13 ... Measurement table, 14, 15 ... Support arm, 16 ... X-axis guide, 17 ... Imaging unit, 18 ... Color CCD camera, 21 ... computer main body, 22 ... keyboard, 23 ... joystick box, 24 ... mouse, 25 ... CRT display, 31, 34 ... interface, 32 ... color image memory, 33 ... display control unit, 35 ... CPU, 36 ... Program memory, 37 ... work memory.

Claims (10)

カラー画像の各色成分を所定の比率で合成して単色のコントラスト画像を抽出するカラー画像の単色変換装置において、
前記カラー画像に含まれる識別すべき各色の領域間でコントラスト差を強調するように前記カラー画像の各色成分の比率を決定する変換ベクトルを算出する変換ベクトル算出手段と、
この変換ベクトル算出手段で算出された変換ベクトルを用いて前記カラー画像をコントラスト画像に変換するコントラスト画像変換手段と
を備えたことを特徴とするカラー画像の単色変換装置
In a single-color conversion device for a color image that extracts a single-color contrast image by combining the color components of a color image at a predetermined ratio,
Conversion vector calculation means for calculating a conversion vector for determining a ratio of each color component of the color image so as to emphasize a contrast difference between regions of each color to be identified included in the color image;
A color image monochromatic conversion device comprising: contrast image conversion means for converting the color image into a contrast image using the conversion vector calculated by the conversion vector calculation means.
前記変換ベクトル算出手段は、前記コントラスト画像の分散を最大にする変換ベクトルを算出するものである
ことを特徴とする請求項1記載のカラー画像の単色変換装置
The single-color conversion apparatus for a color image according to claim 1, wherein the conversion vector calculation means calculates a conversion vector that maximizes the variance of the contrast image.
前記変換ベクトル算出手段は、前記カラー画像の各色成分の平均値を算出し、これら各色成分の平均値と前記カラー画像を構成する各カラー画素データとから前記カラー画像の分散共分散行列を求め、この分散共分散行列の固有値のうち絶対値が最大の固有値に対応する固有ベクトルを前記変換ベクトルとして算出するものである
ことを特徴とする請求項2記載のカラー画像の単色変換装置
The conversion vector calculation means calculates an average value of each color component of the color image, obtains a variance covariance matrix of the color image from the average value of each color component and each color pixel data constituting the color image, The single-color conversion apparatus for a color image according to claim 2, wherein an eigenvector corresponding to an eigenvalue having the maximum absolute value among eigenvalues of the variance-covariance matrix is calculated as the conversion vector.
前記変換ベクトル算出手段は、事前情報として与えられた前記カラー画像に含まれる識別すべき各色の領域の代表色に基づいて、これら各色の領域間で前記代表色を各色成分毎に比較して各色成分にそのコントラストの大きさに応じた重みが付与されるように前記変換ベクトルを決定するものである
ことを特徴とする請求項1記載のカラー画像の単色変換装置
The conversion vector calculation means compares the representative color for each color component between the color areas based on the representative colors of the color areas to be identified included in the color image given as prior information. The single-color conversion device for a color image according to claim 1, wherein the conversion vector is determined so that a weight corresponding to the magnitude of the contrast is given to the component .
前記カラー画像の識別すべき各色の領域からそれぞれ部分領域を指定するための領域指定手段と、
この領域指定手段によってそれぞれ指定された各部分領域の色の平均値を前記各領域の代表色として算出する代表色算出手段とを備え、
この代表色算出手段で算出された各領域の代表色を前記変換ベクトル算出手段に供給するようにした
ことを特徴とする請求項4記載のカラー画像の単色変換装置
Area designating means for designating each partial area from each color area to be identified in the color image;
Representative color calculation means for calculating the average value of the colors of each partial area designated by the area designation means as the representative color of each area,
The single-color conversion device for a color image according to claim 4, wherein a representative color of each region calculated by the representative color calculation means is supplied to the conversion vector calculation means.
前記カラー画像の各色成分の平均値を算出し、これら各色成分の平均値と前記カラー画像を構成する各カラー画素データとから前記カラー画像の分散共分散行列を求め、この分散共分散行列の固有値のうち絶対値が最大の固有値に対応する固有ベクトルを算出し、三次元色空間上の前記固有ベクトルの方向に前記カラー画像の各色成分の平均値を境として前記各カラー画素データをグループ分けし、これら各グループに属するカラー画素データの平均色を前記各領域の代表色として算出する代表色算出手段を備え、
この代表色算出手段で算出された各領域の代表色を前記変換ベクトル算出手段に供給するようにした
ことを特徴とする請求項4記載のカラー画像の単色変換装置
An average value of each color component of the color image is calculated, a variance covariance matrix of the color image is obtained from the average value of each color component and each color pixel data constituting the color image, and an eigenvalue of the variance covariance matrix Calculating the eigenvector corresponding to the eigenvalue having the maximum absolute value, and grouping the color pixel data in the direction of the eigenvector in a three-dimensional color space with the average value of each color component of the color image as a boundary. Representative color calculating means for calculating an average color of color pixel data belonging to each group as a representative color of each region;
The single-color conversion device for a color image according to claim 4, wherein a representative color of each region calculated by the representative color calculation means is supplied to the conversion vector calculation means.
前記カラー画像は、色度情報及び明度情報を含むものであることを特徴とする請求項1〜6のいずれか1項記載のカラー画像の単色変換装置The color image single-color conversion device according to claim 1, wherein the color image includes chromaticity information and lightness information. 前記カラー画像は、明度情報が除去された色度画像であることを特徴とする請求項1〜6のいずれか1項記載のカラー画像の単色変換装置The color image monochromatic conversion device according to claim 1, wherein the color image is a chromaticity image from which lightness information is removed. 被測定対象を撮像して得られたカラー画像から、請求項1〜8のいずれか1項に記載されたカラー画像の単色変換装置によりコントラスト画像を抽出し、この抽出されたコントラスト画像に対して前記被測定対象の境界を検出することにより前記被測定対象の寸法又は形状を計測することを特徴とする画像処理装置A contrast image is extracted from the color image obtained by imaging the object to be measured by the color image monochromatic conversion device according to any one of claims 1 to 8, and the extracted contrast image is extracted. An image processing apparatus for measuring a size or a shape of the measurement object by detecting a boundary of the measurement object. 被認識対象を撮像して得られたカラー画像から、請求項1〜8のいずれか1項に記載されたカラー画像の単色変換装置によりコントラスト画像を抽出し、この抽出されたコントラスト画像に対して前記被認識対象の境界を検出することにより前記被認識対象を認識することを特徴とする画像処理装置A contrast image is extracted from the color image obtained by imaging the recognition target using the color image monochromatic conversion device according to claim 1, and the extracted contrast image is extracted. An image processing apparatus that recognizes the recognition target by detecting a boundary of the recognition target.
JP29425696A 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image Expired - Fee Related JP3752031B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP29425696A JP3752031B2 (en) 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP29425696A JP3752031B2 (en) 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image

Publications (2)

Publication Number Publication Date
JPH10145612A JPH10145612A (en) 1998-05-29
JP3752031B2 true JP3752031B2 (en) 2006-03-08

Family

ID=17805372

Family Applications (1)

Application Number Title Priority Date Filing Date
JP29425696A Expired - Fee Related JP3752031B2 (en) 1996-11-06 1996-11-06 Monochromatic conversion device and image processing device for color image

Country Status (1)

Country Link
JP (1) JP3752031B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006208085A (en) 2005-01-26 2006-08-10 Mitsutoyo Corp Picture image measuring instrument and picture image measuring method
CN101982834B (en) * 2010-09-09 2012-06-20 西安电子科技大学 Method for restraining speckles of polarized SAR data based on Bayes non-local mean value
JP7067262B2 (en) * 2018-05-21 2022-05-16 富士フイルムビジネスイノベーション株式会社 Information processing equipment and programs
US11100628B2 (en) * 2019-02-07 2021-08-24 Applied Materials, Inc. Thickness measurement of substrate using color metrology

Also Published As

Publication number Publication date
JPH10145612A (en) 1998-05-29

Similar Documents

Publication Publication Date Title
CN110411339B (en) A kind of underwater target size measurement device and method based on parallel laser beam
US6226399B1 (en) Method and system for identifying an image feature and method and system for determining an optimal color space for use therein
JP4309439B2 (en) Object take-out device
US20190180432A1 (en) Color Quality Assessment Based on Multispectral Imaging
US9595095B2 (en) Robot system
JP2004336657A (en) Spectral image photographing system and adjusting method of spectral image photographing system
JP2018200328A (en) Inspection device, inspection method and program
CN1959740B (en) Image processing method and image processing device
JP3752031B2 (en) Monochromatic conversion device and image processing device for color image
JP3659426B2 (en) Edge detection method and edge detection apparatus
CN113340405A (en) Bridge vibration mode measuring method, device and system
WO2003031956A1 (en) System and method for classifying workpieces according to tonal variations
JP7043992B2 (en) Change point detection device, change point detection method and change point detection program
JP2000155098A (en) Watermelon appearance inspection device
JPH07146937A (en) Pattern matching method
CN109523594A (en) A kind of vision tray characteristic point coordinate location method and system
CN110084841A (en) A kind of weighting guidance figure filtering Stereo Matching Algorithm based on LOG operator
JP2000074643A (en) Method and apparatus for converting three-dimensional distance data, and storage medium storing data conversion program
JPH06251147A (en) Video feature processing method
JPH0856287A (en) Image identification device
JPH03121571A (en) Color picture processor
WO2021230249A1 (en) Estimate assisting device, estimate assisting method, and program
Xie Automatic feature matching in uncalibrated stereo vision through the use of color
JP2021189153A (en) Image processing system and image processing method
CN119146847B (en) Non-contact type strain gauge identification and coordinate accurate positioning method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050615

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050830

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051027

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051209

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111216

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees