JP2005039457A - Image processing apparatus and method - Google Patents

Image processing apparatus and method Download PDF

Info

Publication number
JP2005039457A
JP2005039457A JP2003199122A JP2003199122A JP2005039457A JP 2005039457 A JP2005039457 A JP 2005039457A JP 2003199122 A JP2003199122 A JP 2003199122A JP 2003199122 A JP2003199122 A JP 2003199122A JP 2005039457 A JP2005039457 A JP 2005039457A
Authority
JP
Japan
Prior art keywords
luminance
image data
output
image
distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2003199122A
Other languages
Japanese (ja)
Inventor
Kotaro Yano
光太郎 矢野
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 JP2003199122A priority Critical patent/JP2005039457A/en
Priority to US10/887,817 priority patent/US7469072B2/en
Publication of JP2005039457A publication Critical patent/JP2005039457A/en
Priority to US12/273,687 priority patent/US7650045B2/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processing apparatus and method capable of optimally enhancing the lightness distribution in response to an image and applying processing at a comparatively low processing cost to an image whose improvement effect is expected weak. <P>SOLUTION: The image processing apparatus predicts a processing effect using an output of a scale conversion means of a luminance enhancement means, the luminance enhancement means enhances a luminance distribution of image data by using the output of the scale conversion means when the image processing apparatus predicts the processing effect high, and the luminance enhancement means enhances a luminance distribution of image data without using the output of the scale conversion means when the image processing apparatus predicts the processing effect low. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はデジタル画像の明るさの分布を改善するものに関する。
【0002】
【従来の技術】
従来、適正な明るさの写真を撮影する方法として、撮影するシーンの平均的な輝度を測定し、カメラのシャッター速度、絞り値などを制御する方式が知られている。また、シーンを所定の領域に分割して領域ごとに測定した輝度に重み付けして平均的な輝度を求めて適正露出を得ようとするいわゆる評価測光方式による露出制御方式が知られている。
【0003】
しかしながら、撮影する主被写体の明るさが背景の明るさに比べて著しく暗いような、いわゆる逆光シーンにおいては、撮影した画像においてどうしても主被写体部分が暗くなってしまう。このような逆光シーンにおいて適切な明るさの写真を撮影するには、撮影時にあらかじめ平均的な写真よりも明るめに撮影されるようにカメラの露出を設定しておく必要があった。しかし、このような露出補正の操作はわずらわしいばかりでなく、カメラの設定を適正に行うための熟練を要する。また、逆光シーンを撮影した画像のデジタル画像処理において、露出補正と同等の処理を行うこともできる。しかしながら、いずれの場合にも、主被写体に対して適切に露出補正を行ったとしても、逆に背景部分が明るくなりすぎてしまう。
【0004】
本発明の目的は、このような適切に画像の明るさを決定するのが困難な逆光等のシーンにおいても、適切な明るさの画像を得ることである。
【0005】
本発明の目的を達成するために、アナログ写真技術においては、暗室内でいわゆる覆い焼き処理を行うことで適切な明るさのプリントを得ることができる。このような覆い焼き処理を容易に実現するためには、デジタル画像処理において、覆い焼き処理を実現することが望ましい。
【0006】
このような処理を実現する方法として、例えば、IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL.6, NO.7, JULY 1997に”A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes”と題するJobsonらの報告(従来技術1とする)がある。これは、デジタル画像を対数変換した成分とその対数変換成分の低周波成分との差分処理を行うことによって、デジタル画像の低周波領域における明るい成分を暗く、低周波領域における暗い成分を明るく処理することにより、画像の改善を行おうとするものである。
【0007】
また、acm Transactions on Graphics, JULY 2002, Vol.21, No.3 に”Photographic Tone Reproduction for Digital Images”と題するReinhardらの報告(従来技術2とする)、IS&T/SID Eighth Color Imaging Conferenceに”Local Color Correction Using Non−Linear Masking”と題するMoroneyの報告(従来技術3とする)においても、デジタル画像の輝度成分とその低周波成分とを用いることにより、デジタル画像処理において覆い焼きのような効果を得る方法が提案されている。
【0008】
【非特許文献1】
”A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes” IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL.6, NO.7, JULY 1997
【非特許文献2】
”Photographic Tone Reproduction for Digital Images” acm Transactions on Graphics, JULY 2002, Vol.21, No.3
【非特許文献3】
”Local Color Correction Using Non−Linear Masking” IS&T/SID Eighth Color Imaging Conference
【0009】
【発明が解決しようとする課題】
しかしながら、上記従来例においては、処理するデジタル画像を撮影したシーンが逆光シーン以外に適用した場合には補正効果が弱いにも関わらず、デジタル画像処理で露出補正を行う場合に比べて処理時間や処理に使用するメモリなどのコストが高いといった問題点があった。また、逆光シーンにおいても、特に人物の顔が逆光で暗く記録されてしまった画像以外では明るさの補正の必要性が高くない。
【0010】
本発明の目的は、前記問題点を解決し、逆光シーン、特に人物の顔を逆光状態で撮影した画像データに対して、輝度分布の改善度合いの調整を自動的に行い、処理する画像データに応じて最適に明るさの分布の改善が行え、且つ、それ以外の処理効果の弱いと予想されるシーンを撮影した画像データに対しては処理コストの比較的低い処理を行うことができるようにすることである。
【0011】
【課題を解決するための手段】
上記目的を達成するために、本発明は、画像データから輝度成分を抽出する輝度抽出手段と、前記輝度成分の比較的大きな尺度での分布を求めるスケール変換手段と、前記画像データの輝度分布を改善する輝度改善手段と、前記輝度改善手段の出力を新たな画像の輝度分布として画像データを再生する画像再生手段とを備えた画像処理装置において、前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果を予測し、処理効果が高いと予測した場合には、前記輝度改善手段は前記スケール変換手段の出力を用いて前記画像データの輝度分布を改善し、処理効果が低いと予測した場合には、前記輝度改善手段は前記スケール変換手段の出力を用いずに前記画像データの輝度分布を改善することを特徴とする。
【0012】
【発明の実施の形態】
図1に本実施形態の構成を示す。
【0013】
図中、1は、画像入力手段であり、画像処理システムにデジタル画像データ(以後、画像データと称す)を入力する。例えば、デジタルカメラ、スキャナなどで構成される。
2は、輝度抽出手段であり、画像入力手段1で入力した画像データから輝度成分と色成分を抽出する。
3は、逆光検出手段であり、輝度抽出手段2から出力された画像データの輝度成分から画像入力手段1で入力した画像データの逆光の度合いを求める。
4は、顔検出手段であり、画像入力手段1で入力した画像データから人物の顔部分に相当する位置を顔領域として検出する。
5は、輝度改善判定手段であり、逆光検出手段3の出力である逆光の度合いと顔検出手段4の検出結果から輝度改善の処理方法を選択し、輝度抽出手段2から出力された画像データの輝度成分から輝度改善手段7で処理する改善の度合いを画像データに応じて最適にするようにパラメータの調整を行う。
6は、スケール変換手段であり、輝度抽出手段2から出力された画像データの輝度成分の比較的大きな尺度での分布を求める。
7は、輝度改善手段であり、輝度抽出手段2から出力された画像データの輝度成分とスケール変換手段3から出力された比較的大きな尺度での輝度成分の分布を用いて画像データの輝度成分の分布を改善する。
8は、画像再生手段であり、輝度改善手段7から出力された改善された輝度成分と輝度抽出手段2から出力された色成分とを合成し、画像データを再構成する。
【0014】
以上のような構成の画像処理システムは、また、アプリケーションプログラムによって汎用の計算機においても実行可能である。以後、本実施形態では、主にアプリケーションプログラムにおいて実行される画像処理システムについて説明する。
【0015】
図2に本実施形態における画像処理システムの動作を汎用の計算機で実行するアプリケーションプログラムのアルゴリズムを示す。
【0016】
まず、アプリケーションプログラムが起動するとユーザは画像データのファイル名を入力し、画像データ入力手段1は画像データを計算機の記憶部に読み込む。(S101)
ここで読み込まれた画像データは、例えば8ビットの画素により構成されるM×Nの2次元配列(但し、Mは水平画素数、Nは垂直画素数)であり、R、G、B、3つの面により構成される。この画像データをR、G、B、それぞれR(x,y)、G(x,y)、B(x,y)とする(但し、(x,y)は画素位置を表す整数、1≦x≦M、1≦y≦N)。このとき、画像データがJPEG等の方式により圧縮されている場合は、画像データを所定の解凍方式にしたがって解凍し、RGB各画素により構成される画像データとする。
【0017】
次に、輝度抽出手段2は画像データを構成するRGB各画素をもとに輝度成分を抽出する。(S102)
輝度成分の抽出は、例えば、RGBの画素成分がIEC 61966−2−1に記載されているsRGB色空間におけるデータと想定し、IEC 61966−2−1に記載されている方法に従い、ガンマ変換と3行3列のマトリクス演算により、CIE1931XYZに変換する。ここで、変換後のXYZのデータをそれぞれX(x,y)、Y(x,y)、Z(x,y)とすると、Y(x,y)が抽出する輝度成分である。
【0018】
なお、輝度成分を抽出する方法としては、前述の処理を簡略化し、マトリクス演算のみで抽出するようにしてもよい。また、RGBからYCbCrへの変換やRGBからLへの変換、RGBからHSVへの変換を用いてもよい。
【0019】
ここで、S103以降の処理について、まず概略を説明し、その後で各処理の詳細を説明する。
【0020】
まず、逆光検出手段3はS102で抽出した輝度成分からS101で入力した画像データの逆光度合いを求める。(S103)
ここで、求めた逆光度合いが低い場合は、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測し、処理をS106に移す。
【0021】
次に、顔検出手段4はS101で入力した画像データから人物の顔領域を抽出する。(S104)
ここで、所定の大きさ以上の顔領域を検出しなかった場合には、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測し、処理をS106に移す。
【0022】
次に、輝度改善判定手段5は顔領域の輝度代表値と画像全体の輝度代表値を求め、画像全体の輝度代表値と顔領域の輝度代表値とから輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果を予測する。(S105)
次に、輝度改善判定手段5は処理効果の予測結果に応じて、改善すべき輝度分布の度合いを決めるパラメータを決定する。(S106)
ここで、輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測された場合には処理をS108に移す。
【0023】
次に、スケール変換手段6はS102で抽出した輝度成分から比較的大きな尺度での輝度成分の分布を求める。(S107)
次に、輝度改善手段7は処理効果の予測結果に応じて、S106で求めたパラメータを用いて画像データの輝度成分の分布を改善する。(S108)
そして、画像再生手段8は改善された輝度成分とS102で変換された色成分とを合成し、画像データを再構成する。(S109)
以下、S103〜S109の各処理の詳細を説明する。
【0024】
S103では、抽出した輝度成分からS101で入力した画像データの逆光度合いを求める。
【0025】
まず、画像データの輝度成分から各輝度レンジに対する輝度成分の頻度を表す輝度ヒストグラムを作成する。そして、輝度レンジの中間部分にあたる所定の輝度値の範囲YT1〜YT2の頻度をP1、中間部分より明るい輝度値の範囲YT2〜YTmaxの頻度をP2とするとき、逆光度合いPBを以下の(式1)で求める。
【0026】
PB=P2−kB・P1 (式1)
但し、0<YT1<YT2<YTmax、YTmaxは輝度レンジの最大値、kBは定数。
【0027】
なお、この判定式は逆光シーンでは、画像の明るい部分の領域が大きいことにより逆光が発生するとの仮定に基づいている。
【0028】
ここで、求めた逆光度合いが所定の値よりも低い場合は、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測する。
【0029】
なお、逆光の度合いを求める方法は前述の方法に限定されるものではなく、例えば本出願人が特開2000−134467で提案したような、輝度ヒストグラムからピーク領域の数を求め、逆光度合いとしてもよい。この場合、例えばピーク数が複数ある場合、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測する。また、ピーク領域の数を(式1)に組み合わせて逆光の度合いとしてもよいことは言うまでもない。
【0030】
S104では、S101で入力した画像データから人物の顔領域を抽出する。
【0031】
画像データから顔領域を検出する処理内容例を図3に示す。まず、画像データを所定の画像サイズにローパスフィルタ処理を行うと同時に縮小する。そして縮小された画像データの画素値で局所的にRGB各成分が小さい領域を目の画像領域の候補として抽出する。さらに抽出された候補を2つずつ組にして領域の大きさの均等性、輝度の差、水平に対する角度などから組にした2つの領域が目かどうかを判定する。(図3(a))目と判定された組について、その2つの位置からあらかじめ設定された所定の位置関係のパラメータに基づき矩形領域を設定する。(図3(b))そして矩形領域の境界付近のエッジおよび領域内の色情報から矩形領域の確定を行う。(図3(c))詳しくはエッジについては境界付近の所定幅の領域に所定強度を超えるエッジ成分が所定比率以上占有するか、で判定する。色情報については矩形領域内の画素値の平均値を計算し、あらかじめ設定した肌色領域内に平均値が入っているかで判定する。そして、エッジ、色情報の条件が両立して満たされている場合、顔領域と判定する。そして、顔領域と判定された矩形領域の位置情報を顔領域として出力する。
【0032】
ここで、所定の大きさ以上の顔領域を検出しなかった場合には、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測する。
【0033】
なお、画像データから顔領域を検出する方式は、例えば、IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL.24 , NO.1, JANUARY 2002に”Detecting Faces in Images: A Survey”と題するYangらの報告に揚げられているような方式を用いてもよい。
【0034】
次に、S107およびS108の処理について説明し、その後でS105、S106の処理について説明することとする。
【0035】
S107では、S102で抽出した輝度成分から比較的大きな尺度での輝度成分(輝度成分の低周波成分)の分布を求める。
【0036】
大きな尺度での輝度成分の分布を求めるには、例えば、従来技術1にあるように抽出した輝度成分とガウシアン関数との積和演算を行い、出力とする。(但し、従来技術1では画像データの輝度成分ではなく直接画像データのRGB各画素に対して積和演算を行うようにしている)ここで、改善された画像データの画質を向上するために、標準偏差の異なる複数のガウシアン関数との積和演算を行い、複数の尺度での輝度成分の分布を求めるようにすると、より好ましい。なお、以上説明したような大きな尺度での輝度成分の分布を求める処理を以後、スケール変換と称することとする。
【0037】
S108では、処理効果の予測結果に応じて、S106で求めたパラメータを用いて画像データの輝度成分の分布を改善する。
【0038】
まず、輝度改善判定手段5によって輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が高いと予測された場合の輝度改善処理について説明する。
【0039】
処理の一例として従来技術1に基づく方法によれば、輝度成分とスケール変換した輝度成分の分布それぞれを対数変換し、その差分を出力する。さらに、異なる尺度での差分出力の重み付き平均を改善された輝度成分とする。しかしながら、この方法では、画像に応じて改善の度合いを調整できないので、スケール変換した輝度成分の対数変換出力に係数を乗ずるようにする。この係数が改善の度合いを調整するパラメータである。以上説明した処理に基づく改善された輝度成分の出力は以下に示す(式2)のようになる。
【外1】

