JP2005006213A - Image processor and its method - Google Patents

Image processor and its method Download PDF

Info

Publication number
JP2005006213A
JP2005006213A JP2003169931A JP2003169931A JP2005006213A JP 2005006213 A JP2005006213 A JP 2005006213A JP 2003169931 A JP2003169931 A JP 2003169931A JP 2003169931 A JP2003169931 A JP 2003169931A JP 2005006213 A JP2005006213 A JP 2005006213A
Authority
JP
Japan
Prior art keywords
image
image processing
correction
sys
processing method
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP2003169931A
Other languages
Japanese (ja)
Inventor
Takuya Kotani
拓矢 小谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2003169931A priority Critical patent/JP2005006213A/en
Priority to US10/865,793 priority patent/US7433079B2/en
Publication of JP2005006213A publication Critical patent/JP2005006213A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Television Signal Processing For Recording (AREA)
  • Processing Of Color Television Signals (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To ensure more appropriate image correction by taking into consideration meta-data (attached information) as well as information of an image itself in automatic image correction. <P>SOLUTION: A CPU 101 acquires the attached information added to image data inputted from an input device 104, generates an image processing parameter on the basis of information at the time of acquiring an image shown by the acquired attached information, uses the generated image processing parameter, and applies one image processing or more in a predetermined sequence to correct the image data. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は画像処理装置およびその方法に関し、例えば、画像を補正する画像処理に関する。
【0002】
【従来の技術】
ディジタルカメラが急速に普及し、パーソナルコンピュータ(PC)も家庭で普通に利用されるようになった。ディジタルカメラで撮影された画像は、PCとプリンタを使って印刷され、また、ホームページなどに公開される。しかし、ディジタルカメラの露出やホワイトバランスは完全と言えず、場合によっては、印刷前や公開前に画像の色補正が必要になる。ところが、画像補正は経験が必要で、経験が少ないと思うように画像を補正することができない。そのため、画像補正の未経験者や不慣れな人用に様々な自動画像補正方式が提案されている。
【0003】
自画像動補正は、主に、画像の画素値のヒストグラムなど解析結果に基づき行われる。しかし、画像自体の情報に加え、メタデータ(付加情報)を考慮すれば、より適切な画像補正を行うことができる。例えばExifに準拠する画像データであれば、シャッタ速度や絞り値などの値を具体的に記録することができる。このようなメタデータを用いる自動画像補正について、例えば特開2001−202509公報がある。同公報に記載された発明は、ノイズ除去パラメータをISO感度に応じて場合分けし、ISO感度に応じてパラメータを決定する。
【0004】
【特許文献】
特開2001−202509公報
【0005】
【発明が解決しようとする課題】
本発明は、上述の問題を個々にまたはまとめて解決するためのもので、画像データに付加された付加情報に応じた補正を行うことを目的とする。
【0006】
【課題を解決するための手段】
本発明は、前記の目的を達成する一手段として、以下の構成を備える。
【0007】
本発明は、入力される画像データに付加された付加情報を取得し、取得した付加情報が示す画像取得時の情報を用いて、前記入力画像データを補正することを特徴とする。
【0008】
【発明の実施の形態】
以下、本発明にかかる一実施形態の画像処理装置を図面を参照して詳細に説明する。
【0009】
[概要]
上述したメタデータの値そのものを利用することができれば、より適切な画像補正を行うことが可能になる。例えば、f値が大きいほどパンフォーカスに近くなると考えられるので、f値そのものを利用する演算を用いて、エッジ強調の度合いを決めることが考えられる。また、f値が小さい場合は、アウトフォーカスの部分をよりぼかし、フォーカスしている部分はより先鋭に見えるようなフィルタ処理が考えられる。このフィルタのパラメータも、f値そのものを用いて計算することで、撮影時のカメラの設定をダイレクトに補正結果に反映させることが可能になる。
【0010】
以下では、入力される画像データに付加された付加情報を取得し、取得した付加情報が示す画像取得時の情報に基づき画像処理パラメータを生成し、生成した画像処理パラメータを用いて、入力画像データを補正する実施形態を説明する。
【0011】
補正された画像データに基づき画像を印刷する場合、印刷に使用する媒体のサイズや種類に応じて、画像処理パラメータを調整する。具体的には、媒体のサイズが大きいほどコントラストを強調するように、シャープネスを強くするように、および/または、ノイズ除去を強くするように画像処理パラメータを調整することが好ましい。
【0012】
画像取得時の情報には、画像撮影時の露光時間、絞り値(f値)、フラッシュ強度(ガイドナンバ)、被写体距離、焦点距離およびISO感度などが含まれる。
【0013】
また、画像処理には、色調・彩度補正、シャープネス、ノイズ除去、色かぶり補正、ぼかし、セピア調化、モノトーン化、ソラリゼーションおよびエンボスなどのフィルタ処理が含まれる。
【0014】
補正は、予め順序が定められた複数の画像処理で構成される。
【0015】
【第1実施形態】
[構成]
図1は実施形態のシステムの概略を示すブロック図である。
【0016】
CPU 101は、システム全体の動作をコントロールし、一次記憶メモリ102に格納されたプログラムなどを実行する。一次記憶メモリ102は主にRAMなどのメモリで、CPU 101は、二次記憶メモリ103に記憶されたプログラムなどを読み込んで一次記憶メモリ102に格納する。二次記憶メモリ103は、例えばハードディスクなどに該当する。一般に、一次記憶メモリ102のメモリ容量は二次記憶メモリ103のメモリ容量より小さく、一次記憶メモリ102に格納しきれないプログラムやデータなどは二次記憶メモリ103に格納される。また、長時間記憶すべきデータなども二次記憶メモリ103に格納される。つまり、CPU 101は、画像処理などのプログラムを実行する際に、二次記憶メモリ103に格納されたプログラムを一次記憶メモリ102に読み込んで実行する。
【0017】
入力デバイス104は、例えば、システムのコントロールに用いるマウスやキーボードのほか、画像データの入力に必要なカードリーダ、スキャナ、フィルムスキャナ、ディジタルカメラなどに該当する。出力デバイス105は、例えば、モニタやプリンタなどが考えられる。なお、入力デバイス104および出力デバイス105は、図示しない汎用のインタフェイスを介してシステムバス109に接続されている。汎用のインタフェイスとしては、USB (Universal Serial Bus)やIEEE1394などのシリアルバス、SCSIやGPIBなどのパラレルインタフェイス、RS232CやRS422などのシリアルインタフェイス、IrDAやBluetoothなどの赤外線・無線インタフェイスなどが利用可能である。
【0018】
図1に示すシステムの構成は、他にも様々な形態が考えられるが、本実施形態の主眼ではないので、その説明を省略する。
【0019】
[ユーザインタフェイス]
図2はCPU 101によってモニタに表示される画像補正用のグラフィカルユーザインタフェイス(GUI)の一例を示す図である。
【0020】
ツールバー202に備えられたファイルオープンボタンを押す、もしくは、メニューバー201のファイルメニューから「開く」を選択すると、ファイルオープンダイアログが表示され、画像ファイルを開くことができる。勿論、画像ファイルのアイコンを、補正画像の表示領域203にドラッグアンドドロップすることで、画像ファイルをオープンすることも可能である。
【0021】
画像ファイルが選択されると、表示領域203には補正対象の画像が表示される。補正結果の画像ファイルを保存する場合は汎用の画像フォーマットで二次記憶メモリ103など保存すればよい。汎用の画像フォーマットにはBMP、JPEG、TIFFなどを利用することができる。
【0022】
ウィンドウ209は、ユーザが補正対象画像の表示倍率を設定するための表示倍率指定ウィンドウである。ウィンドウ209には「全体表示」「100%」「200%」「400%」などの倍率を設定するためのラジオボタンがある。全体表示が選択された場合、補正対象画像は、そのアスペクト比(縦横比)が保たれたまま、表示領域203に収まるサイズで表示される。また、100%の場合は等倍、200%の場合は二倍、400%の場合は四倍に拡大して表示される。例えば、200%の場合は一画素を2×2画素、400%の場合は一画素を4×4画素で表現する。以下「全体表示」を単に全体表示と呼び、これ以外の表示モードを部分表示と呼ぶ。
【0023】
表示領域203に補正対象画像を表示しきれない場合はスクロールバーが表示され、ユーザがスクロールバーを操作することで、画像全体を確認することができる。また、スクロールバーが表示されている状態で、表示領域203をマウスでクリックした状態でドラッグすると、そのドラッグ分、画像がスクロールされる。
【0024】
ウィンドウ208は、画像の向きやサイズを変更するための画像方向・サイズ指定ウィンドウで行う。ウィンドウ208には、画像サイズを変更する際に、ユーザが入力した縦(高さ)または横(幅)のサイズに対して、アスペクト比を保った横または縦のサイズをCPU 101に計算させ入力させるためのチェックボックスが備わる。
【0025】
ウィンドウ205から207はそれぞれ、色調補正ウィンドウ、USM指定ウィンドウおよびノイズ除去指定ウィンドウで、各ウインドウに配置されたスライダーなどを操作することで処理パラメータを設定(変更)することができる。なお、画像補正の詳細については後述する。
【0026】
図3はツールバー202の詳細なボタン配置例を示す図である。
【0027】
ツールバー202には、上述したファイルオープン用のファイルオープンボタン301、自動補正を適用する「強」「弱」「無」の各ボタン302−304、上述したウィンドウ205から209をすべて開く開ボタン305およびすべて閉じる閉ボタン306、各ウィンドウを開閉するためのボタン308−311、並びに、画像情報を表示するためのInfoボタン312が備わる。
【0028】
強ボタン302を押すと強めの自動補正が適用され、弱ボタン303を押すと弱めの自動補正が適用される。無ボタン304を押せば、すべての補正が取り消され、画像は無補正の状態になる。自動補正は、ヒストグラムなどの画像特徴量のほかに、補正対象画像のデータがExifに準拠する場合は、Exif情報を用いて補正パラメータを決定する。なお、補正パラメータは、ノイズ除去指定ウィンドウ207、色調補正ウィンドウ205およびUSM指定ウィンドウ206で設定可能なパラメータである。自動補正の詳細については後述する。
【0029】
Infoボタン312を押すと、図4に示す画像情報が表示される。「機種」には、Exifデータの0th IFDに格納されているMakeとModelの値を表示する。「撮影情報」としては、0th IFDの中のExif IFDに格納されているCapture Scene Type、Exposure Time(もしくはShutter Speed Value)、F Number、Exposure Bias Value、Focal Length Value(もしくはFocal Length In 35mm Film)、Subject Distance、Flashの値を表示する。これらの値およびISO Speed Ratingsの値は、後述する自動補正に利用される。
【0030】
メニューバー201には「ファイル」「自動補正」「ウィンドウ」の三つのメニューが用意されている。
【0031】
ファイルメニューには、ファイルオープンダイアログを表示するための「開く」、画像補正を終了するための「閉じる」、補正対象画像を印刷するための「印刷」、並びに、ユーザの好みを指定するための「オプション」がある。図5は「オプション」が選択されると表示されるウィンドウの一例を示す図である。図5の例では「鮮やかさ」および「コントラスト」をユーザの好みに応じて設定することができるが、アンシャープマスクに代表される画像の先鋭度など、他の要素によるユーザの好みを反映できるようにしても構わない。
【0032】
自動補正メニューには、「強」「弱」「無」ボタン302−304に対応する「強め」「弱め」「無し」がある。以下、「強」ボタン302が選択された状態を、自動補正・強、「弱」ボタン303が選択された状態を自動補正・弱と呼ぶ。
【0033】
「ウィンドウ」メニューには、ボタン307−311に対応する「色調補正」「シャープネス」「ノイズ除去」「画像サイズ」および「表示倍率」がある。
【0034】
図6はステイタスバー204の詳細例を示す図である。ステイタスバー204には基本情報の表示領域601および撮影モードの表示領域602がある。基本情報の表示領域601には、f値、シャッタ速度、平均輝度など、画像の基本的な情報が表示される。撮影モードの表示領域602には、画像撮影時の撮影モードが表示される。なお、平均輝度値以外は、Exif情報から抽出されるデータを表示する。
【0035】
[画像補正]
本実施形態の画像補正には自動補正と手動補正がある。自動補正は、画像の解析結果から補正パラメータを算出し、Exif情報があれば、算出した補正パラメータを修正する。なお、画像の解析結果には「オプション」で指定されたユーザの好みを反映するが、ユーザの好みを反映するための追加パラメータは後述する。
【0036】
手動補正は、ユーザが色調補正ウィンドウ205、USM指定ウィンドウ206およびノイズ除去ウィンドウ207を使用して補正パラメータを指定する。勿論、自動補正で設定した補正パラメータを、これらのウィンドウ上のスライダを使用して修正することもできる。
【0037】
以下、ユーザの好みを反映するための追加パラメータ、手動補正および自動補正について説明する。
【0038】
●追加パラメータ
ユーザの好みを反映するための追加パラメータは、上述した図5に示すユーザインタフェイスで設定される。追加パラメータには、彩度調整パラメータSuserとコントラスト調整パラメータCuserの二つがある。
【0039】
「鮮やかさ」は、「地味」「標準」および「派手」から選択されきるが、「地味」が選択された場合は彩度調整パラメータSuser=−1に、「標準」が選択された場合はSuser=0に、「派手」が選択された場合はSuser=1になる。
【0040】
「コントラスト」は、「低め」「標準」および「高め」から選択されるが、「低め」が選択された場合はコントラスト調整パラメータCuser=−1に、「標準」が選択された場合はCuser=0に、「高め」が選択された場合はCuser=1になる。
【0041】
これらの追加パラメータは、自動補正におけるパラメータ決定に用いられる。
【0042】
●手動補正
図7は画像処理の構成例を示すブロック図である。入力信号は輝度色差信号YCbCrもしくはRGBで、出力信号は入力信号と同じ形式の信号になる。例えば輝度色差信号YCbCrが入力される場合、出力も輝度色差信号YCbCrにする。また、輝度信号RGBが入力される場合は、変換器701によってYCbCr信号に変換してノイズ除去703、ヒストグラム補正705、彩度修正706などの画像処理を行った後、変換器702によってRGB信号に戻す。
【0043】
ウィンドウ205−207の画質調整用のスライダ操作などによって補正パラメータが変更されると、輝度成分および色差成分のノイズ除去703、色調補正(ヒストグラム補正705および彩度修正706)、シャープネス(USM)707の各処理を、予め定められた順序で画像データに適用され、適用結果の画像が表示領域203に表示される。なお、本実施形態では画像処理例としてノイズ除去、色調補正、シャープネスを挙げるが、これら以外の画像処理を加えることもできる。
【0044】
画像処理の順番は、写真などの画像の補正経験を充分にもつ人の経験に基づき決められた順番が望ましい。本実施形態では、一般的に妥当と考えられる、ノイズ除去、色調補正、シャープネスの順に処理を適用する。このように順序が決められた処理を適用することで、画像処理の未経験者や未熟な人でも、適切な画像処理を実施して、好適な補正結果を得ることが可能になる。
【0045】
●ノイズ除去
本実施形態におけるノイズ除去703には、輝度成分に対するノイズ除去と色差成分に対するノイズ除去の二つがある。
【0046】
図8はノイズ除去指定ウィンドウ207の詳細例を示す図で、輝度と色差の二つのスライダがあり、これらスライダにより補正パラメータNysysとNcsysを指定する。Nysysは輝度成分のノイズ除去の強さを設定するパラメータ、Ncsysは色差成分のノイズ除去の強さを設定するパラメータで、NysysとNcsysは0から100の値をもつ。
【0047】
輝度成分に対するノイズ除去には、単純化のため、次のような処理を適用する。すなわち、画素(i, j)の輝度Yi,jを、近傍の四画素の輝度を用いて、次のように算出する。
i,j = (2×Yi,j + Yi−1,j + Yi+1,j + Yi,j−1 + Yi,j+1)/6×(100 − Nysys)/100 + Nysys×Yi,j/100 …(1)
【0048】
色差成分に対するノイズ除去処理にも同様に、単純化のため、次のような処理を適用する。すなわち、画素(i, j)の色差Cbi,jとCri,jを、近傍の四画素の色差を用いて、次のように算出する。

Figure 2005006213
【0049】
●色調補正
色調補正に使用するパラメータには、輝度に対するガンマGsys、黒レベルBksysおよび明るさLsysの三つのパラメータ、並びに、色差に対する彩度Ssysのパラメータがある。ここで、Gsys、BksysおよびLsysの3パラメータをヒストグラム変更パラメータと呼ぶ。
【0050】
図9は色調補正ウィンドウ205の詳細例を示す図である。Gsys、Bksys、LsysおよびSsysはそれぞれ、色調補正ウィンドウ205のスライダにより変更可能である。本実施形態では、Gsysの値は0.1から6.0、Bksysの値は0から255、Lsysの値は−100から100、Ssysの値は0から150である。
【0051】
図10は輝度補正の手順を示す図である。まず、画素の輝度値のヒストグラムhist[256]をhist[i]=iで初期化し(S1001)、例えば次式に従いhist[i]を更新する(S1002)。
hist[i] = 255×[{( v / ( 255 − Bk )}1/Gsys]+ Lsys×(255 − v )/255 …(4)
ここで、v = 0 (i < Bk)
v = i − Bk (その他)
【0052】
次に、各画素の輝度jをj=hist[j]で再計算する(S1003)。なお、輝度値は、後述する図12もしくは図13の最上位のレイヤ「表示」に表示する画像を生成する際に反映される。
【0053】
ここで、hist[i]の計算式には様々な構成が考えられるが、どのような式を使ってヒストグラムを計算しても構わない。ただし、式(3)を用いることでハイライト部がカットされなくなり、色調補正による白飛びで画質を著しく低下させる可能性を減らすことができる。
【0054】
一方、彩度補正は、各画素の色差を次式で表される色差に補正する。
u’ = Ssys/100×u …(5)
ここで、uは補正前の色差ベクトル(Cb, Cr)
u’は補正後の色差ベクトル(Cb’, Cr’)
【0055】
●シャープネス
シャープネスは、アンシャープマスク(USM)と呼ばれる処理を適用する。USMの詳細については省略する。USMには、適用半径Rsys、適用量Vsys、閾値Thsysの三つのパラメータがあり、USM指定ウィンドウ206にもこの3パラメータを調整するためのスライダがある。図11はUSM指定ウィンドウ206の詳細を示す図である。
【0056】
●自動補正
本実施形態における自動画像補正は、ヒストグラムなどの画像特徴量やExif情報などの撮影条件などを用いて、補正パラメータを自動設定するものである。Exif情報には、撮影モードとして「標準」「風景」「人物」「夜景」が用意されている。この情報は、ユーザが撮影時に設定したカメラモードを保持するもので、補正パラメータをより良好に設定するために有用である。
【0057】
また、露光時間やf値などの撮影条件を取り入れた式で補正パラメータを計算することで、撮影者の意図に近い補正を施すことができるようになる。例えば、f値が大きければパンフォーカスに近くなることが予想される。このような場合は、シャープネスを強めに施すことが考えられる。また、フラッシュの発光量を示すガイドナンバ、露光感度を示すISO感度、被写体までの距離である被写体距離、撮影時のf値、撮影時の35mmフィルム換算焦点距離を用いることで、被写体にフラッシュの光が届いたかどうか、また、届くために必要な条件を算出することができる。例えばISO 100の場合、ガイドナンバGn、被写体距離D、絞りfの関係は次式のようになるから、例えば、被写体距離に比べてガイドナンバが小さい場合、撮影時のf値と理想f値を用いて、適切な明るさに補正することが考えられる。
Gn = D×f …(6)
【0058】
以下では、補正パラメータの自動設定方法を説明する。
【0059】
まず、輝度成分のノイズ除去パラメータNysysは、隣接画素の輝度差の平均値を画像全体で計算し、その平均値YDAVEを、輝度差の最大値YDMAXで割り、さらに100倍した値にする。
【0060】
色差成分のノイズ補正パラメータNcsysは、隣接画素の色差ベクトルの差ベクトルを求め、差ベクトルのノルムの平均値を画像全体で計算し、その平均値CDAVEを、輝度差の最大値CDMAXで割り、さらに100倍した値にする。
【0061】
ただし、上記の処理は非常に時間が掛かるので、本実施形態では、露光時間TE(秒)を用いて、次式でNysysおよびNcsysを求める。
TE > 1または撮影モード「夜景」の場合、Nysys = TE×2
その他の場合、Nysys = 0
Ncsys = 0 …(7)
【0062】
色調補正パラメータのうち、ガンマ補正パラメータGsysは、露光時間TE(秒)を用いて次式で算出する。
【0063】
(自動補正・強)
TE < 30の場合、Gsys = 1.4 − TE/75
その他の場合、Gsys = 1.0 …(8)
(自動補正・弱)
TE < 30の場合、Gsys = 1.2 − TE/150
その他の場合、Gsys = 1.0 …(9)
色調補正パラメータのうち、黒レベル補正パラメータBksysは、露光時間TE(秒)を用いて次式で算出する。
TE < 0.03または撮影モード「風景」の場合、
Bksys = Cuser×α + β + √f
0.03 ≦ TE < 1または撮影モード「風景」「夜景」以外の場合、
Bksys = Cuser×α + β
TE ≧ 1または撮影モード「夜景」の場合、
Bksys = Cuser×α …(10)
ここで、
【0064】
式(10)において、fは撮影情報から得られるf値だが、補正対象の画像データがExif準拠ではないなどの理由により、撮影情報がない場合はこの項を無視する。αおよびβの値は次式で表される。
【0065】
(自動補正・強)
α = 3
hist(BkHIGH) < BkValue HIGHの場合、β = hist(BkHIGH
その他の場合、β = hist(BkValue HIGH
(自動補正・弱)
α = 2
hist(BkLOW) < BkValue LOWの場合、β = hist(BkLOW
その他の場合、β = hist(BkValue LOW) …(11)
ここでhist(BkHIGH)およびhist(BkLOW)は、輝度が低い順に画素を所定の割り合い(n%)選択して、選択した画素の中で最も明るいまたは最も暗い画素の輝度を表す。例えば、BkHIGH=13、BkLOW=4などである。また、BkValue HIGHとBkValue LOWは、過剰な黒レベル補正を行わないための定数で、本実施形態ではそれぞれBkValue HIGH=40、BkValue LOW=20である。
【0066】
色調補正パラメータのうち、明るさ補正パラメータLsysは、画像全体の平均輝度Laveを用いて次式で算出する。
ave − 128 > Llimitの場合、
sys = Pmode×a + Llimit
|Lave − 128| < Llimitの場合、
sys = Pmode×a + 128 − Lave
128 − Lave > Llimitの場合、
sys = Pmode×a − Llimit …(12)
【0067】
limitは、過剰な明るさ補正を適用しないための値で定数である。変数Pmodeは撮影モードが「人物」か否かの状態を表し、「人物」モードであればPmode=1、そうでなければPmode=0である。自動補正・強の場合は、Llimit=16およびa=3、自動補正・弱の場合はLlimit=8およびa=2にする。ただし、露光時間が1秒以上もしくは撮影モードが「夜景」の場合はLaveの値に関わらずLsys=0にする。
【0068】
人物の撮影は若干、露光オーバ気味がよいとされている。式(12)を用いることで、顔検出などの複雑な処理を行うことなしに適切な補正を行うことができる。
【0069】
シャープネスの補正パラメータ、上述したように、適用半径Rsys、適用量Vsys、閾値Thsysの3パラメータがあるが、本実施形態の自動補正では、適用量Vsysだけを次式によって自動設定し、適用半径Rsys=1および閾値Thsys=0にする。
TE > 1または撮影モード「夜景」の場合、
sys = USMMAX Value − TE
それ以外の場合、
sys = USMMAX Value …(13)
【0070】
USMMAX Valueは、USMの最大適用量で、自動補正・強の場合は80、自動補正・弱の場合は50にする。また、Vsysの値が負になった場合はVsys=0にする。
【0071】
このように、Exif情報を利用して、適切な画像補正を行うことが可能になる。
【0072】
【第2実施形態】
以下、本発明にかかる第2実施形態の画像処理装置を説明する。なお、本実施形態において、第1実施形態と略同様の構成については、同一符号を付して、その詳細説明を省略する。
【0073】
第1実施形態では、単純に、画像全体を色補正してユーザに提示する例を説明したが、画像全体の画像処理は時間が掛かる場合が多く、画面に表示される部分だけを画像処理する方が現実的である。第2実施形態では、画面に表示する部分だけを画像処理してユーザに提示する例を説明する。
【0074】
図12は画像全体を表示する際の処理を説明する図である。表示領域203よりも補正対象画像のサイズが大きい場合、補正対象画像を表示領域203に内接するサイズに縮小した後、すべての補正を適用する。もし逆に、補正対象画像のサイズが表示領域203よりも小さい場合は、すべての補正処理を適用した後、表示する直前に拡大処理を行う。拡大・縮小のアルゴリズムには様々な方法を適用可能であるが、詳細な説明は省略する。
【0075】
図13は部分画像を表示する際の処理を説明する図である。表示領域203よりも補正対象画像のサイズが大きい場合、補正対象画像から表示領域203に内接するサイズの部分画像を抽出し、部分画像にすべての補正を適用し、表示領域203に表示する。もし逆に、補正対象画像のサイズが表示領域203よりも小さい場合は、すべての補正処理を適用した後、表示領域203の所定の位置、例えば表示領域203の中央に表示する。
【0076】
このような処理により、よりスムーズに補正結果をユーザに提示することが可能になる。ここで、図12に示す縮小処理後に補正処理を適用する系では、補正処理を補正対象画像そのものに適用する場合と、縮小画像に適用する場合とで、結果が異なる補正処理が存在する。例えばシャープネスで利用するUSMは、処理に用いる半径をピクセル単位に指定すると、縮小処理によって仮想的に半径が拡大したことと同義になる。そこで、このような場合、縮小率に合わせてUSMの適用半径を小さくすることが考えられる。例えば、USMの適用半径Rsys’を、補正パラメータRsysを用いて、次式で算出する。
sys’ = Rsys×Dux …(14)
ここで、Dux = Widthview/Widthorig
Widthorigは画像の幅(ピクセル単位)
Widthviewは拡大縮小後の画像の幅(ピクセル単位)
【0077】
【第3実施形態】
第2実施形態で、第1実施形態で説明した処理の高速化を説明したが、第3実施形態では、さらに高速に処理する方法を説明する。
【0078】
例えば部分表示時に補正対象画像のサイズが表示領域203より大きいならば、スクロールバーを操作するなどして表示領域203に表示される部分画像を変更する場合、第2実施形態では常に部分画像を抽出し、すべての画像処理を適用して、その結果を表示することになる。ハードウェアで画像補正を実現する場合、第2実施形態の処理でも充分な速度が得られる可能性が高い。しかし、ソフトウェアで画像補正を実現する場合は、スクロール速度が遅くなったり、スムーズなスクロールができなかったりする場合がある。
【0079】
そこで、画像全体表示における補正対象画像のサイズ変更処理、および、部分画像の表示時のスクロール操作における表示領域の変更処理中は、幾つかの画像補正、例えばノイズ除去およびシャープネスを省略することが考えられる。
【0080】
図14はノイズ除去およびシャープネスを省略可能にする画像処理の構成例を示すブロック図である。スイッチSW 711から719は、次に挙げるスキップ条件の何れかを満たす場合にオンになり、ノイズ除去およびシャープネスをスキップする。
(1) 表示領域203を含むウィンドウのリサイズ操作中
(2) 部分画像の表示時におけるスクロール操作中。つまり、表示領域203上でマウスボタンが押された状態でマウスが移動された場合、もしくは、スクロールバーの操作中。
【0081】
イベントドリブンなシステムであれば、条件(2)に相当するイベントが送られてきた場合にスイッチSW 711から719をオンにして、補正処理の一部をスキップすればよい。そうでない場合は、マウス操作に伴いCPU 101が、例えば図15に示すスキップ処理を行うことが考えられる。
【0082】
まず、上記のステップ条件の何れかを満たすかチェックし(S1501)、何れかスキップ条件を満たす場合は図14に示すスイッチSW 711から719をオンにして補正処理をスキップする(S1502)。そして、再びスキップ条件をチェックし(S1504)、何れかスキップ条件を満たす場合は処理をステップS1502へ戻し、ステップS1502およびS1504を繰り返す。
【0083】
また、ステップS1501またはS1504で何れのスキップ条件も満たさない場合は、すべての補正処理を適用し(S1505)、処理を終了する。
【0084】
このように、スクロールやリサイズ中は補正結果をユーザに提示する必要性が低いことを考慮して、補正処理の一部を省略することで、より快適なGUI操作をユーザに提供することができる。
【0085】
【第4実施形態】
第4実施形態では、上述したGUIを用いて補正した画像を印刷する処理を説明する。
【0086】
印刷処理は、画像処理部を上述したどの形態で実装したとしても、図7に示す系で画像補正を行って得られる画像信号を、印刷解像度によって定まる印刷用データに合わせた画像サイズに拡大もしくは縮小して印刷画像を作成し、CMYKなど印刷用の画像信号に変換する。その際、印刷サイズによらず、常に同じ補正パラメータを適用しても構わないが、印刷出力サイズに応じて補正パラメータを修正することが考えられる。一般に、例えばL判サイズなど小さい記録紙に印刷する場合は、A4サイズなど大きい記録紙に印刷する場合に比べ、同じデータで印刷した場合でもコントラストが高くみえる傾向がある。そこで、例えば記録紙の面積に応じて補正パラメータを修正することが考えられる。
【0087】
第4実施形態では、L判サイズの面積を1とした場合の面積比αを用いて、コントラストを補正する。具体的には、ヒストグラム変更パラメータのうち、黒レベルBksysを補正してコントラストを調整する。また、シャープネス処理の補正パラメータのうち、USMの適用量Vsysを補正する。印刷時の黒レベルBkprtおよび印刷時の適用量Vprtは次式のようになる。
prt = α×Bksys (15)
prt = (100 + α)×Vsys/100 (16)
【0088】
このように補正パラメータを修正することで、印刷出力サイズによる印象の差を低減することができる。
【0089】
以上説明したように、上述した各実施形態によれば、メタデータとして格納されている撮影情報の数値そのものを用いて、撮影時のカメラ設定を適切に反映した画像補正を行うことが可能になる。
【0090】
また、リアルタイムに画像補正結果をユーザに提示し、処理の順序を意識させずに適切な画像補正を行うことが可能になる。また、ユーザの好みを反映した自動補正結果について、任意のパラメータの調整を行うことが可能になる。
【0091】
【他の実施形態】
なお、本発明は、複数の機器(例えばホストコンピュータ、インタフェイス機器、リーダ、プリンタなど)から構成されるシステムに適用しても、一つの機器からなる装置(例えば、複写機、ファクシミリ装置など)に適用してもよい。
【0092】
また、本発明の目的は、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給し、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによっても、達成されることは言うまでもない。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、そのプログラムコードの指示に基づき、コンピュータ上で稼働しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0093】
さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張カードやコンピュータに接続された機能拡張ユニットに備わるメモリに書込まれた後、そのプログラムコードの指示に基づき、その機能拡張カードや機能拡張ユニットに備わるCPUなどが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合も含まれることは言うまでもない。
【0094】
本発明を上記記憶媒体に適用する場合、その記憶媒体には、先に説明したフローチャートに対応するプログラムコードが格納されることになる。
【0095】
【発明の効果】
以上説明したように、本発明によれば、画像データに付加された付加情報に応じた補正を行うことができる。
【図面の簡単な説明】
【図1】実施形態のシステムの概略を示すブロック図、
【図2】モニタに表示される画像補正用のグラフィカルユーザインタフェイス(GUI)の一例を示す図、
【図3】ツールバー202の詳細なボタン配置例を示す図、
【図4】画像情報の表示ウィンドウの一例を示す図、
【図5】オプションウィンドウの一例を示す図、
【図6】ステイタスバーの詳細例を示す図、
【図7】画像処理の構成例を示すブロック図、
【図8】ノイズ除去指定ウィンドウの詳細例を示す図、
【図9】色調補正ウィンドウの詳細例を示す図、
【図10】輝度補正の手順を示す図、
【図11】USM指定ウィンドウの詳細を示す図、
【図12】画像全体を表示する際の処理を説明する図、
【図13】部分画像を表示する際の処理を説明する図、
【図14】ノイズ除去およびシャープネスを省略可能にする画像処理の構成例を示すブロック図、
【図15】スキップ処理を示すフローチャートである。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and method thereof, for example, image processing for correcting an image.
[0002]
[Prior art]
With the rapid spread of digital cameras, personal computers (PCs) are also commonly used at home. Images taken with a digital camera are printed using a PC and a printer, and are also disclosed on a homepage. However, the exposure and white balance of a digital camera cannot be said to be perfect, and in some cases, color correction of an image is required before printing or publication. However, image correction requires experience, and the image cannot be corrected as thought to be less experienced. For this reason, various automatic image correction methods have been proposed for those who are inexperienced or unfamiliar with image correction.
[0003]
The self-image motion correction is mainly performed based on an analysis result such as a histogram of pixel values of an image. However, if metadata (additional information) is considered in addition to information on the image itself, more appropriate image correction can be performed. For example, if the image data conforms to Exif, values such as a shutter speed and an aperture value can be specifically recorded. For example, Japanese Patent Laid-Open No. 2001-202509 discloses automatic image correction using such metadata. In the invention described in the publication, noise removal parameters are classified according to ISO sensitivity, and parameters are determined according to ISO sensitivity.
[0004]
[Patent Literature]
Japanese Patent Laid-Open No. 2001-202509
[Problems to be solved by the invention]
The present invention is for solving the above-described problems individually or collectively, and an object thereof is to perform correction according to additional information added to image data.
[0006]
[Means for Solving the Problems]
The present invention has the following configuration as one means for achieving the above object.
[0007]
The present invention is characterized in that additional information added to input image data is acquired, and the input image data is corrected using information at the time of image acquisition indicated by the acquired additional information.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an image processing apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings.
[0009]
[Overview]
If the metadata values described above can be used, more appropriate image correction can be performed. For example, it is considered that the larger the f value is, the closer the pan focus is, so it is conceivable that the degree of edge enhancement is determined using a calculation that uses the f value itself. In addition, when the f value is small, it is conceivable to perform a filtering process in which the out-focus portion is more blurred and the focused portion looks sharper. This filter parameter is also calculated using the f value itself, so that the camera settings at the time of shooting can be directly reflected in the correction result.
[0010]
Hereinafter, additional information added to input image data is acquired, image processing parameters are generated based on information at the time of image acquisition indicated by the acquired additional information, and input image data is generated using the generated image processing parameters. An embodiment for correcting the above will be described.
[0011]
When an image is printed based on the corrected image data, the image processing parameter is adjusted according to the size and type of the medium used for printing. Specifically, it is preferable to adjust the image processing parameters so that the contrast is enhanced as the medium size increases, the sharpness is increased, and / or the noise removal is increased.
[0012]
Information at the time of image acquisition includes exposure time at the time of image shooting, aperture value (f value), flash intensity (guide number), subject distance, focal length, ISO sensitivity, and the like.
[0013]
The image processing includes filter processing such as color tone / saturation correction, sharpness, noise removal, color cast correction, blurring, sepia tone conversion, monotone conversion, solarization, and embossing.
[0014]
The correction is composed of a plurality of image processes whose order is determined in advance.
[0015]
[First Embodiment]
[Constitution]
FIG. 1 is a block diagram illustrating an outline of a system according to an embodiment.
[0016]
The CPU 101 controls the operation of the entire system and executes a program stored in the primary storage memory 102. The primary storage memory 102 is mainly a memory such as a RAM, and the CPU 101 reads a program stored in the secondary storage memory 103 and stores it in the primary storage memory 102. The secondary storage memory 103 corresponds to, for example, a hard disk. Generally, the memory capacity of the primary storage memory 102 is smaller than the memory capacity of the secondary storage memory 103, and programs and data that cannot be stored in the primary storage memory 102 are stored in the secondary storage memory 103. Data that should be stored for a long time is also stored in the secondary storage memory 103. That is, when executing a program such as image processing, the CPU 101 reads the program stored in the secondary storage memory 103 into the primary storage memory 102 and executes it.
[0017]
The input device 104 corresponds to, for example, a mouse or keyboard used for system control, a card reader, a scanner, a film scanner, a digital camera, or the like necessary for inputting image data. For example, the output device 105 may be a monitor or a printer. The input device 104 and the output device 105 are connected to the system bus 109 via a general-purpose interface (not shown). General-purpose interfaces include serial buses such as USB (Universal Serial Bus) and IEEE1394, parallel interfaces such as SCSI and GPIB, serial interfaces such as RS232C and RS422, and infrared and wireless interfaces such as IrDA and Bluetooth. Is available.
[0018]
Various other configurations of the system configuration shown in FIG. 1 are conceivable, but the description thereof is omitted because it is not the main point of the present embodiment.
[0019]
[User interface]
FIG. 2 is a diagram showing an example of a graphical user interface (GUI) for image correction displayed on the monitor by the CPU 101.
[0020]
When a file open button provided on the toolbar 202 is pressed or “Open” is selected from the file menu of the menu bar 201, a file open dialog is displayed, and an image file can be opened. Of course, it is also possible to open the image file by dragging and dropping the icon of the image file to the correction image display area 203.
[0021]
When an image file is selected, an image to be corrected is displayed in the display area 203. When saving the image file of the correction result, the secondary storage memory 103 and the like may be saved in a general-purpose image format. BMP, JPEG, TIFF, etc. can be used as a general-purpose image format.
[0022]
A window 209 is a display magnification designation window for the user to set the display magnification of the correction target image. The window 209 includes radio buttons for setting a magnification such as “entire display”, “100%”, “200%”, and “400%”. When the entire display is selected, the correction target image is displayed in a size that fits in the display area 203 while maintaining its aspect ratio (aspect ratio). Also, 100% is displayed at the same magnification, 200% is displayed at 2 times, and 400% is displayed at 4 times. For example, in the case of 200%, one pixel is expressed by 2 × 2 pixels, and in the case of 400%, one pixel is expressed by 4 × 4 pixels. Hereinafter, “full display” is simply referred to as full display, and other display modes are referred to as partial display.
[0023]
When the image to be corrected cannot be displayed in the display area 203, a scroll bar is displayed, and the user can check the entire image by operating the scroll bar. When the scroll bar is displayed and the display area 203 is clicked and dragged, the image is scrolled by the dragging amount.
[0024]
The window 208 is an image direction / size designation window for changing the orientation and size of the image. In the window 208, when the image size is changed, the CPU 101 calculates and inputs the horizontal or vertical size maintaining the aspect ratio with respect to the vertical (height) or horizontal (width) size input by the user. There is a check box to make it happen.
[0025]
Windows 205 to 207 are respectively a color tone correction window, a USM designation window, and a noise removal designation window, and a processing parameter can be set (changed) by operating a slider or the like arranged in each window. Details of the image correction will be described later.
[0026]
FIG. 3 is a diagram illustrating a detailed button arrangement example of the toolbar 202.
[0027]
The toolbar 202 includes a file open button 301 for opening the file described above, “strong”, “weak”, and “none” buttons 302 to 304 for applying automatic correction, an open button 305 for opening all the windows 205 to 209 described above, and A close button 306 for closing all, a button 308-311 for opening and closing each window, and an Info button 312 for displaying image information are provided.
[0028]
Pressing the strong button 302 applies a weaker automatic correction, and pressing the weak button 303 applies a weaker automatic correction. If the no button 304 is pressed, all corrections are canceled and the image is in an uncorrected state. In the automatic correction, in addition to the image feature amount such as a histogram, when the correction target image data conforms to Exif, the correction parameter is determined using the Exif information. The correction parameters are parameters that can be set in the noise removal designation window 207, the color tone correction window 205, and the USM designation window 206. Details of the automatic correction will be described later.
[0029]
When the Info button 312 is pressed, the image information shown in FIG. 4 is displayed. In “Model”, the values of Make and Model stored in the 0th IFD of the Exif data are displayed. The “shooting information” includes Capture Scene Type, Exposure Time (or Shutter Speed Value), F Number, Exposure Bias Value, Focure Scene Value, 35%, and Fluce Lum, and Fel. , Subject Distance, Flash values are displayed. These values and the ISO Speed Ratings value are used for automatic correction described later.
[0030]
In the menu bar 201, three menus of “file”, “automatic correction”, and “window” are prepared.
[0031]
In the file menu, “Open” for displaying a file open dialog, “Close” for ending image correction, “Print” for printing a correction target image, and user's preference are specified. There is an “option”. FIG. 5 is a diagram showing an example of a window displayed when “option” is selected. In the example of FIG. 5, “brightness” and “contrast” can be set according to the user's preference, but the user's preference due to other factors such as the sharpness of an image typified by an unsharp mask can be reflected. It doesn't matter if you do.
[0032]
The automatic correction menu includes “strong”, “weak”, and “none” corresponding to the “strong”, “weak”, and “none” buttons 302-304. Hereinafter, the state in which the “strong” button 302 is selected is referred to as automatic correction / strong, and the state in which the “weak” button 303 is selected is referred to as automatic correction / weak.
[0033]
The “Window” menu includes “color tone correction”, “sharpness”, “noise removal”, “image size”, and “display magnification” corresponding to the buttons 307-311.
[0034]
FIG. 6 is a diagram showing a detailed example of the status bar 204. The status bar 204 includes a basic information display area 601 and a shooting mode display area 602. The basic information display area 601 displays basic image information such as the f value, shutter speed, and average brightness. A shooting mode display area 602 displays a shooting mode at the time of image shooting. Note that data extracted from Exif information other than the average luminance value is displayed.
[0035]
[Image correction]
Image correction according to the present embodiment includes automatic correction and manual correction. In automatic correction, a correction parameter is calculated from the analysis result of the image, and if there is Exif information, the calculated correction parameter is corrected. Note that the user's preference specified by “option” is reflected in the analysis result of the image, but additional parameters for reflecting the user's preference will be described later.
[0036]
In manual correction, the user specifies correction parameters using the tone correction window 205, the USM designation window 206, and the noise removal window 207. Of course, the correction parameters set by the automatic correction can be corrected using the sliders on these windows.
[0037]
Hereinafter, additional parameters for reflecting user preferences, manual correction, and automatic correction will be described.
[0038]
Additional parameter Additional parameters for reflecting user preferences are set by the user interface shown in FIG. There are two additional parameters, a saturation adjustment parameter S user and a contrast adjustment parameter C user .
[0039]
“Vividness” can be selected from “plain”, “standard”, and “flashy”, but when “plain” is selected, when “standard” is selected for the saturation adjustment parameter S user = −1 Is S user = 0, and S user = 1 when “flash” is selected.
[0040]
“Contrast” is selected from “lower”, “standard”, and “higher”. When “lower” is selected, contrast adjustment parameter C user = −1, and when “standard” is selected, C contrast is selected. If user = 0 and “higher” is selected, C user = 1.
[0041]
These additional parameters are used for parameter determination in automatic correction.
[0042]
Manual Correction FIG. 7 is a block diagram showing a configuration example of image processing. The input signal is a luminance color difference signal YCbCr or RGB, and the output signal is a signal having the same format as the input signal. For example, when the luminance color difference signal YCbCr is input, the output is also the luminance color difference signal YCbCr. When the luminance signal RGB is input, it is converted into a YCbCr signal by the converter 701 and subjected to image processing such as noise removal 703, histogram correction 705, and saturation correction 706, and then converted into an RGB signal by the converter 702. return.
[0043]
When the correction parameter is changed by operating the slider for adjusting the image quality in the window 205-207, the noise removal 703 for the luminance component and the color difference component, the tone correction (histogram correction 705 and the saturation correction 706), and the sharpness (USM) 707 Each process is applied to the image data in a predetermined order, and an application result image is displayed in the display area 203. In this embodiment, noise removal, tone correction, and sharpness are given as examples of image processing, but image processing other than these can be added.
[0044]
The order of image processing is preferably an order determined based on the experience of a person who has sufficient experience in correcting images such as photographs. In this embodiment, processing is applied in the order of noise removal, tone correction, and sharpness, which are generally considered appropriate. By applying the processing in which the order is determined in this manner, even an inexperienced person or an inexperienced person in image processing can perform appropriate image processing and obtain a suitable correction result.
[0045]
Noise removal There are two types of noise removal 703 in the present embodiment: noise removal for luminance components and noise removal for color difference components.
[0046]
FIG. 8 is a diagram showing a detailed example of the noise removal designation window 207. There are two sliders for luminance and color difference, and the correction parameters Ny sys and Nc sys are designated by these sliders. Ny sys is a parameter for setting the noise removal strength of the luminance component, Nc sys is a parameter for setting the noise removal strength of the color difference component, and Ny sys and Nc sys have values from 0 to 100.
[0047]
For the sake of simplification, the following processing is applied to the noise removal for the luminance component. That is, the luminance Y i, j of the pixel (i, j) is calculated as follows using the luminance of the four neighboring pixels.
Y i, j = (2 × Y i, j + Y i-1, j + Y i + 1, j + Y i, j-1 + Y i, j + 1) / 6 × (100 - Ny sys) / 100 + Ny sys × Yi, j / 100 (1)
[0048]
Similarly, the following processing is applied to the noise removal processing for the color difference component for the sake of simplicity. That is, the color difference Cb i of the pixel (i, j), j and Cr i, a j, using the color difference of the four neighboring pixels is calculated as follows.
Figure 2005006213
[0049]
Color Correction The parameters used for color correction include three parameters: gamma G sys for luminance, black level Bk sys, and brightness L sys , and a parameter for saturation S sys for color difference. Here, the three parameters G sys , Bk sys and L sys are referred to as histogram change parameters.
[0050]
FIG. 9 is a diagram showing a detailed example of the color tone correction window 205. G sys , Bk sys , L sys, and S sys can be changed by a slider of the color tone correction window 205. In this embodiment, the value of G sys is 0.1 to 6.0, the value of Bk sys is 0 to 255, the value of L sys is −100 to 100, and the value of S sys is 0 to 150.
[0051]
FIG. 10 is a diagram showing the procedure of luminance correction. First, a histogram hist [256] of pixel luminance values is initialized with hist [i] = i (S1001), and for example, hist [i] is updated according to the following equation (S1002).
hist [i] = 255 × [{(v / (255−Bk)} 1 / Gsys ] + Lsys × (255−v) / 255 (4)
Here, v = 0 (i <Bk)
v = i-Bk (Other)
[0052]
Next, the luminance j of each pixel is recalculated with j = hist [j] (S1003). The luminance value is reflected when generating an image to be displayed on the uppermost layer “display” in FIG. 12 or FIG.
[0053]
Here, various formulas can be considered for the calculation formula of hist [i], but any formula may be used to calculate the histogram. However, the use of Expression (3) makes it possible to reduce the possibility that the highlight portion is not cut and the image quality is significantly deteriorated due to overexposure due to color correction.
[0054]
On the other hand, the saturation correction corrects the color difference of each pixel to a color difference represented by the following equation.
u ′ = S sys / 100 × u (5)
Here, u is a color difference vector (Cb, Cr) before correction.
u ′ is the corrected color difference vector (Cb ′, Cr ′)
[0055]
Sharpness Sharpness uses a process called unsharp mask (USM). Details of USM are omitted. The USM has three parameters of an application radius R sys , an application amount V sys , and a threshold value Th sys , and the USM designation window 206 also has a slider for adjusting these three parameters. FIG. 11 shows details of the USM designation window 206.
[0056]
Automatic correction In the present embodiment, automatic image correction automatically sets correction parameters using image feature amounts such as a histogram and shooting conditions such as Exif information. In the Exif information, “standard”, “landscape”, “person”, and “night view” are prepared as shooting modes. This information holds the camera mode set by the user at the time of shooting, and is useful for setting the correction parameter more favorably.
[0057]
In addition, by calculating the correction parameter using an expression that incorporates the shooting conditions such as the exposure time and the f value, correction close to the photographer's intention can be performed. For example, if the f value is large, it is expected to be close to pan focus. In such a case, it is conceivable to increase the sharpness. In addition, by using a guide number indicating the flash emission amount, an ISO sensitivity indicating exposure sensitivity, a subject distance that is a distance to the subject, an f value at the time of photographing, and a 35 mm film equivalent focal length at the time of photographing, the flash is applied to the subject. It is possible to calculate whether or not the light has arrived and the conditions necessary to reach it. For example, in the case of ISO 100, the relationship between the guide number Gn, the subject distance D, and the aperture f is as follows. For example, when the guide number is smaller than the subject distance, the f value and the ideal f value at the time of shooting are calculated. It can be considered to correct the brightness appropriately.
Gn = D × f (6)
[0058]
Hereinafter, a method for automatically setting correction parameters will be described.
[0059]
First, the luminance component noise removal parameter Ny sys calculates an average value of luminance differences between adjacent pixels for the entire image, divides the average value YD AVE by the maximum luminance difference value YD MAX , and further multiplies it by 100. To do.
[0060]
The noise correction parameter Nc sys for the color difference component calculates a difference vector of color difference vectors of adjacent pixels, calculates an average value of the norm of the difference vector over the entire image, and calculates the average value CD AVE as a maximum value CD MAX of the luminance difference. Divide and further multiply by 100.
[0061]
However, since the above process takes a very long time, in this embodiment, Ny sys and Nc sys are obtained by the following equations using the exposure time TE (seconds).
When TE> 1 or the shooting mode “night view”, Ny sys = TE × 2
Otherwise, Ny sys = 0
Nc sys = 0 (7)
[0062]
Of the color correction parameters, the gamma correction parameter G sys is calculated by the following equation using the exposure time TE (seconds).
[0063]
(Automatic correction / strong)
When TE <30, G sys = 1.4−TE / 75
In other cases, G sys = 1.0 (8)
(Automatic correction, weak)
When TE <30, G sys = 1.2−TE / 150
In other cases, G sys = 1.0 (9)
Of the color correction parameters, the black level correction parameter Bk sys is calculated by the following equation using the exposure time TE (seconds).
If TE <0.03 or shooting mode "Landscape"
Bk sys = C user × α + β + √f
0.03 ≦ TE <1 or when the shooting mode is other than “landscape” and “night view”
Bk sys = C user × α + β
If TE ≧ 1 or the shooting mode is “Night view”,
Bk sys = C user × α (10)
here,
[0064]
In equation (10), f is the f value obtained from the shooting information, but this term is ignored if there is no shooting information because the image data to be corrected is not Exif-compliant. The values of α and β are expressed by the following equations.
[0065]
(Automatic correction / strong)
α = 3
If hist (Bk HIGH ) <Bk Value HIGH , β = hist (Bk HIGH )
In other cases, β = hist (Bk Value HIGH )
(Automatic correction, weak)
α = 2
If hist (Bk LOW ) <Bk Value LOW , β = hist (Bk LOW )
In other cases, β = hist (Bk Value LOW ) (11)
Here, hist (Bk HIGH ) and hist (Bk LOW ) represent the luminance of the brightest or darkest pixel among the selected pixels by selecting a predetermined percentage (n%) of pixels in order of increasing luminance. For example, Bk HIGH = 13, Bk LOW = 4, etc. Bk Value HIGH and Bk Value LOW are constants for preventing excessive black level correction. In this embodiment, Bk Value HIGH = 40 and Bk Value LOW = 20, respectively.
[0066]
Of the color correction parameters, the brightness correction parameter L sys is calculated by the following equation using the average luminance L ave of the entire image.
When L ave −128> L limit ,
L sys = P mode × a + L limit
| L ave −128 | <L limit ,
L sys = P mode × a + 128 − L ave
128-L ave > L limit ,
L sys = P mode × a −L limit (12)
[0067]
L limit is a constant value that does not apply excessive brightness correction. The variable P mode represents the state of whether or not the shooting mode is “person”. If the “person” mode, P mode = 1, otherwise P mode = 0. In the case of automatic correction / strong, L limit = 16 and a = 3, and in the case of automatic correction / weak, L limit = 8 and a = 2. However, when the exposure time is 1 second or longer or the shooting mode is “night view”, L sys = 0 is set regardless of the value of L ave .
[0068]
It is said that a person is slightly overexposed. By using Expression (12), it is possible to perform appropriate correction without performing complicated processing such as face detection.
[0069]
As described above, there are three parameters of the sharpness correction parameter, the application radius R sys , the application amount V sys , and the threshold value Th sys. In the automatic correction of this embodiment, only the application amount V sys is automatically set by the following equation , Apply radius R sys = 1 and threshold Th sys = 0.
If TE> 1 or the shooting mode is "Night view"
V sys = USM MAX Value -TE
Otherwise,
V sys = USM MAX Value (13)
[0070]
The USM MAX Value is the maximum USM application amount, which is 80 for automatic correction / strong and 50 for automatic correction / weak. If the value of V sys becomes negative, V sys = 0.
[0071]
In this way, appropriate image correction can be performed using the Exif information.
[0072]
Second Embodiment
The image processing apparatus according to the second embodiment of the present invention will be described below. Note that in the present embodiment, the same reference numerals are given to substantially the same configurations as those in the first embodiment, and the detailed description thereof is omitted.
[0073]
In the first embodiment, an example in which the entire image is simply color-corrected and presented to the user has been described. However, image processing of the entire image often takes time, and only the portion displayed on the screen is processed. Is more realistic. In the second embodiment, an example will be described in which only the portion displayed on the screen is subjected to image processing and presented to the user.
[0074]
FIG. 12 is a diagram for explaining the processing when displaying the entire image. When the size of the correction target image is larger than the display area 203, all corrections are applied after the correction target image is reduced to a size inscribed in the display area 203. Conversely, if the size of the correction target image is smaller than the display area 203, after all the correction processes are applied, the enlargement process is performed immediately before display. Various methods can be applied to the enlargement / reduction algorithm, but a detailed description thereof will be omitted.
[0075]
FIG. 13 is a diagram for explaining processing when a partial image is displayed. When the size of the correction target image is larger than the display area 203, a partial image having a size inscribed in the display area 203 is extracted from the correction target image, and all corrections are applied to the partial image and displayed on the display area 203. On the other hand, if the size of the correction target image is smaller than the display area 203, all the correction processes are applied and then displayed at a predetermined position in the display area 203, for example, at the center of the display area 203.
[0076]
Such processing makes it possible to present the correction result to the user more smoothly. Here, in the system in which the correction process is applied after the reduction process shown in FIG. 12, there are correction processes with different results depending on whether the correction process is applied to the correction target image itself or the reduced image. For example, USM used for sharpness is synonymous with the fact that when the radius used for processing is specified in units of pixels, the radius is virtually enlarged by the reduction processing. In such a case, it is conceivable to reduce the USM application radius in accordance with the reduction ratio. For example, the USM applicable radius R sys ′ is calculated by the following equation using the correction parameter R sys .
R sys ' = R sys × Dux (14)
Where Dux = Width view / Width orig
Width orig is the width of the image (in pixels)
Width view is the width of the image after scaling (in pixels)
[0077]
[Third Embodiment]
In the second embodiment, the speeding up of the process described in the first embodiment has been described. In the third embodiment, a method of processing at a higher speed will be described.
[0078]
For example, if the size of the correction target image is larger than the display area 203 during partial display, the partial image is always extracted in the second embodiment when the partial image displayed in the display area 203 is changed by operating a scroll bar or the like. Then, all image processing is applied and the result is displayed. When image correction is realized by hardware, there is a high possibility that a sufficient speed can be obtained even by the processing of the second embodiment. However, when image correction is realized by software, the scroll speed may be slow, or smooth scrolling may not be possible.
[0079]
Therefore, some image corrections such as noise removal and sharpness may be omitted during the size change process of the correction target image in the entire image display and the display area change process in the scroll operation when displaying the partial image. It is done.
[0080]
FIG. 14 is a block diagram showing a configuration example of image processing that can omit noise removal and sharpness. The switches SW 711 to 719 are turned on when any of the following skip conditions is satisfied, and skip noise removal and sharpness.
(1) During the resizing operation of the window including the display area 203 (2) During the scroll operation when displaying the partial image. That is, when the mouse is moved while the mouse button is pressed on the display area 203, or the scroll bar is being operated.
[0081]
In the event-driven system, when an event corresponding to the condition (2) is sent, the switches SW 711 to 719 are turned on to skip a part of the correction process. Otherwise, it is conceivable that the CPU 101 performs a skip process shown in FIG.
[0082]
First, it is checked whether any of the above step conditions is satisfied (S1501). If any of the skip conditions is satisfied, switches SW711 to 719 shown in FIG. 14 are turned on to skip the correction process (S1502). Then, the skip condition is checked again (S1504). If any skip condition is satisfied, the process returns to step S1502, and steps S1502 and S1504 are repeated.
[0083]
If neither skip condition is satisfied in step S1501 or S1504, all correction processes are applied (S1505), and the process is terminated.
[0084]
In this way, in consideration of the low necessity of presenting the correction result to the user during scrolling and resizing, a part of the correction process can be omitted to provide the user with a more comfortable GUI operation. .
[0085]
[Fourth Embodiment]
In the fourth embodiment, a process for printing an image corrected using the above-described GUI will be described.
[0086]
In the printing process, the image signal obtained by performing the image correction in the system shown in FIG. 7 is enlarged to an image size matched to the printing data determined by the printing resolution, regardless of the form of the image processing unit described above. Reduce the size to create a print image, and convert it to an image signal for printing such as CMYK. At this time, the same correction parameter may be applied regardless of the print size, but it is conceivable to correct the correction parameter according to the print output size. In general, when printing on a small recording paper such as an L size, for example, contrast tends to appear higher even when printing with the same data than when printing on a large recording paper such as an A4 size. Thus, for example, it is conceivable to correct the correction parameter according to the area of the recording paper.
[0087]
In the fourth embodiment, the contrast is corrected using the area ratio α when the area of the L size is 1. Specifically, among the histogram change parameters, the black level Bk sys is corrected to adjust the contrast. In addition, the USM application amount V sys is corrected among the correction parameters for the sharpness processing. The black level Bk prt at the time of printing and the application amount V prt at the time of printing are as follows.
B prt = α × Bk sys (15)
V prt = (100 + α) × V sys / 100 (16)
[0088]
By correcting the correction parameter in this way, the difference in impression due to the print output size can be reduced.
[0089]
As described above, according to each of the above-described embodiments, it is possible to perform image correction that appropriately reflects the camera settings at the time of shooting using the numerical values themselves of the shooting information stored as metadata. .
[0090]
In addition, it is possible to present the image correction result to the user in real time and perform appropriate image correction without being aware of the processing order. In addition, it is possible to adjust arbitrary parameters for the automatic correction result reflecting the user's preference.
[0091]
[Other Embodiments]
Note that the present invention can be applied to a system including a plurality of devices (for example, a host computer, an interface device, a reader, and a printer), and a device (for example, a copying machine and a facsimile device) including a single device. You may apply to.
[0092]
Also, an object of the present invention is to supply a storage medium (or recording medium) that records a program code of software that realizes the functions of the above-described embodiments to a system or apparatus, and to perform computer (or CPU or CPU) of the system or apparatus. Needless to say, this can also be achieved when the MPU) reads and executes the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also an operating system (OS) running on the computer based on the instruction of the program code. It goes without saying that a case where the function of the above-described embodiment is realized by performing part or all of the actual processing and the processing is included.
[0093]
Furthermore, after the program code read from the storage medium is written into a memory provided in a function expansion card inserted into the computer or a function expansion unit connected to the computer, the function is based on the instruction of the program code. It goes without saying that the CPU or the like provided in the expansion card or the function expansion unit performs part or all of the actual processing and the functions of the above-described embodiments are realized by the processing.
[0094]
When the present invention is applied to the storage medium, the storage medium stores program codes corresponding to the flowcharts described above.
[0095]
【The invention's effect】
As described above, according to the present invention, it is possible to perform correction according to additional information added to image data.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an outline of a system according to an embodiment;
FIG. 2 is a diagram showing an example of a graphical user interface (GUI) for image correction displayed on a monitor;
FIG. 3 is a diagram showing a detailed button arrangement example of the toolbar 202;
FIG. 4 is a view showing an example of a display window for image information;
FIG. 5 is a diagram showing an example of an option window;
FIG. 6 is a diagram showing a detailed example of a status bar;
FIG. 7 is a block diagram showing a configuration example of image processing;
FIG. 8 is a diagram showing a detailed example of a noise removal designation window;
FIG. 9 is a diagram showing a detailed example of a color correction window;
FIG. 10 is a diagram showing a procedure for luminance correction;
FIG. 11 is a diagram showing details of a USM designation window;
FIG. 12 is a diagram for explaining processing when displaying the entire image;
FIG. 13 is a diagram for explaining processing when displaying a partial image;
FIG. 14 is a block diagram illustrating a configuration example of image processing that can omit noise removal and sharpness;
FIG. 15 is a flowchart showing skip processing.

Claims (12)

入力される画像データに付加された付加情報を取得し、
取得した付加情報が示す画像取得時の情報を用いて、前記入力画像データを補正することを特徴とする画像処理方法。
Acquire additional information added to the input image data,
An image processing method, wherein the input image data is corrected using information at the time of image acquisition indicated by the acquired additional information.
さらに、補正した画像データに基づき画像を印刷することを特徴とする請求項1に記載された画像処理方法。The image processing method according to claim 1, further comprising printing an image based on the corrected image data. さらに、印刷に使用する媒体のサイズや種類に応じて、前記画像処理パラメータを調整することを特徴とする請求項1に記載された画像処理方法。The image processing method according to claim 1, further comprising adjusting the image processing parameters in accordance with a size and type of a medium used for printing. 前記媒体のサイズが大きいほどコントラストを強調するように前記画像処理パラメータを調整することを特徴とする請求項3に記載された画像処理方法。4. The image processing method according to claim 3, wherein the image processing parameter is adjusted so that the contrast is enhanced as the size of the medium is larger. 前記媒体のサイズが大きいほどシャープネスを強くするように前記画像処理パラメータを調整することを特徴とする請求項3に記載された画像処理方法。The image processing method according to claim 3, wherein the image processing parameter is adjusted so that sharpness increases as the size of the medium increases. 前記媒体のサイズが大きいほどノイズ除去を強くするように前記画像処理パラメータを調整することを特徴とする請求項3に記載された画像処理方法。The image processing method according to claim 3, wherein the image processing parameter is adjusted so that noise removal becomes stronger as the size of the medium is larger. 前記画像取得時の情報は、少なくとも画像撮影時の露光時間、絞り値(f値)、フラッシュ強度(ガイドナンバ)、被写体距離、焦点距離およびISO感度の何れかであることを特徴とする請求項1に記載された画像処理方法。The information at the time of image acquisition is at least one of an exposure time at the time of image shooting, an aperture value (f value), a flash intensity (guide number), a subject distance, a focal length, and an ISO sensitivity. The image processing method according to 1. 前記画像処理には、少なくとも色調・彩度補正、シャープネス、ノイズ除去、色かぶり補正、ぼかし、セピア調化、モノトーン化、ソラリゼーションおよびエンボスの何れかが含まれることを特徴とする請求項1に記載された画像処理方法。2. The image processing according to claim 1, wherein the image processing includes at least one of color tone / saturation correction, sharpness, noise removal, color cast correction, blurring, sepia tone conversion, monotone conversion, solarization, and embossing. Image processing method. 前記補正は、予め順序が定められた複数の画像処理で構成されることを特徴とする請求項1から請求項8の何れかに記載された画像処理方法。9. The image processing method according to claim 1, wherein the correction is configured by a plurality of image processes having a predetermined order. 入力される画像データに付加された付加情報を取得する取得手段と、
取得した付加情報が示す画像取得時の情報を用いて、前記入力画像データを補正する補正手段とを有することを特徴とする画像処理装置。
An acquisition means for acquiring additional information added to input image data;
An image processing apparatus comprising: correction means for correcting the input image data using information at the time of image acquisition indicated by the acquired additional information.
請求項1から請求項9の何れかに記載された画像処理を画像処理装置に実行させることを特徴とするプログラム。A program causing an image processing apparatus to execute the image processing according to any one of claims 1 to 9. 請求項11に記載されたプログラムが記録されたことを特徴とする記録媒体。A recording medium on which the program according to claim 11 is recorded.
JP2003169931A 2003-06-13 2003-06-13 Image processor and its method Withdrawn JP2005006213A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2003169931A JP2005006213A (en) 2003-06-13 2003-06-13 Image processor and its method
US10/865,793 US7433079B2 (en) 2003-06-13 2004-06-14 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003169931A JP2005006213A (en) 2003-06-13 2003-06-13 Image processor and its method

Publications (1)

Publication Number Publication Date
JP2005006213A true JP2005006213A (en) 2005-01-06

Family

ID=34094920

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003169931A Withdrawn JP2005006213A (en) 2003-06-13 2003-06-13 Image processor and its method

Country Status (1)

Country Link
JP (1) JP2005006213A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007108969A (en) * 2005-10-13 2007-04-26 Brother Ind Ltd Recording device and control program for recording device
JP2008061217A (en) * 2006-07-31 2008-03-13 Ricoh Co Ltd Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP2011248477A (en) * 2010-05-24 2011-12-08 Canon Inc Image processing device and image processing method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007108969A (en) * 2005-10-13 2007-04-26 Brother Ind Ltd Recording device and control program for recording device
JP2008061217A (en) * 2006-07-31 2008-03-13 Ricoh Co Ltd Image processing apparatus, imaging apparatus, image processing method, and image processing program
JP2011248477A (en) * 2010-05-24 2011-12-08 Canon Inc Image processing device and image processing method
US9052742B2 (en) 2010-05-24 2015-06-09 Canon Kabushiki Kaisha Image processing apparatus and image processing method
US9704221B2 (en) 2010-05-24 2017-07-11 Canon Kabushiki Kaisha Image processing apparatus and image processing method

Similar Documents

Publication Publication Date Title
US7751640B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US7756343B2 (en) Image processing method, image processing apparatus, and computer-readable recording medium storing image processing program
US8107764B2 (en) Image processing apparatus, image processing method, and image processing program
US8068645B2 (en) Apparatus, method, and program for image processing
JP4767718B2 (en) Image processing method, apparatus, and program
US7848588B2 (en) Method and apparatus for judging direction of blur and computer-readable recording medium storing a program therefor
US20060291739A1 (en) Apparatus, method and program for image processing
US8391646B2 (en) Image processing device and method that performs image quality adjustment and resize processing on image data
US7433079B2 (en) Image processing apparatus and method
JP2007194917A (en) Setting of effect processing suitable for photographing scene of image
JP2006295303A (en) Image processing method, apparatus and program
US20070014483A1 (en) Apparatus, method and program for image processing
JP4739256B2 (en) Image processing apparatus and method, and program
JP4012079B2 (en) Image processing apparatus, image processing method, and program
JP2006350769A (en) Image processing device, method and program
JP2005102153A (en) Image processing apparatus, method and program
JP2006350462A (en) Album image preparation device and album image preparation program
JP4766644B2 (en) Image processing method and image processing apparatus
JP2003060935A (en) Output image adjustment method for image file
JP2005006213A (en) Image processor and its method
JP2005102154A (en) Image processing apparatus, method and program
JP2004215005A (en) Apparatus and method for processing image and for judging scene, and program
JP4666009B2 (en) Output image adjustment for image files
JP2009004951A (en) Image processing device, method, and program
JP3999157B2 (en) Output image adjustment for image files

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20060905