JP4398595B2 - Image processing apparatus and program - Google Patents

Image processing apparatus and program Download PDF

Info

Publication number
JP4398595B2
JP4398595B2 JP2001073692A JP2001073692A JP4398595B2 JP 4398595 B2 JP4398595 B2 JP 4398595B2 JP 2001073692 A JP2001073692 A JP 2001073692A JP 2001073692 A JP2001073692 A JP 2001073692A JP 4398595 B2 JP4398595 B2 JP 4398595B2
Authority
JP
Japan
Prior art keywords
exposure correction
exposure
correction
dynamic range
image
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
Application number
JP2001073692A
Other languages
Japanese (ja)
Other versions
JP2002281510A (en
Inventor
由紀 浅野
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001073692A priority Critical patent/JP4398595B2/en
Publication of JP2002281510A publication Critical patent/JP2002281510A/en
Application granted granted Critical
Publication of JP4398595B2 publication Critical patent/JP4398595B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

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

Description

【0001】
【発明の属する技術分野】
この発明は、画像処理装置及びプログラムに関する。
【0002】
【従来の技術】
特開平11−136514号公報には、均等サンプリングデータから、エッジ変化の大きい部分を主被写体として検出し、その中央値より露出補正量を設定する技術が開示されている。また、γ変換カーブを使用して露出補正を行っている点が開示されている。
【0003】
特開2000−13624公報には、複数のハイライト検出方法を有し、原画像の特性に応じてハイライトポイントを選択し、色処理条件(画像の明るさを変えるための露出補正処理)を異ならせる技術が開示されている。
【0004】
【発明が解決しようとする課題】
従来のカメラ及びデジタルカメラ等には、撮影時の露出を常に最適に保つための自動露出制御装置が設けられている。露出制御方式には、光量検出のため画面を複数の適当な領域に分割し、領域ごとの重み付けを行い、加重平均を取り、絞やシャッタスピードなどを調節する方法が一般的で、単に画面全体の加重平均を取る方式は平均測光方式と呼ばれる。また,撮影時、主被写体は画面中心になることが多いため、中央部を重点的に測光する方式は、中央重点測光方式と呼ばれる。
【0005】
これらの方式では、測光エリアの明るさに対する平均値や中央値で露出を判断する。しかし、『明るさの平均値、又は中央値』が必ずしも主被写体の適正露出とは限らない。例えば、主被写体の真後ろに光源が存在し、背景と主被写体との輝度差が大きい、『真逆光』状態で撮影したり、夜景を背景に主被写体を撮影(以下、このような撮影状況を『夜間撮影』と呼ぶ)する場合、デジタルカメラの機能である『夜景モード』で撮影しても主被写体はアンダーになってしまう。
【0006】
あるいは、夜間撮影でもフラッシュを用いると、シャッタスピードは固定であるため、フラッシュの光が弱いと主被写体はアンダーになってしまう。
【0007】
すなわち、現在のデジタルカメラにおける自動露出制御方式ではさまざまな撮影条件に対応できていない。
【0008】
近年、パソコンやインターネット、家庭用プリンタの普及により、デジタルデータで写真画像を扱う機会が増えており、それに伴いデジタル写真画像データ(以下、単に『画像データ』と呼ぶ)を自動的に露出補正する技術も多数提案されている。
【0009】
ここで、露出補正とは、シーンに対して不適切な明るさの画像をシーンに適した明るさに調節することを意味する。例えば、露出不足で全体に暗い被写体や、逆光で暗くなっている被写体を明るくしたり、露出オーバな被写体を暗くしたりすることである。カメラでの露出補正は、レンズに入る入射光量を調節するために絞りやシャッタスピードを変える方法が一般的である。また、プリンタやディスプレイでは、入出力変換関数等を用いて、入力信号の明るさに対し出力信号の明るさを最適化するための処理等を意味する。
【0010】
前記特開平11−136514号公報に開示の技術では、画像データからエッジ変化の大きい領域を主被写体として検出し、その中央値より露出補正量を設定する。しかし、エッジ部分(すなわちコントラスト変化の大きい部分)は必ずしも主被写体と一致しないため、その中央値を主被写体の特徴量と断定できないという不具合がある。
【0011】
ここで、図9に露出補正の必要な画像、図10に露出補正の不必要な画像の輝度ヒストグラムを示す。どちらの画像も暗所で撮影されており、ヒストグラムの中央値は非常に低い。しかし、露出補正が不必要な画像は図中の矢印で示す部分にある程度のハイライト部を含んでいることがわかる。
【0012】
つまり、被写体抽出が不確かなのであれば被写体抽出を行わず、ある所定割合を超えるハイライト部がある領域に存在するか否かを調べれば良く、存在すればそれ以上の補正を行う必要はないことになる。
【0013】
また、特開平11−136514号公報に開示されている、エッジ部分を得るための処理は複雑なため、処理速度も大きくなってしまう不具合がある。
【0014】
また、特開平11−136514号公報の技術では、γ変換カーブを使用して露出補正を行っているが、そのような変換カーブを用いると低レベル領域の持ち上がりが大きいためノイズが強調されてしまうという不具合もある。
【0015】
この発明の目的は、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことである。
【0016】
この発明の目的は、被写体抽出などを行わず簡単にかつ迅速に露出補正の必要性を判断し、また、適切な補正量を得ることである。
【0017】
この発明の目的は、シーンに応じた高精細な補正効果を得ることである。
【0018】
この発明の目的は、過度な露出補正を防ぎ原画の雰囲気を保つことである。
【0019】
この発明の目的は、シーンに適したコントラスト強調を行うことである。
【0020】
この発明の目的は、低中領域のコントラストを強調しつつ露出補正を行ない、また、適切なトーンカーブを作成することである。
【0021】
この発明の目的は、接点の出力レベルにおいて階調再現性を保つことである。
【0022】
この発明の目的は、過度な露出補正を防ぎ、また、速度を向上させることである。
【0023】
この発明の目的は、高精細な補正を行うことである。
【0024】
【課題を解決するための手段】
請求項1に記載の発明は、画像データを最適露出に補正するための画像処理装置において、画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正を行うダイナミックレンジ拡大手段と、前記ダイナミックレンジ拡大手段によるダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する手段と、前記判断する手段により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更して露出補正を行う露出補正手段と、を備えていることを特徴とする画像処理装置である。
【0025】
したがって、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、明るさを表すヒストグラムにおける頻度積算値の所定割合に対応するレベル値を用いて、所定割合以上のハイライト部が存在するか否かを判断することにより、被写体抽出などを行わず簡単にかつ迅速に露出補正の必要性を判断することができる。
【0026】
請求項2に記載の発明は、請求項1に記載の画像処理装置において、前記露出補正手段は、前記ヒストグラム中央値より補正量を決定することを特徴とする。
【0027】
したがって、輝度ヒストグラムの中央値から補正量を決定することにより、適切な補正量を得ることができる。
【0028】
請求項3に記載の発明は、請求項1又は2に記載の画像処理装置において、前記露出補正手段は、前記露出補正量を変更するためのハイライト部が存在する割合をシーンに応じて異ならせることを特徴とする。
【0029】
したがって、露出補正量を変更するためのハイライト部が存在する割合を、逆光画像や夜間人物画像などのシーンで異ならせることにより、シーンに応じた高精細な補正効果を得ることができる。
【0030】
請求項4に記載の発明は、請求項1〜3の何れかの一に記載の画像処理装置において、前記露出補正手段は、前記ダイナミックレンジ拡大手段における処理の影響度合いと、ハイライト部が存在する割合とに応じて前記露出補正量を変更し露出補正を行うことを特徴とする。
【0031】
したがって、ダイナミックレンジ拡大処理の影響度合いが大きかった絵柄に対し、更なる露出補正を行う必要があるか否かを検討することにより、過度な露出補正を防ぎ原画の雰囲気を保つことができる。
【0032】
請求項5に記載の発明は、請求項1〜4の何れかの一に記載の画像処理装置において、前記ダイナミックレンジ拡大手段は、少なくとも逆光状態に応じて前記補正を変えることを特徴とする。
【0033】
したがって、シーンを少なくとも真逆光とその他に分け、各々に対しダイナミックレンジの再現領域を異ならせることにより、シーンに適したコントラスト強調を行うことができる。
【0034】
請求項6に記載の発明は、請求項1〜5の何れかの一に記載の画像処理装置において、前記露出補正手段は、前記露出補正としてトーンカーブ補正を行い、この場合のトーンカーブの形状は入力レベルの低領域において1次直線、高領域において上に凸の2次放物線として、シーンや露出に応じて接点位置を異ならせることを特徴とする。
【0035】
したがって、ダークレベルに偏っている画像情報を補正する際に、トーンカーブの形は低領域に直線、高領域に上向き凸の2次放物線を用いることにより、低中領域のコントラストを強調しつつ露出補正を行うことができる。また、シーンや露光状態に応じ、直線と放物線の接点を異ならせることにより、適切なトーンカーブを作成することができる。
【0036】
請求項7に記載の発明は、請求項6に記載の画像処理装置において、前記露出補正手段は、前記2つのトーンカーブを接点において接線接続することを特徴とする。
【0037】
したがって、直線と放物線が接点において接線接続することにより、接点の出力レベルにおいて階調再現性を保つことができる。
【0038】
請求項8に記載の発明は、請求項1〜7の何れかの一に記載の画像処理装置において、露出補正手段は、前記ハイライト部を画像の2次元位置座標平面上で連続領域としていることを特徴とする。
【0039】
したがって、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、画素ごとに変換を行うのではなく、補正テーブルを作成し色変換処理を行うことにより、速度を向上させることできる。
【0040】
請求項9に記載の発明は、画像データを最適露出に補正するための画像処理装置において、画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正係数を算出するダイナミックレンジ拡大補正係数算出手段と、ダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する手段と、前記判断する手段により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更し露出補正を行うための補正係数を算出する露出補正係数算出手段と、前記ダイナミックレンジ拡大補正係数及び前記露出補正係数とを用いて補正テーブルを作成して色変換処理を行う変換手段と、を備えていることを特徴とする画像処理装置である。
【0041】
したがって、意味のあるハイライト部のみを用いて露出補正の必要性を判断することにより、高精細な補正を行うことができる。
【0042】
請求項10に記載の発明は、画像データを最適露出に補正するための画像処理をコンピュータに実行させるコンピュータに読み取り可能なプログラムにおいて、画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正を行うダイナミックレンジ拡大処理と、前記ダイナミックレンジ拡大処理によるダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する処理と、前記判断する処理により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更し露出補正を行う露出補正処理と、コンピュータに実行させることを特徴とするプログラムである。
【0043】
したがって、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、明るさを表すヒストグラムにおける頻度積算値の所定割合に対応するレベル値を用いて、所定割合以上のハイライト部が存在するか否かを判断することにより、被写体抽出などを行わず簡単にかつ迅速に露出補正の必要性を判断することができる。
【0044】
請求項11に記載の発明は、請求項10に記載のプログラムにおいて、前記露出補正処理は、前記ヒストグラム中央値より補正量を決定することを特徴とする。
【0045】
したがって、輝度ヒストグラムの中央値から補正量を決定することにより、適切な補正量を得ることができる。
【0046】
請求項12に記載の発明において、請求項10又は11に記載のプログラムにおいて、前記露出補正処理は、前記露出補正量を変更するためのハイライト部が存在する割合をシーンに応じて異ならせることを特徴とする。
【0047】
したがって、露出補正量を変更するためのハイライト部が存在する割合を、逆光画像や夜間人物画像などのシーンで異ならせることにより、シーンに応じた高精細な補正効果を得ることができる。
【0048】
請求項13に記載の発明は、請求項10〜12の何れかの一に記載のプログラムにおいて、前記露出補正処理は、前記ダイナミックレンジ拡大手段における処理の影響度合いと、ハイライト部が存在する割合とに応じて前記露出補正量を変更し露出補正を行うことを特徴とする。
【0049】
したがって、ダイナミックレンジ拡大処理の影響度合いが大きかった絵柄に対し、更なる露出補正を行う必要があるか否かを検討することにより、過度な露出補正を防ぎ原画の雰囲気を保つことができる。
【0050】
請求項14に記載の発明は、請求項10〜13の何れかの一に記載のプログラムにおいて、前記ダイナミックレンジ拡大処理は、少なくとも逆光状態に応じて前記補正を変えることを特徴とする。
【0051】
したがって、シーンを少なくとも真逆光とその他に分け、各々に対しダイナミックレンジの再現領域を異ならせることにより、シーンに適したコントラスト強調を行うことができる。
【0052】
請求項15に記載の発明は、請求項10〜14の何れかの一に記載のプログラムにおいて、前記露出補正処理は、前記露出補正としてトーンカーブ補正を行い、この場合のトーンカーブの形状は入力レベルの低領域において1次直線、高領域において上に凸の2次放物線として、シーンや露出に応じて接点位置を異ならせることを特徴とする。
【0053】
したがって、ダークレベルに偏っている画像情報を補正する際に、トーンカーブの形は低領域に直線、高領域に上向き凸の2次放物線を用いることにより、低中領域のコントラストを強調しつつ露出補正を行うことができる。また、シーンや露光状態に応じ、直線と放物線の接点を異ならせることにより、適切なトーンカーブを作成することができる。
【0054】
請求項16に記載の発明は、請求項15に記載のプログラムにおいて、前記露出補正処理は、前記2つのトーンカーブを接点において接線接続することを特徴とする。
【0055】
したがって、直線と放物線が接点において接線接続することにより、接点の出力レベルにおいて階調再現性を保つことができる。
【0056】
請求項17に記載の発明は、請求項10〜16の何れかの一に記載のプログラムにおいて、露出補正処理は、前記ハイライト部を画像の2次元位置座標平面上で連続領域としていることを特徴とする。
【0057】
したがって、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、画素ごとに変換を行うのではなく、補正テーブルを作成し色変換処理を行うことにより、速度を向上させることできる。
【0058】
請求項18に記載の発明は、画像データを最適露出に補正するための画像処理をコンピュータに実行させるコンピュータに読み取り可能なプログラムにおいて、画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正係数を算出するダイナミックレンジ拡大補正係数算出処理と、ダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する処理と、前記判断する処理により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更し露出補正を行うための補正係数を算出する露出補正係数算出処理と、前記ダイナミックレンジ拡大補正係数及び前記露出補正係数とを用いて補正テーブルを作成して色変換処理を行う変換処理と、をコンピュータに実行させることを特徴とするプログラムである。
【0059】
したがって、意味のあるハイライト部のみを用いて露出補正の必要性を判断することにより、高精細な補正を行うことができる。
【0060】
【発明の実施の形態】
この発明の一実施の形態について説明する。
【0061】
図1は、この発明の一実施の形態である画像処理装置101の概略構成を示す機能ブロック図であり、図2は、その具体的ハードウェア構成の一例を示すブロック図である。
【0062】
図1において、画像入力装置100は、写真などをマトリックス状の画素として表した実写の画像データを画像処理装置101に出力する。画像処理装置101は複数の画像処理を行うにあたり、各画像処理(ダイナミックレンジ拡大手段102、露出補正手段103)において最適な評価手段に基づいて評価値を算出し、評価値を用いて画像処理を実行する。画像出力装置104は、画像処理した画像データを、ドットマトリクス状の画素で出力する。
【0063】
画像入力装置の具体例は、図2におけるスキャナ200及びデジタルカメラ201又はビデオカメラ202などが該当し、画像処理装置の具体例は、コンピュータ210、ハードディスク203、キーボード204、CD−ROMドライブ205、フロッピーディスクドライブ206及びモデム207などからなるコンピュータシステムが該当し、画像出力装置104の具体例は、プリンタ209やディスプレイ208が該当する。
【0064】
本実施の形態の場合、画像データとしては写真などの実写データが適している。なお、コンピュータ210は、CD−ROMなどの記憶媒体からプログラムを読取ってハードディスク203にインストールし、このソフトウェアにより本実施の形態の機能を実現している。また、モデム207については公衆通信回線に接続され、外部のネットワークを介して接続し、プログラムやデータをダウンロードしてハードディスク203にインストールし、このソフトウェアにより本実施の形態の機能を実現してもよい。
【0065】
一方、コンピュータ210内では、オペレーティングシステム212が稼動しており、プリンタやディスプレイに対応したプリンタドライバ214やディスプレイドライバ213が組み込まれている。また、画像処理アプリケーション211はオペレーティングシステムにて処理の実行を制御され、必要に応じてプリンタドライバ214やディスプレイドライバ213と連携し、所定の画像処理を実行する。よって、画像処理装置としてこのコンピュータの役割は、RGBの階調データを入力して最適な画像処理を施したRGBの階調データを作成し、ディスプレイドライバ213を介してディスプレイ208に表示させるとともに、プリンタドライバ214を介してCMYもしくはCMYKの2値データに変換してプリンタ209に印刷させることになる。
【0066】
上述した画像の評価値の取得とそれに伴う画像処理は、具体的には上記コンピュータ内にて,図3に示すフローチャートに対応した画像処理プログラムで行っている。
【0067】
以下逆光以外のシーンを想定して、かかる処理について説明する。
【0068】
まず、入力手段により画像データを入力する(300)。次に、RGB頻度分布を適当な再現領域に拡大するために画素をサンプリングし(301)、RGB頻度分布の最大値Maxをハイライトポイント、最小値Minをシャドーポイントとして算出し(308)、以下の式でダイナミックレンジを拡大するための係数:α、βを求める(309)。
【0069】
α= 255/(Max - Min)
β= {(1-α)・(255・Min)}/{255-(Max - Min )} … (1)
ここでαに制限を設け、α>1.7 の場合、α≡1.7 とする。
【0070】
また、画素をサンプリングする際に下記の式で輝度を算出し、輝度ヒストグラムを作成する(302)。
【0071】
輝度:Y = 0.299・R + 0.587・G + 0.114・B … (2)
【0072】
輝度ヒストグラムより、累積頻度95%に対応するレベルL1を算出する(302)。L1は、ダイナミックレンジ拡大手段102後の画像データに所定割合以上のハイライト部が存在するか否かを判断するための評価値L2を算出するための値である。
【0073】
さらに、輝度ヒストグラムの累積頻度50%に対応するレベル(中央値)M1を算出する(302)。M1は、前記ハイライト部が存在せず、露出補正が必要な場合に補正量を決定するための評価値M2を算出するための値である。
【0074】
ここで、露出補正とは、シーンに対して不適切な明るさの画像をシーンに適した明るさに調節することを意味する。例えば、露出不足で全体に暗い被写体や、逆光で暗くなっている被写体を明るくしたり、露出オーバな被写体を暗くしたりすることである。プリンタやディスプレイなどの表示系では、入出力変換関数やルックアップテーブル等を用いて明るさの不適切な入力信号に対し出力信号の明るさを最適化するための処理を意味する。
【0075】
次に、任意画素における輝度値YIN(i)(i=1…N,N:総画素数)より、(1)式で算出したα,βを用いてダイナミックレンジ補正係数C1(i)を、各画素iごとに求め、入力信号(RIN(i),GIN(i),BIN(i))を再現領域に拡大変換する(310)。
【0076】
C1(i) = (α・YIN(i)+β)/YIN(i) … (3)
(R1(i),G1(i),B1(i)) = C1(i)・(RIN(i),GIN(i),BIN(i)) … (4)
【0077】
次に、露出補正量を決定する。露出補正は以下のように場合分けを行い、トーンカーブf(x)による補正を式(7),(8)にて行う(306)。
【0078】
本実施の形態では、露出補正量をL2,M2の値を用いて(m1,m2)を算出することで決定する。また、トーンカーブf(x)の導出方法は、後述する。
【0079】
初めに、前記L1のダイナミックレンジ拡大後の値L2及びM1に対するM2を算出する(303)。
【0080】
L2 =α・L1+β … (5)
M2 =α・M1+β … (6)
【0081】
次にL2を用いて、画像全体の明るい部分5%にあたる領域が、閾値レベル100を超えているか否かを調べ、ハイライト部が存在するか否かを確認し(304)、ハイライト部が存在しない場合は、M2より露出補正量(m1,m2)を決定する(305)。
【0082】
(1) 閾値レベル≦L2の場合:露出補正を行わない(304のN)。
【0083】
(2) 閾値レベル>L2かつ、0≦M2≦5又は120≦M2の場合:夜景、もしくは順光画像とみなし、露出補正を行わない(304のN)。
【0084】
(3) 閾値レベル>L2かつ、5<M2≦30の場合:露出補正を行う(304のY)。M1=160,m2=192でトーンカーブf(x)を作成(305)。トーンカーブ補正(306)。
【0085】
(4) 閾値レベル>L2かつ、30<M2<120の場合、露出補正を行う(304のY)。M1=130,m2=m1+(-(59/90)×M2+(236/3))でトーンカーブf(x)を作成(305)。トーンカーブ補正(306)。
【0086】
ここで、(3),(4)のm1,m2は後述する接点(m1,m2)である。
【0087】
トーンカーブ補正は以下のようにして行う。ダイナミックレンジ補正後の各画素の輝度値:Y1(i)より、露出補正係数:C2(i)を以下の式で算出する。
【0088】
C2(i) = Y2(i)/Y1(i)
= f(Y1(i))/Y1(i) … (7)
入力信号(R1(i),G1(i),B1(i)) を以下の式で変換し、露出補正を行う(307)。
【0089】
(R2(i),G2(i),B2(i)) = C2(i)・(R1(i),G1(i),B1(i)) … (8)
ここで、ダイナミックレンジの拡大方法、すなわち再現領域であるMax,Minの決定方法やαの制限などには種々の方法が提案されているが、これにはこだわらない。また、再現領域を決定し、あるいは、輝度ヒストグラムを求める際には必ずしも全画素の情報を使う必要はなく、間引きなどをして得た情報を使用しても良い。さらに、本例ではダイナミックレンジ拡大手段102前に作成した輝度ヒストグラムより評価値を算出し、それらを式(5),(6)で変換することでダイナミックレンジ拡大手段102後の評価値を算出しているが、ダイナミックレンジ拡大手段102後に輝度ヒストグラムをとり、それらの評価値を算出する方法もある。また、画像全体に対しハイライト部がどの程度存在するか否かを判定する方法には種々の方法が提案されているが、これにはこだわらない。また、露出補正方法や露出補正量の決定には種々の方法が提案されているが、これにはこだわらない。
【0090】
これにより、シーンとして暗く(明るく)ても、露出適性部が存在する割合に応じて露出補正量を変更し、露出補正を行うことにより、過度な露出補正を防ぐことができる。
【0091】
また、明るさを表すヒストグラムにおける頻度積算値の所定割合に対応するレベル値を用いてハイライト部が存在する割合を判断することにより、被写体抽出などを行わず、簡単かつ迅速に露出補正の必要性を判断することができる。
【0092】
さらに、輝度ヒストグラムの中央値から補正量を決定することにより、適切な補正量を得ることができる。
【0093】
前記の例で、例えば、逆光画像の場合は評価値L1を、輝度ヒストグラムの累積頻度80%に対応するレベルとし、閾値レベルを140とする。ここで、累積頻度のパーセンテージや閾値はこれにはこだわらない。これにより、露出補正量を変更するためのハイライト部が存在する割合を、逆光画像と夜間人物画像などのシーンで異ならせることにより、シーンに応じた高精細な補正効果を得ることができる。
【0094】
なお、後述のような、光画像の逆光タイプを判別し、逆光タイプに応じて階調処理を異ならせる技術を用いると、極端な露出不足や、夜間撮影、逆光シーンでは大きなダイナミックレンジ補正が期待される。このような場合、更なる露出補正を行うと原画のもつ雰囲気が失われる恐れがあるので、露出補正が必要か否かを検討する。
【0095】
例えば、
・逆光画像では、α>1.3以上かつ輝度頻度積算値80%に対応するレベルが閾値140以上の時に露出補正を行わない。
・夜間人物画像では、α>1.5以上かつ輝度頻度積算値95%に対応するレベルが閾値100以上の時に露出補正を行わない。
とする。
【0096】
ここで、ダイナミック拡大処理の影響の大きさをα値で検討したが、これにはこだわらない。これにより、ダイナミックレンジ拡大処理の影響が大きい場合に、更なる露出補正を行う必要があるか否かを検討することにより、過度な露出補正を防ぎ原画の雰囲気を保つことができる。
【0097】
また、光画像の逆光タイプを判別し、逆光タイプに応じて階調処理を異ならせる技術を用いれば、シーンに応じてダイナミックレンジの再現領域を自動的にかつ適切に異ならせることが可能である。すなわち、シーンを『真逆光』『真逆光以外の逆光』『その他』に分け、再現領域のハイライトポイントMax、ダークポイントMinを以下のように設定する。
【0098】
・真逆光の場合:Max … 輝度ヒストグラムにおける二極化の分岐点。Min … 輝度ヒストグラムにおける総画素数の0.3%以上の頻度を持つ最小値。
【0099】
・真逆光以外の逆光の場合:Max … RGB各ヒストグラムにおける総画素数の0.03%以上の頻度を持つ最大値。Min … 輝度ヒストグラムにける総画素数の0.3%以上の頻度を持つ最小値。
【0100】
・その他:Max …RGB各ヒストグラムにおいて総画素数の0.03%以上の頻度を持つ最大値。Min …RGB各ヒストグラムにおいて総画素数の0.03%以上の頻度を持つ最小値。
【0101】
ここで、シーン判別方法や、ダイナミックレンジ拡大方法も種々の方法が提案されているがこれにはこだわらない。また、シーン判別は自動判別のほかにオペレータがシーンを指定してもかまわない。これにより、シーンを少なくとも真逆光、及びその他に分け、各々に対しダイナミックレンジの設定範囲を異ならせることにより、シーンに適したコントラスト強調を行うことができる。
【0102】
前記の露出補正手段103は(7),(8)式で表されるトーンカーブ補正であり、(7)式のトーンカーブ:f(x)(x≧0)を以下の方法で算出する。図4にf(x)を示す。但し、
f(x) = l1(x) (0≦x<m1)
= l2(x) (m1≦x<1)
である。
【0103】
接点(x,y)=(m1,m2)においてl1(x)とl2(x)は結合し、l1(x)は1次直線、l2(x)は2次放物線である。
【0104】
L1(x) = (m2/m1)・x (0≦x<m1) … (9)
L2(x) = {-b±(b^2 - 4・a・c)^(1/2)}/(2・a) (m1≦x<1)… (10)
但し、a = tanθ/sqrt(2)
b = 2・tanθ・(x/sqrt(2) - P) + P … (11)
c = tanθ・(x^2/sqrt(2)-2・P・x) - P・x
P = ((1-m1)^2 + (1-m2)^2)^(1/2)/2
であり、l2(x)≦1となるように、θを設定する。θは(m1,m2)と(1,1)を結ぶ直線と、(m1,m2)と放物線の頂点とを結ぶ直線とが作る角である。また、解は0<l2(x)≦1なる値を選択する。
【0105】
また、実根を持つために、a,b,cは以下の条件を満たす。
【0106】
b^2 - 4・a・c ≧0 … (12)
【0107】
次に、接点(x,y)=(m1,m2)はシーンによって異なった値となる。
【0108】
[1]逆光画像:
例えば、ダイナミックレンジ補正後の輝度ヒストグラム中央値M2をもって、図5に示す関数で持ち上げ量:Δ(Δ = -(63/80)・M2+(441/4))を決定し、m1 = 115,m2 = m1+Δとする。暗部のコントラストを保ちつつ、低中レベルの明るさが補正される。但し、露出判定のための輝度ヒストグラムは光画像の逆光タイプを判別し、逆光タイプに応じて階調処理を異ならせる技術の説明で前記した最小値Minから二極化の分岐点までの範囲を用いて行う。これにより、逆光部分を取り除いた領域で露出判定を行い、高精細な露出補正量を得ることができる。
【0109】
[2]逆光以外の画像:
・5<M2≦30の場合 … m1=160,m2=192とする。ハイライト側を持ち上げる特性を持つ補正カーブのため、暗部のコントラストが強調され、かつ持ち上がりが少ないため、夜景画像が誤認識されても悪影響が少ない。
・30<M2≦1の場合 … ダイナミックレンジ補正後の輝度ヒストグラム中央値M2をもって,、図6に示す関数で持ち上げ量Δ(Δ = -(59/90)・M2+(236/3))を決定し、m1 = 130,m2 = m1+Δとする。暗部のコントラストを保ちつつ、低中レベルの明るさが補正される。
【0110】
ここで、l1(x)、l2(x)及び(m1,m2)の算出方法には種々の方法が考えられるがこれにはこだわらない。これにより、ダークレベルに偏っている画像情報を補正する際に、トーンカーブの形は低領域に直線:l1(x)、高領域に上向き凸の2次放物線:l2(x)を用いることにより、低中領域のコントラストを強調しつつ露出補正を行うことができる。また、シーンや露光状態に応じ、直線と放物線の接点(x,y)=(m1,m2)を異ならせることにより、適切なトーンカーブを作成することができる。
【0111】
また、前記の露出補正手段103は、式(7),(8)で表されるトーンカーブ補正であり、式(7)のトーンカーブf(x)(x≧0)を以下の方法で算出する。
【0112】
図7にf(x)を示す。但し、
f(x) = l1(x) (0≦x<m1)
= l2(x) (m1≦x<1)
である。
【0113】
接点(x,y)=(m1,m2)においてl1(x)とl2(x)は接線結合し、l1(x)は1次直線、l2(x)は以下で表される2次放物線である。
【0114】
L1(x) = (m2/m1)・x (0≦x<m1) … (13)
L2(x) = {-b±(b^2 - 4・a・c)^(1/2)}/(2・a) (m1≦x<1)… (14)
但し、a = tanθ・(sinξ^2)
b = 2・tanθ・sinξ・(cosξ・x- m1- P) + P・cosξ … (15)
c = tanθ・[cosξ・x・{cosξ・x - 2・(m1 + P)} + m1・(m1 + 2・P) -P・(m2 + sinξ・x)]
であり、ψ = atan{(1-m2)/(1-m1)}
ξ = atan(m2/m1)
φ = ξ ψ … (16)
θ = atan{(1/2)tanφ}
P = (1-m1)/2・cosψ
【0115】
また、実根を持つために、a,b,cは以下の条件を満たす。
【0116】
b^2 - 4・a・c ≧0 … (17)
【0117】
ここで、l1(x)及びl2(x)の算出には種々の方法が考えられるが、これにはこだわらない。これにより、直線l1(x)と放物線l2(x)が接点において接線接続することにより、接点の出力レベルにおいて階調再現性が保つことができる。
【0118】
ところで、例えば画像表示装置にプリンタを仮定する場合、画像処理速度向上のため、図8に示すような処理を行う。すなわち、画像データを直接修正するのではなく、実際にはダイナミックレンジ補正係数:C1(j)(j=0,1,2,・・・,255)、及び露出補正係数:C2(j)を求め(804)、補正テーブルを作成し(805)、色変換パラメータ(CMY(k))を更新する(806)。
【0119】
この方法で、120万画素程度の画像を平均0.12秒のオーバーヘッドで処理を行うことができる。
【0120】
また、画像表示装置をディスプレイにする場合、画像処理速度向上のためプリンタと同様、画像データを直接修正するのではなく、実際にはダイナミックレンジ補正係数:C1(j))(j=0,1,2,・・・,255)、及び露出補正係数C2(j)を求め、ルックアップテーブルを作成し、色変換(RGB)を行う。
【0121】
これにより、シーンとして暗く(明るく)ても、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、画素ごとに変換を行うのではなく、変換テーブルを作成し色変換処理を行うことにより、速度を向上させることができる。
【0122】
前記の例では、輝度ヒストグラムのみからハイライト部の有無を決定しているが、それらが画像中に分散していれば主被写体とは言えず、重要度は低い。図9、図10に示すように、ハイライト部はある画像領域に集中し被写体として成り立っている場合のみ意味がある。よって、ハイライト部が集中しているか否かを調べる必要がある。
【0123】
ハイライト部がある領域に集中しているか否かは、例えば図11に示すように、画像をいくつかの領域に区切り番号付けを行い、ハイライト部がどの領域に存在するかを調べればよい。ここで、ハイライト部がある領域に集中して存在しているか否かを調べるには種々の方法が考えられるがこれにはこだわらない。
【0124】
これにより、意味のあるハイライト部のみを用いて露出補正の必要性を判断し高精細な補正を行うことができる。
【0125】
【発明の効果】
請求項1に記載の発明は、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、明るさを表すヒストグラムにおける頻度積算値の所定割合に対応するレベル値を用いて、所定割合以上のハイライト部が存在するか否かを判断することにより、被写体抽出などを行わず簡単にかつ迅速に露出補正の必要性を判断することができる。
【0126】
請求項2に記載の発明は、請求項1に記載の画像処理装置において、輝度ヒストグラムの中央値から補正量を決定することにより、適切な補正量を得ることができる。
【0127】
請求項3に記載の発明は、請求項1又は2に記載の画像処理装置において、露出補正量を変更するためのハイライト部が存在する割合を、逆光画像や夜間人物画像などのシーンで異ならせることにより、シーンに応じた高精細な補正効果を得ることができる。
【0128】
請求項4に記載の発明は、請求項1〜3の何れかの一に記載の画像処理装置において、ダイナミックレンジ拡大処理の影響度合いが大きかった絵柄に対し、更なる露出補正を行う必要があるか否かを検討することにより、過度な露出補正を防ぎ原画の雰囲気を保つことができる。
【0129】
請求項5に記載の発明は、請求項1〜4の何れかの一に記載の画像処理装置において、シーンを少なくとも真逆光とその他に分け、各々に対しダイナミックレンジの再現領域を異ならせることにより、シーンに適したコントラスト強調を行うことができる。
【0130】
請求項6に記載の発明は、請求項1〜5の何れかの一に記載の画像処理装置において、ダークレベルに偏っている画像情報を補正する際に、トーンカーブの形は低領域に直線、高領域に上向き凸の2次放物線を用いることにより、低中領域のコントラストを強調しつつ露出補正を行うことができる。また、シーンや露光状態に応じ、直線と放物線の接点を異ならせることにより、適切なトーンカーブを作成することができる。
【0131】
請求項7に記載の発明は、請求項6に記載の画像処理装置において、直線と放物線が接点において接線接続することにより、接点の出力レベルにおいて階調再現性を保つことができる。
【0132】
請求項8に記載の発明は、請求項1〜7の何れかの一に記載の画像処理装置において、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、画素ごとに変換を行うのではなく、補正テーブルを作成し色変換処理を行うことにより、速度を向上させることできる。
【0133】
請求項9に記載の発明は、意味のあるハイライト部のみを用いて露出補正の必要性を判断することにより、高精細な補正を行うことができる。
【0134】
請求項10に記載の発明は、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、明るさを表すヒストグラムにおける頻度積算値の所定割合に対応するレベル値を用いて、所定割合以上のハイライト部が存在するか否かを判断することにより、被写体抽出などを行わず簡単にかつ迅速に露出補正の必要性を判断することができる。
【0135】
請求項11に記載の発明は、請求項10に記載のプログラムにおいて、輝度ヒストグラムの中央値から補正量を決定することにより、適切な補正量を得ることができる。
【0136】
請求項12に記載の発明において、請求項10又は11に記載のプログラムにおいて、露出補正量を変更するためのハイライト部が存在する割合を、逆光画像や夜間人物画像などのシーンで異ならせることにより、シーンに応じた高精細な補正効果を得ることができる。
【0137】
請求項13に記載の発明は、請求項10〜12の何れかの一に記載のプログラムにおいて、ダイナミックレンジ拡大処理の影響度合いが大きかった絵柄に対し、更なる露出補正を行う必要があるか否かを検討することにより、過度な露出補正を防ぎ原画の雰囲気を保つことができる。
【0138】
請求項14に記載の発明は、請求項10〜13の何れかの一に記載のプログラムにおいて、シーンを少なくとも真逆光とその他に分け、各々に対しダイナミックレンジの再現領域を異ならせることにより、シーンに適したコントラスト強調を行うことができる。
【0139】
請求項15に記載の発明は、請求項10〜14の何れかの一に記載のプログラムにおいて、ダークレベルに偏っている画像情報を補正する際に、トーンカーブの形は低領域に直線、高領域に上向き凸の2次放物線を用いることにより、低中領域のコントラストを強調しつつ露出補正を行うことができる。また、シーンや露光状態に応じ、直線と放物線の接点を異ならせることにより、適切なトーンカーブを作成することができる。
【0140】
請求項16に記載の発明は、請求項15に記載のプログラムにおいて、直線と放物線が接点において接線接続することにより、接点の出力レベルにおいて階調再現性を保つことができる。
【0141】
請求項17に記載の発明は、請求項10〜16の何れかの一に記載のプログラムにおいて、露出適性部が存在する割合に応じて露出補正量を変更し露出補正を行うことにより、過度な露出補正を防ぐことができる。また、画素ごとに変換を行うのではなく、補正テーブルを作成し色変換処理を行うことにより、速度を向上させることできる。
【0142】
請求項18に記載の発明は、意味のあるハイライト部のみを用いて露出補正の必要性を判断することにより、高精細な補正を行うことができる。
【図面の簡単な説明】
【図1】この発明の一実施の形態である画像処理装置の概略構成を示す機能ブロック図である。
【図2】前記画像処理装置の電気的な接続を示すブロック図である。
【図3】前記画像処理装置が行う処理を説明するフローチャートである。
【図4】前記画像処理装置が行う処理を説明する説明図である。
【図5】同説明図である。
【図6】同説明図である。
【図7】同説明図である。
【図8】前記画像処理装置が行う処理を説明するフローチャートである。
【図9】この発明の課題を説明する説明図である。
【図10】同説明図である。
【図11】前記画像処理装置が行う処理を説明する説明図である。
【符号の説明】
101 画像処理装置
102 ダイナミックレンジ拡大手段
103 露光補正手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and a program.
[0002]
[Prior art]
Japanese Patent Application Laid-Open No. 11-136514 discloses a technique for detecting a portion with a large edge change from uniform sampling data as a main subject and setting an exposure correction amount based on the median value. Further, it is disclosed that exposure correction is performed using a γ conversion curve.
[0003]
Japanese Patent Laid-Open No. 2000-13624 has a plurality of highlight detection methods, selects a highlight point according to the characteristics of the original image, and sets color processing conditions (exposure correction processing for changing the brightness of the image). Different techniques are disclosed.
[0004]
[Problems to be solved by the invention]
Conventional cameras, digital cameras, and the like are provided with an automatic exposure control device for always maintaining an optimum exposure during shooting. In general, the exposure control method divides the screen into multiple appropriate areas for light intensity detection, weights each area, takes a weighted average, and adjusts the aperture, shutter speed, etc. A method of taking a weighted average of is called an average photometry method. In addition, since the main subject is often at the center of the screen at the time of shooting, the method of focusing light metering at the center is called the center weighted metering method.
[0005]
In these methods, exposure is determined by an average value or a median value with respect to the brightness of the photometric area. However, the “average brightness or median value” is not necessarily the proper exposure of the main subject. For example, when there is a light source directly behind the main subject and the brightness difference between the background and the main subject is large, you can shoot in a “true backlight” state, or you can shoot the main subject against a night scene (hereinafter referred to as “ In the case of “night shooting”), the main subject will be under even when shooting in “night view mode” which is a function of the digital camera.
[0006]
Alternatively, if a flash is used in night photography, the shutter speed is fixed, so that the main subject will be under if the flash light is weak.
[0007]
In other words, the automatic exposure control method in the current digital camera cannot cope with various shooting conditions.
[0008]
In recent years, with the widespread use of personal computers, the Internet, and home printers, the opportunity to handle photographic images with digital data has increased, and accordingly, digital photographic image data (hereinafter simply referred to as “image data”) is automatically corrected for exposure. Many technologies have been proposed.
[0009]
Here, exposure correction means adjusting an image having an inappropriate brightness for the scene to a brightness suitable for the scene. For example, a subject that is dark due to underexposure, a subject that is dark due to backlight, or a subject that is overexposed is brightened. In general, exposure correction in a camera is performed by changing the aperture and shutter speed in order to adjust the amount of incident light entering the lens. In the case of a printer or display, it means processing for optimizing the brightness of an output signal with respect to the brightness of an input signal using an input / output conversion function or the like.
[0010]
In the technique disclosed in Japanese Patent Application Laid-Open No. 11-136514, a region having a large edge change is detected from image data as a main subject, and an exposure correction amount is set based on the median value. However, since the edge portion (that is, the portion where the contrast change is large) does not necessarily match the main subject, there is a problem that the median value cannot be determined as the feature amount of the main subject.
[0011]
Here, FIG. 9 shows a luminance histogram of an image that requires exposure correction, and FIG. 10 shows an image of an image that does not require exposure correction. Both images are taken in the dark and the median of the histogram is very low. However, it can be seen that an image that does not require exposure correction includes a certain amount of highlight at the portion indicated by the arrow in the figure.
[0012]
In other words, if subject extraction is uncertain, subject extraction is not performed, and it is only necessary to check whether or not there is a highlight area that exceeds a certain ratio, and if it exists, no further correction is necessary. become.
[0013]
Moreover, since the process for obtaining the edge portion disclosed in Japanese Patent Application Laid-Open No. 11-136514 is complicated, there is a problem that the processing speed increases.
[0014]
In the technique disclosed in Japanese Patent Application Laid-Open No. 11-136514, exposure correction is performed using a γ conversion curve. However, when such a conversion curve is used, noise in the low-level region is increased and noise is emphasized. There is also a problem.
[0015]
An object of the present invention is to prevent excessive exposure correction by changing the exposure correction amount according to the ratio at which the exposure suitability portion is present and performing exposure correction.
[0016]
An object of the present invention is to determine the necessity of exposure correction easily and quickly without performing subject extraction and to obtain an appropriate correction amount.
[0017]
An object of the present invention is to obtain a high-definition correction effect corresponding to a scene.
[0018]
An object of the present invention is to prevent excessive exposure correction and maintain an original image atmosphere.
[0019]
An object of the present invention is to perform contrast enhancement suitable for a scene.
[0020]
An object of the present invention is to perform exposure correction while enhancing the contrast of the low and middle regions, and to create an appropriate tone curve.
[0021]
An object of the present invention is to maintain gradation reproducibility at the contact output level.
[0022]
An object of the present invention is to prevent excessive exposure compensation and improve speed.
[0023]
An object of the present invention is to perform high-definition correction.
[0024]
[Means for Solving the Problems]
  According to the first aspect of the present invention, in the image processing apparatus for correcting image data to an optimum exposure, the image data is used to expand the R, G, B frequency distribution of the image data decomposed into pixel units into a reproduction region. Dynamic range expansion means for correctingA means for determining whether exposure correction is necessary using a level value corresponding to a frequency integrated value at a predetermined ratio in a histogram representing brightness in the image data after dynamic range expansion by the dynamic range expansion means; When it is determined by the means that the exposure correction is necessary,An image processing apparatus comprising: an exposure correction unit that performs exposure correction by changing an exposure correction amount in accordance with a ratio of a highlight portion in an image.