Figure 2005039457
【0040】
但し、Y’(x,y)、F(x,y)、w、n、γはそれぞれ改善された輝度成分の出力、ガウシアン関数、尺度間の重み、尺度を表すパラメータ、改善の度合いを表すパラメータである。また、*は積和演算を表す。
【0041】
なお、尺度間の重みは尺度の標準偏差を調整することで省略可能(単純な平均に置き換わる)であること、また、(式2)のように対数変換された値を出力するよりも、逆変換(exp演算)により元の輝度単位に戻した方が、改善された画像データの画質として好ましいことが分かっている。従って、以下の(式3)に示した出力を改善された輝度成分とすることがより好ましい。
【外2】
Figure 2005039457
【0042】
但し、Avgは平均値演算を表す。
【0043】
(式3)の代わりに、以下に示す(式4)としてもよい。
【外3】
Figure 2005039457
【0044】
より望ましくは、画像全体の輝度成分を調整するために本実施形態では(式4)の代わりに以下に示す(式5)の処理で輝度分布の変換を行う。
【外4】
Figure 2005039457
【0045】
但し、γは画像全体の輝度成分を調整するためのパラメータである。
【0046】
なお、複数尺度でのスケール変換出力の平均値演算をS107のスケール変換の処理で行い、複数尺度でのスケール変換出力の平均値をスケール変換された輝度成分の分布としてもよい。
【0047】
次に、輝度改善判定手段5によって輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測された場合の輝度改善処理について説明する。この場合は、通常の露出補正をデジタル画像処理で行っても、前述した輝度改善処理を行った結果と同等の改善ができると予想される。具体的な処理例としては、(式5)のγ=0とおいて、以下の(式6)による輝度変換を行う。
Y’(x,y)=Y(x,y)y0 (式6)
(式5)の処理と比較し、(式6)によれば、スケール変換の処理で比較的大きな尺度での分布を求める必要がなく、また、(式5)の分母の演算および除算の必要がない。
【0048】
次に、前述した輝度改善処理におけるパラメータを決定するS105、S106の処理について説明する。
【0049】
S105では、顔領域の輝度代表値と画像全体の輝度代表値を求め、画像全体の輝度代表値と顔領域の輝度代表値とから輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果を予測する。
【0050】
まず、画像全体の輝度代表値として、輝度値の平均値を算出し、Yとする。一方、画像全体の輝度代表値Yに対する改善すべき画像の目標とする輝度値YATをあらかじめテーブルとして記憶しておき、求めた画像全体の輝度代表値Yに対する改善すべき画像の目標とする輝度値YATをテーブル参照により求める。そして、例えば(式6)をベースとした画像全体の輝度を補正することによって画像全体の輝度値Yが目標とする輝度値YATになるようなパラメータγは、以下の(式7)により求めることができる。
【外5】
Figure 2005039457
【0051】
また、画像データの輝度成分の内、顔領域内の輝度値の平均値を算出し、Yとする。但し、顔領域として検出された矩形領域内には目や髪の毛など肌でないものも存在するが、ここでは顔領域内の画素について明るい方から所定の割合以上の輝度値のみの平均値を算出することで肌に対応する部分の輝度の代表値(人肌代表輝度値とする)とする。人肌における輝度値の好ましい値として所定の値(人肌目標輝度値とする)をあらかじめ設定しておき、人肌代表輝度値と人肌目標輝度値とを所定の重みで荷重平均したものを目標輝度値として設定する。ここで、人肌代表輝度値をY、荷重平均後の目標輝度値をYfTとするとき、輝度値Yが所定の輝度値になるようなγを改善の度合いを表すパラメータとする。なお、先に求めたパラメータγによって人肌代表輝度値Yは補正されることを考えると、補正後の人肌代表輝度値Y’は、以下の(式8)で求められる。
【外6】
Figure 2005039457
【0052】
ここで、
Y’<YfT (式9)
の場合に輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果があると予測できる。従って、(式9)を満たす場合には、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が高いと予測し、それ以外は処理の効果が低いと予測する。
【0053】
なお、(式9)の判定式を所定の正定数Cを設けて、以下の(式10)のようにしてもよい。
【0054】
Y’+C<YfT (式10)
輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が微妙な場合は処理コストの低い露出補正処理を行うようにすることができる。
【0055】
なお、そもそも人肌代表輝度値が人肌目標輝度値に比べて著しく暗くない場合には画像中の顔領域の輝度を改善する必要がないので、輝度改善判定手段5は輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測してもよいことは言うまでもない。
【0056】
S106では、S103〜S105の予測結果に応じて、改善すべき輝度分布の度合いを決めるパラメータを決定する。
【0057】
輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測された場合には、式(7)で求められるパラメータγをそのまま出力し、処理をS108に移す。
【0058】
また、輝度改善手段7のスケール変換手段6の出力である画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が高いと予測された場合には、S105で求めた補正後の人肌代表輝度値Y’が荷重平均後の目標輝度値をYfTになるようなγを改善の度合いを表すパラメータとする。なお、このγは、(式5)の分母の[ ]内をY(x,y)とほぼ等しいと仮定し、分子をY’に置き換えると、以下に示す(式11)により求めることができる。
【外7】
Figure 2005039457
【0059】
S106で出力されたパラメータによってS108で輝度変換の処理が行われる。
【0060】
S109では、S108で改善された輝度成分とS102で変換された色成分とを合成し、画像データを再構成する。
【0061】
ここで、まず、再構成後の画像データの色ができるだけ変化しないように、色成分を輝度成分の変更にしたがって修正する。例えば、色成分X(x,y)、Z(x,y)にそれぞれ輝度成分の変更前後の比Y’(x,y)/Y(x,y)を乗算する。そして、X、Y、ZのデータからRGBのデータを求める。ここでの処理はS102における処理の逆変換である。したがって、3行3列のマトリクス演算および逆ガンマ変換の処理を行い、RGB各8ビット出力とする。
【0062】
なお、S102で輝度成分を抽出する方法としてRGBからYCbCr変換など別方式を用いた場合には、本処理において対応する逆変換の処理を行うべきであることは言うまでもない。
【0063】
以上の例では、従来技術1をもとに処理する画像データに応じて最適に明るさの分布の改善が行う方法について説明したが、デジタル画像の輝度成分とその低周波成分とを用いる従来技術2や従来技術3にも本発明が応用できることは言うまでもない。
【0064】
また、S108の処理において、(式5)の分母の[ ]内の値として、輝度成分に対してacm Transactions on Graphics, JULY 2002, Vol.21, No.3 中の”Fast Bilateral Filtering for the Display of High−Dynamic−Range Images”と題するDurandらの報告にあるようなBilateral Filteringを適用してもよい。この場合、S107のスケール変換処理であらかじめ輝度成分にBilateral Filtering処理を行う。
【0065】
以上説明した例では、画像データを解析して画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果を予測するようにしたが、例えば、社団法人電子情報技術産業協会JEITAより発行されている”ディジタルスチルカメラ用画像ファイルフォーマット規格Exif 2.2”に記載されているデジタルカメラの画像の付帯情報を利用して画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果を予測することもできる。
【0066】
例えば、デジタルカメラで撮影した画像データの付帯情報を解析し、露出モードが露出自動でない場合には、ユーザが意図して撮影時に画像の明るさを設定した可能性があるので、画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測し、画像データの輝度分布の改善を行わない方がよい。
【0067】
また、デジタルカメラで撮影した画像データの付帯情報を解析し、フラッシュがストロボ発光の場合には、逆光シーンである可能性が少ないので、画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測し、画像データの輝度分布の改善を行わない方がよい。
【0068】
また、デジタルカメラで撮影した画像データの付帯情報を解析し、撮影モードが標準または人物以外の場合には、主被写体が人物である可能性が少ないので、画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果が低いと予測し、画像データの輝度分布の改善を行わない方がよい。
【0069】
以上、デジタルカメラで撮影した画像データの付帯情報を解析することによって、必要性に応じた処理効率の良い輝度補正が実現できる。なお、これらの画像データの付帯情報を利用した画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果の予測は、画像データを解析して画像データの輝度成分の比較的大きな尺度での分布を用いた処理の効果を予測した輝度改善処理と組み合わせて使用してもよいことは言うまでもない。
【0070】
また、以上説明した例においては、処理する画像データとしてRGB各8ビットのデータを想定して説明したが、RGB各16ビットの画像データから最適なRGB各8ビットの画像データを再生する場合においても適用できる。
【0071】
【発明の効果】
以上説明したように、本発明によれば、スケール変換手段の出力を用いた処理効果を予測し、処理効果が高いと予測した場合には、前記輝度改善手段は前記スケール変換手段の出力を用いて前記画像データの輝度分布を改善し、処理効果が低いと予測した場合には、前記輝度改善手段は前記スケール変換手段の出力を用いずに前記画像データの輝度分布を改善するようにしたので、逆光シーン、特に人物の顔を逆光状態で撮影した画像データに対して、輝度分布の改善度合いの調整を自動的に行い、処理する画像データに応じて最適に明るさの分布の改善が行え、且つ、それ以外の処理効果の弱いと予想されるシーンを撮影した画像データに対しては処理コストの比較的低い処理を行うことができる。
【図面の簡単な説明】
【図1】画像処理システムにおける実施形態の構成を示す図。
【図2】画像処理システムにおけるアプリケーションプログラムのアルゴリズムを示す図。
【図3】実施形態における顔検出の処理内容を説明する図。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an improvement in the brightness distribution of a digital image.
[0002]
[Prior art]
Conventionally, as a method of taking a photograph with appropriate brightness, a method of measuring the average brightness of a scene to be taken and controlling the shutter speed, aperture value, etc. of the camera is known. There is also known an exposure control method based on a so-called evaluation photometry method that divides a scene into predetermined regions and weights the luminance measured for each region to obtain an average exposure by obtaining an average luminance.
[0003]
However, in a so-called backlight scene where the brightness of the main subject to be photographed is significantly darker than the brightness of the background, the main subject portion is inevitably dark in the photographed image. In order to take a photograph with appropriate brightness in such a backlight scene, it is necessary to set the exposure of the camera in advance so that the photograph is taken brighter than the average photograph. However, such an exposure correction operation is not only cumbersome but also requires skill to properly set the camera. Further, in digital image processing of an image obtained by photographing a backlight scene, processing equivalent to exposure correction can be performed. However, in any case, even if exposure correction is appropriately performed on the main subject, the background portion becomes too bright.
[0004]
An object of the present invention is to obtain an image with appropriate brightness even in a scene such as backlight where it is difficult to appropriately determine the brightness of the image.
[0005]
In order to achieve the object of the present invention, in the analog photographic technique, a print with appropriate brightness can be obtained by performing a so-called dodging process in a dark room. In order to easily realize such a dodging process, it is desirable to realize the dodging process in digital image processing.
[0006]
As a method for realizing such processing, for example, IEEE TRANSACTIONS ON IMAGE PROCESSING, VOL. 6, NO. 7, JULY 1997 includes a report by Johnson et al. (Referred to as Prior Art 1) entitled “A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes”. This is to process the difference between the logarithmically transformed component of the digital image and the low frequency component of the logarithmically transformed component, thereby darkening the bright component in the low frequency region of the digital image and brightening the dark component in the low frequency region. Thus, the image is to be improved.
[0007]
Also, acm Transactions on Graphics, JULY 2002, Vol. 21, no. 3 report to Reinhard et al. (Referred to as prior art 2) entitled “Photographic Tone Production for Digital Images”, and “Local Color Report to IS & T / SID Eighth Color Coding”. 3), a method of obtaining an effect such as dodging in digital image processing by using the luminance component of the digital image and its low frequency component has been proposed.
[0008]
[Non-Patent Document 1]
"A Multiscale Retinex for Bridging the Gap Between Color Images and the Human Observation of Scenes", IEEE TRANSACTIONS ON IMAGESING, VOL. 6, NO. 7, JULY 1997
[Non-Patent Document 2]
“Photographic Tone Production for Digital Images” acm Transactions on Graphics, JULY 2002, Vol. 21, no. 3
[Non-Patent Document 3]
“Local Color Correction Using Non-Linear Masking” IS & T / SID Height Color Imaging Conference
[0009]
[Problems to be solved by the invention]
However, in the above-described conventional example, when the scene where the digital image to be processed is captured is applied to a scene other than the backlight scene, the correction effect is weak, but the processing time and time are compared with the case where exposure correction is performed by digital image processing. There was a problem that the cost of the memory used for processing was high. Also, in a backlight scene, the necessity of correcting the brightness is not high except for an image in which a person's face is recorded dark due to backlight.
[0010]
An object of the present invention is to solve the above-mentioned problems and automatically adjust the improvement degree of the luminance distribution for image data obtained by photographing a backlight scene, particularly a human face in a backlight condition, to process image data. Accordingly, the brightness distribution can be optimally improved, and processing with a relatively low processing cost can be performed on image data obtained by capturing a scene that is predicted to have a weaker processing effect. It is to be.
[0011]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides luminance extraction means for extracting a luminance component from image data, scale conversion means for obtaining a distribution of the luminance component on a relatively large scale, and luminance distribution of the image data. In an image processing apparatus comprising: a luminance improving means for improving; and an image reproducing means for reproducing image data using the output of the luminance improving means as a new image luminance distribution, the output of the scale converting means of the luminance improving means When the processing effect used is predicted, and the processing effect is predicted to be high, the brightness improvement means uses the output of the scale conversion means to improve the brightness distribution of the image data and predicts that the processing effect is low In this case, the brightness improvement means improves the brightness distribution of the image data without using the output of the scale conversion means.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 shows the configuration of this embodiment.
[0013]
In the figure, reference numeral 1 denotes image input means for inputting digital image data (hereinafter referred to as image data) to the image processing system. For example, it is composed of a digital camera, a scanner and the like.
Reference numeral 2 denotes a luminance extraction unit that extracts a luminance component and a color component from the image data input by the image input unit 1.
Reference numeral 3 denotes a backlight detection unit, which obtains the degree of backlight of the image data input by the image input unit 1 from the luminance component of the image data output from the luminance extraction unit 2.
A face detection unit 4 detects a position corresponding to a face portion of a person as a face region from the image data input by the image input unit 1.
Reference numeral 5 denotes luminance improvement determination means, which selects a luminance improvement processing method from the degree of backlight output from the backlight detection means 3 and the detection result of the face detection means 4, and outputs the image data output from the luminance extraction means 2. Parameters are adjusted so as to optimize the degree of improvement processed by the luminance improving means 7 from the luminance component according to the image data.
Reference numeral 6 denotes a scale conversion unit which obtains a distribution on a relatively large scale of the luminance component of the image data output from the luminance extraction unit 2.
Reference numeral 7 denotes luminance improvement means, which uses the luminance component distribution of the image data output from the luminance extraction means 2 and the luminance component distribution on a relatively large scale output from the scale conversion means 3 to calculate the luminance component of the image data. Improve distribution.
Reference numeral 8 denotes an image reproduction unit that combines the improved luminance component output from the luminance improvement unit 7 and the color component output from the luminance extraction unit 2 to reconstruct the image data.
[0014]
The image processing system configured as described above can also be executed on a general-purpose computer by an application program. Hereinafter, in the present embodiment, an image processing system mainly executed in an application program will be described.
[0015]
FIG. 2 shows an algorithm of an application program for executing the operation of the image processing system in this embodiment by a general-purpose computer.
[0016]
First, when the application program is activated, the user inputs the file name of the image data, and the image data input means 1 reads the image data into the storage unit of the computer. (S101)
The image data read here is, for example, an M × N two-dimensional array composed of 8-bit pixels (where M is the number of horizontal pixels and N is the number of vertical pixels), and R, G, B, 3 Consists of two faces. The image data is R, G, B, R (x, y), G (x, y), and B (x, y) (where (x, y) is an integer representing a pixel position, 1 ≦ x ≦ M, 1 ≦ y ≦ N). At this time, if the image data is compressed by a method such as JPEG, the image data is decompressed according to a predetermined decompression method to obtain image data composed of RGB pixels.
[0017]
Next, the luminance extraction unit 2 extracts luminance components based on the RGB pixels constituting the image data. (S102)
For example, the luminance component is extracted by assuming that the pixel component of RGB is data in the sRGB color space described in IEC 61966-2-1, and performing gamma conversion according to the method described in IEC 61966-2-1. Conversion into CIE1931XYZ is performed by a matrix operation of 3 rows and 3 columns. Here, if the converted XYZ data is X (x, y), Y (x, y), and Z (x, y), Y (x, y) is a luminance component to be extracted.
[0018]
Note that as a method of extracting the luminance component, the above-described processing may be simplified and extraction may be performed only by matrix calculation. Also, conversion from RGB to YCbCr, conversion from RGB to L * a * b * , or conversion from RGB to HSV may be used.
[0019]
Here, an outline of the processing after S103 will be described first, and then details of each processing will be described.
[0020]
First, the backlight detection unit 3 obtains the degree of backlight of the image data input in S101 from the luminance component extracted in S102. (S103)
Here, when the obtained degree of backlighting is low, the luminance improvement determination means 5 is an effect of processing using a relatively large scale distribution of the luminance component of the image data that is the output of the scale conversion means 6 of the luminance improvement means 7. Is predicted to be low, and the process proceeds to S106.
[0021]
Next, the face detection means 4 extracts a human face area from the image data input in S101. (S104)
Here, when a face area of a predetermined size or larger is not detected, the luminance improvement determination unit 5 uses a relatively large scale of the luminance component of the image data that is the output of the scale conversion unit 6 of the luminance improvement unit 7. It is predicted that the effect of the process using the distribution of is low, and the process proceeds to S106.
[0022]
Next, the luminance improvement determining unit 5 obtains the representative luminance value of the face area and the representative luminance value of the entire image, and the scale converting unit 6 of the luminance improving unit 7 uses the representative luminance value of the entire image and the representative luminance value of the face region. The effect of the processing using the distribution on a relatively large scale of the luminance component of the output image data is predicted. (S105)
Next, the luminance improvement determining means 5 determines a parameter for determining the degree of the luminance distribution to be improved according to the prediction result of the processing effect. (S106)
Here, if it is predicted that the effect of the process using the distribution of the luminance component of the image data, which is the output of the scale conversion unit 6 of the luminance improvement unit 7, on a relatively large scale is low, the process proceeds to S108.
[0023]
Next, the scale conversion means 6 obtains the luminance component distribution on a relatively large scale from the luminance components extracted in S102. (S107)
Next, the luminance improvement means 7 improves the distribution of the luminance component of the image data using the parameters obtained in S106 according to the prediction result of the processing effect. (S108)
Then, the image reproducing means 8 combines the improved luminance component and the color component converted in S102 to reconstruct the image data. (S109)
Details of each process of S103 to S109 will be described below.
[0024]
In S103, the backlight level of the image data input in S101 is obtained from the extracted luminance component.
[0025]
First, a luminance histogram representing the frequency of the luminance component for each luminance range is created from the luminance component of the image data. When the frequency of a predetermined luminance value range YT1 to YT2 corresponding to an intermediate portion of the luminance range is P1, and the frequency of the luminance value range YT2 to YTmax brighter than the intermediate portion is P2, the backlighting degree PB is expressed by the following (Equation 1). )
[0026]
PB = P2−kB · P1 (Formula 1)
However, 0 <YT1 <YT2 <YTmax, YTmax is the maximum value of the luminance range, and kB is a constant.
[0027]
This determination formula is based on the assumption that backlight is generated due to a large area of a bright part of an image in a backlight scene.
[0028]
Here, when the obtained backlight level is lower than a predetermined value, the luminance improvement determination unit 5 calculates the distribution of the luminance component of the image data that is the output of the scale conversion unit 6 of the luminance improvement unit 7 on a relatively large scale. Predict that the effect of the treatment used is low.
[0029]
The method for obtaining the degree of backlight is not limited to the above-described method. For example, the number of peak areas obtained from the luminance histogram as proposed by the present applicant in Japanese Patent Laid-Open No. 2000-134467 can be obtained and the degree of backlight can be obtained. Good. In this case, for example, when there are a plurality of peaks, the luminance improvement determination unit 5 has an effect of processing using a distribution on a relatively large scale of the luminance component of the image data that is the output of the scale conversion unit 6 of the luminance improvement unit 7. Expect low. Needless to say, the number of peak areas may be combined with (Equation 1) to obtain the degree of backlight.
[0030]
In S104, a human face area is extracted from the image data input in S101.
[0031]
An example of processing contents for detecting a face area from image data is shown in FIG. First, image data is reduced to a predetermined image size simultaneously with low-pass filter processing. Then, a region where each RGB component is locally small with the pixel value of the reduced image data is extracted as a candidate for the eye image region. Further, two extracted candidates are grouped, and it is determined whether or not the two regions grouped are eyes based on the uniformity of the size of the region, the difference in luminance, the angle with respect to the horizontal, and the like. (FIG. 3 (a)) For the group determined as the eye, a rectangular area is set based on a predetermined positional relationship parameter set in advance from the two positions. Then, the rectangular area is determined from the edge near the boundary of the rectangular area and the color information in the area. (FIG. 3 (c)) Specifically, the edge is determined by whether an edge component exceeding a predetermined intensity occupies a predetermined width or more in a predetermined width region near the boundary. For the color information, the average value of the pixel values in the rectangular area is calculated, and it is determined whether the average value is in the preset skin color area. If the edge and color information conditions are satisfied, the face area is determined. Then, the position information of the rectangular area determined as the face area is output as the face area.
[0032]
Here, when a face area of a predetermined size or larger is not detected, the luminance improvement determination unit 5 uses a relatively large scale of the luminance component of the image data that is the output of the scale conversion unit 6 of the luminance improvement unit 7. It is predicted that the effect of processing using the distribution of is low.
[0033]
Note that a method for detecting a face area from image data is described in, for example, IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE, VOL. 24, NO. 1, a scheme as described in Yang et al.'S report entitled “Detecting Faces in Images: A Survey” may be used.
[0034]
Next, the processes of S107 and S108 will be described, and then the processes of S105 and S106 will be described.
[0035]
In S107, the distribution of the luminance component (low frequency component of the luminance component) on a relatively large scale is obtained from the luminance component extracted in S102.
[0036]
In order to obtain a luminance component distribution on a large scale, for example, as in the prior art 1, a product-sum operation of the extracted luminance component and a Gaussian function is performed and output. (However, in the prior art 1, the product-sum operation is performed directly on each RGB pixel of the image data instead of the luminance component of the image data.) Here, in order to improve the image quality of the improved image data, It is more preferable to perform a product-sum operation with a plurality of Gaussian functions having different standard deviations to obtain a distribution of luminance components on a plurality of scales. The process for obtaining the luminance component distribution on a large scale as described above is hereinafter referred to as scale conversion.
[0037]
In S108, the distribution of the luminance component of the image data is improved using the parameters obtained in S106 according to the prediction result of the processing effect.
[0038]
First, the luminance improvement in the case where it is predicted by the luminance improvement determination means 5 that the processing effect using the distribution of the luminance component of the image data, which is the output of the scale conversion means 6 of the luminance improvement means 7, on a relatively large scale is high. Processing will be described.
[0039]
As an example of processing, according to the method based on the prior art 1, each distribution of the luminance component and the scaled luminance component is logarithmically converted and the difference is output. Furthermore, the weighted average of the differential outputs at different scales is taken as an improved luminance component. However, in this method, since the degree of improvement cannot be adjusted according to the image, the logarithm conversion output of the scaled luminance component is multiplied by a coefficient. This coefficient is a parameter for adjusting the degree of improvement. The output of the improved luminance component based on the processing described above is as shown in (Equation 2) below.
[Outside 1]
Figure 2005039457
[0040]
However, Y ′ (x, y), F n (x, y), w n , n, and γ are the output of the improved luminance component, the Gaussian function, the weight between the scales, the parameter representing the scale, and the degree of improvement, respectively. Is a parameter that represents * Represents a product-sum operation.
[0041]
Note that the weights between scales can be omitted by replacing the standard deviation of the scales (replaced with a simple average), and the inverse of the output of logarithmically transformed values as in (Equation 2). It has been found that returning to the original luminance unit by conversion (exp calculation) is preferable as improved image data image quality. Therefore, it is more preferable that the output shown in the following (Equation 3) is an improved luminance component.
[Outside 2]
Figure 2005039457
[0042]
However, Avg represents average value calculation.
[0043]
Instead of (Formula 3), the following (Formula 4) may be used.
[Outside 3]
Figure 2005039457
[0044]
More desirably, in order to adjust the luminance component of the entire image, the luminance distribution is converted by the processing of (Equation 5) shown below instead of (Equation 4) in the present embodiment.
[Outside 4]
Figure 2005039457
[0045]
However, γ 0 is a parameter for adjusting the luminance component of the entire image.
[0046]
Note that the average value calculation of the scale conversion output at a plurality of scales may be performed by the scale conversion processing of S107, and the average value of the scale conversion output at the plurality of scales may be used as the distribution of the luminance component after the scale conversion.
[0047]
Next, the brightness when it is predicted by the brightness improvement determination means 5 that the effect of the process using the distribution on the relatively large scale of the brightness component of the image data that is the output of the scale conversion means 6 of the brightness improvement means 7 is low. The improvement process will be described. In this case, even if normal exposure correction is performed by digital image processing, it is expected that the same improvement as the result of performing the luminance improvement processing described above can be achieved. As a specific processing example, assuming that γ = 0 in (Expression 5), luminance conversion according to the following (Expression 6) is performed.
Y ′ (x, y) = Y (x, y) y0 (Formula 6)
Compared with the processing of (Equation 5), according to (Equation 6), it is not necessary to obtain a distribution on a relatively large scale in the processing of scale conversion, and it is also necessary to calculate and divide the denominator of (Equation 5) There is no.
[0048]
Next, the processing of S105 and S106 for determining parameters in the above-described luminance improvement processing will be described.
[0049]
In S105, the representative brightness value of the face area and the representative brightness value of the entire image are obtained, and the image data output from the scale conversion means 6 of the brightness improving means 7 is obtained from the representative brightness value of the entire image and the representative brightness value of the face area. Predict the effect of processing using a relatively large scale distribution of luminance components.
[0050]
First, as the luminance representative value of the entire image, calculates the average value of the luminance values, and Y A. On the other hand, the luminance value Y AT to a target image to be improved with respect to the luminance representative value Y A of the entire image is stored as a table, a target image to be improved for the entire image representative luminance values Y A obtained and The luminance value Y AT to be obtained is obtained by referring to the table. The example parameters gamma 0 as luminance value Y A of the entire image is the luminance value Y AT to the target by correcting the luminance of the entire image which is based on equation (6), the following equation (7) It can ask for.
[Outside 5]
Figure 2005039457
[0051]
Also, among the luminance component of the image data, it calculates the average value of the luminance value of the face area, and Y f. However, there are non-skinned objects such as eyes and hair in the rectangular area detected as the face area, but here, for the pixels in the face area, the average value of only the luminance values above a predetermined ratio is calculated from the brighter one. Thus, it is set as a representative value of luminance corresponding to the skin (referred to as human skin representative luminance value). A predetermined value (referred to as a human skin target luminance value) is set in advance as a preferable value of the luminance value in the human skin, and a weighted average of the human skin representative luminance value and the human skin target luminance value with a predetermined weight is obtained. Set as the target brightness value. Here, when the human skin representative luminance value is Y f and the target luminance value after the weighted average is Y fT , γ such that the luminance value Y f becomes a predetermined luminance value is set as a parameter representing the degree of improvement. Considering that the human skin representative luminance value Y f is corrected by the previously obtained parameter γ 0 , the corrected human skin representative luminance value Y ′ f is obtained by the following (Equation 8).
[Outside 6]
Figure 2005039457
[0052]
here,
Y ′ f <Y fT (Formula 9)
In this case, it can be predicted that there is an effect of the processing using the distribution of the luminance component of the image data which is the output of the scale conversion unit 6 of the luminance improvement unit 7 on a relatively large scale. Therefore, if (Equation 9) is satisfied, the luminance improvement determination means 5 is an effect of processing using a relatively large scale distribution of the luminance component of the image data that is the output of the scale conversion means 6 of the luminance improvement means 7. Is predicted to be high, and otherwise the processing effect is predicted to be low.
[0053]
The determination formula of (Expression 9) may be set as shown in the following (Expression 10) by providing a predetermined positive constant C.
[0054]
Y ′ f + C <Y fT (Formula 10)
When the effect of the process using the distribution on the relatively large scale of the luminance component of the image data, which is the output of the scale converting unit 6 of the luminance improving unit 7, is subtle, an exposure correction process with a low processing cost is performed. Can do.
[0055]
In the first place, when the human skin representative luminance value is not significantly darker than the human skin target luminance value, it is not necessary to improve the luminance of the face area in the image, so the luminance improvement determining unit 5 is the scale of the luminance improving unit 7. Needless to say, it may be predicted that the effect of the processing using the distribution on the relatively large scale of the luminance component of the image data that is the output of the conversion means 6 is low.
[0056]
In S106, a parameter for determining the degree of the luminance distribution to be improved is determined according to the prediction results of S103 to S105.
[0057]
When it is predicted that the effect of processing using the distribution of the luminance component of the image data, which is the output of the scale conversion unit 6 of the luminance improvement unit 7, on a relatively large scale will be low, the parameter obtained by Expression (7) γ 0 is output as it is, and the process proceeds to S108.
[0058]
In addition, when it is predicted that the processing effect using the distribution of the luminance component of the image data that is the output of the scale conversion unit 6 of the luminance improvement unit 7 on a relatively large scale is high, the corrected value obtained in S105 is obtained. Let γ be a parameter representing the degree of improvement so that the human skin representative luminance value Y ′ f becomes the target luminance value after weighted average Y fT . This γ is obtained by (Equation 11) shown below, assuming that the inside of [] in the denominator of (Equation 5) is almost equal to Y (x, y), and replacing the numerator with Y ′ f. it can.
[Outside 7]
Figure 2005039457
[0059]
The luminance conversion process is performed in S108 according to the parameters output in S106.
[0060]
In S109, the luminance component improved in S108 and the color component converted in S102 are combined to reconstruct the image data.
[0061]
Here, first, the color component is corrected in accordance with the change of the luminance component so that the color of the reconstructed image data does not change as much as possible. For example, the color components X (x, y) and Z (x, y) are multiplied by the ratio Y ′ (x, y) / Y (x, y) before and after the change of the luminance component, respectively. Then, RGB data is obtained from the X, Y, and Z data. The process here is an inverse transformation of the process in S102. Therefore, the matrix operation of 3 rows and 3 columns and the inverse gamma conversion process are performed to obtain 8-bit RGB output.
[0062]
Needless to say, if another method such as RGB to YCbCr conversion is used as the method of extracting the luminance component in S102, the corresponding inverse conversion process should be performed in this process.
[0063]
In the above example, the method for optimally improving the brightness distribution according to the image data processed based on the prior art 1 has been described. However, the prior art using the luminance component of the digital image and its low frequency component is described. Needless to say, the present invention can be applied to 2 and prior art 3.
[0064]
Further, in the processing of S108, as a value in [] of the denominator of (Expression 5), acm Transactions on Graphics, JULY 2002, Vol. 21, no. 3 may be applied as described in the report of Durand et al. Entitled "Fast Bilateral Filtering for the Display of High-Dynamic-Range Images". In this case, the Bilatal Filtering process is performed on the luminance component in advance in the scale conversion process of S107.
[0065]
In the example described above, the image data is analyzed to predict the effect of processing using the distribution of the luminance component of the image data on a relatively large scale. For example, from JEITA, Japan Electronics and Information Technology Industries Association The distribution of the luminance component of the image data on a relatively large scale is used by using the incidental information of the image of the digital camera described in the published “Image File Format Standard for Digital Still Camera Exif 2.2”. The effect of processing can also be predicted.
[0066]
For example, if the incidental information of image data taken with a digital camera is analyzed and the exposure mode is not automatic exposure, the brightness of the image data may have been set by the user because the user may have intentionally set the image brightness. It is better not to improve the luminance distribution of the image data because it is predicted that the effect of the processing using the distribution of components on a relatively large scale is low.
[0067]
Also, the incidental information of image data taken with a digital camera is analyzed, and when the flash is flashed, there is little possibility of a backlight scene, so the distribution of the luminance component of the image data on a relatively large scale is used. It is better not to improve the luminance distribution of the image data because it is predicted that the effect of the processed processing will be low.
[0068]
In addition, when the incidental information of image data taken with a digital camera is analyzed and the shooting mode is other than standard or portrait, the main subject is less likely to be a person, so a relatively large measure of the luminance component of the image data It is better not to improve the luminance distribution of the image data by predicting that the effect of the processing using the distribution in is low.
[0069]
As described above, by analyzing the incidental information of the image data captured by the digital camera, it is possible to realize luminance correction with high processing efficiency according to necessity. In addition, the prediction of the effect of the process using the distribution on the relatively large scale of the luminance component of the image data using the incidental information of these image data is performed by analyzing the image data and the relatively large luminance component of the image data. Needless to say, it may be used in combination with a brightness improvement process in which the effect of the process using the distribution on the scale is predicted.
[0070]
Further, in the example described above, the description has been made assuming that 8-bit RGB data is processed as image data to be processed. However, when reproducing optimal 8-bit RGB image data from 16-bit RGB image data, Is also applicable.
[0071]
【The invention's effect】
As described above, according to the present invention, when the processing effect using the output of the scale conversion unit is predicted and the processing effect is predicted to be high, the brightness improvement unit uses the output of the scale conversion unit. If the brightness distribution of the image data is improved and the processing effect is predicted to be low, the brightness improvement means improves the brightness distribution of the image data without using the output of the scale conversion means. The brightness distribution improvement level is automatically adjusted for backlit scenes, especially image data of human faces taken in a backlit state, and brightness distribution can be optimized optimally according to the image data being processed. In addition, it is possible to perform processing with a relatively low processing cost on image data obtained by capturing a scene that is expected to have a weak processing effect.
[Brief description of the drawings]
FIG. 1 is a diagram showing a configuration of an embodiment in an image processing system.
FIG. 2 is a view showing an algorithm of an application program in the image processing system.
FIG. 3 is a view for explaining processing details of face detection in the embodiment.

