JP2004178428A - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
JP2004178428A
JP2004178428A JP2002346050A JP2002346050A JP2004178428A JP 2004178428 A JP2004178428 A JP 2004178428A JP 2002346050 A JP2002346050 A JP 2002346050A JP 2002346050 A JP2002346050 A JP 2002346050A JP 2004178428 A JP2004178428 A JP 2004178428A
Authority
JP
Japan
Prior art keywords
color
color gamut
gamut
image data
color space
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.)
Pending
Application number
JP2002346050A
Other languages
Japanese (ja)
Inventor
Takahiro Suzuki
隆広 鈴木
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2002346050A priority Critical patent/JP2004178428A/en
Publication of JP2004178428A publication Critical patent/JP2004178428A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To reduce deterioration in reproducibility of a color or a gradation in color gamut mapping. <P>SOLUTION: A color space selection part 112 executes prescribed estimation about a plurality of predetermined color spaces on the basis of color gamut information about a printer acquired by an information acquisition part 111 and color gamut information about a digital camera found from chromaticity point information about the plurality of color spaces, selects a color space having highest estimation as an output color space, and outputs a color correction parameter corresponding to the color space to a color correction part 104 as a correction parameter used for color correction. Thereby, the color gamut mapping having a small difference between a color gamut of the digital camera and a color gamut of the printer can be executed. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
本発明は画像処理方法に関し、特に、色域(色再現域)のマッピングに関するものである。
【0002】
【従来の技術】
例えば、デジタルカメラの色域とプリンタ等の画像出力装置の色域には相違がある。そのため、デジタルカメラで撮影した画像をプリンタによってプリント出力する場合、デジタルカメラの色域をプリンタの色域にマッピングする処理が必要となる。
【0003】
このマッピングの手法としては、例えば、デジタルカメラの色域のうち、プリンタの色域と重なる色域の色はそのまま再現し、プリンタ色域外の色は、例えば、プリンタの色域でもとの色に最も近い色に貼り付けるようにマッピングする手法や、デジタルカメラの入力色空間(撮像されて出力されるデータの色空間)の色をプリンタの色域に階調を保存するように圧縮してマッピングする手法などが知られている。
【0004】
【発明が解決しようとする課題】
しかしながら、上述したいずれのマッピング手法を用いたとしても、デジタルカメラの色域とプリンタの色域の違いが大きい場合は、画質の劣化が著しくなる。
【0005】
すなわち、前者の手法の場合、デジタルカメラの出力色空間の色域とプリンタの色域の違いが大きいとき、その相違する色域である大部分の色域で階調を保って表現できないことになる。また、後者の場合は、色域の違いが大きい場合に階調を保って色域の圧縮をすると、例えば彩度が大きく変化して色再現性が悪くなるという問題がある。
【0006】
本発明は、以上の問題を解決するためになされたものであり、その目的とするところは、色域マッピングにおいて階調や色の再現性の低下を少なくすることができる画像処理方法を提供することにある。
【0007】
【課題を解決するための手段】
そのために本発明では、第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングするための画像処理方法であって、前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定め、該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正し、前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データを前記第2の色域にマッピングする、ステップを有したことを特徴とする。
【0008】
以上の構成によれば、第1色域と第2色域との違いに係る評価を行い、この評価が、当該違いが小さい点で最も高くなるよう色空間を定め、この定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正して当該補正された画像データを上記第2色域にマッピングするので、第1色域と第2色域との違いが小さな色域マッピングを行うことができる。
【0009】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態を詳細に説明する。
【0010】
図1は、本発明の一実施形態に係わる画像処理システムの構成を示すブロック図である。
【0011】
同図において、符号101〜106、111および112で示される要素はデジタルカメラの構成要素であり、符号121および122で示される要素はプリンタの構成要素である。また、200はデジタルカメラに装着および脱着が可能なコンパクトフラッシュ(登録商標)カード、光ディスク等の記録媒体を示し、300はカメラとプリンタを接続する、USB、パラレル等のケーブルを示す。
【0012】
デジタルカメラにおいて、101は撮像部を示し、撮像レンズ、CCD等の撮像素子、撮像素子の出力信号のゲインを調整するゲイン調整回路、ゲイン調整後の撮像素子の出力信号をデジタル信号に変換するA/D変換回路、出力されたデジタル信号を一時記憶するメモリ等より構成され、撮像素子からの信号をデジタル画像データとして出力する。102は露出調整部を示し、撮像部101から出力された画像データの所定部分の輝度に基づき、画像データが適正な明るさになるように所定のプログラム線図に従いシャッター速度と絞り値を決定して、撮像部101における撮像素子の露光時間と撮影レンズの絞りを制御する。103は画素補間部を示し、図3にて詳述されるように、撮像部101から出力された画像データの白バランスの調整を行いながら、撮像素子に対応した各画素に対してRGB3つの各チャンネルの画素値を撮像素子の色フィルタ配列に応じて補間し、カラー画像データを出力する。
【0013】
104は色補正部を示し、画素補間部103から出力されたカラー画像データに対し、図2等で詳述されるように、選択された色空間に対応する色補正パラメータを用いて色補正を行う。この色補正を行うことにより、プリンタで行われるデジタルカメラからプリンタへの色域マッピングにおいて、デジタルカメラが出力する画像データが存在する色空間の色域とプリンタの色域との違いを小さなものとすることができる。なお、本実施形態では、色補正部104は、上記の色補正の後、RGB各チャンネルごとにテーブルを参照してγ補正変換も行う。105は画像圧縮部を示し、上記補正された画像データに対して、JPEG等の所定の方式によって圧縮を行う。106は記録部を示し、圧縮された画像データに対して、色域に関する所定の付帯情報を追加した所定のフォーマットに従った画像データを記録媒体200に記録する。
【0014】
111は情報取得部を示し、接続部300を介してプリンタの色域記憶部122から色域に関する情報、本実施形態では後に詳述するように、色域の範囲および色域体積を取得する。112は色空間選択部を示し、予め複数の色空間情報およびそれぞれの色空間に対応した色補正パラメータを記憶している。また、色空間選択部112は、その記憶する上記複数の色空間の中から、情報取得部111で取得した上記プリンタの色域に関する情報に基づき、出力色空間を選択し、この選択した色空間情報およびその色空間に対応した色補正パラメータを色補正部104および記録部106に出力する。記録部106は、上述したように、これらの色空間情報を上記付帯情報として画像データとともに記録媒体200に記録する。
【0015】
一方、プリンタにおいて、121は印刷部を示し、記録部106によって記録媒体200に記録されたデジタルカメラの色空間情報等に基づき、画像データをプリンタの色域にマッピングし、印刷を行う。122は色域記憶部を示し、上述したようにプリンタの色域情報を記憶する。
【0016】
以上説明した本実施形態の画像処理システムによる、撮像およびこれに基づく画像印刷のための処理の詳細を以下に説明する。
【0017】
まず、撮影前に予め行う処理として、接続部300を用いてデジタルカメラと印刷に用いるプリンタとを接続するとともに、デジタルカメラの情報取得部111は、その接続したプリンタの色域記憶部122から色域情報、具体的には、CIELAB空間において定められる色域の範囲と、その色域の体積Gを取得する。そして、情報取得部111は、これらの色域情報を色空間選択部112に出力する。
【0018】
色域の範囲は、プリンタが所定のインクの組み合わせを用いて、所定の紙に出力した場合に再現できる色の範囲であり、本実施形態では、CIELAB空間でその範囲が定義される。例えば、プリンタへの入力であるRGBデータの値がそれぞれ0〜255の256値をとるとすると、RGBそれぞれ0〜255の値の256とおりの組合せについて、それぞれの組合せデータに基づいて実際に所定の紙に印刷を行い、これを測色することによりCIELAB値を得る。このCIELAB値の全体がプリンタの色域である。本実施形態では、このR、G、B値の組合せとそれに対応する測色値との関係から、入力RGBに出力CIELAB値が対応するLookUpTable(以下、LUTと称す)を求め、これが色域(の範囲)を示す情報として用いられる。
【0019】
また、プリンタの色域体積Gは、上記入力RGBそれぞれの0〜255の各1単位によって構成される単位立方体を形成する8点について、上述のLUTを用いてCIELAB値に変換し、その変換後の8点による立体の体積を計算し、さらに、この体積を255とおりの単位立方体について計算しそれらの和を求めることによって得ることができる。以上のように、色域を表わすLUTおよび色域の体積Gは、予め求められてプリンタの色域記憶部122に記憶されており、必要に応じてデジタルカメラの情報取得部111によって取得される。
【0020】
また、色空間選択部112は、前述のように、色空間を定義する情報である色度点情報およびそれに対応した色補正パラメータを複数組記憶している。そして、色空間選択部112は、予め、この複数の色空間について、情報取得部111が取得したプリンタの上記色域情報と、上記複数の色空間それぞれについてその色度点情報から求められるデジタルカメラの色域情報とに基づいて後述される所定の評価を行い、評価の最も高い色空間を出力色空間として選択し、その色空間に対応する色補正パラメータを、色補正部104にその色補正で用いる補正パラメータとして出力する。
【0021】
図2は、色空間選択部112において色度点情報および色補正パラメータを色空間ごと格納した状態を示す図である。同図に示すように、色空間ごとに、(色度点1、マトリクスA)、(色度点2、マトリクスA)、(色度点3、マトリクスA)、…(色度点n、マトリクスA)、…と複数の組が格納されている。
【0022】
色度点情報である色度点nは、例えば、RGB値がそれぞれ0〜255までの値をとる場合、(R、G、B)=(255、0、0)、(0、255、0)、(0、0、255)および(255、255、255)に対応する4点の(X、Y、Z)として表せられるものである。すなわち、レッド、グリーン、ブルーおよびホワイトの各色が対応するそれぞれのXYZの値を異なって定めることにより、複数の異なる色空間を定義することができる。換言すれば、R、G、Bからそれぞれの色度点X、Y、Zへの変換関係を表わす3行3列のマトリクスよってそれぞれの色空間を定義できるということもできる。なお、この色空間を定義する色度点情報は、例えば、用い得る複数種類のプリンタの色域などの条件を考慮して、予め実験的に定めることができる。
【0023】
また、各色空間に対応した色補正パラメータとしてのマトリクスAは、RGBの画像データをR′G′B′の画像データに変換する3行3列のマトリクスとして表現される。このマトリクスAは、上記(R、G、B)の4点が、対応する色度点情報である(X、Y、Z)の4点に変換されるような、RGBからR′G′B′ヘの変換として表わされるものである。すなわち、(R′G′B′)は、RGB表色系とXYZ表色系との所定の関係を定める3行3列のマトリクスによって(X、Y、Z)に変換され、このマトリクスとマトリクスAの積によって(R、G、B)の4点が(X、Y、Z)の4点に変換されるようマトリクスAが定められる。
【0024】
色空間選択部112による色空間の評価は次のように行われる。この評価は、上述のように、情報取得部111によって得たプリンタの色域情報とデジタルカメラの色域情報とに基づいて行う。
【0025】
具体的には、例えば、以下に示す(1)式によってそれぞれの色空間について計算される評価値を用いて色空間の評価を行う。この評価値は、プリンタの色域を十分に使用でき、かつプリンタ色域へのマッピングの際に色再現が悪化しないように、色空間が大きくなりすぎるのを防止するような評価値であり、値が大きいほど高い評価となる(最大値は1)。ここで、Gは上記複数の色空間それぞれについて計算されるカメラの色域の体積、Gは、上述のように情報取得部111によって得たプリンタ色域の体積、G∩Gはカメラの色域とプリンタ色域の重複領域の体積である。
(G∩G/G×G (1)
【0026】
カメラ色域の体積Gは、プリンタの色域体積Gと同様にして求めることができる。すなわち、上記複数の色空間それぞれについて、その色度点情報から、デジタルカメラの色空間であるRGB値をXYZ値に変換する3行3列のマトリクスを計算し、このマトリクスにより、デジタルカメラが出力する全てのRGB値をXYZに変換する。さらに、変換して得られたXYZ値を、予め定められた関係に従ってCIELAB値に変換することにより、カメラ色空間内のRGB値をCIELAB値に変換するLUTを得る。そして、RGB値の単位立方体を構成する8点をLUTを用いてCIELAB値の8点に変換し、その変換後の8点による立体の体積を計算するとともに、この体積を例えば255とおりの単位立方体について和を計算することによってカメラ色域の体積Gを得る。また、重複領域の体積G∩Gは、前述のプリンタの色域について求めたLUТを用いて、上記変換後の立体がプリンタの色域内に入るか否かの判定を行い、入った立体の体積のみについて和を計算することにより求めることができる。
【0027】
そして、色空間選択部112は、複数の色空間のうち、上記評価値が最も大きい色空間を出力色空間とし、その色空間に対応した色補正マトリクスを色補正手段104に出力する。例えば、上記評価により、図2の色度点1によって構成される色空間の評価が最も高かった場合には、マトリクスAを色補正パラメータとして色補正手段104に出力する。
【0028】
以上の処理が予め行なわれており、撮影時には次の処理が行われる。ユーザが被写体を撮影するために不図示のデジタルカメラのシャッターボタンを押すと、撮像部101の出力に応じて、露出調整部102で撮像部101の撮像素子の露光時間と撮影レンズの絞りが制御されつつ、撮像部101から撮像された画像のデジタルデータが出力される。
【0029】
画素補間部103は、撮像部101から出力された画像データに対して平均値の計算等の統計的な解析を行い、画像データから算出された所定の統計量が所定の値になるように白バランスの調整を行うための係数を求める。このとき、デジタルカメラの白バランスのモードが複数の光源に対応するために複数設定可能な場合は、各モードに応じて統計量の目標値があり、それぞれのモードに最適な係数が求まる。これらの係数はRGB各チャンネルについて求められ、所定の画素位置のRGBのカラー画像データを補間するときに用いられる。本実施形態における撮像部101の撮像素子の色フィルタの配列を図3に示す。図3に示すように、各画素位置ではRGBのうち、1つのチャンネルの画素値しか得られないので、フィルタの色と異なるチャンネルの画素値は補間により求める。この場合、フィルタの色がGの画素位置では、Gチャンネルの画素値を求めるときは、画素値にGチャンネルに対応した係数を積算した値が出力値となる。また、RまたはBチャンネルの画素値を求めるときは、隣接する2つの画素の画素値に各チャンネルに対応した係数を積算し平均した値が出力値となる。また、フィルタの色がRまたはBの画素位置においては、フィルタと同色のチャンネルの画素値を求めるときは、画素値に各チャンネルに対応した係数を積算した値が出力値となる。また、フィルタと異なる色のチャンネルの画素値を求める場合には、隣接する4つの画素の画素値に各チャンネルに対応した係数を積算し、それを平均した値が出力値となる。なお、以上の画素の補間方法は一例であって、例えば、フィルタの色がGの画素位置において、RまたはBチャンネルの画素値を求める場合に、所定の距離離れた対応する色の画素の画素値に各チャンネルに対応した係数を積算し、距離に基づいた重み付きの平均値を出力値としてもよい。
【0030】
次に、色補正部104は、画素補間部103から出力されたカラー画像データに対して、以下の(2)式に示すマトリクス演算により色補正の処理を行う。
C’=AC (2)
ここで、C=(R,G,B)、C’=(R’,G’,B’)、(tは転置を表す)であり、それぞれ色補正前後のRGB値を表す。また、Aは色空間選択部112から出力された、選択された色空間に対応した色補正パラメータであり、3行3列のマトリクスである。この色補正により、デジタルカメラからプリンタに出力される画像データを、プリンタの色域との違いが小さい色域のものとすることができ、これにより、印刷に用いるプリンタの色域がどのような範囲であっても、最適な色域マッピングを行い良好な色再現が可能となる。
【0031】
次に、上記マトリクス演算後のRGB値に対し、RGB各チャンネルに対して画像データに対しテーブルを参照してγ変換を行い、画像データをディスプレイの電圧−輝度特性(γ特性)に合わせる処理を行う。
【0032】
色補正部104によって以上の補正処理がなされた画像データは、画像圧縮部105により所望の画質、圧縮率に応じて圧縮される。記録部106は、この圧縮された画像データを、デジタルカメラの上記色度点情報および色補正パラメータ、または直接デジタルカメラの色域を表わす上記LUТの色域情報や撮影時の情報とともに所定の画像フォーマットに従い1つの画像データとして記録媒体200に記録する。
【0033】
図4は、画像フォーマットの一例を示す図である。同図において、211は画像処理パラメータ記憶部を示し、色空間選択部112で選択された色空間の色度点情報およびその色空間に対応した色補正マトリクスAが格納されている。また、212は撮影情報記憶部を示し、カメラの撮影時の撮影モード、撮影レンズの焦点距離等の情報が記録されている。さらに、213は画像情報記憶部を示し、上記の圧縮された画像データが格納されている。
【0034】
撮影された画像データを印刷するときには、上記のように画像フォーマットで画像データが格納された記録媒体200をプリンタに装着することによって、プリンタに画像データを入力し、プリンタの印刷部121はこれに基づいて印刷を行なう。
【0035】
すなわち、プリンタの印刷部121は、画像データが記録された色空間からプリンタの色域へ、色相および階調を保存するようにマッピングを行い、このマッピングされた画像データに基づいて印刷を行なう。
【0036】
図5は、このマッピングを説明する図である。同図に示すように、本実施形態は、R、G、B値を、前述したデジタルカメラおよびプリンタそれぞれのLUТを用い、これらが示すCIELAB空間示す色域を比較しながらマッピングを行う。マッピングは上述のとおり、階調および色相を保存するように行われるため、CIELAB空間では、Lが一定の平面で、b/aが一定の値を維持するようマッピングが行われる。なお、このマッピングは、以下に説明するような内容のテーブルとして実施することもできる。
【0037】
各色相におけるカメラ色域の彩度、すなわち、
【0038】
【数1】

Figure 2004178428
【0039】
の最大値をR、プリンタ色域の彩度の最大値をRとすると、R<Rの場合は、そのままマッピングし、R>Rの場合は、彩度をR/Rとなるように、色相を変えずにマッピングする。例えば、図5に示す色相1における入力点xの彩度をcとすると、この色相1ではRI1>RP1であるため、xは色相1上の彩度c×(RP1/RI1)の位置にマッピングされる。一方、色相2ではRI2<RP2であるため、色相2上の入力点xは、そのまま入力点xの位置にマッピングされる。
【0040】
このようなマッピング手法を用いた場合、画像データの色域とプリンタ色域の相違が大きい場合には、色圧縮により例えば彩度が大きく変化し色再現性が悪くなるという問題があったが、本実施形態の画像データが記録された色空間は、(1)式に示したような評価値を用いて選択することによってプリンタ色域との相違が大きくなりすぎないようにした色空間であり、これにより、マッピングによって色再現性が低下することを防止することが可能となる。
【0041】
<他の実施形態>
なお、上記の実施形態においては、デジタルカメラとプリンタの色域相互のマッピングを例に説明したが、本発明の適用はこの例に限られないことはもちろんである。例えば、PC(PersonalComputer)で処理した画像データをプリンタなどの印刷装置で印刷する場合など、色域が異なる2つのデバイス間相互の色域マッピングに適用することができる。また、PCと印刷装置がデバイスの場合、上記の実施形態のようにマッピングのみを印刷装置で行う形態でなく、例えば、全ての処理をPCで行ってもよく、上記実施形態で説明した処理が2つのデバイスのどちら側で行われるかは、本発明の適用には影響しない。
【0042】
また、上記の実施形態では、カメラで記録された画像データを印刷する際に、記録媒体によってプリンタに直接画像データを渡すようにしたが、一度画像データをPCに渡し、その後、PCからプリンタに画像データを渡すようにしてもよい。このようにPCを介する場合は、PCのアプリケーションプログラムにより読み込まれ、圧縮された画像情報が伸長され、ディスプレイに表示される。そして、ユーザはディスプレイに表示された画像を確認して、PCに接続されたプリンタで印刷を行うことになる。
【0043】
この場合、デジタルカメラに装着された記録媒体200には所定のフォーマットで画像データとともに色空間に対応した色補正マトリクス(色補正パラメータ)が格納されているので、アプリケーションプログラムによって色補正マトリクスを読み出し、また、他の色空間に対応したマトリクスをプログラムによってアクセスする記憶装置内に格納しておけば、他の色空間を用いた画像に変換し、表示や印刷をすることもできる。例えば、別の色空間を用いた画像データに変換するには、RGBに伸長後の画像データに対して色補正部104のγ変換の逆γ変換を行い、上記所定フォーマットの画像処理パラメータ記憶部211から得られた色補正マトリクスの逆変換を行い、所望の色空間の色補正処理を行う色補正マトリクスで(2)式に示す変換を行い、再度γ変換を行えばよい。
【0044】
また、上述の実施形態では色補正部104で、3行3列のマトリクス変換による色処理を行う例について説明したが、例えば以下の(3)式に示すような3行9列の色補正マトリクスによる色処理を行うようにしてもよい。
C’=A’C’’ (3)
ここで、C’’=(R,G,B,RG,GB,BR,R,G,Bであり、(R,G,B)は色補正前のRGB値を表す。また、A’は3行9列のマトリクスである。
【0045】
さらに、代表的な画素値に対してのみLUT変換による色補正を行い、その他の画素値についてはテーブルに格納されている代表画素値の入出力関係から補間により変換すべき画素値を求め、色補正を行うようにしてもよい。また、色補正の関係を所定形式の関数として表し、その関数のパラメータを記憶しておき、関数演算により色補正を行うようにしてもよい。この場合、変換は一つの関数に限らず、複数の関数の組み合わせでもよい。
【0046】
また、上記の実施形態において、色補正部104で行った色補正処理の特性を記録媒体200に所定フォーマットの画像処理パラメータ記憶部211として記録する際、色空間選択部112で選択された色空間に対応する色補正パラメータをそのまま記録するようにしたが、色空間選択部112に記録されている色補正パラメータをカメラの色処理モードと関連させ、色空間固有の色補正パラメータに対応したカメラのモードを記録するようにしてもよい。画像データを表示したり、印刷したりする際に、PCのアプリケーションプログラムにあらかじめカメラのモード(色空間)に対応した色補正パラメータを記憶しておけば、上記実施形態で説明した印刷の方法と同様に所望の色空間を用いた画像の色再現特性を反映した印刷が可能となる。
【0047】
また、色補正パラメータの代わりにInternational ColorConsortium発行の”Specification ICC.1:1998−09 File Format for ColorProfiles”(1998)、pp.28−30に記載されているような入力プロファイルの形式で色補正パラメータに対応した入力プロファイルを記録するようにしてもよい。画像データを表示したり、印刷したりする際に、PCのアプリケーションプログラムで画像処理パラメータ記憶部211から入力プロファイルを読み込めるようにしておけば、入力プロファイルによって指定した所望の色空間を用いた画像の色再現特性を反映した表示、印刷が可能である。
【0048】
さらにまた、上記の実施形態の色空間選択部112の処理では、予め、複数の色空間情報、およびそれぞれに対応した色補正パラメータを記憶しておき、情報取得部111が得るプリンタの色域情報に応じて色空間および色補正パラメータを選択するようにしたが、情報取得部111が取得するプリンタの色域に応じて最適な色空間を生成し、出力するようにしてもよい。例えば、情報取得部111が取得するるプリンタの色域にとって上記(1)式による評価値による評価が最も高い色空間を生成し、その色空間に対応した色補正マトリクスを生成するようにすることもできる。
【0049】
<さらに他の実施形態>
本発明は上述のように、複数の機器(たとえばホストコンピュータ、インタフェース機器、リーダ、プリンタ等)から構成されるシステムに適用しても一つの機器(たとえば複写機、ファクシミリ装置)からなる装置に適用してもよい。
【0050】
また、前述した実施形態の機能を実現するように各種のデバイスを動作させるように該各種デバイスと接続された装置あるいはシステム内のコンピュータに、前記実施形態機能を実現するためのソフトウェアのプログラムコードを供給し、そのシステムあるいは装置のコンピュータ(CPUあるいはMPU)を格納されたプログラムに従って前記各種デバイスを動作させることによって実施したものも本発明の範疇に含まれる。
【0051】
またこの場合、前記ソフトウェアのプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコード自体、およびそのプログラムコードをコンピュータに供給するための手段、例えばかかるプログラムコードを格納した記憶媒体は本発明を構成する。
【0052】
かかるプログラムコードを格納する記憶媒体としては例えばフロッピー(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスク、CD−ROM、磁気テープ、不揮発性のメモリカード、ROM等を用いることができる。
【0053】
またコンピュータが供給されたプログラムコードを実行することにより、前述の実施形態の機能が実現されるだけではなく、そのプログラムコードがコンピュータにおいて稼働しているOS(オペレーティングシステム)、あるいは他のアプリケーションソフト等と共同して前述の実施形態の機能が実現される場合にもかかるプログラムコードは本発明の実施形態に含まれることは言うまでもない。
【0054】
さらに供給されたプログラムコードが、コンピュータの機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに格納された後そのプログラムコードの指示に基づいてその機能拡張ボードや機能拡張ユニットに備わるCPU等が実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も本発明に含まれることは言うまでもない。
【0055】
以下、本発明の実施態様を以下に示す。
【0056】
[実施態様1] 第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングするための画像処理方法であって、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定め、
該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正し、
前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データを前記第2の色域にマッピングする、
ステップを有したことを特徴とする画像処理方法。
【0057】
[実施態様2] 前記色空間を定めるステップは、前記第1色域と前記第2色域が所定の色空間で重複している度合いを計算し、該重複の度合いが高いほど前記評価を高くすることを特徴とする実施態様1に記載の画像処理方法。
【0058】
[実施態様3] 前記色空間を定めるステップは、予め定められた複数の色空間から最も評価の高い色空間を選択することによって色空間を定めることを特徴とする実施態様1または2に記載の画像処理方法。
【0059】
[実施態様4] 前記色補正パラメータはマトリクスデータであり、前記画像データを補正するステップは、当該画像データに対するマトリクス演算によって補正を行うことを特徴とする実施態様1ないし3のいずれかに記載の画像処理方法。
【0060】
[実施態様5] 第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングするための画像処理システムであって、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定める色空間決定手段と、
該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正する補正手段と、
前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データを前記第2の色域にマッピングするマッピング手段と、
を具えたことを特徴とする画像処理システム。
【0061】
[実施態様6] 前記色空間決定手段は、前記第1色域と前記第2色域が所定の色空間で重複している度合いを計算し、該重複の度合いが高いほど前記評価を高くすることを特徴とする実施態様5に記載の画像処理システム。
【0062】
[実施態様7] 前記色空間を定めるステップは、予め定められた複数の色空間から最も評価の高い色空間を選択することによって色空間を定めることを特徴とする実施態様5または6に記載の画像処理システム。
【0063】
[実施態様8] 前記色補正パラメータはマトリクスデータであり、前記画像データを補正するステップは、当該画像データに対するマトリクス演算によって補正を行うことを特徴とする実施態様5ないし7のいずれかに記載の画像処理システム。
【0064】
[実施態様9] 前記第1色域はカメラによって撮像された画像データの色域であり、前記第2色域は前記マッピングによって得られた画像データに基づいて印刷を行う印刷装置の色域であることを特徴とする実施態様5ないし8のいずれかに記載の画像処理システム。
【0065】
[実施態様10] 第1の色域の画像データを出力し、前記第1の色域は当該第1色域と異なる第2の色域にマッピングされるカメラであって、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定める色空間決定手段と、
該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正する補正手段と、
を具え、前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データが前記第2の色域にマッピングされることを特徴とするカメラ。
【0066】
[実施態様11] 第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングする処理を行い、該マッピングされた画像データに基づいて印刷を行う印刷装置であって、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定め、該定められた色空間に対応した色補正パラメータを用いて補正された前記第1の色域の画像データを、前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記第2の色域にマッピングするマッピング手段、
を具えたことを特徴とする印刷装置。
【0067】
[実施態様12] コンピュータに読み込まれることにより、第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングするための画像処理を実行するためのプログラムであって、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定め、
該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正し、
前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データを前記第2の色域にマッピングする、
ステップを有したことを特徴とするプログラム。
【0068】
[実施態様13] コンピュータに読みとり可能に、第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングするための画像処理のプログラムを格納した記憶媒体であって、前記画像処理は、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定め、
該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正し、
前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データを前記第2の色域にマッピングする、
ステップを有したことを特徴とする記憶媒体。
【0069】
【発明の効果】
以上説明したように本発明によれば、第1色域と第2色域との違いに係る評価を行い、この評価が、当該違いが小さい点で最も高くなるよう色空間を定め、この定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正して当該補正された画像データを上記第2色域にマッピングするので、第1色域と第2色域との違いが小さな色域マッピングを行うことができる。
【0070】
この結果、例えば、印刷するプリンタの色域がどのような範囲を持っていても、最適な色マッピングを行うことが可能となる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係わる画像処理システムの構成を示すブロック図である。
【図2】図1に示す色空間選択部において色度点情報および色補正パラメータを色空間ごと格納した状態を示す図である。
【図3】図1に示す撮像部の撮像素子の色フィルタの配列を模式的に示す図である。
【図4】図1に示す記録部が記録する画像フォーマットの一例を示す図である。
【図5】プリンタにおけるマッピング処理を説明する図である。
【符号の説明】
101 撮像部
102 露出調整部
103 画素補間部
104 色補正部
105 画像圧縮部
106 記録部
111 情報取得部
112 色空間選択部
121 印刷部
122 色域記憶部
200 記録媒体
211 画像処理パラメータ記憶部
212 撮像情報記憶部
213 画像情報記憶部
300 接続部[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to an image processing method, and more particularly to mapping of a color gamut (color gamut).
[0002]
[Prior art]
For example, there is a difference between the color gamut of a digital camera and the color gamut of an image output device such as a printer. Therefore, when an image captured by a digital camera is printed out by a printer, a process of mapping the color gamut of the digital camera to the color gamut of the printer is required.
[0003]
As a method of this mapping, for example, of the color gamut of the digital camera, the color of the color gamut overlapping with the color gamut of the printer is reproduced as it is, and the color outside the color gamut of the printer is, for example, the original color in the color gamut of the printer. A mapping method for pasting to the closest color, or mapping by compressing the color of the input color space of the digital camera (the color space of the data captured and output) so that the gradation is stored in the color gamut of the printer There is a known technique.
[0004]
[Problems to be solved by the invention]
However, even if any of the above-described mapping methods is used, if the color gamut of the digital camera and the color gamut of the printer are large, the image quality will be significantly degraded.
[0005]
That is, in the former method, when the difference between the color gamut of the output color space of the digital camera and the color gamut of the printer is large, it is not possible to express while maintaining the gradation in most of the different color gamuts. Become. In the latter case, if the color gamut is compressed while maintaining the gradation when the color gamut difference is large, there is a problem that, for example, the chroma greatly changes and the color reproducibility deteriorates.
[0006]
The present invention has been made in order to solve the above problems, and an object of the present invention is to provide an image processing method capable of reducing a decrease in gradation and color reproducibility in color gamut mapping. It is in.
[0007]
[Means for Solving the Problems]
Therefore, in the present invention, there is provided an image processing method for mapping image data of a first color gamut to a second color gamut different from the first color gamut, wherein the first color gamut and the second color gamut Based on the color gamut information of each color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and a color space is determined such that the evaluation is highest at a point where the difference is small, and the determined The image data of the first color gamut is corrected using a color correction parameter corresponding to a color space, and the corrected image data is corrected using information on the determined color space and a color correction parameter corresponding to the color space. Mapping image data of a first color gamut to the second color gamut.
[0008]
According to the above configuration, evaluation is performed on the difference between the first color gamut and the second color gamut, and a color space is determined such that the evaluation is highest at a point where the difference is small. The image data of the first color gamut is corrected using the color correction parameters corresponding to the above, and the corrected image data is mapped to the second color gamut. Color gamut mapping with small differences can be performed.
[0009]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0010]
FIG. 1 is a block diagram illustrating a configuration of an image processing system according to an embodiment of the present invention.
[0011]
In the figure, elements denoted by reference numerals 101 to 106, 111 and 112 are components of a digital camera, and elements denoted by reference numerals 121 and 122 are components of a printer. Reference numeral 200 denotes a recording medium such as a compact flash (registered trademark) card and an optical disk which can be attached to and detached from the digital camera, and reference numeral 300 denotes a cable such as a USB or parallel cable for connecting the camera and the printer.
[0012]
In the digital camera, reference numeral 101 denotes an image pickup unit, an image pickup lens, an image pickup device such as a CCD, a gain adjustment circuit for adjusting a gain of an output signal of the image pickup device, and an A for converting an output signal of the image pickup device after the gain adjustment into a digital signal. A / D conversion circuit, a memory for temporarily storing the output digital signal, and the like, and outputs a signal from the image sensor as digital image data. Reference numeral 102 denotes an exposure adjustment unit that determines a shutter speed and an aperture value in accordance with a predetermined program diagram based on the luminance of a predetermined portion of the image data output from the imaging unit 101 so that the image data has an appropriate brightness. Thus, the exposure time of the image sensor and the aperture of the photographing lens in the image pickup unit 101 are controlled. Reference numeral 103 denotes a pixel interpolation unit. As described in detail with reference to FIG. 3, while adjusting the white balance of the image data output from the imaging unit 101, each of the three RGB pixels for each pixel corresponding to the imaging element. The pixel values of the channels are interpolated according to the color filter array of the image sensor, and color image data is output.
[0013]
Reference numeral 104 denotes a color correction unit, which performs color correction on the color image data output from the pixel interpolation unit 103 using a color correction parameter corresponding to the selected color space as described in detail in FIG. Do. By performing this color correction, in the color gamut mapping from the digital camera to the printer performed by the printer, the difference between the color gamut of the color space in which the image data output by the digital camera exists and the color gamut of the printer is reduced. can do. In the present embodiment, after the above-described color correction, the color correction unit 104 also performs gamma correction conversion with reference to a table for each of the RGB channels. An image compression unit 105 compresses the corrected image data according to a predetermined method such as JPEG. Reference numeral 106 denotes a recording unit that records, on the recording medium 200, image data according to a predetermined format in which predetermined additional information on a color gamut is added to compressed image data.
[0014]
Reference numeral 111 denotes an information acquisition unit which acquires information on the color gamut from the color gamut storage unit 122 of the printer via the connection unit 300, and in this embodiment, as will be described in detail later, a color gamut range and a color gamut volume. Reference numeral 112 denotes a color space selection unit, which stores a plurality of pieces of color space information and color correction parameters corresponding to each color space in advance. The color space selecting unit 112 selects an output color space from the plurality of stored color spaces based on the information on the color gamut of the printer acquired by the information acquiring unit 111, and selects the selected color space. Information and a color correction parameter corresponding to the color space are output to the color correction unit 104 and the recording unit 106. As described above, the recording unit 106 records the color space information as the additional information on the recording medium 200 together with the image data.
[0015]
On the other hand, in the printer, a printing unit 121 maps image data to a color gamut of the printer based on color space information of the digital camera recorded on the recording medium 200 by the recording unit 106, and performs printing. A gamut storage unit 122 stores the gamut information of the printer as described above.
[0016]
The details of the processing for image capturing and image printing based on the image capturing by the image processing system of the present embodiment described above will be described below.
[0017]
First, as a process to be performed before photographing, the digital camera and the printer used for printing are connected using the connection unit 300, and the information acquisition unit 111 of the digital camera reads the color data from the color gamut storage unit 122 of the connected printer. Gamut information, specifically, the range of a color gamut defined in the CIELAB space and the volume G of the color gamut P To get. Then, the information acquisition unit 111 outputs the color gamut information to the color space selection unit 112.
[0018]
The range of the color gamut is a range of colors that can be reproduced when the printer outputs a predetermined combination of inks on predetermined paper. In the present embodiment, the range is defined in the CIELAB space. For example, if the values of RGB data input to the printer take 256 values of 0 to 255, respectively, 256 values of RGB of 0 to 255 3 For each of the combinations, a CIELAB value is obtained by actually performing printing on a predetermined paper based on the respective combination data and measuring the colors. The entire CIELAB value is the color gamut of the printer. In the present embodiment, a LookUpTable (hereinafter, referred to as LUT) in which the input CIELAB value corresponds to the input RGB is obtained from the relationship between the combination of the R, G, and B values and the corresponding colorimetric values. Is used as information indicating the range.
[0019]
Also, the color gamut volume G of the printer P Converts the eight points forming a unit cube composed of one unit of each of the input RGB 0 to 255 into CIELAB values using the above-described LUT, and calculates the volume of the solid by the eight points after the conversion. Calculate and further add this volume to 255 3 It can be obtained by calculating the following unit cubes and calculating their sum. As described above, the LUT representing the color gamut and the volume G of the color gamut P Is obtained in advance and stored in the color gamut storage unit 122 of the printer, and is acquired by the information acquisition unit 111 of the digital camera as needed.
[0020]
As described above, the color space selection unit 112 stores a plurality of sets of chromaticity point information, which is information defining a color space, and color correction parameters corresponding thereto. Then, the color space selection unit 112 preliminarily obtains, for the plurality of color spaces, the color gamut information of the printer acquired by the information acquisition unit 111 and the digital camera obtained from the chromaticity point information for each of the plurality of color spaces. A predetermined evaluation described later is performed based on the color gamut information, a color space with the highest evaluation is selected as an output color space, and a color correction parameter corresponding to the color space is transmitted to the color correction unit 104 for the color correction. Is output as a correction parameter used in.
[0021]
FIG. 2 is a diagram illustrating a state in which chromaticity point information and color correction parameters are stored for each color space in the color space selection unit 112. As shown in the figure, for each color space, (chromaticity point 1, matrix A 1 ), (Chromaticity point 2, matrix A 2 ), (Chromaticity point 3, matrix A 3 ), ... (chromaticity point n, matrix A n ),... Are stored.
[0022]
The chromaticity point n, which is the chromaticity point information, is (R, G, B) = (255, 0, 0), (0, 255, 0) when the RGB values take values from 0 to 255, for example. ), (0, 0, 255) and (255, 255, 255) are represented as (X, Y, Z) at four points. That is, a plurality of different color spaces can be defined by differently determining the respective XYZ values corresponding to the red, green, blue, and white colors. In other words, it can be said that each color space can be defined by a matrix of 3 rows and 3 columns representing the conversion relationship from R, G, B to the respective chromaticity points X, Y, Z. The chromaticity point information that defines this color space can be experimentally determined in advance in consideration of, for example, conditions such as the color gamut of a plurality of types of printers that can be used.
[0023]
A matrix A as a color correction parameter corresponding to each color space n Is expressed as a matrix of 3 rows and 3 columns for converting RGB image data into R′G′B ′ image data. This matrix A n Is such that the four points of (R, G, B) are converted into four points of (X, Y, Z), which are the corresponding chromaticity point information, from RGB to R'G'B '. It is expressed as a transformation. That is, (R'G'B ') is converted into (X, Y, Z) by a matrix of three rows and three columns that defines a predetermined relationship between the RGB color system and the XYZ color system, and this matrix and the matrix A n Matrix A so that the four points (R, G, B) are converted to the four points (X, Y, Z) by the product of n Is determined.
[0024]
The evaluation of the color space by the color space selection unit 112 is performed as follows. This evaluation is performed based on the color gamut information of the printer and the color gamut information of the digital camera obtained by the information acquisition unit 111 as described above.
[0025]
Specifically, for example, the evaluation of the color space is performed using the evaluation value calculated for each color space by the following equation (1). This evaluation value is an evaluation value that prevents the color space from becoming too large so that the color gamut of the printer can be sufficiently used and color reproduction does not deteriorate when mapping to the printer color gamut. The higher the value, the higher the evaluation (the maximum value is 1). Where G I Is the volume of the camera gamut calculated for each of the plurality of color spaces, G P Is the volume of the printer gamut obtained by the information acquisition unit 111 as described above, G I ∩G P Is the volume of the overlapping area of the camera gamut and the printer gamut.
(G I ∩G P ) 2 / G I × G P (1)
[0026]
Camera color gamut volume G I Is the color gamut volume G of the printer P Can be obtained in the same manner as That is, for each of the plurality of color spaces, a matrix of 3 rows and 3 columns for converting RGB values, which are the color space of the digital camera, into XYZ values is calculated from the chromaticity point information, and the digital camera outputs Is converted to XYZ. Further, by converting the XYZ values obtained by the conversion into CIELAB values in accordance with a predetermined relationship, an LUT for converting RGB values in the camera color space into CIELAB values is obtained. Then, the eight points constituting the unit cube of the RGB values are converted into eight points of the CIELAB value using the LUT, and the volume of the solid by the eight points after the conversion is calculated. 3 Calculate the sum G for each unit cube to obtain the volume G of the camera gamut I Get. Also, the volume G of the overlapping area I ∩G P Is determined by using the LU Т obtained for the color gamut of the printer described above to determine whether or not the converted solid falls within the color gamut of the printer, and calculating the sum only for the volume of the solid that has entered. be able to.
[0027]
Then, the color space selection unit 112 sets a color space having the largest evaluation value among the plurality of color spaces as an output color space, and outputs a color correction matrix corresponding to the color space to the color correction unit 104. For example, according to the above evaluation, if the evaluation of the color space constituted by the chromaticity point 1 in FIG. 1 Is output to the color correction unit 104 as a color correction parameter.
[0028]
The above processing is performed in advance, and the following processing is performed at the time of shooting. When the user presses a shutter button of a digital camera (not shown) to photograph a subject, the exposure time of the image sensor of the image pickup unit 101 and the aperture of the photographing lens are controlled by the exposure adjustment unit 102 according to the output of the image pickup unit 101. The digital data of the captured image is output from the imaging unit 101 while the image is being captured.
[0029]
The pixel interpolation unit 103 performs a statistical analysis such as calculation of an average value on the image data output from the imaging unit 101, and performs a white balance so that a predetermined statistic calculated from the image data becomes a predetermined value. Find a coefficient for adjusting the balance. At this time, if a plurality of white balance modes of the digital camera can be set in order to correspond to a plurality of light sources, there is a target value of a statistic according to each mode, and an optimum coefficient is determined for each mode. These coefficients are obtained for each of the RGB channels and are used when interpolating RGB color image data at a predetermined pixel position. FIG. 3 shows an arrangement of the color filters of the image sensor of the image pickup unit 101 in the present embodiment. As shown in FIG. 3, at each pixel position, only the pixel value of one channel out of RGB is obtained, so the pixel value of the channel different from the color of the filter is obtained by interpolation. In this case, at the pixel position where the color of the filter is G, when calculating the pixel value of the G channel, the output value is the value obtained by multiplying the pixel value by the coefficient corresponding to the G channel. When calculating the pixel value of the R or B channel, the output value is the value obtained by multiplying the pixel values of two adjacent pixels by the coefficient corresponding to each channel and averaging them. In addition, at a pixel position where the color of the filter is R or B, when a pixel value of a channel of the same color as the filter is obtained, a value obtained by multiplying the pixel value by a coefficient corresponding to each channel becomes an output value. When obtaining the pixel value of a channel of a color different from that of the filter, a coefficient corresponding to each channel is multiplied by the pixel values of four adjacent pixels, and the output value is an average value. Note that the above pixel interpolation method is an example. For example, in a case where the pixel value of the R or B channel is obtained at the pixel position where the filter color is G, the pixel of the corresponding color pixel separated by a predetermined distance is obtained. The value may be multiplied by a coefficient corresponding to each channel, and a weighted average value based on the distance may be used as the output value.
[0030]
Next, the color correction unit 104 performs a color correction process on the color image data output from the pixel interpolation unit 103 by a matrix operation represented by the following equation (2).
C '= A n C (2)
Here, C = (R, G, B) t , C ′ = (R ′, G ′, B ′) t , (T represents transposition), and respectively represent RGB values before and after color correction. Also, A n Is a color correction parameter output from the color space selection unit 112 and corresponding to the selected color space, and is a matrix of 3 rows and 3 columns. By this color correction, the image data output from the digital camera to the printer can be made into a color gamut that has a small difference from the color gamut of the printer. Even within the range, optimal color gamut mapping can be performed and good color reproduction can be achieved.
[0031]
Next, the RGB values after the matrix operation are subjected to γ conversion with respect to the image data for each of the RGB channels by referring to the table, and the image data is adjusted to the voltage-luminance characteristic (γ characteristic) of the display. Do.
[0032]
The image data that has been subjected to the above correction processing by the color correction unit 104 is compressed by the image compression unit 105 according to the desired image quality and compression ratio. The recording unit 106 stores the compressed image data together with the chromaticity point information and the color correction parameter of the digital camera or the color gamut information of the LU # directly representing the color gamut of the digital camera and the information at the time of shooting in a predetermined image. The image data is recorded on the recording medium 200 as one image data according to the format.
[0033]
FIG. 4 is a diagram illustrating an example of an image format. In the figure, reference numeral 211 denotes an image processing parameter storage unit, which includes chromaticity point information of the color space selected by the color space selection unit 112 and a color correction matrix A corresponding to the color space. n Is stored. Reference numeral 212 denotes a photographing information storage unit, which records information such as a photographing mode at the time of photographing by the camera and a focal length of the photographing lens. Reference numeral 213 denotes an image information storage unit which stores the above-described compressed image data.
[0034]
When printing the photographed image data, the image data is input to the printer by attaching the recording medium 200 storing the image data in the image format to the printer as described above, and the printing unit 121 of the printer transmits the image data to the printer. The printing is performed based on the information.
[0035]
That is, the printing unit 121 of the printer performs mapping from the color space in which the image data is recorded to the color gamut of the printer so as to store the hue and the gradation, and performs printing based on the mapped image data.
[0036]
FIG. 5 is a diagram illustrating this mapping. As shown in the drawing, in the present embodiment, the R, G, and B values are mapped using the LU # of each of the digital camera and the printer described above and comparing the color gamut indicated by the CIELAB space indicated by these. As described above, since mapping is performed so as to preserve gradation and hue, in CIELAB space, L * Is a constant plane, b * / A * Is maintained such that the constant value is maintained. Note that this mapping can be implemented as a table having the contents described below.
[0037]
Saturation of the camera gamut for each hue,
[0038]
(Equation 1)
Figure 2004178428
[0039]
The maximum value of R I , The maximum value of the saturation of the printer color gamut P Then R I <R P In the case of I > R P If, the saturation is R P / R I Mapping without changing the hue. For example, input point x in hue 1 shown in FIG. 1 The saturation of c 1 In this hue 1, R I1 > R P1 X 1 Is the saturation c on hue 1 1 × (R P1 / R I1 ). On the other hand, for hue 2, R I2 <R P2 , The input point x on hue 2 2 Is the input point x 2 Is mapped to the location.
[0040]
When such a mapping method is used, when the difference between the color gamut of the image data and the printer color gamut is large, there is a problem that, for example, saturation is greatly changed by color compression and color reproducibility is deteriorated. The color space in which the image data according to the present embodiment is recorded is a color space in which the difference from the printer color gamut is prevented from being too large by selecting using the evaluation value as shown in Expression (1). Thus, it is possible to prevent the color reproducibility from being lowered by the mapping.
[0041]
<Other embodiments>
In the above embodiment, the mapping between the color gamut of the digital camera and the printer has been described as an example, but the application of the present invention is not limited to this example. For example, when image data processed by a PC (Personal Computer) is printed by a printing device such as a printer, the present invention can be applied to color gamut mapping between two devices having different color gamuts. In the case where the PC and the printing apparatus are devices, instead of performing only the mapping with the printing apparatus as in the above-described embodiment, for example, all the processing may be performed with the PC. Which side of the two devices takes place does not affect the application of the invention.
[0042]
Further, in the above embodiment, when printing the image data recorded by the camera, the image data is directly passed to the printer by the recording medium, but once the image data is passed to the PC, and then the PC sends the image data to the printer. Image data may be passed. As described above, when the information is transmitted through the PC, the image information read and compressed by the application program of the PC is decompressed and displayed on the display. Then, the user checks the image displayed on the display, and performs printing with the printer connected to the PC.
[0043]
In this case, since a color correction matrix (color correction parameter) corresponding to the color space is stored in the recording medium 200 mounted on the digital camera in a predetermined format together with the image data, the color correction matrix is read by the application program. If a matrix corresponding to another color space is stored in a storage device accessed by a program, it can be converted into an image using another color space and displayed or printed. For example, in order to convert to image data using another color space, inverse γ conversion of the γ conversion of the color correction unit 104 is performed on the image data expanded to RGB, and the image processing parameter storage unit of the predetermined format is used. The inverse conversion of the color correction matrix obtained from 211 is performed, the conversion shown in Expression (2) is performed using a color correction matrix for performing color correction processing of a desired color space, and the γ conversion may be performed again.
[0044]
Further, in the above-described embodiment, an example has been described in which the color correction unit 104 performs color processing by matrix conversion of 3 rows and 3 columns. However, for example, a color correction matrix of 3 rows and 9 columns as shown in the following equation (3) May be performed.
C '= A'C''(3)
Here, C ″ = (R, G, B, RG, GB, BR, R 2 , G 2 , B 2 ) t And (R, G, B) represent the RGB values before color correction. A 'is a matrix of 3 rows and 9 columns.
[0045]
Further, color correction by LUT conversion is performed only on representative pixel values, and for other pixel values, pixel values to be converted are obtained by interpolation from the input / output relationship of the representative pixel values stored in the table, Correction may be performed. Further, the relationship of the color correction may be represented as a function of a predetermined format, and parameters of the function may be stored, and the color correction may be performed by a function operation. In this case, the conversion is not limited to one function, and may be a combination of a plurality of functions.
[0046]
In the above-described embodiment, when the characteristics of the color correction processing performed by the color correction unit 104 are recorded on the recording medium 200 as the image processing parameter storage unit 211 of a predetermined format, the color space selected by the color space selection unit 112 is used. Are recorded as they are, but the color correction parameters recorded in the color space selection unit 112 are associated with the color processing mode of the camera, and the color correction parameters of the camera corresponding to the color correction parameters unique to the color space are recorded. The mode may be recorded. When displaying or printing image data, if the color correction parameters corresponding to the mode (color space) of the camera are stored in advance in the application program of the PC, the printing method described in the above embodiment can be used. Similarly, printing that reflects the color reproduction characteristics of an image using a desired color space can be performed.
[0047]
In place of the color correction parameters, “Specification ICC.1: 1998-09 File Format for ColorProfiles” (1998), published by International ColorConsortium, pp. 146-334, and An input profile corresponding to the color correction parameter may be recorded in the form of an input profile as described in 28-30. When displaying or printing image data, if an input profile can be read from the image processing parameter storage unit 211 by an application program of the PC, an image using a desired color space specified by the input profile can be obtained. Display and printing reflecting the color reproduction characteristics are possible.
[0048]
Furthermore, in the process of the color space selection unit 112 of the above embodiment, a plurality of color space information and color correction parameters corresponding to each are stored in advance, and the color gamut information of the printer obtained by the information acquisition unit 111 is obtained. Although the color space and the color correction parameter are selected according to the color space, an optimum color space may be generated and output according to the color gamut of the printer acquired by the information acquisition unit 111. For example, for the color gamut of the printer acquired by the information acquisition unit 111, a color space with the highest evaluation based on the evaluation value of the above equation (1) is generated, and a color correction matrix corresponding to the color space is generated. You can also.
[0049]
<Still another embodiment>
As described above, the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, a printer, etc.) or to an apparatus including one device (for example, a copying machine or a facsimile machine). May be.
[0050]
Further, a program code of software for realizing the functions of the above-described embodiment is stored in an apparatus or a computer in a system connected to the various devices so as to operate the various devices so as to realize the functions of the above-described embodiments. The present invention also includes those which are supplied and implemented by operating a computer (CPU or MPU) of the system or apparatus according to a stored program and operating the various devices.
[0051]
In this case, the program code itself of the software realizes the function of the above-described embodiment, and the program code itself and a unit for supplying the program code to the computer, for example, a storage storing the program code The medium constitutes the present invention.
[0052]
As a storage medium for storing such a program code, for example, a floppy (registered trademark) disk, hard disk, optical disk, magneto-optical disk, CD-ROM, magnetic tape, nonvolatile memory card, ROM, or the like can be used.
[0053]
When the computer executes the supplied program code, not only the functions of the above-described embodiments are realized, but also the OS (Operating System) running on the computer, or other application software. It goes without saying that such a program code is also included in the embodiment of the present invention when the functions of the above-described embodiment are realized in cooperation with the above.
[0054]
Further, the supplied program code is stored in a memory provided on a function expansion board of the computer or a function expansion unit connected to the computer, and then, based on an instruction of the program code, a CPU or the like provided on the function expansion board or the function expansion unit. It is needless to say that the present invention includes a case in which the functions of the above-described embodiments are implemented by performing part or all of the actual processing.
[0055]
Hereinafter, embodiments of the present invention will be described below.
[0056]
[Embodiment 1] An image processing method for mapping image data of a first color gamut to a second color gamut different from the first color gamut,
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. Determine the color space,
Correcting the image data of the first color gamut using a color correction parameter corresponding to the determined color space;
Mapping the corrected image data of the first color gamut to the second color gamut using information on the determined color space and color correction parameters corresponding to the color space;
An image processing method comprising steps.
[0057]
[Embodiment 2] In the step of determining the color space, the degree of overlap between the first color gamut and the second color gamut in a predetermined color space is calculated, and the higher the degree of overlap, the higher the evaluation. 2. The image processing method according to claim 1, wherein
[0058]
[Embodiment 3] The step of defining a color space according to the first or second embodiment, wherein the color space is determined by selecting a color space having the highest evaluation from a plurality of predetermined color spaces. Image processing method.
[0059]
Fourth Embodiment The color correction parameter is matrix data, and the step of correcting the image data is performed by performing a matrix operation on the image data. Image processing method.
[0060]
[Embodiment 5] An image processing system for mapping image data of a first color gamut to a second color gamut different from the first color gamut,
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. Color space determining means for determining a color space;
Correction means for correcting the image data of the first color gamut using a color correction parameter corresponding to the determined color space;
Mapping means for mapping the corrected image data of the first color gamut to the second color gamut using information on the determined color space and color correction parameters corresponding to the color space;
An image processing system comprising:
[0061]
[Embodiment 6] The color space determination means calculates the degree of overlap between the first color gamut and the second color gamut in a predetermined color space, and the higher the degree of overlap, the higher the evaluation. The image processing system according to the fifth embodiment, characterized in that:
[0062]
[Embodiment 7] The method according to embodiment 5 or 6, wherein the step of determining the color space determines the color space by selecting a color space having the highest evaluation from a plurality of predetermined color spaces. Image processing system.
[0063]
Embodiment 8 The color correction parameter is matrix data, and the step of correcting the image data is performed by performing a matrix operation on the image data. Image processing system.
[0064]
[Embodiment 9] The first color gamut is a color gamut of image data captured by a camera, and the second color gamut is a color gamut of a printing apparatus that performs printing based on the image data obtained by the mapping. An image processing system according to any one of embodiments 5 to 8, wherein
[0065]
[Embodiment 10] A camera which outputs image data of a first color gamut, wherein the first color gamut is mapped to a second color gamut different from the first color gamut,
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. Color space determining means for determining a color space;
Correction means for correcting the image data of the first color gamut using a color correction parameter corresponding to the determined color space;
Wherein the corrected image data of the first color gamut is mapped to the second color gamut using information on the determined color space and color correction parameters corresponding to the color space. Features camera.
[0066]
[Embodiment 11] A printing apparatus that performs a process of mapping image data of a first color gamut to a second color gamut different from the first color gamut and performs printing based on the mapped image data. So,
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. A color space is determined, and the image data of the first color gamut corrected using the color correction parameter corresponding to the determined color space is converted into the color correction parameter corresponding to the determined color space and the color space. Mapping means for mapping to the second color gamut using the information according to
A printing device comprising:
[0067]
[Embodiment 12] A program for executing image processing for mapping image data of a first color gamut to a second color gamut different from the first color gamut by being read by a computer. hand,
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. Determine the color space,
Correcting the image data of the first color gamut using a color correction parameter corresponding to the determined color space;
Mapping the corrected image data of the first color gamut to the second color gamut using information on the determined color space and color correction parameters corresponding to the color space;
A program having steps.
[0068]
[Embodiment 13] A storage medium storing an image processing program for mapping image data of a first color gamut to a second color gamut different from the first color gamut so as to be readable by a computer. The image processing is
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. Determine the color space,
Correcting the image data of the first color gamut using a color correction parameter corresponding to the determined color space;
Mapping the corrected image data of the first color gamut to the second color gamut using information on the determined color space and color correction parameters corresponding to the color space;
A storage medium having steps.
[0069]
【The invention's effect】
As described above, according to the present invention, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and a color space is determined such that the evaluation is highest at a point where the difference is small. The image data of the first color gamut is corrected using the color correction parameters corresponding to the obtained color space, and the corrected image data is mapped to the second color gamut. Color gamut mapping with a small difference from the color gamut can be performed.
[0070]
As a result, optimal color mapping can be performed, for example, regardless of the range of the color gamut of the printer that performs printing.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of an image processing system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a state in which chromaticity point information and color correction parameters are stored for each color space in a color space selection unit illustrated in FIG. 1;
FIG. 3 is a diagram schematically illustrating an arrangement of color filters of an imaging device of the imaging unit illustrated in FIG. 1;
FIG. 4 is a diagram illustrating an example of an image format recorded by a recording unit illustrated in FIG. 1;
FIG. 5 is a diagram illustrating a mapping process in the printer.
[Explanation of symbols]
101 Imaging unit
102 Exposure adjuster
103 pixel interpolation unit
104 color correction unit
105 Image compression unit
106 Recorder
111 Information acquisition unit
112 Color space selector
121 Printing Department
122 color gamut storage
200 recording medium
211 Image processing parameter storage unit
212 imaging information storage unit
213 Image information storage unit
300 connection