[0025]
  Therefore, excessive exposure correction can be prevented by changing the exposure correction amount in accordance with the ratio of the exposure suitability portion to perform exposure correction.In addition, by using a level value corresponding to a predetermined ratio of the frequency integrated value in the histogram representing brightness, it is possible to easily determine whether or not there is a highlight portion having a predetermined ratio or more without performing subject extraction or the like. In addition, the necessity for exposure correction can be quickly determined.
[0026]
  According to a second aspect of the present invention, in the image processing apparatus according to the first aspect, the exposure correction unitBeforeThe correction amount is determined from the median value of the histogram.
[0027]
  Therefore, ShineAn appropriate correction amount can be obtained by determining the correction amount from the median value of the degree histogram.
[0028]
According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, the exposure correction unit is configured to change a ratio of a highlight portion for changing the exposure correction amount according to a scene. It is characterized by making it.
[0029]
Therefore, a high-definition correction effect according to the scene can be obtained by making the ratio of the highlight portion for changing the exposure correction amount different in the scene such as the backlight image or the night portrait image.
[0030]
According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the exposure correction unit includes a degree of influence of processing in the dynamic range expansion unit and a highlight portion. The exposure correction is performed by changing the exposure correction amount according to the ratio to be performed.
[0031]
Therefore, it is possible to prevent excessive exposure correction and maintain the atmosphere of the original image by examining whether or not it is necessary to perform further exposure correction on the pattern on which the degree of influence of the dynamic range expansion processing is large.
[0032]
According to a fifth aspect of the present invention, in the image processing apparatus according to any one of the first to fourth aspects, the dynamic range expanding unit changes the correction according to at least a backlight state.
[0033]
Therefore, contrast enhancement suitable for the scene can be performed by dividing the scene into at least true backlight and others, and by changing the reproduction range of the dynamic range for each.
[0034]
According to a sixth aspect of the present invention, in the image processing apparatus according to any one of the first to fifth aspects, the exposure correction unit performs a tone curve correction as the exposure correction, and the shape of the tone curve in this case Is characterized in that the contact point position varies depending on the scene and exposure, as a primary straight line in the low region of the input level and a secondary parabola convex upward in the high region.
[0035]
Therefore, when correcting image information that is biased toward dark levels, the tone curve is exposed while enhancing the contrast in the low and middle regions by using a linear parabola with a straight line in the low region and an upward convex in the high region. Correction can be performed. In addition, an appropriate tone curve can be created by changing the contact point between the straight line and the parabola according to the scene and the exposure state.
[0036]
According to a seventh aspect of the present invention, in the image processing apparatus according to the sixth aspect, the exposure correction unit tangentially connects the two tone curves at a contact point.
[0037]
Therefore, by connecting the straight line and the parabola tangentially at the contact point, it is possible to maintain gradation reproducibility at the contact output level.
[0038]
According to an eighth aspect of the present invention, in the image processing apparatus according to any one of the first to seventh aspects, the exposure correction means uses the highlight portion as a continuous region on a two-dimensional position coordinate plane of the image. It is characterized by that.
[0039]
Therefore, excessive exposure correction can be prevented by changing the exposure correction amount in accordance with the ratio of the exposure suitability portion to perform exposure correction. Also, the speed can be improved by creating a correction table and performing color conversion processing instead of performing conversion for each pixel.
[0040]
  According to a ninth aspect of the present invention, there is provided an image processing apparatus for correcting image data to an optimum exposure in order to expand the R, G, B frequency distribution of the image data decomposed into pixel units into a reproduction region. Dynamic range expansion correction coefficient calculation means for calculating the correction coefficient ofA means for determining whether or not exposure correction is necessary using a level value corresponding to a frequency integrated value at a predetermined ratio in a histogram representing brightness in image data after dynamic range expansion, and the exposure correction is performed by the determining means. When deemed necessary,Using an exposure correction coefficient calculating means for calculating a correction coefficient for performing exposure correction by changing an exposure correction amount according to a ratio of the highlight portion in the image, and using the dynamic range expansion correction coefficient and the exposure correction coefficient An image processing apparatus comprising: a conversion unit that generates a correction table and performs color conversion processing.