Claims (12)

画像データから輝度成分を抽出する輝度抽出手段と、
前記輝度成分の比較的大きな尺度での分布を求めるスケール変換手段と、
前記画像データの輝度分布を改善する輝度改善手段と、
前記輝度改善手段の出力を新たな画像の輝度分布として画像データを再生する画像再生手段とを備えた画像処理装置において、
前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果を予測し、処理効果が高いと予測した場合には、前記輝度改善手段は前記スケール変換手段の出力を用いて前記画像データの輝度分布を改善し、処理効果が低いと予測した場合には、前記輝度改善手段は前記スケール変換手段の出力を用いずに前記画像データの輝度分布を改善することを特徴とする画像処理装置。
Luminance extraction means for extracting luminance components from the image data;
A scale conversion means for obtaining a distribution on a relatively large scale of the luminance component;
Brightness improvement means for improving the brightness distribution of the image data;
In an image processing apparatus comprising image reproduction means for reproducing image data using the output of the luminance improvement means as a new image luminance distribution,
When the processing effect using the output of the scale conversion unit of the luminance improvement unit is predicted and the processing effect is predicted to be high, the luminance improvement unit uses the output of the scale conversion unit to calculate the luminance of the image data. An image processing apparatus, wherein when the distribution is improved and the processing effect is predicted to be low, the luminance improvement means improves the luminance distribution of the image data without using the output of the scale conversion means.
さらに、前記画像データの逆光の度合いを検出する逆光検出手段を備え、前記逆光の度合いから前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果を予測することを特徴とする請求項1の画像処理装置。2. The apparatus according to claim 1, further comprising a backlight detection unit that detects a degree of backlight of the image data, and predicting a processing effect using an output of the scale conversion unit of the luminance improvement unit from the degree of backlight. Image processing apparatus. 前記画像データから顔領域を検出する顔検出手段を備え、前記顔検出手段の出力から前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果を予測することを特徴とする請求項1または請求項2の画像処理装置。2. The method according to claim 1, further comprising face detection means for detecting a face area from the image data, wherein a processing effect using the output of the scale conversion means of the brightness improvement means is predicted from the output of the face detection means. The image processing apparatus according to claim 2. 前記顔検出手段が顔領域を検出しなかった場合に前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果が低いと予測することを特徴とする請求項3の画像処理装置。4. The image processing apparatus according to claim 3, wherein when the face detection unit does not detect a face area, the processing effect using the output of the scale conversion unit of the brightness improvement unit is predicted to be low. 前記顔検出手段が検出した顔領域の大きさが所定の大きさ以下の場合に前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果が低いと予測することを特徴とする請求項4の画像処理装置。5. The processing effect using the output of the scale conversion unit of the luminance improvement unit is predicted to be low when the size of the face area detected by the face detection unit is equal to or smaller than a predetermined size. Image processing apparatus. 前記顔検出手段の出力である顔領域の輝度分布から前記顔領域の輝度代表値を求め、前記顔領域の輝度代表値が所定値以上の場合に前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果が低いと予測することを特徴とする請求項5の画像処理装置。The brightness representative value of the face area is obtained from the brightness distribution of the face area, which is the output of the face detection means, and the output of the scale conversion means of the brightness improving means is obtained when the brightness representative value of the face area is equal to or greater than a predetermined value. 6. The image processing apparatus according to claim 5, wherein the processing effect used is predicted to be low. 前記画像データの輝度分布から画像全体の輝度代表値を求め、前記画像全体の輝度代表値と前記顔領域の輝度代表値から前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果を予測することを特徴とする請求項6の画像処理装置。A luminance representative value of the entire image is obtained from the luminance distribution of the image data, and a processing effect using the output of the scale converting unit of the luminance improving unit is predicted from the luminance representative value of the entire image and the luminance representative value of the face area. The image processing apparatus according to claim 6. 前記画像データの付帯情報を解析し、露出モードが露出自動でない場合には前記画像データの輝度分布の改善を行わないことを特徴とする請求項1ないし請求項7のいずれかに記載の画像処理装置。8. The image processing according to claim 1, wherein the incidental information of the image data is analyzed, and the luminance distribution of the image data is not improved when the exposure mode is not automatic exposure. apparatus. 前記画像データの付帯情報を解析し、フラッシュがストロボ発光の場合には前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果が低いと予測することを特徴とする請求項1ないし請求項8のいずれかに記載の画像処理装置。The supplementary information of the image data is analyzed, and when the flash is stroboscopic light emission, it is predicted that the processing effect using the output of the scale conversion means of the brightness improvement means is low. The image processing apparatus according to any one of 8. 前記画像データの付帯情報を解析し、撮影モードが標準または人物以外の場合には前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果が低いと予測することを特徴とする請求項1ないし請求項9のいずれかに記載の画像処理装置。The incidental information of the image data is analyzed, and when the shooting mode is other than standard or human, it is predicted that the processing effect using the output of the scale conversion unit of the luminance improvement unit is low. The image processing apparatus according to claim 9. 画像データから輝度成分を抽出する輝度抽出工程と、
前記輝度成分の比較的大きな尺度での分布を求めるスケール変換工程と、
前記画像データの輝度分布を改善する輝度改善工程と、
前記輝度改善手段の出力を新たな画像の輝度分布として画像データを再生する画像再生工程とを備えた画像処理方法において、
前記輝度改善手段の前記スケール変換手段の出力を用いた処理効果を予測し、処理効果が高いと予測した場合には、前記輝度改善工程は前記スケール変換手段の出力を用いて前記画像データの輝度分布を改善し、処理効果が低いと予測した場合には、前記輝度改善工程は前記スケール変換手段の出力を用いずに前記画像データの輝度分布を改善することを特徴とする画像処理方法。
A luminance extraction step of extracting luminance components from the image data;
A scale conversion step for obtaining a distribution on a relatively large scale of the luminance component;
A luminance improving step for improving the luminance distribution of the image data;
In an image processing method comprising: an image reproduction step of reproducing image data with the output of the luminance improvement means as the luminance distribution of a new image;
When the processing effect using the output of the scale conversion unit of the luminance improvement unit is predicted and the processing effect is predicted to be high, the luminance improvement step uses the output of the scale conversion unit to determine the luminance of the image data. An image processing method characterized in that when the distribution is improved and the processing effect is predicted to be low, the luminance improvement step improves the luminance distribution of the image data without using the output of the scale conversion means.
請求項11記載の画像処理方法をコンピュータを用いて実現するためのプログラム。The program for implement | achieving the image processing method of Claim 11 using a computer.
JP2003199122A 2003-07-18 2003-07-18 Image processing apparatus and method Pending JP2005039457A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2003199122A JP2005039457A (en) 2003-07-18 2003-07-18 Image processing apparatus and method
US10/887,817 US7469072B2 (en) 2003-07-18 2004-07-12 Image processing apparatus and method
US12/273,687 US7650045B2 (en) 2003-07-18 2008-11-19 Image processing apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003199122A JP2005039457A (en) 2003-07-18 2003-07-18 Image processing apparatus and method