Claims (1)

第1の色域の画像データを前記第1の色域とは異なる第2の色域にマッピングするための画像処理方法であって、
前記第1色域および前記第2色域それぞれの色域情報に基づき当該第1色域と第2色域との違いに係る評価を行い、該評価が当該違いが小さい点で最も高くなるよう色空間を定め、
該定められた色空間に対応した色補正パラメータを用いて前記第1の色域の画像データを補正し、
前記定められた色空間および該色空間に対応した色補正パラメータに係る情報を用いて前記補正された第1の色域の画像データを前記第2の色域にマッピングする、
ステップを有したことを特徴とする画像処理方法。
An image processing method for mapping image data of a first color gamut to a second color gamut different from the first color gamut,
Based on the color gamut information of each of the first color gamut and the second color gamut, an evaluation relating to the difference between the first color gamut and the second color gamut is performed, and the evaluation is highest when the difference is small. Determine the color space,
Correcting the image data of the first color gamut using a color correction parameter corresponding to the determined color space;
Mapping the corrected image data of the first color gamut to the second color gamut using information on the determined color space and color correction parameters corresponding to the color space;
An image processing method comprising steps.
JP2002346050A 2002-11-28 2002-11-28 Image processing method Pending JP2004178428A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002346050A JP2004178428A (en) 2002-11-28 2002-11-28 Image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002346050A JP2004178428A (en) 2002-11-28 2002-11-28 Image processing method