[0041]
Therefore, high-definition correction can be performed by determining the necessity of exposure correction using only meaningful highlight portions.
[0042]
  According to a tenth aspect of the present invention, in a computer-readable program for causing a computer to execute image processing for correcting image data to an optimum exposure, an R, G, B frequency distribution of the image data decomposed into pixel units. Dynamic range expansion processing that corrects image data to expand the image to the reproduction area,A process of determining whether exposure correction is necessary using a level value corresponding to a frequency integrated value of a predetermined ratio in a histogram representing brightness in the image data after dynamic range expansion by the dynamic range expansion process; When the processing determines that the exposure correction is necessary,An exposure correction process for performing exposure correction by changing an exposure correction amount in accordance with a ratio in which a highlight portion exists in an image, and a program executed by a computer.
[0043]
  Therefore, excessive exposure correction can be prevented by changing the exposure correction amount in accordance with the ratio of the exposure suitability portion to perform exposure correction.In addition, by using a level value corresponding to a predetermined ratio of the frequency integrated value in the histogram representing brightness, it is possible to easily determine whether or not there is a highlight portion having a predetermined ratio or more without performing subject extraction or the like. In addition, the necessity for exposure correction can be quickly determined.
[0044]
  The invention according to claim 11 is the program according to claim 10, wherein the exposure correction processing is performed.SaidThe correction amount is determined from the median value of the histogram.