Publications (1)

Publication Number Publication Date
JP2005039457A true JP2005039457A (en) 2005-02-10

Family

ID=34208677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003199122A Pending JP2005039457A (en) 2003-07-18 2003-07-18 Image processing apparatus and method

Country Status (1)

Country Link
JP (1) JP2005039457A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010039758A (en) * 2008-08-05 2010-02-18 Canon Inc Image processor and image processing method
JP2012178191A (en) * 2012-06-18 2012-09-13 Canon Inc Image processing apparatus and image processing method
JP2013179485A (en) * 2012-02-28 2013-09-09 Canon Inc Image processing apparatus and control method thereof
JP2015076642A (en) * 2013-10-04 2015-04-20 富士ゼロックス株式会社 Image processing device and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010039758A (en) * 2008-08-05 2010-02-18 Canon Inc Image processor and image processing method
US8385680B2 (en) 2008-08-05 2013-02-26 Canon Kabushiki Kaisha Image processing apparatus and image processing method
JP2013179485A (en) * 2012-02-28 2013-09-09 Canon Inc Image processing apparatus and control method thereof
JP2012178191A (en) * 2012-06-18 2012-09-13 Canon Inc Image processing apparatus and image processing method
JP2015076642A (en) * 2013-10-04 2015-04-20 富士ゼロックス株式会社 Image processing device and program