Publications (1)

Publication Number Publication Date
JP2004178428A true JP2004178428A (en) 2004-06-24

Family

ID=32707075

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002346050A Pending JP2004178428A (en) 2002-11-28 2002-11-28 Image processing method

Country Status (1)

Country Link
JP (1) JP2004178428A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074414A (en) * 2005-09-07 2007-03-22 Canon Inc Color processing method and its device
JP2008042711A (en) * 2006-08-09 2008-02-21 Fuji Xerox Co Ltd Color converter, color converting method, color conversion program, color conversion coefficient creating apparatus, color conversion coefficient creating method, and color conversion coefficient creation program
US7733525B2 (en) 2005-10-14 2010-06-08 Samsung Electronics Co., Ltd. Gamut mapping method and apparatus

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007074414A (en) * 2005-09-07 2007-03-22 Canon Inc Color processing method and its device
JP4533287B2 (en) * 2005-09-07 2010-09-01 キヤノン株式会社 Color processing method and apparatus
US7733525B2 (en) 2005-10-14 2010-06-08 Samsung Electronics Co., Ltd. Gamut mapping method and apparatus
JP2008042711A (en) * 2006-08-09 2008-02-21 Fuji Xerox Co Ltd Color converter, color converting method, color conversion program, color conversion coefficient creating apparatus, color conversion coefficient creating method, and color conversion coefficient creation program