[0045]
  Therefore, ShineAn appropriate correction amount can be obtained by determining the correction amount from the median value of the degree histogram.
[0046]
In the twelfth aspect of the invention, in the program according to the tenth or eleventh aspect of the invention, the exposure correction processing varies a ratio of a highlight portion for changing the exposure correction amount according to a scene. It is characterized by.
[0047]
Therefore, a high-definition correction effect according to the scene can be obtained by changing the ratio of the highlight portion for changing the exposure correction amount in a scene such as a backlight image or a night person image.
[0048]
According to a thirteenth aspect of the present invention, in the program according to any one of the tenth to twelfth aspects, the exposure correction processing includes the degree of influence of the processing in the dynamic range expansion unit and the ratio of the highlight portion. The exposure correction amount is changed according to the above, and exposure correction is performed.
[0049]
Therefore, it is possible to prevent excessive exposure correction and maintain the atmosphere of the original image by examining whether or not it is necessary to perform further exposure correction on the pattern on which the degree of influence of the dynamic range expansion processing is large.
[0050]
A fourteenth aspect of the present invention is the program according to any one of the tenth to thirteenth aspects, wherein the dynamic range expansion process changes the correction according to at least a backlight state.
[0051]
Therefore, contrast enhancement suitable for the scene can be performed by dividing the scene into at least true backlight and others, and by changing the reproduction range of the dynamic range for each.
[0052]
According to a fifteenth aspect of the present invention, in the program according to any one of the tenth to fourteenth aspects, the exposure correction processing performs tone curve correction as the exposure correction, and the shape of the tone curve in this case is input. The contact point position is made different according to the scene and exposure, as a primary straight line in the low level region and an upwardly convex secondary parabola in the high region.
[0053]
Therefore, when correcting image information that is biased toward dark levels, the tone curve is exposed while enhancing the contrast in the low and middle regions by using a linear parabola with a straight line in the low region and an upward convex in the high region. Correction can be performed. In addition, an appropriate tone curve can be created by changing the contact point between the straight line and the parabola according to the scene and the exposure state.
[0054]
According to a sixteenth aspect of the present invention, in the program according to the fifteenth aspect, the exposure correction processing tangentially connects the two tone curves at a contact point.
[0055]
Therefore, when the straight line and the parabola are tangentially connected at the contact point, gradation reproducibility can be maintained at the output level of the contact point.
[0056]
According to a seventeenth aspect of the present invention, in the program according to any one of the tenth to sixteenth aspects, the exposure correction processing is such that the highlight portion is a continuous region on a two-dimensional position coordinate plane of the image. Features.
[0057]
Therefore, excessive exposure correction can be prevented by changing the exposure correction amount in accordance with the ratio of the exposure suitability portion to perform exposure correction. Also, the speed can be improved by creating a correction table and performing color conversion processing instead of performing conversion for each pixel.
[0058]
  According to an eighteenth aspect of the present invention, in a computer-readable program for causing a computer to execute image processing for correcting image data to an optimum exposure, the R, G, B frequency distribution of the image data decomposed into pixel units. A dynamic range expansion correction coefficient calculation process for calculating a correction coefficient of image data to expand the image to the reproduction area, and a level value corresponding to a frequency integrated value at a predetermined ratio in a histogram representing brightness in the image data after the dynamic range expansion To determine whether exposure compensation is requiredprocessingAnd judgeprocessingWhen the exposure correction is determined to be necessary, an exposure correction coefficient calculation process for calculating a correction coefficient for performing exposure correction by changing an exposure correction amount according to a ratio in which a highlight portion exists in the image, and the dynamic A program that causes a computer to execute a conversion process for creating a correction table using a range expansion correction coefficient and the exposure correction coefficient and performing a color conversion process.
