JP2004185246A - Evaluation method of uniformity of color - Google Patents

Evaluation method of uniformity of color Download PDF

Info

Publication number
JP2004185246A
JP2004185246A JP2002350577A JP2002350577A JP2004185246A JP 2004185246 A JP2004185246 A JP 2004185246A JP 2002350577 A JP2002350577 A JP 2002350577A JP 2002350577 A JP2002350577 A JP 2002350577A JP 2004185246 A JP2004185246 A JP 2004185246A
Authority
JP
Japan
Prior art keywords
color
image
frequency
uniform
color 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.)
Granted
Application number
JP2002350577A
Other languages
Japanese (ja)
Other versions
JP4315243B2 (en
Inventor
Toshiyuki Kashiwagi
利幸 柏木
Shunichiro Oe
俊一郎 大恵
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.)
Tokushima Prefecture
Original Assignee
Tokushima Prefecture
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 Tokushima Prefecture filed Critical Tokushima Prefecture
Priority to JP2002350577A priority Critical patent/JP4315243B2/en
Publication of JP2004185246A publication Critical patent/JP2004185246A/en
Application granted granted Critical
Publication of JP4315243B2 publication Critical patent/JP4315243B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)
  • Spectrometry And Color Measurement (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To locate a nonuniform portion of a color as information for a human's determination of unevenness, and stably detect the area of the nonuniform portion without image division and with low computational complexity. <P>SOLUTION: From a color image, a color histogram having appearance frequency information about a color in the color image is created. The frequency information is extracted from the obtained color histogram. A portion of low extracted frequency is detected as a nonuniform portion of the color in the color image, and a portion of high frequency is detected as a uniform portion of the color in the color image. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、カラー画像を用いた色の均一性の評価方法に関し、特に、不均一部分の検出が可能な、色の均一性の評価方法に関する。
【0002】
【従来の技術】
工業製品においては、塗装などの際に、表面の着色の状態が製品の品質に与える影響が大きく、色の均一性の検査は欠かせないものとなっている。また、色情報を伝える装置であるカメラやディスプレイでは、受光素子あるいは表示エリア全体で均一な色の再現性が要求される。そのため、このような装置ではさらに厳しい色の均一性の評価が重要となる。これらの色の均一性の評価は、製品の色むらや輝度むらの評価として、熟練技能者の感性に基づく目視検査に依存しているのが現状であり、これらを自動化する試みも研究されている。これまでの研究では、むらを判別するために、取得画像を適切な領域に分割し、領域内、領域間での色特徴の比較や、分布を調べ、人間の感覚特性を取り込んだ評価を行っている。
【0003】
人間の感覚特性を調べ、統計的に処理し、得られたデータにより色むらを判定するものとして、特許文献1、2に記載されたものがある。
すなわち、特許文献1には、特定の人種集団における色覚による主観評価実験を行い、その結果を判断の基準とするカラーディスプレイの色むら識別方法が記載されている。
【0004】
また、特許文献2には、むら領域と周辺部との色及び輝度変化の大きさと、面内におけるむら領域の幾何学的な大きさとの両方を用いて解析することが記載されている。
【0005】
むらを判別するために、取得画像を適切な領域に分割し、領域内、領域間での色特徴を比較し、またその分布を調べるものとして、特許文献2〜5に記載されたものがある。
【0006】
すなわち、特許文献2には、7×7の縦方向と横方向のフィルタを使用して、局所領域的な微分値を求めることが記載されている。これは、近傍における微分値の平均値が表示装置に対する人の視覚性と高い相関関係をもつためであるとされている。面内におけるむらの領域は、表示画像上の色の変化具合で調べることが記載されてる。
【0007】
特許文献3には、画面情報を所定の位置、大きさで分割し、その分割領域を基に、空間周波数の異なる色むら、輝度むらを評価し、各評価結果の組み合わせにより画質を評価することと、分割した領域内に存在する画素間の輝度差を算出し、その最大値で画質を評価することと、画面情報を異なった位置、大きさで複数回繰り返し分割し、各分割領域間の色度差もしくは色度勾配により画質を評価することとが記載されている。
【0008】
特許文献4には、画像データを複数の画素に分割し、注目画素とそれを取り囲む画素郡との差を求め、局所的な輝度の変化を調べることが記載されている。
特許文献5には、画素の値が所定の範囲にある領域に画像を分割し、その領域の色と、本来あるべき色である基準色とのずれを検出することが記載されている。
【0009】
【特許文献1】
特開平9−79947号公報
【0010】
【特許文献2】
特開平10−96681号公報
【0011】
【特許文献3】
特開平10−2800号公報
【0012】
【特許文献4】
特開2002−257679号公報
【0013】
【特許文献5】
特開平6−295168号公報
【0014】
【発明が解決しようとする課題】
一般に色のむらは、色が連続的に変化することで境界が不鮮明であったり、どこにいくつ存在するかが分からなかったりするため、定量的な評価が難しいという問題点がある。すなわち、分割した領域が客観的に正しいかどうかの判断ができないという問題点がある。また、大きなむらを探すために、探すむらの大きさに合わせて画像を適切な領域に分割して、領域間で色の特徴や分布を較べているため、計算量が多く処理時間がかかるという問題点もある。適切な領域を探すためにも時間がかかる。
【0015】
そこで本発明は、人間がむらと判断するための情報として色の不均一箇所を特定し、また、画像を分割することなく、少ない計算量で、安定して不均一箇所の領域を検出できるようにすることを目的とする。
【0016】
【課題を解決するための手段】
この目的を達成するため本発明は、カラー画像からこのカラー画像における色の出現頻度情報を持つカラーヒストグラムを作成し、得られたカラーヒストグラムから前記頻度情報を抽出し、この抽出された頻度の低い部分を前記カラー画像における色の不均一部分として検出するとともに、頻度の高い部分を前記カラー画像における色の均一部分として検出するものである。
【0017】
このようにすると、カラー画像における色の出現頻度の低い部分を前記カラー画像における色の不均一部分として検出するとともに、頻度の高い部分を前記カラー画像における色の均一部分として検出するため、人間の目で識別が難しい部分まで色の不均一部分を検出することが可能となる。
【0018】
すなわち本発明は、色の均一性を評価するために、不均一部分の画素数は、均一部分の画素数よりも少ないという知見の基に、不均一部分を検出する。したがって、人間の感覚特性に合わない、すなわち人間では検出できないような不均一部分も、本発明によれば検出することができる。検出部分の色の特徴を、検査対象物に応じてさらに詳しく調べることで、人間の感覚特性に合わせた色むらの判定も可能である。しかも本発明によれば、処理のための計算量が極めて少なく、したがって種々の色むら検査の前処理として利用することができる。
【0019】
また本発明は、カラー画像からこのカラー画像における色の出現頻度情報を持つカラーヒストグラムを作成し、得られたカラーヒストグラムから前記頻度情報を抽出し、カラー画像のカラー値をその色の前記カラーヒトストグラムより得られる頻度に置き換えて頻度画像を作成するものである。
【0020】
このようにすると、カラー画像のカラー値をその色の前記カラーヒトストグラムより得られる頻度に置き換えて頻度画像を作成するため、元の画像につきカラー情報をそのカラーの頻度情報に置き換えた新たな画像を得ることができる。
【0021】
また本発明は、抽出された頻度の低い部分をカラー画像における色の不均一部分として、この不均一部分をその頻度に応じた濃淡画像で表示することで、この濃淡画像の明るい部分を合計面積の大きい不均一部分として検出するとともに、暗い部分を合計面積の小さい不均一部分として検出するものである。
【0022】
このようにすると、合計面積の大きい不均一部分と合計面積の小さい不均一部分とを容易に検出することができる。
また本発明は、複数枚のカラー画像から、それぞれの画像における色の出現頻度を表す頻度画像を作成し、これらの複数枚の頻度画像からそれらの頻度画像の平均である平均頻度画像を得て、この平均頻度画像より、検出したい平均頻度の範囲を指定して、前記カラー画像における色の不均一部分を検出するものである。
【0023】
このようにすると、カラー画像における色の不均一部分を容易に検出することができる。
【0024】
また本発明は、色の均一性を評価するための検査対象よりピントをぼかしてカラーのぼけ画像を取得するか、あるいは前記検査対象についてのピントの合ったカラー画像よりカラーのぼけ画像を作成し、このぼけ画像をカラー画像として処理を行うものである。
【0025】
このようにすると、たとえば検査対象物が繊維製品でその表面に織り模様が存在するような場合にも、その織り模様が目立たないようにして色の不均一部分を検出することができる。
【0026】
また本発明は、カラー画像から出現する色の情報を変えずにカラーのぼけ画像を作成するようにフィルタ処理を行うものである。
このようにすると、検査対象についてのピントの合ったカラー画像より高周波除去フィルタリング処理によってカラーのぼけ画像を作成するときに、本来のカラー画像に無い色が出現することを防止できる。
【0027】
また本発明は、複数の焦点位置のそれぞれにおいて1枚以上のカラー画像を取得し、これらのカラー画像より、それぞれの焦点位置で上述の頻度画像を得て、この頻度画像における全画素値の頻度の合計か、あるいは、前記頻度画像中の一部の領域内の合計を求め、その合計値が最も小さい頻度画像を、最も焦点の合ったカラー画像より得られたものとするものである。
【0028】
このようにすると、カラー画像を撮像するためのカメラの焦点を容易に対象物に合わせることができる。
また本発明は、複数の焦点位置のそれぞれにおいて1枚以上のカラー画像を取得し、これらのカラー画像より、それぞれの焦点位置で上述の頻度画像を得て、この頻度画像に対し高周波成分を検出し、最も高周波成分の多い頻度画像を、最も焦点の合ったカラー画像より得られたものとするものである。
【0029】
このようにしても、同様に、カラー画像を撮像するためのカメラの焦点を容易に対象物に合わせることができる。
【0030】
【発明の実施の形態】
カラーヒストグラムは、カラー画像を構成する各画素の値たとえばRGB値を3つのパラメータとした空間に、プロットを行ったものである。一般的には、前記各画素のRGB値をRGBの直交空間にプロットするものを特にRGBカラーヒストグラムと呼んでいる。本発明で利用するカラーヒストグラムは、前記パラメータ空間にプロットした各点に、画素数の情報すなわち頻度を持たせる。なお、カラーヒストグラムは、RGB以外の表色系たとえばHSI、YIQ、Lなどの表色系を用いることもできるし、カラー画像の画素値の3つのパラメータの内2つのパラメータのみ使用することも可能である。以後、本発明で使用する頻度情報を持つカラーヒストグラム空間のことを、単にカラーヒストグラム空間と言う。
【0031】
カラー画像中の均一な色の領域の中に不均一な色の領域があって、2つの色の色相値もしくはRGB値が異なると、カラーヒストグラム上では、2つのクラスタに分かれてプロットされる。人工的に作られたカラー画像であれば、2つの色しか無いため、2つの点にプロットされる。しかし、何らかの撮像系を通して取得したカラー画像は、たとえばノイズの影響で前記の2つの色の周辺の色を持った画素が多数存在するため、カラーヒストグラム空間では、2つの色を中心にそれぞれの中心点の周りに分布が存在する。通例、不均一な領域の面積は均一な領域の面積よりも小さいはずであるため、カラーヒストグラム空間に現れる2つのクラスタの頻度には差があり、均一な領域のクラスタは頻度の大きな点が多く、不均一な領域のクラスタには頻度の小さな点が多く分布する。
【0032】
たとえば図2は、均一な色の領域Aの中に不均一な色の領域Bが存在する撮像対象を、何らかの撮像系を通して取得した画像の例を示す。これをRGBカラーヒストグラム空間にプロットすると、図3のようになる。図2の均一な領域Aは、図3の領域Aに、図2の不均一な領域Bは、図3の領域Bにプロットされる。図3では領域の表示が明るいほど頻度が高いことを表している。図3では各領域に複数の丸印が記されているが、これはノイズの影響によってヒストグラム空間に分布が生じていることを表している。
【0033】
図2の領域Aと領域Bの識別が難しい場合とは、領域Aと領域Bの色が近い場合であり、図3では領域Aと領域Bの二つのクラスタの距離が近い場合に相当する。なお、このような場合には、ノイズのため、本来均一部分のクラスタ領域Aにプロットされるはずの画素が、誤って不均一部分のクラスタ領域Bにプロットされることがあるが、その頻度は極めて小さく、二つのクラスタの頻度の関係が逆転することは無い。
【0034】
以上のほかにも、均一な色を持つ曲面に不均一な領域があり、2つの色の色相が異なる場合にも、カラーヒストグラム空間上では2つのクラスタに別れる。たとえば図4は、均一な色領域Aを持つ円筒面10に、色相の異なる不均一な領域Bが存在する場合の例を示す。図4のようにカメラ11で撮影した画像を、RGBカラーヒストグラム空間にプロットすると、図5のようになる。図4の領域Aは、図5では原点から直線状に分布する領域Aにプロットされる。これは、円筒面10における色の均一領域をカメラ11で撮影すると、色相は同じで、円筒面10の曲面に影響されて輝度のみが変化する様子が撮影されるためである。一方、図4の領域Bは、図5の領域Bにプロットされる。図5においても、図3と同様に、領域の表示が明るいほど頻度が高いことを表している。図5の頻度情報を調べると、領域Bの不均一部分は、領域Aの均一部分に較べて頻度は小さい。
【0035】
すなわち、図2や図4に示すように均一な色の領域Aの中に不均一な色の領域Bが存在する場合は、カラーヒストグラム空間で、色の不均一部分は、色の均一部分に較べて頻度が小さいため、頻度情報を閾値とすれば、二つの領域を区別することができる。
【0036】
ただし、実シーンでは、画素のカラー値は種々のノイズの影響を受けることが多い。このため、本発明では、複数枚のカラー画像を用いて検出を行うことで、ノイズの影響を小さくする。その手順を以下に示す。
【0037】
カラー画像を、座標を表す2つの独立変数x、yの関数f(x,y)によって表現する。図1(a)において、六角印は青、三角印は緑、菱形印は赤をそれぞれ表すものとする。この図1(a)に示すように、時刻tに取得したカラー画像をf(t)(x,y)とし、f(t)(x,y)を同図(b)のカラーヒストグラム空間上にプロットしたものをh(t)とする。h(t)は、RGBそれぞれの座標値と、その座標における頻度とを持っている。
【0038】
本発明においては、元の画像f(t)(x,y)のカラー値を、h(t)より得られる頻度に置き換える。すると、図1(c)に示すように、f(t)(x,y)は、カラー値の出現頻度を表す濃淡画像に変わる。この画像を頻度画像g(t)(x,y)と呼ぶ。
【0039】
{f(t)(x,y)、t=1、2、…、n}から得られるn枚の頻度画像{g(t)(x,y)、t=1、2、…、n}の合計S(x,y)を、次式により求める。
【0040】
【数1】

Figure 2004185246
以上の手順は図1に示されている。
【0041】
さらに、n枚の頻度画像の平均をgm(x,y)とすると、gm(x,y)は次のように表される。
【0042】
【数2】
Figure 2004185246
ここではgm(x,y)を平均頻度画像と呼び、gm(x,y)の各画素の値は実数値を取るものとする。
【0043】
均一領域と不均一領域とを識別する頻度の閾値をdとし、ここでは、これを検出平均頻度と呼ぶ。不均一領域は、均一領域よりも色の出現頻度が小さいため、gm(x,y)の画素のうち、値が閾値dより小さい部分が不均一領域として検出される。不均一領域が複数ある場合は、dの値により検出される不均一領域の大きさが変わってくる。
【0044】
検出は次式により行う。
【0045】
【数3】
Figure 2004185246
検出されたg(x,y)は2値画像で、g(x,y)の0・画素の部分が不均一領域を表し、1・画素の部分が均一領域を表す。
【0046】
不均一領域が複数ある場合には、閾値d以下の画素の値を、2値画像ではなく、濃淡画像で表示した方が分かりやすい。
iビットの画像メモリを用いて、0から閾値すなわち検出平均頻度dまでの頻度を濃淡で表示した画像は、次式のようになる。
【0047】
【数4】
Figure 2004185246
このようにして検出した2−1段階の濃淡画像g(x,y)を、ここでは頻度特徴検出画像と呼ぶ。
【0048】
すなわち、上式によれば、閾値dまでの不均一領域がその頻度に応じて濃淡が変化した状態で表示された画像が得られることになり、g(x,y)の明るい部分は不均一部分の合計面積の大きい箇所を表し、また、暗い部分は不均一部分の面積の小さな箇所を表している。
【0049】
上記の式(4)においては、dより小さいものを不均一領域として検出しているが、かなり小さな不均一領域、すなわちg(x,y)の画素のうちその濃度が非常に小さく暗いものは、人間の目ではむらと識別できない場合や識別する必要のないものもある。そこで、dについての下限の閾値を設け、これをdminとする。すなわち、dminからdまでの範囲のみを濃淡画像で表すのが実際的である。
【0050】
平均頻度がdmin以上でかつdより小さい範囲を対象として2−1段階の濃淡画像とした頻度特徴検出画像は、次式のようになる。
【0051】
【数5】
Figure 2004185246
ここで、1≦dmin<dである。
【0052】
ただし、(gm(x,y)−dmin)の計算は、gm(x,y)の各画素の値からdminを減じることを意味する。
【0053】
式(2)の関係を用いると、式(5)は、次のようになる。
【0054】
【数6】
Figure 2004185246
ここで、1≦dmin<dである。
【0055】
なお本発明においては、上記したRGBカラーヒストグラム空間の代わりに、検査する対象物や内容に適した色空間を選択することも可能である。たとえば、色相だけの検査であれば、2次元の色相平面のみを用いることもできる。
【0056】
次に、検査対象物の表面がテクスチャ性を有する場合、たとえば、繊維製品の色むらを検出する場合について説明する。このような場合に、上記の手順をそのまま適用すると、色むら以外に、繊維の織り模様すなわちテクスチャが検出されてしまって、色むらを正確に検出できなくなることがある。そのような場合には、画像を取得する場合に、少しピントをぼかして、繊維のテクスチャが目立たないようにして検出を行う。
【0057】
または、ピントの合った画像を取得した後、画像の高周波成分を除去するフィルタリング処理により画像をぼかすこともできる。この高周波除去フィルタリング処理としては、モノクロ画像処理の場合、移動平均法や2次元ガウスフィルタによるぼかし手法を用いることができる。いずれも、3×3や5×5などのように2次元のフィルタの定義域を設定し、この定義域に係数を設定し、このフィルタと原画像との畳み込み演算を行うことによりぼけ画像を得る。前記フィルタの定義域をフィルタの近傍領域と言う。これらの手法をカラー画像に適用する場合、本発明では、カラー画像の各RGB成分に独立に適用する。適用するフィルタの近傍領域の大きさや係数は、検査対象のテクスチャの周波数に応じて決定する。
【0058】
上記フィルタリング手法では、本来のカラー画像中には無い色が出現する可能性がある。このため、テクスチャに複数の色成分がある場合には、頻度の小さな画素が多数出現し、均一領域を不均一領域として検出する可能性がある。そこで、フィルタリング処理後、本来のカラー画像のカラー値以外の色が出現しない次の方法で、高周波除去フィルタ処理を行う。
【0059】
一つの方法は、上記のRGB成分に独立に適用するフィルタリング処理の後に、フィルタ処理を施した近傍領域内で、処理結果に最も近い距離の色を選択する。色の距離は、たとえばユークリッド距離を使用する。
【0060】
もう一つの方法は、近傍領域内で、画素の3つの色成分であるRGBのうち最も色の変化の大きい成分を選択し、この色成分の中央値を持つRGB値を、前記近傍領域の値として使用する。このRGB値が複数ある場合には、次に色の変化の大きい成分を選択し、この色成分の中央値に近い値を持つRGB値を選択する。さらにこのRGB値が複数ある場合には、最後の色成分の中央値に近い値を持つRGB値を使用する。
【0061】
次に、本発明にもとづきカメラの合焦位置(ピント位置)を検出する方法について説明する。
一様な領域をもつ平面部分では、画像を用いた従来の合焦評価方法では、自動で焦点を合わすことは難しい、たとえば色の変化の少ない撮影画像では、従来のデジタルカメラのオートフォーカスでは焦点が合わない。そこで、このような場合には、本発明にもとづき、画像中の不均一領域を利用して合焦位置を検出することができる。
【0062】
すなわち、本発明にもとづけば、頻度画像の合計S(x,y)と、平均頻度画像gm(x,y)と、同じ検出平均頻度dにより得られた頻度特徴検出画像とのうちのいずれかの画像を用いて、合焦位置を検出することができる。
【0063】
あるいは、本発明にもとづく頻度特徴検出画像に対して従来の様々な合焦評価方法を適用することで、合焦位置を検出することもできる。
すなわち、一様な領域をもつ平面部分の画像においては、合焦位置で頻度特徴検出画像を求めると、ぼけた位置から求めた頻度特徴検出画像よりも全体的に頻度が小さく、高周波成分が多い境界のはっきりした画像となる。
【0064】
そこで、各焦点位置における頻度画像の合計S(x,y)か、平均頻度画像gm(x,y)か、同じ検出平均頻度dにより得られた頻度特徴検出画像g(x,y)かを求め、それらのいずれかの画像を用いて、各画素値の総合計か、あるいは画像中の一部の領域の合計かを求め、最も合計の小さい焦点位置のものを合焦位置で取得したカラー画像より得られた画像とする。あるいは、前記頻度特徴検出画像g(x,y)に、画像中の高周波分を検出する従来の合焦評価方法、たとえば、局所領域の微分値の合計やFFTによる高周波成分の検出などの評価手法を適用することにより、合焦位置を検出することができる。
【0065】
具体的には、たとえば頻度特徴検出画像g(x,y)を用いる場合は、複数の焦点位置で1枚以上のカラー画像を取得し、それぞれの焦点位置で、式(5)または式(6)でdmin=1として検出した頻度特徴検出画像において、頻度特徴検出画像の各画素の合計Vを次式により求め、Vが最も小さいものを合焦位置とする。
【0066】
【数7】
Figure 2004185246
ただし、評価する画像の領域の画素数をI×Jとする。
【0067】
また、頻度画像の合計S(x,y)か、平均頻度画像gm(x,y)を用いる場合は、
【0068】
【数8】
Figure 2004185246
あるいは、
【0069】
【数9】
Figure 2004185246
により評価値Vを求め、Vが最も小さいものを合焦位置とする。
【0070】
頻度特徴検出画像g(x,y)に対して従来の合焦評価方法を適用する場合は、たとえば、微分オペレータである3×3のSobelオペレータを用いて縦方向と横方向の微分値の絶対値を得て、それらの総合計を合焦の評価値として用い、合計値が最も大きいものを合焦位置より得られた画像とすることができる。
【0071】
あるいは、頻度特徴検出画像g(x,y)の隣り合う画素の差分値の絶対値の合計を縦方向と横方向について求め、それらを加算した値を下記式のようにSMDとして、SMDが最大のものを合焦位置より得られた画像とすることもできる。
【0072】
【数10】
Figure 2004185246
【0073】
【実施例】
50mm×35mmの平面状の領域に、図6に示すようなパターンを作成し、インクジェットプリンタEPSON PM−770Cにより、スーパーファイン用紙に印刷したサンプルを実験に使用した。このサンプルは、黄色の背景色の中に、色相を微妙に変えた種々の文字などのパターンを配置しており、人間の目ではほとんどそのパターンを検出することができないものであった。画像の取得には、RGB各8ビット、すなわちRGB各256階調の3CCDカメラを用いた。具体的には、画像の背景色は、8ビットのカラーの黄色(R:245、G:245、B:0)である。画像中の文字などのパターンについての()内の値は、上記の黄色からのRGB各々のオフセット値を表し、RGBの順で示されている。
【0074】
室内の自然光による照明で、図6のサンプルをカメラで撮影した画像を図7に示す。ただし、図7では、特許出願の都合上、無彩色で表示している。これを本発明にもとづきn=10、d=250、dmin=1の条件で検出すると、図8のようになった。図8には、本来の検出すべきパターンの他に、カメラのノイズや照明のむらに起因する不均一部分も同時に検出されている。たとえば、図中の縦筋がそれに該当する。
【0075】
同じサンプルをカメラを換えて撮影し、図8と同じ条件で検出した画像を、図9に示す。図9では、図8の画像のような縦筋は見られなかった。これより、図8における縦方向の筋状の検出部分は、CCDカメラに起因するむらであることが分かった。このむらは、ズーム比を変えたり、あるいは被写体を代えたりしても、いつも同じ位置に現れた。しかし、通常の撮影でこのむらに気付くことは難しいことが分かった。
【0076】
次に、同じサンプルを直径92mmの円柱に貼り付け、自然光により撮影した画像を図10において無彩色で示す。また、これを本発明にもとづきn=10、d=200、dmin=1の条件で検出した結果を、図11に示す。これより、円柱に貼り付けることにより場所によってサンプルの明度が変化しても、色相の異なる部分を検出可能なことが分かった。
【0077】
さらに、図12は、千円札のすかしの部分を、透過光を用いずに、正面からの蛍光灯照明により撮影し、n=25、d=120、dmin=1の条件で検出した結果を示す。この時の照明は、被写体の表面ができるだけ均一な明るさになるように調整した。この図より、肖像の目の二重まぶたまで検出できることが分かった。
【0078】
また、中に二千円札の入った封筒を均一な蛍光灯照明により撮影した画像を図13に示し、さらに、これをn=10、d=4000、dmin=1の条件で検出した結果を図14に示す。封筒の表面と内部の二千円札との間にはわずかな隙間があり、封筒の表から内部の状態を肉眼で知ることは困難である。しかし、検出結果を見ると、二千円札の表に印刷されている守禮門の形がぼんやりと浮かび上がって見える。また、図13をn=10、d=4000、dmin=5の条件で検出すると、図15のように、非常に頻度の少ない部分すなわち封筒の表面に印刷された文字の部分は、不均一領域として検出されなかった。
【0079】
次に、検査対象物の表面がテクスチャ性を有する場合の実施例について説明する。図16は、青色の繊維製品の表面を均一な蛍光灯照明により撮影したカラー画像を無彩色で示す。
【0080】
このカラー画像にガウスフィルタを用いてぼけ画像を作成し、検出を行った画像を、図17、図18に示す。図17は、RGBカラーヒストグラム空間を用いて検出した無彩色の検出画像である。ここで、均一領域は中間色である灰色で表示し、不均一領域は、輝度が画像の平均レベルより明るい場合には中間色より明るく、暗い場合には中間色より暗く表示している。これにより、図17の画像は、輝度むら検出画像となっている。また、図18は、2次元のHS色相平面を用いて頻度画像を作成し、検出を行った例である。この図18は、画像の平均の色相を中心として検出した領域の色相が、色相平面において時計回りにずれている画素を中間色より明るく、反時計回りにずれている画素を中間色より暗く表示した色むら検出画像となっている。どちらの検出画像も、テクスチャの影響を受けずにむらが検出できていることが分かる。
【0081】
図19および図20は、図6および図7に示されるサンプルについて、焦点位置以外は同じ撮影条件および検出条件で得られた頻度特徴検出画像を示す。図19はぼけた位置のもの、図20は合焦位置でのものである。
【0082】
【発明の効果】
以上のように本発明によると、人間の目では識別が難しい部分まで、色の不均一部分を検出することが可能である。この検出された部分の色の特徴を詳しく調べることで、人間の感覚特性に応じた色むらの判定も可能である。また本発明は、凹凸のある表面の色の検査にも適している。このことは、照明の緩やかな変化があっても不均一部分を検出できることを意味しており、このため検査のために厳密な均一照明を必要としない。したがって本発明は、様々な環境の生産現場で利用することができる。
【0083】
また本発明によると、計算量が極めて少なく、このため種々の色むら検査の前処理として利用することができる。さらに、たとえばテクスチャ性を有する検査対象に関しても、ぼけ画像を作成することで、色の不均一部分の検出が可能である。
【0084】
また本発明によると、均一な照明環境の中で均一な対象物を撮影することで、撮像系の不均一部分、たとえば、CCD素子のむらやレンズのむらなどを検出することができる。また、撮像系にむらが少ない場合には、検査対象物の表面の微妙な凹凸を検出することもできる。
【0085】
さらに、従来の画像を用いた合焦手法では明確なエッジ成分が無いと焦点合わせができないという欠点があったが、本発明によれば、エッジのはっきりしない、たとえば、無地の平面(壁)などに焦点を合わすことが可能である。またこのため、焦点位置にもとづきカメラから物体までの距離を算出する距離計測に応用が可能である。
【図面の簡単な説明】
【図1】本発明にもとづく頻度情報を持つカラーヒストグラムを利用した頻度画像と頻度画像の合計との作成手順を示す図である。
【図2】色の不均一部分のある検出対象領域の例を示す図である。
【図3】図2の領域をRGBカラーヒストグラム空間にプロットした例を示す図である。
【図4】色の不均一部分が、均一な円筒面上にある例を示す図である。
【図5】図4の撮影画像をRGBカラーヒストグラム空間にプロットした例を示す図である。
【図6】本発明の方法の実施例において使用したサンプルパターンの図である。
【図7】図6のサンプル画像を撮影したカラー画像の例を示す図である。
【図8】図7の画像にもとづく頻度特徴検出画像の例を示す図である。
【図9】図8で検出に使用したカメラとは異なったカメラを撮影に使用したときの、図7の画像にもとづく頻度特徴検出画像の例を示す図である。
【図10】図6のサンプル画像を円柱の表面に貼り付けて撮影した画像の例を示す図である。
【図11】図10の画像にもとづく頻度特徴検出画像の例を示す図である。
【図12】千円札のすかし部分を撮影し検出を行った頻度特徴検出画像の例を示す図である。
【図13】二千円札の入った封筒を撮影したカラー画像の例を示す図である。
【図14】図13の画像にもとづく頻度特徴検出画像の例を示す図である。
【図15】図14とは異なったパラメータで検出した、図13の画像にもとづく頻度特徴検出画像の例を示す図である。
【図16】繊維製品の表面を撮影したカラー画像の例を示す図である。
【図17】図16の輝度むらを検出した例を示す図である。
【図18】図16の色むらを検出した例を示す図である。
【図19】図6のサンプル画像についての焦点の合わない位置での頻度特徴検出画像の例を示す図である。
【図20】図6のサンプル画像についての焦点の合った位置での頻度特徴検出画像の例を示す図である。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a method for evaluating color uniformity using a color image, and more particularly, to a method for evaluating color uniformity capable of detecting an uneven portion.
[0002]
[Prior art]
In the case of industrial products, the state of coloration of the surface greatly affects the quality of the product during painting or the like, and inspection of color uniformity is indispensable. Further, a camera or a display as a device for transmitting color information is required to have uniform color reproducibility over the light receiving element or the entire display area. Therefore, in such an apparatus, more severe evaluation of color uniformity is important. At present, the evaluation of the uniformity of these colors relies on visual inspection based on the sensitivity of a skilled technician as an evaluation of color unevenness and brightness unevenness of a product. I have. In previous studies, in order to discriminate unevenness, the acquired image was divided into appropriate areas, color features within and between areas were compared, the distribution was examined, and evaluations incorporating human sensory characteristics were performed. ing.
[0003]
Patent Literatures 1 and 2 disclose methods for examining human sensory characteristics, statistically processing the data, and determining color unevenness based on obtained data.
That is, Patent Literature 1 describes a method for identifying color unevenness of a color display using a subjective evaluation experiment based on color vision in a specific race group and using the result as a criterion for determination.
[0004]
Patent Literature 2 describes that the analysis is performed using both the magnitude of the change in color and luminance between the uneven region and the peripheral portion and the geometric size of the uneven region in the plane.
[0005]
Patent Documents 2 to 5 disclose an obtained image that is divided into appropriate regions in order to determine unevenness, color characteristics within a region and between regions are compared, and the distribution is examined. .
[0006]
That is, Patent Document 2 describes that a 7 × 7 vertical and horizontal filter is used to obtain a local region differential value. It is considered that this is because the average value of the differential values in the vicinity has a high correlation with human visibility to the display device. It describes that the uneven area in the plane is examined by the degree of color change on the display image.
[0007]
Patent Document 3 discloses that screen information is divided at a predetermined position and size, color unevenness and luminance unevenness having different spatial frequencies are evaluated based on the divided area, and image quality is evaluated by combining respective evaluation results. Calculate the luminance difference between the pixels present in the divided areas, evaluate the image quality with the maximum value, and repeatedly divide the screen information multiple times at different positions and sizes, and It describes that image quality is evaluated based on a chromaticity difference or a chromaticity gradient.
[0008]
Patent Document 4 describes that image data is divided into a plurality of pixels, a difference between a target pixel and a group of pixels surrounding the target pixel is determined, and a local change in luminance is examined.
Patent Literature 5 describes that an image is divided into regions in which pixel values are within a predetermined range, and a shift between a color of the region and a reference color, which should be an original color, is detected.
[0009]
[Patent Document 1]
JP-A-9-79947
[0010]
[Patent Document 2]
JP-A-10-96681
[0011]
[Patent Document 3]
JP-A-10-2800
[0012]
[Patent Document 4]
JP-A-2002-257679
[0013]
[Patent Document 5]
JP-A-6-295168
[0014]
[Problems to be solved by the invention]
In general, color unevenness has a problem that it is difficult to quantitatively evaluate the color because the boundary is unclear due to continuous change of the color, or where the color unevenness is unknown. That is, there is a problem that it cannot be determined whether the divided areas are objectively correct. Also, in order to search for large unevenness, the image is divided into appropriate areas according to the size of the unevenness to be searched, and the color characteristics and distribution are compared between the areas, so the calculation amount is large and it takes processing time There are also problems. It takes time to find the right area.
[0015]
Therefore, the present invention specifies a non-uniform portion of color as information for a human to determine unevenness, and can stably detect a non-uniform portion region with a small amount of calculation without dividing an image. The purpose is to.
[0016]
[Means for Solving the Problems]
In order to achieve this object, the present invention creates a color histogram having color appearance frequency information in a color image from a color image, and extracts the frequency information from the obtained color histogram. A part is detected as a color non-uniform part in the color image, and a frequently-used part is detected as a color uniform part in the color image.
[0017]
With this configuration, a part with a low frequency of appearance of a color in the color image is detected as a non-uniform part of the color in the color image, and a part with a high frequency is detected as a uniform part of the color in the color image. It is possible to detect a non-uniform color portion up to a portion that is difficult to identify by eyes.
[0018]
That is, the present invention detects the non-uniform part based on the knowledge that the number of pixels in the non-uniform part is smaller than the number of pixels in the non-uniform part in order to evaluate the color uniformity. Therefore, according to the present invention, non-uniform portions that do not match human sensory characteristics, that is, cannot be detected by humans, can also be detected. By examining the color characteristics of the detected portion in more detail according to the inspection object, it is possible to determine color unevenness in accordance with human sensory characteristics. Moreover, according to the present invention, the amount of calculation for processing is extremely small, and therefore, it can be used as preprocessing for various color unevenness inspections.
[0019]
The present invention also provides a color histogram having color appearance frequency information in a color image from a color image, extracting the frequency information from the obtained color histogram, and converting a color value of a color image into the color human of the color. A frequency image is created by replacing the frequency image with a frequency obtained from a stogram.
[0020]
In this manner, a frequency image is created by replacing the color values of the color image with the frequency obtained from the color human stogram of the color, so that a new image in which the color information of the original image is replaced with the frequency information of the color Can be obtained.
[0021]
In addition, the present invention provides a method for displaying a non-uniform portion of a color image as a non-uniform color portion in a color image and displaying the non-uniform portion as a gray image according to the frequency. Is detected as a non-uniform part having a large total area, and a dark part is detected as a non-uniform part having a small total area.
[0022]
This makes it possible to easily detect an uneven portion having a large total area and an uneven portion having a small total area.
Further, the present invention creates a frequency image representing the frequency of appearance of a color in each image from a plurality of color images, and obtains an average frequency image which is an average of the frequency images from the plurality of frequency images. From this average frequency image, the range of the average frequency to be detected is specified, and the color non-uniform portion in the color image is detected.
[0023]
This makes it possible to easily detect a non-uniform color portion in the color image.
[0024]
Further, the present invention obtains a color blurred image by defocusing from an inspection target for evaluating color uniformity, or creates a color blurred image from a focused color image of the inspection target. This blurred image is processed as a color image.
[0025]
In this manner, for example, even when the object to be inspected is a fiber product and a woven pattern is present on the surface thereof, it is possible to detect a non-uniform color portion without making the woven pattern conspicuous.
[0026]
Further, the present invention performs a filtering process so as to create a blurred color image without changing information of a color appearing from a color image.
In this way, when a color blurred image is created from the focused color image of the inspection object by the high-frequency removal filtering process, it is possible to prevent the appearance of a color that is not present in the original color image.
[0027]
The present invention also obtains one or more color images at each of a plurality of focal positions, obtains the above-mentioned frequency image at each of the focal positions from these color images, and obtains the frequency of all pixel values in this frequency image. Or the sum in a partial area of the frequency image is obtained, and the frequency image having the smallest total value is obtained from the most focused color image.
[0028]
In this way, the camera for capturing a color image can easily be focused on the object.
The present invention also obtains one or more color images at each of a plurality of focal positions, obtains the above-mentioned frequency image at each of the focal positions from these color images, and detects a high-frequency component from the frequency image. Then, the frequency image having the highest frequency component is assumed to be obtained from the most focused color image.
[0029]
Even in this case, similarly, the focus of the camera for capturing a color image can be easily adjusted to the target.
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
The color histogram is obtained by plotting in a space in which the value of each pixel constituting the color image, for example, the RGB value is three parameters. Generally, a plot of the RGB values of each pixel in an orthogonal RGB space is particularly called an RGB color histogram. In the color histogram used in the present invention, each point plotted in the parameter space has information on the number of pixels, that is, a frequency. The color histogram is a color system other than RGB, such as HSI, YIQ, L * a * b * It is also possible to use a color system such as, or to use only two of the three parameters of the pixel value of the color image. Hereinafter, the color histogram space having frequency information used in the present invention is simply referred to as a color histogram space.
[0031]
If there is a non-uniform color area in a uniform color area in a color image and the two colors have different hue values or RGB values, they are plotted in two clusters on a color histogram. An artificially created color image has only two colors and is plotted at two points. However, in a color image obtained through some imaging system, there are many pixels having colors around the two colors due to, for example, the influence of noise. There is a distribution around the point. Usually, the area of a non-uniform area should be smaller than the area of a uniform area, so there is a difference in the frequency of the two clusters appearing in the color histogram space. In the non-uniform area cluster, many points with low frequency are distributed.
[0032]
For example, FIG. 2 shows an example of an image obtained by capturing an imaging target in which a non-uniform color region B is present in a uniform color region A through some imaging system. When this is plotted in the RGB color histogram space, it becomes as shown in FIG. The uniform area A in FIG. 2 is plotted in the area A in FIG. 3, and the non-uniform area B in FIG. 2 is plotted in the area B in FIG. In FIG. 3, the brighter the display of the area, the higher the frequency. In FIG. 3, a plurality of circles are marked in each area, which indicates that a distribution is generated in the histogram space due to the influence of noise.
[0033]
The case where it is difficult to distinguish between the region A and the region B in FIG. 2 is the case where the colors of the region A and the region B are close to each other, and corresponds to the case where the distance between the two clusters of the region A and the region B is short in FIG. In such a case, a pixel that should be plotted in the cluster region A of the uniform portion due to noise may be erroneously plotted in the cluster region B of the non-uniform portion. It is extremely small and the relationship between the frequencies of the two clusters does not reverse.
[0034]
In addition to the above, even when a curved surface having a uniform color has a non-uniform area and the hues of the two colors are different, the cluster is divided into two clusters in the color histogram space. For example, FIG. 4 shows an example in which a non-uniform area B having different hues exists on a cylindrical surface 10 having a uniform color area A. When an image captured by the camera 11 as shown in FIG. 4 is plotted in an RGB color histogram space, the result is as shown in FIG. The area A in FIG. 4 is plotted in the area A distributed linearly from the origin in FIG. This is because when the uniform area of the color on the cylindrical surface 10 is photographed by the camera 11, the hue is the same and only the luminance changes due to the curved surface of the cylindrical surface 10. On the other hand, the area B in FIG. 4 is plotted in the area B in FIG. In FIG. 5, as in FIG. 3, the brighter the display of the area, the higher the frequency. According to the frequency information shown in FIG. 5, the frequency of the non-uniform part in the area B is smaller than that of the uniform part in the area A.
[0035]
That is, when a non-uniform color area B exists in a uniform color area A as shown in FIG. 2 and FIG. 4, the non-uniform color part becomes a uniform color part in the color histogram space. Since the frequency is lower than the threshold, the frequency information is used as a threshold value, so that the two areas can be distinguished.
[0036]
However, in a real scene, the color value of a pixel is often affected by various noises. For this reason, in the present invention, the effect of noise is reduced by performing detection using a plurality of color images. The procedure is described below.
[0037]
A color image is represented by a function f (x, y) of two independent variables x and y representing coordinates. In FIG. 1A, hexagonal marks represent blue, triangles represent green, and diamonds represent red. As shown in FIG. 1A, the color image acquired at time t is represented by f (T) (X, y) and f (T) (X, y) plotted on the color histogram space of FIG. (T) And h (T) Has the coordinate values of each of RGB and the frequency at the coordinates.
[0038]
In the present invention, the original image f (T) The color value of (x, y) is represented by h (T) Replace with the frequency obtained. Then, as shown in FIG. (T) (X, y) changes to a grayscale image representing the frequency of appearance of the color values. This image is called frequency image g (T) (X, y).
[0039]
{F (T) N frequency images {g obtained from (x, y), t = 1, 2,..., N} (T) The sum S (x, y) of (x, y), t = 1, 2,..., N} is obtained by the following equation.
[0040]
(Equation 1)
Figure 2004185246
The above procedure is shown in FIG.
[0041]
Further, assuming that the average of n frequency images is gm (x, y), gm (x, y) is expressed as follows.
[0042]
(Equation 2)
Figure 2004185246
Here, gm (x, y) is called an average frequency image, and the value of each pixel of gm (x, y) takes a real value.
[0043]
The threshold value of the frequency for discriminating between the uniform area and the non-uniform area is d, and here, this is called a detection average frequency. Since the color appearance frequency of the non-uniform region is lower than that of the uniform region, a portion having a value smaller than the threshold value d among the pixels of gm (x, y) is detected as the non-uniform region. When there are a plurality of non-uniform areas, the size of the non-uniform area detected varies depending on the value of d.
[0044]
Detection is performed by the following equation.
[0045]
[Equation 3]
Figure 2004185246
G detected b (X, y) is a binary image, g b The (x, y) 0 pixel portion represents an uneven region, and the 1 pixel portion represents a uniform region.
[0046]
When there are a plurality of non-uniform regions, it is easier to understand that the values of the pixels equal to or smaller than the threshold value d are displayed in a grayscale image instead of a binary image.
An image in which the frequencies from 0 to the threshold value, that is, the average detection frequency d is displayed in shades using the i-bit image memory is represented by the following equation.
[0047]
(Equation 4)
Figure 2004185246
2 detected in this way i -1 gradation image g d (X, y) is herein referred to as a frequency feature detection image.
[0048]
That is, according to the above equation, an image is obtained in which the non-uniform area up to the threshold value d is displayed in a state where the shading changes according to the frequency, and g d A bright portion of (x, y) indicates a portion having a large total area of the non-uniform portions, and a dark portion indicates a portion having a small area of the non-uniform portion.
[0049]
In the above equation (4), a region smaller than d is detected as a non-uniform region. d Among the pixels of (x, y), those whose density is very small and dark may not be recognized as uneven by human eyes or may not be necessary. Therefore, a lower limit threshold value for d is set, and this is set to d min And That is, d min It is practical that only the range from to d is represented by a grayscale image.
[0050]
Average frequency is d min 2 for the range above and less than d i The frequency feature detection image as a -1 step gray-scale image is as follows.
[0051]
(Equation 5)
Figure 2004185246
Where 1 ≦ d min <D.
[0052]
Where (gm (x, y) -d min ) Is calculated from the value of each pixel of gm (x, y) by d min Means to reduce.
[0053]
Using the relationship of equation (2), equation (5) becomes as follows.
[0054]
(Equation 6)
Figure 2004185246
Where 1 ≦ d min <D.
[0055]
In the present invention, it is also possible to select a color space suitable for the object to be inspected and the contents instead of the above-described RGB color histogram space. For example, if only the hue is inspected, only a two-dimensional hue plane can be used.
[0056]
Next, a case where the surface of the inspection object has a texture, for example, a case where color unevenness of a fiber product is detected will be described. In such a case, if the above procedure is applied as it is, in addition to the color unevenness, a fiber woven pattern, that is, a texture may be detected, and the color unevenness may not be accurately detected. In such a case, when acquiring an image, the focus is slightly blurred, and the detection is performed such that the texture of the fiber is not conspicuous.
[0057]
Alternatively, after obtaining an in-focus image, the image can be blurred by filtering processing for removing high-frequency components of the image. As the high-frequency removal filtering processing, in the case of monochrome image processing, a moving average method or a blurring method using a two-dimensional Gaussian filter can be used. In each case, a blurred image is set by setting a domain of a two-dimensional filter such as 3 × 3 or 5 × 5, setting a coefficient in this domain, and performing a convolution operation between the filter and the original image. obtain. The domain of the filter is referred to as a neighborhood of the filter. When these techniques are applied to a color image, in the present invention, they are independently applied to each RGB component of the color image. The size and coefficient of the region near the filter to be applied are determined according to the frequency of the texture to be inspected.
[0058]
In the above filtering method, there is a possibility that a color that does not exist in the original color image may appear. For this reason, when a texture has a plurality of color components, a large number of pixels with low frequency appear, and a uniform area may be detected as a non-uniform area. Therefore, after the filtering process, the high frequency removal filter process is performed by the following method in which colors other than the color values of the original color image do not appear.
[0059]
According to one method, after the filtering process independently applied to the RGB components, a color having a distance closest to the processing result is selected in a filtered neighboring region. As the color distance, for example, the Euclidean distance is used.
[0060]
Another method is to select a component having the largest color change among the three color components RGB of the pixel in the neighboring region, and to calculate an RGB value having a median value of the color components as a value of the neighboring region. Use as If there are a plurality of RGB values, a component having the next largest color change is selected, and an RGB value having a value close to the median of the color components is selected. Further, when there are a plurality of RGB values, an RGB value having a value close to the median value of the last color component is used.
[0061]
Next, a method of detecting the focus position (focus position) of the camera according to the present invention will be described.
It is difficult to automatically focus on a plane portion having a uniform area using the conventional focus evaluation method using images. Does not fit. Therefore, in such a case, the in-focus position can be detected by using the non-uniform area in the image according to the present invention.
[0062]
That is, according to the present invention, the sum of the frequency images S (x, y), the average frequency image gm (x, y), and the frequency feature detection image obtained by the same detection average frequency d The focus position can be detected using one of the images.
[0063]
Alternatively, the focus position can be detected by applying various conventional focus evaluation methods to the frequency feature detection image based on the present invention.
That is, in the image of the plane portion having a uniform region, when the frequency feature detection image is obtained at the in-focus position, the frequency is generally lower than that of the frequency feature detection image obtained from the blurred position, and the high frequency component is large. An image with clear boundaries is obtained.
[0064]
Therefore, the sum S (x, y) of the frequency images at each focal position, the average frequency image gm (x, y), or the frequency feature detection image g obtained by the same detection average frequency d d (X, y), and using either of these images, the total sum of each pixel value or the sum of some areas in the image is calculated. Assume that the image is obtained from the color image obtained at the in-focus position. Alternatively, the frequency feature detection image g d A conventional focus evaluation method for detecting high-frequency components in an image, for example, an evaluation method such as a sum of differential values of a local region or detection of a high-frequency component by FFT is applied to (x, y) to achieve focus. The position can be detected.
[0065]
Specifically, for example, the frequency feature detection image g d When (x, y) is used, one or more color images are acquired at a plurality of focal positions, and at each focal position, d is calculated according to equation (5) or (6). min In the frequency feature detection image detected as = 1, the sum V of each pixel of the frequency feature detection image is obtained by the following equation, and the one with the smallest V is set as the focus position.
[0066]
(Equation 7)
Figure 2004185246
However, the number of pixels in the area of the image to be evaluated is I × J.
[0067]
When using the sum S (x, y) of the frequency images or the average frequency image gm (x, y),
[0068]
(Equation 8)
Figure 2004185246
Or
[0069]
(Equation 9)
Figure 2004185246
The evaluation value V is obtained by the following formula, and the one with the smallest V is set as the focus position.
[0070]
Frequency feature detection image g d When the conventional focus evaluation method is applied to (x, y), for example, the absolute value of the differential value in the vertical direction and the horizontal direction is obtained using a 3 × 3 Sobel operator as a differential operator, and Using the sum of them as the focus evaluation value, the image with the largest total value can be used as the image obtained from the focus position.
[0071]
Alternatively, the frequency feature detection image g d The sum of the absolute values of the difference values of adjacent pixels of (x, y) is obtained in the vertical direction and the horizontal direction, and the value obtained by adding them is defined as SMD as in the following equation. The obtained image can also be used.
[0072]
(Equation 10)
Figure 2004185246
[0073]
【Example】
A pattern shown in FIG. 6 was formed in a 50 mm × 35 mm planar area, and a sample printed on super fine paper by an inkjet printer EPSON PM-770C was used for the experiment. In this sample, various patterns of characters and the like whose hue was slightly changed were arranged in a yellow background color, and the patterns could hardly be detected by human eyes. An image was obtained using a 3CCD camera having 8 bits for each of RGB, that is, 256 gradations for each of RGB. Specifically, the background color of the image is 8-bit yellow (R: 245, G: 245, B: 0). Values in parentheses for patterns such as characters in an image represent offset values of each of RGB from the above yellow, and are shown in the order of RGB.
[0074]
FIG. 7 shows an image obtained by photographing the sample of FIG. 6 with a camera using natural room lighting. However, in FIG. 7, it is displayed in achromatic color for convenience of patent application. According to the present invention, n = 10, d = 250, d min FIG. 8 shows the result of detection under the condition of = 1. In FIG. 8, in addition to the original pattern to be detected, non-uniform portions due to camera noise and uneven illumination are also detected at the same time. For example, the vertical stripes in the figure correspond thereto.
[0075]
FIG. 9 shows an image obtained by photographing the same sample by changing the camera and detecting the same sample under the same conditions as in FIG. In FIG. 9, the vertical streak as in the image of FIG. 8 was not seen. From this, it was found that the vertical streak-like detection portion in FIG. 8 was uneven due to the CCD camera. This unevenness always appeared at the same position even when the zoom ratio was changed or the subject was changed. However, it turned out that it was difficult to notice this unevenness in normal shooting.
[0076]
Next, the same sample was pasted on a cylinder having a diameter of 92 mm, and an image photographed by natural light is shown in achromatic color in FIG. Further, according to the present invention, n = 10, d = 200, d min FIG. 11 shows the result of detection under the condition of = 1. From this, it was found that even if the brightness of the sample changes depending on the location by attaching the sample to the cylinder, a portion having a different hue can be detected.
[0077]
Further, FIG. 12 shows a photograph of the watermark portion of the 1,000-yen bill using fluorescent light illumination from the front without using transmitted light, and n = 25, d = 120, d min The result detected under the condition of = 1 is shown. The illumination at this time was adjusted so that the surface of the subject became as uniform as possible. From this figure, it was found that up to the double eyelid of the portrait eye can be detected.
[0078]
FIG. 13 shows an image obtained by photographing an envelope containing a 2,000-yen bill under uniform fluorescent lighting, and furthermore, n = 10, d = 4000, d min FIG. 14 shows the result of detection under the condition of = 1. There is a slight gap between the surface of the envelope and the 2,000-yen bill inside, making it difficult to know the internal state from the front of the envelope with the naked eye. However, looking at the detection results, the shape of the shrine gate printed on the front of the 2,000-yen bill appears to appear vaguely. FIG. 13 shows n = 10, d = 4000, d min When the detection was performed under the condition of = 5, as shown in FIG. 15, a very infrequent portion, that is, a portion of a character printed on the surface of the envelope was not detected as a non-uniform region.
[0079]
Next, an embodiment in the case where the surface of the inspection object has a texture will be described. FIG. 16 shows an achromatic color image obtained by photographing the surface of a blue textile product using uniform fluorescent lamp illumination.
[0080]
FIGS. 17 and 18 show images obtained by forming a blurred image on the color image using a Gaussian filter and detecting the blurred image. FIG. 17 is an achromatic color detection image detected using the RGB color histogram space. Here, the uniform area is displayed in gray as an intermediate color, and the non-uniform area is displayed brighter than the intermediate color when the luminance is higher than the average level of the image, and darker than the intermediate color when the luminance is dark. Thus, the image in FIG. 17 is a brightness unevenness detection image. FIG. 18 shows an example in which a frequency image is created using a two-dimensional HS hue plane and detection is performed. FIG. 18 shows a color in which the hue of a region detected centering on the average hue of an image is shifted clockwise in a hue plane to a pixel brighter than the intermediate color, and a pixel shifted counterclockwise to a darker color than the intermediate color. The unevenness detection image is obtained. In each of the detected images, it can be seen that the unevenness can be detected without being affected by the texture.
[0081]
FIGS. 19 and 20 show frequency characteristic detection images obtained under the same shooting conditions and detection conditions except for the focal position for the samples shown in FIGS. 6 and 7. FIG. 19 shows a blurred position, and FIG. 20 shows a focused position.
[0082]
【The invention's effect】
As described above, according to the present invention, it is possible to detect a non-uniform color portion up to a portion that is difficult to be identified by human eyes. By examining the color characteristics of the detected portion in detail, it is possible to determine color unevenness according to the human sensory characteristics. The present invention is also suitable for inspecting the color of an uneven surface. This means that non-uniform portions can be detected even if there is a gradual change in illumination, and therefore, strict uniform illumination is not required for inspection. Therefore, the present invention can be used in production sites in various environments.
[0083]
Further, according to the present invention, the amount of calculation is extremely small, and therefore, it can be used as preprocessing for various color unevenness inspections. Further, for an inspection object having a texture, for example, by creating a blurred image, it is possible to detect a non-uniform color portion.
[0084]
Further, according to the present invention, by photographing a uniform object in a uniform illumination environment, it is possible to detect a non-uniform portion of an imaging system, for example, a CCD element unevenness or a lens unevenness. Further, when the imaging system has little unevenness, it is possible to detect fine irregularities on the surface of the inspection object.
[0085]
Further, the conventional focusing method using an image has a disadvantage that focusing cannot be performed without a clear edge component. However, according to the present invention, the edge is not clear, for example, a plain plane (wall) or the like. It is possible to focus on Therefore, the present invention can be applied to distance measurement for calculating a distance from a camera to an object based on a focal position.
[Brief description of the drawings]
FIG. 1 is a diagram showing a procedure for creating a frequency image and a total of frequency images using a color histogram having frequency information based on the present invention.
FIG. 2 is a diagram showing an example of a detection target area having a non-uniform color portion.
FIG. 3 is a diagram showing an example in which the region of FIG. 2 is plotted in an RGB color histogram space.
FIG. 4 is a diagram showing an example in which a non-uniform color portion is on a uniform cylindrical surface.
FIG. 5 is a diagram showing an example in which the photographed image of FIG. 4 is plotted in an RGB color histogram space.
FIG. 6 is a diagram of a sample pattern used in an embodiment of the method of the present invention.
FIG. 7 is a diagram illustrating an example of a color image obtained by photographing the sample image of FIG. 6;
FIG. 8 is a diagram showing an example of a frequency feature detection image based on the image of FIG. 7;
9 is a diagram showing an example of a frequency feature detection image based on the image of FIG. 7 when a camera different from the camera used for detection in FIG. 8 is used for shooting.
10 is a diagram illustrating an example of an image obtained by attaching the sample image of FIG. 6 to a surface of a cylinder and photographing the sample image.
FIG. 11 is a diagram showing an example of a frequency feature detection image based on the image of FIG. 10;
FIG. 12 is a diagram illustrating an example of a frequency characteristic detection image obtained by photographing and detecting a watermark portion of a 1,000-yen bill.
FIG. 13 is a diagram illustrating an example of a color image obtained by photographing an envelope containing a 2,000-yen bill.
FIG. 14 is a diagram showing an example of a frequency feature detection image based on the image of FIG.
FIG. 15 is a diagram showing an example of a frequency feature detection image based on the image of FIG. 13 detected with parameters different from those in FIG. 14;
FIG. 16 is a diagram showing an example of a color image obtained by photographing the surface of a textile product.
FIG. 17 is a diagram showing an example of detecting uneven brightness in FIG. 16;
FIG. 18 is a diagram illustrating an example in which color unevenness in FIG. 16 is detected.
19 is a diagram showing an example of a frequency feature detection image at a position where the sample image of FIG. 6 is out of focus.
20 is a diagram illustrating an example of a frequency feature detection image at a focused position with respect to the sample image of FIG. 6;

Claims (8)

カラー画像からこのカラー画像における色の出現頻度情報を持つカラーヒストグラムを作成し、得られたカラーヒストグラムから前記頻度情報を抽出し、この抽出された頻度の低い部分を前記カラー画像における色の不均一部分として検出するとともに、頻度の高い部分を前記カラー画像における色の均一部分として検出することを特徴とする色の均一性の評価方法。A color histogram having color appearance frequency information in the color image is created from the color image, the frequency information is extracted from the obtained color histogram, and the extracted low-frequency portion is represented by the color unevenness in the color image. A method for evaluating color uniformity, comprising: detecting a part having a high frequency as a uniform part of a color in the color image while detecting the part as a part. カラー画像からこのカラー画像における色の出現頻度情報を持つカラーヒストグラムを作成し、得られたカラーヒストグラムから前記頻度情報を抽出し、カラー画像のカラー値をその色の前記カラーヒトストグラムより得られる頻度に置き換えて頻度画像を作成することを特徴とする色の均一性の評価方法。A color histogram having color appearance frequency information in this color image is created from the color image, the frequency information is extracted from the obtained color histogram, and the color value of the color image is obtained from the color human histogram of the color. A method for evaluating color uniformity, characterized in that a frequency image is created by substituting a color image. 抽出された頻度の低い部分をカラー画像における色の不均一部分として、この不均一部分をその頻度に応じた濃淡画像で表示することで、この濃淡画像の明るい部分を合計面積の大きい不均一部分として検出するとともに、暗い部分を合計面積の小さい不均一部分として検出することを特徴とする請求項2記載の色の均一性の評価方法。The extracted low-frequency part is regarded as a non-uniform part of the color in the color image, and the non-uniform part is displayed as a gray-scale image according to the frequency. The color uniformity evaluation method according to claim 2, further comprising detecting a dark portion as a non-uniform portion having a small total area. 複数枚のカラー画像から、それぞれの画像における色の出現頻度を表す頻度画像を作成し、これらの複数枚の頻度画像からそれらの頻度画像の平均である平均頻度画像を得て、この平均頻度画像より、検出したい平均頻度の範囲を指定して、前記カラー画像における色の不均一部分を検出することを特徴とする請求項2または3記載の色の均一性の評価方法。From the plurality of color images, a frequency image representing the frequency of appearance of the color in each image is created, and an average frequency image which is an average of the frequency images is obtained from the plurality of frequency images, and the average frequency image is obtained. 4. The color uniformity evaluation method according to claim 2, wherein a range of an average frequency to be detected is specified, and a color non-uniform part in the color image is detected. 色の均一性を評価するための検査対象よりピントをぼかしてカラーのぼけ画像を取得するか、あるいは前記検査対象についてのピントの合ったカラー画像よりカラーのぼけ画像を作成し、このぼけ画像をカラー画像として処理を行う請求項1から4までのいずれか1項記載の色の均一性の評価方法。Obtain a color blurred image by defocusing from the inspection target to evaluate the color uniformity, or create a color blurred image from the focused color image of the inspection target, and 5. The method for evaluating color uniformity according to claim 1, wherein the processing is performed as a color image. カラー画像から出現する色の情報を変えずにカラーのぼけ画像を作成するようにフィルタ処理を行うことを特徴とする請求項5記載の色の均一性の評価方法。6. The color uniformity evaluation method according to claim 5, wherein a filter process is performed so as to create a blurred color image without changing information of a color appearing in the color image. 複数の焦点位置のそれぞれにおいて1枚以上のカラー画像を取得し、これらのカラー画像より、それぞれの焦点位置で、請求項2から4までのいずれか1項に記載の頻度画像を得て、この頻度画像における全画素値の頻度の合計か、あるいは、前記頻度画像中の一部の領域内の合計を求め、その合計値が最も小さい頻度画像を、最も焦点の合ったカラー画像より得られたものとすることを特徴とする色の不均一領域を利用した焦点位置の検出方法。At least one color image is acquired at each of the plurality of focal positions, and the frequency image according to any one of claims 2 to 4 is obtained from each of the color images at each focal position. The sum of the frequencies of all the pixel values in the frequency image, or the sum in a part of the frequency image, was obtained, and the frequency image having the smallest total value was obtained from the most focused color image. A focus position detecting method using a non-uniform color region. 複数の焦点位置のそれぞれにおいて1枚以上のカラー画像を取得し、これらのカラー画像より、それぞれの焦点位置で、請求項2から4までのいずれか1項に記載の頻度画像を得て、この頻度画像に対し高周波成分を検出し、最も高周波成分の多い頻度画像を、最も焦点の合ったカラー画像より得られたものとすることを特徴とする色の不均一領域を利用した焦点位置の検出方法。At least one color image is acquired at each of the plurality of focal positions, and the frequency image according to any one of claims 2 to 4 is obtained from each of the color images at each focal position. Detecting a high-frequency component in a frequency image, and detecting a frequency image having the highest frequency component as a color image having the highest focus, using a color non-uniform area. Method.
JP2002350577A 2002-12-03 2002-12-03 Evaluation method of color uniformity Expired - Lifetime JP4315243B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002350577A JP4315243B2 (en) 2002-12-03 2002-12-03 Evaluation method of color uniformity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002350577A JP4315243B2 (en) 2002-12-03 2002-12-03 Evaluation method of color uniformity

Publications (2)

Publication Number Publication Date
JP2004185246A true JP2004185246A (en) 2004-07-02
JP4315243B2 JP4315243B2 (en) 2009-08-19

Family

ID=32752740

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002350577A Expired - Lifetime JP4315243B2 (en) 2002-12-03 2002-12-03 Evaluation method of color uniformity

Country Status (1)

Country Link
JP (1) JP4315243B2 (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309914A (en) * 2004-04-23 2005-11-04 Omron Corp Method for processing color image and image processor
JP2008145316A (en) * 2006-12-12 2008-06-26 Hamamatsu Metrix Kk Device for inspecting color unevenness
JP2008185526A (en) * 2007-01-31 2008-08-14 Nec Corp Color discrimination device and method
JP2010182330A (en) * 2010-04-05 2010-08-19 Omron Corp Method for processing color image and image processor
JP2010186485A (en) * 2010-04-05 2010-08-26 Omron Corp Method of processing color image and image processing apparatus
JP2010218560A (en) * 2010-04-05 2010-09-30 Omron Corp Method for processing color image and image processing apparatus
CN115835016A (en) * 2022-11-16 2023-03-21 中国科学院新疆理化技术研究所 Radiation-resistant camera open-loop type automatic focusing method, device, equipment and medium
KR102625840B1 (en) * 2022-08-24 2024-01-15 국방과학연구소 Scene based non-uniformity correction apparatus and method of infrared camera using image patch entropy

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5984045B2 (en) * 2012-04-24 2016-09-06 株式会社電力機材サービス Automated method and apparatus for judging natural deterioration of synthetic fiber safety ropes etc. by the degree of fading of surface color

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309914A (en) * 2004-04-23 2005-11-04 Omron Corp Method for processing color image and image processor
JP4513394B2 (en) * 2004-04-23 2010-07-28 オムロン株式会社 Color image processing method and image processing apparatus
JP2008145316A (en) * 2006-12-12 2008-06-26 Hamamatsu Metrix Kk Device for inspecting color unevenness
JP2008185526A (en) * 2007-01-31 2008-08-14 Nec Corp Color discrimination device and method
JP2010218560A (en) * 2010-04-05 2010-09-30 Omron Corp Method for processing color image and image processing apparatus
JP2010186485A (en) * 2010-04-05 2010-08-26 Omron Corp Method of processing color image and image processing apparatus
JP2010182330A (en) * 2010-04-05 2010-08-19 Omron Corp Method for processing color image and image processor
JP4670993B2 (en) * 2010-04-05 2011-04-13 オムロン株式会社 Color image processing method and image processing apparatus
JP4670995B2 (en) * 2010-04-05 2011-04-13 オムロン株式会社 Color image processing method and image processing apparatus
JP4670994B2 (en) * 2010-04-05 2011-04-13 オムロン株式会社 Color image processing method and image processing apparatus
KR102625840B1 (en) * 2022-08-24 2024-01-15 국방과학연구소 Scene based non-uniformity correction apparatus and method of infrared camera using image patch entropy
CN115835016A (en) * 2022-11-16 2023-03-21 中国科学院新疆理化技术研究所 Radiation-resistant camera open-loop type automatic focusing method, device, equipment and medium
CN115835016B (en) * 2022-11-16 2024-04-23 中国科学院新疆理化技术研究所 Open-loop type automatic focusing method, device, equipment and medium for radiation-resistant camera

Also Published As

Publication number Publication date
JP4315243B2 (en) 2009-08-19

Similar Documents

Publication Publication Date Title
KR101338576B1 (en) Defect inspection device for inspecting defect by image analysis
IES20060559A2 (en) Automatic detection and correction of non-red flash eye defects
WO2007095553A2 (en) Automatic detection and correction of non-red eye flash defects
KR20130142118A (en) Method for identifying and defining basic patterns forming the tread design of a tyre
JP2007130329A (en) Appearance inspection method by image
CN109064439B (en) Partition-based single-side light-entering type light guide plate shadow defect extraction method
JP4315243B2 (en) Evaluation method of color uniformity
JP2002148195A (en) Surface inspection apparatus and surface inspection method
JP2009036582A (en) Inspection method, inspection device and inspection program of plane display panel
KR101608843B1 (en) System and Method for Automatically Detecting a Mura Defect using Advanced Weber&#39;s Law
JP3333568B2 (en) Surface defect inspection equipment
JP2007155405A (en) Visual inspection method and visual inspection device
JP2006226837A (en) Method and apparatus for inspecting stain
JP5288154B2 (en) Image quality inspection device
JP4115378B2 (en) Defect detection method
JP3464182B2 (en) Processing color images
JPH0993443A (en) Color-monochromatic image conversion method and edge position detection method for object to be inspected
JP4089780B2 (en) Color image processing method
JP2001028059A (en) Method and device for color unevenness inspection
JP2001235319A (en) Shading correcting apparatus and shading correcting method, and surface inspection apparatus
JP2008185479A (en) Method for judging flaw on processed surface
JP2007198850A (en) Irregularity inspection method and apparatus
JP5603964B2 (en) Flat panel display inspection method, inspection apparatus, and inspection program
JP2004257826A (en) Visual examination method using color image and visual examination device
JPH02252392A (en) Picture quality evaluating method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20041227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070611

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070724

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070921

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20071016

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20080430

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090317

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090512

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4315243

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120529

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20150529

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term