JP2004297438A - Image correction method, apparatus, and program - Google Patents

Image correction method, apparatus, and program Download PDF

Info

Publication number
JP2004297438A
JP2004297438A JP2003086952A JP2003086952A JP2004297438A JP 2004297438 A JP2004297438 A JP 2004297438A JP 2003086952 A JP2003086952 A JP 2003086952A JP 2003086952 A JP2003086952 A JP 2003086952A JP 2004297438 A JP2004297438 A JP 2004297438A
Authority
JP
Japan
Prior art keywords
color
coordinate position
correction
distance
conversion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003086952A
Other languages
Japanese (ja)
Other versions
JP4002526B2 (en
Inventor
Yoshihiro Yamaguchi
義弘 山口
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.)
Fujifilm Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
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 Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2003086952A priority Critical patent/JP4002526B2/en
Publication of JP2004297438A publication Critical patent/JP2004297438A/en
Application granted granted Critical
Publication of JP4002526B2 publication Critical patent/JP4002526B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image correction method, apparatus, and program capable of easily performing the correction of approaching a color approximated to a target color in an image to the target color. <P>SOLUTION: In the image correction method, a spherical area within a radius EO is selected from the target color on an L*a*b* color space for a correction range as shown (A), the coordinate position of a pixel of a color located within the correction range on the L*a*b* color space is moved in the direction of approaching the coordinate position of the target color, a conversion condition for converting image data is decided so that a movement amount becomes a maximum when a distance E from the target color is E1 shorter than the radius EO and zero when the distance E is 0 and the distance E is EO such that the moving amount in a direction, the coordinate position approaching the coordinate position of the target color in accordance with the distance E is changed, and image data of the correction object are converted according to the decided conversion condition to apply a color correction to the image data of the correction object. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は画像補正方法、装置及びプログラムに係り、特に、画像の色補正を行うための画像補正方法、該画像補正方法が適用可能な画像補正装置、及び、コンピュータを画像補正装置として機能させるためのプログラムに関する。
【0002】
【従来の技術】
被写体を撮影することで得られたデジタルの画像データを記録材料に画像として記録する場合、被写体が記録画像上で適切な色として再現されるように、3次元ルックアップテーブル(3D−LUT)を用いて画像データの色補正を行うことが一般的である。3D−LUTによる色補正は、色再現域の一部分のみを補正対象とすることも、色再現域全体を補正することも可能であり、補正の自由度が高いという特長を有しているが、3D−LUTで所望の色補正を行うためには、色補正の変換条件を規定する変換データを多数の格子点について各々定める必要があり、多大な工数がかかるという問題がある。
【0003】
また、装置の設置箇所に到来した人物を撮影し、撮影によって得られた画像データに対し3D−LUTを用いて色補正等の処理を行い、証明写真等の写真プリント(或いはシールプリント等)を作成・出力する自動撮影装置が知られている(例えば特許文献1を参照)。この種の自動撮影装置では、作成・出力対象の写真プリントが人物写真であるために肌色の再現性が重視され、微妙な肌色調整が求められているが、このような色補正を実現するための変換条件(変換データ)の決定には非常に手間がかかっているのが実情であった。
【0004】
上記に関連する技術として、例えば特許文献2には、3D−LUTを用いて画像データを変換することで画像データの補正を行うにあたり、色空間上のある目的色の濃度点を、目標となる所望色に変換する濃度変更データを中心にして、その周囲の点には中心からの距離に比例して濃度変更データが減少していくように操作することで変換条件を定める技術が提案されている。
【0005】
【特許文献1】
特開平2001−186323号公報
【特許文献2】
特開平11−205620号公報(第6−7頁、図5)
【0006】
【発明が解決しようとする課題】
例えば人物を被写体とする画像における肌色調整では、目標となる肌色が明確に定まっていることが多く、画像中の肌色の部分を目標となる肌色に近づける色補正が求められることが殆どである。
【0007】
これに対し、特許文献2に記載の補正は、目的色の色空間上での移動量を最大とし、色空間上で目的色を中心とする所定範囲内に位置している各色の色空間上での位置を同一の方向へ移動させるものであるので、或る範囲内の色の彩度を全体的に変化させる等の補正を行う場合には適しているものの、例えば色空間上での目的色と目標色の距離が小さい等の場合、所定範囲内に位置している各色の色空間上での位置の移動量が非常に小さくなり、かつ移動方向が目標色に近づく方向と必ずしも一致しないので、所望の色補正を実現できない場合がある。これを回避するためには、色空間上での目標色との距離も考慮して試行錯誤的に目的色を調整する必要があり、所望の色補正を実現するためのパラメータの設定(目的色の設定等)に手間がかかるという問題があった。
【0008】
本発明は上記事実を考慮して成されたもので、画像中の目標色に近似する色を目標色に近づける補正を容易に実現できる画像補正方法、画像補正装置及びプログラムを得ることが目的である。
【0009】
【課題を解決するための手段】
上記目的を達成するために請求項1記載の発明に係る画像補正方法は、均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換する変換条件を定める第1ステップ、第1ステップで定めた変換条件に従って補正対象の画像データを変換する第2ステップを含んでいる。
【0010】
本発明に係る均等色空間としては、例えばCIE(Commission Internationale de l’Eclairage:国際照明委員会)が均等知覚色空間として推奨したL*a*b*表色系の色空間を適用できるが、他の色空間(例えばL*u*v*表色系の色空間等)を用いてもよい。均等色空間は、2つの知覚色の間で知覚される色の差(色差)が均等(色差が同一の2つの知覚色の色空間内での座標位置間の距離が一定)となるように定められているので、均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色は、目標色に近似する色として知覚されることになる。
【0011】
上記に基づき請求項1記載の発明では、均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換する変換条件を定めている。これにより、特許文献2に記載の技術のように目的色を設定することなく、補正対象の画像データが表す画像の各画素のうち、目標色に近似する色と知覚される色の画素を対象として、当該画素の色が色相・彩度・明度共に目標色に近づくように補正できる変換条件を得ることができる。
【0012】
また、均等色空間上での座標位置が所定範囲内に位置している色の画素の前記均等色空間上での座標位置を、上記のように目標色の座標位置に近づく方向へ各々移動させる補正を行った場合、その移動量によっては、目標色に一致する色の画素が大幅に増加することで、補正後の画像データが表す画像に色潰れ等の画質低下が生じたり、均等色空間上での座標位置を移動させる画素と均等色空間上での座標位置を移動させない画素との境界が不自然な画像となる恐れがある。
【0013】
このため、請求項1記載の発明では、均等色空間上での目標色の座標位置との距離が第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となるように、均等色空間上での座標位置が所定範囲内に位置している色の画素の前記均等色空間上での座標位置の移動量を規定している。これにより、色潰れ等の画質低下が生じたり不自然な画像となったりすることを回避することができる。
【0014】
そして、請求項1記載の発明では、上記のようにして定めた変換条件に従って補正対象の画像データを変換するので、画像中の目標色に近似する色を目標色に近づける補正を容易に実現することができる。
【0015】
なお、請求項1記載の発明において、例えば請求項2に記載したように、最大の移動量(均等色空間上での目標色の座標位置との距離が第2の所定値の色の画素の前記均等色空間上での座標位置の移動量)が第2の所定値よりも小さくなるように変換条件を定めるか、例えば請求項3に記載したように、前記所定範囲内に位置している各色の画素の座標位置の移動量が、各色の画素の座標位置と前記目標色の座標位置との距離よりも小さくなるように変換条件を定めることが好ましい。これにより、色潰れ等の画質低下が生ずることをより確実に回避することができる。
【0016】
ところで、本発明では均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置を目標色の座標位置に近づく方向へ移動させるので、目標色よりも高彩度の色の画素については、本発明に係る補正に伴って彩度が低下することになるが、目標色の彩度が比較的低い場合には上記の彩度低下が画質低下として視認されることがある。
【0017】
上記を考慮すると、請求項1記載の発明において、例えば請求項4に記載したように、目標色の彩度が所定値以上となるように目標色を定める(例えば色再現範囲の外郭に近づくに従って高彩度となるように定められた色空間(例えばsRGB等の色空間)において、目標色の座標位置が色再現範囲の外郭付近となるように目標色を定める等)ことが好ましい。これにより、目標色よりも高彩度の色画素の彩度が本発明に係る補正に伴って低下することが、画質低下として視認されることを抑制することができる。
【0018】
また、請求項1記載の発明において、例えば請求項5に記載したように、均等色空間上で、目標色の座標位置に対し目標色よりも高彩度の色が存在している所定方向については、第1の所定値を小さくすること、及び、目標色の座標位置に近づく方向への座標位置の移動量を小さくすることの少なくとも一方を行って変換条件を定めるようにしてもよい。
【0019】
請求項5記載の発明において、前記所定方向について第1の所定値を小さくした場合には、前記所定方向についての所定範囲の広さが狭くなることで、目標色よりも高彩度の色で、かつ均等色空間上での座標位置を目標色の座標位置に近づく方向へ移動させる画素の数が少なくなり、前記所定方向について目標色の座標位置に近づく方向への座標位置の移動量を小さくした場合には、目標色よりも高彩度の色の画素についての彩度の低下量が小さくなる。従って、請求項5記載の発明を適用した場合にも、目標色よりも高彩度の色画素の彩度が本発明に係る補正に伴って低下することが、画質低下として視認されることを抑制することができる。
【0020】
請求項6記載の発明に係る画像補正装置は、均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換するよう定められた変換条件を記憶する記憶手段と、前記記憶手段に記憶された変換条件に従って補正対象の画像データを変換する変換手段と、を含んで構成されているので、請求項1記載の発明と同様に、画像中の目標色に近似する色を目標色に近づける補正を容易に実現することができる。
【0021】
なお、請求項6記載の発明において、変換手段は、例えば請求項7に記載したように、3次元ルックアップテーブルを含んで構成され、記憶手段に記憶された変換条件を前記3次元ルックアップテーブルにセットした後に補正対象の画像データを入力することで変換を行うように構成することができる。
【0022】
請求項8記載の発明に係るプログラムは、コンピュータを、均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換するよう定められた変換条件を、前記コンピュータの記憶手段に記憶させる記憶制御手段、前記記憶手段に記憶された変換条件に従って補正対象の画像データを変換する変換手段として機能させる。
【0023】
請求項8記載の発明に係るプログラムは、コンピュータを、上記の記憶制御手段及び変換手段として機能させるためのプログラムであるので、コンピュータが請求項8記載の発明に係るプログラムを実行することにより、コンピュータが請求項6に記載の画像補正装置として機能することになり、請求項6記載の発明と同様に、画像中の目標色に近似する色を目標色に近づける補正を容易に実現することができる。
【0024】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態の一例を詳細に説明する。図1には本実施形態に係るシールプリント作成装置10が示されている。シールプリント作成装置10は任意の場所に設置され、設置場所に到来した利用者を撮像し、該撮像によって得られた利用者の画像データに基づいて、利用者の画像のシールプリント(裏面に糊層が設けられかつ枠が打ち抜き加工された小サイズの写真プリントを離型紙に貼着したもの)を作成・出力するよう構成されている。
【0025】
すなわち、シールプリント作成装置10には、被写体としての利用者12が撮影時に立つためのスペース14が形成されており、スペース14の前方には、利用者12を正面から撮像するための撮像部16、撮像部16による撮像によって得られた画像や他の任意の情報を表示可能な表示部18、及び利用者12が操作可能な複数のキーを含んで構成された操作部20が各々設置されている。撮像部16、表示部18及び操作部20は制御装置22に各々接続されている。
【0026】
撮像部16は、利用者12に照明光を照射するストロボ等の照明装置と、受光面に入射された光を光電変換するCCD等の撮像素子と、利用者12で反射された照明光を撮像素子の受光面に結像させる光学系と、撮像素子から出力されたアナログの信号をデジタルの画像データ(本実施形態では、R,G,B各8ビットで個々の画素の階調(濃淡及び色)を表す画像データ)へ変換するA/D変換器を含んで構成されている。撮像部16は制御装置22に接続されており、利用者12が操作部20を操作することで利用者12の撮像が指示されると、制御装置22は撮像部16によって利用者12を撮像させ、この撮像に伴い撮像部16からは利用者12を撮像した結果に相当する画像データが出力される。
【0027】
制御装置22はCPU24、ROM26及び画像メモリ28を含んで構成されており、撮像部16から出力された画像データは画像メモリ28に一時的に記憶される。またROM26には、後述する撮影/プリント処理を実現するための撮影/プリントプログラムと、撮影/プリント処理で使用される色補正用の変換データ及びプリンタ補正用の変換データ(詳細は後述)が予め記憶されている。
【0028】
また、制御装置22にはシールプリンタ30が接続されている。制御装置22による撮影/プリント処理の実行に伴い、画像メモリ28に一時的に記憶された画像データは各種の補正が行われた後にシールプリンタ30へ出力され、シールプリンタ30は、制御装置22から入力された画像データに基づいてシールプリントを作成する。シールプリンタ30によって作成されたシールプリントは図示しない搬送部によって搬送され、図1に破線で示すようにトレイ32内に排出されることで利用者12へ渡される。
【0029】
次に本実施形態の作用として、まず図2を参照し、色補正用変換データ生成処理について説明する。なお、この色補正用変換データ生成処理は、シールプリント作成装置10のROM26に記憶すべき色補正用変換データを生成するための処理であり、シールプリント作成装置10の出荷前に、シールプリント作成装置10とは別のコンピュータ(以下では便宜的に「データ生成用コンピュータ」と称する)によって色補正用変換データ生成プログラムが実行されることで実現される。また、色補正用変換データ生成処理は本発明に係る第1ステップに対応しており、該処理によって生成される色補正用変換データは本発明に係る変換条件に、色補正用変換データが記憶されるROM26は請求項6に記載の記憶手段に対応している。
【0030】
シールプリント作成装置10の制御装置22における画像データに対する各種の補正は、3次元ルックアップテーブル(3D−LUT)を用いて行われる。3D−LUTは3つのデータ(例えば特定の画素のR,G,Bの階調値)が入力されると、入力された3つのデータの組み合わせに対応する別の3つのデータを出力するものであるが、例えば入力される3つのデータが各々8ビットであるとすると、入力データの組み合わせは256=16777216通り(256=2)となり、入力データに対応する出力データを規定するデータ(変換データ)を入力データの全ての組み合わせについて用意したとすると、該変換データを記憶するために膨大な記憶容量が必要となる。
【0031】
本実施形態においても、各画素のデータ(R,G,B各8ビットのデータ)を単位として3D−LUTに画像データが入力され、各画素のデータを単位として変換(補正)が行われるが、本実施形態では変換データのデータ量を削減するために変換データの間引きを行っており、R,G,B各8ビットのデータの各々が、8ビットのデータで表現可能な数値範囲(0〜255)を8刻みで分割したときの分割位置に相当する値であった場合の変換データのみを記憶しておき、3D−LUTに入力されたR,G,Bのデータに対応する変換データが存在しない場合は、記憶されている変換データから出力データを補間演算によって求めるようにしている。
【0032】
なお、上記において、対応する変換データが記憶されるR,G,Bのデータの組み合わせは、互いに直交するR,G,Bの各座標軸で規定されるRGB色空間上に分布する、R,G,B各8ビットのデータで表現可能な色再現範囲を、8ビットのデータで表現可能な256階調を8階調毎に区切ったときの境界に相当する位置で分割することで、前記色再現範囲を格子状に多数の立方体領域へ区切ったときの個々の矩形領域の頂点に相当し、以下では対応する変換データが記憶されるR,G,Bのデータの組み合わせを「格子点」と称する。
【0033】
色補正用変換データ生成処理は、上記の格子点についてのみ色補正用の変換データを生成するものであり、ステップ100では、3D−LUTの各格子点位置に相当する8ビットRGBのデータを、予め該データが登録されたテーブル等から各々取り込む。また、後述する補正を行った個々のデータを補正前のデータと対応付けるために、次のステップ102では、ステップ100で取り込んだ各格子点位置に相当する8ビットRGBのデータに対し、個々のデータを識別するためのラベルを付与し、データ生成用コンピュータのメモリ等に一時的に記憶させる。
【0034】
次のステップ104では、各格子点位置に相当する8ビットRGBのデータをsRGB表色系のデータへ各々変換する。この変換は、例えば以下のようにして行うことができる。すなわち、まず次の(1)式に従い、8ビットRGBのデータR8bit,G8bit,B8bitからデータR’sRGB,G’sRGB,B’sRGBを求める。
【0035】
R’sRGB=R8bit÷255.0
G’sRGB=G8bit÷255.0
B’sRGB=B8bit÷255.0 …(1)
次に、データR’sRGB,G’sRGB,B’sRGBの演算結果に応じて(2)式又は(3)式の演算を行うことで、sRGB表色系のデータRsRGB,GsRGB,BsRGBを求める。すなわち、R’sRGB,G’sRGB,B’sRGB≦0.04045の場合には、
sRGB=R’sRGB÷12.92
sRGB=G’sRGB÷12.92
sRGB=B’sRGB÷12.92 …(2)
一方、R’sRGB,G’sRGB,B’sRGB>0.04045の場合には、
sRGB=[(R’sRGB+0.055)÷1.055]2.4
sRGB=[(G’sRGB+0.055)÷1.055]2.4
sRGB=[(B’sRGB+0.055)÷1.055]2.4 …(3)
上記の演算を各格子点位置に相当する8ビットRGBのデータに対して各々行うことで、各格子点位置に相当するsRGB表色系のデータRsRGB,GsRGB,BsRGBを得ることができる。
【0036】
ステップ106では、ステップ104の演算によって得られた各格子点位置に相当するsRGB表色系のデータRsRGB,GsRGB,BsRGBを、XYZ表色系のデータ(三刺激値X,Y,Z)へ各々変換する。この変換は、次の(4)式の演算を行うことで実現できる。
【0037】
【数1】