[0059]
Therefore, high-definition correction can be performed by determining the necessity of exposure correction using only meaningful highlight portions.
[0060]
DETAILED DESCRIPTION OF THE INVENTION
An embodiment of the present invention will be described.
[0061]
FIG. 1 is a functional block diagram showing a schematic configuration of an image processing apparatus 101 according to an embodiment of the present invention, and FIG. 2 is a block diagram showing an example of a specific hardware configuration thereof.
[0062]
In FIG. 1, the image input apparatus 100 outputs image data of a real photograph representing a photograph or the like as a matrix-like pixel to the image processing apparatus 101. When performing a plurality of image processing, the image processing apparatus 101 calculates an evaluation value based on an optimum evaluation unit in each image processing (dynamic range expansion unit 102, exposure correction unit 103), and performs image processing using the evaluation value. Execute. The image output device 104 outputs image-processed image data with dot matrix pixels.
[0063]
Specific examples of the image input device include the scanner 200 and the digital camera 201 or the video camera 202 in FIG. 2, and specific examples of the image processing device include a computer 210, a hard disk 203, a keyboard 204, a CD-ROM drive 205, a floppy disk. A computer system including a disk drive 206 and a modem 207 is applicable, and a specific example of the image output device 104 is a printer 209 and a display 208.
[0064]
In the case of the present embodiment, actual image data such as a photograph is suitable as the image data. The computer 210 reads a program from a storage medium such as a CD-ROM and installs it on the hard disk 203, and the function of the present embodiment is realized by this software. The modem 207 may be connected to a public communication line, connected via an external network, downloaded to a hard disk 203 by downloading a program or data, and the functions of the present embodiment may be realized by this software. .
[0065]
On the other hand, an operating system 212 is running in the computer 210, and a printer driver 214 and a display driver 213 corresponding to a printer and a display are incorporated. The image processing application 211 is controlled by the operating system to execute processing, and executes predetermined image processing in cooperation with the printer driver 214 and the display driver 213 as necessary. Therefore, the role of this computer as an image processing apparatus is to create RGB gradation data that has been subjected to optimal image processing by inputting RGB gradation data, displayed on the display 208 via the display driver 213, The data is converted into binary data of CMY or CMYK via the printer driver 214 and is printed on the printer 209.
[0066]
The acquisition of the image evaluation value and the image processing associated therewith are performed by an image processing program corresponding to the flowchart shown in FIG. 3 in the computer.
[0067]
This process will be described below assuming a scene other than backlight.
[0068]
First, image data is input by input means (300). Next, pixels are sampled to expand the RGB frequency distribution to an appropriate reproduction region (301), the maximum value Max of the RGB frequency distribution is calculated as a highlight point, and the minimum value Min is calculated as a shadow point (308), and so on. The coefficients for expanding the dynamic range: α and β are obtained by the equation (309).
[0069]
α = 255 / (Max-Min)
β = {(1-α) ・ (255 ・ Min)} / {255- (Max-Min)}… (1)
Here, α is restricted, and α≡1.7 when α> 1.7.
[0070]
Further, when sampling the pixels, the brightness is calculated by the following formula to create a brightness histogram (302).
[0071]
Luminance: Y = 0.299 ・ R + 0.587 ・ G + 0.114 ・ B (2)
[0072]
A level L1 corresponding to a cumulative frequency of 95% is calculated from the luminance histogram (302). L1 is a value for calculating an evaluation value L2 for determining whether or not there is a highlight portion of a predetermined ratio or more in the image data after the dynamic range expansion means 102.
[0073]
Further, a level (median value) M1 corresponding to the cumulative frequency 50% of the luminance histogram is calculated (302). M1 is a value for calculating an evaluation value M2 for determining a correction amount when the highlight portion does not exist and exposure correction is necessary.
[0074]
Here, exposure correction means adjusting an image having an inappropriate brightness for the scene to a brightness suitable for the scene. For example, a subject that is dark due to underexposure, a subject that is dark due to backlight, or a subject that is overexposed is brightened. In a display system such as a printer or a display, this means processing for optimizing the brightness of an output signal with respect to an input signal with inappropriate brightness using an input / output conversion function, a lookup table, or the like.
[0075]
Next, the luminance value Y at any pixelIN(i) From (i = 1... N, N: total number of pixels), the dynamic range correction coefficient C1 (i) is obtained for each pixel i using α and β calculated by equation (1), and the input signal (RIN(i), GIN(i), BIN(i)) is enlarged and converted into a reproduction region (310).
[0076]
C1 (i) = (α ・ YIN(i) + β) / YIN(i) ... (3)
(R1 (i), G1 (i), B1 (i)) = C1 (i) ・ (RIN(i), GIN(i), BIN(i))… (4)
[0077]
Next, an exposure correction amount is determined. Exposure correction is divided into cases as follows, and correction using the tone curve f (x) is performed using equations (7) and (8) (306).
[0078]
In the present embodiment, the exposure correction amount is determined by calculating (m1, m2) using the values of L2 and M2. A method for deriving the tone curve f (x) will be described later.
[0079]
First, M2 is calculated for the values L2 and M1 after the dynamic range expansion of L1 (303).
[0080]
L2 = α ・ L1 + β (5)
M2 = α ・ M1 + β (6)
[0081]
Next, using L2, it is checked whether or not an area corresponding to 5% of the bright portion of the entire image exceeds the threshold level 100, and it is confirmed whether or not a highlight portion exists (304). If not, the exposure correction amount (m1, m2) is determined from M2 (305).
[0082]
(1) When threshold level ≦ L2: Exposure correction is not performed (N in 304).
[0083]
(2) When threshold level> L2 and 0 ≦ M2 ≦ 5 or 120 ≦ M2: It is regarded as a night view or a front light image, and exposure correction is not performed (N in 304).
[0084]
(3) When threshold level> L2 and 5 <M2 ≦ 30: exposure correction is performed (Y in 304). A tone curve f (x) is created with M1 = 160 and m2 = 192 (305). Tone curve correction (306).
[0085]
(4) If threshold level> L2 and 30 <M2 <120, exposure correction is performed (Y in 304). A tone curve f (x) is created by M1 = 130, m2 = m1 + (− (59/90) × M2 + (236/3)) (305). Tone curve correction (306).
[0086]
Here, m1 and m2 in (3) and (4) are contacts (m1 and m2) described later.
[0087]
Tone curve correction is performed as follows. From the luminance value Y1 (i) of each pixel after dynamic range correction, an exposure correction coefficient C2 (i) is calculated by the following equation.
[0088]
C2 (i) = Y2 (i) / Y1 (i)
= f (Y1 (i)) / Y1 (i) (7)
The input signals (R1 (i), G1 (i), B1 (i)) are converted by the following expression to perform exposure correction (307).
[0089]
(R2 (i), G2 (i), B2 (i)) = C2 (i) ・ (R1 (i), G1 (i), B1 (i))… (8)
Here, various methods have been proposed for a dynamic range expansion method, that is, a method for determining Max and Min as reproduction regions, a limit of α, etc., but this is not particular. Further, when determining a reproduction region or obtaining a luminance histogram, it is not always necessary to use information of all pixels, and information obtained by thinning out may be used. Furthermore, in this example, an evaluation value is calculated from a luminance histogram created before the dynamic range expansion unit 102, and an evaluation value after the dynamic range expansion unit 102 is calculated by converting them with the equations (5) and (6). However, there is a method in which a luminance histogram is taken after the dynamic range expansion means 102 and the evaluation values thereof are calculated. In addition, various methods have been proposed as a method for determining how many highlight portions are present in the entire image, but this is not particular. Various methods have been proposed for determining the exposure correction method and the exposure correction amount, but this is not particular.
[0090]
As a result, even if the scene is dark (brighter), excessive exposure correction can be prevented by changing the exposure correction amount according to the ratio at which the exposure suitable portion exists and performing exposure correction.
[0091]
In addition, by using the level value corresponding to a predetermined ratio of the frequency integrated value in the histogram representing brightness, the ratio of the presence of the highlight part is judged, so that it is necessary to perform exposure correction easily and quickly without subject extraction. Sex can be judged.
[0092]
Furthermore, an appropriate correction amount can be obtained by determining the correction amount from the median value of the luminance histogram.
[0093]
In the above example, for example, in the case of a backlight image, the evaluation value L1 is set to a level corresponding to 80% of the cumulative frequency of the luminance histogram, and the threshold level is set to 140. Here, the percentage of accumulation frequency and the threshold value are not particular. Thereby, the high-definition correction effect according to the scene can be obtained by making the ratio of the highlight portion for changing the exposure correction amount different in the scene such as the backlight image and the night human image.
[0094]
It should be noted that if a technology that distinguishes the backlight type of a light image and uses different gradation processing depending on the backlight type as described below, extreme dynamic underexposure, night photography, and backlighting scenes are expected to have a large dynamic range correction. Is done. In such a case, if further exposure correction is performed, the atmosphere of the original image may be lost. Therefore, it is examined whether exposure correction is necessary.
[0095]
For example,
In the backlight image, exposure correction is not performed when α> 1.3 or more and the level corresponding to the luminance frequency integrated value 80% is the threshold 140 or more.
In the night portrait image, exposure correction is not performed when α> 1.5 or more and the level corresponding to the luminance frequency integrated value 95% is the threshold 100 or more.
And
[0096]
Here, the magnitude of the influence of the dynamic enlargement processing is examined with the α value, but this is not particular. Accordingly, when the influence of the dynamic range expansion process is large, it is possible to prevent excessive exposure correction and maintain the original image atmosphere by examining whether or not further exposure correction is necessary.
[0097]
In addition, if a technique for discriminating the backlight type of a light image and changing the gradation processing according to the backlight type is used, it is possible to automatically and appropriately change the reproduction range of the dynamic range according to the scene. . That is, the scene is divided into “true backlight”, “backlight other than true backlight”, and “others”, and the highlight point Max and dark point Min of the reproduction area are set as follows.
[0098]
-For true backlight: Max ... Bipolar branching point in the luminance histogram. Min… Minimum value with a frequency of 0.3% or more of the total number of pixels in the luminance histogram
[0099]
-In the case of backlight other than true backlight: Max ... Maximum value having a frequency of 0.03% or more of the total number of pixels in each RGB histogram. Min ... The minimum value with a frequency of 0.3% or more of the total number of pixels in the luminance histogram.
[0100]
・ Other: Max: Maximum value with a frequency of 0.03% or more of the total number of pixels in each RGB histogram. Min ... The minimum value with a frequency of 0.03% or more of the total number of pixels in each RGB histogram.
[0101]
Here, various methods have been proposed for the scene discrimination method and the dynamic range expansion method, but this is not particularly concerned. In addition to automatic discrimination, the scene may be specified by an operator. As a result, the scene can be divided into at least true backlight and others, and the dynamic range setting range can be made different from each other, so that contrast enhancement suitable for the scene can be performed.
[0102]
The exposure correction means 103 is tone curve correction expressed by the equations (7) and (8), and the tone curve: f (x) (x ≧ 0) of the equation (7) is calculated by the following method. FIG. 4 shows f (x). However,
f (x) = l1 (x) (0 ≦ x <m1)
= l2 (x) (m1 ≦ x <1)
It is.
[0103]
At the contact (x, y) = (m1, m2), l1 (x) and l2 (x) are coupled, l1 (x) is a primary straight line, and l2 (x) is a secondary parabola.
[0104]
L1 (x) = (m2 / m1) ・ x (0 ≦ x <m1)… (9)
L2 (x) = {-b ± (b ^ 2-4 · a · c) ^ (1/2)} / (2 · a) (m1 ≦ x <1)… (10)
Where a = tanθ / sqrt (2)
b = 2 ・ tanθ ・ (x / sqrt (2)-P) + P… (11)
c = tanθ ・ (x ^ 2 / sqrt (2) -2 ・ P ・ x)-P ・ x
P = ((1-m1) ^ 2 + (1-m2) ^ 2) ^ (1/2) / 2
And θ is set so that l2 (x) ≦ 1. θ is an angle formed by a straight line connecting (m1, m2) and (1,1) and a straight line connecting (m1, m2) and the apex of the parabola. As a solution, a value 0 <l2 (x) ≦ 1 is selected.
[0105]
In order to have a real root, a, b, and c satisfy the following conditions.
[0106]
b ^ 2-4 ・ a ・ c ≧ 0… (12)
[0107]
Next, the contact (x, y) = (m1, m2) has a different value depending on the scene.
[0108]
[1] Backlit image:
For example, with the brightness histogram median M2 after dynamic range correction, the lifting amount: Δ (Δ = − (63/80) · M2 + (441/4)) is determined by the function shown in FIG. 5, and m1 = 115, m2 = m1 + Δ. The brightness of the low and medium level is corrected while maintaining the contrast of the dark part. However, the brightness histogram for determining the exposure determines the backlight type of the light image, and the range from the minimum value Min described above to the bifurcation branch point in the description of the technology that changes the gradation processing according to the backlight type. To do. Thereby, exposure determination can be performed in the area where the backlight portion is removed, and a high-definition exposure correction amount can be obtained.
[0109]
[2] Images other than backlight:
・ When 5 <M2 ≦ 30: Set m1 = 160 and m2 = 192. Since the correction curve has a characteristic of lifting the highlight side, the contrast in the dark portion is enhanced and the lift is small, so that even if the night view image is erroneously recognized, there is little adverse effect.
・ In the case of 30 <M2 ≦ 1… With the brightness histogram median M2 after dynamic range correction, the lifting amount Δ (Δ =-(59/90) · M2 + (236/3)) is determined by the function shown in FIG. M1 = 130 and m2 = m1 + Δ. The brightness of the low and medium level is corrected while maintaining the contrast of the dark part.
[0110]
Here, various methods can be considered for calculating l1 (x), l2 (x), and (m1, m2), but this is not particular. As a result, when correcting image information that is biased toward dark levels, the tone curve is shaped by using a straight line in the low region: l1 (x) and an upwardly convex secondary parabola: l2 (x) in the high region. Further, exposure correction can be performed while enhancing the contrast of the low and middle regions. Also, an appropriate tone curve can be created by changing the contact point (x, y) = (m1, m2) between the straight line and the parabola according to the scene and the exposure state.
[0111]
The exposure correction means 103 is a tone curve correction expressed by the equations (7) and (8), and the tone curve f (x) (x ≧ 0) of the equation (7) is calculated by the following method. To do.
[0112]
FIG. 7 shows f (x). However,
f (x) = l1 (x) (0 ≦ x <m1)
= l2 (x) (m1 ≦ x <1)
It is.
[0113]
At contact (x, y) = (m1, m2), l1 (x) and l2 (x) are tangentially connected, l1 (x) is a primary straight line, l2 (x) is a secondary parabola expressed as follows is there.
[0114]
L1 (x) = (m2 / m1) x (0≤x <m1) (13)
L2 (x) = {-b ± (b ^ 2-4 · a · c) ^ (1/2)} / (2 · a) (m1 ≦ x <1)… (14)
Where a = tanθ ・ (sinξ ^ 2)
b = 2 ・ tanθ ・ sinξ ・ (cosξ ・ x- m1- P) + P ・ cosξ… (15)
c = tanθ ・ [cosξ ・ x ・ {cosξ ・ x-2 ・ (m1 + P)} + m1 ・ (m1 + 2 ・ P) -P ・ (m2 + sinξ ・ x)]
Ψ = atan {(1-m2) / (1-m1)}
ξ = atan (m2 / m1)
φ = ξ ψ (16)
θ = atan {(1/2) tanφ}
P = (1-m1) / 2 ・ cosψ
[0115]
In order to have a real root, a, b, and c satisfy the following conditions.
[0116]
b ^ 2-4 ・ a ・ c ≧ 0 ... (17)
[0117]
Here, various methods can be considered for calculating l1 (x) and l2 (x), but this is not particular. As a result, the straight line l1 (x) and the parabola l2 (x) are tangentially connected at the contact point, so that gradation reproducibility can be maintained at the output level of the contact point.
[0118]
By the way, for example, when a printer is assumed as the image display device, processing as shown in FIG. 8 is performed in order to improve the image processing speed. That is, the image data is not directly corrected, but actually the dynamic range correction coefficient: C1 (j) (j = 0, 1, 2,..., 255) and the exposure correction coefficient: C2 (j) Obtain (804), create a correction table (805), and update the color conversion parameter (CMY (k)) (806).
[0119]
By this method, an image of about 1.2 million pixels can be processed with an average overhead of 0.12 seconds.
[0120]
In addition, when the image display device is used as a display, the image data is not directly corrected in the same manner as the printer for improving the image processing speed, but actually the dynamic range correction coefficient: C1 (j)) (j = 0,1 , 2,..., 255) and an exposure correction coefficient C2 (j), a lookup table is created, and color conversion (RGB) is performed.
[0121]
As a result, even if the scene is dark (bright), excessive exposure correction can be prevented by changing the exposure correction amount according to the ratio at which the exposure suitable portion exists and performing exposure correction. Also, the speed can be improved by creating a conversion table and performing color conversion processing instead of performing conversion for each pixel.
[0122]
In the above example, the presence / absence of the highlight portion is determined based only on the luminance histogram. However, if the highlight portion is dispersed in the image, it cannot be said to be the main subject, and the importance is low. As shown in FIGS. 9 and 10, the highlight portion is meaningful only when it is concentrated on a certain image area and is formed as a subject. Therefore, it is necessary to check whether or not the highlight portion is concentrated.
[0123]
Whether or not the highlight portion is concentrated in a certain region may be determined by dividing the image into several regions and, for example, as shown in FIG. 11, investigating in which region the highlight portion exists. . Here, various methods are conceivable for examining whether or not the highlight portion is concentrated in a certain area, but this is not particular.
[0124]
Thereby, it is possible to determine the necessity of exposure correction using only a meaningful highlight portion and perform high-definition correction.
[0125]
【The invention's effect】
  According to the first aspect of the present invention, excessive exposure correction can be prevented by changing the exposure correction amount in accordance with the ratio of the exposure suitability portion to perform exposure correction.In addition, by using a level value corresponding to a predetermined ratio of the frequency integrated value in the histogram representing brightness, it is possible to easily determine whether or not there is a highlight portion having a predetermined ratio or more without performing subject extraction or the like. In addition, the necessity for exposure correction can be quickly determined.