Similar Documents

Publication Publication Date Title
US8265411B2 (en) Image recording apparatus, image recording method, image processing apparatus, image processing method and image processing system
JP4940639B2 (en) Image processing apparatus, image processing method, and image processing program
JP4131192B2 (en) Imaging apparatus, image processing apparatus, and image recording apparatus
EP1558022A2 (en) Image processing apparatus, method and program, image pickup apparatus and image data output method and program
US20030058349A1 (en) Method, apparatus, and program for image processing
US20040196381A1 (en) Image processing method and apparatus
JP4533287B2 (en) Color processing method and apparatus
WO2003036960A1 (en) Control of image output using image processing control data
JP2005210495A (en) Image processing apparatus, method, and program
JP2004096500A (en) Image pickup apparatus, image processing apparatus, and image recording apparatus
US7324702B2 (en) Image processing method, image processing apparatus, image recording apparatus, program, and recording medium
US20020085750A1 (en) Image processing device
JP2004088345A (en) Image forming method, image processor, print preparation device, and storage medium
JP5552795B2 (en) Imaging apparatus, image processing apparatus, and program
JP2004080737A (en) Imaging device, imaging method, computer program and computer readable recording medium
JP2004178428A (en) Image processing method
JP4623024B2 (en) Electronic camera
JP2006203571A (en) Imaging apparatus, image processing apparatus, and image recording apparatus
JP2000232618A (en) Photo-finishing method, system therefor and recording medium
JP3912196B2 (en) Color conversion table creation device, color conversion table creation method, recording medium recording a color conversion table creation program, and profile creation device for creating a profile based on the color conversion table created by the above device or method
JP2004328530A (en) Imaging apparatus, image processing apparatus, and image recording apparatus
JP2003134457A (en) Electronic camera
JP4047154B2 (en) Image processing apparatus and image processing method
JP2004236201A (en) Image processor and image processing method
JP2004096444A (en) Image processor and method thereof