JP2004242099A - Color distortion correction method, color distortion correction device, mobile terminal, program, and storage medium - Google Patents
Color distortion correction method, color distortion correction device, mobile terminal, program, and storage medium Download PDFInfo
- Publication number
- JP2004242099A JP2004242099A JP2003029920A JP2003029920A JP2004242099A JP 2004242099 A JP2004242099 A JP 2004242099A JP 2003029920 A JP2003029920 A JP 2003029920A JP 2003029920 A JP2003029920 A JP 2003029920A JP 2004242099 A JP2004242099 A JP 2004242099A
- Authority
- JP
- Japan
- Prior art keywords
- color
- image data
- image
- illumination condition
- illumination
- 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.)
- Withdrawn
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像に対し、照明条件の違いによる色歪みを補正するための技術に関する。
【0002】
【従来の技術】
一般的に、撮影対象が撮影される際に撮影対象に当たる照明の具合、即ち照明条件の違いによって、撮影された画像における撮影対象の色は微妙に異なるものである。このような照明条件の違いに応じた色の違い、即ち色歪みを補正するためのカラー画像変換装置が特許文献1に記載されている。このカラー画像変換装置には、補正基準となる所定の照明条件の下で撮影された各色票を含むカラーチャートの画像の情報が予め記憶されている。また、このカラー画像変換装置で扱われる撮影対象は、各色票を含むカラーチャートとともに撮影される。そして、この画像変換装置は、撮影対象と共に撮影されたカラーチャートに含まれる各色票に関する画像情報と、予め記憶されたカラーチャートに含まれる各色票に関する画像情報との対応関係を導出し、この対応関係を用いて、撮影対象を撮影して得られる画像の色歪みを補正する。
【0003】
【特許文献1】
特開2002−152768号公報
【0004】
【発明が解決しようとする課題】
しかし、このカラー画像変換装置によれば、被写界内、即ち、撮影対象を撮影するための撮影領域内に、カラーチャートを撮影するための領域が必要となる。このため、撮影領域が小さい場合には、撮影領域に占めるカラーチャートの割合が大きくなり、撮影される撮影対象の占める割合が小さくなる恐れがある。
また、カラーチャートに含まれる色票毎に上述の対応関係を導出するため、画像の色歪みを補正する処理に時間が掛かってしまう。
【0005】
そこで、本発明は、以上説明した事情に鑑みてなされたものであり、撮影対象を撮影するための撮影領域を有効に使用することができ、撮影対象を撮影して得られる画像の色歪みを補正する処理を短時間で行うことができる色歪み補正技術を提供する。
【0006】
【課題を解決するための手段】
本発明は、複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて記憶手段に予め記憶させる補正パラメータ記憶ステップと、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得ステップと、前記対象取得ステップで取得された画像データについて、その照明条件を推定する推定ステップと、前記推定ステップで推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得ステップで取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正ステップとを備えることを特徴とする色歪み補正方法を提供する。
【0007】
また、本発明は、情報を記憶する記憶手段と、複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて前記記憶手段に予め記憶させる補正パラメータ記憶手段と、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得手段と、前記対象取得手段で取得された画像データについて、その照明条件を推定する推定手段と、前記推定手段で推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得手段で取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正手段とを備えることを特徴とする色歪み補正装置を提供する。
【0008】
また、本発明は、情報を記憶する記憶手段と、複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて前記記憶手段に予め記憶させる補正パラメータ記憶手段と、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得手段と、前記対象取得手段で取得された画像データについて、その照明条件を推定する推定手段と、前記推定手段で推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得手段で取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正手段とを備えることを特徴とする携帯端末を提供する。
【0009】
また、本発明は、コンピュータに、複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて記憶手段に予め記憶させる補正パラメータ記憶ステップと、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得ステップと、前記対象取得ステップで取得された画像データについて、その照明条件を推定する推定ステップと、前記推定ステップで推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得ステップで取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正ステップとを実行させるためのプログラムを提供する。
【0010】
また、本発明は、上述のプログラムを記憶した記憶媒体を提供する。
【0011】
本発明によれば、複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて記憶手段に予め記憶させる。そして、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得し、この画像データについて、その照明条件を推定する。次いで、推定した照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、当該画像データを変更することにより、当該画像データで表される画像の色歪みを補正する。
【0012】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態を詳細に説明する。なお、実施の形態を説明するための全図において、同一機能を有するものは同一符号を付け、その繰り返しの説明は省略する。
【0013】
(1.色歪み補正装置1の構成)
<ハードウェア構成>
図2は、色歪み補正装置1のハードウェア構成を示すブロック図である。
画像入力部12は、図示しないスキャナと、このスキャナの走査制御を行う駆動回路と、スキャナによって走査された情報をアナログからディジタルに変換するA/D変換回路とを有する。画像入力部12は、ユーザにより画像がスキャナにセットされると、スキャナにてこの画像の情報を走査し、走査された情報をA/D変換回路にてデジタル化して、画像データを生成し、これをCPU(Central Processing Unit)10に供給する。
操作入力部13は、数字や文字、操作指示などを入力するための複数のキーを備え、これらのキーの操作に応じた操作信号をCPU10に出力する。
表示部14は、画像データをカラーで表示可能な表示パネルと、この表示パネルの表示制御を行う駆動回路とを有する。なお、この表示パネルにおいてカラー表示の際に用いる表色系は、任意の表色系で良い。
CPU10は、記憶部16に記憶されている各種プログラムを実行することにより、バス11を介して接続されている装置各部を制御する。
記憶部16は、ROM(Read Only Memory)17と、RAM(Random Access Memory)18と、HD(Hard Disk)19とを有している。
ROM17には、色歪み補正装置1の装置各部の基本制御を司るプログラムが記憶されている。また、RAM18は、CPU10のワークエリアとして用いられ、RAM18には、CPU10により実行される各種のプログラムやデータが一時的に記憶される。
【0014】
HD(Hard Disk)19には、色歪み補正装置1のオペレーティングシステムなどが記憶されている。また、以下の機能的構成欄で説明する機能をCPU10に実現させるためのプログラムと、その機能が実現される際に用いられる補正パラメータデータベース19a及び補正の基準となるカラーチャートに関する基準データとが記憶されている。なお、カラーチャートとは、図3に示されるように、白色の色票を含むn個の異なる色票を有しているものである。また、基準データとは、このようなカラーチャートに含まれる各色票についてディジタルデータ化されたものである。そして、この基準データに含まれる各色票に関するデータ(以下、基準色票データという)が、それぞれ各色票における真の色を示すデータであり、色票毎の色相の値と彩度の値と明度の値とから構成される。本実施形態においては、画像データの各色に関するデータを、各色に対応する真の色を示すデータに変換することを、色歪みを補正する、という。なお、以下では、色相の値と彩度の値と明度の値とを合わせて画素値という。
【0015】
<機能的構成>
図1は、CPU10によって実現される機能を例示するブロック図である。これらの機能は、1点鎖線の中に示した部分に示されている。
CPU10によって実現される機能を1つに集約したものが、カラーデータ変換機能K1である。カラーデータ変換機能K1は、任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像(以下、対象画像という)を表す画像データ(以下、対象画像データという)が画像入力部12から供給されると、この対象画像データに対し、照明条件の違いによる色歪みを補正した画像を表す画像データ(以下、補正画像データという)を出力する機能である。このカラーデータ変換機能K1は、補正パラメータ記憶機能K2と、画像変換機能K3とに大別される。
【0016】
補正パラメータ記憶機能K2は、カラーチャート画像取得機能K21と、表色系変換機能K22と、基準データ取得機能K23と、照明パラメータ算出機能K24と、カラー変換パラメータ算出機能K25と、データベース記憶機能K26とを集約した機能である。この補正パラメータ記憶機能K2の大略は、複数の照明条件下で撮影されたカラーチャート画像の画像データと、補正の基準となるカラーチャートに関する基準データとを用いて、照明条件の特徴を示す照明パラメータと当該照明条件下における色歪みを補正するためのカラー変換パラメータとを求め、これらを関連付けて補正パラメータデータベース19aに記憶させる、ことである。
【0017】
カラーチャート画像取得機能K21は、複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データ(以下、カラーチャート画像データという)を画像入力部12から取得する機能である。
表色系変換機能K22は、カラーチャート画像取得機能K21により取得されたカラーチャート画像データに含まれる各画素について、画素毎に画素値を算出して、このカラーチャート画像データの表色系を、色相と彩度と明度とを軸とする表色系に変換する機能である。
基準データ取得機能K23は、補正の基準となるカラーチャートに関する基準データを取得する機能である。なお、本実施形態においては、基準データとして、HD19に予め記憶されているものを用いる。しかし、上述のカラーチャート画像取得機能K21によって取得され表色系変換機能K22によって変換された画像データのうち、ある特定の照明条件下における画像データを選択し、これを基準データとして用いるようにしても良い。
照明パラメータ算出機能K24は、表色系変換機能K22によりその表色系が変換されたカラーチャート画像データを用いて、このカラーチャート画像が撮影された時の照明条件の特徴を示す照明パラメータを算出する機能である。
カラー変換パラメータ算出機能K25は、基準データ取得機能K23により取得された基準データの各基準色票データと、表色系変換機能K22によりその表色系が変換された各カラーチャート画像データに含まれるn個の各色票に対応するデータ部分(以下、色票データという)との対応関係を求めることにより、照明条件毎に、色歪み補正のためのカラー変換パラメータを算出する機能である。
データベース記憶機能K26は、照明パラメータ算出機能K24により算出された照明パラメータと、カラー変換パラメータ算出機能K25により算出されたカラー変換パラメータと(以下、これらを合わせて補正パラメータという)を関連付けて補正パラメータデータベース19aに記憶させる機能である。
【0018】
画像変換機能K3は、対象画像データに対する照明パラメータを推定する推定機能K300と、対象データに表される画像の色歪みを補正する補正機能K301とに大別される。推定機能K300は、表色系変換機能K31、照明パラメータ算出機能K32、照明条件検出機能K33とを集約した機能である。補正機能K301は、カラー変換パラメータ選択機能K34、カラー変換機能K35、表色系逆変換機能K36とを集約した機能である。
【0019】
表色系変換機能K31は、画像入力部12から供給された対象画像データに含まれる各画素について、画素毎に画素値を算出し、当該画像データの表色系を、色相と彩度と明度とを軸とする表色系に変換する機能である。
照明パラメータ算出機能K32は、表色系変換機能K31によりその表色系が変換された対象画像データの照明パラメータを暫定的に算出する機能である。照明条件検出機能K33は、照明パラメータ算出機能K32により算出された照明パラメータと最も類似する照明パラメータを検出する機能である。この照明条件検出機能K33により検出された照明パラメータが表す照明条件が、対象画像データに対する照明条件であると推定される。
カラー変換パラメータ選択機能K34は、照明条件検出機能K33により検出された照明パラメータを補正パラメータデータベース19aから読み出し、その照明パラメータに関連付けられて記憶されているカラー変換パラメータを選択する機能である。
カラー変換機能K35は、カラー変換パラメータ選択機能K34により選択されたカラー変換パラメータを用いて対象画像データを変更することにより、当該対象画像データに表される画像の色歪みを補正する機能である。
表色系逆変換機能K36は、カラー変換機能K35により変更された対象画像データの表色系(色相と彩度と明度とを軸とする表色系)を、表色系変換機能K31により変換される前の表色系に変換することにより、補正画像データを出力する機能である。
【0020】
(2.動作)
次に本実施形態の動作について説明する。本実施形態では、まず、事前に▲1▼補正パラメータを補正パラメータデータベース19aに記憶させる。その後、必要に応じて▲2▼撮影対象の画像に対する画像データの色歪みを補正する。そこで、まず、▲1▼に関する動作について説明する。
<▲1▼補正パラメータの記憶動作>
まず、ユーザは、図3に示されるようなn個の色票を有するカラーチャートを、異なるk個の照明条件下で、任意の撮影機を用いて撮影しておく。即ち、k個のカラーチャート画像を用意しておく。なお、撮影の際には、カラーチャートと撮影機との位置関係を固定するようにすれば、各カラーチャート画像において白色の色票が現れる位置が固定されるため、更に良い。
そして、ユーザは、これらk個のカラーチャート画像を、色歪み補正装置1の画像入力部12にそれぞれセットする。すると画像入力部12は、セットされた各カラーチャート画像を表す画像データ(カラーチャート画像データ)をそれぞれ生成し、これらk個のカラーチャート画像データをCPU10に供給する。CPU10は、供給されたk個のカラーチャート画像データを一時的にRAM18に記憶させる。
次いで、ユーザは、操作入力部13を操作することにより、RAM18に記憶されているk個のカラーチャート画像データに対して1つずつ、以下に説明する照明パラメータ算出処理をCPU10に行わせる。
【0021】
図6は、照明パラメータ算出処理の流れを示すフローチャートである。
まず、ユーザは、操作入力部13を操作することにより、RAM18に記憶されているカラーチャート画像データのうち、1つを表示部14に表示させる。すると、表示部14には、このカラーチャート画像データによって表されるカラーチャート画像が表示される。そして、ユーザは、操作入力部13を操作することにより、表示されたカラーチャート画像のうち、白色に表示されている白色領域を指定する(ステップS10)。すると、CPU10は、このカラーチャート画像を表すカラーチャート画像データのうち、指定された白色領域に対応するデータ部分に含まれる各画素について、画素毎の画素値を算出する(ステップS11)。次いで、指定された白色領域に対応するデータ部分に含まれる全ての画素について、画素値の算出を終えると、これらの画素値の平均値を算出する(ステップS12)。なお、以下では、画素値の平均値を平均画素値という。そして、CPU10は、この平均画素値をこのカラーチャート画像データに対する照明パラメータとして、RAM18に一時的に記憶させる。
以上のようにして、ユーザは、1つのカラーチャート画像データに対し、照明パラメータ算出処理をCPU10に行わせる。そして、ユーザは、残りの(k−1)個のカラーチャート画像データについても同様に照明パラメータ算出処理をCPU10に行わせる。これにより、k個の各照明条件に対応した各照明パラメータが算出される。
【0022】
次いで、ユーザが操作入力部13を操作することにより、照明パラメータ算出処理の終了を指示すると、CPU10は、次に、以下に説明するカラー変換パラメータ算出処理を行う。図7は、カラー変換パラメータ算出処理の流れを示すフローチャートである。
まず、CPU10は、RAM18に記憶されているk個のカラーチャート画像データのうち、1つのカラーチャート画像データを読み出し、このカラーチャート画像データに含まれる各色票データについても、色票毎に、平均画素値を算出する(ステップS20)。
【0023】
次いで、CPU10は、ニューラルネットワークの学習を行い(ステップS21)、図4に示されるようなニューラルネットワークを構築する。このニューラルネットワークの学習の際には、学習データを、HD19に記憶されている各基準色票データに対する各平均画素値とし、教師データを、ステップS20で算出した各色票データに対する各平均画素値とし、予め定められたニューラルネットワークの階層数やユニット数や学習則などの各種パラメータを用いる。なお、学習則として、バックプロパゲーションやヘッブ学習などの学習則を用いれば良い。
そして、CPU10は、このニューラルネットワークに基づいて、重み係数を算出する。この重み係数が、このカラーチャート画像データに対するカラー変換パラメータとなる。
【0024】
次いで、CPU10は、RAM18に記憶されている残りの(k―1)個のカラーチャート画像データについても同様に、データ毎にステップS20〜S21の処理を行う。そして、k個全てのカラーチャート画像データについてステップS20〜S21の処理を終えると、ステップS22の判定結果が肯定的となり、CPU10は、各カラーチャート画像データに対するカラー変換パラメータと、上述の照明パラメータ算出処理で算出された各カラーチャート画像データに対する照明パラメータとを関連付けて、補正パラメータデータベース19aに記憶させる。
【0025】
<▲2▼対象画像の色歪み補正動作>
次に、対象画像の色歪みを補正する動作について説明する。
本実施形態で用いる撮影対象は、図5に示されるような白色領域を含むカラーバーコードとする。対象画像は、このようなカラーバーコードが任意の照明条件下で任意の撮影機で撮影された画像とする。
【0026】
ユーザは、操作入力部13を操作することにより、この対象画像を画像入力部12にそれぞれセットする。すると画像入力部12は、セットされた対象画像を表す画像データ(対象画像データ)を生成し、これをCPU10に供給する。CPU10は、供給された対象画像データを一時的にRAM18に記憶させる。
次いで、CPU10は、この対象画像データに含まれる全ての画素について、画素毎に画素値を算出する。これにより、この対象画像データの表色系を、色相と彩度と明度とを軸とする表色系に変換する。そして、以下に説明する照明パラメータ推定処理を行う。
【0027】
図8は、照明パラメータ推定処理の流れを示すフローチャートである。
CPU10は、この対象画像データに含まれる全ての画素のうち、画素値に含まれる彩度が予め定められた閾値Ts以下となる画素を抽出し、これらをRAM18に記憶させる(ステップS30)。そして、RAM18に記憶された画素のうち、画素値に含まれる明度が最大の画素を選択する(ステップS31)。なお、白色は、彩度の値が小さく明度の値が大きいことから、ステップS31で選択された画素が、白色の画素であると推定される。
【0028】
次いで、CPU10は、選択された画素を中心とする近傍画素を選択する。ここでは、近傍画素として、一次近傍の画素を選択する。また、説明の便宜上、この一次近傍の画素に対して、中心となる画素(以下、中心画素という)の左右上下の順で1〜4の識別子を与える。そして、CPU10は、各近傍画素i(i=1〜4:近傍画素の識別子)についてそれぞれ、中心画素との色空間上の距離diを算出する(ステップS32)。このとき、近傍画素iの画素値及び中心画素の画素値を用いて算出する。なお、近傍画素として、二次近傍の画素を選択するようにしても良いし、選択された画素を中心とする半径R内の画素を選択しても良い。
【0029】
次いで、CPU10は、距離di(i=1〜4)の全てが予め定められた閾値Td以下であるか否かを判定する(ステップS33)。なお、距離diが閾値Td以下であれば、この近傍画素iは白色の画素であると推定され、距離diが閾値Tdより大きければ、この近傍画素iは白色の画素でないと推定される。そして、ステップS33の判定結果が肯定的であれば、CPU10は、中心画素と近傍画素(i=1〜4)から構成される領域を白色領域と判定する。以上のようにしてCPU10は、対象画像に含まれる白色領域を推定する。そして、これらの画素の平均画素値を算出する(ステップS34)。この平均画素値が、この対象画像データの暫定的な照明パラメータ(以下、暫定照明パラメータという)となる。
【0030】
なお、ステップS33の判定結果が否定的であれば、CPU10は、RAM18に記憶されている(彩度が閾値Ts以下の画素)のうち、明度が最大の画素を取り除き(ステップS35)、ステップS31に移行する。
【0031】
ステップS34の後、CPU10は、対象画像データの暫定照明パラメータと、補正パラメータデータベース19aに記憶されているk個の各照明条件の照明パラメータとの各ユークリッド距離を算出する。そして、これらの距離のうち、最小の距離を検出し、この最小の距離となるときの照明パラメータを検出する。以上のようにして、この対象画像データの照明パラメータを推定する。次いで、CPU10は、補正パラメータデータベース19aから、この照明パラメータに関連付けられて記憶されているカラー変換パラメータ(ここでは、ニューラルネットワークの重み係数)を読み出す。なお、本実施形態では、照明パラメータの推定に最短距離を用いたが、単純類似度を用いても良い。
【0032】
次いで、CPU10は、読み出したカラー変換パラメータを用いて、RAM18に記憶されている対象画像データに含まれる各画素の画素値を変換することにより、この対象画像データに表される画像の色歪みを補正する。その後、この対象画像データの表色系を、色相と彩度と明度とを軸とする表色系に変換する前の表色系に変換する。そして、変換した対象画像データを出力する。以上のようにして、対象画像データに対し、色歪みを補正した画像を表す補正画像データを出力する。
【0033】
上述した色歪み補正装置1は、撮影対象と共にカラーチャートが撮影されなくとも、この撮影対象が撮影された際の照明条件を推定することで、この撮影対象の画像の色歪みを補正することができる。従って、カラーバーコードなどの情報が撮影されたIDタグなどの小さい対象画像を扱う場合には、好適である。更に、対象画像データに含まれる各色のデータそのものを分析することなく、白色領域のデータのみを分析することで、各色の歪みを補正するため、時間を掛けずに、色歪み補正のための処理を行うことができる。従って、物流管理などに用いられる上記IDタグなどのように、短時間で色歪み補正処理が行われることが必要な対象画像に対しても、好適である。
【0034】
なお、カラーチャート及び撮影対象が、ディジタルカメラなどの撮影画像をディジタル画像データとして出力する撮影機で撮影された場合には、撮影された画像データは、画像入力部12を介さず、図示しない外部インターフェースを介してCPU10に供給されるような構成としても良い。
【0035】
(3.変形例)
以上、本発明の実施形態について説明したが、本発明はその主要な特徴から逸脱することなく他の様々な形態で実施することが可能である。なお、変形例としては、例えば、以下のようなものが考えられる。
【0036】
<1.カラー変換パラメータ算出処理の他の例>
上述のカラー変換パラメータ算出処理では、カラー変換パラメータをニューラルネットワークを用いて算出するようにしたが、線形変換を用いて算出するようにしても良い。なお、本変形例の構成については、上述の実施形態と略同様であるため、その説明を省略する。また、本変形例の動作についても、上述の<▲1▼補正パラメータの記憶動作>において説明した照明パラメータ算出処理が終了するまでの動作は、上述の実施形態と略同様であるため、その説明を省略する。
CPU10は、照明パラメータ算出処理を終えると、次に、上述の処理と同様に、HD19に記憶されている基準データに含まれる各基準色票データの各画素値と、RAM18に記憶されているk個のカラーチャート画像データのうち、1つのカラーチャート画像データに含まれる各色票データの各平均画素値とを算出する。
次いで、CPU10は、学習データを、各色票データに対する各平均画素値とし、教師データを、各基準色票データに対する各画素値とし、以下の変換行列算出処理を行う。
【0037】
図9に、変換行列算出処理の流れを示す。
CPU10は、学習データと教師データとについて、それぞれ対応する1色の色票を代表色票として選択し、この代表色票に関する画素値(以下、代表画素値という)を学習データと教師データとからそれぞれ選択する。そして、学習データの代表画素値を、教師データの代表画素値に変換するための変換行列の係数を算出する(ステップS40)。図10に、これらの学習データ、教師データ、及び変換行列の例を示す。同図においては、教師データのHt(t=1〜n)は色相の値を表し、St(t=1〜n)は彩度の値を表し、It(t=1〜n)は明度の値を表し、これらは、3行1列の行列として表されている。同様に、学習データのHl(l=1〜n)は色相の値を表し、Sl(l=1〜n)は彩度の値を表し、Il(l=1〜n)は明度の値を表し、これらは、3行1列の行列として表されている。変換行列は、3行3列の行列として表されており、変換行列の各apq(P=1〜3、q=1〜3)は、それぞれp行q列目における係数を表している。そして、学習データの代表画素値は、この変換行列を用いて行列変換が行われると、教師データの代表画素値に変換される。
【0038】
次いで、CPU10は、学習データに含まれる代表色票以外の各色票に関する平均画素値について、この変換行列を用いて行列変換を行い、各色票に関する変換後の平均画素値(以下、変換画素値という)を算出する(ステップS41)。そして、各色票関する変換画素値と、教師データに含まれる各基準色票に関する画素値とについて、対応する色票のデータ毎に誤差(ここでは、2乗平均誤差)を求める。更に、これらの誤差の合計(以下、2乗平均誤差合計という)を算出する(ステップS42)。
【0039】
次いで、上述の代表画素値を除いた各色票データの画素値の中から1色の色票に関する画素値を選択し、これを新たな代表画素値として、ステップS40〜S42の処理を行い、この新たな代表画素値に対応する変換行列とこれに基づく2乗平均誤差合計とを算出する。以上のようにして、カラーチャートに含まれる全ての色票について、各色票を代表色票として、ステップS40〜S42の処理を行い、各代表画素値に対応する変換行列とこれに基づく2乗平均誤差合計とをそれぞれ算出する。そして、全ての代表色票についてステップS40〜S42の処理が終えると、ステップS43の判定において判定結果が肯定的となり、ステップS44の処理に移行する。ステップS44では、CPU10は、各代表色票に対する代表画素値に対応する2乗平均誤差合計のうち、最小の値を検出する。次いで、この代表画素値に対する変換行列を検出する(ステップS43)。この変換行列が、この照明条件下で撮影されたカラーチャート画像データに対するカラー変換パラメータとなる。
【0040】
CPU10は、以上のようなステップS40〜ステップS44の変換行列処理を残りの(k−1)個のカラーチャート画像データについても行うことにより、k個の各照明条件下におけるカラーチャート画像データに対応するカラー変換パラメータ(ここでは、変換行列)を得る。CPU10は、これらを上述のカラー変換パラメータ算出処理と同様にして、各カラーチャート画像データに対する照明パラメータと関連付けてそれぞれ補正パラメータデータベース19aに記憶させる。
【0041】
その後、対象画像データの色歪み補正の際に、この対象画像データに対応するカラー変換パラメータを補正パラメータデータベース19aから読み出し、この対象画像データに含まれる画素毎の画素値を線形変換により変換するようにすれば良い。
【0042】
<2.携帯端末に色歪み補正装置1の機能を備える>
上述した色歪み補正装置1の機能を、無線通信機能を有する携帯端末に備える構成としても良い。更に、撮影機能を有する携帯端末に備える構成とすれば、この携帯端末でいつでもどこでもカラー画像を撮影することができるうえに、撮影時の照明条件を問わず、所定の照明条件下で撮影されたカラー画像と同等のカラー画像を常に得ることができる。更に、得られたカラー画像を無線通信機能により他の通信装置へ送ることができるため、様々な事に応用でき得る。
【0043】
【発明の効果】
白色領域を含む撮影対象を撮影するための撮影領域を有効に使用することができ、撮影対象を撮影して得られる画像の色歪みを補正する処理を短時間で行うことができる。
【図面の簡単な説明】
【図1】本発明の実施形態に係る色歪み補正装置1の機能的構成を示すブロック図である。
【図2】同実施形態に係る色歪み補正装置1のハードウェア構成を示すブロック図である。
【図3】同実施形態に係るカラーチャートを例示する図である。
【図4】同実施形態に係るニューラルネットワークを例示する図である。
【図5】同実施形態に係る撮影対象であるカラーバーコードを例示する図である。
【図6】同実施形態に係る照明パラメータ算出処理の流れを示すフローチャートである。
【図7】同実施形態に係るカラー変換パラメータ算出処理の流れを示すフローチャートである。
【図8】同実施形態に係る照明パラメータ推定処理の流れを示すフローチャートである。
【図9】同実施形態の他の例に係る変換行列算出処理の流れを示すフローチャートである。
【図10】同例に係る変換行列の算出式を例示する図である。
【符号の説明】
1・・・補正装置、11・・・バス、12・・・画像入力部、13・・・操作入力部、14・・・表示部、16・・・記憶部、17・・・ROM、18・・・RAM、19・・・HD、19a・・・補正パラメータデータベース。[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technique for correcting a color distortion due to a difference in lighting conditions for an image obtained by shooting a shooting target including a white region under arbitrary lighting conditions.
[0002]
[Prior art]
In general, the color of a photographing target in a photographed image is slightly different depending on the condition of illumination applied to the photographing target when the photographing target is photographed, that is, a difference in lighting conditions. A color image conversion device for correcting a color difference according to such a difference in illumination conditions, that is, a color distortion, is described in Japanese Patent Application Laid-Open No. H11-163873. In this color image conversion apparatus, information of an image of a color chart including each color chart taken under a predetermined illumination condition serving as a correction reference is stored in advance. The object to be imaged handled by this color image conversion apparatus is imaged together with a color chart including each color chart. The image conversion apparatus derives a correspondence between image information on each color chart included in the color chart photographed together with the photographing target and image information on each color chart included in the color chart stored in advance. Using the relationship, the color distortion of the image obtained by shooting the shooting target is corrected.
[0003]
[Patent Document 1]
JP 2002-152768 A
[0004]
[Problems to be solved by the invention]
However, according to this color image conversion device, an area for photographing the color chart is required in the field, that is, in the photographing area for photographing the photographing target. For this reason, when the photographing area is small, the proportion of the color chart in the photographing area increases, and the proportion of the photographing target to be photographed may decrease.
Further, since the above-described correspondence is derived for each color chart included in the color chart, it takes time to correct the color distortion of the image.
[0005]
Therefore, the present invention has been made in view of the circumstances described above, and it is possible to effectively use a photographing area for photographing a photographing target, and to reduce color distortion of an image obtained by photographing a photographing target. Provided is a color distortion correction technique that can perform correction processing in a short time.
[0006]
[Means for Solving the Problems]
The present invention uses each piece of image data representing each image obtained by photographing a color chart having a plurality of different color patches under a plurality of different lighting conditions, using lighting condition information indicating the characteristics of each lighting condition, A correction parameter storing step of obtaining color conversion information for correcting color distortion of an image under illumination conditions, and correlating the obtained illumination condition information with the color conversion information and storing in advance in a storage unit; A target obtaining step of obtaining image data representing an image obtained by shooting a shooting target including a white region under conditions, and an image data obtained in the target obtaining step, an estimation step of estimating an illumination condition thereof; Using the color conversion information stored in the storage unit in association with illumination condition information indicating the characteristics of the illumination condition estimated in the estimation step, By changing the image data acquired by the obtained step, providing a color distortion correcting method characterized by comprising a correction step of correcting color distortion of an image represented by the image data.
[0007]
In addition, the present invention uses a storage unit for storing information and image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, and using each lighting condition. Lighting condition information indicating the characteristics of the above, and color conversion information for correcting color distortion of an image under each lighting condition are obtained, and the obtained lighting condition information and the color conversion information are associated with each other in advance in the storage unit. Correction parameter storage means for storing, object acquisition means for acquiring image data representing an image obtained by photographing a photographing object including a white region under arbitrary illumination conditions, and image data acquired by the object acquisition means. Estimating means for estimating the lighting condition, and color conversion information stored in the storage means in association with lighting condition information indicating characteristics of the lighting condition estimated by the estimating means. There, by changing the image data acquired by the target acquisition means, to provide a color correction apparatus, characterized in that it comprises a correcting means for correcting the color distortion of an image represented by the image data.
[0008]
In addition, the present invention uses a storage unit for storing information and image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, and using each lighting condition. Lighting condition information indicating the characteristics of the above, and color conversion information for correcting color distortion of an image under each lighting condition are obtained, and the obtained lighting condition information and the color conversion information are associated with each other in advance in the storage unit. Correction parameter storage means for storing, object acquisition means for acquiring image data representing an image obtained by photographing a photographing object including a white region under arbitrary illumination conditions, and image data acquired by the object acquisition means. Estimating means for estimating the lighting condition, and color conversion information stored in the storage means in association with lighting condition information indicating characteristics of the lighting condition estimated by the estimating means. There, by changing the image data acquired by the target acquisition means, to provide a mobile terminal, characterized in that it comprises a correcting means for correcting the color distortion of an image represented by the image data.
[0009]
Further, the present invention provides a computer that uses each image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, and uses the image data representing the characteristics of each lighting condition. A correction parameter storing step of obtaining condition information and color conversion information for correcting color distortion of an image under each lighting condition, and storing the obtained lighting condition information and the color conversion information in a storage unit in advance in a storage unit And a target obtaining step of obtaining image data representing an image obtained by shooting a shooting target including a white region under arbitrary lighting conditions, and estimating the lighting condition of the image data obtained in the target obtaining step. And a color conversion stored in the storage unit in association with lighting condition information indicating characteristics of the lighting condition estimated in the estimation step. Using broadcast, by changing the image data acquired by the target acquisition step provides a program for executing a correction step of correcting color distortion of an image represented by the image data.
[0010]
Further, the present invention provides a storage medium storing the above-mentioned program.
[0011]
According to the present invention, illumination condition information indicating the characteristics of each illumination condition, using image data representing each image obtained by photographing a color chart having a plurality of different color patches under a plurality of different illumination conditions, The color conversion information for correcting the color distortion of the image under each illumination condition is obtained, and the obtained illumination condition information and the color conversion information are stored in advance in a storage unit in association with each other. Then, image data representing an image obtained by photographing a photographing target including a white region under arbitrary lighting conditions is acquired, and the lighting conditions are estimated for the image data. Next, the image data is changed by using the color conversion information stored in the storage unit in association with the illumination condition information indicating the characteristics of the estimated illumination condition, thereby changing the image represented by the image data. Correct color distortion.
[0012]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In all the drawings for describing the embodiments, components having the same function are denoted by the same reference numerals, and repeated description thereof will be omitted.
[0013]
(1. Configuration of the color distortion correction device 1)
<Hardware configuration>
FIG. 2 is a block diagram illustrating a hardware configuration of the color
The
The
The
The
The
The
[0014]
The HD (Hard Disk) 19 stores an operating system of the color
[0015]
<Functional configuration>
FIG. 1 is a block diagram illustrating functions realized by the
The function realized by the
[0016]
The correction parameter storage function K2 includes a color chart image acquisition function K21, a color system conversion function K22, a reference data acquisition function K23, an illumination parameter calculation function K24, a color conversion parameter calculation function K25, and a database storage function K26. It is a function that aggregates The correction parameter storage function K2 is roughly based on image data of a color chart image photographed under a plurality of lighting conditions and reference data on a color chart serving as a reference for correction. And a color conversion parameter for correcting the color distortion under the illumination condition are obtained, and are stored in the
[0017]
The color chart image acquisition function K21 outputs image data (hereinafter, referred to as color chart image data) representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions. 12 is a function obtained from.
The color system conversion function K22 calculates a pixel value for each pixel included in the color chart image data acquired by the color chart image acquisition function K21, and converts the color system of the color chart image data into This is a function of converting into a color system based on hue, saturation, and brightness.
The reference data acquisition function K23 is a function for acquiring reference data relating to a color chart that is a reference for correction. In the present embodiment, data stored in the
The illumination parameter calculation function K24 uses the color chart image data whose color system has been converted by the color system conversion function K22 to calculate the illumination parameters indicating the characteristics of the illumination conditions when this color chart image was taken. Function.
The color conversion parameter calculation function K25 is included in each reference color chart data of the reference data acquired by the reference data acquisition function K23 and each color chart image data whose color system is converted by the color system conversion function K22. This function calculates a color conversion parameter for color distortion correction for each lighting condition by obtaining a correspondence relationship with a data portion (hereinafter, referred to as color patch data) corresponding to each of the n color patches.
The database storage function K26 associates the illumination parameters calculated by the illumination parameter calculation function K24 with the color conversion parameters calculated by the color conversion parameter calculation function K25 (hereinafter, these are collectively referred to as correction parameters) and associates them with a correction parameter database. This function is stored in the
[0018]
The image conversion function K3 is roughly classified into an estimation function K300 for estimating an illumination parameter for target image data and a correction function K301 for correcting color distortion of an image represented by the target data. The estimation function K300 is a function obtained by integrating a color system conversion function K31, an illumination parameter calculation function K32, and an illumination condition detection function K33. The correction function K301 is a function obtained by integrating a color conversion parameter selection function K34, a color conversion function K35, and a color system inverse conversion function K36.
[0019]
The color system conversion function K31 calculates a pixel value for each pixel included in the target image data supplied from the
The illumination parameter calculation function K32 is a function for temporarily calculating the illumination parameters of the target image data whose color system has been converted by the color system conversion function K31. The illumination condition detection function K33 is a function of detecting an illumination parameter most similar to the illumination parameter calculated by the illumination parameter calculation function K32. It is estimated that the illumination condition represented by the illumination parameter detected by the illumination condition detection function K33 is the illumination condition for the target image data.
The color conversion parameter selection function K34 is a function of reading out the illumination parameters detected by the illumination condition detection function K33 from the
The color conversion function K35 is a function of correcting the color distortion of the image represented by the target image data by changing the target image data using the color conversion parameter selected by the color conversion parameter selection function K34.
The color system inverse conversion function K36 converts the color system (color system based on hue, saturation, and lightness) of the target image data changed by the color conversion function K35 with the color system conversion function K31. This is a function of outputting corrected image data by converting to a color system before the correction.
[0020]
(2. Operation)
Next, the operation of the present embodiment will be described. In the present embodiment, first, (1) the correction parameters are stored in advance in the
<(1) Operation of storing correction parameters>
First, the user shoots a color chart having n number of color charts as shown in FIG. 3 using an arbitrary camera under different k lighting conditions. That is, k color chart images are prepared. In photographing, it is more preferable to fix the positional relationship between the color chart and the photographing device, since the position where a white color chart appears in each color chart image is fixed.
Then, the user sets these k color chart images in the
Next, the user operates the
[0021]
FIG. 6 is a flowchart illustrating the flow of the illumination parameter calculation process.
First, the user operates the
As described above, the user causes the
[0022]
Next, when the user operates the
First, the
[0023]
Next, the
Then, the
[0024]
Next, the
[0025]
<(2) Operation for correcting color distortion of target image>
Next, an operation for correcting the color distortion of the target image will be described.
The imaging target used in the present embodiment is a color barcode including a white area as shown in FIG. The target image is an image obtained by photographing such a color barcode with an arbitrary photographing device under arbitrary lighting conditions.
[0026]
The user operates the
Next, the
[0027]
FIG. 8 is a flowchart showing the flow of the illumination parameter estimation process.
The
[0028]
Next, the
[0029]
Next, the
[0030]
If the result of the determination in step S33 is negative, the
[0031]
After step S34, the
[0032]
Next, the
[0033]
The above-described color
[0034]
When the color chart and the photographing target are photographed by a photographing machine that outputs a photographed image such as a digital camera as digital image data, the photographed image data does not pass through the
[0035]
(3. Modified example)
As described above, the embodiments of the present invention have been described, but the present invention can be embodied in various other forms without departing from the main features. Note that, for example, the following modifications are possible.
[0036]
<1. Another example of color conversion parameter calculation processing>
In the above-described color conversion parameter calculation processing, the color conversion parameter is calculated using a neural network, but may be calculated using linear conversion. Note that the configuration of this modification is substantially the same as that of the above-described embodiment, and a description thereof will be omitted. Also, regarding the operation of the present modified example, the operation until the illumination parameter calculation processing described in <1> Operation of storing correction parameters described above is substantially the same as that of the above-described embodiment, and therefore will be described. Is omitted.
After completing the illumination parameter calculation process, the
Next, the
[0037]
FIG. 9 shows the flow of the transformation matrix calculation process.
The
[0038]
Next, the
[0039]
Next, a pixel value relating to one color patch is selected from among the pixel values of each color patch data excluding the above-described representative pixel value, and the processes of steps S40 to S42 are performed using this as a new representative pixel value. A transformation matrix corresponding to the new representative pixel value and a root mean square error sum based on the transformation matrix are calculated. As described above, for all the color patches included in the color chart, the processes of steps S40 to S42 are performed using each color patch as a representative color patch, and the conversion matrix corresponding to each representative pixel value and the root mean square The total error is calculated. When the processes of steps S40 to S42 are completed for all the representative color patches, the determination result of step S43 becomes affirmative, and the process proceeds to step S44. In step S44, the
[0040]
The
[0041]
Thereafter, at the time of color distortion correction of the target image data, a color conversion parameter corresponding to the target image data is read from the
[0042]
<2. Equip the mobile terminal with the function of the color
The function of the color
[0043]
【The invention's effect】
It is possible to effectively use a photographing region for photographing a photographing target including a white region, and to perform processing for correcting color distortion of an image obtained by photographing the photographing target in a short time.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a functional configuration of a color
FIG. 2 is a block diagram showing a hardware configuration of the color
FIG. 3 is a diagram illustrating a color chart according to the embodiment;
FIG. 4 is a diagram illustrating a neural network according to the embodiment;
FIG. 5 is a diagram exemplifying a color barcode to be photographed according to the embodiment;
FIG. 6 is a flowchart showing a flow of an illumination parameter calculation process according to the embodiment.
FIG. 7 is a flowchart showing a flow of a color conversion parameter calculation process according to the embodiment.
FIG. 8 is a flowchart showing a flow of an illumination parameter estimation process according to the embodiment.
FIG. 9 is a flowchart illustrating a flow of a transformation matrix calculation process according to another example of the embodiment.
FIG. 10 is a diagram illustrating an example of a calculation formula of a transformation matrix according to the example.
[Explanation of symbols]
Claims (13)
任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得ステップと、
前記対象取得ステップで取得された画像データについて、その照明条件を推定する推定ステップと、
前記推定ステップで推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得ステップで取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正ステップと
を備えることを特徴とする色歪み補正方法。Using each image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, lighting condition information indicating characteristics of each lighting condition, and under each lighting condition A correction parameter storing step of obtaining color conversion information for correcting color distortion of an image, storing the obtained illumination condition information and the color conversion information in a storage unit in advance, and
A target obtaining step of obtaining image data representing an image obtained by shooting a shooting target including a white region under arbitrary lighting conditions,
For the image data acquired in the target acquisition step, an estimation step of estimating the illumination condition,
By using the color conversion information stored in the storage unit in association with the illumination condition information indicating the feature of the illumination condition estimated in the estimation step, by changing the image data acquired in the target acquisition step And correcting the color distortion of the image represented by the image data.
前記対象取得ステップで取得された画像データに含まれる各画素について、画素毎に色相と彩度と明度とを算出し、当該画像データの表色系を色相と彩度と明度とを用いた表色系に変換する表色系変換ステップと、
前記表色系変換ステップで算出された画素毎の色相と彩度と明度とを用いて、前記撮影対象の撮影時における照明条件の特徴を示す照明条件情報を求める照明パラメータ算出ステップと、
前記記憶手段に記憶されている照明条件情報のうち、前記照明パラメータ算出ステップで求められた照明条件情報と最も類似する照明条件情報を検出する照明条件検出ステップと
を備え、
前記照明条件検出ステップで検出された照明条件情報にその特徴が示される照明条件が、前記撮影対象の撮影時における照明条件であると推定する
ことを特徴とする請求項1に記載の色歪み補正方法。The estimating step includes:
For each pixel included in the image data obtained in the target obtaining step, a hue, a saturation, and a brightness are calculated for each pixel, and a color system of the image data is calculated using the hue, the saturation, and the brightness. A color system conversion step for converting to a color system;
Using the hue, saturation, and brightness of each pixel calculated in the color system conversion step, an illumination parameter calculation step of obtaining illumination condition information indicating characteristics of illumination conditions at the time of shooting the shooting target,
An illumination condition detection step of detecting illumination condition information most similar to the illumination condition information obtained in the illumination parameter calculation step, out of the illumination condition information stored in the storage means,
2. The color distortion correction according to claim 1, wherein the illumination condition whose characteristics are indicated in the illumination condition information detected in the illumination condition detection step is estimated to be an illumination condition when the imaging target is photographed. Method.
前記照明条件検出ステップで検出された照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を読み出すカラー変換パラメータ選択ステップと、
前記カラー変換パラメータ選択ステップで読み出された色変換情報を用いて、前記対象取得ステップで取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正するカラー変換ステップと、
前記カラー変換ステップで変更された画像データの表色系を、前記表色系変換ステップで色相と彩度と明度とを用いた表色系に変換する前の表色系に変換する表色系逆変換ステップと
を備えることを特徴とする請求項2に記載の色歪み補正方法。The correcting step includes:
A color conversion parameter selection step of reading color conversion information stored in the storage unit in association with the illumination condition information detected in the illumination condition detection step;
Color conversion for correcting color distortion of an image represented by the image data by changing the image data obtained in the object obtaining step using the color conversion information read in the color conversion parameter selecting step. Steps and
A color system for converting the color system of the image data changed in the color conversion step to a color system before conversion to a color system using hue, saturation, and lightness in the color system conversion step. 3. The color distortion correction method according to claim 2, further comprising an inverse conversion step.
異なる照明条件毎に前記カラーチャートを撮影して得られる画像を表す画像データを取得するカラーチャート画像取得ステップと、
前記カラーチャート画像取得ステップで取得された各画像データに含まれる各色票に対応する色相と彩度と明度とを算出し、当該画像データの表色系を色相と彩度と明度とを用いた表色系に変換する表色系変換ステップと、
補正基準となる前記カラーチャートの有する各色票に対応する色相と彩度と明度とを取得する基準データ取得ステップと、
前記表色系変換ステップで算出された色相と彩度と明度とを用いて、前記カラーチャートの撮影時における照明条件の特徴を示す照明条件情報を求める照明パラメータ算出ステップと、
前記表色系変換ステップで算出された各色票に対応する色相と彩度と明度と、前記基準データ取得ステップで取得された各色票に対応する色相と彩度と明度との対応関係を解析し、前記カラーチャートを撮影して得られる画像の色歪みを補正するための色変換情報を照明条件毎に求めるカラー変換パラメータ算出ステップと、
前記照明パラメータ算出ステップで求められた照明条件情報と、前記カラー変換パラメータ算出ステップで求められた色変換情報とを関連付けて前記記憶手段に記憶させるデータベース記憶ステップと
を備えることを特徴とする請求項1に記載の色歪み補正方法。The correction parameter storing step includes:
A color chart image obtaining step of obtaining image data representing an image obtained by shooting the color chart for each different lighting condition,
The hue, saturation, and brightness corresponding to each color chart included in each image data acquired in the color chart image acquisition step were calculated, and the color system of the image data was calculated using hue, saturation, and brightness. A color system conversion step for converting to a color system;
Reference data acquisition step of acquiring hue, saturation, and lightness corresponding to each color chart having the color chart as a correction reference,
Using the hue, saturation, and lightness calculated in the color system conversion step, an illumination parameter calculation step of obtaining illumination condition information indicating a feature of an illumination condition during shooting of the color chart,
The hue, saturation, and lightness corresponding to each color chart calculated in the color system conversion step, and the correspondence between the hue, saturation, and lightness corresponding to each color chart obtained in the reference data acquisition step are analyzed. A color conversion parameter calculating step of obtaining color conversion information for each illumination condition to correct color distortion of an image obtained by photographing the color chart;
A database storage step of storing the illumination condition information obtained in the illumination parameter calculation step and the color conversion information obtained in the color conversion parameter calculation step in the storage unit in association with each other. 2. The color distortion correction method according to 1.
前記撮影対象を撮影して得られる画像を表す画像データのうち当該画像に含まれる白色領域を表すデータ部分を推定する又は前記カラーチャートを撮影して得られる画像を表す画像データのうち当該画像に含まれる白色領域を表すデータ部分を取得する白色識別ステップと、
前記白色識別ステップで推定又は取得されたデータ部分に含まれる各画素について、画素毎の色相と彩度と明度とを算出する白色画素値算出ステップと、
前記白色画素値算出ステップで算出された色相と彩度と明度とを用いて、前記照明条件情報を求める算出ステップと
を備えることを特徴とする請求項2又は4に記載の色歪み補正方法。The lighting parameter calculation step,
In the image data representing the image obtained by photographing the photographing target, the data portion representing the white area included in the image is estimated, or the image data representing the image obtained by photographing the color chart is subjected to the image. A white color identification step of obtaining a data portion representing a included white area;
For each pixel included in the data portion estimated or obtained in the white identification step, a white pixel value calculation step of calculating hue, saturation, and brightness for each pixel,
The color distortion correction method according to claim 2, further comprising: a calculating step of obtaining the illumination condition information using the hue, saturation, and brightness calculated in the white pixel value calculating step.
複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて前記記憶手段に予め記憶させる補正パラメータ記憶手段と、
任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得手段と、
前記対象取得手段で取得された画像データについて、その照明条件を推定する推定手段と、
前記推定手段で推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得手段で取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正手段と
を備えることを特徴とする色歪み補正装置。Storage means for storing information;
Using each image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, lighting condition information indicating characteristics of each lighting condition, and under each lighting condition Correction parameter storage means for obtaining color conversion information for correcting color distortion of an image, associating the obtained illumination condition information and the color conversion information with the storage means in advance, and
Target acquisition means for acquiring image data representing an image obtained by photographing a photographing target including a white region under arbitrary lighting conditions,
Estimating means for estimating the lighting conditions of the image data acquired by the object acquiring means,
By using the color conversion information stored in the storage unit in association with the illumination condition information indicating the feature of the illumination condition estimated by the estimation unit, by changing the image data acquired by the target acquisition unit A color distortion correcting device for correcting color distortion of an image represented by the image data.
前記対象取得手段で取得された画像データに含まれる各画素について、画素毎に色相と彩度と明度とを算出し、当該画像データの表色系を色相と彩度と明度とを用いた表色系に変換する表色系変換手段と、
前記表色系変換手段で算出された画素毎の色相と彩度と明度とを用いて、前記撮影対象の撮影時における照明条件の特徴を示す照明条件情報を求める照明パラメータ算出手段と、
前記記憶手段に記憶されている照明条件情報のうち、前記照明パラメータ算出手段で求められた照明条件情報と最も類似する照明条件情報を検出する照明条件検出手段と
を備え、
前記照明条件検出手段で検出された照明条件情報にその特徴が示される照明条件が、前記撮影対象の撮影時における照明条件であると推定する
ことを特徴とする請求項6に記載の色歪み補正装置。The estimating means includes:
For each pixel included in the image data obtained by the target obtaining unit, a hue, a saturation, and a brightness are calculated for each pixel, and a color system of the image data is calculated using the hue, the saturation, and the brightness. A color system conversion means for converting to a color system;
Using hue, saturation, and brightness of each pixel calculated by the color system conversion unit, an illumination parameter calculation unit that obtains illumination condition information indicating characteristics of illumination conditions at the time of shooting the shooting target,
Among the illumination condition information stored in the storage unit, the illumination condition information detection unit that detects the illumination condition information most similar to the illumination condition information obtained by the illumination parameter calculation unit,
7. The color distortion correction according to claim 6, wherein the illumination condition indicated by the illumination condition information detected by the illumination condition detection unit is estimated to be an illumination condition at the time of photographing of the photographing target. apparatus.
前記照明条件検出手段で検出された照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を読み出すカラー変換パラメータ選択手段と、
前記カラー変換パラメータ選択手段で読み出された色変換情報を用いて、前記対象取得手段で取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正するカラー変換手段と、
前記カラー変換手段で変更された画像データの表色系を、前記表色系変換手段で色相と彩度と明度とを用いた表色系に変換する前の表色系に変換する表色系逆変換手段と
を備えることを特徴とする請求項7に記載の色歪み補正装置。The correction means,
A color conversion parameter selection unit that reads out color conversion information stored in the storage unit in association with the illumination condition information detected by the illumination condition detection unit;
Color conversion for correcting color distortion of an image represented by the image data by changing the image data acquired by the object acquisition unit using the color conversion information read by the color conversion parameter selection unit. Means,
A color system for converting the color system of the image data changed by the color conversion unit to a color system before conversion to a color system using hue, saturation, and lightness by the color system conversion unit. The color distortion correction device according to claim 7, further comprising an inverse conversion unit.
異なる照明条件毎に前記カラーチャートを撮影して得られる画像を表す画像データを取得するカラーチャート画像取得手段と、
前記カラーチャート画像取得手段で取得された画像データに含まれる各色票に対応する色相と彩度と明度とを算出し、当該画像データの表色系を色相と彩度と明度とを用いた表色系に変換する表色系変換手段と、
補正基準となる前記カラーチャートの有する各色票に対応する色相と彩度と明度とを取得する基準データ取得手段と、
前記表色系変換手段で算出された色相と彩度と明度とを用いて、前記カラーチャートの撮影時における照明条件の特徴を示す照明条件情報を求める照明パラメータ算出手段と、
前記表色系変換手段で算出された各色票に対応する色相と彩度と明度と、前記基準データ取得手段で取得された各色票に対応する色相と彩度と明度との対応関係を解析し、前記カラーチャートを撮影して得られる画像の色歪みを補正するための色変換情報を照明条件毎に求める前記カラー変換パラメータ算出手段と、
前記照明パラメータ算出手段で求められた照明条件情報と、前記カラー変換パラメータ算出手段で求められた色変換情報とを関連付けて前記記憶手段に記憶させるデータベース記憶手段と、
を備えることを特徴とする請求項6に記載の色歪み補正装置。The correction parameter storage means,
Color chart image acquisition means for acquiring image data representing an image obtained by photographing the color chart for each different lighting condition,
The hue, saturation, and brightness corresponding to each color chart included in the image data acquired by the color chart image acquisition means are calculated, and the color system of the image data is calculated using the hue, saturation, and brightness. A color system conversion means for converting to a color system;
Reference data acquisition means for acquiring hue, saturation, and lightness corresponding to each color chart having the color chart as a correction reference,
Using hue, saturation, and brightness calculated by the color system conversion unit, an illumination parameter calculation unit that obtains illumination condition information indicating characteristics of illumination conditions at the time of shooting the color chart,
The hue, saturation, and lightness corresponding to each color chart calculated by the color system conversion means, and the correspondence between the hue, saturation, and lightness corresponding to each color chart acquired by the reference data acquisition means are analyzed. The color conversion parameter calculation means for obtaining color conversion information for correcting color distortion of an image obtained by photographing the color chart for each illumination condition,
Database storage means for storing the illumination condition information obtained by the illumination parameter calculation means and the color conversion information obtained by the color conversion parameter calculation means in the storage means in association with each other;
The color distortion correction device according to claim 6, further comprising:
前記撮影対象を撮影して得られる画像を表す画像データのうち当該画像に含まれる白色領域を表すデータ部分を推定する又は前記カラーチャートを撮影して得られる画像を表す画像データのうち当該画像に含まれる白色領域を表すデータ部分を取得する白色識別手段と、
前記白色識別手段で推定又は取得されたデータ部分に含まれる各画素について、画素毎の色相と彩度と明度とを算出する白色画素値算出手段と、
前記白色画素値算出手段で算出された色相と彩度と明度とを用いて、前記照明条件情報を求める算出手段と、
を備えることを特徴とする請求項7又は9に記載の色歪み補正装置。The lighting parameter calculation means,
In the image data representing the image obtained by photographing the photographing target, the data portion representing the white area included in the image is estimated, or the image data representing the image obtained by photographing the color chart is subjected to the image. White identification means for acquiring a data portion representing a white area included therein,
For each pixel included in the data portion estimated or obtained by the white identification unit, a white pixel value calculation unit that calculates hue, saturation, and lightness of each pixel,
Using hue, saturation, and brightness calculated by the white pixel value calculation unit, a calculation unit that obtains the illumination condition information,
The color distortion correction device according to claim 7, further comprising:
複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて前記記憶手段に予め記憶させる補正パラメータ記憶手段と、
任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得手段と、
前記対象取得手段で取得された画像データについて、その照明条件を推定する推定手段と、
前記推定手段で推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得手段で取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正手段と
を備えることを特徴とする携帯端末。Storage means for storing information;
Using each image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, lighting condition information indicating characteristics of each lighting condition, and under each lighting condition Correction parameter storage means for obtaining color conversion information for correcting color distortion of an image, associating the obtained illumination condition information and the color conversion information with the storage means in advance, and
Target acquisition means for acquiring image data representing an image obtained by photographing a photographing target including a white region under arbitrary lighting conditions,
Estimating means for estimating the lighting conditions of the image data acquired by the object acquiring means,
By using the color conversion information stored in the storage unit in association with the illumination condition information indicating the feature of the illumination condition estimated by the estimation unit, by changing the image data acquired by the target acquisition unit And a correcting means for correcting color distortion of an image represented by the image data.
複数の異なる照明条件下で複数の異なる色票を有するカラーチャートを撮影して得られる各画像を表す各画像データを用いて、各照明条件の特徴を示す照明条件情報と、各照明条件下における画像の色歪みを補正するための色変換情報とを求め、求めた前記照明条件情報と前記色変換情報とを関連付けて記憶手段に予め記憶させる補正パラメータ記憶ステップと、
任意の照明条件下で白色領域を含む撮影対象を撮影して得られる画像を表す画像データを取得する対象取得ステップと、
前記対象取得ステップで取得された画像データについて、その照明条件を推定する推定ステップと、
前記推定ステップで推定された照明条件の特徴を示す照明条件情報と関連付けられて前記記憶手段に記憶されている色変換情報を用いて、前記対象取得ステップで取得された画像データを変更することにより、当該画像データで表される画像の色歪みを補正する補正ステップと
を実行させるためのプログラム。On the computer,
Using each image data representing each image obtained by photographing a color chart having a plurality of different color charts under a plurality of different lighting conditions, lighting condition information indicating characteristics of each lighting condition, and under each lighting condition A correction parameter storing step of obtaining color conversion information for correcting color distortion of an image, storing the obtained illumination condition information and the color conversion information in a storage unit in advance, and
A target obtaining step of obtaining image data representing an image obtained by shooting a shooting target including a white region under arbitrary lighting conditions,
For the image data acquired in the target acquisition step, an estimation step of estimating the illumination condition,
By using the color conversion information stored in the storage unit in association with the illumination condition information indicating the feature of the illumination condition estimated in the estimation step, by changing the image data acquired in the target acquisition step A correction step for correcting color distortion of an image represented by the image data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003029920A JP2004242099A (en) | 2003-02-06 | 2003-02-06 | Color distortion correction method, color distortion correction device, mobile terminal, program, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003029920A JP2004242099A (en) | 2003-02-06 | 2003-02-06 | Color distortion correction method, color distortion correction device, mobile terminal, program, and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004242099A true JP2004242099A (en) | 2004-08-26 |
Family
ID=32956964
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003029920A Withdrawn JP2004242099A (en) | 2003-02-06 | 2003-02-06 | Color distortion correction method, color distortion correction device, mobile terminal, program, and storage medium |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004242099A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008534951A (en) * | 2005-04-01 | 2008-08-28 | ユニバーシティー オブ イースト アングリア | Illuminant estimation |
KR101023508B1 (en) | 2009-10-13 | 2011-03-21 | 중앙대학교 산학협력단 | Apparatus and method for color correction of image including multiple light sources |
US8611660B2 (en) | 2009-12-17 | 2013-12-17 | Apple Inc. | Detecting illumination in images |
US8811729B2 (en) | 2006-11-08 | 2014-08-19 | Apple Inc. | Illuminant estimation |
JP2020530920A (en) * | 2018-07-27 | 2020-10-29 | シェンチェン センスタイム テクノロジー カンパニー リミテッドShenzhen Sensetime Technology Co.,Ltd | Image lighting methods, devices, electronics and storage media |
WO2023095490A1 (en) * | 2021-11-26 | 2023-06-01 | 新興窯業株式会社 | Program, information processing device, information processing method, method for generating learning model, and imaging system |
-
2003
- 2003-02-06 JP JP2003029920A patent/JP2004242099A/en not_active Withdrawn
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008534951A (en) * | 2005-04-01 | 2008-08-28 | ユニバーシティー オブ イースト アングリア | Illuminant estimation |
US8811729B2 (en) | 2006-11-08 | 2014-08-19 | Apple Inc. | Illuminant estimation |
KR101023508B1 (en) | 2009-10-13 | 2011-03-21 | 중앙대학교 산학협력단 | Apparatus and method for color correction of image including multiple light sources |
US8611660B2 (en) | 2009-12-17 | 2013-12-17 | Apple Inc. | Detecting illumination in images |
JP2020530920A (en) * | 2018-07-27 | 2020-10-29 | シェンチェン センスタイム テクノロジー カンパニー リミテッドShenzhen Sensetime Technology Co.,Ltd | Image lighting methods, devices, electronics and storage media |
US11455516B2 (en) | 2018-07-27 | 2022-09-27 | Shenzhen Sensetime Technology Co., Ltd. | Image lighting methods and apparatuses, electronic devices, and storage media |
WO2023095490A1 (en) * | 2021-11-26 | 2023-06-01 | 新興窯業株式会社 | Program, information processing device, information processing method, method for generating learning model, and imaging system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4258550B2 (en) | Image processing method, image processing apparatus, and program | |
US20060153472A1 (en) | Blurring correction method and imaging device | |
US9438768B2 (en) | Image processing apparatus, image reading apparatus, image processing method and information storage medium | |
JP2005354278A (en) | Image data processing apparatus for processing image data of image picked up by imaging means | |
US20090274368A1 (en) | Image correction method and apparatus | |
JP2006222899A (en) | Image processing apparatus and image processing method | |
KR20100076342A (en) | Method for detecting and correcting bad pixels in image sensor | |
US20040247197A1 (en) | Correction parameter determining method, correction parameter determining apparatus, computer program, and recording medium | |
JP2004242099A (en) | Color distortion correction method, color distortion correction device, mobile terminal, program, and storage medium | |
JP4527500B2 (en) | Image processing method, apparatus, and program | |
CN117095417A (en) | Screen shot form image text recognition method, device, equipment and storage medium | |
JP2000242261A (en) | Image display method, image processor, and recording medium | |
JP2005184685A (en) | Image processing device, program, and recording medium | |
JP2004350212A (en) | System and method for image processing | |
JP4800724B2 (en) | Person image correction apparatus, person image correction method, and person image correction program | |
JP2019106173A (en) | Image processing method, image processing apparatus and program | |
EP2541469B1 (en) | Image recognition device, image recognition method and image recognition program | |
JP2019012424A (en) | Image processing device and computer program | |
JP2004185183A (en) | Image correction device, character recognition method, and image correction program | |
WO2019116975A1 (en) | Image processing method, image processing device, and program | |
CN111242087A (en) | Object recognition method and device | |
JP2005293554A (en) | Determination of main object in image | |
JP5069599B2 (en) | Video conversion apparatus, video conversion method, and video conversion program | |
JP4769416B2 (en) | Image processing apparatus and image processing method | |
JP2827973B2 (en) | Image processing apparatus and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20060509 |