Similar Documents

Publication Publication Date Title
US7650045B2 (en) Image processing apparatus and method
JP3880553B2 (en) Image processing method and apparatus
US7876974B2 (en) Method for improving digital images and an image sensor for sensing the same
JP5389903B2 (en) Optimal video selection
US8977056B2 (en) Face detection using division-generated Haar-like features for illumination invariance
US8385680B2 (en) Image processing apparatus and image processing method
US7409083B2 (en) Image processing method and apparatus
RU2400815C2 (en) Method of enhancing digital image quality
JP4639037B2 (en) Image processing method and apparatus
US20040207734A1 (en) Image processing apparatus for generating a wide dynamic range image
US20110285871A1 (en) Image processing apparatus, image processing method, and computer-readable medium
JP2004357277A (en) Digital image processing method
JP2013055712A (en) Gradation correction method, gradation correction device, gradation correction program and image apparatus
JP5457652B2 (en) Image processing apparatus and method
JP2004030670A (en) Enhancement method for color tone feature of digital image
JP2010130299A (en) Image signal processing apparatus and method, and program
CN112351195B (en) Image processing method, device and electronic system
JP2001313844A (en) Method and device for executing local color correction
JP3673092B2 (en) Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program
JP4147155B2 (en) Image processing apparatus and method
JP4125191B2 (en) Image processing apparatus and method
JP2005039457A (en) Image processing apparatus and method
JP2005039456A (en) Image processing method and apparatus
JP2008147714A (en) Image processor and image processing method
JP2005039455A (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060718

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071218

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080218

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20080507