Figure 2004297438
【0038】
続いてステップ108では、ステップ106の変換によって得られた各格子点位置に相当するXYZ表色系のデータ(三刺激値X,Y,Z)を、L*a*b*表色系のデータ(明度L*及び色座標a*,b*)へ各々変換する。明度L*は三刺激値のうちのYを用い、次の(5)式の演算を行うことで求めることができる。
【0039】
【数2】
Figure 2004297438
【0040】
但し、Ynは完全拡散反射面の光によるYの値であり、D65の光ではYn=100.000となる。
【0041】
また、色座標a*,b*は三刺激値X,Y,Zを用い、次の(6)式及び(7)式の演算を行うことで求めることができる。
【0042】
【数3】
Figure 2004297438
【0043】
但し、Xn,Znは完全拡散反射面の光によるX,Zの値であり、D65の光ではXn=95.043,Zn=108.897となる。
【0044】
ところで、色補正用変換データ生成処理によって生成される色補正用変換データは、図3(A)に示すように、L*a*b*表色系の色空間上での目標色の座標位置を中心とする半径E0の球状の範囲を補正範囲とし、図3(B)に示すように、補正範囲内に位置している各色の座標位置を目標色の座標位置に近づけることに相当する色補正を実現するためのものであり、詳しくは、図4(A)に「変換前」と表記して示す実線で表されるように、L*a*b*表色系の色空間上での補正対象色の座標位置と目標色の座標位置との距離E=E1(E1<E0)のときには目標色の座標位置に近づく方向への移動量が最大値C1(但し、C1<E1:この条件は請求項2記載の発明に対応している)となり、距離Eが0又はE0のときには前記移動量が0となり、0<E<E1,E1<E<E0の範囲では距離Eの変化に比例して連続的かつ直線的に前記移動量が変化するように補正量特性(距離Eと補正量Cとの関係)が設定されている(図3(B)も参照)。
【0045】
このため、ステップ110では予め設定された目標色データ(目標色をL*a*b*表色系の色空間上で規定するデータ)、補正範囲データ(目標色の座標位置を基準として補正範囲を相対的に規定するデータ:例えば半径E0)、及び補正量のデータ(補正範囲内の各色に対する移動量を規定するデータ:例えば図4(A)に示す補正量特性)を取り込む。
【0046】
またステップ112では、ステップ110で取り込んだ目標色データ及び補正範囲データに基づいて、各格子点位置に相当するL*a*b*表色系のデータが、L*a*b*表色系の色空間内で目標色を中心とする補正範囲内に位置しているか否かを各々判断し、補正範囲内に位置していると判断した格子点位置に相当するデータのみを補正対象のデータとして抽出する。この判別は、次の(8)式の演算を行ってL*a*b*表色系の色空間上での目標色の座標位置との距離Eを求め、求めた距離Eが半径E0以内か否かを判定することを、各格子点位置に相当するデータについて各々行うことで実現できる。
【0047】
【数4】
Figure 2004297438
【0048】
次のステップ114では、補正対象の各データ(各格子点位置に相当するデータのうち補正範囲内に位置している格子点位置に相当するデータ)に対し、ステップ110で取り込んだ補正量データに基づいて色補正を行う。この色補正は、補正対象のデータの現在の座標位置と目標色の座標位置との距離Eに対応する移動距離(図4では補正量Cと表記)を導出し、補正対象のデータの現在の座標位置を、目標色の座標位置へ近づく方向へ、前記導出した移動距離だけ移動させたときのL*a*b*表色系の色空間上での新たな座標位置を求めることによって成される。
【0049】
補正対象のデータに対して上記の色補正を行うと、次のステップ116では、色補正後の補正データ(色補正後の明度L*及び色座標a*,b*)を、XYZ表色系のデータ(三刺激値X,Y,Z)へ各々変換する。なおYは、前出の(5)式から導出される次の(9)式に基づき、L*から求めることができる
【0050】
【数5】
Figure 2004297438
【0051】
また、Xは前出の(6)式及び(7)式にから導出される次の(10)式に基づき、Y(L*)及びa*から求めることができ、Zは前出の(6)式及び(7)式にから導出される次の(11)式に基づき、Y(L*)及びb*から求めることができる。
【0052】
【数6】
Figure 2004297438
【0053】
またステップ118では、ステップ116の変換によって得られたXYZ表色系の補正データ(三刺激値X,Y,Z)をsRGB表色系のデータRsRGB,GsRGB,BsRGBへ変換する。この変換は次の(12)式の演算を行うことで実現できる。
【0054】
【数7】
Figure 2004297438
【0055】
更にステップ120では、ステップ118の変換によって得られたsRGB表色系の補正データRsRGB,GsRGB,BsRGBを8ビットRGBのデータR8bit,G8bit,B8bitへ変換する。この変換は、例えば以下のようにして行うことができる。すなわち、まずsRGB表色系のデータRsRGB,GsRGB,BsRGBの値に応じて(13)式又は(14)式の演算を行うことで、データR’sRGB,G’sRGB,B’sRGBを求める。RsRGB,GsRGB,BsRGB≦0.0031308の場合には、
R’sRGB=12.92×RsRGB
G’sRGB=12.92×GsRGB
B’sRGB=12.92×BsRGB …(13)
一方、RsRGB,GsRGB,BsRGB>0.0031308の場合には、
R’sRGB=1.055×RsRGB (1.0/2.4)−0.055
G’sRGB=1.055×GsRGB (1.0/2.4)−0.055
B’sRGB=1.055×BsRGB (1.0/2.4)−0.055 …(14)
そして、上記の演算によって得られたデータR’sRGB,G’sRGB,B’sRGBを用いて(15)式の演算を行うことで、8ビットRGBのデータR8bit,G8bit,B8bitを得ることができる。
【0056】
8bit=255.0×R’sRGB
8bit=255.0×G’sRGB
8bit=255.0×B’sRGB …(15)
ステップ122では、先のステップ102でメモリ等に一時的に記憶させた8ビットRGBのデータの中から、特定格子点位置に相当する8ビットRGBのデータを取り込む。またステップ124では、ステップ120の変換によって得られた8ビットRGBの補正データ(補正対象として抽出され色補正が行われた後に、L*a*b*→XYZ→sRGB→RGBと変換されたデータ)の中に、ステップ122で取り込んだデータに対応する補正データ(ステップ122で取り込んだデータと同一のラベルが付与された補正データ)が存在しているか否か判定する。
【0057】
ステップ124の判定が肯定された場合には、ステップ122で取り込んだデータが表す特定格子点位置はL*a*b*表色系の色空間上の補正範囲内に位置しており、色補正における補正対象のデータと判断できるので、ステップ126へ移行し、ステップ122で取り込んだ特定格子点位置に相当するデータを、ステップ124で認識した対応する補正データと関連付ける変換データ(前記特定格子点位置に相当するデータが3D−LUTに入力されたときに、3D−LUTから前記補正データを出力させるための変換データ)を生成し、ステップ130へ移行する。
【0058】
一方、ステップ124の判定が否定された場合は、ステップ122で取り込んだデータが表す特定格子点位置はL*a*b*表色系の色空間上の補正範囲外に位置しており、色補正における補正対象外のデータと判断できるので、ステップ128へ移行し、ステップ122で取り込んだ特定格子点位置に相当するデータを無変換で出力(変更せずにそのまま出力)する変換データ(前記特定格子点位置に相当するデータが3D−LUTに入力されたときに、3D−LUTから同一のデータを出力させるための変換データ)を生成する。
【0059】
次のステップ130では、3D−LUTの全ての格子点位置(ステップ102でメモリ等に一時的に記憶させた全ての8ビットRGBのデータ)に対して変換データの生成を行ったかか否か判定する。判定が否定された場合にはステップ122に戻り、ステップ130の判定が肯定される迄ステップ122〜130を繰り返す。そして、ステップ130の判定が肯定されるとステップ132へ移行し、上述した処理によって生成された変換データを色補正用変換データとしてメモリ等に記憶させ、色補正用変換データ生成処理を終了する。
【0060】
これにより、8ビットRGBの画像データを画素単位で3D−LUTに順次入力したときに、L*a*b*表色系の色空間上での目標色の座標位置を中心とする半径E0の球状の補正範囲内に相当する色(すなわち目標色に近似する色と知覚される色)の画素のデータのみを対象として、図4(A)に示す補正量特性に従って目標色に近づける色補正が行われて画像データが出力されるように、3D−LUTを機能させることができる色補正用変換データを得ることができる。
【0061】
本実施形態に係る色補正用変換データ生成処理では、L*a*b*表色系の色空間上での補正対象色と目標色との距離E=E1(E1<E0)のときには目標色の座標位置に近づく方向への移動量が最大値C1(C1<E1)となり、距離Eが0又はE0のときには前記移動量が0となり、0<E<E1,E1<E<E0の範囲では距離Eの変化に比例して連続的かつ直線的に前記移動量が変化するように設定された補正量特性(図4(A)参照)に従って色補正用変換データを生成しているので、生成した色補正用変換データを用いて画像の色補正を行った場合に、図4(A)に「変換後」として示す破線からも明らかなように、目標色と同一の色になる画素の数が必要以上に増大することを抑制することができ、色補正後の画像に色潰れが生じることを防止できると共に、色補正が行われた画素と色補正が行われなかった画素との境界が不自然な画像となったりすることも回避することができる。
【0062】
また、色補正用変換データ生成処理では、上述したように、色補正用変換データの生成にあたって座標位置を移動させる中心の色(目的色)を設定する必要はなく、設定が必要なパラメータは目標色、補正範囲及び補正量特性のみであるので、所望の色補正を実現する色補正用変換データを得るためのパラメータの設定を容易に行うことができる。
【0063】
具体的には、色補正用変換データ生成処理によって生成された色補正用変換データは、本実施形態に係るシールプリント作成装置10において、詳しくは撮像部16による撮像によって得られた利用者12の画像に対する肌色の補正に用いられるが、シールプリント作成装置10の利用者によって肌色の好みが相違していることもある。上記を考慮し本実施形態では、複数種の肌色を目標色として色補正用変換データ生成処理を各々実行することで、複数種の色補正用変換データを生成し、シールプリント作成装置10で目標色の異なる複数種の色補正を選択的に実行可能なように、生成した複数種の色補正用変換データをシールプリント作成装置10のROM26に各々記憶させている。
【0064】
目標色としての複数種の肌色としては、一例として美白肌(L*=85,a*=14,b*=15)や化粧肌(L*=59,a*=18,b*=21)、日焼け肌(L*=50,a*=26,b*=28)を適用することができる。また、例えば補正範囲データとしてはE0=24、補正量特性データとしてはC1=2〜6程度の範囲内で補正量を規定するデータを適用することができ、これらの数値を設定して色補正用変換データ生成処理を複数回繰り返すことで、目標色が異なる複数種の色補正用変換データを容易に得ることができる。
【0065】
続いて、シールプリント作成装置10の設置場所に到来した利用者12がシールプリントの作成を指示する操作を行った(例えば代金を投入した)ことを契機として、ROM26に記憶されている撮影/プリントプログラムがCPU24によって実行されることで実現される撮影/プリント処理について、図5のフローチャートを参照して説明する。
【0066】
ステップ150では、例えば互いに異なる色補正が行われて予めROM26に記憶された複数種のサンプル画像のデータを読み出して、表示部18に画像(選択肢)として表示する等により、所望の仕上がり(色補正の目標色)を指定するよう利用者12に要請する。次のステップ152では、利用者12によって所望の仕上がりが指定されたか否か判定し、判定が肯定される迄待機する。利用者12によって所望の仕上がりが指定されると、ステップ152の判定が肯定されてステップ154へ移行し、撮像部16によって利用者12を被写体として撮影し、撮像部16から出力される画像データ(利用者12を撮像した結果に相当する8ビットRGBの画像データ)を取り込む。
【0067】
ステップ156では、撮像部16から取り込んだ画像データに基づき、該画像データが表す画像の濃度、色バランス、明るさ、彩度等の画像特徴量を演算し、演算した濃度、色バランス、明るさ、彩度等が適正となるように画像データを自動的に補正する補正処理(オートセットアップ処理)の処理条件を決定する。またステップ158では、3D−LUTによる画像データの変換により、ステップ156で決定した処理条件に応じたオートセットアップ処理を行わせるための変換データ(オートセットアップ用変換データ)を生成する。
【0068】
ステップ160では、ROM26に予め記憶されている複数種の色補正用変換データのうち、利用者12によって指定された所望の仕上がり(色補正の目標色)に対応する色補正用変換データを取り込む。なお、ROM26には、3D−LUTによる画像データの変換により、シールプリンタ30によって作成されるシールプリントの画像をシールプリンタ30の特性に応じて補正するプリンタ補正処理を行わせるためのプリンタ補正用変換データも記憶されており、ステップ160ではこのプリンタ補正用変換データも取り込む。
【0069】
次のステップ162では、ステップ158で生成したオートセットアップ用変換データと、ステップ160でROM26から取り込んだ色補正用変換データ、プリンタ補正用変換データを単一の変換データとして合成し(これにより、オートセットアップ処理、色補正処理、プリンタ補正処理を3D−LUTで同時に行わせるための変換データが得られる)、合成後の変換データを3D−LUTとして機能する変換テーブルに設定する。
【0070】
ステップ164では、撮像部16から取り込んだ画像データを、個々の画素のデータを単位として順に取り出し、取り出した画素データをステップ160で変換データを設定した変換テーブルに基づいて順次変換する。この変換は、まず取り出した画素データ(R,G,B各8ビットのデータ)を出力データと対応付ける変換データが変換テーブルに登録されているか(すなわち格子点位置に相当するデータであるか)否かを判断し、変換テーブルに登録されていた場合には、画素データと対応付けて変換テーブルに登録されている出力データ(R,G,B各8ビットのデータ)を出力し、画素データが変換テーブルに登録されていなかった場合には、RGB色空間上で画素データの座標位置の周囲に位置している複数の格子点位置のデータと対応付けて変換テーブルに登録されている複数の出力データに基づいて、画素データに対応する出力データを補間演算によって求めることによって成される。上記の変換により、撮像部16から取り込んだ画像データに対してオートセットアップ処理、色補正処理、プリンタ補正処理が同時に行われることになる。
【0071】
なお、上述したステップ160〜ステップ164は、本発明に係る第2のステップに対応しており、請求項6(詳しくは請求項7)に記載の変換手段にも対応している。
【0072】
そしてステップ166では、ステップ164の変換によって得られた画像データをシールプリンタ30へ出力し、シールプリンタ30によってシールプリントを作成させる。これにより、色補正用変換データにより、画像の肌色部分が利用者12が所望の仕上がりとなるように補正され、オートセットアップ用変換データにより、画像の全体的な濃度、色バランス、明るさ、彩度等も適正となるように補正され、プリンタ用変換データにより、シールプリンタ30の特性に起因する画像の仕上がりのばらつきも補正されたシールプリントが作成され、利用者12へ渡されることになる。
【0073】
なお、上記では互いに異なる目標色を設定して生成した3種類の色補正用変換データを記憶しておき、何れの色補正用変換データを使用するかを利用者12に選択させる場合を説明したが、これに限定されるものではなく、単一の色補正用変換データを記憶しておき、当該色補正用変換データを固定的に用いるようにしてもよい。
【0074】
本発明に係る色補正ではL*a*b*表色系の色空間上で補正範囲内に位置している色の画素に対し、L*a*b*表色系の色空間上での座標位置が目標色の座標位置に近づく方向へ移動するように色補正を行うので、L*a*b*表色系の色空間上で目標色よりも高彩度側に位置している色の画素については色補正に伴って彩度が低下することになり、目標色の彩度が比較的低い場合には上記の彩度低下が画質低下として視認される易い。このため、上記のように単一の色補正用変換データを固定的に用いる等の場合には、目標色としてなるべく彩度の高い色を設定して色補正用変換データを生成することがことが好ましい。
【0075】
例えば肌色の目標色の一例として挙げた「美白肌」「化粧肌」「日焼け肌」の中では「美白肌」が比較的彩度が高いので、これらの目標色の何れか1つを用いるのであれば「美白肌」を採用することが望ましく、他の目標色を採用する場合にも、色味が大きく変化しない範囲で彩度がより高くなるように調整することで、彩度低下が画質低下として顕著に視認されないようにすることが望ましい。上記のように、目標色の彩度を選択/調整することは請求項4記載の発明に対応している。
【0076】
また、色補正に伴う彩度低下を抑制することは、例えば図6(A)に示すように、補正対象色が色空間上で目標色よりも高彩度側に位置しているか否か、或いは色空間上で目標色の座標位置から補正対象色の座標位置へ向かう方向と高彩度の方向の一致度合い等に応じて、補正量C(移動量)の導出に用いる補正量特性を切り替える等によって実現することも可能である。図6(A)の例では、色空間上で目標色の座標位置から補正対象色の座標位置へ向かう方向が高彩度の方向と一致している補正対象色については補正量が非常に小さくされていると共に、色空間上で目標色の座標位置から補正対象色の座標位置へ向かう方向が高彩度の方向と45°相違している補正対象色についても、彩度が目標色以下の他の補正対象色と比較して補正量が小さくされており、上記のように色補正を行うことによっても色補正に伴う彩度低下を抑制できる。この態様は請求項5記載の発明に対応している。
【0077】
また、色補正に伴う彩度低下を抑制することは、例えば図6(B)に示すように、色空間上で目標色よりも高彩度側についての補正範囲の広さを狭くすることによっても実現可能である。補正範囲を上記のように設定することで、色補正に伴って彩度が低下される画素の数が少なくなるので、色補正に伴う彩度低下を抑制することができる。この態様も請求項5記載の発明に対応している。
【0078】
更に、上記では補正量特性として図4(A)に示した補正量特性を用いる例を説明したが、これに限定されるものではなく、例えば図4(B)に示すように、0<E<E1,E1<E<E0の範囲で距離Eの変化に対して非線形に補正量C(座標位置の移動量)が変化する補正量特性を用いてもよいし、図4(C)に示すように、距離Eの変化に拘らず補正量C(座標位置の移動量)が変化しない部分を有する補正量特性を用いてもよいし、多角形状の折れ線から成る補正量特性を用いてもよい。
【0079】
また、上記ではシールプリント作成装置10における色補正に本発明を適用した例を説明したが、本発明はカラー画像の色補正に広く適用可能であり、例えば写真フィルムに記録された画像を読み取ることでデータ化し、印画紙に露光記録することで写真プリントを作成する場合の色補正に適用したり、デジタルスチルカメラ(DSC)等によって被写体を撮像することで得られた画像データに対する色補正に適用することも可能である。
【0080】
また、本発明を適用して生成した変換条件(変換データ)と、該変換条件に従って色補正を行うプログラムをDSCに記憶させておくことで、本発明に係る色補正をDSCで行わせるようにしてもよい。この態様では、DSCが本発明に係る画像補正装置として機能することになる。
【0081】
更に、パーソナル・コンピュータ(PC)等で実行するための画像処理ソフトに、本発明を適用して生成した変換条件(変換データ)と、該変換条件に従って色補正を行うプログラムを付加し、前記画像処理ソフトのインストールプログラムを、PCへの前記画像処理ソフトのインストール時に変換データをPCのHDD(ハードディスクドライブ)等の記憶装置に記憶するように構成しておくことで、本発明に係る色補正をPCで行わせるようにしてもよい。この態様ではPCが本発明に係る画像補正装置として機能することになる。また、上記の画像処理ソフトは請求項8に記載のプログラムに相当し、詳しくは、インストールプログラムによって請求項8に記載の記憶制御手段が実現され、画像処理ソフトの本体プログラムのうち本発明に係る色補正を行うプログラムによって請求項8に記載の変換手段が実現されることになる。
【0082】
【発明の効果】
以上説明したように本発明は、均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換する変換条件に従って、補正対象の画像データを変換するので、画像中の目標色に近似する色を目標色に近づける補正を容易に実現することができる、という優れた効果を有する。
【図面の簡単な説明】
【図1】本実施形態に係るシールプリント作成装置の概略構成図である。
【図2】シールプリント作成装置に記憶すべきデータを生成するために行われる色補正用変換データ生成処理の内容を示すフローチャートである。
【図3】(A)はL*a*b*色空間内における補正範囲の位置の一例を示すイメージ図、(B)は補正範囲内の各色の座標位置の移動量の分布の一例を示すイメージ図である。
【図4】色空間内における目標色と補正対象色の距離Eと、補正対象色の補正量C(座標位置の移動量)との関係の一例を示す線図である。
【図5】シールプリント作成装置で行われる撮影/プリント処理の内容を示すフローチャートである。
【図6】(A)は補正範囲内の各色の座標位置の移動量の分布の他の例を示すイメージ図、(B)は補正範囲の他の形状例を示すイメージ図である。
【符号の説明】
10 シールプリント作成装置
12 利用者
16 撮像部
22 制御装置
24 CPU
26 ROM
30 シールプリンタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image correction method, apparatus, and program, and more particularly to an image correction method for performing color correction of an image, an image correction apparatus to which the image correction method can be applied, and a computer to function as an image correction apparatus. Related to the program.
[0002]
[Prior art]
When digital image data obtained by photographing a subject is recorded as an image on a recording material, a three-dimensional lookup table (3D-LUT) is used so that the subject is reproduced as an appropriate color on the recorded image. It is common to perform color correction of image data by using it. The color correction by the 3D-LUT has a feature that it is possible to correct only a part of the color gamut or to correct the entire color gamut, and the degree of freedom of correction is high. In order to perform a desired color correction with the 3D-LUT, it is necessary to determine conversion data for defining a conversion condition for color correction for each of a large number of grid points.
[0003]
Also, a person who has arrived at the installation location of the device is photographed, and image data obtained by photographing is subjected to color correction using a 3D-LUT, and a photo print (or sticker print, etc.) such as an ID photo is made. An automatic photographing apparatus that creates and outputs is known (see, for example, Patent Document 1). In this type of automatic image capture device, because the photo prints to be created and output are portraits, skin color reproducibility is emphasized and subtle skin color adjustment is required. To realize such color correction, Actually, it took a lot of time to determine the conversion conditions (conversion data).
[0004]
As a technique related to the above, for example, in Patent Document 2, when correcting image data by converting image data using a 3D-LUT, a density point of a target color in a color space is a target. A technique has been proposed in which conversion conditions are determined by operating density change data to decrease in proportion to the distance from the center around density change data to be converted into the desired color. Yes.
[0005]
[Patent Document 1]
JP 2001-186323 A
[Patent Document 2]
Japanese Patent Laid-Open No. 11-205620 (page 6-7, FIG. 5)
[0006]
[Problems to be solved by the invention]
For example, in skin color adjustment in an image of a person as a subject, the target skin color is often clearly determined, and color correction is often required to bring the skin color portion in the image closer to the target skin color.
[0007]
On the other hand, the correction described in Patent Document 2 maximizes the amount of movement of the target color on the color space, and on the color space of each color located within a predetermined range centered on the target color on the color space. Is suitable for performing corrections such as changing the saturation of colors within a certain range as a whole, but for example in a color space. When the distance between the color and the target color is small, the amount of movement of the position of each color within the predetermined range in the color space is very small, and the movement direction does not necessarily match the direction approaching the target color. Therefore, there are cases where desired color correction cannot be realized. In order to avoid this, it is necessary to adjust the target color by trial and error in consideration of the distance to the target color in the color space, and setting parameters for realizing the desired color correction (target color) There is a problem that it takes time and effort to set up.
[0008]
The present invention has been made in consideration of the above-described facts, and an object thereof is to obtain an image correction method, an image correction apparatus, and a program that can easily realize correction that approximates a target color in an image to a target color. is there.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, the image correction method according to the first aspect of the present invention is located within a predetermined range in which the distance from the coordinate position of the target color in the uniform color space is equal to or less than the first predetermined value. The coordinate position of the color pixel in the uniform color space moves with the maximum amount of movement in the direction approaching the coordinate position of the target color when the distance is a second predetermined value smaller than the first predetermined value. In addition, when the distance is 0 and when the distance is the first predetermined value, the moving amount becomes 0, and the moving amount in the direction approaching the coordinate position of the target color changes according to the distance. A first step for determining conversion conditions for converting data includes a second step for converting image data to be corrected according to the conversion conditions determined in the first step.
[0010]
As the uniform color space according to the present invention, for example, the color space of the L * a * b * color system recommended by the CIE (Commission Internationale de l'Eclairage) as the uniform perceptual color space can be applied. Other color spaces (for example, L * u * v * color system color space) may be used. The uniform color space is such that the difference in color (color difference) perceived between two perceived colors is equal (the distance between coordinate positions in the color space of two perceived colors having the same color difference is constant). Therefore, a color that is located within a predetermined range whose distance from the coordinate position of the target color in the uniform color space is equal to or less than the first predetermined value is perceived as a color that approximates the target color. become.
[0011]
Based on the above, in the first aspect of the present invention, the distance between the coordinate position of the target color on the uniform color space and the pixel of the color located within the predetermined range equal to or smaller than the first predetermined value is the uniform color space. The conversion condition for converting the image data is determined so that the amount of movement in the direction in which the coordinate position in the direction approaches the coordinate position of the target color changes according to the distance. As a result, without setting the target color as in the technique described in Patent Document 2, among the pixels of the image represented by the image data to be corrected, the pixel of the color perceived as the color approximate to the target color is targeted. As a result, it is possible to obtain a conversion condition in which the color of the pixel can be corrected so that the hue, saturation, and brightness are all close to the target color.
[0012]
Further, the coordinate position of the color pixel whose coordinate position in the uniform color space is within a predetermined range is moved in the direction approaching the coordinate position of the target color as described above. When correction is performed, depending on the amount of movement, the number of pixels having a color that matches the target color increases significantly, resulting in image degradation such as color crushing in the image represented by the corrected image data, or a uniform color space. There is a possibility that the boundary between the pixel whose coordinate position is moved above and the pixel whose coordinate position is not moved in the uniform color space becomes an unnatural image.
[0013]
For this reason, in the first aspect of the invention, the direction approaching the coordinate position of the target color when the distance from the coordinate position of the target color in the uniform color space is a second predetermined value smaller than the first predetermined value. The coordinate position in the uniform color space is within a predetermined range so that the movement amount becomes 0 when the distance is 0 and when the distance is the first predetermined value. The movement amount of the coordinate position in the uniform color space of the pixel of the position color is prescribed | regulated. As a result, it is possible to avoid a deterioration in image quality such as color collapse or an unnatural image.
[0014]
According to the first aspect of the present invention, the image data to be corrected is converted in accordance with the conversion conditions determined as described above, so that correction that approximates the target color in the image to the target color is easily realized. be able to.
[0015]
In the first aspect of the present invention, for example, as described in the second aspect, the maximum movement amount (the distance from the coordinate position of the target color on the uniform color space is the second predetermined value pixel). The conversion condition is set such that the amount of movement of the coordinate position in the uniform color space is smaller than a second predetermined value, or is located within the predetermined range as described in claim 3, for example. It is preferable that the conversion condition is determined so that the movement amount of the coordinate position of the pixel of each color is smaller than the distance between the coordinate position of the pixel of each color and the coordinate position of the target color. As a result, it is possible to more reliably avoid the deterioration of image quality such as color crushing.
[0016]
By the way, in the present invention, the coordinate position in the uniform color space of the pixel of the color located within the predetermined range whose distance from the coordinate position of the target color in the uniform color space is not more than the first predetermined value is set as the target. Since the color is moved closer to the coordinate position of the color, the saturation of the pixel having a higher saturation than the target color is reduced with the correction according to the present invention, but the saturation of the target color is relatively low. When it is low, the above-mentioned saturation reduction may be visually recognized as image quality deterioration.
[0017]
In consideration of the above, in the invention described in claim 1, for example, as described in claim 4, the target color is determined so that the saturation of the target color is equal to or greater than a predetermined value (for example, as the color reproduction range is approached) It is preferable that the target color is determined so that the coordinate position of the target color is near the outline of the color reproduction range in a color space determined to have high saturation (for example, a color space such as sRGB). Thereby, it can suppress that the saturation of the color pixel whose saturation is higher than the target color is visually recognized as a decrease in image quality due to the correction according to the present invention.
[0018]
In the invention described in claim 1, for example, as described in claim 5, for a predetermined direction in which a color with higher saturation than the target color exists in the coordinate position of the target color on the uniform color space, The conversion condition may be determined by at least one of decreasing the first predetermined value and decreasing the movement amount of the coordinate position in the direction approaching the coordinate position of the target color.
[0019]
In the invention according to claim 5, when the first predetermined value is reduced in the predetermined direction, the width of the predetermined range in the predetermined direction is narrowed, so that the color is higher in saturation than the target color, and When the number of pixels that move the coordinate position in the uniform color space in the direction approaching the coordinate position of the target color is reduced, and the amount of movement of the coordinate position in the direction approaching the coordinate position of the target color in the predetermined direction is reduced In this case, the amount of decrease in saturation for a pixel having a higher saturation color than the target color is reduced. Therefore, even when the invention according to claim 5 is applied, it is suppressed that the saturation of a color pixel having a higher saturation than the target color is visually recognized as a reduction in image quality due to the correction according to the present invention. be able to.
[0020]
The image correction apparatus according to the invention described in claim 6 is characterized in that the uniform color of pixels of a color whose distance from the coordinate position of the target color in the uniform color space is within a predetermined range equal to or less than a first predetermined value. The coordinate position in space moves with the maximum amount of movement in the direction approaching the coordinate position of the target color when the distance is a second predetermined value smaller than the first predetermined value, and the distance is 0. And when the distance is a first predetermined value, the amount of movement is 0, and it is determined to convert the image data so that the amount of movement in the direction approaching the coordinate position of the target color changes according to the distance. The storage means for storing the conversion conditions and the conversion means for converting the image data to be corrected in accordance with the conversion conditions stored in the storage means. Approximate the target color in the image to the target color Correction can be easily realized that.
[0021]
In the invention described in claim 6, the conversion means includes a three-dimensional lookup table as described in claim 7, for example, and the conversion condition stored in the storage means is converted into the three-dimensional lookup table. It is possible to configure such that conversion is performed by inputting image data to be corrected after setting.
[0022]
According to an eighth aspect of the present invention, there is provided a program for causing a computer to perform the equalization of pixels of a color located within a predetermined range in which a distance from a coordinate position of a target color on a uniform color space is not more than a first predetermined value. When the coordinate position on the color space is a second predetermined value that is smaller than the first predetermined value, the coordinate position moves in the direction approaching the coordinate position of the target color with the maximum movement amount, and the distance is It is determined that the amount of movement is 0 when 0 and when the distance is the first predetermined value, and the image data is converted so that the amount of movement in the direction approaching the coordinate position of the target color changes according to the distance. The storage control means for storing the converted conversion conditions in the storage means of the computer, and the conversion means for converting the image data to be corrected according to the conversion conditions stored in the storage means.
[0023]
The program according to the eighth aspect of the invention is a program for causing a computer to function as the storage control means and the conversion means. Therefore, when the computer executes the program according to the eighth aspect of the invention, the computer Will function as the image correction apparatus according to the sixth aspect of the present invention, and as in the case of the sixth aspect of the present invention, the correction that approximates the target color in the image to the target color can be easily realized. .
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a sticker print creating apparatus 10 according to the present embodiment. The sticker print creating apparatus 10 is installed at an arbitrary place, images a user who has arrived at the place of installation, and based on the user image data obtained by the image pickup, a sticker print of the user image (adhesive on the back surface). A small-sized photographic print with a layer provided and a frame punched into a release paper) is created and output.
[0025]
That is, a space 14 for the user 12 as a subject to stand at the time of photographing is formed in the sticker print creating apparatus 10, and an imaging unit 16 for imaging the user 12 from the front in front of the space 14. A display unit 18 that can display an image obtained by imaging by the imaging unit 16 and other arbitrary information, and an operation unit 20 that includes a plurality of keys that can be operated by the user 12 are installed. Yes. The imaging unit 16, the display unit 18, and the operation unit 20 are each connected to the control device 22.
[0026]
The imaging unit 16 captures an illumination device such as a strobe that irradiates the user 12 with illumination light, an imaging element such as a CCD that photoelectrically converts light incident on the light receiving surface, and illumination light reflected by the user 12. An optical system that forms an image on the light-receiving surface of the element, and an analog signal output from the image sensor is converted into digital image data (in this embodiment, the gradation (intensity and gradation) of each pixel with 8 bits each for R, G, and B. It includes an A / D converter that converts image data representing color). The imaging unit 16 is connected to the control device 22, and when the user 12 is instructed to image the user 12 by operating the operation unit 20, the control device 22 causes the imaging unit 16 to image the user 12. With this imaging, the imaging unit 16 outputs image data corresponding to the result of imaging the user 12.
[0027]
The control device 22 includes a CPU 24, a ROM 26 and an image memory 28, and image data output from the imaging unit 16 is temporarily stored in the image memory 28. The ROM 26 stores in advance a photographing / printing program for realizing photographing / printing processing, which will be described later, conversion data for color correction and conversion data for printer correction (details will be described later) used in the photographing / printing processing. It is remembered.
[0028]
Further, a seal printer 30 is connected to the control device 22. With the execution of the photographing / printing process by the control device 22, the image data temporarily stored in the image memory 28 is output to the sticker printer 30 after various corrections, and the sticker printer 30 is supplied from the control device 22. A sticker print is created based on the input image data. The seal print created by the seal printer 30 is transported by a transport unit (not shown), and is delivered to the user 12 by being discharged into the tray 32 as indicated by a broken line in FIG.
[0029]
Next, as an operation of the present embodiment, first, color correction conversion data generation processing will be described with reference to FIG. The color correction conversion data generation process is a process for generating color correction conversion data to be stored in the ROM 26 of the sticker print creating apparatus 10. This is realized by executing a color correction conversion data generation program by a computer (hereinafter referred to as “data generation computer” for convenience) different from the apparatus 10. The color correction conversion data generation process corresponds to the first step according to the present invention, and the color correction conversion data generated by the process is stored in the conversion condition according to the present invention. The ROM 26 corresponds to the storage means described in claim 6.
[0030]
Various corrections to the image data in the control device 22 of the sticker print creating apparatus 10 are performed using a three-dimensional lookup table (3D-LUT). When 3 data (for example, R, G, B gradation values of a specific pixel) is input, the 3D-LUT outputs another 3 data corresponding to the combination of the 3 input data. If, for example, three pieces of input data are 8 bits each, the combination of input data is 256.3= 16777216 (256 = 2)8If data (conversion data) defining output data corresponding to input data is prepared for all combinations of input data, an enormous storage capacity is required to store the conversion data.
[0031]
Also in this embodiment, image data is input to the 3D-LUT in units of data of each pixel (R, G, and B each of 8 bits), and conversion (correction) is performed in units of data of each pixel. In this embodiment, conversion data is thinned out in order to reduce the data amount of the conversion data, and each of R, G, B 8-bit data can be expressed by a numerical range (0 ˜255) is stored only in the conversion data when it is a value corresponding to the division position when dividing into 8 units, and the conversion data corresponding to the R, G, B data input to the 3D-LUT Is not obtained, output data is obtained from the stored conversion data by interpolation.
[0032]
In the above, combinations of R, G, and B data in which corresponding conversion data are stored are distributed in the RGB color space defined by the R, G, and B coordinate axes that are orthogonal to each other. , B by dividing the color reproduction range that can be expressed by 8-bit data at a position corresponding to a boundary when 256 gradations that can be expressed by 8-bit data are divided every 8 gradations. Corresponding to the vertices of each rectangular area when the reproduction range is divided into a large number of cubic areas in a lattice shape, hereinafter, a combination of R, G, B data in which corresponding conversion data is stored is referred to as a “grid point”. Called.
[0033]
The color correction conversion data generation process generates conversion data for color correction only for the above-mentioned grid points. In step 100, 8-bit RGB data corresponding to each grid point position of the 3D-LUT Each of the data is fetched from a table in which the data is registered in advance. Further, in order to associate individual data that has been corrected, which will be described later, with data before correction, in the next step 102, individual data is obtained with respect to 8-bit RGB data corresponding to each grid point position acquired in step 100. A label for identifying is attached and temporarily stored in a memory or the like of a data generation computer.
[0034]
In the next step 104, 8-bit RGB data corresponding to each grid point position is converted into sRGB color system data. This conversion can be performed as follows, for example. That is, according to the following equation (1), 8-bit RGB data R8 bits, G8 bits, B8 bitsTo data R ’sRGB, G ’sRGB, B 'sRGBAsk for.
[0035]
R ’sRGB= R8 bits÷ 255.0
G ’sRGB= G8 bits÷ 255.0
B ’sRGB= B8 bits÷ 255.0 (1)
Next, data R ′sRGB, G ’sRGB, B 'sRGBThe data R of the sRGB color system is obtained by performing the calculation of the expression (2) or (3) according to the calculation result ofsRGB, GsRGB, BsRGBAsk for. That is, R ′sRGB, G ’sRGB, B 'sRGBIn the case of ≦ 0.04045,
RsRGB= R ’sRGB÷ 12.92
GsRGB= G ’sRGB÷ 12.92
BsRGB= B ’sRGB÷ 12.92 (2)
On the other hand, R ’sRGB, G ’sRGB, B 'sRGBIf> 0.04045,
RsRGB= [(R 'sRGB+0.055) ÷ 1.055]2.4
GsRGB= [(G ’sRGB+0.055) ÷ 1.055]2.4
BsRGB= [(B ’sRGB+0.055) ÷ 1.055]2.4      ... (3)
By performing the above calculation on 8-bit RGB data corresponding to each grid point position, sRGB color system data R corresponding to each grid point position is obtained.sRGB, GsRGB, BsRGBCan be obtained.
[0036]
In step 106, sRGB color system data R corresponding to each grid point position obtained by the calculation in step 104 is obtained.sRGB, GsRGB, BsRGBAre converted into XYZ color system data (tristimulus values X, Y, Z), respectively. This conversion can be realized by performing the calculation of the following equation (4).
[0037]
[Expression 1]
Figure 2004297438
[0038]
Subsequently, at step 108, the XYZ color system data (tristimulus values X, Y, Z) corresponding to the respective grid point positions obtained by the conversion at step 106 are converted into L * a * b * color system data. Each is converted into (lightness L * and color coordinates a *, b *). The lightness L * can be obtained by performing the calculation of the following equation (5) using Y of the tristimulus values.
[0039]
[Expression 2]
Figure 2004297438
[0040]
However, Yn is the value of Y by the light of the complete diffuse reflection surface, and D65In this case, Yn = 100.000.
[0041]
Further, the color coordinates a *, b * can be obtained by using the tristimulus values X, Y, Z and performing the calculations of the following equations (6) and (7).
[0042]
[Equation 3]
Figure 2004297438
[0043]
However, Xn and Zn are values of X and Z by the light of the completely diffuse reflection surface, and D65In this case, Xn = 95.043 and Zn = 108.897.
[0044]
By the way, the color correction conversion data generated by the color correction conversion data generation processing is the coordinate position of the target color in the color space of the L * a * b * color system, as shown in FIG. As a correction range, a spherical range having a radius E0 centered on the color is equivalent to bringing the coordinate position of each color located within the correction range closer to the coordinate position of the target color, as shown in FIG. Specifically, in the color space of the L * a * b * color system, as shown by the solid line denoted as “before conversion” in FIG. When the distance between the coordinate position of the correction target color and the coordinate position of the target color is E = E1 (E1 <E0), the amount of movement in the direction approaching the coordinate position of the target color is the maximum value C1 (where C1 <E1: The condition corresponds to the invention of claim 2), and when the distance E is 0 or E0, The amount of movement is 0, and in the range of 0 <E <E1, E1 <E <E0, a correction amount characteristic (distance E and correction amount is set so that the movement amount changes continuously and linearly in proportion to the change of the distance E. (Relationship with C) is set (see also FIG. 3B).
[0045]
Therefore, in step 110, preset target color data (data defining the target color in the color space of the L * a * b * color system) and correction range data (correction range with reference to the coordinate position of the target color). And the data of the correction amount (for example, the data for specifying the movement amount for each color within the correction range: for example, the correction amount characteristic shown in FIG. 4A).
[0046]
In step 112, the L * a * b * color system data corresponding to each grid point position is converted into the L * a * b * color system based on the target color data and correction range data acquired in step 110. In the color space, it is determined whether or not each pixel is within the correction range centered on the target color, and only data corresponding to the lattice point position determined to be within the correction range is the data to be corrected Extract as This determination is performed by calculating the following equation (8) to obtain the distance E from the coordinate position of the target color in the color space of the L * a * b * color system, and the obtained distance E is within the radius E0. It can be realized by performing each of the data corresponding to each grid point position.
[0047]
[Expression 4]
Figure 2004297438
[0048]
In the next step 114, the correction amount data fetched in step 110 is applied to each data to be corrected (data corresponding to the grid point positions located within the correction range among the data corresponding to the grid point positions). Based on this, color correction is performed. In this color correction, a movement distance (denoted as a correction amount C in FIG. 4) corresponding to the distance E between the current coordinate position of the correction target data and the coordinate position of the target color is derived, and the current correction target data is corrected. This is done by obtaining a new coordinate position in the color space of the L * a * b * color system when the coordinate position is moved in the direction approaching the coordinate position of the target color by the derived movement distance. The
[0049]
When the above color correction is performed on the correction target data, in the next step 116, the corrected data (lightness L * and color coordinates a *, b * after color correction) is converted into the XYZ color system. Respectively (tristimulus values X, Y, Z). Y can be obtained from L * based on the following equation (9) derived from the above equation (5).
[0050]
[Equation 5]
Figure 2004297438
[0051]
X can be obtained from Y (L *) and a * based on the following equation (10) derived from the above equations (6) and (7), and Z is the Based on the following equation (11) derived from equations (6) and (7), it can be obtained from Y (L *) and b *.
[0052]
[Formula 6]
Figure 2004297438
[0053]
In step 118, the XYZ color system correction data (tristimulus values X, Y, Z) obtained by the conversion in step 116 is used as sRGB color system data R.sRGB, GsRGB, BsRGBConvert to This conversion can be realized by performing the calculation of the following equation (12).
[0054]
[Expression 7]
Figure 2004297438
[0055]
Further, in step 120, correction data R of the sRGB color system obtained by the conversion in step 118 is obtained.sRGB, GsRGB, BsRGB8-bit RGB data R8 bits, G8 bits, B8 bitsConvert to This conversion can be performed as follows, for example. That is, first, sRGB color system data RsRGB, GsRGB, BsRGBBy performing the calculation of the expression (13) or the expression (14) according to the value of the data R ′,sRGB, G ’sRGB, B 'sRGBAsk for. RsRGB, GsRGB, BsRGBIn the case of ≦ 0.0031308,
R ’sRGB= 12.92 x RsRGB
G ’sRGB= 12.92 x GsRGB
B ’sRGB= 12.92 × BsRGB        ... (13)
On the other hand, RsRGB, GsRGB, BsRGBIf> 0.0031308,
R ’sRGB= 1.055 × RsRGB (1.0 / 2.4)-0.055
G ’sRGB= 1.055 × GsRGB (1.0 / 2.4)-0.055
B ’sRGB= 1.055 × BsRGB (1.0 / 2.4)-0.055 (14)
Then, the data R ′ obtained by the above calculationsRGB, G ’sRGB, B 'sRGBIs used to calculate 8-bit RGB data R8 bits, G8 bits, B8 bitsCan be obtained.
[0056]
R8 bits= 255.0 x R 'sRGB
G8 bits= 255.0 x G 'sRGB
B8 bits= 255.0 x B 'sRGB      ... (15)
In step 122, 8-bit RGB data corresponding to a specific grid point position is taken from the 8-bit RGB data temporarily stored in the memory or the like in step 102. In step 124, 8-bit RGB correction data obtained by the conversion in step 120 (data converted as L * a * b * → XYZ → sRGB → RGB after being extracted and subjected to color correction). ) Includes correction data corresponding to the data acquired in step 122 (correction data assigned the same label as the data acquired in step 122).
[0057]
If the determination in step 124 is affirmative, the specific grid point position represented by the data acquired in step 122 is located within the correction range on the color space of the L * a * b * color system, and color correction is performed. Therefore, the process proceeds to step 126, and conversion data that associates the data corresponding to the specific grid point position captured in step 122 with the corresponding correction data recognized in step 124 (the specific grid point position). When the data corresponding to is input to the 3D-LUT, conversion data for outputting the correction data is generated from the 3D-LUT, and the process proceeds to step 130.
[0058]
On the other hand, if the determination in step 124 is negative, the specific grid point position represented by the data captured in step 122 is located outside the correction range in the color space of the L * a * b * color system, and the color Since it can be determined that the data is not subject to correction in the correction, the process proceeds to step 128, and the conversion data (the above-mentioned specification) outputs the data corresponding to the specific grid point position acquired in step 122 without conversion (outputs it as it is without being changed). When the data corresponding to the grid point position is input to the 3D-LUT, conversion data for outputting the same data from the 3D-LUT is generated.
[0059]
In the next step 130, it is determined whether conversion data has been generated for all grid point positions of the 3D-LUT (all 8-bit RGB data temporarily stored in the memory or the like in step 102). To do. If the determination is negative, the process returns to step 122, and steps 122 to 130 are repeated until the determination of step 130 is affirmed. Then, if the determination in step 130 is affirmed, the process proceeds to step 132, the conversion data generated by the above-described processing is stored in the memory or the like as color correction conversion data, and the color correction conversion data generation processing is terminated.
[0060]
As a result, when 8-bit RGB image data is sequentially input to the 3D-LUT in units of pixels, the radius E0 centered on the coordinate position of the target color in the color space of the L * a * b * color system Only for pixel data of a color corresponding to a spherical correction range (that is, a color perceived as a color approximate to the target color), color correction that approximates the target color according to the correction amount characteristic shown in FIG. It is possible to obtain conversion data for color correction that can make the 3D-LUT function so that image data is output.
[0061]
In the color correction conversion data generation processing according to the present embodiment, the target color when the distance E = E1 (E1 <E0) between the correction target color and the target color in the color space of the L * a * b * color system. When the distance E is 0 or E0, the amount of movement in the direction approaching the coordinate position is 0, and in the range of 0 <E <E1, E1 <E <E0. Since the conversion data for color correction is generated according to the correction amount characteristic (see FIG. 4A) set so that the movement amount changes continuously and linearly in proportion to the change of the distance E, the generation is performed. When the color correction of the image is performed using the converted data for color correction, the number of pixels having the same color as the target color is clear from the broken line shown as “after conversion” in FIG. Can be prevented from increasing more than necessary, and the image after color correction is crushed. It is possible to prevent that occurring, the boundary between the pixels to color correction was not performed performed pixel and color correction can be avoided that may become an unnatural image.
[0062]
In addition, in the color correction conversion data generation process, as described above, it is not necessary to set the center color (target color) for moving the coordinate position when generating the color correction conversion data. Since only the color, correction range, and correction amount characteristics are provided, it is possible to easily set parameters for obtaining conversion data for color correction that realizes desired color correction.
[0063]
Specifically, the color correction conversion data generated by the color correction conversion data generation process is specifically described in the sticker print creating apparatus 10 according to the present embodiment by the user 12 obtained by imaging by the imaging unit 16. Although it is used for the correction of the skin color for the image, the user of the sticker print creating apparatus 10 may have different skin color preferences. In consideration of the above, in this embodiment, a plurality of types of color correction conversion data are generated by executing each color correction conversion data generation process using a plurality of types of skin colors as target colors, and the sticker print creation apparatus 10 performs target conversion The generated plural types of color correction conversion data are respectively stored in the ROM 26 of the sticker print creating apparatus 10 so that a plurality of types of color correction with different colors can be selectively executed.
[0064]
Examples of multiple skin colors as target colors include whitening skin (L * = 85, a * = 14, b * = 15) and makeup skin (L * = 59, a * = 18, b * = 21). Sun tanned skin (L * = 50, a * = 26, b * = 28) can be applied. Further, for example, data defining the correction amount within a range of about E0 = 24 as correction range data and C1 = 2 to 6 as correction amount characteristic data can be applied, and these values are set to perform color correction. By repeating the conversion data generation processing for a plurality of times, it is possible to easily obtain a plurality of types of color correction conversion data having different target colors.
[0065]
Subsequently, the shooting / print stored in the ROM 26 is triggered when the user 12 who has arrived at the installation location of the sticker print creation apparatus 10 has performed an operation to instruct the creation of the sticker print (for example, the user has entered a price). The photographing / printing process realized by executing the program by the CPU 24 will be described with reference to the flowchart of FIG.
[0066]
In step 150, for example, data of a plurality of types of sample images that have been subjected to different color corrections and stored in advance in the ROM 26 are read out and displayed as images (options) on the display unit 18. The user 12 is requested to specify the target color). In the next step 152, it is determined whether or not a desired finish is designated by the user 12, and the process waits until the determination is affirmed. When a desired finish is specified by the user 12, the determination in step 152 is affirmed, the process proceeds to step 154, the user 12 is photographed as a subject by the imaging unit 16, and image data ( 8 bit RGB image data corresponding to the result of imaging the user 12).
[0067]
In step 156, based on the image data captured from the imaging unit 16, image feature amounts such as the density, color balance, brightness, and saturation of the image represented by the image data are calculated, and the calculated density, color balance, and brightness are calculated. The processing conditions for correction processing (auto setup processing) for automatically correcting the image data so that the saturation and the like are appropriate are determined. In step 158, conversion data (auto-setup conversion data) for performing auto-setup processing according to the processing conditions determined in step 156 is generated by converting the image data using the 3D-LUT.
[0068]
In step 160, color correction conversion data corresponding to a desired finish (target color for color correction) designated by the user 12 is fetched from a plurality of types of color correction conversion data stored in advance in the ROM 26. Note that the ROM 26 has a printer correction conversion for performing a printer correction process for correcting a sticker print image created by the sticker printer 30 in accordance with the characteristics of the sticker printer 30 by converting the image data by the 3D-LUT. Data is also stored, and in step 160, the printer correction conversion data is also captured.
[0069]
In the next step 162, the conversion data for auto setup generated in step 158, the conversion data for color correction and the conversion data for printer correction taken in from the ROM 26 in step 160 are combined as a single conversion data (therefore, Conversion data for performing setup processing, color correction processing, and printer correction processing simultaneously in the 3D-LUT is obtained), and the combined conversion data is set in a conversion table that functions as a 3D-LUT.
[0070]
In step 164, the image data captured from the imaging unit 16 is sequentially extracted in units of individual pixel data, and the extracted pixel data is sequentially converted based on the conversion table in which the conversion data is set in step 160. In this conversion, first, conversion data that associates the extracted pixel data (8-bit data for each of R, G, and B) with output data is registered in the conversion table (that is, whether the data corresponds to the grid point position). If it is registered in the conversion table, output data (R, G, B, each 8 bits data) registered in the conversion table in association with the pixel data is output. If not registered in the conversion table, a plurality of outputs registered in the conversion table in association with data of a plurality of grid point positions located around the coordinate position of the pixel data in the RGB color space Based on the data, output data corresponding to the pixel data is obtained by interpolation calculation. With the above conversion, auto setup processing, color correction processing, and printer correction processing are simultaneously performed on the image data captured from the imaging unit 16.
[0071]
Steps 160 to 164 described above correspond to the second step according to the present invention, and also correspond to the conversion means described in claim 6 (specifically, claim 7).
[0072]
In step 166, the image data obtained by the conversion in step 164 is output to the sticker printer 30, and the sticker printer 30 creates a sticker print. Accordingly, the skin color portion of the image is corrected by the color correction conversion data so that the user 12 has a desired finish, and the overall density, color balance, brightness, and color of the image are corrected by the auto setup conversion data. The degree and the like are also corrected to be appropriate, and a sticker print in which variations in the finish of the image due to the characteristics of the sticker printer 30 are also corrected is created by the printer conversion data, and is passed to the user 12.
[0073]
In the above description, a case has been described in which three types of color correction conversion data generated by setting different target colors are stored, and the user 12 selects which color correction conversion data to use. However, the present invention is not limited to this, and single color correction conversion data may be stored and the color correction conversion data may be used in a fixed manner.
[0074]
In the color correction according to the present invention, a color pixel located within the correction range in the color space of the L * a * b * color system is compared with that in the color space of the L * a * b * color system. Since the color correction is performed so that the coordinate position moves in a direction approaching the coordinate position of the target color, the pixel of the color located on the higher saturation side than the target color in the color space of the L * a * b * color system With respect to the color saturation, the saturation is lowered along with the color correction, and when the saturation of the target color is relatively low, the above saturation reduction is easily recognized as a reduction in image quality. For this reason, when a single color correction conversion data is used in a fixed manner as described above, the color correction conversion data can be generated by setting a color having as high saturation as possible as the target color. Is preferred.
[0075]
For example, among “whitening skin”, “makeup skin”, and “tanned skin” listed as examples of skin color target colors, “whitening skin” has a relatively high saturation, so one of these target colors is used. If so, it is desirable to use “whitening skin”, and even when other target colors are used, the saturation can be reduced by adjusting the saturation so that it does not change significantly. It is desirable not to be noticeable as a drop. As described above, the selection / adjustment of the saturation of the target color corresponds to the invention of claim 4.
[0076]
Further, for example, as shown in FIG. 6A, the suppression of the saturation reduction due to the color correction may be performed by checking whether the correction target color is located on the higher saturation side than the target color in the color space, or the color This is realized by switching the correction amount characteristics used for deriving the correction amount C (movement amount) according to the degree of coincidence between the direction from the coordinate position of the target color to the coordinate position of the correction target color and the high saturation direction in space. It is also possible. In the example of FIG. 6A, the correction amount is very small for the correction target color in which the direction from the coordinate position of the target color to the coordinate position of the correction target color in the color space coincides with the high saturation direction. In addition, for correction target colors whose direction from the coordinate position of the target color to the coordinate position of the correction target color is 45 ° different from the high saturation direction in the color space, other correction targets whose saturation is equal to or lower than the target color The amount of correction is smaller than that of color, and saturation reduction associated with color correction can also be suppressed by performing color correction as described above. This aspect corresponds to the invention described in claim 5.
[0077]
In addition, suppression of saturation reduction due to color correction is also realized by narrowing the correction range on the higher saturation side than the target color in the color space, as shown in FIG. 6B, for example. Is possible. By setting the correction range as described above, the number of pixels whose saturation is lowered due to the color correction is reduced, so that a reduction in saturation due to the color correction can be suppressed. This aspect also corresponds to the invention described in claim 5.
[0078]
Furthermore, although the example using the correction amount characteristic shown in FIG. 4A as the correction amount characteristic has been described above, the present invention is not limited to this. For example, as shown in FIG. 4B, 0 <E A correction amount characteristic in which the correction amount C (the amount of movement of the coordinate position) changes nonlinearly with respect to the change in the distance E in the range of <E1, E1 <E <E0 may be used, as shown in FIG. As described above, a correction amount characteristic having a portion where the correction amount C (movement amount of the coordinate position) does not change regardless of the change in the distance E may be used, or a correction amount characteristic including a polygonal polygonal line may be used. .
[0079]
Moreover, although the example which applied this invention to the color correction in the sticker print production apparatus 10 was demonstrated above, this invention is widely applicable to the color correction of a color image, for example, reads the image recorded on the photographic film. This is applied to color correction when creating photographic prints by converting the data into photographic paper and recording it on photographic paper, or applied to color correction for image data obtained by imaging a subject with a digital still camera (DSC) or the like. It is also possible to do.
[0080]
Also, the conversion condition (conversion data) generated by applying the present invention and a program for performing color correction according to the conversion condition are stored in the DSC, so that the color correction according to the present invention is performed by the DSC. May be. In this aspect, the DSC functions as the image correction apparatus according to the present invention.
[0081]
Furthermore, the image processing software to be executed by a personal computer (PC) or the like is added with a conversion condition (conversion data) generated by applying the present invention and a program for performing color correction according to the conversion condition, and the image By configuring the processing software installation program so that the conversion data is stored in a storage device such as an HDD (hard disk drive) of the PC when the image processing software is installed on the PC, the color correction according to the present invention is performed. You may make it carry out by PC. In this aspect, the PC functions as the image correction apparatus according to the present invention. The image processing software corresponds to the program according to claim 8, and more specifically, the storage control means according to claim 8 is realized by the installation program, and the image processing software according to the present invention is included in the main program of the image processing software. The conversion means according to claim 8 is realized by a program for performing color correction.
[0082]
【The invention's effect】
As described above, according to the present invention, the coordinates on the uniform color space of the pixels of the color located within the predetermined range whose distance from the coordinate position of the target color on the uniform color space is not more than the first predetermined value. The position moves with the maximum amount of movement in the direction approaching the coordinate position of the target color when the distance is a second predetermined value smaller than the first predetermined value, and when the distance is 0 and the distance The amount of movement is 0 when is the first predetermined value, and the image to be corrected according to the conversion condition for converting the image data so that the amount of movement in the direction approaching the coordinate position of the target color changes according to the distance. Since the data is converted, it has an excellent effect that correction that approximates the target color in the image to the target color can be easily realized.
[Brief description of the drawings]
FIG. 1 is a schematic configuration diagram of a sticker print creating apparatus according to an embodiment.
FIG. 2 is a flowchart showing the contents of color correction conversion data generation processing performed to generate data to be stored in a sticker print creation apparatus.
3A is an image diagram illustrating an example of a position of a correction range in an L * a * b * color space, and FIG. 3B is an image diagram illustrating an example of a movement amount distribution of coordinate positions of each color within the correction range. It is.
FIG. 4 is a diagram illustrating an example of a relationship between a distance E between a target color and a correction target color in a color space and a correction amount C (a movement amount of a coordinate position) of the correction target color.
FIG. 5 is a flowchart showing the contents of photographing / printing processing performed by a sticker print creating apparatus.
FIG. 6A is an image diagram showing another example of the distribution of movement amounts of the coordinate positions of the respective colors within the correction range, and FIG. 6B is an image diagram showing another example of the shape of the correction range.
[Explanation of symbols]
10 Sticker print creation device
12 users
16 Imaging unit
22 Control device
24 CPU
26 ROM
30 Seal printer

Claims (8)

均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換する変換条件を定める第1ステップ、
第1ステップで定めた変換条件に従って補正対象の画像データを変換する第2ステップ
を含む画像補正方法。
The coordinate position in the uniform color space of the pixel of the color located within the predetermined range whose distance from the coordinate position of the target color in the uniform color space is not more than the first predetermined value is the distance in the first color. When the second predetermined value is smaller than the first predetermined value, the maximum moving amount moves in the direction approaching the coordinate position of the target color, and when the distance is 0 and the distance is the first predetermined value A first step of determining a conversion condition for converting the image data so that the amount of movement becomes 0 and the amount of movement in the direction approaching the coordinate position of the target color changes according to the distance;
An image correction method including a second step of converting image data to be corrected according to a conversion condition defined in the first step.
前記第1ステップにおいて、前記最大の移動量が前記第2の所定値よりも小さくなるように前記変換条件を定めることを特徴とする請求項1記載の画像補正方法。2. The image correction method according to claim 1, wherein, in the first step, the conversion condition is determined so that the maximum movement amount is smaller than the second predetermined value. 前記第1ステップにおいて、前記所定範囲内に位置している各色の画素の座標位置の移動量が、各色の画素の座標位置と前記目標色の座標位置との距離よりも小さくなるように前記変換条件を定めることを特徴とする請求項1記載の画像補正方法。In the first step, the conversion is performed so that the movement amount of the coordinate position of each color pixel located within the predetermined range is smaller than the distance between the coordinate position of the pixel of each color and the coordinate position of the target color. 2. The image correction method according to claim 1, wherein a condition is defined. 前記目標色の彩度が所定値以上となるように前記目標色を定めることを特徴とする請求項1記載の画像補正方法。The image correction method according to claim 1, wherein the target color is determined so that a saturation of the target color is a predetermined value or more. 前記第1ステップにおいて、均等色空間上で、目標色の座標位置に対し目標色よりも高彩度の色が存在している所定方向については、前記第1の所定値を小さくすること、及び、目標色の座標位置に近づく方向への座標位置の移動量を小さくすることの少なくとも一方を行って前記変換条件を定めることを特徴とする請求項1記載の画像補正方法。In the first step, with respect to a predetermined direction in which a color with higher saturation than the target color exists with respect to the coordinate position of the target color in the uniform color space, the first predetermined value is reduced, and the target The image correction method according to claim 1, wherein the conversion condition is determined by performing at least one of reducing a movement amount of the coordinate position in a direction approaching the coordinate position of the color. 均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換するよう定められた変換条件を記憶する記憶手段と、
前記記憶手段に記憶された変換条件に従って補正対象の画像データを変換する変換手段と、
を含む画像補正装置。
The coordinate position in the uniform color space of the pixel of the color located within the predetermined range whose distance from the coordinate position of the target color in the uniform color space is not more than the first predetermined value is the distance in the first color. When the second predetermined value is smaller than the first predetermined value, the maximum moving amount moves in the direction approaching the coordinate position of the target color, and when the distance is 0 and the distance is the first predetermined value Storage means for storing conversion conditions determined to convert image data so that the movement amount becomes 0 and the movement amount in the direction approaching the coordinate position of the target color changes according to the distance;
Conversion means for converting the image data to be corrected in accordance with the conversion conditions stored in the storage means;
An image correction apparatus including:
前記変換手段は、3次元ルックアップテーブルを含んで構成され、前記記憶手段に記憶された変換条件を前記3次元ルックアップテーブルにセットした後に補正対象の画像データを入力することで前記変換を行うことを特徴とする請求項6記載の画像補正装置。The conversion unit includes a three-dimensional lookup table. The conversion condition stored in the storage unit is set in the three-dimensional lookup table, and then the image data to be corrected is input to perform the conversion. The image correction apparatus according to claim 6. コンピュータを、
均等色空間上での目標色の座標位置との距離が第1の所定値以下の所定範囲内に位置している色の画素の前記均等色空間上での座標位置が、前記距離が前記第1の所定値よりも小さい第2の所定値のときに目標色の座標位置に近づく方向へ最大の移動量で移動すると共に、前記距離が0のとき及び前記距離が第1の所定値のときに移動量が0となり、前記距離に応じて目標色の座標位置に近づく方向への移動量が変化するように画像データを変換するよう定められた変換条件を、前記コンピュータの記憶手段に記憶させる記憶制御手段、
前記記憶手段に記憶された変換条件に従って補正対象の画像データを変換する変換手段
として機能させるためのプログラム。
Computer
The coordinate position in the uniform color space of the pixel of the color located within the predetermined range whose distance from the coordinate position of the target color in the uniform color space is not more than the first predetermined value is the distance in the first color. When the second predetermined value is smaller than the first predetermined value, the maximum moving amount moves in the direction approaching the coordinate position of the target color, and when the distance is 0 and the distance is the first predetermined value The storage unit of the computer stores the conversion condition determined to convert the image data so that the movement amount becomes 0 and the movement amount in the direction approaching the coordinate position of the target color changes according to the distance. Memory control means,
A program for functioning as conversion means for converting image data to be corrected in accordance with the conversion conditions stored in the storage means.
JP2003086952A 2003-03-27 2003-03-27 Image correction method, apparatus and program Expired - Fee Related JP4002526B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003086952A JP4002526B2 (en) 2003-03-27 2003-03-27 Image correction method, apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003086952A JP4002526B2 (en) 2003-03-27 2003-03-27 Image correction method, apparatus and program

Publications (2)

Publication Number Publication Date
JP2004297438A true JP2004297438A (en) 2004-10-21
JP4002526B2 JP4002526B2 (en) 2007-11-07

Family

ID=33401433

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003086952A Expired - Fee Related JP4002526B2 (en) 2003-03-27 2003-03-27 Image correction method, apparatus and program

Country Status (1)

Country Link
JP (1) JP4002526B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007228255A (en) * 2006-02-23 2007-09-06 Nec Electronics Corp Color correcting device and method, and program
JP2007243666A (en) * 2006-03-09 2007-09-20 Nec Electronics Corp Color correction device, color correction method, and program
KR100809540B1 (en) 2004-12-24 2008-03-04 샤프 가부시키가이샤 Image processing apparatus, camera apparatus, image output apparatus, image processing method, and computer readable recording medium having color correction processing program recorded thereon
US7595920B2 (en) 2005-02-23 2009-09-29 Brother Kogyo Kabushiki Kaisha Processing apparatus and processing method of color image information
JP2011061446A (en) * 2009-09-09 2011-03-24 Kyocera Mita Corp Color adjustment device, color adjustment method and color adjustment program
JP2012186786A (en) * 2011-02-17 2012-09-27 Kyocera Document Solutions Inc Image processing apparatus
JP2013138390A (en) * 2011-12-28 2013-07-11 Jvc Kenwood Corp Video image creation apparatus and video image creation method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100809540B1 (en) 2004-12-24 2008-03-04 샤프 가부시키가이샤 Image processing apparatus, camera apparatus, image output apparatus, image processing method, and computer readable recording medium having color correction processing program recorded thereon
US7668368B2 (en) 2004-12-24 2010-02-23 Sharp Kabushiki Kaisha Image processing apparatus, camera apparatus, image output apparatus, image processing method, color correction processing program and computer readable recording medium
US7595920B2 (en) 2005-02-23 2009-09-29 Brother Kogyo Kabushiki Kaisha Processing apparatus and processing method of color image information
JP2007228255A (en) * 2006-02-23 2007-09-06 Nec Electronics Corp Color correcting device and method, and program
KR100871816B1 (en) * 2006-02-23 2008-12-03 엔이씨 일렉트로닉스 가부시키가이샤 Apparatus, method, and computer readable medium for color correction
JP4652992B2 (en) * 2006-02-23 2011-03-16 ルネサスエレクトロニクス株式会社 Color correction apparatus, color correction method, and program
JP2007243666A (en) * 2006-03-09 2007-09-20 Nec Electronics Corp Color correction device, color correction method, and program
JP4615459B2 (en) * 2006-03-09 2011-01-19 ルネサスエレクトロニクス株式会社 Color correction apparatus, color correction method, and program
US8004537B2 (en) * 2006-03-09 2011-08-23 Renesas Electronics Corporation Apparatus, method, and program product for color correction
JP2011061446A (en) * 2009-09-09 2011-03-24 Kyocera Mita Corp Color adjustment device, color adjustment method and color adjustment program
JP2012186786A (en) * 2011-02-17 2012-09-27 Kyocera Document Solutions Inc Image processing apparatus
JP2013138390A (en) * 2011-12-28 2013-07-11 Jvc Kenwood Corp Video image creation apparatus and video image creation method

Also Published As

Publication number Publication date
JP4002526B2 (en) 2007-11-07

Similar Documents

Publication Publication Date Title
US6831755B1 (en) Printer having image correcting capability
US7844109B2 (en) Image processing method and apparatus
JP3652756B2 (en) Image processing method and apparatus
US20010035989A1 (en) Method, apparatus and recording medium for color correction
JP2000196891A (en) Method for exposure and tone scale correction of digital image captured by image capture device
JPWO2005079056A1 (en) Image processing apparatus, photographing apparatus, image processing system, image processing method and program
US7379096B2 (en) Image processing method for processing image data based on conditions customized for each user
US20020008762A1 (en) Method, apparatus and recording medium for image processing
JP5136209B2 (en) Development processing apparatus for undeveloped image data, development processing method, and computer program for development processing
JP2006295303A (en) Image processing method, apparatus and program
JP4002526B2 (en) Image correction method, apparatus and program
US8421817B2 (en) Color processing apparatus and method thereof
JP2008244996A (en) Image processing system
JP4182023B2 (en) Color processing apparatus and method
JP2006203571A (en) Imaging apparatus, image processing apparatus, and image recording apparatus
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
JP2006203573A (en) Imaging apparatus, image processor, and image recording apparatus
JP5109804B2 (en) Development processing apparatus for undeveloped image data, development processing method, and computer program for development processing
US6826312B1 (en) Method, apparatus, and recording medium for image processing
JP4150925B2 (en) Image processing method and apparatus, and printer
JP2007124112A (en) Image processing method, device and program
JP2007318320A (en) Image processor, imaging device, image processing method, and image processing program
JPH11275362A (en) Method for converting digital image into linear and computer program product
JP2005341260A (en) Image processing method, image processing program and image processing apparatus
JP2007159029A (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050303

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20070517

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070522

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070718

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070814

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070817

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

Free format text: PAYMENT UNTIL: 20100824

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110824

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110824

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120824

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120824

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130824

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees