JP4096613B2 - Image processing method and image processing apparatus - Google Patents
Image processing method and image processing apparatus Download PDFInfo
- Publication number
- JP4096613B2 JP4096613B2 JP2002135160A JP2002135160A JP4096613B2 JP 4096613 B2 JP4096613 B2 JP 4096613B2 JP 2002135160 A JP2002135160 A JP 2002135160A JP 2002135160 A JP2002135160 A JP 2002135160A JP 4096613 B2 JP4096613 B2 JP 4096613B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- image processing
- value
- luminance
- output
- 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
- 238000012545 processing Methods 0.000 title claims description 64
- 238000003672 processing method Methods 0.000 title description 8
- 230000002093 peripheral effect Effects 0.000 claims description 29
- 238000006243 chemical reaction Methods 0.000 claims description 17
- 239000002131 composite material Substances 0.000 claims 1
- 238000009499 grossing Methods 0.000 claims 1
- 238000000034 method Methods 0.000 description 19
- 238000010586 diagram Methods 0.000 description 17
- 230000000007 visual effect Effects 0.000 description 17
- 238000012937 correction Methods 0.000 description 16
- 230000008569 process Effects 0.000 description 13
- 230000000694 effects Effects 0.000 description 5
- 230000008859 change Effects 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 238000001914 filtration Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000001186 cumulative effect Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Picture Signal Circuits (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、デジタルカメラ等で得られたデジタル画像の濃淡を自動的に調整して、所望のコントラスト得ることができる画像処理方法及び装置に関するものである。
【0002】
【従来の技術】
デジタルカメラで撮影されたカラー画像は、撮像素子であるCCD素子で得られたアナログ値におけるノイズ割合を表すSNレベルやアナログ値をデジタル値に変換する際の変換精度等の影響で、実際に撮影された自然画像の持つ画素濃度のダイナミックレンジよりも狭いレンジに制限されるため、影がかかった細部での情報が損失する現象が発生する傾向がある。特に画像内に明るい領域と暗い領域が混在するようなサンプルを撮影しようとした場合にその傾向は大きい。
【0003】
その改善として、デジタル画像の輝度等の範囲をより輝度の高い画像部分からより輝度の低い画像部分までに拡げるように、コントラスト強調を行う手法がまず考えられる。そのコントラスト強調の従来手法としては、原画像を構成する全画素の輝度値の分布状態を示すヒストグラムを作成し、ヒストグラムの累積曲線を輝度変換曲線として原画像中の画素の輝度値を新な輝度値に変換し、画像のコントラストを強調するヒストグラム均等化手法がある。この手法は、原画像全領域の画素の輝度を同一の輝度変換曲線で新たな輝度に変換するために、部分的にはかえってコントラストが低下してしまう部分が生じることがある。
【0004】
また、人間の知覚特性を利用して暗部における明度表現を改善する手法(例えば、国際公開番号WO97/45809、日本では特表2000-511315公表特許公報)が提案されている。図10にその構成を示す。なお、ここではグレースケール画像を例に説明するが、カラー画像に対しても拡張することができる。画像の(x,y)における画素値I(x,y)はプロセッサ301及びフィルタ302によって調整されフィルタリング処理が行われる。
【0005】
画素ごとに、プロセッサ301は、(数1)のような調整画素値I'(x,y)を算出する。ここで、F(x,y)は周辺視野を表す周辺視野関数であり、「*」は畳み込み演算処理を示す。
【0006】
そして、F(x,y)が(数2)の条件を満足するように正規化係数Kが決定されており、これにより(数1)の第2項は、周辺視野における画素値の平均値に相当する。つまり、(数1)は大きな領域における画素値平均値に対する各画素の画素値の比率を対数変換したものに相当する。周辺視野関数F(x,y)は、人間の視覚モデルとの対応から対象画素に近づくほど寄与する割合が高いように設計されており、(数3)のようなガウス関数が適用される。ここでcは各画素値I(x,y)の調整画素値I'(x,y)をコントロールするための定数であり、*は畳み込み積分(Convolution)を表す。
【0007】
【数1】
【0008】
【数2】
【0009】
【数3】
【0010】
以上のように、この従来の発明では周辺視野での平均画素値に対する対象画素値を調整された画素値I'(x,y)として算出し、この値に対して、フィルタ302はディスプレイ303によって使用されるレティネックス出力R(x,y)を生成するフィルタ処理を行う。フィルタ302はI'(x,y)を対数領域からディスプレイ303で扱われるR(x,y)の画素値領域へ変換するものであり、処理の簡便化のために全ての画素に対して同一のオフセット及び利得変換関数を適用する処理が用いられる。
【0011】
【発明が解決しようとする課題】
しかしながら、撮像装置の入力特性が非線形歪みを持つ場合、明るさによって処理する調整効果が変化する。結果、撮影対象を選ぶという問題点がある。さらに、(数1)の対数演算は、画像内の明るさに対する依存性が強いといった問題がある。
【0012】
この対数演算による明るさの依存性を改善する方法として、H.Koteraらは線形レティネックスモデルを用いた手法(例えば、Color Forum Japan p.151-153(2001))を発表している。しかし、画像の濃淡値を自動で調整するには、撮像装置の入力特性、画像データのγ値を含めて、明るさによる画像依存性を小さくする必要がある。
【0013】
本発明はかかる点に鑑みてなされたものであり、撮像画像対象に依存せず、自動的に画像の濃淡値を調整できる画像処理方法および装置を提供することを目的とする。
【0014】
【課題を解決するための手段】
画像データを入力する画像処理装置において、上記課題を解決するために本発明の第1の画像処理装置は、入力した該画像データの非線形歪が小さくなるように補正する信号補正手段と、補正後の信号に対して、着目画素の画素値とその周辺分布領域の濃淡値との相対比を算出する相対比算出手段と、該相対比から着目画素に対応する処理対象画素の画素値を決定して出力する出力手段とを有する。
【0015】
また、着目画素の画素値とその周辺分布領域の濃淡値との相対比を用いて、入力画像の濃淡値を調整する画像処理装置において、上記課題を解決するために本発明の第2の画像処理装置は、着目画素の画素値とその周辺分布領域の濃淡値との相対比を、対象となる周辺視野領域を異ならせて算出する相対比算出手段と、ゲイン係数を算出するゲイン係数算出手段と、該相対比に、所定の重み係数と該ゲイン係数をそれぞれ乗じ、合成値を算出する相対比合成手段と、該合成値から着目画素に対応する処理対象画素の画素値を決定して出力する出力手段とを有する。また、ゲイン係数は、対象とする該周辺分布領域の大きさに応じて算出する。
【0016】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照しながら説明する。
【0017】
(第1の実施の形態)
まず、本発明の第1の実施の形態である画像処理装置について説明する。図1は本発明の第1の実施の形態である画像処理装置のブロック図である。また、図2(A)は本発明の第1の実施の形態である画像処理装置の入力装置100の説明図、図2(B)は本発明の第1の実施の形態である画像処理装置の歪み補正回路1の説明図、図3は本発明の第1の実施の形態である画像処理装置の出力変換回路3の説明図、図4は本発明の第1実施の形態である画像処理装置の周辺輝度算出回路4の説明図である。なお、構成図の各図において、同一部には同じ番号を付している。また、これ以降で、画素位置(x,y)の単位には全て画素単位が用いられることする。
【0018】
図1において、画像入力装置100として、例えば、デジタル・スチル・カメラ(以後、DSCと記す)を用いる。その出力G(x,y)の画像の明るさに対する信号歪みを、歪み補正回路1で補正を行い、その後、注視点I(x,y)とその周辺分布との明るさの相対比R(x,y)を計算する。周辺分布の明るさは、周辺輝度算出回路4により算出される。相対比R(x,y)は、出力変換回路3により最終の信号レベル(例えば、8ビットの0から255の信号レベル)に変換される。
【0019】
sRGB準拠の画像データやDSC画像データには、CRTディスプレイの発光特性の非線形性を予め補償するためにガンマ補正が加えられている。図2(A)に図示する曲線Aのような非線形な画像データに対し濃度調整を行う場合、撮影画像の明るさに対して画像処理の処理効果が違ってくる。これは、入力(X1)付近での明るさに対する変化度(Δy1/ΔX)と、入力(X2)での明るさに対する変化度(Δy2/ΔX)が異なるためである。この変化度の違いにより、画像に対する依存性が大きくなってしまう。DSC等の撮影画像に対し、自動的に濃度調整を行うには、画像に対する依存度が小さいほどよく、安定した画質が得られる。
【0020】
そこで、図2(B)に図示するように、曲線Aの歪みをキャンセルするように、曲線Bの歪み補正を行えば、よりリニアな出力が得られる。例えば、sRGB、DSC等でγ=1/2.2に設定されていれば、画像データに対し、出力=(Vi1/2.2)2.2 =Viと逆γ=2.2の補正を歪み補正回路1で行うことで、リニアなオリジナル画像信号Viが出力として得られる。ここでは、逆γ変換により、リニアな信号に変換したが、入力信号が持つ非線形歪みを小さくすれば良く、同様の効果が得られる。よって、変換される値がリニアに限定されない。
【0021】
周辺輝度算出回路4は、歪み補正された出力I(x,y)から、(数4)(数5)(数6)により注視点の周辺分布の明るさB[x,y]を算出する。ここで、*は畳み込み積分(Convolution)を表す。
【0022】
【数4】
【0023】
【数5】
【0024】
【数6】
【0025】
画像処理回路2は、(数7)を用いて、線形レティネックス出力R(x,y)を算出する。
【0026】
【数7】
【0027】
出力変換回路3は、図3に図示するようにR(x,y)の出力から所定の上限、下限の範囲を設定し、その範囲を所定の出力信号レベル(例えば、8bitの0〜255の信号レベル)に正規化して、ディスプレイ、プリンタ等に出力する。
【0028】
この線形レティネックスモデルでは、log変換を含まないため、高速な処理が可能である。また、画像中の明るさに対する出力変化が、どの明るさでも一定のため、画像依存性が小さい。
【0029】
なお、周辺視野関数F(x,y)は、人間の視覚モデルとの対応から対象画素に近づくほど寄与する割合が高いガウス関数を用いたが、もともとボケ画像の明るさを算出するので、特性がフラットな矩形フィルタで代用してもよい。矩形フィルタを使用することで、処理速度を向上できる。
【0030】
また、線形モデルでは、基準輝度(A値)付近に出力画像の輝度を収束させる効果があり、白色、あるいは、白色に近い色の領域では、輝度が下がり、灰色として、知覚され、不自然さを感じる。そこで、図4に図示するように、曲線500の一定の輝度値SL以上をクリップして丸め込む(曲線501)ことで、ハイライト領域の輝度低下を防止する。結果、R(x,y)は(数8)ように改良される。
【0031】
【数8】
【0032】
この輝度値の丸め処理プロセスをBAR(Blur After Round)プロセスと称する。なお、丸めのプロセスは(数9)のように、一旦、入力画像データI(x,y)とF(x,y)との畳み込み積分を行い、その出力に対してクリップ操作してもよい。この輝度値の丸め処理プロセスをBBR(Blur Before Round)プロセスと称する。
【0033】
【数9】
【0034】
図8に本発明の第1の実施の形態である画像処理装置の処理のフローチャート図を示す。図8において、ステップS101では入力画像データの歪みを補正する。DSCの画像データ歪みとは、sRGB準拠によるディスプレイγ値の歪み、CCD特性の歪み等である。ステップS103では歪み補正された画像データに対し、注視点(Center)とその周辺領域(Surround)との明るさの相対比を算出する。ステップS105では、算出し相対比を上限、下限で制限し、そのクリッピング範囲に対して最終の信号レベルを割り当てるように変換する。例えば、8ビットの0から255の信号レベルに割り振り、ディスプレイ、プリンタ等に出力する。ディスプレイの輝度特性を考慮する場合は、γ=1/2.2値を乗じて出力する。これにより、視覚的に輝度リニアな特性が得られる。ステップS107では、すべての画像データの処理が完了したかを判断し、完了の場合は処理を終了する。完了していない場合は、ステップS101に戻り、繰り返し処理を実行する。
【0035】
以上のように、本発明の第1の実施の形態である画像処理方法及び装置よれば、処理系にlog変換を含まず、さらには、画像データの非線形歪みを小さくなるように補正することで、どの明るさのレベルでも同じような処理結果を得ることができる。結果、画像依存性が少なく、画像の暗部の画質調整を自動で調整できる。さらには、入力画像データの一定の輝度値以上をクリップして丸め込むことで、ハイライト領域の輝度の低下を防止する。
【0036】
(第2の実施の形態)
次に、本発明の第2の実施の形態である画像処理装置について説明する。図5は本発明の第2の実施の形態である画像処理装置のブロック図である。また、図6は本発明の第2の実施の形態である画像処理装置の周辺輝度算出回路9の説明図、図7は本発明の第2の実施の形態である画像処理装置のゲイン係数算出回路7の説明図である。なお、構成図の各図において、同一部には同じ番号を付している。また、これ以降で、画素位置(x,y)の単位には全て画素単位が用いられることする。
【0037】
図5において、画像入力装置100として、例えば、デジタル・スチル・カメラ(以後、DSCと記す)を用いる。その出力G(x,y)の画像の明るさに対する信号歪みを、歪み補正回路1で補正を行い、その後、注視点I(x,y)とその周辺分布との明るさの相対比R(x,y)を計算する。カラーバランスを考慮して、単色化処理回路5でカラー信号を(数10)のように単色化して、単色化信号Y(x,y)から周辺輝度算出回路9により周辺分布の明るさが算出される。第2画像処理回路では、Ii(x,y)/{Fs(x,y)*Y(x,y)}に重み係数Wsとゲイン係数A(σs)を掛け合わせて合成した(数11)の相対比R(x,y)を出力する。合成された相対比R(x,y)は出力変換回路3により最終の信号レベル(例えば、8ビットの0から255の信号レベル)に変換される。ここで、Ws=1/M、A( σ s)= σs / σ Mである。
【0038】
【数10】
【0039】
【数11】
【0040】
周辺輝度算出回路9では、複数の視野関数Fs(x,y)出力を算出し、第2画像処理回路8で、異なる複数の視野関数Fs(x,y)出力から明るさの相対比を合成することで、画像依存性の少ないR(x,y)を算出できる。
【0041】
視野関数Fs(x,y)は人間の視覚モデルとの対応から対象画素に近づくほど寄与する割合が高いガウス関数を用いても良いし、もともとボケ画像の明るさを算出するので、特性がフラットな矩形フィルタで代用してもよい。矩形フィルタとして、図6に図示するように対象とする画像領域のサイズが異なるフィルタ200〜フィルタ203を用いる。図7に、σs値とゲイン係数Aとの関係を示す。ゲイン係数算出回路7は、σs値に応じて、ゲイン係数Aを算出する。
【0042】
図9に本発明の第2の実施の形態である画像処理装置の処理のフローチャート図を示す。図9において、ステップS201〜ステップS211は、図8に本発明の第1の実施の形態である画像処理装置のフローチャート図のステップS103の明るさの相対比を算出する部分の改良である。また、カラーに拡張したものである。ステップS201では歪み補正されたカラー画像データに対し、カラーバランスを考慮して、単色化処理を行う。単色信号Y(x,y)は、Y(x,y)=Kr×Ir(x,y)+Kg×Ig(x,y)+Kb×Ib(x,y)、Kr=0.299、Kg=0.587、Kb=0.114となる。
ステップS203では、単色信号Y(x,y)から、異なる複数の視野関数Fs(x,y)を計算する。ステップS205では視野関数Fs(x,y)の領域の大きさに応じてゲイン係数A(σs)を計算する。例えば、A( σ s)= σs / σ M である。
【0043】
ステップS207では視野関数Fs(x,y)の数Mによって均等分割された重み係数Ws値(Ws=1/M)を計算する。ステップS209ではIi(x,y)/{Fs(x,y)*Y(x,y)}に重み係数Wsとゲイン係数A(σs)を掛け合わせた明るさの相対比を計算する。ステップS211では、(数11)によって、明るさの相対比を合成した値を計算する。以上の処理が終了した時点で、図8に本発明の第1の実施の形態である画像処理装置のフローチャート図のステップS105に進み、合成された相対比を最終の信号レベルに変換する。例えば、8ビットの0から255の信号レベルでディスプレイ、プリンタ等に出力される。ディスプレイの輝度特性を考慮する場合は、γ=1/2.2値を乗じて出力する。これにより、視覚的に輝度リニアな特性が得られる。ステップS107では、すべての画像データの処理が完了したかを判断し、完了の場合は処理を終了する。完了していない場合は、ステップS101に戻り、繰り返し処理を実行する。ステップS103を実行する段階で、ステップS201に移行する。
【0044】
なお、ゲイン係数算出回路7は、σs値に応じたゲイン係数A(σs)を、ボケ画像Ss(x,y,σs)={Fs(x,y)*Y(x,y)}とした時の画像中の最大値Smax(s)と最小値Smin(s)から算出しても良い。例えば、A(σs)=Smin(s)/Smin(M)、A(σs)=1−0.5×{Smin(s)+Smax(s)}、A(σs)=1−Smax(s)等である。ここで、Mは視野関数Fsの数である。
【0045】
以上のように、本発明の第2の実施の形態である画像処理方法及び装置よれば、複数の視野関数複数の視野関数Fs(x,y)出力を算出し、異なる複数の視野関数Fs(x,y)出力から得られる明るさの相対比を合成するので、画像依存性の少ない相対比R(x,y)を算出できる。
【0046】
また、相対比の算出には、カラー画像を一旦、単色化して、そのボケ画像を使用するので、R,G,Bを独立して別々に相対比を算出するよりカラーバランスを保持できる。結果、画像の暗部の見えを改善しながら、画像依存することなく、画像中の濃度値を自動で調整できる。
【0047】
なお、上記した実施の形態1および2においては、画像入力手段から入力された全ての画像データに対して、信号補正手段(歪み補正回路)により、非線形性が小さくなるように補正するように構成していたが、これに限定されるものではない。
【0048】
すなわち、歪み補正は、非線形な歪み、明るさに対しカンマ値を有するデバイス、または画像ファイルに適用すれば良く、線形なデバイス、ガンマ補正の必要ない画像ファイルでは適用する必要はない。このため、予め、デバイスに非線形な歪みが存在するのか、あるいは画像ファイルにガンマ値が存在するのかを歪み判定手段により判定し、歪みを有する入力画像に対して、歪み補正回路により、歪み補正を選択的に適用するように構成することもできる。この判定情報として、例えば、カメラの画像ファイル規格に記載されているsRBG等のカラースペース情報、ガンマ情報がある。これにより、自動的にデバイス歪み、画像ファイルのガンマ値を補正できる。
【0049】
なお、本発明の処理は、画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。
【0050】
また、外部から通信回線を経由してソフトウェア媒体としてダウンロードを行い、ローカルなコンピュータの中でのソフトウェア処理でも同様に実現することができる。
【0051】
【発明の効果】
以上のように、本発明によれば、撮像画像対象に依存せず、自動的に画像の濃淡値を調整できる。
【0052】
特に、本発明の第1の実施の形態である画像処理方法及び装置よれば、処理系にlog変換を含まず、さらには、画像データの非線形歪みを小さくなるように補正することで、どの明るさのレベルでも同じような処理結果を得ることができる。結果、画像依存性の少ない、画像の暗部の画質調整を自動で行うことができる。さらには、入力画像データの一定の輝度値以上をクリップして丸め込むことで、ハイライト領域の輝度の低下を防止する。
【0053】
また、本発明の第2の実施の形態である画像処理方法及び装置よれば、複数の視野関数複数の視野関数Fs(x,y)出力を算出し、異なる複数の視野関数Fs(x,y)出力から得られる明るさの相対比を合成するので、画像依存性の少ない相対比R(x,y)を算出できる。
【0054】
また、相対比の算出には、カラー画像を一旦、単色化して、そのボケ画像を使用するので、R,G,Bを独立して別々に相対比を算出するよりカラーバランスを保持できる。結果、画像の暗部の見えを改善しながら、画像依存することなく、画像中の濃度値を自動で調整できる。
【図面の簡単な説明】
【図1】本発明の第1の実施の形態である画像処理装置のブロック図
【図2】(A)は本発明の第1の実施の形態である画像処理装置の入力装置100の説明図
(B)は本発明の第1の実施の形態である画像処理装置の歪み補正回路1の説明図
【図3】本発明の第1の実施の形態である画像処理装置の出力変換回路3の説明図
【図4】本発明の第1の実施の形態である画像処理装置の周辺輝度算出回路4の説明図
【図5】本発明の第2の実施の形態である画像処理装置のブロック図
【図6】本発明の第2の実施の形態である画像処理装置の対象領域の説明図
【図7】本発明の第2の実施の形態である画像処理装置のパラメータの説明図
【図8】本発明の第1の実施の形態である画像処理装置の処理のフローチャート図
【図9】本発明の第2の実施の形態である画像処理装置の処理のフローチャート図
【図10】従来例における画像処理装置の構成を表すブロック図
【符号の説明】
1 歪み補正回路
2 画像処理回路
3 出力変換回路
4 周辺輝度算出回路
5 単色化回路
6 重み係数
7 ゲイン係数算出回路
8 第2画像処理回路
300 ディジタル撮像装置
301 プロセッサ
302 フィルタ
303 ディスプレイ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing method and apparatus capable of automatically adjusting the density of a digital image obtained by a digital camera or the like to obtain a desired contrast.
[0002]
[Prior art]
A color image taken with a digital camera is actually taken due to the influence of the SN level that represents the noise ratio in the analog value obtained by the CCD element, which is an image sensor, and the conversion accuracy when the analog value is converted into a digital value. Since the natural image is limited to a range narrower than the dynamic range of the pixel density, there is a tendency that information in details with shadows is lost. This tendency is particularly significant when trying to photograph a sample in which a bright area and a dark area are mixed in the image.
[0003]
As an improvement, firstly, a method of performing contrast enhancement so as to expand the range of the luminance or the like of the digital image from an image portion having a higher luminance to an image portion having a lower luminance can be considered. As a conventional method of contrast enhancement, a histogram showing the distribution of the luminance values of all the pixels that make up the original image is created, and the luminance value of the pixels in the original image is set to a new luminance using the histogram's cumulative curve as the luminance conversion curve. There is a histogram equalization technique that converts to a value and enhances the contrast of the image. In this method, since the luminance of the pixels in the entire original image region is converted to a new luminance using the same luminance conversion curve, a portion where contrast is lowered may occur.
[0004]
In addition, a technique for improving lightness expression in a dark part using human perceptual characteristics (for example, International Publication No. WO97 / 45809, and Japanese Patent Publication No. 2000-511315) is proposed. FIG. 10 shows the configuration. Although a gray scale image is described here as an example, it can be extended to a color image. The pixel value I (x, y) at (x, y) of the image is adjusted by the processor 301 and the
[0005]
For each pixel, the processor 301 calculates an adjusted pixel value I ′ (x, y) as in (Equation 1). Here, F (x, y) is a peripheral visual field function representing the peripheral visual field, and “*” indicates a convolution calculation process.
[0006]
Then, the normalization coefficient K is determined so that F (x, y) satisfies the condition of (Equation 2), whereby the second term of (Equation 1) is the average value of the pixel values in the peripheral visual field. It corresponds to. That is, (Equation 1) corresponds to a logarithmic conversion of the ratio of the pixel value of each pixel to the average pixel value in a large area. The peripheral visual field function F (x, y) is designed so that the contribution ratio increases as it approaches the target pixel from the correspondence with the human visual model, and a Gaussian function like (Equation 3) is applied. Here, c is a constant for controlling the adjusted pixel value I ′ (x, y) of each pixel value I (x, y), and * represents a convolution integral.
[0007]
[Expression 1]
[0008]
[Expression 2]
[0009]
[Equation 3]
[0010]
As described above, in the conventional invention, the target pixel value with respect to the average pixel value in the peripheral visual field is calculated as the adjusted pixel value I ′ (x, y), and the
[0011]
[Problems to be solved by the invention]
However, when the input characteristics of the imaging apparatus have nonlinear distortion, the adjustment effect to be processed changes depending on the brightness. As a result, there is a problem of selecting an object to be photographed. Further, the logarithmic calculation of (Equation 1) has a problem that the dependence on the brightness in the image is strong.
[0012]
H. Kotera et al. Have announced a method using a linear Retinex model (for example, Color Forum Japan p. 151-153 (2001)) as a method for improving the dependency of brightness by logarithmic calculation. However, in order to automatically adjust the gray value of an image, it is necessary to reduce the image dependency due to brightness, including the input characteristics of the imaging device and the γ value of the image data.
[0013]
SUMMARY An advantage of some aspects of the invention is that it provides an image processing method and apparatus capable of automatically adjusting a gray value of an image without depending on a captured image target.
[0014]
[Means for Solving the Problems]
In order to solve the above-described problems, an image processing apparatus for inputting image data includes a signal correction unit for correcting the input image data so as to reduce nonlinear distortion, and a post-correction. Relative ratio calculating means for calculating a relative ratio between the pixel value of the target pixel and the gray value of the surrounding distribution region, and the pixel value of the processing target pixel corresponding to the target pixel is determined from the relative ratio. Output means.
[0015]
Further, in an image processing apparatus that adjusts the gray value of an input image using the relative ratio between the pixel value of the pixel of interest and the gray value of its peripheral distribution region, the second image of the present invention is used to solve the above problem. The processing apparatus includes: a relative ratio calculating unit that calculates a relative ratio between a pixel value of a pixel of interest and a gray value of the peripheral distribution region by changing a target peripheral visual field region; and a gain coefficient calculating unit that calculates a gain coefficient Then, the relative ratio is multiplied by a predetermined weight coefficient and the gain coefficient, respectively, and a relative ratio combining means for calculating a combined value, and a pixel value of a processing target pixel corresponding to the target pixel is determined from the combined value and output. Output means. The gain coefficient is calculated according to the size of the target peripheral distribution region.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0017]
(First embodiment)
First, the image processing apparatus according to the first embodiment of the present invention will be described. FIG. 1 is a block diagram of an image processing apparatus according to the first embodiment of the present invention. 2A is an explanatory diagram of the input device 100 of the image processing apparatus according to the first embodiment of the present invention, and FIG. 2B is an image processing apparatus according to the first embodiment of the present invention. FIG. 3 is an explanatory diagram of the
[0018]
In FIG. 1, for example, a digital still camera (hereinafter referred to as DSC) is used as the image input device 100. The distortion of the signal of the output G (x, y) with respect to the brightness of the image is corrected by the
[0019]
The sRGB-compliant image data and DSC image data are subjected to gamma correction in order to compensate in advance for the nonlinearity of the light emission characteristics of the CRT display. When density adjustment is performed on nonlinear image data such as the curve A illustrated in FIG. 2A, the processing effect of image processing differs with respect to the brightness of the captured image. This is because the degree of change (Δy1 / ΔX) with respect to brightness near the input (X1) is different from the degree of change (Δy2 / ΔX) with respect to brightness at the input (X2). Due to this difference in the degree of change, the dependency on the image increases. In order to automatically adjust the density of a photographed image such as DSC, the smaller the degree of dependence on the image, the better and a stable image quality can be obtained.
[0020]
Therefore, as shown in FIG. 2B, if the distortion of the curve B is corrected so as to cancel the distortion of the curve A, a more linear output can be obtained. For example, if γ = 1 / 2.2 is set in sRGB, DSC, etc., distortion correction circuit corrects output = (Vi 1 / 2.2 ) 2.2 = Vi and inverse γ = 2.2 for the image data. 1 is performed, the linear original image signal Vi is obtained as an output. Here, the signal is converted into a linear signal by inverse γ conversion. However, the nonlinear distortion of the input signal may be reduced, and the same effect can be obtained. Therefore, the value to be converted is not limited to linear.
[0021]
The peripheral
[0022]
[Expression 4]
[0023]
[Equation 5]
[0024]
[Formula 6]
[0025]
The
[0026]
[Expression 7]
[0027]
As shown in FIG. 3, the
[0028]
Since this linear Retinex model does not include log conversion, high-speed processing is possible. Further, since the output change with respect to the brightness in the image is constant at any brightness, the image dependency is small.
[0029]
Note that the peripheral visual field function F (x, y) is a Gaussian function that contributes higher as it approaches the target pixel from the correspondence with the human visual model, but it originally calculates the brightness of the blurred image. May be replaced with a flat rectangular filter. The processing speed can be improved by using the rectangular filter.
[0030]
In addition, the linear model has an effect of converging the luminance of the output image near the reference luminance (A value), and in the area of white or a color close to white, the luminance decreases and is perceived as gray, which is unnatural. Feel. Therefore, as shown in FIG. 4, the luminance of the highlight area is prevented from being lowered by clipping and rounding the
[0031]
[Equation 8]
[0032]
This luminance value rounding process is referred to as a BAR (Blur After Round) process. In the rounding process, as shown in (Equation 9), the input image data I (x, y) and F (x, y) may be temporarily integrated and clipped on the output. . This luminance value rounding process is referred to as a BBR (Blur Before Round) process.
[0033]
[Equation 9]
[0034]
FIG. 8 shows a flowchart of processing of the image processing apparatus according to the first embodiment of the present invention. In FIG. 8, in step S101, distortion of input image data is corrected. The image data distortion of DSC is distortion of display γ value based on sRGB, distortion of CCD characteristics, and the like. In step S103, the relative ratio of the brightness of the gazing point (Center) and the surrounding area (Surround) is calculated for the distortion-corrected image data. In step S105, the calculated relative ratio is limited by an upper limit and a lower limit, and conversion is performed so that the final signal level is assigned to the clipping range. For example, an 8-bit signal level from 0 to 255 is allocated and output to a display, a printer, or the like. When the luminance characteristic of the display is taken into consideration, the output is multiplied by γ = 1 / 2.2. Thereby, a visually luminance linear characteristic is obtained. In step S107, it is determined whether processing of all image data has been completed. If completed, the processing ends. If not completed, the process returns to step S101 and repeats the process.
[0035]
As described above, according to the image processing method and apparatus of the first embodiment of the present invention, the processing system does not include log conversion, and further, correction is performed so as to reduce nonlinear distortion of image data. Similar processing results can be obtained at any brightness level. As a result, there is little image dependency and the image quality adjustment in the dark part of the image can be automatically adjusted. Furthermore, by clipping and rounding a certain luminance value or more of the input image data, the luminance of the highlight area is prevented from being lowered.
[0036]
(Second Embodiment)
Next, an image processing apparatus according to the second embodiment of the present invention will be described. FIG. 5 is a block diagram of an image processing apparatus according to the second embodiment of the present invention. FIG. 6 is an explanatory diagram of the peripheral
[0037]
In FIG. 5, as the image input device 100, for example, a digital still camera (hereinafter referred to as DSC) is used. The distortion of the signal of the output G (x, y) with respect to the brightness of the image is corrected by the
[0038]
[Expression 10]
[0039]
[Expression 11]
[0040]
The peripheral
[0041]
The visual field function Fs (x, y) may be a Gaussian function that contributes higher as it approaches the target pixel due to its correspondence with the human visual model, and the brightness of the blurred image is originally calculated, so the characteristics are flat. A rectangular filter may be used instead. A rectangular filter, Ru with a
[0042]
FIG. 9 shows a flowchart of processing of the image processing apparatus according to the second embodiment of the present invention. In FIG. 9, steps S201 to S211 are improvements of the portion for calculating the relative brightness ratio in step S103 of the flowchart of the image processing apparatus according to the first embodiment of the present invention shown in FIG. In addition, it is extended to color. In step S201, the color image data subjected to distortion correction is subjected to monochromatic processing in consideration of color balance. Monochromatic signal Y (x, y) is Y (x, y) = Kr × Ir (x, y) + Kg × Ig (x, y) + Kb × Ib (x, y), Kr = 0.299, Kg = 0.587, Kb = 0.114.
In step S203, a plurality of different visual field functions Fs (x, y) are calculated from the monochromatic signal Y (x, y). In step S205, a gain coefficient A (σs) is calculated according to the size of the area of the visual field function Fs (x, y). For example, an A (σ s) = σs / σ M.
[0043]
In step S207, the weight coefficient Ws value (Ws = 1 / M) equally divided by the number M of the visual field functions Fs (x, y) is calculated. In step S209, the relative brightness ratio is calculated by multiplying Ii (x, y) / {Fs (x, y) * Y (x, y)} by the weighting coefficient Ws and the gain coefficient A (σs). In step S211, a value obtained by combining the relative ratios of brightness is calculated according to (Equation 11). When the above processing is completed, the process proceeds to step S105 in the flowchart of the image processing apparatus according to the first embodiment of the present invention shown in FIG. 8, and the combined relative ratio is converted to the final signal level. For example, an 8-bit signal level of 0 to 255 is output to a display, a printer, or the like. When the luminance characteristic of the display is taken into consideration, the output is multiplied by γ = 1 / 2.2. Thereby, a visually luminance linear characteristic is obtained. In step S107, it is determined whether processing of all image data has been completed. If completed, the processing ends. If not completed, the process returns to step S101 and repeats the process. In step S103, the process proceeds to step S201.
[0044]
The gain
[0045]
As described above, according to the image processing method and apparatus of the second embodiment of the present invention, outputs of a plurality of field functions Fs (x, y) are calculated, and a plurality of different field functions Fs ( Since the relative ratio of brightness obtained from the x, y) output is synthesized, the relative ratio R (x, y) with little image dependency can be calculated.
[0046]
In calculating the relative ratio, the color image is once converted into a single color and the blurred image is used, so that the color balance can be maintained rather than calculating the relative ratio of R, G, and B separately. As a result, it is possible to automatically adjust the density value in the image without depending on the image while improving the appearance of the dark part of the image.
[0047]
In the first and second embodiments described above, all image data input from the image input unit is corrected by the signal correction unit (distortion correction circuit) so as to reduce nonlinearity. However, it is not limited to this.
[0048]
In other words, distortion correction may be applied to a device having a comma value with respect to non-linear distortion and brightness, or an image file, and need not be applied to a linear device or an image file that does not require gamma correction. For this reason, it is determined in advance by the distortion determination means whether nonlinear distortion exists in the device or a gamma value exists in the image file, and distortion correction is performed on the input image having distortion by the distortion correction circuit. It can also be configured to be selectively applied. Examples of the determination information include color space information such as sRBG and gamma information described in the camera image file standard. As a result, the device distortion and the gamma value of the image file can be automatically corrected.
[0049]
The processing of the present invention can be similarly realized by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to an image processing method.
[0050]
Moreover, it can be similarly implemented by software processing in a local computer by downloading as a software medium from the outside via a communication line.
[0051]
【The invention's effect】
As described above, according to the present invention, the gray value of the image can be automatically adjusted without depending on the captured image object.
[0052]
In particular, according to the image processing method and apparatus of the first embodiment of the present invention, the processing system does not include log conversion, and further, by correcting so that nonlinear distortion of the image data is reduced, Similar processing results can be obtained at this level. As a result, it is possible to automatically perform image quality adjustment in a dark part of an image with little image dependency. Furthermore, by clipping and rounding a certain luminance value or more of the input image data, the luminance of the highlight area is prevented from being lowered.
[0053]
In addition, according to the image processing method and apparatus of the second embodiment of the present invention, outputs of a plurality of field functions Fs (x, y) are calculated, and a plurality of different field functions Fs (x, y) are calculated. ) Since the relative brightness ratio obtained from the output is synthesized, the relative ratio R (x, y) with little image dependence can be calculated.
[0054]
In calculating the relative ratio, since the color image is once monochromatic and the blurred image is used, the color balance can be maintained rather than calculating the relative ratio of R, G, and B separately. As a result, it is possible to automatically adjust the density value in the image without depending on the image while improving the appearance of the dark part of the image.
[Brief description of the drawings]
FIG. 1 is a block diagram of an image processing apparatus according to a first embodiment of the present invention. FIG. 2A is an explanatory diagram of an input device 100 of the image processing apparatus according to the first embodiment of the present invention. FIG. 3B is an explanatory diagram of the
DESCRIPTION OF
Claims (4)
着目画素の周辺分布領域の画素の輝度値を平滑化し、
前記平滑化された周辺分布領域の輝度値と着目画素の輝度値との相対比を、周辺分布領域のサイズと平滑化のフィルタサイズとを変更し複数回算出する周辺輝度算出回路と、
ゲイン係数を前記周辺分布領域のサイズ毎に決定するゲイン係数算出回路と、
算出された相対比に所定の重み係数と前記サイズ毎のゲイン係数とを各々乗じ、合成値を算出する第2画像処理回路と、
該合成値を出力デバイスの信号レベルに正規化して出力する出力変換回路と、
を備え、
該ゲイン係数算出回路は、該周辺分布領域のサイズが大きい程、該ゲイン係数の値を大きく決定する、
ことを特徴とする画像処理プロセッサ。An image processor,
Smooth the luminance value of the pixels in the peripheral distribution area of the target pixel,
A peripheral luminance calculation circuit that calculates the relative ratio between the luminance value of the smoothed peripheral distribution region and the luminance value of the pixel of interest by changing the size of the peripheral distribution region and the smoothing filter size a plurality of times;
A gain coefficient calculation circuit for determining a gain coefficient for each size of the peripheral distribution region;
A second image processing circuit for calculating a composite value by multiplying the calculated relative ratio by a predetermined weighting factor and a gain factor for each size;
An output conversion circuit that normalizes and outputs the combined value to the signal level of the output device;
With
The gain coefficient calculation circuit determines a larger value of the gain coefficient as the size of the peripheral distribution region is larger.
An image processing processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002135160A JP4096613B2 (en) | 2002-05-10 | 2002-05-10 | Image processing method and image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002135160A JP4096613B2 (en) | 2002-05-10 | 2002-05-10 | Image processing method and image processing apparatus |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007104801A Division JP4488024B2 (en) | 2007-04-12 | 2007-04-12 | Image processing apparatus and image processing method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003333331A JP2003333331A (en) | 2003-11-21 |
JP4096613B2 true JP4096613B2 (en) | 2008-06-04 |
Family
ID=29697558
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002135160A Expired - Fee Related JP4096613B2 (en) | 2002-05-10 | 2002-05-10 | Image processing method and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4096613B2 (en) |
Families Citing this family (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7949201B2 (en) | 2004-09-01 | 2011-05-24 | Nec Corporation | Image correction processing system and image correction processing method |
EP2323100A3 (en) | 2005-10-12 | 2012-03-21 | Panasonic Corporation | Visual processing apparatus, display apparatus, visual processing method, program and integrated circuit |
WO2007122966A1 (en) * | 2006-04-19 | 2007-11-01 | Panasonic Corporation | Visual processing device, visual processing method, program, display device, and integrated circuit |
CN101438575B (en) | 2006-04-28 | 2011-09-28 | 松下电器产业株式会社 | Visual processing apparatus, visual processing method, and display device |
JP4793166B2 (en) * | 2006-08-17 | 2011-10-12 | ブラザー工業株式会社 | Image processing program and image processing apparatus |
JP4793175B2 (en) * | 2006-08-29 | 2011-10-12 | ブラザー工業株式会社 | Image processing program and image processing apparatus |
US7920752B2 (en) | 2006-08-17 | 2011-04-05 | Brother Kogyo Kabushiki Kaisha | Image processing device that quickly performs retinex process |
JP4862554B2 (en) * | 2006-08-18 | 2012-01-25 | ブラザー工業株式会社 | Image processing program and image processing apparatus |
US8437031B2 (en) | 2006-08-31 | 2013-05-07 | Brother Kogyo Kabushiki Kaisha | Image processing device and method for reducing an original image |
JP2008059287A (en) | 2006-08-31 | 2008-03-13 | Brother Ind Ltd | Image processor and image processing program |
JP4661754B2 (en) * | 2006-09-29 | 2011-03-30 | ブラザー工業株式会社 | Image processing apparatus and image processing program |
US8081839B2 (en) | 2006-08-31 | 2011-12-20 | Brother Kogyo Kabushiki Kaisha | Image processor |
JP4735499B2 (en) * | 2006-09-28 | 2011-07-27 | ブラザー工業株式会社 | Image processing program and image processing apparatus |
JP4353233B2 (en) | 2006-10-31 | 2009-10-28 | ブラザー工業株式会社 | Image processing program and image processing apparatus |
US8165418B2 (en) | 2007-03-30 | 2012-04-24 | Brother Kogyo Kabushiki Kaisha | Image processor |
-
2002
- 2002-05-10 JP JP2002135160A patent/JP4096613B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2003333331A (en) | 2003-11-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4076302B2 (en) | Image brightness correction method | |
JP4577621B2 (en) | Image correction processing system and image correction processing method | |
JP5105209B2 (en) | Image processing apparatus and method, program, and recording medium | |
JP4210577B2 (en) | Method for enhancing gradation and spatial characteristics of digital images using selective spatial filters | |
JP4526445B2 (en) | Imaging device | |
EP2076013B1 (en) | Method of high dynamic range compression | |
JP4096613B2 (en) | Image processing method and image processing apparatus | |
JP4707830B2 (en) | A method for improving digital images with noise-dependent control of textures | |
US6822762B2 (en) | Local color correction | |
EP1302898B1 (en) | System and method for digital image tone mapping using an adaptive sigmoidal function based on perceptual preference guidelines | |
US6741753B1 (en) | Method and system of local color correction using background liminance masking | |
JP4021261B2 (en) | Image processing device | |
EP1139284B1 (en) | Method and apparatus for performing local color correction | |
JP2002133409A (en) | Digital image enhancement method based on pixel color | |
JP5392560B2 (en) | Image processing apparatus and image processing method | |
JP2001216511A (en) | Method for improving edge contrast of digital picture independently of texture | |
JP4479527B2 (en) | Image processing method, image processing apparatus, image processing program, and electronic camera | |
JP2006114005A (en) | Gradation conversion apparatus, program, electronic camera, and method therefor | |
JP4069943B2 (en) | Image processing apparatus, image processing program, image processing method, and electronic camera for controlling noise removal strength within screen | |
JP2005039460A (en) | Image processing method and apparatus | |
JP2005004510A (en) | Image processing program | |
JP5410378B2 (en) | Video signal correction apparatus and video signal correction program | |
JP2002281312A (en) | Device, method and program for processing image | |
JP5234127B2 (en) | Gradation conversion device, program, electronic camera, and method thereof | |
JP4664938B2 (en) | Image processing apparatus, image processing method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041217 |
|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7421 Effective date: 20050706 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070215 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070227 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070416 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070911 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20071003 |
|
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: 20080219 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20080303 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 4096613 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110321 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110321 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120321 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130321 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130321 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140321 Year of fee payment: 6 |
|
LAPS | Cancellation because of no payment of annual fees |