[0126]
  According to a second aspect of the present invention, there is provided an image processing apparatus according to the first aspect.ShineAn appropriate correction amount can be obtained by determining the correction amount from the median value of the degree histogram.
[0127]
According to a third aspect of the present invention, in the image processing apparatus according to the first or second aspect, the ratio of the highlight portion for changing the exposure correction amount is different depending on a scene such as a backlight image or a night person image. By doing so, a high-definition correction effect according to the scene can be obtained.
[0128]
According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, it is necessary to perform further exposure correction on a pattern on which the degree of influence of the dynamic range expansion process is large. By examining whether or not, excessive exposure correction can be prevented and the atmosphere of the original image can be maintained.
[0129]
According to a fifth aspect of the present invention, in the image processing device according to any one of the first to fourth aspects, the scene is divided into at least true backlight and others, and the reproduction range of the dynamic range is different for each. Contrast enhancement suitable for the scene can be performed.
[0130]
According to a sixth aspect of the present invention, in the image processing device according to any one of the first to fifth aspects, when correcting image information that is biased to a dark level, the shape of the tone curve is a straight line in a low region. By using an upwardly convex secondary parabola in the high region, exposure correction can be performed while enhancing the contrast in the low and middle regions. In addition, an appropriate tone curve can be created by changing the contact point between the straight line and the parabola according to the scene and the exposure state.
[0131]
According to a seventh aspect of the present invention, in the image processing apparatus according to the sixth aspect, gradation reproducibility can be maintained at the output level of the contact by connecting the straight line and the parabola tangentially at the contact.
[0132]
The invention according to claim 8 is the image processing apparatus according to any one of claims 1 to 7, wherein the exposure correction amount is changed and exposure correction is performed according to the ratio of the exposure suitability portion, Excessive exposure compensation can be prevented. Also, the speed can be improved by creating a correction table and performing color conversion processing instead of performing conversion for each pixel.
[0133]
According to the ninth aspect of the invention, it is possible to perform high-definition correction by determining the necessity of exposure correction using only meaningful highlight portions.
[0134]
  The invention according to claim 10 can prevent excessive exposure correction by changing the exposure correction amount in accordance with the ratio of the exposure suitability portion to perform exposure correction.In addition, by using a level value corresponding to a predetermined ratio of the frequency integrated value in the histogram representing brightness, it is possible to easily determine whether or not there is a highlight portion having a predetermined ratio or more without performing subject extraction or the like. In addition, the necessity for exposure correction can be quickly determined.
