JP3673092B2 - Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program - Google Patents
Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program Download PDFInfo
- Publication number
- JP3673092B2 JP3673092B2 JP26926098A JP26926098A JP3673092B2 JP 3673092 B2 JP3673092 B2 JP 3673092B2 JP 26926098 A JP26926098 A JP 26926098A JP 26926098 A JP26926098 A JP 26926098A JP 3673092 B2 JP3673092 B2 JP 3673092B2
- Authority
- JP
- Japan
- Prior art keywords
- color
- image
- saturation
- brightness
- histogram
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims description 51
- 238000006243 chemical reaction Methods 0.000 claims description 84
- 238000001514 detection method Methods 0.000 claims description 19
- 230000008569 process Effects 0.000 claims description 19
- 239000000284 extract Substances 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 16
- 238000003672 processing method Methods 0.000 description 7
- 239000003086 colorant Substances 0.000 description 6
- 238000000605 extraction Methods 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 5
- 230000009466 transformation Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 238000009499 grossing Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000010191 image analysis Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- NAWXUBYGYWOOIX-SFHVURJKSA-N (2s)-2-[[4-[2-(2,4-diaminoquinazolin-6-yl)ethyl]benzoyl]amino]-4-methylidenepentanedioic acid Chemical compound C1=CC2=NC(N)=NC(N)=C2C=C1CCC1=CC=C(C(=O)N[C@@H](CC(=C)C(O)=O)C(O)=O)C=C1 NAWXUBYGYWOOIX-SFHVURJKSA-N 0.000 description 1
- UPSLECAHIMQGDX-UHFFFAOYSA-N 2h-pyran-6-carboxamide Chemical compound NC(=O)C1=CC=CCO1 UPSLECAHIMQGDX-UHFFFAOYSA-N 0.000 description 1
- 239000006185 dispersion Substances 0.000 description 1
- 238000012886 linear function Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004904 shortening Methods 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、ワープロ、パソコン、ワークステーション、携帯型情報ツール、コピー機、スキャナ装置、ファクシミリ、テレビ、ビデオ、ビデオカメラ、デジタルスチルカメラ等に用いられ、取り込んだ画像を操作者の所望する状態、例えば写真の画質を向上することのできる画質調整装置及び画質調整方法、並びに画像調整用プログラムを記録した記録媒体に関するものである。
【0002】
【従来の技術】
近年、カメラやビデオやインターネットを介してデジタル化された画像がいろいろな分野に用いられている。その場合これらの画像をそのまま用いる場合もあるが、画像の画質を調整して使用される場合もある。この画像の画質を調整する方法として、作業時間の短縮と大量処理、そして熟練を必要とすることなく、誰にでも手軽に、一定品質の画質調整を可能にするために、パソコンやワープロ等の装置に搭載された画像処理装置を用いて、写真や画像の画質を自動的に調整することが考えられている。
【0003】
まず、一般的な画像処理ソフトなどに採用されている自動画質調整機能は、輝度のヒストグラム分布などから、輝度のシャドウ点とハイライト点を求め、シャドウ点をある特定の輝度値、例えば、その画像処理装置で扱うことのできる輝度値の最も低い値にし、同様にハイライト点をある特定の輝度値、例えば、その画像処理装置で扱うことのできる輝度値の最も高い値にするようにヒストグラムを伸長あるいは圧縮することで、コントラストの改善を行い、画質を調整することなどが行われている。
【0004】
なお、上記画像処理方法においては、シャドウ点の決定方法で最も単純なものとしては、画像中に存在するすべての画素の中で最も輝度値の低いものとし、同様に、ハイライト点の決定方法で最も単純なものとしては、画像中に存在するすべての画素の中で最も輝度値の高いものとする方法である。
【0005】
次に、別な画像の画質を調整する方法としては、特許第2527715号公報に開示されている。
【0006】
この特許第2527715号公報に開示されている「画像処理方法」の技術は、画像中の画素のうち、所定の色相を有する画素の色相値を、所望の色相成分に変換する処理を行い、画質を調整する方法である。
【0007】
【発明が解決しようとする課題】
しかしながら、前記記載の各技術においては、なお以下のような課題を有している。
【0008】
まず、前記シャドウ点とハイライト点を求めコントラストを改善する方法では、輝度のコントラスト調整により、暗い画像を明るくしたり、あるいは明るく白飛びぎみの画像を落ち着いた明るさに変換したりすることはできる。しかし、何らかの原因により色味が実際のものとずれている画像については、色味がずれたままコントラストの調整が行われるため、色ずれが調整されないばかりか、場合によってはコントラストが調整されたことによって、色ずれが目立ってしまうという欠点がある。
【0009】
また、前記特許第2527715号公報に開示されている「画像処理方法」の技術では、画像中の画素のうち、人間の肌の色が分布するとされる特定の色相、彩度の範囲にある画素について、その色相値を好ましい肌色の色相値に近づけることにより、画像中の肌色の再現性を高めるものである。しかしながら該画像処理方法では、人間の肌色と推定される色相値、彩度を持つ画素は、好ましい肌色とされる色相値に近づくことになるが、この処理により画像全体の色味が調整されるものではなく、色ずれのある画像については、そのまま調整されることはないといった課題を有している。
【0010】
また、該画像処理方法では、人間の肌の色とされる色相、彩度を適当に決めているが、個人差や照明条件の変化などを考慮すると、人間の肌がとりうる色は広範囲となり、より多くの人の肌を対象とすると、肌の色とすべき色の色相、彩度の範囲は大きな値となり、人間の肌以外でそれに含まれる色の物体なども、同じように好ましいとされる肌色に近づくことになるため、画像中の特定の物体、領域などが違和感のある色に変換されてしまう可能性が高くなる。逆に、肌の色とすべき色の色相、彩度の範囲を小さな値に限定してしまうと、肌の色によっては調整の対象から外れてしまい、肌色の再現性を高めるという発明の目的は達成されない。画像が色ずれを起こしている場合は、調整の対象から外れる可能性はより高くなるし、肌以外の色ずれは修正されないといった課題も有している。
【0011】
本発明は、上記問題点を解決するためになされたもので、その目的とするところは、入力された原画像中の特定の領域を指定することにより、指定された領域の色や輝度、彩度に基づいて色ずれやコントラスト不足などを検出し、画質を調整することのできる画質調整装置及び画質調整処理方法、並びに画像調整用プログラムを記録した記録媒体を提供することにある。
【0012】
【課題を解決するための手段】
本発明の請求項1に係る画質調整装置は、原画像を入力する画像入力手段と、前記入力された原画像を表示する表示手段と、前記表示された原画像中の任意の領域を指定する領域指定手段と、前記領域指定手段により指定された領域の色や輝度に基づき画質を調整する画質調整手段とを備え、前記画質調整手段は、物体の色検出を行う色検出手段と、前記物体の色調整を行う色調整手段と、輝度調整と彩度調整とを行う輝度・彩度調整手段とを有し、前記輝度・彩度調整手段は、前記色調整手段にて変換された画像の各画素の輝度または彩度のヒストグラムを作成し、そのヒストグラムから得られるヒストグラムパラメータに基づきヒストグラム全体を調整する変換関数を求め、さらに前記色検出手段にて検出された物体色の輝度または彩度と、前記輝度または彩度のヒストグラムの中央値との比較結果に応じて、物体色に基づいて前記変換関数を補正する補正関数を作成し、これら作成された前記変換関数と前記補正関数とを掛け合わせて最終的な変換関数を作成し、この最終的な変換関数に基づいて最終的に画像全体の輝度、または彩度を変換する調整処理を行う、ことを特徴とする。
【0013】
本発明の請求項2に係る画質調整装置は、請求項1記載の画質調整装置において、前記色検出手段は、前記領域指定手段により指定された領域内での物体領域を抽出し、原画像の画素値の平均値を求めることで物体色の検出処理を行うことを特徴とする。
【0014】
本発明の請求項3に係る画質調整装置は、請求項1記載の画質調整装置において、前記色調整手段は、前記色検出手段にて検出された物体領域の色があらかじめ定められた色になり、かつ画像全体の色のバランスが適正になるように色変換関数を生成し、その色変換関数にしたがって原画像を変換する調整処理を行うことを特徴とする。
【0015】
本発明の請求項4に係る画質調整装置は、請求項1記載の画質調整装置において、前記輝度・彩度調整手段で作成する最初に求める変換関数は、ヒストグラムの中央値を中心としたS字型曲線であることを特徴とする。
【0016】
本発明の請求項5に係る画質調整方法は、原画像を入力するステップと、前記入力された原画像を表示するステップと、前記表示された原画像中の任意の領域を指定するステップと、前記原画像中に指定された任意の領域に対して、該領域の色や輝度に基づき画質を調整するステップとを備え、前記画質を調整するステップは、物体の色検出を行うステップと、前記物体の色調整を行うステップと、輝度調整と彩度調整とを行うステップで構成され、前記輝度調整と彩度調整とを行うステップは、前記入力された原画像の各画素の輝度または彩度より、輝度または彩度のヒストグラムを作成するステップと、そのヒストグラムから得られるヒストグラムパラメータに基づきヒストグラム全体を調整する変換関数を求めるステップと、さらに前記検出された物体色の輝度または彩度と、前記輝度または彩度のヒストグラムの中央値との比較結果に応じて、物体色に基づいて前記変換関数を補正する補正関数を作成するステップと、これら作成された前記変換関数と前記補正関数とを掛け合わせて最終的な変換関数を作成ステップとを備え、この最終的な変換関数に基づいて最終的に画像全体の輝度、または彩度を変換する調整ステップで構成されて、画質の調整を実行することを特徴とする。
【0017】
本発明の請求項6に係る記録媒体は、原画像を入力し、前記入力された原画像を表示し、さらに前記表示された原画像中の任意の領域を指定する機能を実行するコンピュータに、前記原画像中に指定された任意の領域に対して、該領域の色や輝度に基づき画質を調整する処理を実行させるプログラムを格納した記録媒体であって、前記画質を調整する際に、物体の色検出を行い、前記物体の色調整を行い、輝度調整と彩度調整とを行う機能を実行し、前記輝度調整と彩度調整とを行う際には、前記入力された原画像の各画素の輝度または彩度より、輝度または彩度のヒストグラムを作成し、そのヒストグラムから得られるヒストグラムパラメータに基づきヒストグラム全体を調整する変換関数を求め、さらに前記検出された物体色の輝度または彩度と、前記輝度または彩度のヒストグラムの中央値との比較結果に応じて、物体色に基づいて前記変換関数を補正する補正関数を作成することで、これら作成された前記変換関数と前記補正関数とを掛け合わせて最終的な変換関数を作成し、この最終的な変換関数に基づいて最終的に画像全体の輝度、または彩度を変換する調整を実行することを特徴とする。
【0019】
【発明の実施の形態】
以下に、本発明における画質調整装置及び画質調整処理方法、並びに画像調整用プログラムを記録した記録媒体の実施形態に関して図面を用いて説明する。
【0020】
なお、下記に説明する内容は人間の顔等を含めた肌を対象にした写真や画像の画質を調整することを具体的に記載しているが、これは説明を分かりやすくするための便宜上のものであって、これに限定されるものではない。例えば、物体や空や海等の写真や画像として対象となり得るものであればいずれのものであってもよい。
【0021】
図1は、本発明における一実施形態に係る画質調整装置の概略ブロック図を示したものである。
【0022】
図1に示すように、写真や画像の画質を調整するための画質調整装置は、画像入力装置11、領域指定装置12、記憶装置13、演算処理装置14、表示装置15、外部記憶装置16から構成されている。
【0023】
画像入力装置11は、処理対象となる写真などの原画像を入力するための画像入力手段である。すなわち、処理対象となる画像の信号(画像信号)を本画質調整装置に入力するための装置である。
【0024】
この画像信号とは、複数の画素が行列状に配列されて構成される2次元画像に関して、黒の画素と白の画素の部分を例えば1と0の情報にそれぞれ割り当て、それらのデータをマトリックス形状で構成されたものである。つまり、このマトリックス形状のデータが各画素を表す画素データを有するデジタル信号となる。さらにこの各画素データには、2次元画像内の画素の位置を表す位置データ、及び画素の表示特性を表す数値データが含まれ、この表示特性を表す数値データには、例えば赤緑青の各単色光毎の輝度を表す輝度データが含まれている。
【0025】
ここで、画像の入力方法としては、次のいずれの構成であってもよい。
【0026】
まず、画像入力装置11としては、例えば、ハードディスク、フロッピーディスク、光ディスク及びビデオテープなどの記憶媒体に記録されている信号を読み出す装置を用いてもよい。この場合、画像入力装置11により記録媒体から読み出された信号は記憶装置13に格納される。そのため記録媒体には、例えば撮像装置(図示せず)によって物体からの画像光を撮像して得られた画像信号が記憶されている。撮像装置としては、例えばスキャナ、デジタルカメラ及びビデオカメラが挙げられる。
【0027】
また、画像入力装置11としては、それ自体が撮像装置を有し、得られた画像信号を記録媒体を経ずに、直接本画像調整装置の記憶装置13に導入するものであってもよい。
【0028】
さらに、画像信号は、上記の撮像装置以外の装置及び手法によって生成されてもよい。例えばCD−ROMのような記録媒体を用いて配布されるような、本画質調整装置の操作者以外の第三者が作成した画像の画像信号であってもよい。これらの画像信号の取得動作は、後述の本画質調整装置の画像処理動作の事前にあらかじめ準備されていてもよいし、処理動作の直前に行われてもよい。
【0029】
領域指定装置12は、操作者が画像中の領域を指定するための領域指定手段であり、例えばマウスやトラックボール、ペンなどのポインティングデバイスが好適に用いられる。つまり、操作者は、上記領域指定装置12としてのマウスなどのポインティングデバイスを用いて、後述する表示装置15に表示される画像入力装置11によって導入された原画像を見ながら、操作者が所望する領域を指定する。このとき、指定された領域は記憶装置13に格納される一方、表示装置15に反映され、例えば閉曲線として表示される。このようにして得られる領域を指定領域とする。
【0030】
記憶装置13は、上記原画像の画像信号や指定領域などを記憶するとともに、画質調整処理に必要な一時記憶領域、各処理用のプログラム記憶領域として使用される記憶手段である。
【0031】
外部記憶装置16は、フロッピーディスク、CD−ROMやDVDを含む光ディスク、ビデオテープなどの記録媒体の情報が読み取り可能な記憶装置である。もし、上記記憶装置13に必要な情報がない場合は、この外部記憶装置16によって上記の記録媒体に記録された情報、例えば処理用プログラムやデータを記憶装置13に転送すればよい。
【0032】
表示装置15は、例えば陰極線管(CRT)や液晶表示装置などからなり、記憶装置13に格納された画像データもしくは指定領域を画面上に表示するようになっている。画面上には、入力された原画像が表示され、かつ、操作者が領域指定装置12によって入力した領域が前記の原画像上に、閉曲線などの形態で表示される。また、この表示装置15は、後述の演算処理装置14の画質調整動作によって生成される出力画像を表示するようにもなっている。
【0033】
演算処理装置14は、本発明のメインとなる処理を行う装置である。この演算処理装置14は、対象となる物体の色を検出する物体色検出部14a、その色を調整する色調整部14b、さらに輝度を調整する輝度調整部14cから構成され、画質調整処理を行う画質調整手段である。
【0034】
ここで、この演算処理装置14は、上記記憶装置13に格納されている各処理用のプログラムを使用することによって画質調整処理を行う。
【0035】
図2は、画質調整用の各処理プログラムの一例を示したものである。
【0036】
図2に示すように、画質調整用の各処理プログラムとしては、物体色検出プログラム21a、色調整プログラム21b、輝度・彩度調整プログラム21cが考えられる。
【0037】
ここで上記演算処理装置14で処理が行われるこれらの各処理用プログラムは、すべて上記記憶装置13にあらかじめ記憶させていてもよいし、また、フロッピーディスク、CD−ROMやDVDを含む光ディスク、ビデオテープなどの記録媒体21(図2)に記憶しておき、上記外部記憶装置16によって読み取らせる構成であってもよい。また、記憶媒体21(図2)にすべての処理用プログラムが記録されている必要はなく、上記の3つの処理用プログラムのうち少なくとも1つの処理用プログラムが記録されていればよい。この場合、記録媒体に記録されていない処理用プログラムは、記憶装置13にあらかじめ記憶させればよい。これによって、上記記憶装置13と外部記憶装置16とのバランスにおいて比較的高価な記憶装置13の容量を削減でき、これによってコストも削減できる利点を有している。
【0038】
次に、本発明における一実施例の画質調整装置で実行される画質調整について以下に説明する。なお、ここでの対象は、操作者が指定した領域が人間の顔である場合について説明する。
【0039】
図3は、本画質調整装置によって実施される画質調整動作を示す説明図であり、図4は、本画質調整装置における画質調整の流れを示すフローチャートである。さらに図5から図14までの図面を適宜使用して説明する。
【0040】
本画質調整装置によって実施される画質調整処理の具体的な表示結果としては、図3に示すように、図3(a)の原画像31aに対し、操作者が人物の顔を指定するために、領域31bを指定し、その後、画質調整処理を行うと、図3(b)の処理結果画像32を出力するようになっている。つまり、指定された領域31bの色や輝度の情報に基づいて画質調整処理が行われる。
【0041】
本画質調整装置における画質調整処理は、図4に示す以下の流れに基づいて行われる。
【0042】
ステップS1)始めに原画像の入力を行う。すなわち、画像入力装置11は、対象となる原画像31aを記憶装置13に格納する。
【0043】
ステップS2)原画像の表示を行う。すなわち、表示装置15は、記憶装置13に格納された原画像31aを画面上に表示する。
【0044】
ステップS3)領域の指定が行われる。すなわち、操作者は領域指定装置12を用いて、表示装置15に表示される原画像31aを見ながら、対象とする領域を指定する。
【0045】
これにより、図3(a)に示す原画像31aにおいて、指定領域31bが示される。この指定領域は、領域の情報、例えば、座標列、または2次元画像データ(マスク画像)として記憶装置13に格納される。
【0046】
そして、指定領域の情報が記憶装置13に格納された後で、次のステップS4に移行する。
【0047】
ステップS4)物体領域の抽出が行われる。
【0048】
物体領域の抽出について、図5を参照しながら、以下に詳しく述べる。
【0049】
図5は、図4に示したフローチャートにおいて、領域の指定、物体領域の抽出、物体色の検出について説明するための模式図である。なお、図5(a)における画像41aは、図3(a)における原画像31aの一部を示しており、同様に、領域41bは指定領域31bを示している。以降では、原画像31aの一部を示した画像41aを原画像とし、領域41bを指定領域31bとする。
【0050】
記憶装置13に格納されている図5(a)の原画像41aに対し、上記領域指定装置12を用いて操作者が領域41bを指定する。図5(b)の指定領域を示すマスク画像42が記憶装置13に格納される。演算装置14内の物体色検出部14aは、マスク画像42を参照しながら、指定領域、すなわち、マスク画像での白画素に対応する原画像上での画素情報を計算する。
【0051】
ここで画素情報とは、例えば、指定領域内での原画像の画素値の平均と分散などが用いられる。この画素情報をもとに、原画像41aを、ユーザーが指定した領域に対応する物体領域、すなわち、図5(c)の画像43aにて白画素で示されている領域43bと、それ以外の領域、すなわち、画像43aにて黒画素で示されている領域43c(灰色の部分)に分割する。領域43bを物体領域、画像43aを物体領域画像と呼ぶことにし、これにより物体領域の抽出が行われる。
【0052】
画素情報から物体領域を抽出する方法は無数に考えられるが、一例として、ここでは、画素情報を指定領域内での原画像の画素値の平均及び分散とし、画素値を色相値とする場合の物体領域抽出法について説明する。
【0053】
なお、これ以降、色相、彩度、輝度という言葉の意味を次のように定義する。すなわち、各画素の表示特性を表す数値データ、例えば、赤緑青の単色光の輝度を持つならば、それら単色光の輝度から、既に画像処理の分野ではよく使用されるHSI6角錐カラーモデル(文献:高木,下田 監修,「画像解析ハンドブック」,東京大学出版会,ISBN 4-13-061107-0 C3050 P25750E,p.p.485-491に記載)(以降、HSIと呼ぶ)により変換された色相、彩度及び輝度を使用することとする。なお、これらの色相、彩度、輝度は別の方法により定義してもよい。例えば、輝度は、各単色光の輝度の平均値としてもよい。
【0054】
指定領域内画素の色相値の平均をμhue、分散をσ2 hueとし、指定領域内の画素の色相値の分布が正規分布に従うと仮定すると、ある色相値xを与えた時の確率密度関数p(x)は、次のように定義することができる。
【0055】
p(x) 〜 N(μhue,σ2 hue) ≡
p(x) = 1/(2π(1/2))×exp(−((x−μhue)2)/(2σhue) …式(1)
なお、exp(c)は、自然対数の底eのc乗を表す記号であるとする。
【0056】
原画像41aの各画素の色相値xを式(1)のp(x)の引数として与えることにより確率値pが求められ、あらかじめ設定しておいたしきい値Pth以上の値を持つ場合は白画素、Pth未満の値を持つ場合は黒画素とすることで、物体領域画像43aを生成することができる。これにより、原画像41aにおいて、操作者が領域41bを指定した場合の物体領域43bが抽出されることになる。この結果図5(c)のように人間の顔肌領域が抽出されることを示している。
【0057】
ステップS5)物体色の検出が行われる。
【0058】
物体色の検出について、以下に詳しく述べる。
【0059】
以上のようにして、図5の生成された物体領域画像43a及び操作者の指定により生成されたマスク画像42において、ともに白画素である領域、すなわち画像44aにおいて最も明るい画素で示されている領域44b(図5(d))に対応する原画像41aでの画素値の平均を求める。ここで、原画像41aがカラー画像であるとし、画素値は各単色光(赤、緑、青)の輝度値とする。すなわち、画素値の平均を求めることは、各単色光毎に平均値mR,mG,mBを求めるということである。
【0060】
以上により、物体色の検出が行われる。
【0061】
ステップS6)色調整処理が行われる。
【0062】
色調整処理については、図6乃至図7を参照しながら、以下に詳しく述べる。図6は、図4に示したフローチャートにおいて、色調整処理の際の色変換関数の詳細を示すグラフである。図7は、図4に示したフローチャートにおいて、色調整処理の詳細を示すフローチャートである。なお、以降は、画像中の各画素は赤(R)、緑(G)、青(B)の各単色光の強度、すなわちRGBで表現されているものとし、各値域は0〜255とする。
【0063】
上記ステップS5にて検出された物体色が、あらかじめ求められた理想的な色になり、かつ画像全体の色のバランスが適正になるように赤(R)、緑(G)、青(B)の各単色光における色変換関数を作成する。
【0064】
本実施例においては、以下の形式の関数を作成し使用する。
【0065】
R’ = fr(R) …式(2)
G’ = fg(G) …式(3)
B’ = fb(B) …式(4)
ここで各単色光における色変換関数の引数R,G,Bは変換前の画像すなわち原画像の画素値であり、R’,G’,B’は本色調整処理が行われた後の画素値である。
【0066】
本実施例において、上記各色変換関数fr,fg,fbは、次の4つの条件を満たすように作成される。
【0067】
<条件1>
ステップS5で検出された各物体色をmR,mG,mB、この物体色と同じ明るさで理想的な色の画素値をImR,ImG,ImBとし、
ImR = fr(mR) …式(5)
ImG = fg(mG) …式(6)
ImB = fb(mB) …式(7)
を満たす。
【0068】
このImR,ImG,ImBは、mR,mG,mBをHSI色空間などの色彩空間に投影し、輝度Iはそのまま、色相Hと彩度Sを理想的な色の値とし、RGB空間に逆変換したものなどを使用する。
【0069】
<条件2>
ステップS11)画像全体を解析し、白であると思われる色を検出する。
【0070】
この画素値をwhiteR,whiteG,whiteBとする。
【0071】
この色と同じ明るさで理想的な白の画素値をIwhiteR,IwhiteG,IwhiteBとし、
IwhiteR = fr(whiteR) …式(8)
IwhiteG = fg(whiteG) …式(9)
IwhiteB = fb(whiteB) …式(10)
を満たす。
【0072】
白であると思われる色whiteR,whiteG,whiteBの検出には様々な方法が考えられるが、本実施例においては、原画像中の画素のうち、白に近い色を持つ画素の画素値の平均をwhiteR,whiteG,whiteBとする。
【0073】
IwhiteR,IwhiteG,IwhiteBは、whiteR,whiteG,whiteBをHSIなどの色彩空間に投影し、輝度Iはそのまま、色相Hと彩度Sを理想的な白の値(H=任意,S=0)にし、RGB空間に逆変換したものなどを使用する。
【0074】
<条件3>
0 = fr(0) …式(11)
0 = fg(0) …式(12)
0 = fb(0) …式(13)
を満たす。
【0075】
<条件4>
255 = fr(255) …式(14)
255 = fg(255) …式(15)
255 = fb(255) …式(16)
を満たす。
【0076】
ステップS12)白及び物体色による色変換関数を作成する。
【0077】
上記4つの条件を同時に満たす色変換関数は、無限に存在し得るが、本実施例においては、各関数の上記条件による4つの点((0,0)、(mX,ImX)、(whiteX,IwhiteX)、(255,255))(ただし、Xは、赤(R)成分、緑(G)成分、青(B)成分のいずれか)を直線で結んだものを使用する。
【0078】
図6は、赤(R)成分について上記条件による4つの点((0,0)、(mR,ImR)、(whiteR,IwhiteR)、(255,255))を直線で結んだものを示しているが、緑(G)成分、青(B)成分についても同様に色変換関数を作成することができる。
【0079】
例えば、上記式(2)の色変換関数fr(R)は、図6の場合は次のように定義できる。
【0080】
0≦R<mRの時:
fr(R) = (ImR/mR)×R …式(2−1)
mR≦R<whiteRの時:
fr(R) = ((IwhiteR−ImR)/(whiteR−mR))×(R−mR)+ImR …式(2−2)
whiteR≦R≦255の時:
fr(R) = ((255−IwhiteR)/(255−whiteR))×(R−whiteR)+IwhiteR …式(2−3)
ステップS13)作成された色変換関数を用いて、色調整を行う。
【0081】
これにより、白はより白くなると同時に全体のホワイトバランス調整がなされ、かつ物体色は理想的な色になる。ここでは色の調整のみが行なわれるため明るさは変化しない。色調整処理にて原画像31aから変換された色調整画像(図示せず)は記憶装置13に格納される。
【0082】
以上により、色調整処理が行われる。
【0083】
ステップS7)輝度・彩度調整処理が行われる。
【0084】
輝度・彩度調整処理について、図8乃至図14を参照しながら、以下に詳しく述べる。
【0085】
図8は、図4に示したフローチャートにおいて、輝度・彩度調整処理の詳細内容で、物体色の情報を利用して、輝度、彩度を調整する変換関数を作成する処理を表すフローチャートである。
【0086】
ステップS21)入力された画像の各画素の輝度、彩度により、それぞれ輝度ヒストグラム、彩度ヒストグラムを作成する。
【0087】
ステップS22)上記ステップS21で得られたヒストグラムにおいて急激な変化を抑制するために、ヒストグラムが図形的になめらかになるようにスムージングを行う。
【0088】
具体的には、各要素を中心として左右数要素と自身の要素量を加算、平均し、その平均量を該要素の要素量とする。これにより、画像中に含まている局所的なノイズなどの影響を抑制し、画像の本質的な特性が、ヒストグラムの特性に現れるようにすることができる。
【0089】
図9は、上記ステップS21、S22の過程を模式的に示したものである。図9(a)はヒストグラムの作成を示したもので、図9(b)はヒストグラムのスムージングを示したものである。
【0090】
ステップS23)上記ステップS22で得られたスムージングを施したヒストグラムから、ヒストグラムパラメータを決定する。
【0091】
ここで、ヒストグラムパラメータとは、ハイライトとシャドウと、その中間の中央値であり、これらは、ヒストグラム中の特定の要素番号である。図9はこれらを模式的に示した模式図である。
【0092】
ここでいうハイライトとシャドウとは、ハイライトとは、その要素番号より大きい要素が画像の特性を表すことに寄与しないとみなすことができる上限値を示し、シャドウとは、その要素番号未満の要素が、画像の特性を表すことに寄与しないとみなすことができる下限値を示す。
【0093】
具体的なハイライトの算出方法としては、ヒストグラムの全要素量を一定の値で割った値(以降、この値を基準量と呼ぶ)を超える要素量をもつ要素で、かつ最大要素番号にもっとも近い要素として求めることができる。また、シャドウは、上記基準量を超える要素量をもつ要素で、最小要素番号にもっとも近い要素として求めることができる。上記、ヒストグラムの全要素量を割る際に用いる一定の値としては、例えば、全要素数(=最大要素番号−最小要素番号)を用いる。
【0094】
なお、ハイライト・シャドウの算出方法は、上記方法に限定されず別の方法により求めてもよい。
【0095】
また、中央値はその要素番号を中心に左右のヒストグラム量(各要素の要素量の合計)が同じ量となる要素番号と定義する。
【0096】
ステップS24)上記ステップS23で求めたヒストグラムパラメータに基づき、ヒストグラム全体を調整するための変換関数T(x)を作成する。
【0097】
なお、変換関数T(x)を作成する詳細に関しては後述する。
【0098】
ステップS25)物体色に基づき、上記ステップS24で求めた変換関数T(x)を補正するための補正関数C(x)を作成する。
【0099】
なお、補正関数C(x)を作成する詳細に関しては後述する。
【0100】
ステップS26)上記ステップS24で求めた変換関数T(x)とステップS25で求めた補正関数C(x)を掛け合わせて最終的な変換関数L(x)を作成する。
【0101】
この最終的な変換関数L(x)は、次のように定義する。
【0102】
L(x) = C(T(x)) …式(17)
以上の変換関数T(x)、補正関数C(x)、最終的な変換関数L(x)は、輝度、彩度の各々に関して作成できる。つまり、輝度、彩度の各変換関数は、以上の処理過程にしたがって、それぞれ独立に作られるが、詳細な処理内容は必ずしも同じでなくてもよい。例えば、彩度の変換関数で、低彩度の領域をあまり変化させたくない場合は、ステップS23で求めるヒストグラムパラメータのうち、シャドウの情報は利用せずに、最小要素番号に固定することにより、低彩度領域の変換を抑制するようにすることもできる。
【0103】
以下に、上記ステップS24、S25の詳細内容について説明する。
【0104】
なお、対象としては明るさを表す輝度に関する各変換関数の作成を主に説明する。
【0105】
まず、ステップS24における処理である、ステップS23で求めたヒストグラムパラメータ、(ハイライト、シャドウ、中央値)に基づき、変換関数T(x)を作成する詳細について述べる。
【0106】
本実施例では、対数関数によるS字型曲線関数により、ヒストグラムの特徴を強調する変換関数を作成する場合の詳細について述べる。これにより、例えば明るさ、つまり輝度の変換関数T(x)を作成すれば、画像全体のコントラストを調整することができる。
【0107】
図10は、S字型曲線関数により、ヒストグラムの特徴を強調する変換関数T(x)を作成するための模式図である。
【0108】
変換関数T(x)は、(a)ハイライト〜中央値間、(b)中央値〜シャドウ間、にそれぞれ対数関数を適用することにより、全体として中央値を中心に、S字型の曲線を描く関数となる。
【0109】
まず(a)ハイライト〜中央値間では、次式を適用することにより、上向きの曲線が形成される。
【0110】
T(x) = (最大要素−m)×log(x/中央値)/log(ハイライト/中央値)+m …式(18)
次に(b)中央値〜シャドウ間では、次式を適用することにより、下向きの曲線が形成される。
【0111】
T(x) = m×log((最大要素−シャドウ)/(最大要素−x))/log((最大要素−シャドウ)/(最大要素−中央値)) …式(19)
ここで式(18)、式(19)に用いられるmは、中央値の変換先であり、mを変えることにより図10で示すS字曲線の中心を変更することができる。mを最大要素と最小要素の中間値(ヒストグラムの中間要素)とすれば、変換結果はヒストグラムの真中を中心に左右に同量のヒストグラム量が分布するため、よりコントラストのとれた画像を得ることができる。なお、mは画像によって適宜変えてもよい。
【0112】
なお、変換関数T(x)は、輝度、彩度について同じ方法で作成してもよいし、それぞれ別の方法で作成してもよい。例えば、より原画に近い色合いを出したい場合には、彩度に関しては、強調の度合がS字型曲線に比べて比較的低い線形変換による変換関数を適用してもよい(この内容は、既に画像処理の分野ではよく使用される文献:高木,下田 監修,「画像解析ハンドブック」,東京大学出版会,ISBN 4-13-061107-0 C3050 P25750E, p.p.485-491に記載されている。)。
【0113】
次に、ステップS25において、物体色に基づき、ステップS24で求めた変換関数を補正するための補正関数C(x)を作成する詳細について述べる。
【0114】
本実施例では、輝度に関して、ステップS23で求めた中央値と、物体色を比較することにより、適応的に補正関数のベースとなる関数を変更し、補正関数C(x)を作成する方法について述べる。
【0115】
最初に、物体色の輝度と中央値を比較する。比較結果は以下の3つに分類される。
【0116】
(1)物体色の輝度値 < (中央値−α)
(2)(中央値−α) ≦ 物体色の輝度値 ≦ (中央値+α)
(3)(中央値+α) < 物体色の輝度値
なお、αはあらかじめ定めた値であり、例えば、全要素数の10%とする。
【0117】
比較結果が(1)または(2)の場合、図11に示す台形型の関数をベースとして補正関数C(x)を作成する。この台形型の関数は、物体色の明るさを物体色の理想値に変換する。物体色はステップS24で作られる変換関数T(x)により変換され、その後でこの補正関数により再度変換されるため、物体色の明るさをfc、理想値をicとすると、次式が成り立つ。
【0118】
ic = C(T(fc)) …式(20)
なお、この台形型関数は、物体色の近傍の色のグラデーションを保つようにするため、図11に示すようにT(fc)の変換点を中心に一定の傾きを維持するように作成される。この場合の補正関数C(x)は、次のように定義できる。
【0119】
0≦x<fminの時:
C(x) = (ifmin/fmin)×x …式(21−1)
fmin≦x<fmaxの時:
C(x) = ((ifmax−ifmin)/(fmax−fmin))×(x−fmin)+ifmin …式(21−2)
fmax≦x≦255の時:
C(x) = ((255−ifmax)/(255−fmax))×(x−fmax)+ifmax …式(21−3)
ここで図11に示される傾きが保たれる範囲β(点(fmin,ifmin)と点(fmax,ifmax)の間)はあらかじめ適当な値を設定しておいてもよいし、画像中の物体色の分散などの情報があるならば、それをもとに画像に応じて適宜変更してもよい。
【0120】
また、比較結果が(1)の場合に、物体色の輝度が理想値に比べて低いときは、画像全体としては、物体色の輝度に比べてより明るい画像であることが考えられるが、ここで物体色付近の値を理想値まで上昇させると、全体としてめりはりのない画像になる可能性がある。そこで、比較結果が(1)のときに、輝度を上昇させる場合は、上昇度に上限を設ける等の対策を行なってもよい。
【0121】
また、比較結果が(3)の場合は、図12に示すγ関数をベースとして補正関数C(x)を作成する。γ関数は次式で表される関数である。
【0122】
C(x) = 全要素数×(x/全要素数)γ …式(22)
このγ型の関数は、物体色の明るさが物体色の理想値となるように変換する。すなわち、前述の台形型関数と同じように、式(20)が成り立つようにγ値が決定される。ただし、台形型関数ではなく、γ関数を用いているため、より暗い領域の明るさが底上げされ、画像全体としては明るさがより増すことになる。これは、比較結果が(3)であるならば、全体の明るさは、物体色に比べて暗い画像であることが考えられるため、比較結果が(1)、(2)の場合のように台形型の関数で物体色付近だけを補正すると、全体から物体色付近だけ浮いてしまうことがあるためである。
【0123】
以上により作成された補正関数C(x)により、ステップS24で作成された明るさの変換関数T(x)を、物体色の入力に対して理想値を出力するように補正することができる。
【0124】
図13、図14は、上記補正関数C(x)により、変換関数T(x)を補正した最終変換関数L(x)の例を示す模式図である。
【0125】
図13は、(a)は変換関数T(x)に対して、(b)は物体色の明るさfc、理想値をicとしたとき、T(fc)≦icの状態を表した場合の最終変換関数L(x)を示したものである。
【0126】
図14は、(a)は変換関数T(x)に対して、(b)は物体色の明るさfc、理想値をicとしたとき、T(fc)>icの状態を表した場合の最終変換関数L(x)を示したものである。
【0127】
なお、補正関数C(x)は、輝度、彩度について同じ方法で作成してもよいし、それぞれ別の方法で作成してもよい。例えば、彩度に関しては、上記手法において、γ関数をベースとした補正が行われると、低彩度の領域が過度に上昇する可能性がある。一般に画像全体が暗い場合、低彩度領域の彩度が不安定であることがあるため、低彩度の領域の底上げが行なわれると、全体的に不自然な出力になる場合がある。この場合、例えば、彩度を上昇させる場合(物体色彩度より理想彩度が高い場合)は、必ず台数型の関数を使い、γ関数の補正関数を使わないようにすればよい。あるいは、彩度の補正関数には上記手法ではなく、式(22)を満たす他の関数、例えば、単純な線形関数により補正関数C(x)を作成してもよい。
【0128】
以上のようにして作成された色変換関数に基づき、図3(a)の原画像は上記ステップS12の色調整処理が実行されて、記憶装置13に格納された色調整画像を変換することにより得られる処理結果画像は、記憶装置13に格納され、表示装置15に表示されて、図3(b)の出力画像32となる。
【0129】
以上の動作により、入力された原画像中の特定の領域を指定することにより、指定された領域、原画像の色や輝度、彩度に基づいて色ずれやコントラスト不足などを検出し、画質を調整した画像を得ることができる。
【0130】
以上のことから、本発明は、ワープロ、パソコン、ワークステーション、携帯型情報ツール、コピー機、スキャナ装置、ファクシミリ、テレビ、ビデオ、ビデオカメラ、デジタルスチルカメラ等において、画像を取得する装置、画像を記憶する装置、画像を表示する装置を持つシステムで、利用者がマウスやペン、タブレットなどの座標入力装置を用いて当該画像上の任意の領域を指定できるシステムならば、上記に列挙したような機器において適用可能となっている。
【0131】
以上、本発明における画質調整装置及び画質調整方法、並びに画像調整用プログラムを記録した記録媒体を用いることによって、次のことが実現できる。
【0132】
上記画質調整装置の構成によれば、画像入力装置(手段)11により入力された原画像は、まず、表示装置(手段)15に表示される。そして、この表示された原画像に対して、操作者は、マウスやペンなどのポインティングデバイスである領域指定装置(手段)12を用いて、所望する領域を指定する。
【0133】
この指定された領域に基づいて、操作者が指定したと推定される物体領域を抽出し、その物体領域色を求める。つまり、指定領域内での物体領域を抽出し、原画像の画素値の平均値や分散値を求めることで物体色の検出が行われる(ここまでが色検出手段による処理となる)。
【0134】
そして、検出された物体領域色が理想的な色になり、かつ画像全体の色のバランスが適正になるよう色変換関数を作成し、その色変換関数にしたがって原画像を変換する(ここまでが色調整手段による処理となる)。
【0135】
上記変換された画像について輝度、彩度のヒストグラムを作成し、そのヒストグラムをもとに画像全体の輝度、彩度のバランスが最適になるように調整し、かつ、上記検出された物体領域色の輝度、彩度の近傍では、理想的な物体色になるような補正を行なう変換関数を作成し、この変換関数に基づいて最終的に画像を変換する(ここまでが輝度・彩度調整手段による処理となる)。
【0136】
これにより、高度な技術や熟練を要することなく、一定品質の画質調整を簡単な操作で実現することが可能となる。
【0137】
また、この画質調整処理は、輝度のコントラスト調整のみならず、色ずれの修正をも行うことができる。さらに、領域を指定することにより、特定物体の色を理想的な色に変換しつつ、該物体以外についても、適正な色ずれ補正及びコントラスト調整が実現できる。
【0138】
さらに、上記画像調整装置の構成において、入力される原画像中の物体に人物を含む人物写真画像を対象にした場合には、肌の色を利用的な色に変換しつつ、肌領域以外についても適正な色ずれ補正及びコントラスト調整が、簡単な操作で実現できる。
【0139】
以上、ここまで挙げた実施形態における内容は、本発明の主旨を変えない限り、上記記載内容に限定されるものではない。
【0140】
【発明の効果】
本発明における画質調整装置及び画質調整方法、並びに画像調整用プログラムを記録した記録媒体では、各請求項において以下の効果が得られる。
【0141】
本発明の請求項1〜6においては、高度な技術や熟練を要することなく、一定品質の画質調整を簡単な操作で実現することが可能となる。また、この画質調整処理は、輝度のコントラスト調整のみならず、色ずれの修正をも行うことができる。また、領域を指定することにより、特定物体の色再現性を高めつつ、該物体以外についても、適正な色ずれ補正及びコントラスト調整が実現できる。
【0142】
また、原画像の指定された領域の物体領域色の色再現性を高めつつ、画像全体の色バランス及び輝度、彩度のバランスが適正になり、さらに検出された物体領域色の輝度、彩度の近傍でも理想的な物体色になるように適正な色ずれ補正及びコントラスト調整が、簡単な操作で実現できる。
【図面の簡単な説明】
【図1】本発明の一実施の形態に係る画質調整装置の概略ブロック図である。
【図2】本発明の一実施の形態に係る画質調整装置にて実行させるための画質調整用の各種プログラムを記録したコンピュータ読み取り可能な記録媒体を示す説明図である。
【図3】本発明の一実施の形態に係る画質調整装置によって実施される画質調整動作の概略を示す説明図である。
【図4】本発明の一実施の形態に係る画質調整装置によって実施される画質調整動作の流れを示すフローチャートである。
【図5】図4に示したフローチャートにおいて、領域の指定、物体領域の抽出、物体色の検出について説明するための模式図である。
【図6】図4に示したフローチャートにおいて、色調整処理の際の変換関数の詳細を示すグラフである。
【図7】図4に示したフローチャートにおいて、色調整処理の詳細を示すフローチャートである。
【図8】図4に示したフローチャートにおいて、輝度・彩度調整処理の詳細を示すフローチャートである。
【図9】図8に示したフローチャートにおいて、ヒストグラムの作成、ヒストグラムのスムージング、ヒストグラムパラメータの決定について説明するための説明図である。
【図10】図8に示したフローチャートにおいて、ヒストグラムパラメータに基づく変換関数Tの作成について説明するための説明図である。
【図11】図8に示したフローチャートにおいて、物体色に基づく補正関数Cの作成について説明するための説明図である。
【図12】図8に示したフローチャートにおいて、物体色に基づく別の補正関数Cの作成について説明するための説明図である。
【図13】図8に示したフローチャートにおいて、最終的な変換関数Lの作成について説明するための説明図である。
【図14】図8に示したフローチャートにおいて、最終的な別の変換関数Lの作成について説明するための説明図である。
【符号の説明】
11 画像入力装置(画像入力手段)
12 領域指定装置(領域指定手段)
13 記憶装置
14 演算処理装置(画質調整処理手段)
14a 物体色検出部
14b 色調整部
14c 輝度・彩度調整部
15 表示装置(表示手段)
16 外部記憶装置[0001]
BACKGROUND OF THE INVENTION
The present invention is used in a word processor, a personal computer, a workstation, a portable information tool, a copier, a scanner device, a facsimile, a television, a video, a video camera, a digital still camera, and the like, and a captured image is in a state desired by an operator. For example, the present invention relates to an image quality adjustment apparatus and image quality adjustment method capable of improving the image quality of a photograph, and a recording medium on which an image adjustment program is recorded.
[0002]
[Prior art]
In recent years, images digitized via cameras, videos, and the Internet are used in various fields. In this case, these images may be used as they are, or may be used after adjusting the image quality. As a method of adjusting the image quality of this image, it is possible to easily adjust the image quality of a certain quality to anyone without shortening the work time, mass processing, and skill. It has been considered to automatically adjust the image quality of photographs and images using an image processing apparatus mounted on the apparatus.
[0003]
First, the automatic image quality adjustment function adopted in general image processing software, etc., finds the shadow point and highlight point of brightness from the histogram distribution of brightness, etc., and determines the shadow point as a certain brightness value, for example The histogram is set so that the lowest luminance value that can be handled by the image processing apparatus is set, and the highlight point is similarly set to a certain luminance value, for example, the highest luminance value that can be handled by the image processing apparatus. The image is expanded or compressed to improve contrast and adjust image quality.
[0004]
In the above image processing method, the simplest method for determining the shadow point is the one having the lowest luminance value among all the pixels present in the image, and similarly, the method for determining the highlight point. The simplest method is to make the luminance value the highest among all the pixels present in the image.
[0005]
Next, another method for adjusting the image quality of an image is disclosed in Japanese Patent No. 2527715.
[0006]
The technique of the “image processing method” disclosed in Japanese Patent No. 2527715 performs a process of converting the hue value of a pixel having a predetermined hue among pixels in an image into a desired hue component, It is a method of adjusting.
[0007]
[Problems to be solved by the invention]
However, each of the technologies described above still has the following problems.
[0008]
First, in the method of improving the contrast by obtaining the shadow point and the highlight point, it is possible to brighten a dark image or convert a brightly white-out image to a calm brightness by adjusting the contrast of brightness. it can. However, for an image whose color is different from the actual color for some reason, the contrast is adjusted with the color shifted, so not only the color is not adjusted, but also the contrast is adjusted in some cases. Therefore, there is a disadvantage that the color shift becomes conspicuous.
[0009]
In the technique of “image processing method” disclosed in Japanese Patent No. 2527715, among pixels in an image, pixels in a specific hue and saturation range in which human skin color is distributed. In this case, the reproducibility of the flesh color in the image is improved by bringing the hue value close to the preferable flesh color hue value. However, in this image processing method, pixels having a hue value and saturation that are estimated to be human skin color approach the hue value that is a preferable skin color, but this process adjusts the color of the entire image. However, there is a problem that an image having a color shift is not adjusted as it is.
[0010]
In addition, the image processing method appropriately determines the hue and saturation that are the colors of human skin, but considering the individual differences and changes in lighting conditions, the range of colors that human skin can take is wide. If more people's skin is targeted, the hue and saturation range of the color that should be the skin color will be a large value, and other than the human skin, objects of colors included in it will be equally preferable Therefore, there is a high possibility that a specific object, region, or the like in the image is converted to a color with a sense of incongruity. On the other hand, if the hue and saturation range of the color that should be the skin color is limited to a small value, depending on the skin color, it may be excluded from the adjustment target, and the object of the invention is to improve the reproducibility of the skin color. Is not achieved. When an image has a color shift, there is a higher possibility that the image is not adjusted, and there is a problem that a color shift other than the skin is not corrected.
[0011]
The present invention has been made in order to solve the above-described problems. The object of the present invention is to designate a specific area in the input original image so that the color, brightness, and color of the designated area are specified. Another object of the present invention is to provide an image quality adjustment apparatus and an image quality adjustment processing method capable of detecting color misregistration and insufficient contrast based on the degree and adjusting the image quality, and a recording medium on which an image adjustment program is recorded.
[0012]
[Means for Solving the Problems]
An image quality adjustment apparatus according to
[0013]
An image quality adjustment apparatus according to claim 2 of the present invention is the image quality adjustment apparatus according to
[0014]
According to a third aspect of the present invention, there is provided an image quality adjusting device.1In the described image quality adjustment device,The color adjustment unit generates a color conversion function so that the color of the object region detected by the color detection unit is a predetermined color and the color balance of the entire image is appropriate, and the color An adjustment process for converting the original image according to the conversion function is performed.
[0015]
According to a fourth aspect of the present invention, there is provided an image quality adjusting device.1In the described image quality adjustment device,The conversion function first obtained by the luminance / saturation adjusting means is an S-shaped curve centered on the median value of the histogram.
[0016]
Image quality adjustment according to claim 5 of the present inventionMethodIsA step of inputting an original image, a step of displaying the input original image, a step of specifying an arbitrary area in the displayed original image, and an arbitrary area specified in the original image Adjusting the image quality based on the color and brightness of the area, and adjusting the image quality includes the step of detecting the color of the object, the step of adjusting the color of the object, the brightness adjustment and the saturation. The step of adjusting the luminance and the saturation adjustment is a step of creating a histogram of luminance or saturation from the luminance or saturation of each pixel of the input original image. Determining a conversion function for adjusting the entire histogram based on a histogram parameter obtained from the histogram; and further, brightness or saturation of the detected object color; The step of creating a correction function for correcting the conversion function based on the object color according to the comparison result with the median of the histogram of luminance or saturation, and the generated conversion function and the correction function And the final conversion function is created by multiplying, and based on this final conversion function, it consists of an adjustment step that finally converts the brightness or saturation of the entire image, and performs image quality adjustment It is characterized by doing.
[0017]
According to claim 6 of the present inventionThe recording medium is designated in the original image by a computer that inputs the original image, displays the inputted original image, and further executes a function of designating an arbitrary area in the displayed original image. A recording medium storing a program for executing processing for adjusting image quality based on color and brightness of an area for an arbitrary area, and performing object color detection when adjusting the image quality, When performing the brightness adjustment and the saturation adjustment, when performing the brightness adjustment and the saturation adjustment, from the brightness or saturation of each pixel of the input original image, A brightness or saturation histogram is created, a conversion function for adjusting the entire histogram is obtained based on a histogram parameter obtained from the histogram, and the brightness or saturation of the detected object color and the brightness or saturation are obtained. By creating a correction function for correcting the conversion function based on the object color in accordance with the comparison result with the median value of the saturation histogram, the generated conversion function and the correction function are multiplied. A final conversion function is created, and an adjustment for finally converting the luminance or saturation of the entire image is performed based on the final conversion function.
[0019]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an image quality adjustment apparatus, an image quality adjustment processing method, and an embodiment of a recording medium on which an image adjustment program is recorded will be described with reference to the drawings.
[0020]
In addition, the content described below specifically describes adjusting the image quality of photographs and images targeting the skin including human faces, etc., but this is for the sake of convenience for easy understanding of the description. However, the present invention is not limited to this. For example, any object may be used as long as it can be used as a photograph or image of an object, sky, sea, or the like.
[0021]
FIG. 1 is a schematic block diagram of an image quality adjustment apparatus according to an embodiment of the present invention.
[0022]
As shown in FIG. 1, an image quality adjustment device for adjusting the image quality of a photograph or an image includes an image input device 11, an area designation device 12, a
[0023]
The image input device 11 is an image input unit for inputting an original image such as a photograph to be processed. In other words, this is an apparatus for inputting a signal (image signal) of an image to be processed into the image quality adjustment apparatus.
[0024]
This image signal refers to a two-dimensional image composed of a plurality of pixels arranged in a matrix, assigning black pixel and white pixel portions to, for example, 1 and 0 information, respectively, and assigning these data to a matrix shape It is composed of That is, the matrix-shaped data becomes a digital signal having pixel data representing each pixel. Further, each pixel data includes position data representing the position of the pixel in the two-dimensional image, and numerical data representing the display characteristics of the pixel. The numerical data representing the display characteristics include, for example, each single color of red, green and blue Luminance data representing the luminance for each light is included.
[0025]
Here, the image input method may be any of the following configurations.
[0026]
First, as the image input device 11, for example, a device that reads a signal recorded in a storage medium such as a hard disk, a floppy disk, an optical disk, and a video tape may be used. In this case, the signal read from the recording medium by the image input device 11 is stored in the
[0027]
Further, the image input device 11 itself may include an imaging device, and the obtained image signal may be directly introduced into the
[0028]
Furthermore, the image signal may be generated by an apparatus and a method other than the above-described imaging apparatus. For example, it may be an image signal of an image created by a third party other than the operator of the image quality adjustment apparatus distributed using a recording medium such as a CD-ROM. These image signal acquisition operations may be prepared in advance of an image processing operation of the image quality adjusting apparatus described later, or may be performed immediately before the processing operation.
[0029]
The area specifying device 12 is an area specifying means for an operator to specify an area in an image. For example, a pointing device such as a mouse, a trackball, or a pen is preferably used. That is, the operator uses a pointing device such as a mouse as the region specifying device 12 while viewing the original image introduced by the image input device 11 displayed on the display device 15 to be described later. Specify an area. At this time, the designated area is stored in the
[0030]
The
[0031]
The external storage device 16 is a storage device that can read information on a recording medium such as a floppy disk, an optical disk including a CD-ROM and a DVD, and a video tape. If there is no necessary information in the
[0032]
The display device 15 includes, for example, a cathode ray tube (CRT), a liquid crystal display device, and the like, and displays image data or a designated area stored in the
[0033]
The arithmetic processing device 14 is a device that performs the main processing of the present invention. The arithmetic processing unit 14 includes an object color detection unit 14a that detects the color of a target object, a color adjustment unit 14b that adjusts the color, and a luminance adjustment unit 14c that adjusts the luminance, and performs image quality adjustment processing. This is image quality adjusting means.
[0034]
Here, the arithmetic processing unit 14 performs image quality adjustment processing by using a program for each processing stored in the
[0035]
FIG. 2 shows an example of each processing program for adjusting image quality.
[0036]
As shown in FIG. 2, as the processing programs for image quality adjustment, an object color detection program 21a, a color adjustment program 21b, and a luminance / saturation adjustment program 21c can be considered.
[0037]
Here, all the processing programs to be processed by the arithmetic processing unit 14 may be stored in advance in the
[0038]
Next, image quality adjustment executed by the image quality adjustment apparatus according to an embodiment of the present invention will be described below. Note that the target here is a case where the region designated by the operator is a human face.
[0039]
FIG. 3 is an explanatory diagram showing an image quality adjustment operation performed by the image quality adjustment apparatus, and FIG. 4 is a flowchart showing a flow of image quality adjustment in the image quality adjustment apparatus. Further, description will be made using the drawings from FIG. 5 to FIG. 14 as appropriate.
[0040]
As a specific display result of the image quality adjustment processing performed by the image quality adjustment apparatus, as shown in FIG. 3, the operator designates a person's face for the
[0041]
The image quality adjustment processing in this image quality adjustment apparatus is performed based on the following flow shown in FIG.
[0042]
Step S1) First, an original image is input. That is, the image input device 11 stores the target
[0043]
Step S2) The original image is displayed. That is, the display device 15 displays the
[0044]
Step S3) An area is designated. That is, the operator designates a target area using the area designation device 12 while viewing the
[0045]
Thereby, the designated
[0046]
Then, after the information of the designated area is stored in the
[0047]
Step S4) Extraction of the object area is performed.
[0048]
The object region extraction will be described in detail below with reference to FIG.
[0049]
FIG. 5 is a schematic diagram for explaining area designation, object area extraction, and object color detection in the flowchart shown in FIG. 4. Note that an image 41a in FIG. 5A shows a part of the
[0050]
For the original image 41a in FIG. 5A stored in the
[0051]
Here, for example, the average and variance of the pixel values of the original image in the designated area are used as the pixel information. Based on this pixel information, the original image 41a is converted into an object region corresponding to the region designated by the user, that is, the
[0052]
There are an infinite number of methods for extracting the object area from the pixel information. As an example, here, the pixel information is the average and variance of the pixel values of the original image in the specified area, and the pixel value is the hue value. The object region extraction method will be described.
[0053]
In the following, the meanings of the terms hue, saturation, and luminance are defined as follows. In other words, numerical data representing the display characteristics of each pixel, for example, the brightness of monochromatic light of red, green, and blue, the HSI 6 pyramid color model that is already often used in the field of image processing based on the brightness of the monochromatic light (reference: Supervised by Takagi and Shimoda, “Image Analysis Handbook”, University of Tokyo Press, ISBN 4-13-061107-0 C3050 P25750E, pp485-491) (hereinafter referred to as HSI), hue, saturation and We will use luminance. Note that these hue, saturation, and luminance may be defined by another method. For example, the luminance may be an average value of the luminance of each monochromatic light.
[0054]
The average hue value of the pixels in the specified area is μhue, Variance σ2 hueAssuming that the distribution of hue values of pixels in the designated area follows a normal distribution, the probability density function p (x) when a certain hue value x is given can be defined as follows.
[0055]
p (x) to N (μhue, Σ2 hue) ≡
p (x) = 1 / (2π(1/2)) × exp (− ((x−μhue)2) / (2σhue) ... Formula (1)
Note that exp (c) is a symbol representing the base e of the natural logarithm.
[0056]
A probability value p is obtained by giving the hue value x of each pixel of the original image 41a as an argument of p (x) in the equation (1), and a preset threshold value PthIf it has the above value, white pixel, PthIf it has a value less than that, it is possible to generate the
[0057]
Step S5) Object color detection is performed.
[0058]
The detection of the object color will be described in detail below.
[0059]
As described above, in the
[0060]
As described above, the object color is detected.
[0061]
Step S6) Color adjustment processing is performed.
[0062]
The color adjustment process will be described in detail below with reference to FIGS. FIG. 6 is a graph showing details of a color conversion function in the color adjustment process in the flowchart shown in FIG. FIG. 7 is a flowchart showing details of the color adjustment processing in the flowchart shown in FIG. In the following, each pixel in the image is represented by the intensity of each monochromatic light of red (R), green (G), and blue (B), that is, RGB, and each value range is 0-255. .
[0063]
Red (R), green (G), and blue (B) so that the object color detected in step S5 is an ideal color obtained in advance and the color balance of the entire image is appropriate. A color conversion function for each monochromatic light is created.
[0064]
In this embodiment, a function of the following format is created and used.
[0065]
R ′ = fr (R) (2)
G ′ = fg (G) (3)
B '= fb (B) ... Formula (4)
Here, the arguments R, G, and B of the color conversion function in each monochromatic light are pixel values of the image before conversion, that is, the original image, and R ′, G ′, and B ′ are pixel values after the main color adjustment processing is performed. It is.
[0066]
In this embodiment, the color conversion functions fr, fg, and fb are created so as to satisfy the following four conditions.
[0067]
<
Each object color detected in step S5 is mR, mG, mB, and pixel values of ideal colors with the same brightness as this object color are ImR, ImG, ImB.
ImR = fr (mR) (5)
ImG = fg (mG) Equation (6)
ImB = fb (mB) (7)
Meet.
[0068]
These ImR, ImG, and ImB project mR, mG, and mB onto a color space such as an HSI color space, and the luminance I remains unchanged, the hue H and saturation S are set as ideal color values, and are converted back to RGB space. Use what you did.
[0069]
<Condition 2>
Step S11) Analyzing the entire image and detecting a color that appears to be white.
[0070]
This pixel value is defined as whiteR, whiteG, and whiteB.
[0071]
IwhiteR, IwhiteG, and IwhiteB are ideal white pixel values with the same brightness as this color.
IwhiteR = fr (whiteR) (8)
IwhiteG = fg (whiteG) (9)
IwhiteB = fb (whiteB) ... Formula (10)
Meet.
[0072]
Various methods are conceivable for detecting the colors whiteR, whiteG, and whiteB that are considered to be white. In this embodiment, among the pixels in the original image, the average pixel value of pixels having a color close to white is considered. Is whiteR, whiteG, and whiteB.
[0073]
IwhiteR, IwhiteG, and IwhiteB project whiteR, whiteG, and whiteB onto a color space such as HSI, and the luminance I and the hue H and saturation S are set to ideal white values (H = arbitrary, S = 0). , And the like converted into RGB space.
[0074]
<
0 = fr (0) (11)
0 = fg (0) (12)
0 = fb (0) ... Formula (13)
Meet.
[0075]
<Condition 4>
255 = fr (255) ... Formula (14)
255 = fg (255) ... Formula (15)
255 = fb (255) ... Formula (16)
Meet.
[0076]
Step S12) A color conversion function based on white and object colors is created.
[0077]
There can be an infinite number of color conversion functions that simultaneously satisfy the above four conditions, but in this embodiment, four points ((0, 0), (mX, ImX), (whiteX, IwhiteX), (255, 255)) (where X is a red (R) component, a green (G) component, or a blue (B) component) connected by a straight line.
[0078]
FIG. 6 shows a red (R) component obtained by connecting four points ((0, 0), (mR, ImR), (whiteR, IwhiteR), (255, 255)) according to the above conditions with a straight line. However, a color conversion function can be similarly created for the green (G) component and the blue (B) component.
[0079]
For example, the color conversion function fr (R) of the above formula (2) can be defined as follows in the case of FIG.
[0080]
When 0 ≦ R <mR:
fr (R) = (ImR / mR) × R Formula (2-1)
When mR ≦ R <whiteR:
fr (R) = ((IwhiteR−ImR) / (whiteR−mR)) × (R−mR) + ImR Formula (2-2)
When whiteR ≦ R ≦ 255:
fr (R) = ((255−IwhiteR) / (255−whiteR)) × (R−whiteR) + IwhiteR Formula (2-3)
Step S13) Color adjustment is performed using the created color conversion function.
[0081]
As a result, white becomes whiter and the entire white balance is adjusted, and the object color becomes an ideal color. Here, brightness is not changed because only color adjustment is performed. A color adjustment image (not shown) converted from the
[0082]
As described above, the color adjustment process is performed.
[0083]
Step S7) Luminance / saturation adjustment processing is performed.
[0084]
The brightness / saturation adjustment processing will be described in detail below with reference to FIGS.
[0085]
FIG. 8 is a flowchart showing a process for creating a conversion function for adjusting brightness and saturation using object color information in the detailed contents of the brightness / saturation adjustment process in the flowchart shown in FIG. .
[0086]
Step S21) A luminance histogram and a saturation histogram are created based on the luminance and saturation of each pixel of the input image.
[0087]
Step S22) In order to suppress an abrupt change in the histogram obtained in the above step S21, smoothing is performed so that the histogram is smooth graphically.
[0088]
Specifically, the left and right elements and their own element amounts are added and averaged around each element, and the average amount is set as the element amount of the element. Thereby, it is possible to suppress the influence of local noise or the like included in the image, and to make the essential characteristics of the image appear in the characteristics of the histogram.
[0089]
FIG. 9 schematically shows the process of steps S21 and S22. FIG. 9A shows the creation of a histogram, and FIG. 9B shows the smoothing of the histogram.
[0090]
Step S23) A histogram parameter is determined from the smoothed histogram obtained in step S22.
[0091]
Here, the histogram parameters are highlights and shadows, and the median value between them, and these are specific element numbers in the histogram. FIG. 9 is a schematic diagram schematically showing these.
[0092]
Highlights and shadows as used here are the upper limit values that can be considered that an element larger than the element number does not contribute to representing the characteristics of the image, and a shadow is less than the element number. Indicates the lower limit value that an element can be considered not to contribute to representing the characteristics of the image.
[0093]
As a specific method of calculating the highlight, an element having an element amount exceeding the value obtained by dividing all the element amounts of the histogram by a certain value (hereinafter, this value will be referred to as a reference amount) and having the largest element number It can be obtained as a close element. A shadow is an element having an element amount exceeding the reference amount and can be obtained as an element closest to the minimum element number. For example, the total number of elements (= maximum element number−minimum element number) is used as the constant value used when dividing the total element amount of the histogram.
[0094]
The method for calculating the highlight / shadow is not limited to the above method, and may be obtained by another method.
[0095]
The median is defined as an element number in which the left and right histogram amounts (the sum of the element amounts of each element) are the same amount with the element number as the center.
[0096]
Step S24) A conversion function T (x) for adjusting the entire histogram is created based on the histogram parameter obtained in Step S23.
[0097]
Details of creating the conversion function T (x) will be described later.
[0098]
Step S25) A correction function C (x) for correcting the conversion function T (x) obtained in Step S24 is created based on the object color.
[0099]
Details of creating the correction function C (x) will be described later.
[0100]
Step S26) A final conversion function L (x) is created by multiplying the conversion function T (x) obtained in Step S24 and the correction function C (x) obtained in Step S25.
[0101]
This final conversion function L (x) is defined as follows.
[0102]
L (x) = C (T (x)) Equation (17)
The above conversion function T (x), correction function C (x), and final conversion function L (x) can be created for each of luminance and saturation. In other words, the luminance and saturation conversion functions are independently created in accordance with the above processing steps, but detailed processing contents are not necessarily the same. For example, when it is not desired to change the low-saturation region so much in the saturation conversion function, among the histogram parameters obtained in step S23, the shadow information is not used and is fixed to the minimum element number. It is also possible to suppress the conversion of the low saturation region.
[0103]
The detailed contents of steps S24 and S25 will be described below.
[0104]
Note that, as an object, the creation of each conversion function relating to the brightness representing brightness will be mainly described.
[0105]
First, details of creating the conversion function T (x) based on the histogram parameters (highlight, shadow, median) obtained in step S23, which is the processing in step S24, will be described.
[0106]
In the present embodiment, details of creating a conversion function that emphasizes the characteristics of a histogram by using an S-shaped curve function by a logarithmic function will be described. Thus, for example, if a conversion function T (x) of brightness, that is, brightness, is created, the contrast of the entire image can be adjusted.
[0107]
FIG. 10 is a schematic diagram for creating a conversion function T (x) that emphasizes the characteristics of the histogram by using an S-shaped curve function.
[0108]
The transformation function T (x) is obtained by applying a logarithmic function to (a) between the highlight and the median, and (b) between the median and the shadow, respectively. Is a function that draws
[0109]
First, between (a) highlight and median, an upward curve is formed by applying the following equation.
[0110]
T (x) = (maximum element−m) × log (x / median) / log (highlight / median) + m (18)
Next, between (b) the median and the shadow, a downward curve is formed by applying the following equation.
[0111]
T (x) = m × log ((maximum element−shadow) / (maximum element−x)) / log ((maximum element−shadow) / (maximum element−median)) Equation (19)
Here, m used in the equations (18) and (19) is a conversion destination of the median value, and the center of the S-shaped curve shown in FIG. 10 can be changed by changing m. If m is an intermediate value between the maximum and minimum elements (intermediate element of the histogram), the same amount of histogram is distributed to the left and right with the conversion result centered in the center of the histogram. Can do. In addition, you may change m suitably with an image.
[0112]
Note that the conversion function T (x) may be created by the same method for luminance and saturation, or may be created by different methods. For example, when it is desired to obtain a hue closer to the original picture, a conversion function based on linear transformation in which the degree of emphasis is relatively lower than that of the S-shaped curve may be applied to saturation (this content has already been described). References often used in the field of image processing: supervised by Takagi and Shimoda, “Image Analysis Handbook”, published by the University of Tokyo Press, ISBN 4-13-061107-0 C3050 P25750E, pp485-491).
[0113]
Next, details of creating a correction function C (x) for correcting the conversion function obtained in step S24 based on the object color in step S25 will be described.
[0114]
In this embodiment, with respect to the luminance, a method of adaptively changing the function serving as the base of the correction function by comparing the median obtained in step S23 with the object color and creating the correction function C (x). State.
[0115]
First, the brightness of the object color is compared with the median. The comparison results are classified into the following three.
[0116]
(1) Luminance value of object color <(median value−α)
(2) (median value−α) ≦ luminance value of object color ≦ (median value + α)
(3) (Median + α) <Brightness value of object color
Α is a predetermined value, for example, 10% of the total number of elements.
[0117]
When the comparison result is (1) or (2), the correction function C (x) is created based on the trapezoidal function shown in FIG. This trapezoidal function converts the brightness of the object color into the ideal value of the object color. The object color is converted by the conversion function T (x) created in step S24 and then converted again by this correction function. Therefore, when the brightness of the object color is fc and the ideal value is ic, the following equation is established.
[0118]
ic = C (T (fc)) (20)
This trapezoidal function is created so as to maintain a constant inclination around the T (fc) conversion point as shown in FIG. 11 in order to maintain the gradation of the color near the object color. . The correction function C (x) in this case can be defined as follows.
[0119]
0 ≦ x <fmintime:
C (x) = (ifmin/ Fmin) × x Formula (21-1)
fmin≦ x <fmaxtime:
C (x) = ((ifmax-Ifmin) / (Fmax-Fmin)) X (x-fmin) + Ifmin ... Formula (21-2)
fmaxWhen ≦ x ≦ 255:
C (x) = ((255-ifmax) / (255-fmax)) X (x-fmax) + Ifmax ... Formula (21-3)
Here, the range β (point (fmin, Ifmin) And point (fmax, IfmaxDuring (), an appropriate value may be set in advance, or if there is information such as the dispersion of the object color in the image, it may be changed as appropriate according to the image.
[0120]
When the comparison result is (1) and the brightness of the object color is lower than the ideal value, the entire image may be brighter than the brightness of the object color. If the value in the vicinity of the object color is increased to the ideal value, there is a possibility that the image has no sharpness as a whole. Therefore, when the luminance is increased when the comparison result is (1), measures such as setting an upper limit on the degree of increase may be taken.
[0121]
When the comparison result is (3), a correction function C (x) is created based on the γ function shown in FIG. The γ function is a function represented by the following equation.
[0122]
C (x) = total number of elements × (x / total number of elements)γ ... Formula (22)
This γ-type function converts so that the brightness of the object color becomes the ideal value of the object color. That is, as in the trapezoidal function described above, the γ value is determined so that Expression (20) is established. However, since the γ function is used instead of the trapezoidal function, the brightness of the darker area is raised and the brightness of the entire image is further increased. If the comparison result is (3), it is considered that the overall brightness is darker than the object color, so that the comparison result is (1), (2). This is because if only the vicinity of the object color is corrected with the trapezoidal function, only the vicinity of the object color may be lifted from the whole.
[0123]
With the correction function C (x) created as described above, the brightness conversion function T (x) created in step S24 can be corrected so as to output an ideal value with respect to the input of the object color.
[0124]
13 and 14 are schematic diagrams illustrating an example of a final conversion function L (x) obtained by correcting the conversion function T (x) with the correction function C (x).
[0125]
FIG. 13 shows a case where (a) represents the transformation function T (x), (b) represents the state of T (fc) ≦ ic where the brightness of the object color is fc and the ideal value is ic. The final conversion function L (x) is shown.
[0126]
In FIG. 14, (a) represents the transformation function T (x), (b) represents the state of T (fc)> ic where the brightness of the object color is fc, and the ideal value is ic. The final conversion function L (x) is shown.
[0127]
The correction function C (x) may be created by the same method for luminance and saturation, or may be created by different methods. For example, regarding saturation, if correction based on the γ function is performed in the above method, the low saturation region may increase excessively. In general, when the entire image is dark, the saturation of the low saturation region may be unstable. Therefore, if the bottom of the low saturation region is raised, an overall unnatural output may occur. In this case, for example, when increasing the saturation (when the ideal saturation is higher than the object color saturation), it is only necessary to use the unit type function and not to use the correction function of the γ function. Alternatively, the correction function C (x) may be created by another function satisfying the equation (22), for example, a simple linear function, instead of the above method for the saturation correction function.
[0128]
Based on the color conversion function created as described above, the original image in FIG. 3A is subjected to the color adjustment processing in step S12, and the color adjustment image stored in the
[0129]
With the above operation, by specifying a specific area in the input original image, color shift and lack of contrast are detected based on the specified area, the color, brightness, and saturation of the original image, and the image quality is reduced. An adjusted image can be obtained.
[0130]
From the above, the present invention is a word processor, a personal computer, a workstation, a portable information tool, a copier, a scanner device, a facsimile, a television, a video, a video camera, a digital still camera, and the like. If the system has a device for storing and a device for displaying an image and the user can specify an arbitrary area on the image using a coordinate input device such as a mouse, pen, tablet, etc., as listed above Applicable in equipment.
[0131]
As described above, the following can be realized by using the image quality adjustment apparatus, the image quality adjustment method, and the recording medium in which the image adjustment program is recorded in the present invention.
[0132]
According to the configuration of the image quality adjusting apparatus, the original image input by the image input device (means) 11 is first displayed on the display device (means) 15. Then, for the displayed original image, the operator designates a desired area using an area designation device (means) 12 which is a pointing device such as a mouse or a pen.
[0133]
Based on the designated area, an object area estimated to be designated by the operator is extracted, and the object area color is obtained. That is, the object color is detected by extracting the object region in the designated region and obtaining the average value and the variance value of the pixel values of the original image (the process up to this point is the processing by the color detection means).
[0134]
Then, a color conversion function is created so that the detected object region color becomes an ideal color and the color balance of the entire image is appropriate, and the original image is converted according to the color conversion function (up to this point) It is processing by the color adjusting means).
[0135]
Create a histogram of brightness and saturation for the converted image, adjust the brightness and saturation balance of the entire image based on the histogram, and adjust the color of the detected object area. In the vicinity of brightness and saturation, a conversion function is created to correct the ideal object color, and the image is finally converted based on this conversion function. Processing).
[0136]
As a result, it is possible to realize image quality adjustment with a constant quality by a simple operation without requiring advanced techniques and skill.
[0137]
Further, this image quality adjustment process can correct not only the brightness contrast but also the color shift. Furthermore, by designating a region, it is possible to realize proper color misregistration correction and contrast adjustment for other than the object while converting the color of the specific object to an ideal color.
[0138]
Further, in the configuration of the image adjustment apparatus, when a person photograph image including a person as an object in the original image to be input is targeted, the skin color is converted into a usable color and other than the skin region. In addition, appropriate color misregistration correction and contrast adjustment can be realized with a simple operation.
[0139]
As mentioned above, the content in embodiment mentioned so far is not limited to the said description content, unless the main point of this invention is changed.
[0140]
【The invention's effect】
The image quality adjusting apparatus, the image quality adjusting method, and the recording medium on which the image adjusting program is recorded according to the present invention can achieve the following effects in each claim.
[0141]
[0142]
Also,While improving the color reproducibility of the object area color of the specified area of the original image, the color balance, brightness, and saturation of the entire image become appropriate, and the brightness and saturation of the detected object area color are in the vicinity However, proper color misalignment correction and contrast adjustment can be realized with a simple operation so as to obtain an ideal object color.
[Brief description of the drawings]
FIG. 1 is a schematic block diagram of an image quality adjustment apparatus according to an embodiment of the present invention.
FIG. 2 is an explanatory diagram showing a computer-readable recording medium that records various programs for image quality adjustment to be executed by the image quality adjustment apparatus according to the embodiment of the present invention.
FIG. 3 is an explanatory diagram showing an outline of an image quality adjustment operation performed by the image quality adjustment apparatus according to the embodiment of the present invention.
FIG. 4 is a flowchart showing a flow of an image quality adjustment operation performed by the image quality adjustment apparatus according to the embodiment of the present invention.
5 is a schematic diagram for explaining area designation, object area extraction, and object color detection in the flowchart shown in FIG. 4; FIG.
6 is a graph showing details of a conversion function during color adjustment processing in the flowchart shown in FIG.
7 is a flowchart showing details of color adjustment processing in the flowchart shown in FIG. 4. FIG.
8 is a flowchart showing details of luminance / saturation adjustment processing in the flowchart shown in FIG. 4. FIG.
FIG. 9 is an explanatory diagram for explaining histogram creation, histogram smoothing, and determination of histogram parameters in the flowchart shown in FIG. 8;
10 is an explanatory diagram for explaining the creation of a conversion function T based on a histogram parameter in the flowchart shown in FIG. 8. FIG.
11 is an explanatory diagram for explaining the creation of a correction function C based on an object color in the flowchart shown in FIG. 8. FIG.
12 is an explanatory diagram for explaining creation of another correction function C based on the object color in the flowchart shown in FIG. 8. FIG.
13 is an explanatory diagram for explaining the creation of a final conversion function L in the flowchart shown in FIG. 8. FIG.
14 is an explanatory diagram for explaining creation of another final conversion function L in the flowchart shown in FIG. 8. FIG.
[Explanation of symbols]
11 Image input device (image input means)
12 Area designation device (area designation means)
13 Storage device
14 Arithmetic processing device (image quality adjustment processing means)
14a Object color detection unit
14b Color adjustment unit
14c Brightness / Saturation adjuster
15 Display device (display means)
16 External storage device
Claims (6)
前記入力された原画像を表示する表示手段と、
前記表示された原画像中の任意の領域を指定する領域指定手段と、
前記領域指定手段により指定された領域の色や輝度に基づき画質を調整する画質調整手段とを備え、
前記画質調整手段は、物体の色検出を行う色検出手段と、
前記物体の色調整を行う色調整手段と、
輝度調整と彩度調整とを行う輝度・彩度調整手段とを有し、
前記輝度・彩度調整手段は、前記色調整手段にて変換された画像の各画素の輝度または彩度のヒストグラムを作成し、そのヒストグラムから得られるヒストグラムパラメータに基づきヒストグラム全体を調整する変換関数を求め、さらに前記色検出手段にて検出された物体色の輝度または彩度と、前記輝度または彩度のヒストグラムの中央値との比較結果に応じて、物体色に基づいて前記変換関数を補正する補正関数を作成し、これら作成された前記変換関数と前記補正関数とを掛け合わせて最終的な変換関数を作成し、この最終的な変換関数に基づいて最終的に画像全体の輝度、または彩度を変換する調整処理を行う、ことを特徴とする画質調整装置。An image input means for inputting an original image;
Display means for displaying the input original image;
Area designating means for designating an arbitrary area in the displayed original image ;
Image quality adjusting means for adjusting the image quality based on the color and brightness of the area specified by the area specifying means ,
The image quality adjustment means includes color detection means for detecting the color of an object;
Color adjusting means for adjusting the color of the object;
Brightness / saturation adjustment means for performing brightness adjustment and saturation adjustment;
The luminance / saturation adjusting unit creates a histogram of luminance or saturation of each pixel of the image converted by the color adjusting unit, and a conversion function for adjusting the whole histogram based on a histogram parameter obtained from the histogram. Further, the conversion function is corrected based on the object color in accordance with a comparison result between the brightness or saturation of the object color detected by the color detection unit and the median value of the histogram of the brightness or saturation. A correction function is created, and the created conversion function is multiplied by the correction function to create a final conversion function. Finally, based on this final conversion function, the brightness or saturation of the entire image is created. An image quality adjustment apparatus characterized by performing adjustment processing for converting degrees .
前記入力された原画像を表示するステップと、Displaying the input original image;
前記表示された原画像中の任意の領域を指定するステップと、Designating an arbitrary area in the displayed original image;
前記原画像中に指定された任意の領域に対して、該領域の色や輝度に基づき画質を調整するステップとを備え、Adjusting the image quality based on the color and brightness of the area for an arbitrary area specified in the original image,
前記画質を調整するステップは、物体の色検出を行うステップと、Adjusting the image quality includes performing color detection of an object;
前記物体の色調整を行うステップと、Adjusting the color of the object;
輝度調整と彩度調整とを行うステップで構成され、It consists of steps to adjust brightness and saturation,
前記輝度調整と彩度調整とを行うステップは、前記入力された原画像の各画素の輝度または彩度より、輝度または彩度のヒストグラムを作成するステップと、The step of performing the luminance adjustment and the saturation adjustment includes creating a luminance or saturation histogram from the luminance or saturation of each pixel of the input original image;
そのヒストグラムから得られるヒストグラムパラメータに基づきヒストグラム全体を調整する変換関数を求めるステップと、Obtaining a conversion function for adjusting the entire histogram based on a histogram parameter obtained from the histogram;
さらに前記検出された物体色の輝度または彩度と、前記輝度または彩度のヒストグラムの中央値との比較結果に応じて、物体色に基づいて前記変換関数を補正する補正関数を作成するステップと、A step of creating a correction function for correcting the conversion function based on the object color according to a comparison result between the brightness or saturation of the detected object color and a median value of the histogram of the brightness or saturation; ,
これら作成された前記変換関数と前記補正関数とを掛け合わせて最終的な変換関数を作成ステップとを備え、The final conversion function is created by multiplying the created conversion function and the correction function,
この最終的な変換関数に基づいて最終的に画像全体の輝度、または彩度を変換する調整ステップで構成されて、画質の調整を実行することを特徴とする画質調整方法。An image quality adjustment method comprising adjusting steps for finally converting luminance or saturation of an entire image based on the final conversion function, and performing image quality adjustment.
前記入力された原画像を表示し、Displaying the input original image;
さらに前記表示された原画像中の任意の領域を指定する機能を実行するコンピュータに、Furthermore, to a computer that executes a function of designating an arbitrary area in the displayed original image,
前記原画像中に指定された任意の領域に対して、該領域の色や輝度に基づき画質を調整する処理を実行させるプログラムを格納した記録媒体であって、A recording medium storing a program for executing processing for adjusting an image quality based on a color or luminance of an area specified in the original image,
前記画質を調整する際に、物体の色検出を行い、When adjusting the image quality, the color of the object is detected,
前記物体の色調整を行い、Adjust the color of the object,
輝度調整と彩度調整とを行う機能を実行し、Execute functions to adjust brightness and saturation,
前記輝度調整と彩度調整とを行う際には、前記入力された原画像の各画素の輝度または彩度より、輝度または彩度のヒストグラムを作成し、When performing the brightness adjustment and the saturation adjustment, a brightness or saturation histogram is created from the brightness or saturation of each pixel of the input original image,
そのヒストグラムから得られるヒストグラムパラメータに基づきヒストグラム全体を調整する変換関数を求め、Find a conversion function that adjusts the whole histogram based on the histogram parameters obtained from that histogram,
さらに前記検出された物体色の輝度または彩度と、前記輝度または彩度のヒストグラムの中央値との比較結果に応じて、物体色に基づいて前記変換関数を補正する補正関数を作成することで、これら作成された前記変換関数と前記補正関数とを掛け合わせて最終的な変換関数を作成し、Further, by creating a correction function for correcting the conversion function based on the object color according to a comparison result between the brightness or saturation of the detected object color and the median value of the histogram of the brightness or saturation. The final conversion function is created by multiplying the generated conversion function and the correction function,
この最終的な変換関数に基づいて最終的に画像全体の輝度、または彩度を変換する調整を実行することを特徴とするコンピュータで読み出し可能なプログラムを格納した記録媒体。A recording medium storing a computer-readable program, characterized in that, based on the final conversion function, adjustment for finally converting the luminance or saturation of the entire image is executed.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP26926098A JP3673092B2 (en) | 1998-09-24 | 1998-09-24 | Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program |
EP19990307517 EP0989739B1 (en) | 1998-09-24 | 1999-09-23 | Method and apparatus for image quality adjustment |
DE69929408T DE69929408T2 (en) | 1998-09-24 | 1999-09-23 | Method and apparatus for image quality change |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP26926098A JP3673092B2 (en) | 1998-09-24 | 1998-09-24 | Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2000099717A JP2000099717A (en) | 2000-04-07 |
JP3673092B2 true JP3673092B2 (en) | 2005-07-20 |
Family
ID=17469883
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP26926098A Expired - Fee Related JP3673092B2 (en) | 1998-09-24 | 1998-09-24 | Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3673092B2 (en) |
Families Citing this family (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4333016B2 (en) * | 2000-10-20 | 2009-09-16 | ノーリツ鋼機株式会社 | Image forming apparatus, image data processing method, and recording medium recording image data processing program |
JP3846851B2 (en) | 2001-02-01 | 2006-11-15 | 松下電器産業株式会社 | Image matching processing method and apparatus |
BRPI0302384B1 (en) | 2002-07-20 | 2018-06-19 | Samsung Electronics Co., Ltd. | "METHOD FOR ADAPTABLE COLORING A COLOR, AND EQUIPMENT FOR ADAPTABLE COLORING AN IMAGE" |
KR100537509B1 (en) * | 2002-07-20 | 2005-12-19 | 삼성전자주식회사 | Method and apparatus for enhancing quality of color image adaptively |
JP4533153B2 (en) | 2005-01-07 | 2010-09-01 | キヤノン株式会社 | Imaging apparatus and control method thereof |
KR100723050B1 (en) * | 2005-07-22 | 2007-05-30 | 주식회사 대우일렉트로닉스 | Specific color correction method and display device of display device |
JP2007036968A (en) * | 2005-07-29 | 2007-02-08 | Noritsu Koki Co Ltd | Image forming apparatus |
JP4626534B2 (en) * | 2006-02-16 | 2011-02-09 | パナソニック株式会社 | Image processing apparatus and method, program, and recording medium |
JP2007293139A (en) * | 2006-04-26 | 2007-11-08 | Fujitsu Ten Ltd | Display device and on-vehicle display device |
JP4883789B2 (en) * | 2007-03-30 | 2012-02-22 | キヤノン株式会社 | Image processing apparatus and image processing method |
DE102007022888B3 (en) * | 2007-05-14 | 2008-11-27 | Olympus Winter & Ibe Gmbh | Method and device for image processing of endoscope images |
JP6365232B2 (en) * | 2014-10-24 | 2018-08-01 | コニカミノルタ株式会社 | Image processing method, image processing program, image processing apparatus, and image forming system |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2824989B2 (en) * | 1988-08-15 | 1998-11-18 | キヤノン株式会社 | Color image processing method and apparatus |
JPH0568262A (en) * | 1991-03-13 | 1993-03-19 | Olympus Optical Co Ltd | Video id photo printer and face color converter |
JPH09247483A (en) * | 1996-03-06 | 1997-09-19 | Ricoh Co Ltd | Picture emphasizing device |
-
1998
- 1998-09-24 JP JP26926098A patent/JP3673092B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2000099717A (en) | 2000-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7755670B2 (en) | Tone-conversion device for image, program, electronic camera, and tone-conversion method | |
JP3880553B2 (en) | Image processing method and apparatus | |
US7469072B2 (en) | Image processing apparatus and method | |
JP2000228747A (en) | Picture processor | |
JP2008205691A (en) | Image processing apparatus and method, recording medium, and program | |
JP3673092B2 (en) | Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program | |
EP0989739B1 (en) | Method and apparatus for image quality adjustment | |
JP2004038842A (en) | Image processing device and image processing method | |
JPH10198802A (en) | Image processing apparatus, image processing method, and medium recording image processing program | |
US7340104B2 (en) | Correction parameter determining method, correction parameter determining apparatus, computer program, and recording medium | |
JPH10208034A (en) | Image processing apparatus and image processing method | |
JP4243362B2 (en) | Image processing apparatus, image processing method, and recording medium recording image processing program | |
JP3921737B2 (en) | Image processing apparatus, image processing method, and medium on which image processing control program is recorded | |
JP2929983B2 (en) | Color image processing equipment | |
JP2001045303A (en) | Image thresholding method | |
JP3501151B2 (en) | Image processing apparatus, image processing method, medium recording image processing control program | |
JP2000209437A (en) | Image correction method and storage medium storing image correction program | |
JP3573143B2 (en) | Image processing apparatus, image processing method, medium recording image processing control program | |
JP3558073B2 (en) | Image processing apparatus, image processing method, medium recording image processing control program | |
JP2008147714A (en) | Image processor and image processing method | |
JP3705250B2 (en) | Image processing apparatus, image processing method, and medium on which image processing control program is recorded | |
JP2003125213A5 (en) | ||
JP2003069828A (en) | Image processing apparatus, image processing method, and medium recording image processing program | |
JP3570416B2 (en) | Image processing apparatus, image processing method, and medium recording image processing control program | |
JP5029779B2 (en) | Image processing method, medium storing image processing program, and image processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040716 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040727 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040927 |
|
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: 20050405 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050421 |
|
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: 20080428 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090428 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090428 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100428 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100428 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110428 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120428 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130428 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130428 Year of fee payment: 8 |
|
LAPS | Cancellation because of no payment of annual fees |