[0135]
  The invention described in claim 11 is related to the program described in claim 10.ShineAn appropriate correction amount can be obtained by determining the correction amount from the median value of the degree histogram.
[0136]
In the invention according to claim 12, in the program according to claim 10 or 11, the ratio of the highlight portion for changing the exposure correction amount is made different in a scene such as a backlight image or a night person image. Thus, a high-definition correction effect according to the scene can be obtained.
[0137]
In the invention according to claim 13, in the program according to any one of claims 10 to 12, whether or not further exposure correction needs to be performed on a pattern having a large influence degree of the dynamic range expansion process. By examining this, it is possible to prevent excessive exposure compensation and maintain the atmosphere of the original image.
[0138]
According to a fourteenth aspect of the present invention, in the program according to any one of the tenth to thirteenth aspects, the scene is divided into at least true backlight and others, and the reproduction range of the dynamic range is made different for each of the scenes. It is possible to perform contrast enhancement suitable for the above.
[0139]
According to the fifteenth aspect of the invention, in the program according to any one of the tenth to fourteenth aspects, when correcting the image information biased to the dark level, the shape of the tone curve is a straight line in a low region, and a high By using an upwardly convex secondary parabola for the region, exposure correction can be performed while enhancing the contrast in the low and middle regions. In addition, an appropriate tone curve can be created by changing the contact point between the straight line and the parabola according to the scene and the exposure state.
[0140]
According to the sixteenth aspect of the invention, in the program according to the fifteenth aspect, the straight line and the parabola are tangentially connected at the contact point, so that the gradation reproducibility can be maintained at the output level of the contact point.
[0141]
According to a seventeenth aspect of the present invention, in the program according to any one of the tenth to sixteenth aspects, the exposure correction amount is changed in accordance with the ratio at which the exposure suitability portion is present and the exposure correction is performed. Exposure compensation can be prevented. Also, the speed can be improved by creating a correction table and performing color conversion processing instead of performing conversion for each pixel.
[0142]
The invention according to claim 18 can perform high-definition correction by determining the necessity of exposure correction using only a meaningful highlight portion.
[Brief description of the drawings]
FIG. 1 is a functional block diagram showing a schematic configuration of an image processing apparatus according to an embodiment of the present invention.
FIG. 2 is a block diagram showing electrical connections of the image processing apparatus.
FIG. 3 is a flowchart illustrating processing performed by the image processing apparatus.
FIG. 4 is an explanatory diagram illustrating processing performed by the image processing apparatus.
FIG. 5 is an explanatory diagram of the same.
FIG. 6 is an explanatory diagram of the same.
FIG. 7 is an explanatory diagram of the same.
FIG. 8 is a flowchart illustrating processing performed by the image processing apparatus.
FIG. 9 is an explanatory diagram for explaining the problem of the present invention.
FIG. 10 is an explanatory diagram of the same.
FIG. 11 is an explanatory diagram illustrating processing performed by the image processing apparatus.
[Explanation of symbols]
101 Image processing apparatus
102 Dynamic range expansion means
103 Exposure correction means

Claims (18)

画像データを最適露出に補正するための画像処理装置において、
画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正を行うダイナミックレンジ拡大手段と、
前記ダイナミックレンジ拡大手段によるダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する手段と、
前記判断する手段により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更して露出補正を行う露出補正手段と、を備えていることを特徴とする画像処理装置。
In an image processing apparatus for correcting image data to an optimum exposure,
Dynamic range expansion means for correcting image data in order to expand the R, G, B frequency distribution of the image data decomposed into pixel units into a reproduction region;
Means for determining whether exposure correction is necessary using a level value corresponding to a frequency integrated value of a predetermined ratio in a histogram representing brightness in the image data after dynamic range expansion by the dynamic range expansion unit;
Exposure correction means for performing exposure correction by changing the exposure correction amount according to the ratio of the highlight portion in the image when the determination means determines that the exposure correction is necessary. A featured image processing apparatus.
前記露出補正手段は、前記ヒストグラム中央値より補正量を決定することを特徴とする請求項1に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the exposure correction unit determines a correction amount from the histogram median value. 前記露出補正手段は、
前記露出補正量を変更するためのハイライト部が存在する割合をシーンに応じて異ならせることを特徴とする請求項1又は2に記載の画像処理装置。
The exposure correction means includes
The image processing apparatus according to claim 1, wherein a ratio at which a highlight portion for changing the exposure correction amount is varied depending on a scene.
前記露出補正手段は
前記ダイナミックレンジ拡大手段における処理の影響度合いと、ハイライト部が存在する割合とに応じて前記露出補正量を変更し露出補正を行うことを特徴とする請求項1〜3の何れかの一に記載の画像処理装置。
4. The exposure correction unit according to claim 1, wherein the exposure correction unit performs exposure correction by changing the exposure correction amount according to a degree of influence of processing in the dynamic range expansion unit and a ratio of a highlight portion. The image processing apparatus according to any one of the above.
前記ダイナミックレンジ拡大手段は、少なくとも逆光状態に応じて前記補正を変えることを特徴とする請求項1〜4の何れかの一に記載の画像処理装置。  The image processing apparatus according to claim 1, wherein the dynamic range expansion unit changes the correction according to at least a backlight state. 前記露出補正手段は、
前記露出補正としてトーンカーブ補正を行い、この場合のトーンカーブの形状は入力レベルの低領域において1次直線、高領域において上に凸の2次放物線として、シーンや露出に応じて接点位置を異ならせることを特徴とする請求項1〜5の何れかの一に記載の画像処理装置。
The exposure correction means includes
Tone curve correction is performed as the exposure correction. In this case, the shape of the tone curve is a linear straight line in the low region of the input level and a convex secondary parabola in the high region, and the contact position varies depending on the scene and exposure. The image processing apparatus according to claim 1, wherein
前記露出補正手段は、
前記2つのトーンカーブを接点において接線接続することを特徴とする請求項6に記載の画像処理装置。
The exposure correction means includes
The image processing apparatus according to claim 6, wherein the two tone curves are tangentially connected at a contact point.
露出補正手段は、
前記ハイライト部を画像の2次元位置座標平面上で連続領域としていることを特徴とする請求項1〜7の何れかの一に記載の画像処理装置。
Exposure compensation means
The image processing apparatus according to claim 1, wherein the highlight portion is a continuous area on a two-dimensional position coordinate plane of the image.
画像データを最適露出に補正するための画像処理装置において、
画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正係数を算出するダイナミックレンジ拡大補正係数算出手段と、
ダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する手段と、
前記判断する手段により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更し露出補正を行うための補正係数を算出する露出補正係数算出手段と、
前記ダイナミックレンジ拡大補正係数及び前記露出補正係数とを用いて補正テーブルを作成して色変換処理を行う変換手段と、を備えていることを特徴とする画像処理装置。
In an image processing apparatus for correcting image data to an optimum exposure,
Dynamic range expansion correction coefficient calculating means for calculating a correction coefficient of the image data in order to expand the R, G, B frequency distribution of the image data decomposed into pixel units into a reproduction region;
Means for determining whether exposure correction is necessary using a level value corresponding to a frequency integrated value of a predetermined ratio in a histogram representing brightness in image data after dynamic range expansion;
When it is determined by the determining means that the exposure correction is necessary, an exposure correction coefficient calculating means for calculating a correction coefficient for performing exposure correction by changing the exposure correction amount according to the ratio of the highlight portion in the image. When,
An image processing apparatus comprising: a conversion unit that generates a correction table using the dynamic range expansion correction coefficient and the exposure correction coefficient and performs color conversion processing.
画像データを最適露出に補正するための画像処理をコンピュータに実行させるコンピュータに読み取り可能なプログラムにおいて、
画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正を行うダイナミックレンジ拡大処理と、
前記ダイナミックレンジ拡大処理によるダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する処理と、
前記判断する処理により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更し露出補正を行う露出補正処理と、コンピュータに実行させることを特徴とするプログラム。
In a computer-readable program for causing a computer to execute image processing for correcting image data to an optimum exposure,
Dynamic range expansion processing for correcting image data in order to expand the R, G, B frequency distribution of the image data decomposed into pixel units into a reproduction region;
A process of determining whether exposure correction is necessary using a level value corresponding to a frequency integrated value of a predetermined ratio in a histogram representing brightness in image data after dynamic range expansion by the dynamic range expansion process;
When it is determined that the exposure correction is necessary by the determination process, an exposure correction process for performing exposure correction by changing an exposure correction amount according to a ratio in which an image has a highlight portion is performed, and the computer is executed. Program.
前記露出補正処理は、前記ヒストグラム中央値より補正量を決定することを特徴とする請求項10に記載のプログラム。  The program according to claim 10, wherein the exposure correction processing determines a correction amount from the histogram median value. 前記露出補正処理は、
前記露出補正量を変更するためのハイライト部が存在する割合をシーンに応じて異ならせることを特徴とする請求項10又は11に記載のプログラム。
The exposure correction process includes
The program according to claim 10 or 11, wherein a ratio of a highlight portion for changing the exposure correction amount is varied depending on a scene.
前記露出補正処理は、前記ダイナミックレンジ拡大手段における処理の影響度合いと、ハイライト部が存在する割合とに応じて前記露出補正量を変更し露出補正を行うことを特徴とする請求項10〜12の何れかの一に記載のプログラム。  13. The exposure correction process according to claim 10, wherein the exposure correction is performed by changing the exposure correction amount in accordance with a degree of influence of the process in the dynamic range expansion unit and a ratio at which a highlight portion exists. The program as described in any one of. 前記ダイナミックレンジ拡大処理は、
少なくとも逆光状態に応じて前記補正を変えることを特徴とする請求項10〜13の何れかの一に記載のプログラム。
The dynamic range expansion process is
The program according to claim 10, wherein the correction is changed according to at least a backlight state.
前記露出補正処理は、
前記露出補正としてトーンカーブ補正を行い、この場合のトーンカーブの形状は入力レベルの低領域において1次直線、高領域において上に凸の2次放物線として、シーンや露出に応じて接点位置を異ならせることを特徴とする請求項10〜14の何れかの一に記載のプログラム。
The exposure correction process includes
Tone curve correction is performed as the exposure correction. In this case, the shape of the tone curve is a linear straight line in the low region of the input level and a convex secondary parabola in the high region, and the contact position varies depending on the scene and exposure. The program according to claim 10, wherein the program is executed.
前記露出補正処理は、
前記2つのトーンカーブを接点において接線接続することを特徴とする請求項15に記載のプログラム。
The exposure correction process includes
The program according to claim 15, wherein the two tone curves are tangentially connected at a contact point.
露出補正処理は、
前記ハイライト部を画像の2次元位置座標平面上で連続領域としていることを特徴とする請求項10〜16の何れかの一に記載のプログラム。
Exposure compensation processing
The program according to any one of claims 10 to 16, wherein the highlight portion is a continuous area on a two-dimensional position coordinate plane of an image.
画像データを最適露出に補正するための画像処理をコンピュータに実行させるコンピュータに読み取り可能なプログラムにおいて、
画素単位に分解した前記画像データのR,G,B頻度分布を再現領域に拡大するために画像データの補正係数を算出するダイナミックレンジ拡大補正係数算出処理と、
ダイナミックレンジ拡大後の画像データに明るさを表すヒストグラムにおいて所定割合の頻度積算値に対応するレベル値を用いて露出補正が必要か否かを判断する処理と、
前記判断する処理により前記露出補正が必要と判断されたとき、画像にハイライト部が存在する割合に応じて露出補正量を変更し露出補正を行うための補正係数を算出する露出補正係数算出処理と、
前記ダイナミックレンジ拡大補正係数及び前記露出補正係数とを用いて補正テーブルを作成して色変換処理を行う変換処理と、をコンピュータに実行させることを特徴とするプログラム。
In a computer-readable program for causing a computer to execute image processing for correcting image data to an optimum exposure,
A dynamic range expansion correction coefficient calculation process for calculating a correction coefficient of the image data in order to expand the R, G, B frequency distribution of the image data decomposed into pixel units into a reproduction region;
A process of determining whether exposure correction is necessary using a level value corresponding to a frequency integrated value of a predetermined ratio in a histogram representing brightness in image data after dynamic range expansion;
When the exposure compensation is determined to be necessary by the process of the determination, the exposure correction coefficient calculation processing of calculating a correction coefficient for changing exposure compensation exposure compensation amount in accordance with the rate of a highlight part is present in the image When,
A program that causes a computer to execute a conversion process for creating a correction table using the dynamic range expansion correction coefficient and the exposure correction coefficient and performing a color conversion process.
JP2001073692A 2001-03-15 2001-03-15 Image processing apparatus and program Expired - Fee Related JP4398595B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001073692A JP4398595B2 (en) 2001-03-15 2001-03-15 Image processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001073692A JP4398595B2 (en) 2001-03-15 2001-03-15 Image processing apparatus and program

Publications (2)

Publication Number Publication Date
JP2002281510A JP2002281510A (en) 2002-09-27
JP4398595B2 true JP4398595B2 (en) 2010-01-13

Family

ID=18931077

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001073692A Expired - Fee Related JP4398595B2 (en) 2001-03-15 2001-03-15 Image processing apparatus and program

Country Status (1)

Country Link
JP (1) JP4398595B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5248928B2 (en) * 2008-06-09 2013-07-31 富士フイルム株式会社 Imaging control apparatus, method thereof, and program
JP7359091B2 (en) 2020-07-15 2023-10-11 株式会社デンソー Image processing device, image processing method, and image processing program

Also Published As

Publication number Publication date
JP2002281510A (en) 2002-09-27

Similar Documents

Publication Publication Date Title
US7251056B2 (en) Image processing apparatus, image processing method and information recording medium
US7421120B2 (en) Apparatus correcting image by luminance histogram
JP3992177B2 (en) Image processing apparatus, image processing method, and computer program
US7068328B1 (en) Method, apparatus and recording medium for image processing
US7103228B2 (en) Local change of an image sharpness of photographic images with masks
US7715649B2 (en) Generation and adjustment of a luminance correction curve to prevent saturation of the image during contrast enhancement
JP4123724B2 (en) Image processing program, computer-readable recording medium storing image processing program, image processing apparatus, and image processing method
JP2000069310A (en) Method for processing images
JP5901667B2 (en) Image processing apparatus and method, image processing program, and imaging apparatus
EP3293697A1 (en) Image processing device, imaging device, image processing method, and storage medium storing image processing program for image processing device
JP4154128B2 (en) Image processing apparatus, image processing method, and recording medium on which program for executing the method is recorded
US7336849B2 (en) Exposure correction method for digital images
JP4851505B2 (en) Image processing apparatus and image processing method
JP4367821B2 (en) Image processing apparatus, image processing method, and recording medium
US20080131007A1 (en) Image Coding Method and Image Coding Device
JP4107812B2 (en) Image processing apparatus, image processing method, and recording medium
JP4398595B2 (en) Image processing apparatus and program
JP2008305122A (en) Image-processing apparatus, image processing method and program
JP4219577B2 (en) Image processing apparatus, image output apparatus, image processing method, and storage medium
JP2009070099A (en) Image-processing device, image-processing method, program and recording medium
JPH10271524A (en) Image processor, image processing method, and medium recorded with image processing program
JP4247621B2 (en) Image processing apparatus, image processing method, and medium on which image processing control program is recorded
JP5732799B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP3817371B2 (en) Image processing method, apparatus, and recording medium
JP2000261685A (en) Method of improving color image quality and device

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040930

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20051021

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060821

RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060905

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081009

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090113

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090313

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090908

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090928

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: 20091020

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091023

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

Free format text: PAYMENT UNTIL: 20121030

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131030

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees