JP3772133B2 - Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium - Google Patents

Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium Download PDF

Info

Publication number
JP3772133B2
JP3772133B2 JP2002172423A JP2002172423A JP3772133B2 JP 3772133 B2 JP3772133 B2 JP 3772133B2 JP 2002172423 A JP2002172423 A JP 2002172423A JP 2002172423 A JP2002172423 A JP 2002172423A JP 3772133 B2 JP3772133 B2 JP 3772133B2
Authority
JP
Japan
Prior art keywords
luminance
gradation correction
histogram
distribution
gravity
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
JP2002172423A
Other languages
Japanese (ja)
Other versions
JP2003069825A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial 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 Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2002172423A priority Critical patent/JP3772133B2/en
Publication of JP2003069825A publication Critical patent/JP2003069825A/en
Application granted granted Critical
Publication of JP3772133B2 publication Critical patent/JP3772133B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、自動階調補正装置,自動階調補正方法および自動階調補正プログラム記録媒体に関するものであり、特に、デジタル画像処理装置において、入力画像の補正、より詳しくは、画像の階調を自動的に補正するものの改良を図ったものに関する。
【0002】
【従来の技術】
従来の画像の階調を自動的に補正するための技術として、次のような方法が一般的に良く知られている。即ち、この方法は、入力画像の各画素の輝度値もしくは濃度値を算出し、同じ値を持つ画素の総和を示すヒストグラムを作成し、作成したヒストグラムの形状が最適になるような補正処理を全画素に対し行うものである。
このようなヒストグラムを用いて補正を行う方法として、例えば特開平6−268866号公報に開示されたものがある。この公報に開示された従来例を図40を用いて説明する。なお、以下の説明ではデジタル画像の各画素は“0”から“255”までの濃度値を持つものとする。
【0003】
まず、デジタル画像信号から各画素の濃度値を算出し、同じ濃度値を持つ画素の総和を示した濃度ヒストグラムを作成する。この一例を図40(a)に示す。
【0004】
次に、作成した濃度ヒストグラムの最小濃度値をdmin、最大濃度値をdmax、画素濃度dの画素数をF1[d]、変換後の画素数をF2[d]と表したとき、下記の(1)式によって画素濃度分布領域を画素輝度全体に広げるように補正したヒストグラム(図40(b)参照)を作成し、同時にヒストグラムの面積を2等分する点(重心)Gを算出する。そして、図40(c)に示すように、重心Gが、濃度範囲の中央になるようなγ値を求め、F2[d]の変換後の画素数をF3[d]と表したとき、下記の(2)式によりγ補正を施したヒストグラムを作成し、それを元に補正を行う。
【数1】

Figure 0003772133
【数2】
Figure 0003772133
このように、画素濃度を全階調に広げ、中央階調から均等に広がりを持たせ、濃度分布の重心が中央になるように明るさの調整を行っている。
また、ヒストグラムを用いて画像の階調補正を行う他の方法として、特開2000−102033号公報に開示されたものがある。この従来例を図41を用いて説明する。
【0005】
この方法は、デジタル画像信号から作成した輝度ヒストグラムに対し算出した、入力輝度レベル軸をn等分し(nはn>3を満たす整数)、各領域の画素数の全画素に対する割合、その中で一定のリミッタ値を越える画素数の全画素に対する割合、入力輝度レベル軸を3等分した各領域の画素数の全画素に対する割合、といった特徴量を取り込み(ステップ2501)、次に予め作成している各種曲線データを取り込む(ステップ2502)。そして、特徴量に基づきステップ2503,ステップ2505にて場合分けを行い、アンダー処理(ステップ2504),オーバー処理(ステップ2506),リニア処理(ステップ2507)にて、ステップ2501、ステップ2502で取り込んだ特徴量と曲線データから階調補正曲線を作成し、階調補正曲線データを格納する(ステップ2508)。
【0006】
そして、得られた階調補正曲線をもとに階調補正を行う。
即ち、この方法は、入力画像の輝度ヒストグラムの形状により補正処理の場合分けを行い、入力画像に最適な処理にて階調補正曲線を作成し、その階調補正曲線を元に階調補正を行うものである。
【0007】
このように、特開平6−268866号公報記載の階調補正方法によれば、中間調を多く含む画像でも鮮明なコントラストの画像が得られる。
また、特開2000−102033号公報記載の階調補正方法によれば、累積輝度分布をそのまま用いた場合よりも良好な画質の画像が得られ、また処理をソフトウエアにて実現できるため、画像データの変更などに容易に対応することが可能である。
【0008】
【発明が解決しようとする課題】
しかしながら、上記の特開平6−268866号公報記載の階調補正方法では、ヒストグラムの重心が階調の中央になるようなγ補正を行うが、逆光状態の画像のようにヒストグラムの低階調側と高階調側にピークができる場合においては、ヒストグラムの重心位置が元々中央階調付近にあるため補正がほとんど行なわれず、逆光領域が全く補正されないという問題があった。
また、風景写真などの自然画像の場合、ヒストグラムの重心が中央階調にあるものが必ずしも綺麗になるとは限らず、例えば黒い服を着た人間が写っている画像を補正すると服が灰色になってしまうという問題があった。
【0009】
また、上記の特開2000−102033号公報記載の階調補正方法では、入力画像の輝度ヒストグラムの形状により処理の場合分けを行うことで最適な階調補正を行っているが、この方法では正確な場合分けが必要であり、そのために処理が複雑になり計算量が増えてしまうという問題があった。
さらに、各場合において個別に補正処理を作成する必要があり、これにより必要な記憶容量の増加や、補正装置の規模の増大を招き、それに伴いコストの増加を招くという問題があった。
また、上述した方法では、画像中に人物が存在し、その人物が占める面積が小さい場合には、ヒストグラム内にその情報がほとんど含まれていないため、視覚的に目立ちやすい顔などの肌色領域が白飛びしてしまう等の意図しない補正を行ってしまうという問題があった。
【0010】
本発明は、このような問題を解消するためになされたもので、逆光画像においては高輝度部を潰さず十分な逆光補正を行うことができ、逆光画像と同一の処理で順光画像においても画像のコントラストや明るさを最適にすることができ、意図しない補正を行うのを抑えることが可能な自動階調補正装置、自動階調補正方法、および自動階調補正プログラム記録媒体を提供することを目的とする。
【0011】
【課題を解決するための手段】
前記課題を解決するために、本発明の自動階調補正装置、自動階調補正方法、および自動階調補正プログラム記録媒体は、デジタル画像信号から作成した輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が輝度補正目標値に一致するように補正を行うことを特徴としており、本発明によれば、輝度ヒストグラムの輝度分布を拡大することにより、どのような画像に対しても常に全体のコントラストが向上した画像を得ることができ、さらに輝度ヒストグラムの低輝度部の重心が輝度補正目標値に一致するように補正を行うことにより、逆光画像の場合は逆光状態の低輝度領域を目標輝度値になるように明るく補正し、順光画像の場合でも逆光画像の場合と同様の処理で低輝度領域の輝度値を目標輝度値の明るさに補正することができる自動階調補正装置、自動階調補正方法、および自動階調補正プログラム記録媒体を提供することができる。
【0012】
即ち、本発明の請求項1に記載された自動階調補正装置は、デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成部と、前記輝度ヒストグラムの重心を求め、全階調範囲の中央値と前記重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出部と、前記境界値算出部により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を算出する重心算出部と、前記輝度ヒストグラム作成部により作成された輝度ヒストグラムと、前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心と、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値とに基づいて補正テーブルを作成し、該補正テーブルを用いて、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が前記輝度補正目標値に一致するように階調補正処理を行う階調補正処理部とを備えたことを特徴とするものであり、低輝度領域と高輝度領域との境界値を可変にすることで、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標輝度値に補正することができるという作用を有する。
【0013】
次に、本発明の請求項2に記載の自動階調補正装置は、デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成部と、前記輝度ヒストグラムを全階調範囲の中央値で分割した2つの領域のそれぞれの重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出部と、前記境界値算出部により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を算出する重心算出部と、前記輝度ヒストグラム作成部により作成された輝度ヒストグラムと、前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心と、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値とに基づいて補正テーブルを作成し、該補正テーブルを用いて、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が前記輝度補正目標値に一致するように階調補正処理を行う階調補正処理部とを備えたことを特徴とするものであり、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標輝度値に補正することができるとともに、正確に高輝度側と低輝度側とを分割する境界値を算出することができるという作用を有する。
【0014】
次に、本発明の請求項3に記載された自動階調補正装置は、デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成部と、前記輝度ヒストグラムを低輝度側から走査して最初に検出した山型分布を第1の範囲とし、前記輝度ヒストグラムを高輝度側から走査して最初に検出した山型分布を第2の範囲として検出する山型分布検出部と、前記山型分布検出部が検出した山型分布の前記第1の範囲の重心と前記第2の範囲の重心との間に前記輝度ヒストグラムの低輝度部と高輝度部を分けるための境界値を算出する境界値算出部と、前記境界値算出部により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を算出する重心算出部と、前記輝度ヒストグラム作成部により作成された輝度ヒストグラムと、前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心と、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値とに基づいて補正テーブルを作成し、該補正テーブルを用いて、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が前記輝度補正目標値に一致するように階調補正処理を行う階調補正処理部とを備えた、ことを特徴とするものであり、入力画像が逆光の場合は目標とする明るさに補正するとともに全体のコントラストが向上した画像を得ることができ、順光の場合は元の画像の明るさを変えずにコントラストが向上した画像を得ることができるという作用を有する。
【0015】
次に、本発明の請求項4に記載された自動階調補正装置は、請求項1または請求項2または請求項3のいずれかに記載の自動階調補正装置において、目標輝度分布から前記輝度補正目標値を算出する目標値算出部をさらに備え、前記目標値算出部は、前記境界値算出部から出力される境界値に基づき前記目標輝度分布の低輝度部の重心を輝度補正目標値として算出することを特徴とするものであり、明るさの特性が異なる画像に対し、同じ形の目標輝度分布から算出した目標値で補正を行い、全体のコントラストが向上した画像を得ることができるという作用を有する。
【0016】
次に、本発明の請求項5に記載の自動階調補正装置は、請求項4に記載された自動階調補正装置において、前記階調補正処理を行う際に、前記目標値算出部が、目標とする輝度分布を曲線により設定することを特徴とするものであり、簡単に目標輝度分布を設定することができ、記憶容量を減らすことができるという作用を有する。
【0017】
次に、本発明の請求項6に記載の自動階調補正装置は、請求項4に記載された自動階調補正装置において、前記階調補正処理を行う際に、前記目標値算出部が、目標とする輝度分布を複数設定し記憶しておくことを特徴とするものであり、簡単に目標値の調節ができるという作用を有する。
【0018】
次に、本発明の請求項7に記載の自動階調補正装置は、請求項3に記載された自動階調補正装置において、前記階調補正処理を行う際に、前記境界値算出部が、前記山型分布の範囲から算出した境界値を、前記輝度ヒストグラムを用いて設定することを特徴とするものであり、より正確な境界値を算出することができるという作用を有する。
【0019】
次に、本発明の請求項8に記載の自動階調補正装置は、請求項3に記載された自動階調補正装置において、前記階調補正処理を行う際に、前記山型分布検出部が、前記山型分布の範囲に制限を設けることを特徴とするものであり、順光画像でも画像の明るさを補正することができるという作用を有する。
【0020】
次に、本発明の請求項9に記載された自動階調補正装置は、請求項3記載の自動階調補正装置において、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値が前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心位置と異なっている場合は前記輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置に一致するように修正する目標値修正部をさらに備え、前記階調補正処理部は、輝度分布を拡大すると同時に前記輝度ヒストグラムの低輝度部の重心を前記目標値修正部が出力する輝度補正目標値に一致するように階調補正処理を行うことを特徴とするものであり、目標値を修正することで、入力画像よりも暗く補正してしまうことを防ぐことができるという作用を有する。
【0021】
次に、本発明の請求項10に記載の自動階調補正装置は、請求項9に記載された自動階調補正装置において、前記階調補正処理を行う際の前記輝度補正目標値の修正が、輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置付近の値となるように修正することを特徴とするものであり、入力画像の明るさを元に補正後の明るさを微調整することができるという作用を有する。
【0022】
次に、本発明の請求項11に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載された自動階調補正装置において、前記階調補正処理において、前記輝度ヒストグラムの分布を低輝度方向にのみ拡大すると同時に輝度ヒストグラムの重心が輝度補正目標値に一致するように補正を行うことを特徴とするものであり、高輝度部のつぶれを起こさず補正を行うことができるという作用を有する。
【0023】
次に、本発明の請求項12に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記階調補正処理部は、γ補正を実行することで前記階調補正処理を行うことを特徴とするものであり、輝度ヒストグラムの低輝度部の重心と目標値との一致を、一度の変換テーブルの作成で可能とする作用を有する。
【0024】
次に、本発明の請求項13に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記階調補正処理部は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、前記補正テーブルを作成することを特徴とするものであり、輝度ヒストグラムの低輝度部の重心と目標値との一致を、一度の変換テーブルの作成で可能とする作用を有する。
【0025】
次に、本発明の請求項14に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記輝度ヒストグラム作成部により作成された輝度ヒストグラムの輝度分布を拡大する輝度分布拡大部をさらに備え、前記重心算出部は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行うことを特徴とするものであり、予め輝度ヒストグラムの輝度分布を拡大した後、低輝度部の重心を目標値に一致させる処理により自動階調補正を可能とする作用を有する。
【0026】
次に、本発明の請求項15に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設けることを特徴とするものであり、輝度ヒストグラムの階調分布がある一部分に集中している場合でも正確に補正量が算出できるという作用を有する。
【0027】
次に、本発明の請求項16に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出部を有し、前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成することを特徴とするものであり、人の肌色の輝度を肌色領域の面積に応じて輝度ヒストグラムに加重することで、人物が存在する場合にはその面積に応じて肌色の明るさが最適になるよう階調補正ができるという作用を有する。
【0028】
次に、本発明の請求項17に記載の自動階調補正装置は、請求項16に記載の自動階調補正装置において、画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重することを特徴とするものであり、高輝度部分の分布に重み付けを行うことにより、肌色の白飛びを抑えることができるという作用を有する。
【0029】
次に、本発明の請求項18に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記輝度ヒストグラム作成部により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出することを特徴とするものであり、高輝度部の重心位置により階調補正量を制限することで高輝度部の白飛びを抑えることができるという作用を有する。
【0030】
次に、本発明の請求項19に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わないことを特徴とするものであり、本来階調補正の必要がない画像では階調補正を行わないようにすることができるという作用を有する。
【0031】
次に、本発明の請求項20に記載の自動階調補正装置は、請求項1,2,3のいずれかに記載の自動階調補正装置において、補正テーブルに応じて画像の色差信号を補正することを特徴とするもので、輝度の補正により彩度が低下したように見える現象を緩和することができるという作用を有する。
【0032】
次に、本発明の請求項21に記載された自動階調補正方法は、デジタル画像の階調を補正する自動階調補正方法であって、前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、前記輝度ヒストグラムの重心を求め、全階調範囲の中央値と前記重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出工程と、前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が、輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含むことを特徴とするものであり、低輝度領域と高輝度領域との境界値を可変にすることで、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標輝度値に補正することができるという作用を有する。
【0033】
次に、本発明の請求項22に記載の自動階調補正方法は、デジタル画像の階調を補正する自動階調補正方法であって、前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、前記輝度ヒストグラムを全階調範囲の中央値で分割した2つの領域のそれぞれの重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出工程と、前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が、輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含むことを特徴とするものであり、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標輝度値に補正することができるとともに、正確に高輝度側と低輝度側とを分割する境界値を算出することができるという作用を有する。
【0034】
次に、本発明の請求項23に記載された自動階調補正方法は、デジタル画像の階調を補正する自動階調補正方法であって、前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、前記輝度ヒストグラムを低輝度側から走査して最初に検出した山型分布を第1の範囲とし、高輝度側から走査して最初に検出した山型分布を第2の範囲として検出する山型分布検出工程と、前記山型分布検出工程が検出した山型分布の第1の範囲の重心と第2の範囲の重心との間に前記輝度ヒストグラムの低輝度部と高輝度部を分けるための境界値を算出する境界値算出工程と、前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含むことを特徴とするものであり、入力画像が逆光の場合は目標とする明るさに補正するとともに全体のコントラストが向上した画像を得ることができ、順光の場合は元の画像の明るさを変えずにコントラストが向上した画像を得ることができるという作用を有する。
【0035】
次に、本発明の請求項24に記載された自動階調補正方法は、請求項21または請求項22または請求項23のいずれかに記載の自動階調補正方法において、目標輝度分布から前記輝度補正目標値を算出する目標値算出工程をさらに備え、前記目標値算出工程は、前記境界値算出工程から出力される境界値に基づき前記目標輝度分布の低輝度部の重心を輝度補正目標値として算出することを特徴とするものであり、明るさの特性が異なる画像に対し、同じ形の目標輝度分布から算出した目標値で補正を行い、全体のコントラストが向上した画像を得ることができるという作用を有する。
【0036】
次に、本発明の請求項25に記載の自動階調補正方法は、請求項24記載の自動階調補正方法において、前記目標値算出工程は、目標とする輝度分布を曲線により設定することを特徴とするものであり、簡単に目標輝度分布を設定することができ、記憶容量を減らすことができるという作用を有する。
【0037】
次に、本発明の請求項26に記載の自動階調補正方法は、請求項24記載の自動階調補正方法において、前記目標値算出工程は、目標とする輝度分布を複数設定し記憶しておくことを特徴とするものであり、簡単に目標値の調節ができるという作用を有する。
【0038】
次に、本発明の請求項27に記載の自動階調補正方法は、請求項23記載の自動階調補正方法において、前記境界値算出工程は、前記山型分布の範囲から算出した境界値を、輝度ヒストグラムを用いて設定することを特徴とするものであり、より正確な境界値を算出することができるという作用を有する。
【0039】
次に、本発明の請求項28に記載の自動階調補正方法は、請求項23記載の自動階調補正方法において、前記山型分布検出工程は、前記山型分布の範囲に制限を設けることを特徴とするものであり、順光画像でも画像の明るさを補正することができるという作用を有する。
【0040】
次に、本発明の請求項29に記載された自動階調補正方法は、請求項23記載の自動階調補正方法において、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値が前記重心算出工程により算出された前記輝度ヒストグラムの低輝度部の重心位置と異なっている場合は前記輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置に一致するように修正する目標値修正工程をさらに備え、前記階調補正処理工程は、輝度分布を拡大すると同時に前記輝度ヒストグラムの低輝度部の重心を前記目標値修正部が出力する輝度補正目標値に一致するように階調補正処理を行うことを特徴とするものであり、目標値を修正することで、入力画像よりも暗く補正してしまうことを防ぐことができるという作用を有する。
【0041】
次に、本発明の請求項30に記載の自動階調補正方法は、請求項29記載の自動階調補正方法において、前記輝度補正目標値の修正は、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置付近の値となるように修正することを特徴とするものであり、入力画像の明るさを元に補正後の明るさを微調整することができるという作用を有する。
【0042】
次に、本発明の請求項31に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラムの分布を低輝度方向にのみ拡大すると同時に輝度ヒストグラムの重心が輝度補正目標値に一致するように補正を行うことを特徴とするものであり、高輝度部のつぶれを起こさず補正を行うことができるという作用を有する。
【0043】
次に、本発明の請求項32に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記階調補正処理工程は、γ補正を実行することで行うことを特徴とするものであり、輝度ヒストグラムの低輝度部の重心と目標値との一致を、一度の変換テーブルの作成で可能とする作用を有する。
【0044】
次に、本発明の請求項33に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記階調補正処理工程は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、補正テーブルを作成することを特徴とするものであり、輝度ヒストグラムの低輝度部の重心と目標値との一致を、一度の変換テーブルの作成で可能とする作用を有する。
【0045】
次に、本発明の請求項34に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラム作成工程と前記重心算出工程との間に、前記輝度ヒストグラムの輝度分布を拡大する輝度分布拡大工程をさらに含み、前記重心算出工程は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行うことを特徴とするものであり、予め輝度ヒストグラムの輝度分布を拡大した後、低輝度部の重心を目標値に一致させる処理により自動階調補正を可能とする作用を有する。
【0046】
次に、本発明の請求項35に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設けることを特徴とするものであり、輝度ヒストグラムの階調分布がある一部分に集中している場合でも正確に補正量が算出できるという作用を有する。
【0047】
次に、本発明の請求項36に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出工程をさらに有し、前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成することを特徴とするものであり、人の肌色の輝度を肌色領域の面積に応じて輝度ヒストグラムに加重することで、人物が存在する場合にはその面積に応じて肌色の明るさが最適になるよう階調補正ができるという作用を有する。
【0048】
次に、本発明の請求項37に記載の自動階調補正方法は、請求項36に記載の自動階調補正方法において、画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重することを特徴とするものであり、高輝度部分の分布に重み付けを行うことにより、肌色の白飛びを抑えることができるという作用を有する。
【0049】
次に、本発明の請求項38に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラム作成工程により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出することを特徴とするものであり、高輝度部の重心位置により階調補正量を制限することで高輝度部の白飛びを抑えることができるという作用を有する。
【0050】
次に、本発明の請求項39に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わないことを特徴とするものであり、本来階調補正の必要がない画像では階調補正を行わないようにすることができるという作用を有する。
【0051】
次に、本発明の請求項40に記載の自動階調補正方法は、請求項21,22,23のいずれかに記載の自動階調補正方法において、補正テーブルに応じて画像の色差信号を補正することを特徴とするもので、輝度の補正により彩度が低下したように見える現象を緩和することができるという作用を有する。
【0052】
次に、本発明の請求項41に記載された自動階調補正プログラム記録媒体は、コンピュータに、デジタル画像の階調を補正する自動階調補正方法を実行させるプログラムを記録した記録媒体であって、前記自動階調補正方法は、前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、前記輝度ヒストグラムの重心を求め、全階調範囲の中央値と前記重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出工程と、前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が、輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含むことを特徴とするものであり、低輝度領域と高輝度領域との境界値を可変にすることで、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標輝度値に補正することができるという作用を有する。
【0053】
次に、本発明の請求項42に記載された自動階調補正プログラム記録媒体は、コンピュータに、デジタル画像の階調を補正する自動階調補正方法を実行させるプログラムを記録した記録媒体であって、前記自動階調補正方法は、前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、前記輝度ヒストグラムを低輝度側から走査して最初に検出した山型分布を第1の範囲とし、高輝度側から走査して最初に検出した山型分布を第2の範囲として検出する山型分布検出工程と、前記山型分布検出工程が検出した山型分布第1の範囲の重心と第2の範囲の重心との間に前記輝度ヒストグラムの低輝度部と高輝度部を分けるための境界値を算出する境界値算出工程と、前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含むことを特徴とするものであり、入力画像が逆光の場合は目標とする明るさに補正するとともに全体のコントラストが向上した画像を得ることができ、順光の場合は元の画像の明るさを変えずにコントラストが向上した画像を得ることができるという作用を有する。
【0054】
次に、本発明の請求項43に記載された自動階調補正プログラム記録媒体は、請求項41または請求項42記載の自動階調補正方法において、目標輝度分布から前記輝度補正目標値を算出する目標値算出工程をさらに備え、前記目標値算出工程は、前記境界値算出工程から出力される境界値に基づき前記目標輝度分布の低輝度部の重心を輝度補正目標値として算出することを特徴とするものであり、明るさの特性が異なる画像に対し、同じ形の目標輝度分布から算出した目標値で補正を行い、全体のコントラストが向上した画像を得ることができるという作用を有する。
【0055】
次に、本発明の請求項44に記載された自動階調補正プログラム記録媒体は、請求項42記載の自動階調補正方法において、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値が前記重心算出工程により算出された前記輝度ヒストグラムの低輝度部の重心位置と異なっている場合は前記輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置に一致するように修正する目標値修正工程をさらに備え、前記階調補正処理工程は、輝度分布を拡大すると同時に前記輝度ヒストグラムの低輝度部の重心を前記目標値修正部が出力する輝度補正目標値に一致するように階調補正処理を行うことを特徴とするものであり、目標値を修正することで、入力画像よりも暗く補正してしまうことを防ぐことができるという作用を有する。
【0056】
次に、本発明の請求項45に記載された自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記階調補正処理工程は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、補正テーブルを作成することを特徴とするものであり、輝度ヒストグラムの低輝度部の重心と目標値との一致を、一度の変換テーブルの作成で可能とする作用を有する。
【0057】
次に、本発明の請求項46に記載された自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記輝度ヒストグラム作成工程と前記重心算出工程との間に、前記輝度ヒストグラムの輝度分布を拡大する輝度分布拡大工程をさらに含み、前記重心算出工程は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行うことを特徴とするものであり、予め輝度ヒストグラムの輝度分布を拡大した後、低輝度部の重心を目標値に一致させる処理により自動階調補正を可能とする作用を有する。
【0058】
次に、本発明の請求項47に記載の自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設けることを特徴とするものであり、輝度ヒストグラムの階調分布がある一部分に集中している場合でも正確に補正量が算出できるという作用を有する。
【0059】
次に、本発明の請求項48に記載の自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出工程をさらに有し、前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成することを特徴とするものであり、人の肌色の輝度を肌色領域の面積に応じて輝度ヒストグラムに加重することで、人物が存在する場合にはその面積に応じて肌色の明るさが最適になるよう階調補正ができるという作用を有する。
【0060】
次に、本発明の請求項49に記載の自動階調補正プログラム記録媒体は、請求項48に記載の自動階調補正プログラム記録媒体において、画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重することを特徴とするものであり、高輝度部分の分布に重み付けを行うことにより、肌色の白飛びを抑えることができるという作用を有する。
【0061】
次に、本発明の請求項50に記載の自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記輝度ヒストグラム作成工程により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出することを特徴とするものであり、高輝度部の重心位置により階調補正量を制限することで、高輝度部の白飛びを抑えることができるという作用を有する。
【0062】
次に、本発明の請求項51に記載の自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わないことを特徴とするものであり、本来階調補正の必要がない画像では階調補正を行わないようにすることができるという作用を有する。
【0063】
次に、本発明の請求項52に記載の自動階調補正プログラム記録媒体は、請求項41または42に記載の自動階調補正プログラム記録媒体において、補正テーブルに応じて画像の色差信号を補正することを特徴とするもので、輝度の補正により彩度が低下したように見える現象を緩和することができるという作用を有する。
【0064】
【発明の実施の形態】
(実施の形態1)
以下に、請求項11、請求項12、請求項13、請求項14、請求項15、請求項16、請求項17、請求項18、請求項19、請求項20、請求項31、請求項32、請求項33、請求項34、請求項35、請求項36、請求項37、請求項38、請求項39、請求項40、請求項45、請求項46、請求項47、請求項48、請求項49、請求項50、請求項51、請求項52に記載された発明)に対応する実施の形態1について、図を参照しながら説明する。
この実施の形態1は、輝度ヒストグラムの輝度分布全体を全階調に広がるように拡大し、全体として入力画像のコントラストを向上させるとともに、低輝度部の重心位置を目標値に移すように補正を行うものである。
【0065】
図1は実施の形態1の自動階調補正装置の構成を示すブロック図である。図1において、101は撮像した画像を光電変換する撮像素子、102は撮像素子101からのアナログ画像信号が入力されるA/Dコンバータ、103はA/Dコンバータ102からのディジタル画像信号が入力される輝度信号算出回路、104は輝度信号算出回路103からの輝度信号が入力される輝度分布作成回路(輝度ヒストグラム作成部)、105は輝度分布作成回路104からの輝度分布が入力される重心算出回路(重心算出部)、106は輝度分布作成回路104からの輝度分布が入力される分布範囲算出回路、107は階調補正を行ううえでの目標となる目標値を記憶している目標値記憶回路、108は重心算出回路105からの重心、分布範囲算出回路106からの分布範囲の最大値,最小値、および目標値記憶回路107からの目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、109は補正テーブル作成回路108により作成された補正テーブルに基づきA/Dコンバータ102が出力するディジタル画像信号に階調補正を行う画像信号補正回路である。なお、補正テーブル作成回路108と画像信号補正回路109とは両者で階調補正処理部を構成する。但し、階調補正処理部が輝度ヒストグラムの分布拡大機能を包含しない場合は、補正テーブル作成回路108および画像信号補正回路109の両者で、輝度分布拡大部および階調補正処理部の両者を構成する。
【0066】
次に、動作について説明する。撮像素子101から出力されたアナログ画像信号は、A/Dコンバータ102によって多階調のデジタル画像信号に変換される。デジタル化は何bitで行ってもよいが、ここでは画像信号が8bitであるものとし、輝度値は“0”から“255”となるものとして説明する。
【0067】
次に輝度信号算出回路103にてデジタル画像信号から輝度信号を算出する。輝度信号算出回路103での輝度信号Yは、RGB値から下記の(3)式にて算出するものとする。
【数3】
Figure 0003772133
輝度分布作成回路104は、輝度信号算出回路103で算出した輝度値を元に、同じ値を持つ画素の総和を示す輝度ヒストグラムを作成する。
【0068】
図2は、輝度分布作成回路104で作成した輝度ヒストグラムの一例である。図2(a)は順光画像の輝度ヒストグラム、図2(b)は逆光画像の輝度ヒストグラムである。図2(b)から明らかなように、逆光画像の輝度ヒストグラムは、低輝度側と高輝度側にピークができる特徴がある。
重心算出回路105では、入力輝度レベル軸の中央輝度レベルで輝度ヒストグラムを2等分してできるそれぞれの領域のうち、低輝度側の領域を低輝度部、高輝度側の領域を高輝度部とし、低輝度部の重心位置を算出する。階調をi、各階調の頻度をY[i]と表すと、その重心位置Gは下記の(4)式で算出される。
【数4】
Figure 0003772133
分布範囲算出回路106では、輝度分布作成回路104で作成した輝度ヒストグラムの入力輝度レベル軸上の最大値、最小値を算出する。この最大値、最小値は、補正処理においてコントラストを向上させるために輝度分布を拡大した後の最大輝度レベル、最小輝度レベルとなる。
なお、最大値,最小値を算出する際にノイズの影響を受けないように、最大値,最小値は分布の両端ではなく端から少し内側の輝度レベルを求めてもよい。この場合、最大値は輝度ヒストグラムの高輝度部側から階調毎の画素数を積算してゆき、積算した値が例えば画素数の0.5%を越えたときの階調から算出することができる。最小値も同様に、低輝度部側から階調毎の画素数を積算してゆき、積算した値が例えば画素数の0.5%を越えたときの階調から算出することができる。
【0069】
次に、重心算出回路105で算出した重心位置、分布範囲算出回路106で算出した最大値と最小値、および目標値記憶回路107に予め記憶している目標値を用い、輝度変換テーブルを作成する。この輝度変換テーブルは、輝度分布を拡大し、同時に拡大後の輝度ヒストグラムの低輝度部の重心が目標値に一致するように階調補正を行うのに用いる。
【0070】
図3は、その階調補正処理を図に表したものである。図3(a)は逆光画像の輝度ヒストグラム、図3(b)は図3(a)の輝度分布が拡大するように補正した輝度ヒストグラム、図3(c)は拡大後、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正した輝度ヒストグラムである。
また、図4(a)は、この階調補正処理の原理を示すフローチャートである。
【0071】
まず、図3(a)の入力画像から輝度ヒストグラムを作成し(図4のステップS101参照)、その輝度ヒストグラムの輝度分布全体を、図3(b)のように全階調に広がるように拡大する(図4のステップS102参照)。これにより全体として入力画像のコントラストを向上させることができる。
次に図3(b)のようにコントラストを向上させた画像に対し、図3(a)の低輝度部の重心位置から分布を拡大させたことで移動した低輝度部の重心位置を求める(図4のステップS103参照)。そして、分布を拡大させたことで移動した低輝度部の重心位置を図3(c)のように目標値に移すような補正を行う(図4のステップS104参照)。これにより、低輝度部の輝度値を目標としている輝度値に補正することができ、画像全体の明るさを最適にすることができる。
【0072】
これら2つの処理の結果、逆光状態の低輝度領域が目標輝度値になるように明るく補正すると共に全体のコントラストが向上した画像を得ることができる。
輝度分布を拡大する処理は、分布範囲算出回路106で算出した最小値と最大値がそれぞれ最小輝度レベルの“0”と最大輝度レベルの“255”になるように各輝度レベルを変換してやればよい。これは、入力輝度レベルをYin、輝度分布の最小値と最大値をそれぞれYmin,Ymaxと表すと、出力輝度レベルYoutは下記の(5)式で算出される。
【数5】
Figure 0003772133
輝度ヒストグラムの低輝度部の重心が目標値になるように変換する処理は、γ補正で行うことができる。γ補正とは、ヒストグラムを参照して階調をγ補正関数に従って補正するものであり、元の階調をY1とすると、補正された階調Y2は下記の(6)式で算出される。
【数6】
Figure 0003772133
したがって、(6)式において輝度ヒストグラムの低輝度部の重心が目標値に変換されるようなγ値を算出し、そのγ値を持つγ補正関数で、全階調において変換を施すことにより、輝度ヒストグラムの低輝度部の重心が目標値に一致するように変換することができる。
【0073】
ここでは、(5)式により補正された輝度分布の低輝度部の重心が目標値に一致するように補正を行うので、重心算出回路105で算出した重心位置をG、目標値記憶回路107に記憶している目標値をgと表すと、下記の(7)式を満たすγ値を算出すればよい。
【数7】
Figure 0003772133
なお、(5)式,(6)式の補正処理は、演算速度向上のために、事前に階調数と同数の256個の変換テーブルを作成しておき、実際の画像データは本テーブルを参照して変換を行う。
ただし、(5)式と(6)式の計算を個別に行うと、階調は“0”〜“255”の整数値なので、小数点以下に対し誤差が発生する。そこで(5)式と(6)式の計算は同時に行うことで、小数点以下の誤差をなくすようにする。
【0074】
補正テーブル作成回路108では、上記の輝度分布を拡大する処理と、輝度ヒストグラムの低輝度部の重心が目標値に一致するように変換する処理とを同時に行う輝度変換テーブルを作成する。
これにより、図4(a)のように輝度ヒストグラムを作成した後、直ちにその輝度分布を拡大する場合に必要となる輝度分布拡大部(輝度分布拡大専用の変換テーブル)、が不要となり、しかも上述のように、小数点以下の演算誤差をなくすことができる。
【0075】
(7)式で算出したγ値をK、入力輝度レベルをi(i=0,1,…,255)と表すと、入力画像の輝度分布を拡大し、拡大後の輝度ヒストグラムの低輝度部の重心が目標値に一致するような変換を行う変換テーブルT[i]は、下記の(8)式で算出することができる。
【数8】
Figure 0003772133
図15は、輝度変換テーブルの変換特性の一例をグラフ化したものであり、輝度変換テーブルは、輝度ヒストグラムの低輝度部の重心階調が目標値の階調に一致するように、(Ymin,Ymax)を(0,255)に写像するような特性をもつ。
【0076】
次に、画像信号補正回路109にて、補正テーブル作成回路108で作成した輝度変換テーブルを用い、画像輝度信号の補正を行う。そして、その画像輝度信号からR,G,B信号を作成する。なお、R,G,Bの信号を直接輝度変換テーブルに従い変換し、輝度補正を行うこともできる。
このような図1の自動階調補正装置の画像信号補正回路109で実際に行う階調補正処理のフローチャートを図4(b)に示す。まず、ステップS111において、デジタル画像の輝度ヒストグラムを作成し、ステップS112において、この輝度ヒストグラムの低輝度部の重心を、輝度分布を拡大する前に求める。次に、ステップS113において、輝度ヒストグラムの輝度分布を拡大し、同時に、輝度分布が拡大された輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムの輝度分布を補正する補正テーブルを作成し、この補正テーブルを用いて、これら輝度ヒストグラムの拡大と低輝度部の重心が目標値に一致するような輝度分布の補正、を同時に行う。
【0077】
このように、輝度ヒストグラムの低輝度部の重心位置、分布の最大値,最小値を算出し、輝度分布を拡大すると同時に輝度ヒストグラムの低輝度部の重心が予め記憶している目標値に一致するような階調補正を行うことで、逆光画像に対し逆光状態の低輝度領域が目標輝度値になるように明るく補正し、全体のコントラストが向上した画像を得ることができる。また順光画像でも同様に、低輝度領域の輝度値を目標値に一致するように補正し、全体のコントラストが向上した画像を得ることができる。
【0078】
なお、目標値記憶回路107に目標値を記憶させるとき、入力画像ごとに最適な目標値を設定する必要があるが、誤って最適ではない値を設定してしまうことも起こり得る。これについては、補正テーブル作成回路108において輝度変換テーブルを作成するときに用いるγ補正関数のγ値に制限を設けておき、例えばγ値を
【数9】
Figure 0003772133
の範囲に制限するようにすればよい。
【0079】
このように、γ値に制限を設けることで補正の強さを制限し、目標値が入力画像に対し最適な値でなくても、元画像の特性を大きく損なうのを防止することができる。
なお、補正テーブル作成回路108では、上述したγカーブではなく、直線で設定してもよい。分布範囲算出回路106で算出した、輝度分布の最小値と最大値がそれぞれ最小輝度レベルの“0”と最大輝度レベルの“255”になり輝度ヒストグラムの低輝度部の重心階調が目標値の階調に一致する直線で設定した補正テーブルを図5に示す。このように直線にすることで演算量を大幅に減らすことが可能である。
【0080】
さらに、分布範囲算出回路106で算出した最小値と最大値、低輝度部の重心階調の3点間の階調を、輝度ヒストグラムの分布の頻度に応じて設定してもよい。これは、輝度ヒストグラムの頻度数を見て、頻度数の大きい領域に、多くの階調をもたせるようにする。例を図6(a)、図6(b)に示す。図6(a)のような輝度ヒストグラムの場合は、補正テーブルは図6(b)のようになる。
このように、輝度ヒストグラムの頻度に合わせて、補正テーブルを作成することにより、画面内で階調が多い領域に、より多くの階調を割り振ることができる。
【0081】
また、輝度分布作成回路104では、輝度分布数の積算量に制限を設けてもよい(請求項15に対応する)。これはある閾値以上になれば、それ以上は積算しないようにすればよい。閾値は、サンプルポイントの総数から算出できる。
例えば、
【数10】
Figure 0003772133
といったように設定できる。
【0082】
このように予め輝度ヒストグラムに制限を設けることにより、例えば、逆光画像等で背景が白飛びを起こし輝度レベルが255に集中してしまった場合等、階調分布がある階調に集中しているような極端な偏りがある場合でも正確に補正量を算出することができる。
【0083】
さらに、輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の補正量を算出してもよい(請求項18に対応する)。
【0084】
その一例を図7に示す。Ymin及びYmaxはそれぞれ上述した輝度分布の最小値及び最大値であるとする。まずYminと低輝度部の重心位置を結ぶ直線と、低輝度部の重心位置とYmaxを結ぶ直線の内角を2分する直線を設定する。そして、補正点の入力値を低輝度部の重心位置とYmaxの中点(Y1)とし、内角の2分線上のY1の出力を補正点の出力値(Y2)とする(図7(a)参照)。こうすることで、変曲点間の傾きの相違を少なくすることができる。ただし、入力画像が明るい画像の場合、高輝度部が白飛びしてしまうことがある。そこで、図7(b)に示すように、入力値を高輝度部の重心位置が最高階調レベルに近づくほどY1を低輝度方向に移動させ(Y1’)、この内角の2分線上の入力値Y1’の出力を補正点の出力値Y2’とする(図7(b)参照)。こうすることで、高輝度部の白飛びをなくすることができる。
【0085】
勿論、低輝度部の補正と同様に、予め高輝度部の目標値を設定し高輝度部の重心位置が高輝度部の目標値に一致するように補正ポイントを設けそれに応じて補正テーブルを作成してもよい。これを図8に示す。
この例は、補正テーブルを直線で設定する方法であるが、補正点を同様に算出し、補正点間を曲線、または輝度ヒストグラムの頻度に応じて設定してもよい。
また、色差信号、及び輝度信号から肌色領域を抽出し、輝度ヒストグラムを作成する際に、画像の肌色領域の輝度分布を画像全体の輝度分布に肌色の領域に応じて加重し輝度ヒストグラムを作成しても良い(請求項16に対応する)。
【0086】
このときの自動階調補正装置の構成は図10に示すブロック図となる。
図10において、3101は撮像した画像を光電変換する撮像素子、3102は撮像素子3101からのアナログ画像信号が入力されるA/Dコンバータ、3103はA/Dコンバータ3102からのディジタル画像信号が入力される輝度信号算出回路、3104は輝度信号算出回路3103からの輝度信号と肌色輝度分布作成回路3112からの肌色輝度分布が入力される輝度分布作成回路、3105は輝度分布作成回路3104からの輝度分布が入力される重心算出回路、3106は輝度分布作成回路3104からの輝度分布が入力される分布範囲算出回路、3107は階調補正を行ううえでの目標となる目標値を記憶している目標値記憶回路、3108は重心算出回路3105からの重心、分布範囲算出回路3106からの分布範囲の最大値,最小値、および目標値記憶回路3107からの目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、3109は補正テーブル作成回路3108により作成された補正テーブルに基づきA/Dコンバータ3102が出力するディジタル画像信号に階調補正を行う画像信号補正回路、3110はA/Dコンバータ3102からのディジタル画像信号が入力される色差信号算出回路、3111は輝度信号算出回路3103からの輝度信号と色差信号算出回路3110からの色差信号が入力される肌色領域抽出回路(肌色領域抽出部)、3112は肌色領域抽出回路3111からの肌色領域の輝度信号が入力される肌色輝度分布作成回路である。
【0087】
次に動作について説明する。基本的な動作は上述した図1の装置と同じであるが、図1の装置と違う点は、色差信号算出回路3110と肌色領域算出回路3111と肌色輝度分布作成回路3112とを追加し、色差信号、及び輝度信号から肌色領域を抽出し、輝度ヒストグラムを作成する際に、画像の肌色領域の輝度分布を画像全体の輝度分布に肌色の領域に応じて加重した輝度ヒストグラムを作成する点である。
【0088】
色差信号算出回路3110では、下記の(11)式,(12)式に基づいて色差信号Cr,Cbを算出する。
【数11】
Figure 0003772133
【数12】
Figure 0003772133
肌色領域抽出回路3111では、入力画像内の肌色領域の抽出を行う。肌色領域抽出回路3111には、予め肌色領域に対応する色差信号及び輝度信号の範囲が入力されており、入力信号の色差信号及び輝度信号が肌色領域内である場合にその画素を肌色と判断する。
【0089】
ここで肌色領域について図11を用いて説明する。
図11(a)は色差信号Cr,Cb軸上における肌色の分布を示しており、
斜線で示した領域が肌色領域である。肌色は色差信号のある特定の領域に分布
していることがわかる。図11(b)はCr軸と輝度軸上における肌色の分布を示しており、図11(a)と同様にある特定の領域に肌色が分布している。図11で示した領域を予め記憶しておき、入力信号が肌色かどうかの判断を行う。すなわち色差信号及び輝度信号が肌色領域内に位置する場合にその画素を肌色と判断する。なお処理を簡単にするため色差信号だけで肌色の判断を行うようにしても良い。
【0090】
肌色領域抽出回路3111により入力画素が肌色と判断された場合、肌色輝度分布作成回路3112にて肌色領域の輝度分布を作成する。作成された肌色領域の輝度分布の例を図12(a)に示す。画面全体の輝度分布が図12(b)のような場合、図12(b)の全体の輝度分布の階調毎の分布数に、肌色領域の輝度分布である図12(a)の輝度分布の階調毎の分布数を加算することで、肌色領域の輝度データに重み付けを行う。なお加算の際には肌色領域の輝度分布数に重み付けをして加算する。これは肌色領域が画面全体に占める割合は小さいため、そのまま加算したのでは肌色領域の輝度分布を階調補正処理に反映することができないためである。重み付けを行うことで肌色領域が最適になるような階調補正を行うことができる。重み付けは、肌色領域の輝度分布数に係数を乗ずることにより実現でき、例えば肌色領域の輝度分布数を5倍したものを加算するようにすればよい。図12(c)は、このように加算した輝度分布である。
【0091】
なお、肌色領域の輝度分布において、高輝度部の分布数に重み付けをするようにしてもよい(請求項17に対応する)。例えば肌色領域の輝度分布に図13に示すような係数を乗算することで高輝度部に重み付けを行う。これにより視覚的に目立ちやすい肌色の白飛びを防止することができる。
【0092】
また、輝度分布作成回路104で作成された輝度分布が離散的な場合には階調補正を行わないようにしてもよい(請求項19に対応する)。この場合の輝度分布の例を図9に示す。輝度分布が離散的ということは、自然画像ではなく人工画像であると判断できる。人工画像である場合、概して階調補正を行わないほうがよい。
【0093】
また、上述では階調補正をR,G,Bに対して行っているが、デジタル画像信号を輝度信号と色差信号に分離し、輝度信号に対して行うこともできる。ただしこの場合、輝度補正により彩度が低下したように見える現象が生じる。そこで、請求項20で述べたように、補正テーブルに応じて画像の色差信号を補正してもよい。これにより、階調補正を行った輝度信号と色差信号からR,G,B信号を作成した場合、輝度補正により彩度が低下したように見える現象を緩和することができる。
【0094】
この場合の自動階調補正装置の構成は図14に示すブロック図となる。図14において、3001は撮像した画像を光電変換する撮像素子、3002は撮像素子3001からのアナログ画像信号が入力されるA/Dコンバータ、3003はA/Dコンバータ3002からのディジタル画像信号が入力される輝度信号算出回路、3004は輝度信号算出回路3003からの輝度信号が入力される輝度分布作成回路、3005は輝度分布作成回路3004からの輝度分布が入力される重心算出回路、3006は輝度分布作成回路3004からの輝度分布が入力される分布範囲算出回路、3007は階調補正を行ううえでの目標となる目標値を記憶している目標値記憶回路、3008は重心算出回路3005からの重心、分布範囲算出回路3006からの分布範囲の最大値,最小値、および目標値記憶回路3007からの目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、3009は補正テーブル作成回路3008により作成された補正テーブルに基づき輝度信号算出回路3003が出力する輝度信号に階調補正を行う輝度信号補正回路、3010はA/Dコンバータ3002からのディジタル画像信号が入力される色差信号算出回路、3011は補正テーブル作成回路3008により作成された補正テーブルに基づき色差ゲイン値を算出し、色差信号算出回路3010が出力する色差信号に補正を行う色差信号補正回路である。
【0095】
次に動作について説明する。基本的な動作は上述した図1の装置と同じであるが、図1の装置と違う点は、輝度信号補正回路3009と色差信号算出回路3010と色差信号補正回路3011とを追加し、階調補正は輝度信号に対して行い、色差信号は補正テーブルに基づき色差ゲイン値を算出しそのゲイン値をかけることで補正を行うようにした点である。
【0096】
色差信号算出回路3010では、上記の(11)式および(12)式にて色差信号Cr,Cbを算出する。
輝度信号補正回路3009では、上述した画像信号補正回路109と同様に、補正テーブル作成回路3008により作成された補正テーブルに基づき輝度信号に対し階調補正を行う。
【0097】
色差信号補正回路3011では、色差信号をCr,Cb、入力輝度レベルをi、入力輝度レベルに応じた補正テーブルの出力値をTable[i]、色差信号のゲイン値をCgと表わすと、下記の(13) 式,(14)式,(15)式,(16)式を用いてゲイン値を算出し、色差の補正を行う。
【数13】
Figure 0003772133
【数14】
Figure 0003772133
【数15】
Figure 0003772133
【数16】
Figure 0003772133
ただし、これは一例であり使用する式はこれらに限るものではない。例えば、色差信号にゲイン値をかけたとき、Crが色差信号の最高レベルに達した場合、Crは最高レベルでクリップが掛かりCbにはそのままゲインがかかるので色相が変化してしまう。このときは、Crが色差信号の最高レベルを超えないようにCgを調節し、調節したCgをCbにもかけるようにすることで色相の変化を緩和することができる。
また、目標値記憶回路107に輝度ヒストグラムの低輝度部の重心が取りうる位置に応じて予め目標値を設定し記憶しておくことで、入力画像ごとに目標値を設定する作業をなくすることもできる。
【0098】
また、このように重心が取り得る範囲ごとに目標値を設定し、補正の強さを制限することにより、仮え入力画像に対し最適な目標値でなくても、元画像の特性を大きく損なうのを防止することもできる。
さらに、この自動階調補正装置における補正テーブル作成回路108において、輝度分布の拡大は、低輝度側にのみ行い、輝度ヒストグラムの低輝度部の重心が目標値に一致するよう補正を行なう処理にて高輝度側の輝度分布の拡大が行なわれるような変換テーブルを作成することにより、階調補正による高輝度部の階調の潰れを防止することができる(請求項11に対応する)。
【0099】
この階調の潰れの防止効果について、図16を用いて説明する。図16(a)は輝度分布を全階調に広がるように拡大し、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正を行った場合、図16(b)は輝度分布を低輝度側のみ拡大し、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正を行った場合である。
図16(a)では、輝度分布が全階調に広がるように拡大し、さらに輝度ヒストグラムの低輝度部の重心が目標値に一致するよう補正することで輝度分布が2回高輝度側に圧縮される形になり、高輝度部の潰れが発生している。
しかし、図16(b)では、輝度ヒストグラムの低輝度部の重心が目標値に一致するよう補正するときのみ輝度分布を高輝度側に圧縮しているので、高輝度部の潰れを図16(a)に比べ抑えることができている。
またこの場合、輝度分布の最大値は必要ないので、分布範囲算出回路106では最小値のみ算出するようにしてもよい。こうすることで、計算量を減らすことができる。
【0100】
このように、本実施の形態1によれば、デジタル画像の輝度ヒストグラムを作成し、その低輝度部の重心を算出し、輝度ヒストグラムの輝度の分布を拡大し、同時に分布拡大後の輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する補正テーブルを作成し、補正を行うようにしたので、1つの変換テーブルを作成するのみで、デジタル画像信号から作成した輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が輝度補正目標値に一致するように補正を行い、逆光画像に対し逆光状態の低輝度領域が目標輝度値になるように明るく補正し、全体のコントラストが向上した画像を得ることができる。また順光画像でも同様に、低輝度領域の輝度値を目標値に一致するように補正し、全体のコントラストが向上した画像を得ることができる自動階調補正装置が得られる。
【0101】
なお、上述の説明では、主に、補正テーブルを使用することで、輝度分布の拡大と低輝度部の重心が目標値に一致するように補正する階調補正処理とを同時に行う自動階調補正装置について説明したが、この自動階調補正装置に相当する処理を行う自動階調補正方法として実現してもよい。また、その補正原理を示す図4(a)のフローチャートに相当する自動階調補正方法およびこの自動階調補正方法に対応する自動階調補正装置、さらには、この自動階調補正方法をコンピュータに実行させる自動階調補正プログラムを各種の記録媒体に記録させる自動階調補正プログラム記録媒体として実現してもよく、輝度分布の拡大と階調補正処理とを同時に行えない以外は上記自動階調補正装置と同様の効果を奏する。
【0102】
(実施の形態2)
以下に、本発明の請求項4、請求項5、請求項6、請求項24、請求項25、請求項26、請求項43に記載された発明、(さらには、請求項11、請求項12、請求項13、請求項14、請求項15、請求項16、請求項17、請求項18、請求項19、請求項20、請求項31、請求項31、請求項33、請求項34、請求項35、請求項36、請求項37、請求項38、請求項39、請求項40、請求項45、請求項46、請求項47、請求項48、請求項49、請求項50、請求項51、請求項52に記載された発明)に対応する実施の形態2について、図を参照しながら説明する。
この実施の形態2は、目標となる目標値を設定するのではなく、目標輝度分布を設定することにより、階調補正を行うものである。
【0103】
図17は実施の形態2の自動階調補正装置の構成を示すブロック図である。図17において、601は撮像した画像を光電変換する撮像素子、602は撮像素子601からのアナログ画像信号が入力されるA/Dコンバータ、603はA/Dコンバータ602からのディジタル画像信号が入力される輝度信号算出回路、604は輝度信号算出回路603からの輝度信号が入力される輝度分布作成回路(輝度ヒストグラム作成部)、605は階調補正を行ううえでの目標となる目標輝度分布を記憶している目標輝度分布記憶回路、606は輝度分布作成回路604からの輝度分布が入力される重心算出回路(重心算出部)、607は輝度分布作成回路604からの輝度分布が入力される分布範囲算出回路、608は目標輝度分布記憶回路605からの目標輝度分布が入力される目標値算出回路(目標値算出部)、609は重心算出回路606からの重心、分布範囲算出回路607からの分布範囲の最大値,最小値、および目標値算出回路608からの目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、610は補正テーブル作成回路609により作成された補正テーブルに基づきA/Dコンバータ602が出力するディジタル画像信号に階調補正を行う画像信号補正回路である。なお、補正テーブル作成回路609と画像信号補正回路610とは両者で階調補正処理部を構成する。但し、階調補正処理部が輝度ヒストグラムの分布拡大機能を包含しない場合は、補正テーブル作成回路609および画像信号補正回路610の両者で、輝度分布拡大部および階調補正処理部の両者を構成する。
【0104】
次に、動作について説明する。基本的な動作は上述した実施の形態1と同じであるが、予め記憶回路に目標値を設定するのではなく、目標となる輝度分布を設定し、その目標輝度分布を用いて目標値を算出するようにしている点が実施の形態1とは異なる。
目標輝度分布記憶回路605にて、予め階調補正で目標とする輝度ヒストグラムを設定し、その分布を記憶しておく。
図18は、目標輝度分布記憶回路605にて記憶する輝度ヒストグラムの一例である。図18(a)は逆光状態の入力画像の輝度ヒストグラム、図18(b)は目標とする画像の輝度ヒストグラムである。図18(b)のヒストグラムになれば、逆光状態の低輝度部が高輝度方向に移動し、逆光が解消される。
【0105】
次に、目標値算出回路608にて、目標輝度分布から目標値を算出する。即ち、予め目標輝度分布記憶回路605に記憶されている目標輝度分布に対し、重心算出回路606で重心位置を算出するときと同様にして低輝度部の重心位置を求め、この重心位置を目標値とする(図20のステップS203参照)。なお目標値算出回路608での低輝度部は、重心算出回路606における低輝度部と同じ範囲に設定する必要がある。ここでは低輝度部を、“0”階調から中央階調(“127”)までの範囲とする。
【0106】
この算出した目標値を用い、実施の形態1と同様にして、階調補正を行う。即ち、重心算出回路606で算出した重心位置、分布範囲算出回路607で算出した最大値と最小値、および目標値算出回路608にて予め算出した目標値を用い、輝度変換テーブルを作成する。この輝度変換テーブルは、輝度分布を拡大し、同時に拡大後の輝度ヒストグラムの低輝度部の重心が目標値に一致するように階調補正を行うのに用いる。
【0107】
図20(a)はこの階調補正処理の原理を示すフローチャートである。まず、入力画像から輝度ヒストグラムを作成し(図20のステップS200参照)、作成した輝度ヒストグラムの輝度分布全体を、全階調に広がるように拡大する(図20のステップS201参照)。これにより全体として入力画像のコントラストを向上させることができる。
【0108】
次にコントラストを向上させた画像に対し、その低輝度部の重心位置を求める(図20のステップS202参照)。そして、目標輝度分布から輝度補正目標値を算出し(図20のステップS203参照)、分布を拡大させたことで移動した低輝度部の重心位置を目標値に移すような補正を行う(図20のステップS204参照)。これにより、低輝度部の輝度値を目標としている輝度値に補正することができる。
これら2つの処理の結果、逆光状態の低輝度領域が目標輝度値になるように明るく補正すると共に全体のコントラストが向上した画像を得ることができる。
【0109】
図20(b)は、このような図17の自動階調補正装置で実際に行う階調補正処理のフローチャートを示すもので、まず、ステップS210において、デジタル画像の輝度ヒストグラムを作成し、ステップS211において、この輝度ヒストグラムの低輝度部の重心を、輝度分布を拡大する前に求める。そして、ステップS212において、輝度補正目標値を算出し、ステップS213において、輝度ヒストグラムの輝度分布を拡大し、同時に、輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムの輝度分布を補正する補正テーブルを作成し、この補正テーブルを用いて、これら輝度ヒストグラムの拡大と低輝度部の重心が目標値に一致するような輝度分布の補正、を同時に行う。
これにより、図20(a)のように輝度ヒストグラムを作成した後、直ちにその輝度分布を拡大する場合に必要となる輝度分布拡大部(輝度分布拡大専用の変換テーブル)、が不要となり、しかも上述のように、小数点以下の演算誤差をなくすことができる。
【0110】
図19は、図18(a)の入力画像において、図18(b)の輝度ヒストグラムから目標値を算出し階調補正を行った画像の輝度ヒストグラムである。図18より、低輝度部の分布のピークが高輝度側に移動し、低輝度部が明るく補正されたことがわかる。さらに、分布が拡大されコントラストも向上しているのがわかる。
このように、輝度分布を拡大すると同時に入力画像から作成した輝度ヒストグラムの低輝度部の重心位置を、目標とする輝度ヒストグラムから算出した目標値に移すような補正を行うことで、目標とする明るさをもち、しかも全体のコントラストが向上した画像を得ることができる。
【0111】
また、この手法では以下に述べるような効果もある。
図21に、或る2つの入力画像に対する目標輝度分布を示す。図21(a)は或る順光画像での目標輝度分布、図21(b)は或る逆光画像での目標輝度分布である。これらは、どちらも低輝度部の分布の形状が全く同じになっている。
【0112】
例えば、目標輝度分布を用いた本手法以外の階調補正方法として、入力画像の輝度分布の形状を目標輝度分布と全く同じ形になるように階調を補正していく方法がある。この補正方法の場合、分布の形状が変わると補正結果が大きく変わるので、輝度ヒストグラムの形状が異なる順光画像と逆光画像では、場合分けを行い、必ず図21(a),図21(b)に示すようなそれぞれの状態に合う目標輝度分布を設定する必要がある。
【0113】
しかしながら、本実施の形態2の目標値算出回路608では、低輝度部のみの重心を算出し、その重心位置を目標値としているため、図21に示す2つの目標輝度分布から算出される目標値は全く同じ値になり、実施の形態2の補正方法では、どちらの目標輝度分布を用いても全く同じ補正結果が得られる。従って、どちらの目標輝度分布を用いて補正を行っても良い。
このことより、本手法によれば、順光画像と逆光画像の階調補正において、低輝度部の目標とする輝度値が同じならば、同じ目標輝度分布を使用することができるので、明るさの特性が異なる画像に対し場合分けを行う必要がなく、階調補正を速やかに実行できる。
【0114】
なお、目標輝度分布記憶回路605において、上述したように輝度ヒストグラムを目標輝度分布と同じ形状にしなくても補正は行えるので、請求項5で述べたように、予め目標とする輝度分布を曲線近似し、その曲線を記憶させることもできる。そして、目標値算出回路608において、その曲線から“0”から“255”の階調に広がる輝度分布を作成し、目標値を算出する。
【0115】
また、目標値は目標輝度分布の低輝度部のみが関係してくるので、目標輝度分布記憶回路605で記憶する曲線は、例えば図22(a)の、平均値をμ、標準偏差をσ文字文字とする下記の(17)式で表せる正規分布曲線、図22(b)の下記の(18)式で表せるコサイン曲線、また、図22(c)の下記の(19)式で表せる直線とすることもできる。
【数17】
Figure 0003772133
【数18】
Figure 0003772133
【数19】
Figure 0003772133
このように、目標輝度分布を曲線、あるいは直線で与えることにより、簡単に目標輝度分布を設定することができ、目標輝度分布を構成する点の座標を全て記憶する場合よりも、メモリの記憶容量を減らすことができる。
また、目標輝度分布記憶回路605において、予め目標輝度分布を複数設定しておき、入力画像の輝度ヒストグラムに応じて、設定している目標輝度分布の形状を変えることで最適な目標値を算出することもできる。こうすることで、簡単に目標値を調整することができる。
【0116】
なお、曲線で与える場合は、曲線の傾きを変えた曲線を記憶することでも実現できる。例えば、図22(b)の曲線では、Aの値を変化させたコサイン曲線を記憶しておく。
または、予め与えられた2つの曲線を、入力画像の輝度ヒストグラムに応じて合成し、新しい曲線を作成しても良い。例えば、図22(b)と図22(c)の曲線が与えられているとき、入力画像の輝度ヒストグラムが図23(a)のような場合は、図22(b)の比率を大きくした図23(c)のような曲線を作成する。また、図23(b)のような場合は、図22(c)の比率を大きくした図23(d)のような曲線を作成する。
【0117】
さらに、これら請求項4、請求項5、及び請求項6の自動階調補正装置における補正テーブル作成回路609において、輝度分布の拡大は低輝度側にのみ行い、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正を行う処理にて高輝度側の輝度分布の拡大が行なわれるような変換テーブルを作成することにより、階調補正による高輝度部の階調の潰れを防止することができる(請求項11に対応する)。
また、この場合、輝度分布の最大値は必要ないので、分布範囲算出回路607では最小値のみ算出するようにしてもよい。こうすることで、計算量を減らすことができる。
また、実施の形態1で述べたように、請求項15ないし20で述べたような変形を加えてもよい。
【0118】
即ち、輝度分布作成回路104に対し、輝度分布の積算量に制限を設けてもよい(請求項15に対応する)。このように、予め輝度ヒストグラムに制限をもたせることにより、例えば、逆光画像等で背景が白飛びを起こし輝度レベルが255に集中してしまった場合等、階調分布がある階調に集中しているような極端な偏りがある場合でも、正確に補正量を算出することができる。
また、色差信号、及び輝度信号から肌色領域を抽出し、輝度ヒストグラムを作成する際に、画像の肌色領域の輝度分布を画像全体の輝度分布に肌色の領域に応じて加重し輝度ヒストグラムを作成してもよい(請求項16に対応する)。このように、重み付けを行うことで肌色領域が最適になるような階調補正を行うことができる。
【0119】
また、肌色領域の輝度分布において、高輝度部の分布数に重み付けをするようにしてもよい(請求項17に対応する)。例えば肌色領域の輝度分布に図13に示すような係数を乗算することで、高輝度部に重み付けを行う。
また、輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の補正量を算出してもよい(請求項18に対応する)。
【0120】
勿論、低輝度部の補正と同様に、目標輝度分布から高輝度部の目標値を算出し、高輝度部の重心位置が高輝度部の目標値に一致するように補正ポイントを設けそれに応じて補正テーブルを作成してもよい。
【0121】
また、輝度分布作成回路で作成された輝度分布が離散的な場合には、補正を行わないようにしてもよい(請求項19に対応する)。これは、画像が人工画像であると判断でき、人工画像の場合概して階調補正を行わないほうがよいためである。
また、デジタル画像信号を輝度信号と色差信号とに分離し、輝度信号に対し階調補正を行うようにする場合に、補正テーブルに応じて画像の色差信号を補正してもよい(請求項20に対応する)。これにより、階調補正を行った輝度信号と色差信号とからR,B,G信号を作成した場合、輝度補正により彩度が低下したように見える現象を緩和することができる。
【0122】
このように、本実施の形態2によれば、デジタル画像の輝度ヒストグラムを作成し、その低輝度部の重心を算出し、また目標輝度分布から輝度補正目標値を算出し、輝度ヒストグラムの輝度の分布を拡大し、同時に分布拡大後の輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する補正テーブルを作成し、補正を行うようにしたので、1つの変換テーブルを作成するのみで、デジタル画像信号から作成した輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が輝度補正目標値に一致するように補正を行い、逆光画像に対し逆光状態の低輝度領域が目標輝度値になるように明るく補正し、全体のコントラストが向上した画像を得ることができる。また順光画像でも同様に、低輝度領域の輝度値を目標値に一致するように補正し、全体のコントラストが向上した画像を得ることができる自動階調補正装置が得られる。
【0123】
なお、上述の説明では、主に、補正テーブルを使用することで、輝度分布の拡大と低輝度部の重心が目標値に一致するように補正する階調補正処理とを同時に行う自動階調補正装置について説明したが、この自動階調補正装置に相当する処理を行う自動階調補正方法として実現してもよい。また、その補正原理を示す図20(a)のフローチャートに相当する自動階調補正方法およびこの自動階調補正方法に対応する自動階調補正装置、さらには、この自動階調補正方法をコンピュータに実行させる自動階調補正プログラムを各種の記録媒体に記録させる自動階調補正プログラム記録媒体として実現してもよく、輝度分布の拡大と階調補正処理とを同時に行えない以外は上記自動階調補正装置と同様の効果を奏する。
【0124】
(実施の形態3)
以下に、請求項1、請求項21、請求項41に記載された発明、(さらには、請求項2、請求項11、請求項12、請求項13、請求項14、請求項15、請求項16、請求項17、請求項18、請求項19、請求項20、請求項22、請求項31、請求項32、請求項33、請求項34、請求項35、請求項36、請求項37、請求項38、請求項39、請求項40、請求項45、請求項46、請求項47、請求項48、請求項49、請求項50、請求項51、請求項52に記載された発明)に対応する実施の形態3について、図を参照しながら説明する。
この実施の形態3は、低輝度部と高輝度部の境界を、入力画像の輝度ヒストグラムの重心にあわせて変更できるようにしたものである。
【0125】
実施の形態3の自動階調補正装置の構成は図24に示すブロック図となる。
図24において、1101は撮像した画像を光電変換する撮像素子、1102は撮像素子1101からのアナログ画像信号が入力されるA/Dコンバータ、1103はA/Dコンバータ1102からのディジタル画像信号が入力される輝度信号算出回路、1104は輝度信号算出回路1103からの輝度信号が入力される輝度分布作成回路(輝度ヒストグラム作成部)、1110は輝度分布作成回路1104からの輝度分布が入力される境界値算出回路(境界値算出部)、1105は輝度分布作成回路1104からの輝度分布および境界値算出回路1110からの境界値が入力される重心算出回路(重心算出部)、1106は輝度分布作成回路1104からの輝度分布が入力される分布範囲算出回路、1107は階調補正を行ううえでの目標となる目標値を記憶する目標値記憶回路、1108は重心算出回路1105からの重心、分布範囲算出回路1106からの分布範囲の最大値,最小値、および目標値記憶回路1107からの目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、1109は補正テーブル作成回路1108により作成された補正テーブルに基づきA/Dコンバータ1102が出力するディジタル画像信号に階調補正を行う画像信号補正回路である。
【0126】
なお、補正テーブル作成回路1108と画像信号補正回路1109とは両者で階調補正処理部を構成する。但し、階調補正処理部が輝度ヒストグラムの分布拡大機能を包含しない場合は、補正テーブル作成回路1108および画像信号補正回路1109の両者で、輝度分布拡大部および階調補正処理部の両者を構成する。
図27(a)はこの階調補正処理の原理を示すフローチャートである。
【0127】
即ち、ステップS301において、デジタル画像の輝度ヒストグラムを作成し、ステップS302において、輝度ヒストグラムを拡大する。次いで、ステップS310において、拡大された輝度ヒストグラムの全階調における重心を算出し、ステップS311において、拡大された輝度ヒストグラムの低輝度部と高輝度部との境界値を算出する。そして、ステップS303において、輝度ヒストグラムの低輝度部の重心を求め、ステップS304において、低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する。
【0128】
次に動作について説明する。基本的な動作は上述した実施の形態1と同じであるが、実施の形態1と違う点は、境界値算出回路1110を追加し、入力輝度レベル軸の中央輝度レベルを境界値とし輝度ヒストグラムを2等分してできる低輝度側の領域を低輝度部、高輝度側の領域を高輝度部とするのではなく、境界値を可変にし、入力画像に合わせた境界値を設定できるようにした点である。
このように境界値を可変にし、逆光画像において逆光領域を含む低輝度部を正確に抽出することで、より正確に逆光領域を目標輝度値に補正することができるようになる。
【0129】
既に述べたように、逆光画像で作成される輝度ヒストグラムは、図2(b)のように高輝度側と低輝度側とで2つのピークができるという特徴をもっている。そしてこのとき、全階調における重心を算出すると、全画像領域内で逆光領域を含む暗い領域の割合が多い場合は、図25(a)に示すように、重心位置が中央階調より低輝度側になり、全画像領域内で逆光領域を含む暗い領域の割合が少ない場合は、図25(b)に示すように、重心位置が中央階調より高輝度側になる。
【0130】
そこで、実施の形態3では、輝度分布作成回路1104で作成された輝度ヒストグラムの全階調重心を算出し、算出した重心位置をもとに境界値を移動させることにする。こうすることで、逆光領域を含む低輝度部とそれ以外の高輝度部を正しく分割できる。
即ち、境界値算出回路1110では、輝度分布作成回路1104で作成された輝度ヒストグラムの全階調重心を求め、中央階調からその重心位置をもとに算出した移動量だけずらせた階調を、低輝度部と高輝度部との境界値として算出する。
【0131】
輝度分布作成回路1104で作成された輝度ヒストグラムの重心をG、中央階調をHと表すと、境界値Tは下記の(20)式で算出される。
【数20】
Figure 0003772133
(20)式の“0.5”という値は、移動量を制御する係数であり、“0.5”に限るものではない。例えば、“1.0”とすると、中央階調と全階調重心との差がそのまま移動量となる。
【0132】
次に、重心算出回路1105では、“0”階調から境界値算出回路1110で算出した境界値までを低輝度部とし、輝度分布作成回路1104で作成された輝度ヒストグラムの低輝度部の重心位置を算出し、目標値記憶回路1107に記憶している目標値と、分布範囲算出回路1106で算出した最大値,最小値とあわせて補正テーブル作成回路1108にて輝度変換テーブルを作成する。そして、画像信号補正回路1109にて階調補正を行う。
これにより目標とする明るさをもち、しかも全体のコントラストが向上した画像を得ることができる。
【0133】
図27(b)は、このような図24の自動階調補正装置で実際に行う階調補正処理のフローチャートを示すもので、まず、ステップS321において、デジタル画像の輝度ヒストグラムを作成し、ステップS330において、この輝度ヒストグラムの全階調における重心を、輝度分布を拡大する前に求める。次に、ステップS331において、輝度ヒストグラムの低輝度部と高輝度部との境界値を算出し、ステップS322において、輝度ヒストグラムの低輝度部の重心を求める
。次に、ステップS323において、輝度ヒストグラムの輝度分布を拡大し、同時に、輝度分布が拡大された輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムの輝度分布を補正する補正テーブルを作成し、この補正テーブルを用いて、これら輝度ヒストグラムの拡大と低輝度部の重心が目標値に一致するような輝度分布の補正、を同時に行う。
【0134】
これにより、図27(a)のように輝度ヒストグラムを作成した後、直ちにその輝度分布を拡大する場合に必要となる輝度分布拡大部(輝度分布拡大専用の変換テーブル)、が不要となり、しかも上述のように、小数点以下の演算誤差をなくすことができる。
【0135】
ところで、実施の形態3の目標値記憶回路1107では、予め目標値を設定し記憶したが、実施の形態2と同様に、目標輝度分布から目標値を算出し、算出した目標値を目標値記憶回路1107に記憶させておくこともできる。この場合は、重心算出回路1105の重心算出方法と同様に“0”階調から境界値までを低輝度部とし、目標輝度分布の低輝度部の重心を求め、求めた重心位置を目標値とすればよい。
【0136】
なお、上記の境界値の算出方法は一例であり、輝度ヒストグラム全体から低輝度部を正しく検出することができれば、他の方法を用いてもよい。
例えば、境界値算出回路1110において、請求項2に述べたように、輝度範囲を分割し、各領域の特徴量として重心位置を求め、求めた重心位置から境界値を算出することもできる。
【0137】
これは、まず輝度分布作成回路1104で作成された輝度ヒストグラムを中央階調で2つの領域に分割し、各領域において重心位置を算出する。そして求めた2つの重心の中点を移動量の算出に用いる。
輝度分布作成回路1104で作成された輝度ヒストグラムを2等分したとき低輝度側領域の重心をG1、高輝度側領域の重心をG2、そして中央階調をHと表すと、境界値Tは下記の(21)式で算出される。
【数21】
Figure 0003772133
(21)式の“1.0”という値は、移動量を制御する係数であり、“1.0”の場合は2つの重心の中点が境界値になっている。
【0138】
図26は、同一の輝度ヒストグラムに対し(20)式と(21)式とを用いて算出した境界値を示したものである。図26(a)は(20)式、図26(b)は(21)式によりそれぞれ境界値を算出したものである。図26の輝度ヒストグラムのように、高輝度側の限られた階調に頻度が集中し、低輝度側の合計頻度より多くなる場合、全階調重心の重心位置は頻度が集中している側になる。したがって、図26(a)では、境界値が低輝度部の山型分布の中に設定されてしまう。しかし、図26(b)では、高輝度側と低輝度側とを分割し、低輝度側の「山」と高輝度側の「山」を別々に考えることにより、境界値を山型分布の「谷」位置に設定することができている。
【0139】
このように、輝度ヒストグラムを2分割する境界値を求めることにより、輝度分布の頻度が極端な場合においても、正確な境界値を算出することができる。
また、別の境界値の算出方法として、輝度範囲を多数に分割し、各領域の頻度を算出し、頻度が多い領域に挟まれた,頻度が少ない領域を境界値とすることもできる。
【0140】
なお、輝度ヒストグラムを中央階調で2つの領域に分割し、各領域において重心位置を算出し、境界値を算出する方法では、境界値算出回路1110で輝度範囲を2つの領域に分けて算出した低輝度領域の重心位置を、補正テーブル作成回路1108で用いる重心位置とすることもできる。
こうすることで、重心算出回路1105にて、境界値までの低輝度領域の重心位置を算出する必要がないため、この重心算出回路を省くことができる。
【0141】
この場合の自動階調補正装置の構成は図28に示すブロック図となる。図28において、1401は撮像した画像を光電変換する撮像素子、1402は撮像素子1401からのアナログ画像信号が入力されるA/Dコンバータ、1403はA/Dコンバータ1402からのディジタル画像信号が入力される輝度信号算出回路、1404は輝度信号算出回路1403からの輝度信号が入力される輝度分布作成回路、1410は階調補正を行ううえでの目標となる目標輝度分布を記憶している目標輝度分布記憶回路、1409は輝度分布作成回路1404からの輝度分布が入力される境界値算出回路、1406は輝度分布作成回路1404からの輝度分布が入力される分布範囲算出回路、1405は境界値算出回路1409からの境界値および目標輝度分布記憶回路1410からの目標輝度分布が入力される目標値算出回路、1407は目標値算出回路1405からの目標値、分布範囲算出回路1406からの分布範囲の最大値,最小値、および境界値算出回路1409からの重心位置に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、1408は補正テーブル作成回路1407により作成された補正テーブルに基づきA/Dコンバータ1402が出力するディジタル画像信号に階調補正を行う画像信号補正回路である。
【0142】
次に動作について説明する。基本的な動作は上述した請求項4,請求項1の装置と同じであるが、境界値算出回路1409では、境界値と低輝度部の重心位置を算出する。そして、目標値算出回路1405では、目標輝度分布記憶回路1410に記憶している目標輝度分布、および境界値算出回路1409で算出した境界値から目標値を算出し、補正テーブル作成回路1407では、分布範囲算出回路1406で求めた最大値,最小値、目標値算出回路1405で算出した目標値、および境界値算出回路1409で求めた低輝度部の重心位置に基づいて補正テーブルを作成する。
【0143】
さらに、これら請求項1、請求項2の自動階調補正装置における補正テーブル作成回路において、輝度分布の拡大は、低輝度側にのみ行い、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正を行なう処理にて高輝度側の輝度分布の拡大が行なわれるような変換テーブルを作成することにより、階調補正による高輝度部の階調の潰れを防止できるようにしてもよい(請求項11に対応する)。
【0144】
また、この場合、輝度分布の最大値は必要ないので、分布範囲算出回路では最小値のみ算出してもよい。こうすることで、計算量を減らすことができる。
また、実施の形態1で述べたように、請求項15ないし20で述べたような変形を加えてもよい。
即ち、輝度分布作成回路104に対し、輝度分布の積算量に制限を設けてもよい(請求項15に対応する)。このように、予め輝度ヒストグラムに制限をもたせることにより、例えば、逆光画像等で背景が白飛びを起こし輝度レベルが255に集中してしまった場合等、階調分布がある階調に集中しているような極端な偏りがある場合でも、正確に補正量を算出することができる。
【0145】
また、色差信号、及び輝度信号から肌色領域を抽出し、輝度ヒストグラムを作成する際に、画像の肌色領域の輝度分布を画像全体の輝度分布に肌色の領域に応じて加重し輝度ヒストグラムを作成してもよい(請求項16に対応する)。このように、重み付けを行うことで肌色領域が最適になるような階調補正を行うことができる。
また、肌色領域の輝度分布において、高輝度部の分布数に重み付けをするようにしてもよい(請求項17に対応する)。例えば肌色領域の輝度分布に図13に示すような係数を乗算することで、高輝度部に重み付けを行う。
【0146】
また、輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の補正量を算出してもよい(請求項18に対応する)。
また、輝度分布作成回路で作成された輝度分布が離散的な場合には、補正を行わないようにしてもよい(請求項19に対応する)。これは、画像が人工画像であると判断でき、人工画像の場合概して階調補正を行わないほうがよいためである。
また、デジタル画像信号を輝度信号と色差信号とに分離し、輝度信号に対し階調補正を行うようにする場合に、補正テーブルに応じて画像の色差信号を補正してもよい(請求項20に対応する)。これにより、階調補正を行った輝度信号と色差信号とからR,B,G信号を作成した場合、輝度補正により彩度が低下したように見える現象を緩和することができる。
【0147】
このように、本実施の形態3によれば、デジタル画像の輝度ヒストグラムを作成し、その全階調における重心を算出し、これに基づいて低輝度部と高輝度部との境界値を算出し、その低輝度部の重心を算出し、輝度ヒストグラムの輝度の分布を拡大し、同時に分布拡大後の輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する補正テーブルを作成し、補正を行うようにしたので、輝度ヒストグラム全体の重心に応じて低輝度部と高輝度部とを正しく分割でき、1つの変換テーブルを作成するのみで、デジタル画像信号から作成した輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が輝度補正目標値に一致するように補正を行い、逆光画像に対し逆光状態の低輝度領域が目標輝度値になるように明るく補正し、全体のコントラストが向上した画像を得ることができる。また順光画像でも同様に、低輝度領域の輝度値を目標値に一致するように補正し、全体のコントラストが向上した画像を得ることができる自動階調補正装置が得られる。
【0148】
なお、上述の説明では、主に、補正テーブルを使用することで、輝度分布の拡大と低輝度部の重心が目標値に一致するように補正する階調補正処理とを同時に行う自動階調補正装置について説明したが、この自動階調補正装置に相当する処理を行う自動階調補正方法として実現してもよい。また、その補正原理を示す図27(a)のフローチャートに相当する自動階調補正方法およびこの自動階調補正方法に対応する自動階調補正装置、さらには、この自動階調補正方法をコンピュータに実行させる自動階調補正プログラムを各種の記録媒体に記録させる自動階調補正プログラム記録媒体として実現してもよく、輝度分布の拡大と階調補正処理とを同時に行えない以外は上記自動階調補正装置と同様の効果を奏する。
【0149】
(実施の形態4)
以下に、請求項3、請求項23、請求項42に記載された発明、(さらには、請求項7、請求項8、請求項11、請求項12、請求項13、請求項14、請求項15、請求項16、請求項17、請求項18、請求項19、請求項27、請求項27、請求項28、請求項31、請求項32、請求項33、請求項34、請求項35、請求項36、請求項37、請求項38、請求項39、請求項40、請求項45、請求項46、請求項47、請求項48、請求項49、請求項50、請求項51、請求項52に記載された発明)に対応する実施の形態4について、図を参照しながら説明する。
この実施の形態4は、輝度ヒストグラムの形状に基づいて低輝度部と高輝度部との境界を検出できるようにしたものである。
【0150】
実施の形態4の自動階調補正装置の構成は図29に示すブロック図となる。
図29において、1501は撮像した画像を光電変換する撮像素子、1502は撮像素子1501からのアナログ画像信号が入力されるA/Dコンバータ、1503はA/Dコンバータ1502からのディジタル画像信号が入力される輝度信号算出回路、1504は輝度信号算出回路1503からの輝度信号が入力される輝度分布作成回路(輝度ヒストグラム作成部)、1512は輝度分布作成回路1504からの輝度分布が入力される山型分布検出回路(山型分布検出部)、1511は山型分布検出回路1512からの山型分布の範囲と輝度分布作成回路1504からの輝度分布が入力される境界値算出回路(境界値算出部)、1506は輝度分布作成回路1504からの輝度分布および境界値算出回路1511からの境界値が入力される重心算出回路(重心算出部)、1507は輝度分布作成回路1504からの輝度分布が入力される分布範囲算出回路、1505は階調補正を行ううえでの目標となる目標輝度分布を記憶している目標輝度分布記憶回路、1508は目標輝度分布記憶回路1505からの目標輝度分布および境界値算出回路1511からの境界値が入力される目標値算出回路、1509は重心算出回路1506からの重心、分布範囲算出回路1507からの分布範囲の最大値,最小値、および目標値算出回路1508からの目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、1510は補正テーブル作成回路1509により作成された補正テーブルに基づきA/Dコンバータ1502が出力するディジタル画像信号に階調補正を行う画像信号補正回路である。なお、補正テーブル作成回路1509および画像信号補正回路1510は両者で階調補正処理部を構成する。但し、階調補正処理部が輝度ヒストグラムの分布拡大機能を包含しない場合は、補正テーブル作成回路1509および画像信号補正回路1510の両者で、輝度分布拡大部および階調補正処理部の両者を構成する。
【0151】
図33(a)はこの階調補正処理の原理を示すフローチャートである。
即ち、ステップS401において、デジタル画像の輝度ヒストグラムを作成し、ステップS402において、輝度ヒストグラムを拡大する。次いで、ステップS410において、輝度ヒストグラムにおける山型の分布範囲を検出し、ステップS411において、この山型分布の範囲に基づいて低輝度部と高輝度部との境界値を算出する。そして、ステップS403において、輝度ヒストグラムの低輝度部の重心を求め、ステップS404において、低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する。
【0152】
次に、動作について説明する。基本的な動作は上述した実施の形態2、実施の形態3と同じであるが、境界値算出回路1511での境界値の算出部が異なり、山型分布検出回路1512にて検出したヒストグラムの山型分布の範囲を用い、境界値を算出する点が異なる。以下、その処理内容を図30,図31,図32,図33を用いて説明する。
山型分布検出回路1512では、輝度分布作成回路1504で作成した輝度ヒストグラムにおいて、輝度レベルの最低値から高輝度方向に走査していき最初に発見する山型分布になっている範囲を記憶する。この範囲を範囲Aとおく。同様に輝度レベルの最高値から低輝度方向に走査していき最初に発見する「山」の範囲を記憶する。この範囲を範囲Bとおく。
次に、境界値算出回路1511では、輝度ヒストグラムの範囲Aの重心位置、範囲Bの重心位置を算出し、この2点の中点を低輝度部と高輝度部との境界値として求める。
【0153】
図30は、逆光画像と順光画像において輝度分布作成回路1504にて輝度ヒストグラムを作成し、山型分布検出回路1512で山型分布の範囲を検出し、境界値算出回路1511で境界値を求めた例である。
図30(a)は逆光状態の画像の輝度ヒストグラムであり、この状態では、低階調側と高輝度側にピークができ、低輝度側にピークの範囲A、高輝度側にピークの範囲Bが検出され、境界値は2つの山型分布の「谷」位置となっている。これに対し、図30(b)の順光状態の画像においては、山型分布のピークがひとつしかないので範囲A、範囲Bは同じ範囲になり、低輝度部と高輝度部との境界値は、範囲A,範囲Bの重心位置と同じ位置になっている。
【0154】
次に、“0”階調から境界値算出回路1511にて算出した境界値までを低輝度部とし、実施の形態2と同様にして目標値算出回路1508、重心算出回路1506において、それぞれ目標値、重心位置を算出し、補正テーブル作成回路1509で補正テーブルを作成し、画像信号補正回路1510にて補正を行う。
【0155】
図33(b)は、このような図29の自動階調補正装置で実際に行う階調補正処理のフローチャートを示すもので、まず、ステップS421において、デジタル画像の輝度ヒストグラムを作成し、ステップS430において、この輝度ヒストグラムの山型分布の範囲を、輝度分布を拡大する前に検出する。次に、ステップS431において、輝度ヒストグラムの低輝度部と高輝度部との境界値を、輝度分布を拡大する前に算出し、ステップS422において、輝度ヒストグラムの低輝度部の重心を、輝度分布を拡大する前に求める。次に、ステップS423において、輝度ヒストグラムの輝度分布を拡大し、同時に、輝度分布が拡大された輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムの輝度分布を補正する補正テーブルを作成し、この補正テーブルを用いて、これら輝度ヒストグラムの拡大と低輝度部の重心が目標値に一致するような輝度分布の補正、を同時に行う。
これにより、図33(a)のように輝度ヒストグラムを作成した後、直ちにその輝度分布を拡大する場合に必要となる輝度分布拡大部(輝度分布拡大専用の変換テーブル)、が不要となり、しかも上述のように、小数点以下の演算誤差をなくすことができる。
【0156】
図31に図30(a)の逆光画像の場合の補正処理を、図32に図30(b)の順光画像の場合の補正処理を示す。図31,図32の(a)は目標値算出回路1508での目標値算出処理、図31,図32の(b)は重心算出回路1506での重心算出処理、図31,図32の(c)は、画像信号補正回路1510での補正処理である。但し、目標輝度分布記憶回路1505には、正規分布の形状をもつ輝度分布を記憶させているものとする。
【0157】
図31では、低輝度側のピークが高輝度側に移動し分布が拡大しているので、低輝度部が明るく補正され、コントラストが向上しているのがわかる。しかし図32では、重心位置と目標値との差があまりないので輝度ヒストグラムのピークは殆ど移動していない。したがって、コントラストは向上しているが、明るさはほとんど変化していないことがわかる。
【0158】
このように、実施の形態4では、逆光画像と順光画像との場合分けを行わずに、逆光画像では逆光状態の低輝度領域を目標輝度値になるように明るく補正されると共にコントラストが向上した画像を得ることができ、順光画像では明るさを殆ど変えずに、コントラストが向上した画像を得ることができる。
したがって、実施の形態4の自動階調補正装置を用いれば、黒い服を着た人間が写っている画像を補正すると、服が灰色になってしまうという問題を、順光と逆光の場合分けを行うことなく解決することができる。
なお、上記の処理では目標輝度分布を正規分布の形をもつ輝度分布としたが、これに限るものではない。例えば、図22(b)のような目標輝度分布においても同様の効果を得ることができる。
【0159】
また、請求項7で述べたように、境界値算出回路1511は、山型分布検出回路1512にて検出した山型分布の範囲から算出した境界値を、輝度分布作成回路1504にて作成された輝度ヒストグラムを用い調整することにより、逆光画像において境界値をより正確に求めることができる。
境界値算出回路1511では、山型分布検出回路1512にて検出した2つの山型分布範囲の重心位置をそれぞれ算出し、2つの重心位置とその2点間における輝度ヒストグラムの頻度を用い境界値を求める。
【0160】
ところで、これまでの境界値算出回路1511での境界値の算出方法では、山型分布検出回路1512で最初に発見する山型分布の範囲のみ検出していたので、山型分布が3個以上できる輝度ヒストグラムにおいて境界値が山型分布の谷位置にならない場合があった。
【0161】
図34は輝度ヒストグラムの山型分布が3個ある場合の境界値である。この場合、境界値が真中にある山型分布の中に設定されているのがわかる。
そこで例えば、2つの重心位置をg1,g2、2つの重心間における輝度ヒストグラムの重心位置をGと表し、境界値Tは下記の(22)式で算出するようにする。
【数22】
Figure 0003772133
(22)式では、重心位置Gは必ずg1とg2の間に存在するので、境界値は必ずg1とg2の間に算出される。したがって、2つの重心の間隔が狭い順光画像においては、境界値を2つの重心の中点とするときと境界値は変わらないが、2つの重心の間隔が広い逆光画像の場合は、重心の位置にあわせて境界値が変化する。
【0162】
図35は、(22)式を用い図34の輝度ヒストグラムにおいて境界値を求めたものである。輝度分布の重心位置に合わせて境界値を調整しているので、境界値が山型分布の谷位置になっている。
このように、2つの重心位置とその2点間における輝度ヒストグラムの頻度を用いることで、より正確に境界値を求めることができる。
また、請求項8で述べたように、山型分布検出回路1512の山型分布の範囲に制限を設けることもできる。
【0163】
これを図36に示す。図36では、“255”から“0”方向への走査に制限を設けている。したがって、“255”から“0”方向への走査は山型分布が続いているにもかかわらず途中で中止し、検出範囲は“0”から“255”方向への走査で検出した範囲よりも狭くなっている。この結果、制限を設けた方の範囲の重心位置は高くなり、境界値も高くなる。したがって、目標値も高輝度側によることになる。
これにより、実施の形態4の階調補正装置においても、山型分布探索に制限を設けることで、順光状態でも輝度を上げることができる。
【0164】
さらに、これら請求項3、請求項7、及び請求項8の自動階調補正装置における補正テーブル作成回路において、輝度分布の拡大は、低輝度側にのみ行い、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正を行う処理にて高輝度側の輝度分布の拡大が行なわれるような変換テーブルを作成することにより、階調補正による高輝度部の階調の潰れを防止することができる(請求項11に対応する)。
【0165】
また、この場合、輝度分布の最大値は必要ないので、分布範囲算出回路では最小値のみ算出してもよい。これにより、計算量を減らすことができる。
また、実施の形態1で述べたように、請求項15ないし20で述べたような変形を加えてもよい。
【0166】
即ち、輝度分布作成回路104に対し、輝度分布の積算量に制限を設けてもよい(請求項15に対応する)。このように、予め輝度ヒストグラムに制限をもたせることにより、例えば、逆光画像等で背景が白飛びを起こし輝度レベルが255に集中してしまった場合等、階調分布がある階調に集中しているような極端な偏りがある場合でも、正確に補正量を算出することができる。
【0167】
また、色差信号、及び輝度信号から肌色領域を抽出し、輝度ヒストグラムを作成する際に、画像の肌色領域の輝度分布を画像全体の輝度分布に肌色の領域に応じて加重し輝度ヒストグラムを作成してもよい(請求項16に対応する)。このように、重み付けを行うことで肌色領域が最適になるような階調補正を行うことができる。
【0168】
また、肌色領域の輝度分布において、高輝度部の分布数に重み付けをするようにしてもよい(請求項17に対応する)。例えば肌色領域の輝度分布に図13に示すような係数を乗算することで、高輝度部に重み付けを行う。
また、輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の補正量を算出してもよい(請求項18に対応する)。
【0169】
また、輝度分布作成回路で作成された輝度分布が離散的な場合には、補正を行わないようにしてもよい(請求項19に対応する)。これは、画像が人工画像であると判断でき、人工画像の場合概して階調補正を行わないほうがよいためである。
また、デジタル画像信号を輝度信号と色差信号とに分離し、輝度信号に対し階調補正を行うようにする場合に、補正テーブルに応じて画像の色差信号を補正してもよい(請求項20に対応する)。これにより、階調補正を行った輝度信号と色差信号とからR,B,G信号を作成した場合、輝度補正により彩度が低下したように見える現象を緩和することができる。
【0170】
このように、本実施の形態4によれば、デジタル画像の輝度ヒストグラムを作成し、輝度ヒストグラムの山型分布の範囲を検出し、これに基づき、輝度ヒストグラムの低輝度部と高輝度部との境界値を検出し、輝度ヒストグラムの低輝度部の重心を求め、輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する補正テーブルを作成し、補正を行うようにしたので、輝度ヒストグラムの形状に応じて低輝度部と高輝度部とを正しく分割でき、1つの変換テーブルを作成するのみで、デジタル画像信号から作成した輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が輝度補正目標値に一致するように補正を行い、逆光画像と順光画像との場合分けを行わずに、逆光画像では逆光状態の低輝度領域を目標輝度値になるように明るく補正されると共にコントラストが向上した画像を得ることができ、順光画像では明るさを殆ど変えずに、コントラストが向上した画像を得ることができる自動階調補正装置が得られる。
【0171】
なお、上述の説明では、主に、補正テーブルを使用することで、輝度分布の拡大と低輝度部の重心が目標値に一致するように補正する階調補正処理とを同時に行う自動階調補正装置について説明したが、この自動階調補正装置に相当する処理を行う自動階調補正方法として実現してもよい。また、その補正原理を示す図33(a)のフローチャートに相当する自動階調補正方法およびこの自動階調補正方法に対応する自動階調補正装置、さらには、この自動階調補正方法をコンピュータに実行させる自動階調補正プログラムを各種の記録媒体に記録させる自動階調補正プログラム記録媒体として実現してもよく、輝度分布の拡大と階調補正処理とを同時に行えない以外は上記自動階調補正装置と同様の効果を奏する。
【0172】
(実施の形態5)
以下に、請求項9、請求項38、請求項44に記載された発明、(さらには、請求項10、請求項11、請求項12、請求項13、請求項14、請求項15、請求項16、請求項17、請求項18、請求項19、請求項20、請求項30、請求項31、請求項32、請求項33、請求項34、請求項35、請求項36、請求項37、請求項38、請求項39、請求項40、請求項45、請求項46、請求項47、請求項48、請求項49、請求項50、請求項51、請求項52に記載された発明)に対応する実施の形態5について、図を参照しながら説明する。
この実施の形態5は目標値の修正を行うようにしたものである。
【0173】
図37は実施の形態5の自動階調補正装置の構成を示すブロック図である。
図37において、2201は撮像した画像を光電変換する撮像素子、2202は撮像素子2201からのアナログ画像信号が入力されるA/Dコンバータ、2203はA/Dコンバータ2202からのディジタル画像信号が入力される輝度信号算出回路、2204は輝度信号算出回路2203からの輝度信号が入力される輝度分布作成回路(輝度ヒストグラム作成部)、2212は輝度分布作成回路2204からの輝度分布が入力される山型分布検出回路、2211は山型分布検出回路2212からの山型分布の範囲と輝度分布作成回路2204からの輝度分布が入力される境界値算出回路、2206は輝度分布作成回路2204からの輝度分布および境界値算出回路2211からの境界値が入力される重心算出回路(重心算出部)、2207は輝度分布作成回路2204からの輝度分布が入力される分布範囲算出回路、2205は階調分布を行ううえでの目標となる目標輝度分布を記憶している目標輝度分布記憶回路、2208は目標輝度分布記憶回路2205からの目標輝度分布および境界値算出回路2211からの境界値が入力される目標値算出回路、2213は重心算出回路2206からの重心および目標値算出回路2208からの目標値が入力される目標値修正回路(目標値修正部)、2209は重心算出回路2206からの重心、分布範囲算出回路2207からの分布範囲の最大値,最小値、さらには目標値修正回路2213により修正された目標値に基づき階調補正用の補正テーブルを作成する補正テーブル作成回路、2210は補正テーブル作成回路2209により作成された補正テーブルに基づきA/Dコンバータ2202が出力するディジタル画像信号に階調補正を行う画像信号補正回路である。なお、補正テーブル作成回路2209と画像信号補正回路2210とは両者で階調補正処理部を構成する。但し、階調補正処理部が輝度ヒストグラムの分布拡大機能を包含しない場合は、補正テーブル作成回路2209および画像信号補正回路2210の両者で、輝度分布拡大部および階調補正処理部の両者を構成する。
【0174】
図39(a)はこの階調補正処理の原理を示すフローチャートである。
即ち、ステップS501において、デジタル画像の輝度ヒストグラムを作成し、ステップS502において、輝度ヒストグラムを拡大する。次いで、ステップS503において、拡大した輝度ヒストグラムの低輝度部の重心を求め、ステップS510において、目標値が拡大する前の輝度ヒストグラムの低輝度部の重心位置よりも小さいか否かを判定する。
小さい場合、ステップS511において目標値を修正し、それ以外の場合はステップS511をスキップする。そして、ステップS504において、低輝度部の重心が目標値に一致するように、輝度ヒストグラムを補正する。
【0175】
次に、動作について説明する。基本的な動作は上述した実施の形態4と同じであるが、目標値の設定の仕方が異なり、目標値算出回路2208で求めた目標値を目標値修正回路2213にて修正を行うようになっている。
目標値算出回路2208では、実施の形態4と同様に目標輝度分布記憶回路2205に記憶されている輝度ヒストグラムを用い目標値を算出する。
次に目標値修正回路2213では、目標値が重心算出回路2206で求めた重心位置より小さい場合、重心位置が新たな目標値となるように修正する。
【0176】
図39(b)は、このような図37の自動階調補正装置で実際に行う階調補正処理のフローチャートを示すもので、まず、ステップS521において、デジタル画像の輝度ヒストグラムを作成し、ステップS522において、この輝度ヒストグラムの低輝度部の重心を、輝度分布を拡大する前に求める。次に、ステップS530において、目標値が輝度ヒストグラムの低輝度部の重心位置よりも小さいか否かを判定する。目標値が輝度ヒストグラムの低輝度部の重心位置よりも小さい場合、ステップS531において目標値を修正し、それ以外の場合はステップS531をスキップする。次にステップS523において、輝度ヒストグラムを拡大し、輝度ヒストグラムの輝度分布を拡大し、同時に、輝度分布が拡大された輝度ヒストグラムの低輝度部の重心が目標値に一致するように輝度ヒストグラムの輝度分布を補正する補正テーブルを作成し、この補正テーブルを用いて、これら輝度ヒストグラムの拡大と低輝度部の重心が目標値に一致するような輝度分布の補正、を同時に行う。
【0177】
これにより、図39(a)のように輝度ヒストグラムを作成した後、直ちにその輝度分布を拡大する場合に必要となる輝度分布拡大部(輝度分布拡大専用の変換テーブル)、が不要となり、しかも上述のように、小数点以下の演算誤差をなくすことができる。
【0178】
図38は、目標値修正回路を設けない実施の形態4の自動階調補正装置と、目標値修正回路を設けた実施の形態5の自動階調補正装置で、或る順光画像の補正を行ったときの重心位置、目標値、輝度ヒストグラムの一例を示したものである。図38において、(a)は重心位置と目標値、(b)は実施の形態4の自動階調補正装置により補正を行った結果、(c)は実施の形態5の自動階調補正装置により補正を行った結果である。
図38(a)では、目標輝度分布のピーク位置が輝度ヒストグラムの分布のピーク位置がよりも低輝度側にあるので、目標値が重心位置よりも低輝度側になっている。したがって、図38(b)では、重心位置が重心位置より小さい目標値に一致するように補正を行うので、コントラストは向上しているが、画像が暗く補正されている。しかし、図38(c)では、目標値を重心位置に修正しているので元の明るさを保ったままコントラストが向上している。
【0179】
このことより、風景写真などで入力画像よりも暗く補正したくない場合、目標値修正回路2213により、目標値が重心位置より小さいとき、重心位置が目標値となるように修正することで、入力画像よりも暗く補正してしまうことを防ぐことができる。
なお、目標値修正回路2213において、目標値が重心位置より大きい場合に、目標値が重心位置となるように修正することもできる。この場合は、入力画像よりも明るく補正してしまうことを防ぐことができる。
また、目標値修正回路2213において、請求項10で述べたように、目標値は重心位置に修正するのではなく、重心位置を基準にして、目標値をこれより“高め”、もしくは“低め”と修正することもできる。こうすることで、入力画像の明るさを元に補正後の明るさの微調整を行うことができる。
【0180】
さらに、これら請求項9、及び請求項10の自動階調補正装置における補正テーブル作成回路において、輝度分布の拡大は、低輝度側にのみ行い、輝度ヒストグラムの低輝度部の重心が目標値に一致するように補正を行う処理にて高輝度側の輝度分布の拡大が行なわれるような変換テーブルを作成することにより、階調補正による高輝度部の階調の潰れを防止することができる(請求項11に対応する)。
【0181】
また、実施の形態1で述べたように、請求項15ないし20で述べたような変形を加えてもよい。
即ち、輝度分布作成回路104に対し、輝度分布の積算量に制限を設けてもよい(請求項15に対応する)。このように、予め輝度ヒストグラムに制限をもたせることにより、例えば、逆光画像等で背景が白飛びを起こし輝度レベルが255に集中してしまった場合等、階調分布がある階調に集中しているような極端な偏りがある場合でも、正確に補正量を算出することができる。
【0182】
また、色差信号、及び輝度信号から肌色領域を抽出し、輝度ヒストグラムを作成する際に、画像の肌色領域の輝度分布を画像全体の輝度分布に肌色の領域に応じて加重し輝度ヒストグラムを作成してもよい(請求項16に対応する)。このように、重み付けを行うことで肌色領域が最適になるような階調補正を行うことができる。
また、肌色領域の輝度分布において、高輝度部の分布数に重み付けをするようにしてもよい(請求項17に対応する)。例えば肌色領域の輝度分布に図13に示すような係数を乗算することで、高輝度部に重み付けを行う。
【0183】
また、輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の補正量を算出してもよい(請求項18に対応する)。
また、輝度分布作成回路で作成された輝度分布が離散的な場合には、補正を行わないようにしてもよい(請求項19に対応する)。これは、画像が人工画像であると判断でき、人工画像の場合概して階調補正を行わないほうがよいためである。
また、デジタル画像信号を輝度信号と色差信号とに分離し、輝度信号に対し階調補正を行うようにする場合に、補正テーブルに応じて画像の色差信号を補正してもよい(請求項20に対応する)。これにより、階調補正を行った輝度信号と色差信号とからR,B,G信号を作成した場合、輝度補正により彩度が低下したように見える現象を緩和することができる。
【0184】
このように、本実施の形態5によれば、デジタル画像の輝度ヒストグラムを作成し、輝度ヒストグラムの山型分布の範囲を検出し、これに基づき、輝度ヒストグラムの低輝度部と高輝度部との境界値を算出し、輝度ヒストグラムの低輝度部の重心を求め、目標値が低輝度部の重心位置より小さい場合は新たな目標値となるように目標値を修正し、輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が目標値に一致するように輝度ヒストグラムを補正する補正テーブルを作成し、補正を行うようにしたので、輝度ヒストグラムの形状に応じて低輝度部と高輝度部とを正しく分割でき、目標値を修正することで、輝度ヒストグラムに望ましくない補正を行うのを防止でき、1つの変換テーブルを作成するのみで、デジタル画像信号から作成した輝度ヒストグラムの輝度分布を拡大すると同時に低輝度部の重心が輝度補正目標値に一致するように補正を行い、逆光画像と順光画像との場合分けを行わずに、逆光画像では逆光状態の低輝度領域を目標輝度値になるように明るく補正されると共にコントラストが向上した画像を得ることができ、順光画像では明るさを殆ど変えずに、コントラストが向上した画像を得ることができる自動階調補正装置が得られる。
【0185】
なお、上述の説明では、主に、補正テーブルを使用することで、輝度分布の拡大と低輝度部の重心が目標値に一致するように補正する階調補正処理とを同時に行う自動階調補正装置について説明したが、この自動階調補正装置に相当する処理を行う自動階調補正方法として実現してもよい。また、その補正原理を示す図39(a)のフローチャートに相当する自動階調補正方法およびこの自動階調補正方法に対応する自動階調補正装置、さらには、この自動階調補正方法をコンピュータに実行させる自動階調補正プログラムを各種の記録媒体に記録させる自動階調補正プログラム記録媒体として実現してもよく、輝度分布の拡大と階調補正処理とを同時に行えない以外は上記自動階調補正装置と同様の効果を奏する。
また、この実施の形態5では目標値修正部を設け目標値を修正しているが、この目標値修正部は実施の形態1ないし4に設けても同様の効果を示すものであり、適用がこの実施の形態5のみに限定されるものではない。
【0186】
【発明の効果】
以上のように、本発明の請求項1に係る自動階調補正装置によれば、低輝度領域と高輝度領域との境界値を可変にするようにしたので、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標とする輝度値に補正することができる効果がある。
【0187】
また、本発明の請求項2に係る自動階調補正装置によれば、輝度範囲を分割し、各領域の特徴量から境界値を算出するようにしたので、正確に高輝度側と低輝度側とを分割する境界値を算出することができる効果がある。
【0188】
また、本発明の請求項3に係る自動階調補正装置によれば、輝度ヒストグラムの山型分布を検出し、検出した山型分布の範囲を用い境界値を算出することで、入力画像が逆光の場合は目標とする明るさに補正すると共に全体のコントラストが向上した画像を得るようにしたので、順光の場合は元の明るさを変えずにコントラストが向上した画像を得ることができる効果がある。
【0189】
また、本発明の請求項4に係る自動階調補正装置によれば、目標輝度分布の低輝度部の重心を輝度補正目標値として求め、輝度分布を拡大するとともに輝度ヒストグラムの低輝度部の重心位置が前記輝度補正目標値に一致するように補正を行うようにしたので、順光画像,逆光画像で同じ形の目標輝度分布を用い、目標とする明るさをもち、しかも全体のコントラストが向上した画像を得ることができる効果がある。
【0190】
また、本発明の請求項5に係る自動階調補正装置によれば、目標とする輝度分布を曲線で与え、記憶するようにしたので、簡単に目標輝度分布を設定することができ、記憶容量を減らすことができる効果がある。
【0191】
また、本発明の請求項6に係る自動階調補正装置によれば、目標とする輝度分布を複数設定、記憶しておくようにしたので、簡単に輝度補正目標値の調節ができる効果がある。
【0192】
また、本発明の請求項7に係る自動階調補正装置によれば、山型分布の範囲から算出した境界値を、輝度ヒストグラムを用い調整するようにしたので、より正確な境界値を算出することができる効果がある。
【0193】
また、本発明の請求項8に係る自動階調補正装置によれば、山型分布の範囲に制限を設けるようにしたので、順光画像でも画像の明るさを補正することができる効果がある。
【0194】
また、本発明の請求項9に係る自動階調補正装置によれば、輝度補正目標値が輝度ヒストグラムの低輝度部の重心位置より小さい場合、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置に一致するように修正するようにしたので、入力画像よりも暗く補正してしまうことを防ぐことができる効果がある。
【0195】
また、本発明の請求項10に係る自動階調補正装置によれば、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置付近となるように修正するようにしたので、入力画像の明るさを元に補正後の明るさの微調整を行うことができる効果がある。
【0196】
また、本発明の請求項11に係る自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、高輝度ヒストグラムの分布を低輝度方向にのみ拡大すると同時に輝度ヒストグラムの重心が輝度補正目標値に一致するように補正を行うようにしたので、請求項4ないし請求項8、及び請求項10のいずれかに記載の自動階調補正装置において、高輝度部のつぶれを起こさず補正ができる効果がある。
【0197】
また、本発明の請求項12に係る自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記階調補正処理部は、γ補正を実行することで前記階調補正処理を行うようにしたので、輝度ヒストグラムの低輝度部の重心と目標値との一致が、一度の変換テーブルの作成で可能となる効果がある。
【0198】
また、本発明の請求項13に係る自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記階調補正処理部は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、前記補正テーブルを作成するようにしたので、輝度ヒストグラムの低輝度部の重心と目標値との一致が、一度の変換テーブルの作成で可能となる効果がある。
【0199】
また、本発明の請求項14に係る自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記輝度ヒストグラム作成部により作成された輝度ヒストグラムの輝度分布を拡大する輝度分布拡大部をさらに備え、前記重心算出部は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行うようにしたので、予め輝度ヒストグラムの輝度分布を拡大した後、低輝度部の重心を目標値に一致させる処理を行うことにより、自動階調補正が可能となる効果がある。
【0200】
また、本発明の請求項15に記載の自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設けるようにしたので、輝度ヒストグラムの階調分布がある一部分に集中している場合でも正確に補正量が算出できるという効果がある。
【0201】
また、本発明の請求項16に記載の自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、色差信号、及び輝度信号から肌色領域を抽出し、前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成することにより、人の肌色の輝度を肌色領域の面積に応じて輝度ヒストグラムに加重するようにしたので、人物が存在する場合にはその面積に応じて肌色の明るさが最適になるよう階調補正ができるという効果がある。
【0202】
また、本発明の請求項17に記載の自動階調補正装置によれば、請求項1,2,3に記載の自動階調補正装置において、画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重することにより、高輝度部分の分布に重み付けを行うようにしたので、肌色の白飛びを抑えることができるという効果がある。
【0203】
また、本発明の請求項18に記載の自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記輝度ヒストグラム作成部により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出することにより、高輝度部の重心位置により階調補正量を制限するようにしたので、高輝度部の白飛びを抑えることができるという効果がある。
【0204】
また、本発明の請求項19に記載の自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わないようにしたので、本来階調補正の必要がない画像では階調補正を行わないようにすることができるという効果がある。
【0205】
また、本発明の請求項20に記載の自動階調補正装置によれば、請求項1,2,3のいずれかに記載の自動階調補正装置において、補正テーブルに応じて画像の色差信号を補正するようにしたので、輝度の補正により彩度が低下したように見える現象を緩和することができるという効果がある。
【0206】
また、本発明の請求項21に係る自動階調補正方法によれば、低輝度領域と高輝度領域との境界値を可変にするようにしたので、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標とする輝度値に補正することができる効果がある。
【0207】
また、本発明の請求項22に係る自動階調補正方法によれば、輝度範囲を分割し、各領域の特徴量から境界値を算出するようにしたので、正確に高輝度側と低輝度側とを分割する境界値を算出することができる効果がある。
【0208】
また、本発明の請求項23に係る自動階調補正方法によれば、輝度ヒストグラムの山型分布を検出し、検出した山型分布の範囲を用いて境界値を算出することで、入力画像が逆光の場合は目標とする明るさに補正すると共に全体のコントラストが向上した画像を得るようにしたので、順光の場合は元の明るさを変えずにコントラストが向上した画像を得ることができる効果がある。
【0209】
また、本発明の請求項24に係る自動階調補正方法によれば、目標輝度分布の低輝度部の重心を輝度補正目標値として求め、輝度分布を拡大するとともに輝度ヒストグラムの低輝度部の重心位置が前記輝度補正目標値に一致するように補正を行うようにしたので、順光画像,逆光画像で同じ形の目標輝度分布を用い、目標とする明るさをもち、しかも全体のコントラストが向上した画像を得ることができる効果がある。
【0210】
また、本発明の請求項25に係る自動階調補正方法によれば、目標とする輝度分布を曲線で与え、記憶するようにしたので、簡単に目標輝度分布を設定することができ、記憶容量を減らすことができる効果がある。
【0211】
また、本発明の請求項26に係る自動階調補正方法によれば、目標とする輝度分布を複数設定、記憶しておくようにしたので、簡単に輝度補正目標値の調節ができる効果がある。
【0212】
また、本発明の請求項27に係る自動階調補正方法によれば、山型分布の範囲から算出した境界値を、輝度ヒストグラムを用い調整するようにしたので、より正確な境界値を算出することができる効果がある。
【0213】
また、本発明の請求項28に係る自動階調補正方法によれば、山型分布の範囲に制限を設けるようにしたので、順光画像でも画像の明るさを補正することができる効果がある。
【0214】
また、本発明の請求項29に係る自動階調補正方法によれば、輝度補正目標値が輝度ヒストグラムの低輝度部の重心位置より小さい場合、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置に修正するようにしたので、入力画像よりも暗く補正してしまうことを防ぐことができる効果がある。
【0215】
また、本発明の請求項30に係る自動階調補正方法によれば、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置付近に修正するようにしたので、入力画像の明るさを元に、補正後の明るさの微調整を行うことができる効果がある。
【0216】
また、本発明の請求項31に係る自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、輝度ヒストグラムの分布を低輝度方向にのみ拡大すると同時に輝度ヒストグラムの重心が輝度補正目標値に一致するように補正を行うようにしたので、請求項24ないし30のいずれかに記載の自動階調補正方法において、高輝度部のつぶれを起こさず補正ができる効果がある。
【0217】
また、本発明の請求項32に係る自動階調補正方法によれば、請求項32,33,35のいずれかに記載の自動階調補正方法において、前記階調補正処理工程は、γ補正を実行することで前記階調補正処理を行うようにしたので、輝度ヒストグラムの低輝度部の重心と目標値との一致が、一度の変換テーブルの作成で可能となる効果がある。
【0218】
また、本発明の請求項33に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記階調補正処理工程は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、補正テーブルを作成するようにしたので、輝度ヒストグラムの低輝度部の重心と目標値との一致が、一度の変換テーブルの作成で可能となる効果がある。
【0219】
また、本発明の請求項34に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラム作成工程と前記重心算出工程との間に、前記輝度ヒストグラムの輝度分布を拡大する輝度分布拡大工程をさらに含み、前記重心算出工程は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行うようにしたので、予め輝度ヒストグラムの輝度分布を拡大した後、低輝度部の重心を目標値に一致させる処理を行うことにより、自動階調補正が可能となる効果がある。
【0220】
また、本発明の請求項35に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設けるようにしたので、輝度ヒストグラムの階調分布がある一部分に集中している場合でも正確に補正量が算出できるという効果がある。
【0221】
また、本発明の請求項36に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、色差信号、及び輝度信号から肌色領域を抽出し、前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成することにより、人の肌色の輝度を肌色領域の面積に応じて輝度ヒストグラムに加重するようにしたので、人物が存在する場合にはその面積に応じて肌色の明るさが最適になるよう階調補正ができるという効果がある。
【0222】
また、本発明の請求項37に記載の自動階調補正方法によれば、請求項36に記載の自動階調補正方法において、画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重することにより、高輝度部分の分布に重み付けを行うようにしたので、肌色の白飛びを抑えることができるという効果がある。
【0223】
また、本発明の請求項38に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記輝度ヒストグラム作成工程により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出することにより、高輝度部の重心位置により階調補正量を制限するようにしたので、高輝度部の白飛びを抑えることができるという効果がある。
【0224】
また、本発明の請求項39に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わないようにしたので、本来階調補正の必要がない画像では階調補正を行わないようにすることができるという効果がある。
【0225】
また、本発明の請求項40に記載の自動階調補正方法によれば、請求項21,22,23のいずれかに記載の自動階調補正方法において、補正テーブルに応じて画像の色差信号を補正するようにしたので、輝度の補正により彩度が低下したように見える現象を緩和することができるという効果がある。
【0226】
また、本発明の請求項41に係る自動階調補正プログラム記録媒体によれば、低輝度領域と高輝度領域との境界値を可変にするようにしたので、逆光画像において正しく逆光領域を含む低輝度部を算出でき、より正確に逆光領域を目標とする輝度値に補正することができる効果がある。
【0227】
また、本発明の請求項42に係る自動階調補正プログラム記録媒体によれば、輝度ヒストグラムの山型分布を検出し、検出した山型分布の範囲を用い境界値を算出することで、入力画像が逆光の場合は目標とする明るさに補正すると共に全体のコントラストが向上した画像を得るようにしたので、順光の場合は元の明るさを変えずにコントラストが向上した画像を得ることができる効果がある。
【0228】
また、本発明の請求項43に係る自動階調補正プログラム記録媒体によれば、目標輝度分布の低輝度部の重心を輝度補正目標値として求め、輝度分布を拡大するとともに輝度ヒストグラムの低輝度部の重心位置が前記輝度補正目標値に一致するように補正を行うようにしたので、順光画像,逆光画像で同じ形の目標輝度分布を用い、目標とする明るさをもち、しかも全体のコントラストが向上した画像を得ることができる効果がある。
【0229】
また、本発明の請求項44に係る自動階調補正プログラム記録媒体によれば、輝度補正目標値が輝度ヒストグラムの低輝度部の重心位置より小さい場合、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置に修正するようにしたので、入力画像よりも暗く補正してしまうことを防ぐことができる効果がある。
【0230】
また、本発明の請求項45に記載された自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記階調補正処理工程は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、補正テーブルを作成するようにしたので、輝度ヒストグラムの低輝度部の重心と目標値との一致が、一度の変換テーブルの作成で可能となる効果がある。
【0231】
また、本発明の請求項46に記載された自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記輝度ヒストグラム作成工程と前記重心算出工程との間に、前記輝度ヒストグラムの輝度分布を拡大する輝度分布拡大工程をさらに含み、前記重心算出工程は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行うようにしたので、予め輝度ヒストグラムの輝度分布を拡大した後、低輝度部の重心を目標値に一致させる処理により自動階調補正が可能となる効果がある。
【0232】
また、本発明の請求項47に記載の自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設けるようにしたので、輝度ヒストグラムの階調分布がある一部分に集中している場合でも正確に補正量が算出できるという効果がある。
【0233】
また、本発明の請求項48に記載の自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出工程をさらに有し、前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成することにより、人の肌色の輝度を肌色領域の面積に応じて輝度ヒストグラムに加重するようにしたので、人物が存在する場合にはその面積に応じて肌色の明るさが最適になるよう階調補正ができるという効果がある。
【0234】
また、本発明の請求項49に記載の自動階調補正プログラム記録媒体によれば、請求項48に記載の自動階調補正プログラム記録媒体において、画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重することにより、高輝度部分の分布に重み付けを行うようにしたので、肌色の白飛びを抑えることができるという効果がある。
【0235】
また、本発明の請求項50に記載の自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記輝度ヒストグラム作成工程により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出することにより、高輝度部の重心位置により階調補正量を制限するようにしたので、高輝度部の白飛びを抑えることができるという効果がある。
【0236】
また、本発明の請求項51に記載の自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わないようにしたので、本来階調補正の必要がない画像では階調補正を行わないようにすることができるという効果がある。
【0237】
また、本発明の請求項52に記載の自動階調補正プログラム記録媒体によれば、請求項41または42に記載の自動階調補正プログラム記録媒体において、補正テーブルに応じて画像の色差信号を補正するようにしたので、輝度の補正により彩度が低下したように見える現象を緩和することができるという効果がある。
【図面の簡単な説明】
【図1】本発明の実施の形態1における自動階調補正装置のブロック図
【図2】順光画像及び逆光画像における輝度ヒストグラムを示す図
【図3】本発明の実施の形態1における補正処理の説明図
【図4】本発明の実施の形態1における階調補正処理およびその原理を示すフローチャート図
【図5】補正テーブルを直線で設定した際のグラフを示す図
【図6】補正テーブルを輝度ヒストグラムの分布の頻度に応じて設定する際の説明図
【図7】高輝度部の重心位置に応じて高輝度部の補正量を算出する際の説明図
【図8】高輝度部の重心を目標値に一致させる補正テーブルを作成する際のグラフ図
【図9】離散的なヒストグラムを示す図
【図10】請求項21記載の自動階調補正装置のブロック図
【図11】肌色領域を示す図
【図12】肌色輝度ヒストグラムの加重の説明図
【図13】高輝度部の重み付け値を示すグラフ図
【図14】請求項25記載の自動階調補正装置のブロック図
【図15】輝度変換テーブルのグラフを示す図
【図16】本発明の請求項16記載の自動階調補正装置による補正動作を示す図
【図17】本発明の実施の形態2における自動階調補正装置のブロック図
【図18】逆光画像における輝度ヒストグラム及び目標輝度分布を示す図
【図19】図18の逆光画像における補正後の輝度ヒストグラムを示す図
【図20】本発明の実施の形態2における階調補正処理およびその原理を示すフローチャート図
【図21】順光画像と逆光画像における目標輝度分布と重心位置を示す図
【図22】曲線で表した目標輝度分布を示す図
【図23】目標輝度分布の合成を示す図
【図24】本発明の実施の形態3における自動階調補正装置のブロック図
【図25】逆光画像における重心位置を示す図
【図26】ある階調に頻度が集中しているヒストグラムにおける境界値を示す図
【図27】本発明の実施の形態3における階調補正処理およびその原理を示すフローチャート図
【図28】請求項9記載の自動階調補正装置のブロック図
【図29】本発明の実施の形態4における自動階調補正装置のブロック図
【図30】本発明の実施の形態4における逆光画像と順光画像の境界値を示した図
【図31】本発明の実施の形態4における逆光画像での補正処理の説明図
【図32】本発明の実施の形態4における順光画像での補正処理の説明図
【図33】本発明の実施の形態4における階調補正処理およびその原理を示すフローチャート図
【図34】輝度ヒストグラムのピークが3個ある場合の境界値を示す図
【図35】請求項11記載の自動階調補正装置における輝度ヒストグラムにピークが3個ある場合の境界値を示す図
【図36】請求項12記載の自動階調補正装置の処理の説明図
【図37】本発明の実施の形態5における自動階調補正装置のブロック図
【図38】実施の形態4、実施の形態5で補正を行った場合の重心位置、目標値、輝度ヒストグラムを示す図
【図39】本発明の実施の形態5における階調補正処理およびその原理を示すフローチャート図
【図40】従来の補正処理の説明図
【図41】従来の補正処理のフローチャートを示す図
【符号の説明】
101,601,1101,1401,1501,2201,3001,3101 撮像素子
102,602,1102,1402,1502,2202,3002,3102 A/Dコンバータ
103,603,1103,1403,1503,2203,3003,3103 輝度信号算出回路
104,604,1104,1404,1504,2204,3004,3104 輝度分布作成回路
605,1410,1505,2205 目標輝度分布記憶回路
105,606,1105,1506,2206,3005,3105 重心算出回路
106,607,1106,1406,1507,2207,3106 分布範囲算出回路
608,1405,1508,2208 目標値算出回路
108,609,1108,1407,1509,2209,3008,3108 補正テーブル作成回路
109,610,1109,1408,1510,2210,3109 画像信号補正回路
1110,1409,1511,2211 境界値算出回路
1512,2212 山型分布検出回路
107,1107,3007,3107 目標値記憶回路
2213 目標値修正回路
2501 特徴量取り込みステップ
2502 各種曲線データ取り込みステップ
2503 下限値判定ステップ
2504 アンダー処理ステップ
2505 上限値判定ステップ
2506 オーバー処理ステップ
2507 リニア処理ステップ
2508 階調補正曲線格納ステップ
3006 分布範囲算出回路
3009 輝度信号補正回路
3010,3110 色差信号算出回路
3011 色差信号補正回路
3111 肌色領域抽出回路
3112 肌色輝度分布作成回路[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an automatic gradation correction device, an automatic gradation correction method, and an automatic gradation correction program recording medium. In particular, in a digital image processing apparatus, correction of an input image, more specifically, gradation of an image is performed. It relates to an improvement of what is automatically corrected.
[0002]
[Prior art]
As a conventional technique for automatically correcting the gradation of an image, the following method is generally well known. That is, this method calculates the luminance value or density value of each pixel of the input image, creates a histogram indicating the sum of pixels having the same value, and performs all correction processes so that the shape of the created histogram is optimized. This is performed on the pixel.
As a method of performing correction using such a histogram, for example, there is one disclosed in Japanese Patent Laid-Open No. 6-268866. A conventional example disclosed in this publication will be described with reference to FIG. In the following description, it is assumed that each pixel of the digital image has a density value from “0” to “255”.
[0003]
First, the density value of each pixel is calculated from the digital image signal, and a density histogram showing the total sum of pixels having the same density value is created. An example of this is shown in FIG.
[0004]
Next, when the minimum density value of the created density histogram is represented by dmin, the maximum density value is represented by dmax, the number of pixels of the pixel density d is represented by F1 [d], and the number of converted pixels is represented by F2 [d], the following ( A histogram (see FIG. 40B) corrected so that the pixel density distribution region is expanded to the entire pixel luminance is created according to equation (1), and a point (center of gravity) G that equally divides the area of the histogram into two is calculated. Then, as shown in FIG. 40C, when a γ value is obtained such that the center of gravity G is at the center of the density range, and the number of pixels after conversion of F2 [d] is expressed as F3 [d], A histogram subjected to γ correction is created using equation (2), and correction is performed based on the histogram.
[Expression 1]
Figure 0003772133
[Expression 2]
Figure 0003772133
In this way, the brightness is adjusted so that the pixel density is expanded to all gradations, is evenly spread from the central gradation, and the center of gravity of the density distribution is at the center.
Another method for correcting the gradation of an image using a histogram is disclosed in Japanese Patent Laid-Open No. 2000-102033. This conventional example will be described with reference to FIG.
[0005]
In this method, the input luminance level axis calculated for a luminance histogram created from a digital image signal is equally divided into n (n is an integer satisfying n> 3), and the ratio of the number of pixels in each region to all pixels, of which In step 2501, a feature amount such as the ratio of the number of pixels exceeding a certain limit value to the total number of pixels and the ratio of the number of pixels in each area divided into three equal parts of the input luminance level axis to the total number of pixels is acquired. The various curve data is fetched (step 2502). Based on the feature amount, the cases are classified in steps 2503 and 2505, and the features captured in steps 2501 and 2502 in under processing (step 2504), over processing (step 2506), and linear processing (step 2507). A gradation correction curve is created from the amount and the curve data, and the gradation correction curve data is stored (step 2508).
[0006]
Then, tone correction is performed based on the obtained tone correction curve.
That is, in this method, the correction processing is classified according to the shape of the luminance histogram of the input image, a gradation correction curve is created by an optimum process for the input image, and the gradation correction is performed based on the gradation correction curve. Is what you do.
[0007]
As described above, according to the gradation correction method described in Japanese Patent Laid-Open No. 6-268866, a clear contrast image can be obtained even in an image including many halftones.
Further, according to the gradation correction method described in Japanese Patent Laid-Open No. 2000-102033, an image with better image quality than that obtained when the cumulative luminance distribution is used as it is can be obtained and the processing can be realized by software. It is possible to easily cope with data changes.
[0008]
[Problems to be solved by the invention]
However, in the gradation correction method described in Japanese Patent Laid-Open No. 6-268866, γ correction is performed so that the center of gravity of the histogram is in the center of the gradation. When the peak appears on the high gradation side, the center of gravity of the histogram is originally in the vicinity of the central gradation, so that the correction is hardly performed and the backlight region is not corrected at all.
In the case of a natural image such as a landscape photograph, the image with the center of gravity of the histogram in the middle gradation is not always beautiful. For example, if an image of a person wearing black clothes is corrected, the clothes become gray. There was a problem that.
[0009]
In the gradation correction method described in the above Japanese Patent Laid-Open No. 2000-102033, the optimum gradation correction is performed by dividing the processing according to the shape of the luminance histogram of the input image. However, there is a problem that the processing is complicated and the amount of calculation increases.
Furthermore, it is necessary to create a correction process individually in each case, which causes an increase in necessary storage capacity and an increase in the size of the correction device, which in turn increases costs.
Further, in the above-described method, when a person is present in the image and the area occupied by the person is small, the information is not included in the histogram. There has been a problem that unintended corrections such as whiteout occur.
[0010]
The present invention has been made to solve such a problem, and in a backlight image, it can perform sufficient backlight correction without destroying a high-luminance portion, and even in a backlight image by the same processing as the backlight image. To provide an automatic gradation correction device, an automatic gradation correction method, and an automatic gradation correction program recording medium capable of optimizing the contrast and brightness of an image and suppressing unintended correction. With the goal.
[0011]
[Means for Solving the Problems]
In order to solve the above-described problems, an automatic gradation correction device, an automatic gradation correction method, and an automatic gradation correction program recording medium according to the present invention expand a luminance distribution of a luminance histogram created from a digital image signal and simultaneously reduce low luminance. Correction is performed so that the center of gravity of the portion coincides with the luminance correction target value, and according to the present invention, by expanding the luminance distribution of the luminance histogram, it is always possible to An image with improved contrast can be obtained, and correction is made so that the center of gravity of the low-brightness part of the brightness histogram matches the brightness correction target value. The brightness value of the low-brightness area is corrected to the brightness of the target brightness value in the same process as in the case of the backlight image even in the case of the backlight image. Automatic gradation correction apparatus capable, it is possible to provide an automatic gradation correction process, and the automatic gradation correction programs.
[0012]
That is, an automatic gradation correction apparatus according to claim 1 of the present invention is a brightness histogram creation unit that creates a brightness histogram of a digital image, obtains the center of gravity of the brightness histogram, and calculates the median value of all gradation ranges and the A boundary value calculation unit that calculates a boundary value between the low luminance part and the high luminance part using the center of gravity, and a center of gravity calculation that calculates the center of gravity of the low luminance part of the luminance histogram based on the boundary value calculated by the boundary value calculation unit , The luminance histogram created by the luminance histogram creating unit, the centroid of the low luminance part of the luminance histogram calculated by the centroid calculating unit, and the target value of the movement destination of the centroid of the low luminance part of the luminance histogram A correction table is created based on the luminance correction target value, and the luminance distribution is expanded using the correction table and the low luminance portion of the luminance histogram is used. And a gradation correction processing unit that performs gradation correction processing so that the center of gravity coincides with the luminance correction target value. The boundary value between the low luminance region and the high luminance region can be changed. By doing so, it is possible to calculate the low luminance part including the backlight region correctly in the backlight image, and to correct the backlight region to the target luminance value more accurately.
[0013]
Next, an automatic gradation correction apparatus according to claim 2 of the present invention is a luminance histogram creation unit that creates a brightness histogram of a digital image, and two areas obtained by dividing the brightness histogram by a median value of all gradation ranges. A boundary value calculation unit that calculates a boundary value between a low luminance part and a high luminance part using the respective centroids, and a centroid of a low luminance part of the luminance histogram is calculated based on the boundary value calculated by the boundary value calculation unit The center of gravity calculating unit, the luminance histogram created by the luminance histogram creating unit, the center of gravity of the low luminance part of the luminance histogram calculated by the center of gravity calculating unit, and the destination of the center of gravity of the low luminance part of the luminance histogram A correction table is created based on the luminance correction target value that is the target value of the luminance histogram, the luminance distribution is expanded using the correction table, and the luminance histogram And a tone correction processing unit that performs tone correction processing so that the center of gravity of the low-brightness part matches the brightness correction target value. And the backlit area can be more accurately corrected to the target luminance value, and the boundary value for dividing the high luminance side and the low luminance side can be calculated accurately.
[0014]
Next, an automatic gradation correction device according to a third aspect of the present invention includes a luminance histogram generation unit that generates a luminance histogram of a digital image, and a peak detected first by scanning the luminance histogram from the low luminance side. A peak distribution as a first range, and a peak distribution detector that detects the peak distribution first detected by scanning the luminance histogram from the high luminance side as a second range; and the peak distribution detector detects the peak distribution A boundary value calculation unit for calculating a boundary value for dividing the low luminance part and the high luminance part of the luminance histogram between the centroid of the first range and the centroid of the second range of the mountain distribution; A centroid calculation unit that calculates the centroid of the low luminance part of the luminance histogram based on the boundary value calculated by the boundary value calculation unit, the luminance histogram created by the luminance histogram creation unit, and the centroid calculation unit A correction table is created based on the calculated gravity center of the low luminance portion of the luminance histogram and the luminance correction target value that is the target value of the movement destination of the gravity center of the low luminance portion of the luminance histogram. And a gradation correction processing unit that performs gradation correction processing so that the luminance distribution is expanded and the center of gravity of the low luminance part of the luminance histogram matches the luminance correction target value. If the input image is backlit, the image can be corrected to the target brightness and the overall contrast can be improved. In the case of direct light, the contrast can be maintained without changing the brightness of the original image. An effect is that an improved image can be obtained.
[0015]
Next, an automatic gradation correction device according to a fourth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein the luminance is calculated from a target luminance distribution. A target value calculation unit for calculating a correction target value is further provided, and the target value calculation unit uses the center of gravity of the low luminance part of the target luminance distribution as the luminance correction target value based on the boundary value output from the boundary value calculation unit. It is characterized by calculation, and it can be obtained that images with different brightness characteristics are corrected with the target value calculated from the target luminance distribution of the same shape, and an image with improved overall contrast can be obtained. Has an effect.
[0016]
Next, in the automatic gradation correction device according to claim 5 of the present invention, when performing the gradation correction processing in the automatic gradation correction device according to claim 4, the target value calculation unit includes: The target luminance distribution is set by a curve, and the target luminance distribution can be easily set, and the storage capacity can be reduced.
[0017]
Next, the automatic gradation correction device according to claim 6 of the present invention is the automatic gradation correction device according to claim 4, wherein when the gradation correction processing is performed, the target value calculation unit includes: A plurality of target luminance distributions are set and stored, and the target value can be easily adjusted.
[0018]
Next, the automatic gradation correction device according to claim 7 of the present invention is the automatic gradation correction device according to claim 3, wherein when performing the gradation correction processing, the boundary value calculation unit includes: The boundary value calculated from the range of the mountain distribution is set using the luminance histogram, and has the effect that a more accurate boundary value can be calculated.
[0019]
Next, an automatic gradation correction device according to an eighth aspect of the present invention is the automatic gradation correction device according to the third aspect, wherein when the gradation correction processing is performed, the mountain distribution detection unit The range of the mountain-shaped distribution is limited, and has an effect that the brightness of the image can be corrected even in a normal light image.
[0020]
Next, an automatic gradation correction device according to a ninth aspect of the present invention is the automatic gradation correction device according to the third aspect, wherein the luminance is a target value of the movement destination of the center of gravity of the low luminance portion of the luminance histogram. When the correction target value is different from the barycentric position of the low luminance part of the luminance histogram calculated by the barycentric calculation unit, the luminance correction target value is corrected to match the barycentric position of the low luminance part of the luminance histogram. The gradation correction processing unit expands the luminance distribution and simultaneously matches the center of gravity of the low luminance portion of the luminance histogram with the luminance correction target value output by the target value correcting unit. It is characterized by performing gradation correction processing, and has an effect that correction of the target value can prevent the image from being corrected darker than the input image.
[0021]
Next, an automatic gradation correction device according to a tenth aspect of the present invention is the automatic gradation correction device according to the ninth aspect, wherein the correction of the luminance correction target value when performing the gradation correction processing is performed. The brightness correction target value is corrected so as to be a value near the gravity center position of the low brightness portion of the brightness histogram, and the brightness after correction is finely adjusted based on the brightness of the input image. It has the effect of being able to.
[0022]
Next, an automatic gradation correction device according to an eleventh aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein the luminance histogram is used in the gradation correction processing. The distribution is expanded only in the low luminance direction, and at the same time, correction is performed so that the center of the luminance histogram matches the luminance correction target value, and correction can be performed without causing collapse of the high luminance portion. Has the effect of being able to.
[0023]
Next, an automatic gradation correction device according to a twelfth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein the gradation correction processing unit performs γ correction. The gradation correction processing is performed by executing the operation, and has an effect of allowing the center of gravity of the low luminance portion of the luminance histogram to coincide with the target value by creating a conversion table at one time.
[0024]
Next, an automatic gradation correction device according to a thirteenth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein the gradation correction processing unit includes the luminance histogram. Correction processing that simultaneously performs both of the luminance distribution expansion processing and the processing for matching the center of gravity of the low luminance portion of the luminance histogram with the luminance distribution expanded to the luminance correction target value. A correction table is created, and has the effect of making it possible to match the center of gravity of the low-brightness portion of the brightness histogram with the target value by creating a conversion table once.
[0025]
Next, an automatic gradation correction device according to a fourteenth aspect of the present invention is the luminance histogram created by the luminance histogram creation section in the automatic gradation correction device according to any one of the first, second, and third aspects. A luminance distribution expanding unit that expands the luminance distribution, and the centroid calculating unit performs the calculation of the centroid on a low luminance part of the luminance histogram in which the luminance distribution is expanded. In addition, after the luminance distribution of the luminance histogram is expanded in advance, automatic gradation correction can be performed by the process of matching the center of gravity of the low luminance portion with the target value.
[0026]
Next, an automatic gradation correction device according to a fifteenth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein the luminance distribution is generated when the luminance histogram is created. This is characterized in that there is a limit to the integrated amount of numbers, and has the effect that the correction amount can be accurately calculated even when the gradation distribution of the luminance histogram is concentrated on a certain part.
[0027]
Next, an automatic gradation correction device according to a sixteenth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein a skin color region is extracted from a color difference signal and a luminance signal. A skin color area extracting unit that creates a brightness histogram by weighting the brightness distribution of the skin color portion of the image to the brightness distribution of the entire image according to the area of the skin color area. By weighting the brightness of a person's skin color to the brightness histogram according to the area of the skin color area, if there is a person, the gradation is adjusted so that the brightness of the skin color is optimized according to the area. It has the effect that it can be corrected.
[0028]
Next, an automatic gradation correction device according to a seventeenth aspect of the present invention is the automatic gradation correction device according to the sixteenth aspect, wherein the luminance distribution of the skin color portion of the image is changed to the luminance distribution of the entire image. When weighting according to the weight, the distribution of the high-brightness part of the flesh-colored part is weighted and weighted. By weighting the distribution of the high-brightness part, the flesh-colored whiteout is suppressed. It has the effect of being able to.
[0029]
Next, an automatic gradation correction device according to an eighteenth aspect of the present invention is the luminance histogram calculated by the luminance histogram creation unit in the automatic gradation correction device according to any one of the first, second, and third aspects. The center of gravity position of the high brightness part is calculated from the center of gravity, and the tone correction amount of the high brightness part is calculated according to the center of gravity position of the high brightness part. By limiting the amount, there is an effect that whiteout in the high luminance portion can be suppressed.
[0030]
Next, an automatic gradation correction device according to a nineteenth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, wherein the luminance distribution is discrete in the gradation correction processing. In such a case, the tone correction is not performed, and the tone correction can be prevented from being performed in an image that originally does not need the tone correction.
[0031]
Next, an automatic gradation correction device according to a twentieth aspect of the present invention is the automatic gradation correction device according to any one of the first, second, and third aspects, and corrects a color difference signal of an image according to a correction table. It has the effect of reducing the phenomenon that the saturation appears to have been reduced by correcting the luminance.
[0032]
Next, an automatic gradation correction method according to claim 21 of the present invention is an automatic gradation correction method for correcting gradation of a digital image, and a luminance histogram creation step of creating a luminance histogram of the digital image. And a boundary value calculating step of calculating a center value of the luminance histogram and calculating a boundary value between the low luminance portion and the high luminance portion using the median value of all gradation ranges and the gravity center, and the boundary value calculating step. The center of gravity calculation step for obtaining the center of gravity of the low luminance part of the luminance histogram based on the boundary value, and the gradation correction so that the luminance distribution is expanded and the center of gravity of the low luminance part of the luminance histogram matches the luminance correction target value And a gradation correction processing step for performing processing. By making the boundary value between the low luminance region and the high luminance region variable, the backlight region is correctly included in the backlight image. Can be calculated low brightness portion, it has the effect of more accurately it is possible to correct the backlight area to the target luminance value.
[0033]
Next, an automatic gradation correction method according to a twenty-second aspect of the present invention is an automatic gradation correction method for correcting gradation of a digital image, and a luminance histogram creation step of creating a luminance histogram of the digital image; , A boundary value calculating step for calculating a boundary value between the low luminance portion and the high luminance portion using the centroid of each of the two regions obtained by dividing the luminance histogram by the median value of the entire gradation range, and the boundary value calculating step A center-of-gravity calculation step for obtaining the center of gravity of the low-brightness portion of the brightness histogram based on the calculated boundary value, and a step of expanding the brightness distribution and adjusting the center of gravity of the low-brightness portion of the brightness histogram to match the brightness correction target value. A gradation correction processing step for performing a tone correction process, and a low-luminance portion including a backlight area can be calculated correctly in a backlight image, and the backlight area can be more accurately determined. It is possible to correct the target brightness value, an effect that it is possible to calculate the boundary value to accurately divide the high luminance side and the low luminance side.
[0034]
Next, an automatic gradation correction method according to a twenty-third aspect of the present invention is an automatic gradation correction method for correcting the gradation of a digital image, and a luminance histogram creation step of creating a luminance histogram of the digital image. The peak-shaped distribution first detected by scanning the luminance histogram from the low-luminance side is set as the first range, and the peak-type distribution first detected by scanning from the high-luminance side is detected as the second range. Dividing the low-brightness portion and the high-brightness portion of the luminance histogram between the type distribution detection step and the centroid of the first range and the centroid of the second range of the mountain distribution detected by the mountain-type distribution detection step A boundary value calculating step of calculating a boundary value of the luminance histogram, a centroid calculating step of obtaining a centroid of a low luminance portion of the luminance histogram based on the boundary value calculated by the boundary value calculating step, and expanding the luminance distribution and the luminance value And a gradation correction processing step for performing gradation correction processing so that the center of gravity of the low-brightness portion of the togogram coincides with the luminance correction target value, and is a target when the input image is backlit It is possible to obtain an image in which the overall contrast is improved while correcting the brightness, and in the case of direct light, an image having an improved contrast can be obtained without changing the brightness of the original image.
[0035]
Next, an automatic gradation correction method according to a twenty-fourth aspect of the present invention is the automatic gradation correction method according to any one of the twenty-first, twenty-second, or twenty-third aspect, wherein the luminance is calculated from a target luminance distribution. A target value calculating step of calculating a correction target value, wherein the target value calculating step uses the center of gravity of the low luminance portion of the target luminance distribution as the luminance correction target value based on the boundary value output from the boundary value calculating step; It is characterized by calculation, and it can be obtained that images with different brightness characteristics are corrected with the target value calculated from the target luminance distribution of the same shape, and an image with improved overall contrast can be obtained. Has an effect.
[0036]
Next, the automatic gradation correction method according to claim 25 of the present invention is the automatic gradation correction method according to claim 24, wherein the target value calculation step sets the target luminance distribution by a curve. This is a feature, and has an effect that the target luminance distribution can be easily set and the storage capacity can be reduced.
[0037]
Next, the automatic gradation correction method according to claim 26 of the present invention is the automatic gradation correction method according to claim 24, wherein the target value calculation step sets and stores a plurality of target luminance distributions. It has a function of easily adjusting the target value.
[0038]
Next, the automatic gradation correction method according to claim 27 of the present invention is the automatic gradation correction method according to claim 23, wherein the boundary value calculation step uses a boundary value calculated from the range of the mountain distribution. , The luminance histogram is used for setting, and has the effect that a more accurate boundary value can be calculated.
[0039]
Next, an automatic gradation correction method according to a twenty-eighth aspect of the present invention is the automatic gradation correction method according to the twenty-third aspect, wherein the mountain-shaped distribution detecting step places a limit on the range of the mountain-shaped distribution. And has an effect that the brightness of the image can be corrected even in a follow-up image.
[0040]
Next, an automatic gradation correction method according to a twenty-ninth aspect of the present invention is the automatic gradation correction method according to the twenty-third aspect, wherein the luminance is a target value of a movement destination of the center of gravity of the low luminance portion of the luminance histogram. When the correction target value is different from the barycentric position of the low luminance part of the luminance histogram calculated by the barycentric calculation step, the luminance correction target value is corrected to coincide with the barycentric position of the low luminance part of the luminance histogram. The gradation correction processing step expands the luminance distribution and simultaneously matches the center of gravity of the low luminance part of the luminance histogram with the luminance correction target value output by the target value correcting unit. It is characterized by performing gradation correction processing, and has an effect that correction of the target value can prevent the image from being corrected darker than the input image.
[0041]
Next, the automatic gradation correction method according to claim 30 of the present invention is the automatic gradation correction method according to claim 29, wherein the correction of the luminance correction target value is performed by using the luminance correction target value as a low luminance value of a luminance histogram. The correction is made so that the value is in the vicinity of the barycentric position of the part, and the corrected brightness can be finely adjusted based on the brightness of the input image.
[0042]
Next, an automatic gradation correction method according to a thirty-first aspect of the present invention is the automatic gradation correction method according to any one of the twenty-first, twenty-second, and twenty-third aspects, wherein the distribution of the luminance histogram is only in a low luminance direction. At the same time as the enlargement, the correction is performed so that the center of gravity of the luminance histogram matches the luminance correction target value, and the correction can be performed without causing the high luminance portion to be crushed.
[0043]
Next, the automatic gradation correction method according to claim 32 of the present invention is the automatic gradation correction method according to any one of claims 21, 22, and 23, wherein the gradation correction processing step performs γ correction. It is characterized by being executed, and has the effect of making it possible to match the center of gravity of the low luminance part of the luminance histogram with the target value by creating a conversion table once.
[0044]
Next, the automatic gradation correction method according to claim 33 of the present invention is the automatic gradation correction method according to any one of claims 21, 22, and 23, wherein the gradation correction processing step includes the luminance histogram. The correction is performed so that both of the brightness distribution expansion process and the process of matching the center of gravity of the low-brightness portion of the brightness histogram in which the brightness distribution has been expanded with the brightness correction target value are performed simultaneously. It is characterized in that a table is created, and has the effect of making it possible to match the center of gravity of the low brightness part of the brightness histogram with the target value by creating a conversion table once.
[0045]
Next, an automatic gradation correction method according to a thirty-fourth aspect of the present invention is the automatic gradation correction method according to any one of the second, twenty-second, and twenty-third aspects, wherein the luminance histogram creating step and the centroid calculating step are Further includes a luminance distribution expanding step of expanding the luminance distribution of the luminance histogram, and the gravity center calculating step performs the calculation of the gravity center on the low luminance portion of the luminance histogram in which the luminance distribution is expanded. This is characterized in that after the luminance distribution of the luminance histogram is expanded in advance, automatic gradation correction can be performed by the process of matching the center of gravity of the low luminance portion with the target value.
[0046]
Next, an automatic gradation correction method according to a thirty-fifth aspect of the present invention is the automatic gradation correction method according to any one of the twenty-first, twenty-second, and twenty-third aspects, wherein the luminance distribution is generated when the luminance histogram is created. This is characterized in that there is a limit to the integrated amount of numbers, and has the effect that the correction amount can be accurately calculated even when the gradation distribution of the luminance histogram is concentrated on a certain part.
[0047]
Next, an automatic gradation correction method according to a thirty-sixth aspect of the present invention is the automatic gradation correction method according to any one of the twenty-first, twenty-second, and twenty-third aspects, wherein a skin color region is extracted from a color difference signal and a luminance signal. A skin color area extracting step, and when creating the brightness histogram, creating a brightness histogram obtained by weighting the brightness distribution of the skin color portion of the image to the brightness distribution of the entire image according to the area of the skin color area The feature is to weight the brightness of a person's skin color to the brightness histogram according to the area of the skin color area, so that when there is a person, the brightness of the skin color is optimized according to the area. It has the effect of adjusting the tone.
[0048]
Next, an automatic gradation correction method according to a thirty-seventh aspect of the present invention is the automatic gradation correction method according to the thirty-sixth aspect, wherein the luminance distribution of the skin color portion of the image is changed to the luminance distribution of the entire image. When weighting according to the weight, the distribution of the high-brightness part of the flesh-colored part is weighted and weighted. By weighting the distribution of the high-brightness part, the flesh-colored whiteout is suppressed. It has the effect of being able to.
[0049]
Next, an automatic gradation correction method according to a thirty-eighth aspect of the present invention is the automatic gradation correction method according to any one of the twenty-first, twenty-second, and twenty-third aspects, wherein the luminance histogram calculated by the luminance histogram creating step is used. The center of gravity position of the high brightness part is calculated from the center of gravity, and the tone correction amount of the high brightness part is calculated according to the center of gravity position of the high brightness part. By limiting the amount, there is an effect that whiteout in the high luminance portion can be suppressed.
[0050]
Next, the automatic gradation correction method according to claim 39 of the present invention is the automatic gradation correction method according to any one of claims 21, 22, and 23, wherein the luminance distribution is discrete in the gradation correction processing. In such a case, the tone correction is not performed, and the tone correction can be prevented from being performed in an image that originally does not need the tone correction.
[0051]
Next, the automatic gradation correction method according to claim 40 of the present invention is the automatic gradation correction method according to any one of claims 21, 22, and 23, wherein the color difference signal of the image is corrected according to the correction table. It has the effect of reducing the phenomenon that the saturation appears to have been reduced by correcting the luminance.
[0052]
Next, an automatic gradation correction program recording medium according to claim 41 of the present invention is a recording medium recording a program for causing a computer to execute an automatic gradation correction method for correcting gradation of a digital image. In the automatic gradation correction method, a luminance histogram creation step of creating a luminance histogram of the digital image, a centroid of the luminance histogram is obtained, and a low luminance portion and a high luminance are calculated using a median value of the entire gradation range and the centroid. A boundary value calculating step for calculating a boundary value of the luminance portion; a centroid calculating step for obtaining a centroid of the low luminance portion of the luminance histogram based on the boundary value calculated by the boundary value calculating step; and Including a gradation correction processing step for performing gradation correction processing so that the center of gravity of the low luminance portion of the luminance histogram matches the luminance correction target value Yes, by making the boundary value between the low-brightness region and the high-brightness region variable, it is possible to calculate the low-brightness part that correctly includes the backlight region in the backlight image, and to correct the backlight region to the target brightness value more accurately. It has the action.
[0053]
Next, an automatic gradation correction program recording medium according to claim 42 of the present invention is a recording medium recording a program for causing a computer to execute an automatic gradation correction method for correcting the gradation of a digital image. In the automatic gradation correction method, a luminance histogram creating step of creating a luminance histogram of the digital image, and a mountain distribution first detected by scanning the luminance histogram from a low luminance side is set as a first range, A mountain-shaped distribution detecting step of detecting a mountain-shaped distribution first detected by scanning from the luminance side as the second range, a center of gravity of the first range of the mountain-shaped distribution detected by the mountain-shaped distribution detecting step, and a second A boundary value calculating step for calculating a boundary value for dividing the low luminance portion and the high luminance portion of the luminance histogram between the center of gravity of the range and the boundary value calculated by the boundary value calculating step; Centroid calculation step for obtaining the centroid of the low luminance portion of the brightness histogram, and the gradation correction processing for performing the gradation correction processing so that the centroid of the low luminance portion of the luminance histogram matches the luminance correction target value while expanding the luminance distribution In the case where the input image is backlit, the image can be corrected to the target brightness and the overall contrast can be improved. In the case of direct light, the original image can be obtained. It is possible to obtain an image with improved contrast without changing the brightness of the image.
[0054]
Next, an automatic gradation correction program recording medium according to claim 43 of the present invention is the automatic gradation correction method according to claim 41 or claim 42, wherein the luminance correction target value is calculated from a target luminance distribution. A target value calculating step, wherein the target value calculating step calculates the center of gravity of the low luminance part of the target luminance distribution as a luminance correction target value based on the boundary value output from the boundary value calculating step; Therefore, the image having different brightness characteristics is corrected with the target value calculated from the target luminance distribution having the same shape, and an image having an improved overall contrast can be obtained.
[0055]
Next, an automatic gradation correction program recording medium according to claim 44 of the present invention is the automatic gradation correction method according to claim 42, wherein the automatic gradation correction method recording medium has a target value of the movement destination of the center of gravity of the low luminance portion of the luminance histogram. When a certain luminance correction target value is different from the centroid position of the low luminance portion of the luminance histogram calculated by the centroid calculation step, the luminance correction target value is made to coincide with the centroid position of the low luminance portion of the luminance histogram. The gradation correction processing step expands the luminance distribution and coincides with the luminance correction target value output by the target value correction unit at the same time as the center of gravity of the low luminance portion of the luminance histogram. In this way, it is possible to prevent the image from being corrected darker than the input image by correcting the target value. Having.
[0056]
Next, an automatic gradation correction program recording medium according to claim 45 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the gradation correction processing step includes the luminance histogram. The correction is performed so that both of the brightness distribution expansion process and the process of matching the center of gravity of the low-brightness portion of the brightness histogram in which the brightness distribution has been expanded with the brightness correction target value are performed simultaneously. It is characterized in that a table is created, and has the effect of making it possible to match the center of gravity of the low brightness part of the brightness histogram with the target value by creating a conversion table once.
[0057]
Next, an automatic gradation correction program recording medium according to claim 46 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the luminance histogram creation step, the center of gravity calculation step, Further includes a luminance distribution expanding step of expanding the luminance distribution of the luminance histogram, and the gravity center calculating step performs the calculation of the gravity center on the low luminance portion of the luminance histogram in which the luminance distribution is expanded. This is characterized in that after the luminance distribution of the luminance histogram is expanded in advance, automatic gradation correction can be performed by the process of matching the center of gravity of the low luminance portion with the target value.
[0058]
Next, the automatic gradation correction program recording medium according to claim 47 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the number of luminance distributions is determined when the luminance histogram is created. In other words, the correction amount can be accurately calculated even when the gradation distribution of the luminance histogram is concentrated on a certain part.
[0059]
Next, the automatic gradation correction program recording medium according to claim 48 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the skin tone area is extracted from the color difference signal and the luminance signal. A skin color region extracting step, and when creating the brightness histogram, creating a brightness histogram in which the brightness distribution of the skin color portion of the image is weighted to the brightness distribution of the entire image according to the area of the skin color region By weighting the brightness of a person's skin color to the brightness histogram according to the area of the skin color area, if there is a person, the gradation is adjusted so that the brightness of the skin color is optimized according to the area. It has the effect that it can be corrected.
[0060]
Next, the automatic gradation correction program recording medium according to claim 49 of the present invention is the automatic gradation correction program recording medium according to claim 48, wherein the luminance distribution of the skin color portion of the image is changed to the luminance distribution of the entire image. When weighting according to the area of the skin color area, the distribution of the high brightness part of the skin color part is weighted and weighted. By weighting the distribution of the high brightness part, It has the effect that whiteout can be suppressed.
[0061]
Next, an automatic gradation correction program recording medium according to claim 50 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the automatic gradation correction program recording medium is based on the luminance histogram calculated by the luminance histogram creation step. The center of gravity position of the high brightness part is calculated, and the gradation correction amount of the high brightness part is calculated according to the center of gravity position of the high brightness part. By limiting the above, there is an effect that whiteout of the high luminance portion can be suppressed.
[0062]
Next, the automatic gradation correction program recording medium according to claim 51 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the luminance distribution is discrete in the gradation correction processing. In such a case, the tone correction is not performed, and the tone correction can be prevented from being performed in an image that originally does not need the tone correction.
[0063]
Next, the automatic gradation correction program recording medium according to claim 52 of the present invention is the automatic gradation correction program recording medium according to claim 41 or 42, wherein the color difference signal of the image is corrected according to the correction table. This has the effect of relieving a phenomenon in which the saturation appears to be lowered by correcting the luminance.
[0064]
DETAILED DESCRIPTION OF THE INVENTION
(Embodiment 1)
In the following, claim 11, claim 12, claim 13, claim 14, claim 15, claim 16, claim 17, claim 18, claim 19, claim 20, claim 31, claim 32 , Claim 33, claim 34, claim 35, claim 36, claim 37, claim 38, claim 39, claim 40, claim 45, claim 46, claim 47, claim 48, claim Embodiment 1 corresponding to the items (49, 50, 51, 52) will be described with reference to the drawings.
In the first embodiment, the entire luminance distribution of the luminance histogram is expanded so as to spread over all gradations, so that the contrast of the input image is improved as a whole, and the center of gravity position of the low luminance portion is corrected to the target value. Is what you do.
[0065]
FIG. 1 is a block diagram showing the configuration of the automatic gradation correction apparatus according to the first embodiment. In FIG. 1, 101 is an image sensor that photoelectrically converts a captured image, 102 is an A / D converter that receives an analog image signal from the image sensor 101, and 103 is a digital image signal that is input from the A / D converter 102. A luminance signal calculation circuit 104, a luminance distribution creation circuit (luminance histogram creation unit) to which the luminance signal from the luminance signal calculation circuit 103 is input, and 105 a centroid calculation circuit to which the luminance distribution from the luminance distribution generation circuit 104 is input. (Centroid calculation unit), 106 is a distribution range calculation circuit to which the luminance distribution from the luminance distribution creation circuit 104 is input, and 107 is a target value storage circuit that stores a target value that is a target for gradation correction. , 108 are the center of gravity from the center of gravity calculation circuit 105, the maximum value and the minimum value of the distribution range from the distribution range calculation circuit 106, and the target value storage circuit 10. A correction table creation circuit for creating a correction table for gradation correction based on the target value from the reference numeral 109, and a gradation 109 in the digital image signal output from the A / D converter 102 based on the correction table created by the correction table creation circuit 108 It is an image signal correction circuit that performs correction. The correction table creation circuit 108 and the image signal correction circuit 109 together constitute a gradation correction processing unit. However, when the gradation correction processing unit does not include the luminance histogram distribution expansion function, both the correction table creation circuit 108 and the image signal correction circuit 109 constitute both the luminance distribution expansion unit and the gradation correction processing unit. .
[0066]
Next, the operation will be described. The analog image signal output from the image sensor 101 is converted into a multi-gradation digital image signal by the A / D converter 102. Digitization may be performed with any number of bits. Here, it is assumed that the image signal is 8 bits and the luminance value is “0” to “255”.
[0067]
Next, the luminance signal calculation circuit 103 calculates a luminance signal from the digital image signal. The luminance signal Y in the luminance signal calculation circuit 103 is calculated from the RGB values by the following equation (3).
[Equation 3]
Figure 0003772133
Based on the luminance value calculated by the luminance signal calculation circuit 103, the luminance distribution generation circuit 104 generates a luminance histogram indicating the sum of pixels having the same value.
[0068]
FIG. 2 is an example of a brightness histogram created by the brightness distribution creation circuit 104. 2A is a luminance histogram of a backlight image, and FIG. 2B is a luminance histogram of a backlight image. As is clear from FIG. 2B, the luminance histogram of the backlight image has a feature that peaks are formed on the low luminance side and the high luminance side.
The center-of-gravity calculation circuit 105 sets the low-luminance side region as the low-luminance portion and the high-luminance side region as the high-luminance portion among the respective regions obtained by dividing the luminance histogram into two equal parts at the central luminance level of the input luminance level axis. Then, the position of the center of gravity of the low luminance part is calculated. When the gradation is represented by i and the frequency of each gradation is represented by Y [i], the gravity center position G is calculated by the following equation (4).
[Expression 4]
Figure 0003772133
The distribution range calculation circuit 106 calculates the maximum value and the minimum value on the input luminance level axis of the luminance histogram generated by the luminance distribution generation circuit 104. The maximum value and the minimum value are the maximum luminance level and the minimum luminance level after the luminance distribution is expanded in order to improve the contrast in the correction process.
In order to avoid the influence of noise when calculating the maximum value and the minimum value, the maximum value and the minimum value may be obtained as the brightness level slightly inside from the end instead of the both ends of the distribution. In this case, the maximum value can be calculated from the gradation when the number of pixels for each gradation is integrated from the high luminance side of the luminance histogram and the integrated value exceeds 0.5% of the number of pixels, for example. it can. Similarly, the minimum value can be calculated from the gradation when the number of pixels for each gradation is integrated from the low luminance portion side and the integrated value exceeds, for example, 0.5% of the number of pixels.
[0069]
Next, a brightness conversion table is created using the center of gravity position calculated by the center of gravity calculation circuit 105, the maximum and minimum values calculated by the distribution range calculation circuit 106, and the target value stored in advance in the target value storage circuit 107. . This luminance conversion table is used to enlarge the luminance distribution and at the same time perform gradation correction so that the center of gravity of the low luminance portion of the luminance histogram after enlargement matches the target value.
[0070]
FIG. 3 shows the tone correction processing. 3A is a luminance histogram of a backlight image, FIG. 3B is a luminance histogram corrected so that the luminance distribution of FIG. 3A is enlarged, and FIG. 3C is a low luminance of the luminance histogram after enlargement. 5 is a luminance histogram corrected so that the center of gravity of the part matches the target value.
FIG. 4A is a flowchart showing the principle of the gradation correction process.
[0071]
First, a luminance histogram is created from the input image of FIG. 3A (see step S101 of FIG. 4), and the entire luminance distribution of the luminance histogram is expanded so as to spread over all gradations as shown in FIG. (See step S102 in FIG. 4). Thereby, the contrast of the input image can be improved as a whole.
Next, for the image with improved contrast as shown in FIG. 3B, the center of gravity position of the low-luminance part moved is obtained by expanding the distribution from the center of gravity position of the low-luminance part in FIG. (See step S103 in FIG. 4). Then, correction is performed so that the position of the center of gravity of the low-luminance part moved by expanding the distribution is moved to the target value as shown in FIG. 3C (see step S104 in FIG. 4). As a result, the luminance value of the low luminance portion can be corrected to the target luminance value, and the brightness of the entire image can be optimized.
[0072]
As a result of these two processes, it is possible to obtain an image in which the low contrast region in the backlight state is brightly corrected so as to have the target brightness value and the overall contrast is improved.
The process of expanding the luminance distribution may be performed by converting each luminance level so that the minimum value and the maximum value calculated by the distribution range calculation circuit 106 become “0” as the minimum luminance level and “255” as the maximum luminance level, respectively. . When the input luminance level is expressed as Yin and the minimum and maximum values of the luminance distribution are expressed as Ymin and Ymax, respectively, the output luminance level Yout is calculated by the following equation (5).
[Equation 5]
Figure 0003772133
The process of converting the center of gravity of the low luminance part of the luminance histogram so as to become the target value can be performed by γ correction. The γ correction refers to correcting a gradation according to a γ correction function with reference to a histogram. When the original gradation is Y1, the corrected gradation Y2 is calculated by the following equation (6).
[Formula 6]
Figure 0003772133
Therefore, by calculating a γ value such that the center of gravity of the low luminance part of the luminance histogram is converted into a target value in the equation (6), and performing conversion for all gradations with a γ correction function having the γ value, The center of gravity of the low luminance part of the luminance histogram can be converted so as to match the target value.
[0073]
Here, correction is performed so that the center of gravity of the low-brightness portion of the brightness distribution corrected by equation (5) matches the target value, so that the center of gravity calculated by the center of gravity calculating circuit 105 is G and the target value storage circuit 107 is stored. When the stored target value is expressed as g, a γ value satisfying the following expression (7) may be calculated.
[Expression 7]
Figure 0003772133
In addition, in the correction processing of Equations (5) and (6), 256 conversion tables having the same number as the number of gradations are created in advance to improve the calculation speed, and this table is used for actual image data. Refer to and convert.
However, if the calculations of equations (5) and (6) are performed separately, the gradation is an integer value from “0” to “255”, and therefore an error occurs with respect to the decimal point. Therefore, the calculation of the equations (5) and (6) is performed at the same time so as to eliminate the error after the decimal point.
[0074]
The correction table creation circuit 108 creates a brightness conversion table that simultaneously performs the process of expanding the brightness distribution and the process of converting the center of gravity of the low brightness portion of the brightness histogram to match the target value.
This eliminates the need for a luminance distribution expansion unit (a conversion table dedicated to luminance distribution expansion) that is required when the luminance distribution is immediately expanded after the luminance histogram is created as shown in FIG. As described above, the calculation error after the decimal point can be eliminated.
[0075]
When the γ value calculated by the equation (7) is represented by K and the input luminance level is represented by i (i = 0, 1,..., 255), the luminance distribution of the input image is expanded, and the low luminance portion of the luminance histogram after expansion is performed. The conversion table T [i] for performing conversion so that the center of gravity of the target coincides with the target value can be calculated by the following equation (8).
[Equation 8]
Figure 0003772133
FIG. 15 is a graph showing an example of the conversion characteristic of the luminance conversion table. The luminance conversion table is such that the gravity center gradation of the low luminance part of the luminance histogram matches the gradation of the target value (Ymin, Ymax) has a characteristic of mapping to (0, 255).
[0076]
Next, the image signal correction circuit 109 corrects the image luminance signal using the luminance conversion table created by the correction table creation circuit 108. Then, R, G, and B signals are created from the image luminance signal. Note that R, G, and B signals can be directly converted in accordance with a luminance conversion table to perform luminance correction.
FIG. 4B shows a flowchart of gradation correction processing actually performed by the image signal correction circuit 109 of the automatic gradation correction apparatus of FIG. First, in step S111, a luminance histogram of the digital image is created, and in step S112, the center of gravity of the low luminance portion of the luminance histogram is obtained before the luminance distribution is expanded. Next, in step S113, the luminance distribution of the luminance histogram is enlarged, and at the same time, the luminance distribution of the luminance histogram is corrected so that the center of gravity of the low luminance portion of the luminance histogram with the enlarged luminance distribution matches the target value. Using this correction table, enlargement of the luminance histogram and correction of the luminance distribution so that the center of gravity of the low luminance portion matches the target value are performed simultaneously.
[0077]
As described above, the center of gravity position of the low luminance portion of the luminance histogram, the maximum value and the minimum value of the distribution are calculated, and the luminance distribution is expanded. At the same time, the center of gravity of the low luminance portion of the luminance histogram matches the target value stored in advance. By performing such tone correction, it is possible to brightly correct the backlight image so that the low brightness region in the backlight state becomes the target brightness value, and an image with improved overall contrast can be obtained. Similarly, in the case of a follow-up image, the luminance value of the low luminance region is corrected so as to match the target value, and an image with improved overall contrast can be obtained.
[0078]
Note that when the target value is stored in the target value storage circuit 107, it is necessary to set an optimal target value for each input image, but it may happen that a non-optimal value is set by mistake. For this, there is a limitation on the γ value of the γ correction function used when creating the luminance conversion table in the correction table creating circuit 108.
[Equation 9]
Figure 0003772133
It is sufficient to limit to the range.
[0079]
In this way, by limiting the γ value, the strength of correction is limited, and even if the target value is not an optimum value for the input image, it is possible to prevent the characteristics of the original image from being greatly impaired.
The correction table creation circuit 108 may set a straight line instead of the γ curve described above. The minimum value and the maximum value of the luminance distribution calculated by the distribution range calculation circuit 106 are “0” as the minimum luminance level and “255” as the maximum luminance level, respectively, and the barycentric gradation of the low luminance portion of the luminance histogram is the target value. FIG. 5 shows a correction table set with a straight line that matches the gradation. By making a straight line in this way, it is possible to greatly reduce the amount of calculation.
[0080]
Further, the gradation between the three values of the minimum value and the maximum value calculated by the distribution range calculation circuit 106 and the gravity center gradation of the low luminance part may be set according to the frequency of distribution of the luminance histogram. This is to look at the frequency number of the luminance histogram so that a large number of gradations are provided in the region where the frequency number is large. An example is shown in FIGS. 6 (a) and 6 (b). In the case of the luminance histogram as shown in FIG. 6A, the correction table is as shown in FIG.
In this way, by creating a correction table in accordance with the frequency of the luminance histogram, more gradations can be assigned to an area with many gradations in the screen.
[0081]
Further, the luminance distribution creating circuit 104 may limit the integrated amount of the luminance distribution (corresponding to claim 15). If this exceeds a certain threshold value, it is sufficient that no further integration is performed. The threshold value can be calculated from the total number of sample points.
For example,
[Expression 10]
Figure 0003772133
You can set as follows.
[0082]
In this way, by limiting the luminance histogram in advance, for example, when the background is overexposed in a backlight image or the like and the luminance level is concentrated on 255, the gradation distribution is concentrated on a certain gradation. Even when there is such an extreme bias, the correction amount can be calculated accurately.
[0083]
Furthermore, the center of gravity position of the high brightness part may be calculated from the brightness histogram, and the correction amount of the high brightness part may be calculated according to the center of gravity position of the high brightness part (corresponding to claim 18).
[0084]
An example is shown in FIG. Ymin and Ymax are the minimum value and the maximum value of the above-described luminance distribution, respectively. First, a straight line connecting Ymin and the barycentric position of the low luminance part and a straight line dividing the inner angle of the straight line connecting the barycentric position of the low luminance part and Ymax are set. Then, the input value of the correction point is set to the center point (Y1) of the barycentric position of the low luminance portion and Ymax, and the output of Y1 on the inner angle bisector is set to the output value (Y2) of the correction point (FIG. 7A). reference). By doing so, the difference in inclination between the inflection points can be reduced. However, when the input image is a bright image, the high-intensity part may be skipped. Therefore, as shown in FIG. 7B, the input value is moved in the low luminance direction as the gravity center position of the high luminance part approaches the maximum gradation level (Y1 ′), and the input on the bisector of the inner angle is input. The output of the value Y1 ′ is set as the correction point output value Y2 ′ (see FIG. 7B). By doing so, it is possible to eliminate whiteout in the high luminance part.
[0085]
Of course, similar to the correction for the low-brightness part, the target value for the high-brightness part is set in advance, and correction points are provided so that the center of gravity of the high-brightness part matches the target value for the high-brightness part. May be. This is shown in FIG.
In this example, the correction table is set as a straight line, but the correction points may be calculated in the same manner, and the distance between the correction points may be set according to the curve or the frequency of the luminance histogram.
Also, when a skin tone area is extracted from the color difference signal and the brightness signal and a brightness histogram is created, the brightness distribution of the skin color area of the image is weighted to the brightness distribution of the entire image according to the skin color area to create a brightness histogram. (Corresponding to claim 16).
[0086]
The configuration of the automatic gradation correction apparatus at this time is a block diagram shown in FIG.
In FIG. 10, 3101 is an image sensor that photoelectrically converts a captured image, 3102 is an A / D converter that receives an analog image signal from the image sensor 3101, and 3103 is a digital image signal that is input from an A / D converter 3102. The luminance signal calculation circuit 3104 receives the luminance signal from the luminance signal calculation circuit 3103 and the flesh color luminance distribution from the flesh color luminance distribution generation circuit 3112, and 3105 indicates the luminance distribution from the luminance distribution generation circuit 3104. An input center of gravity calculation circuit, 3106 is a distribution range calculation circuit to which the luminance distribution from the luminance distribution creation circuit 3104 is input, and 3107 is a target value storage that stores a target value that is a target for gradation correction. The circuit 3108 includes the centroid from the centroid calculation circuit 3105 and the distribution range from the distribution range calculation circuit 3106. A correction table creation circuit 3109 for creating a correction table for gradation correction based on the large value, the minimum value, and the target value from the target value storage circuit 3107, is based on the correction table created by the correction table creation circuit 3108. An image signal correction circuit that performs gradation correction on the digital image signal output from the D converter 3102, 3110 is a color difference signal calculation circuit to which the digital image signal from the A / D converter 3102 is input, and 3111 is a luminance signal calculation circuit 3103. A skin color region extraction circuit (skin color region extraction unit) 3112 to which the luminance signal and the color difference signal from the color difference signal calculation circuit 3110 are input is a skin color luminance distribution creation circuit to which the luminance signal of the skin color region from the skin color region extraction circuit 3111 is input. It is.
[0087]
Next, the operation will be described. The basic operation is the same as that of the above-described apparatus of FIG. 1 except that a color difference signal calculation circuit 3110, a flesh color area calculation circuit 3111, and a flesh color luminance distribution creation circuit 3112 are added. When a skin color area is extracted from a signal and a brightness signal and a brightness histogram is created, a brightness histogram is created by weighting the brightness distribution of the skin color area of the image to the brightness distribution of the entire image according to the skin color area. .
[0088]
The color difference signal calculation circuit 3110 calculates the color difference signals Cr and Cb based on the following equations (11) and (12).
[Expression 11]
Figure 0003772133
[Expression 12]
Figure 0003772133
A skin color area extraction circuit 3111 extracts a skin color area in the input image. The skin color area extraction circuit 3111 is preliminarily input with a color difference signal and a luminance signal range corresponding to the skin color area. When the color difference signal and the luminance signal of the input signal are within the skin color area, the pixel is determined to be a skin color. .
[0089]
Here, the skin color region will be described with reference to FIG.
FIG. 11A shows the skin color distribution on the color difference signals Cr and Cb axes.
The area indicated by diagonal lines is the skin color area. Skin color is distributed in a specific area with color difference signal
You can see that FIG. 11B shows the skin color distribution on the Cr axis and the luminance axis, and the skin color is distributed in a specific area as in FIG. The area shown in FIG. 11 is stored in advance, and it is determined whether the input signal is flesh-colored. That is, when the color difference signal and the luminance signal are located in the flesh color region, the pixel is determined to be flesh color. In order to simplify the process, the skin color may be determined using only the color difference signal.
[0090]
When the skin color area extraction circuit 3111 determines that the input pixel is a skin color, the skin color brightness distribution creation circuit 3112 creates a brightness distribution of the skin color area. An example of the brightness distribution of the created skin color area is shown in FIG. When the luminance distribution of the entire screen is as shown in FIG. 12B, the luminance distribution of FIG. 12A, which is the luminance distribution of the skin color area, is added to the number of distributions of the entire luminance distribution of FIG. By adding the number of distributions for each tone, the luminance data of the skin color area is weighted. At the time of addition, the number of luminance distributions in the skin color area is weighted and added. This is because the skin color area occupies a small proportion of the entire screen, and the luminance distribution of the skin color area cannot be reflected in the tone correction process if it is added as it is. By performing the weighting, it is possible to perform gradation correction so that the skin color region is optimized. The weighting can be realized by multiplying the number of luminance distributions in the skin color area by a coefficient. For example, a value obtained by multiplying the number of luminance distributions in the skin color area by 5 may be added. FIG. 12C shows the luminance distribution added in this way.
[0091]
In the luminance distribution of the skin color area, the number of distributions of high luminance portions may be weighted (corresponding to claim 17). For example, the high luminance part is weighted by multiplying the luminance distribution of the skin color region by a coefficient as shown in FIG. As a result, it is possible to prevent flesh-colored whiteout that is visually noticeable.
[0092]
Further, when the luminance distribution created by the luminance distribution creating circuit 104 is discrete, gradation correction may not be performed (corresponding to claim 19). An example of the luminance distribution in this case is shown in FIG. The fact that the luminance distribution is discrete can be determined as an artificial image, not a natural image. In the case of an artificial image, it is generally better not to perform tone correction.
[0093]
In the above description, tone correction is performed on R, G, and B. However, a digital image signal can be separated into a luminance signal and a color difference signal, and can be performed on the luminance signal. However, in this case, a phenomenon occurs in which the saturation appears to be lowered due to the luminance correction. Therefore, as described in claim 20, the color difference signal of the image may be corrected according to the correction table. Thereby, when the R, G, and B signals are generated from the luminance signal and the color difference signal that have been subjected to gradation correction, it is possible to alleviate a phenomenon in which the saturation appears to have decreased due to the luminance correction.
[0094]
The configuration of the automatic gradation correction apparatus in this case is a block diagram shown in FIG. In FIG. 14, an image sensor 3001 photoelectrically converts a captured image, an A / D converter 3002 to which an analog image signal from the image sensor 3001 is input, and a digital image signal from an A / D converter 3002 to 3003. The luminance signal calculation circuit 3004 is a luminance distribution creation circuit to which the luminance signal from the luminance signal calculation circuit 3003 is input, 3005 is the centroid calculation circuit to which the luminance distribution from the luminance distribution generation circuit 3004 is input, and 3006 is the luminance distribution generation. A distribution range calculation circuit to which the luminance distribution from the circuit 3004 is input; 3007, a target value storage circuit that stores a target value that is a target for gradation correction; 3008, a centroid from the centroid calculation circuit 3005; From the maximum value and minimum value of the distribution range from the distribution range calculation circuit 3006 and from the target value storage circuit 3007 A correction table creation circuit that creates a correction table for tone correction based on the target value, and 3009 performs tone correction on the luminance signal output from the luminance signal calculation circuit 3003 based on the correction table created by the correction table creation circuit 3008. Luminance signal correction circuit, 3010 is a color difference signal calculation circuit to which a digital image signal from the A / D converter 3002 is input, and 3011 is a color difference gain value calculated based on the correction table created by the correction table creation circuit 3008. The color difference signal correction circuit corrects the color difference signal output from the calculation circuit 3010.
[0095]
Next, the operation will be described. The basic operation is the same as that of the apparatus of FIG. 1 described above, but the difference from the apparatus of FIG. 1 is that a luminance signal correction circuit 3009, a color difference signal calculation circuit 3010, and a color difference signal correction circuit 3011 are added. The correction is performed on the luminance signal, and the chrominance signal is corrected by calculating a chrominance gain value based on the correction table and multiplying the gain value.
[0096]
The color difference signal calculation circuit 3010 calculates the color difference signals Cr and Cb according to the above equations (11) and (12).
Similar to the image signal correction circuit 109 described above, the luminance signal correction circuit 3009 performs gradation correction on the luminance signal based on the correction table created by the correction table creation circuit 3008.
[0097]
In the color difference signal correction circuit 3011, when the color difference signal is represented by Cr, Cb, the input luminance level is i, the output value of the correction table corresponding to the input luminance level is Table [i], and the gain value of the color difference signal is represented by Cg, The gain value is calculated using the equations (13), (14), (15), and (16), and the color difference is corrected.
[Formula 13]
Figure 0003772133
[Expression 14]
Figure 0003772133
[Expression 15]
Figure 0003772133
[Expression 16]
Figure 0003772133
However, this is an example and the formula used is not limited to these. For example, when a gain value is applied to a color difference signal, if Cr reaches the maximum level of the color difference signal, Cr is clipped at the maximum level, and gain is applied directly to Cb, so that the hue changes. At this time, the change in hue can be mitigated by adjusting Cg so that Cr does not exceed the maximum level of the color difference signal and applying the adjusted Cg to Cb.
In addition, the target value is set and stored in advance in accordance with the position where the center of gravity of the low-brightness portion of the luminance histogram can be taken in the target value storage circuit 107, thereby eliminating the task of setting the target value for each input image. You can also.
[0098]
In addition, by setting a target value for each possible range of the center of gravity and limiting the intensity of correction, even if the target value is not optimal for the provisional input image, the characteristics of the original image are greatly impaired. Can also be prevented.
Further, in the correction table creation circuit 108 in this automatic gradation correction device, the luminance distribution is enlarged only on the low luminance side, and correction is performed so that the center of gravity of the low luminance portion of the luminance histogram matches the target value. By creating a conversion table that expands the luminance distribution on the high luminance side, it is possible to prevent the gradation of the high luminance part from being crushed by the gradation correction (corresponding to claim 11).
[0099]
The effect of preventing this gradation collapse will be described with reference to FIG. FIG. 16A enlarges the luminance distribution so as to spread over all gradations, and FIG. 16B shows the luminance distribution when correction is performed so that the center of gravity of the low luminance portion of the luminance histogram matches the target value. This is a case where only the low luminance side is enlarged and correction is performed so that the center of gravity of the low luminance portion of the luminance histogram matches the target value.
In FIG. 16A, the luminance distribution is expanded so as to spread over all gradations, and the luminance distribution is compressed twice to the high luminance side by correcting so that the center of gravity of the low luminance portion of the luminance histogram matches the target value. As a result, the high luminance portion is crushed.
However, in FIG. 16B, the luminance distribution is compressed to the high luminance side only when the center of gravity of the low luminance portion of the luminance histogram is corrected so as to match the target value. It can be suppressed compared to a).
In this case, since the maximum value of the luminance distribution is not necessary, the distribution range calculation circuit 106 may calculate only the minimum value. By doing so, the amount of calculation can be reduced.
[0100]
As described above, according to the first embodiment, a luminance histogram of a digital image is created, the center of gravity of the low luminance portion is calculated, the luminance distribution of the luminance histogram is expanded, and at the same time, the luminance histogram after the distribution expansion is expanded. Since the correction table for correcting the luminance histogram is created and corrected so that the center of gravity of the low luminance portion matches the target value, the luminance histogram created from the digital image signal can be created by creating only one conversion table. The brightness distribution of the low-brightness part is corrected so that the center of gravity of the low-brightness part coincides with the brightness correction target value, and the backlight image is brightly corrected so that the low-brightness area in the backlight state becomes the target brightness value. An image with improved contrast can be obtained. Similarly, an automatic gradation correction apparatus that can correct the luminance value of the low luminance region so as to match the target value and obtain an image having an improved overall contrast can be obtained in the case of the follow light image.
[0101]
In the above description, the automatic gradation correction that simultaneously performs the gradation correction processing for correcting the luminance distribution so that the center of gravity of the low-luminance portion matches the target value mainly by using the correction table. Although the apparatus has been described, it may be realized as an automatic gradation correction method for performing processing corresponding to this automatic gradation correction apparatus. Further, an automatic gradation correction method corresponding to the flowchart of FIG. 4A showing the correction principle, an automatic gradation correction apparatus corresponding to this automatic gradation correction method, and further, this automatic gradation correction method is applied to a computer. The automatic gradation correction program to be executed may be realized as an automatic gradation correction program recording medium for recording on various recording media. The automatic gradation correction described above is performed except that the luminance distribution cannot be expanded and gradation correction processing cannot be performed simultaneously. The same effect as the device is achieved.
[0102]
(Embodiment 2)
The invention described in claim 4, claim 5, claim 6, claim 24, claim 25, claim 26, claim 43 of the present invention (and claims 11, 12). , Claim 13, claim 15, claim 16, claim 17, claim 18, claim 19, claim 20, claim 31, claim 31, 33, claim 34, claim Item 35, Item 36, Item 37, Item 38, Item 39, Item 40, Item 45, Item 46, Item 47, Item 48, Item 49, Item 50, Item 51 Embodiment 2 corresponding to the invention described in claim 52 will be described with reference to the drawings.
In the second embodiment, gradation correction is performed by setting a target luminance distribution instead of setting a target value as a target.
[0103]
FIG. 17 is a block diagram showing the configuration of the automatic gradation correction apparatus according to the second embodiment. In FIG. 17, reference numeral 601 denotes an image sensor that photoelectrically converts a captured image, 602 denotes an A / D converter that receives an analog image signal from the image sensor 601, and 603 denotes a digital image signal that is input from the A / D converter 602. A luminance signal calculating circuit 604, a luminance distribution generating circuit (luminance histogram generating unit) to which a luminance signal is input from the luminance signal calculating circuit 603, and 605 storing a target luminance distribution which is a target for gradation correction. A target luminance distribution storage circuit 606, a centroid calculation circuit (centroid calculation unit) to which the luminance distribution from the luminance distribution generation circuit 604 is input, and 607 a distribution range to which the luminance distribution from the luminance distribution generation circuit 604 is input. A calculation circuit 608 is a target value calculation circuit (target value calculation unit) 609 to which the target luminance distribution from the target luminance distribution storage circuit 605 is input, 609 A correction table creation circuit that creates a correction table for gradation correction based on the center of gravity from the center of gravity calculation circuit 606, the maximum value and minimum value of the distribution range from the distribution range calculation circuit 607, and the target value from the target value calculation circuit 608 610 is an image signal correction circuit that performs gradation correction on the digital image signal output from the A / D converter 602 based on the correction table created by the correction table creation circuit 609. Note that the correction table creation circuit 609 and the image signal correction circuit 610 together constitute a gradation correction processing unit. However, when the gradation correction processing unit does not include the luminance histogram distribution expansion function, both the correction table creation circuit 609 and the image signal correction circuit 610 constitute both the luminance distribution expansion unit and the gradation correction processing unit. .
[0104]
Next, the operation will be described. The basic operation is the same as that of the first embodiment described above, but instead of setting a target value in the storage circuit in advance, a target luminance distribution is set and the target value is calculated using the target luminance distribution. This is different from the first embodiment.
In the target luminance distribution storage circuit 605, a target luminance histogram is set in advance by gradation correction, and the distribution is stored.
FIG. 18 is an example of a luminance histogram stored in the target luminance distribution storage circuit 605. 18A is a luminance histogram of the input image in the backlight state, and FIG. 18B is a luminance histogram of the target image. In the histogram of FIG. 18B, the low-brightness portion in the backlight state moves in the high-brightness direction, and the backlight is eliminated.
[0105]
Next, the target value calculation circuit 608 calculates the target value from the target luminance distribution. That is, for the target luminance distribution stored in advance in the target luminance distribution storage circuit 605, the barycentric position of the low luminance portion is obtained in the same manner as when the barycentric position is calculated by the barycentric calculating circuit 606, and this barycentric position is determined as the target value. (See step S203 in FIG. 20). Note that the low luminance portion in the target value calculation circuit 608 needs to be set in the same range as the low luminance portion in the gravity center calculation circuit 606. Here, the low luminance portion is set to a range from “0” gradation to the central gradation (“127”).
[0106]
Using this calculated target value, gradation correction is performed in the same manner as in the first embodiment. That is, a luminance conversion table is created using the position of the center of gravity calculated by the center of gravity calculation circuit 606, the maximum and minimum values calculated by the distribution range calculation circuit 607, and the target value calculated in advance by the target value calculation circuit 608. This luminance conversion table is used to enlarge the luminance distribution and at the same time perform gradation correction so that the center of gravity of the low luminance portion of the luminance histogram after enlargement matches the target value.
[0107]
FIG. 20A is a flowchart showing the principle of the gradation correction process. First, a luminance histogram is created from the input image (see step S200 in FIG. 20), and the entire luminance distribution of the created luminance histogram is enlarged so as to spread over all gradations (see step S201 in FIG. 20). Thereby, the contrast of the input image can be improved as a whole.
[0108]
Next, the position of the center of gravity of the low-luminance portion of the image with improved contrast is obtained (see step S202 in FIG. 20). Then, a luminance correction target value is calculated from the target luminance distribution (see step S203 in FIG. 20), and correction is performed so that the center of gravity position of the low luminance portion that has moved by expanding the distribution is moved to the target value (FIG. 20). Step S204). Thereby, the luminance value of the low luminance part can be corrected to the target luminance value.
As a result of these two processes, it is possible to obtain an image in which the low contrast region in the backlight state is brightly corrected so as to have the target brightness value and the overall contrast is improved.
[0109]
FIG. 20B shows a flowchart of gradation correction processing actually performed by such an automatic gradation correction apparatus of FIG. 17. First, in step S210, a luminance histogram of a digital image is created, and step S211 is performed. The center of gravity of the low luminance portion of the luminance histogram is obtained before expanding the luminance distribution. In step S212, a luminance correction target value is calculated. In step S213, the luminance distribution of the luminance histogram is enlarged, and at the same time, the luminance distribution of the luminance histogram is set so that the center of gravity of the low luminance portion of the luminance histogram matches the target value. A correction table for correcting the brightness is created, and using this correction table, the brightness histogram is enlarged and the brightness distribution is corrected so that the center of gravity of the low brightness portion matches the target value.
This eliminates the need for a luminance distribution expansion unit (a conversion table dedicated to luminance distribution expansion) that is required when the luminance distribution is immediately expanded after the luminance histogram is created as shown in FIG. As described above, the calculation error after the decimal point can be eliminated.
[0110]
FIG. 19 is a luminance histogram of an image obtained by calculating a target value from the luminance histogram of FIG. 18B and performing tone correction on the input image of FIG. From FIG. 18, it can be seen that the distribution peak of the low luminance portion has moved to the high luminance side, and the low luminance portion has been corrected brightly. Furthermore, it can be seen that the distribution is enlarged and the contrast is improved.
In this way, the target brightness can be obtained by performing correction so that the center of gravity position of the low luminance portion of the luminance histogram created from the input image is moved to the target value calculated from the target luminance histogram at the same time as the luminance distribution is expanded. In addition, an image with improved overall contrast can be obtained.
[0111]
This method also has the following effects.
FIG. 21 shows a target luminance distribution for two input images. FIG. 21A shows a target luminance distribution in a certain backlight image, and FIG. 21B shows a target luminance distribution in a certain backlight image. In both cases, the shape of the distribution of the low luminance part is exactly the same.
[0112]
For example, as a gradation correction method other than this method using the target luminance distribution, there is a method of correcting the gradation so that the shape of the luminance distribution of the input image becomes exactly the same as the target luminance distribution. In the case of this correction method, the correction result changes greatly if the shape of the distribution changes. Therefore, the forward light image and the back light image with different shapes of the luminance histogram are divided into cases, and always shown in FIGS. 21 (a) and 21 (b). It is necessary to set a target luminance distribution suitable for each state as shown in FIG.
[0113]
However, since the target value calculation circuit 608 of the second embodiment calculates the centroid of only the low luminance part and uses the centroid position as the target value, the target value calculated from the two target luminance distributions shown in FIG. Have the same value, and in the correction method of the second embodiment, the same correction result can be obtained regardless of which target luminance distribution is used. Therefore, correction may be performed using either target luminance distribution.
Therefore, according to this method, the same target luminance distribution can be used if the target luminance value of the low luminance portion is the same in the gradation correction of the follow light image and the backlight image. It is not necessary to perform case classification on images having different characteristics, and tone correction can be performed quickly.
[0114]
In the target luminance distribution storage circuit 605, correction can be performed without making the luminance histogram the same shape as the target luminance distribution as described above. Therefore, as described in claim 5, the target luminance distribution is approximated to a curve in advance. The curve can also be stored. Then, the target value calculation circuit 608 creates a luminance distribution extending from “0” to “255” from the curve, and calculates the target value.
[0115]
Further, since the target value is related only to the low luminance part of the target luminance distribution, the curve stored in the target luminance distribution storage circuit 605 is, for example, the average value μ and the standard deviation σ characters in FIG. A normal distribution curve expressed by the following equation (17), a cosine curve expressed by the following equation (18) in FIG. 22B, and a straight line expressed by the following equation (19) in FIG. You can also
[Expression 17]
Figure 0003772133
[Formula 18]
Figure 0003772133
[Equation 19]
Figure 0003772133
In this way, the target luminance distribution can be easily set by giving the target luminance distribution as a curve or a straight line, and the storage capacity of the memory is larger than when all the coordinates of the points constituting the target luminance distribution are stored. Can be reduced.
In the target luminance distribution storage circuit 605, a plurality of target luminance distributions are set in advance, and an optimum target value is calculated by changing the shape of the set target luminance distribution according to the luminance histogram of the input image. You can also. In this way, the target value can be easily adjusted.
[0116]
In addition, when giving with a curve, it is realizable also by memorize | storing the curve which changed the inclination of the curve. For example, in the curve of FIG. 22B, a cosine curve in which the value of A is changed is stored.
Alternatively, two curves given in advance may be combined according to the luminance histogram of the input image to create a new curve. For example, when the curves of FIGS. 22B and 22C are given and the luminance histogram of the input image is as shown in FIG. 23A, the ratio of FIG. 22B is increased. A curve like 23 (c) is created. In the case as shown in FIG. 23B, a curve as shown in FIG. 23D in which the ratio in FIG. 22C is increased is created.
[0117]
Further, in the correction table creation circuit 609 in the automatic gradation correction device according to the fourth, fifth and sixth aspects, the luminance distribution is enlarged only on the low luminance side, and the center of gravity of the low luminance portion of the luminance histogram is obtained. By creating a conversion table that expands the brightness distribution on the high-brightness side in the process of correcting to match the target value, it prevents the gradation of the high-brightness part from being crushed by gradation correction (Corresponding to claim 11).
In this case, since the maximum value of the luminance distribution is not necessary, the distribution range calculation circuit 607 may calculate only the minimum value. By doing so, the amount of calculation can be reduced.
Further, as described in the first embodiment, the modifications described in claims 15 to 20 may be added.
[0118]
That is, the luminance distribution creation circuit 104 may be limited in the integrated amount of the luminance distribution (corresponding to claim 15). In this way, by limiting the luminance histogram in advance, for example, when the background is overexposed in a backlight image or the like and the luminance level is concentrated at 255, the luminance distribution is concentrated on a certain gradation. Even when there is such an extreme bias, the correction amount can be calculated accurately.
Also, when a skin tone area is extracted from the color difference signal and the brightness signal and a brightness histogram is created, the brightness distribution of the skin color area of the image is weighted to the brightness distribution of the entire image according to the skin color area to create a brightness histogram. (Corresponding to claim 16). In this way, gradation correction can be performed so that the skin color region is optimized by weighting.
[0119]
Further, in the luminance distribution of the skin color region, the number of distributions of the high luminance portion may be weighted (corresponding to claim 17). For example, the high luminance part is weighted by multiplying the luminance distribution of the skin color region by a coefficient as shown in FIG.
Further, the center of gravity position of the high brightness part may be calculated from the brightness histogram, and the correction amount of the high brightness part may be calculated according to the center of gravity position of the high brightness part (corresponding to claim 18).
[0120]
Of course, similarly to the correction of the low luminance portion, the target value of the high luminance portion is calculated from the target luminance distribution, and the correction point is provided so that the center of gravity position of the high luminance portion matches the target value of the high luminance portion. A correction table may be created.
[0121]
Further, when the luminance distribution created by the luminance distribution creating circuit is discrete, correction may not be performed (corresponding to claim 19). This is because it can be determined that the image is an artificial image, and in the case of an artificial image, it is generally better not to perform tone correction.
Further, when the digital image signal is separated into a luminance signal and a color difference signal and gradation correction is performed on the luminance signal, the color difference signal of the image may be corrected according to the correction table. Corresponding to). Thereby, when the R, B, and G signals are generated from the luminance signal and the color difference signal that have been subjected to gradation correction, it is possible to alleviate the phenomenon that the saturation appears to have decreased due to the luminance correction.
[0122]
As described above, according to the second embodiment, the luminance histogram of the digital image is created, the center of gravity of the low luminance portion is calculated, the luminance correction target value is calculated from the target luminance distribution, and the luminance of the luminance histogram is calculated. A correction table for correcting the luminance histogram is created and corrected so that the center of gravity of the low luminance portion of the luminance histogram after the distribution expansion is coincident with the target value at the same time. By simply creating, the brightness distribution of the brightness histogram created from the digital image signal is expanded and at the same time the center of gravity of the low brightness part is corrected so as to match the brightness correction target value. Bright correction is performed so that the target luminance value is obtained, and an image with improved overall contrast can be obtained. Similarly, an automatic gradation correction apparatus that can correct the luminance value of the low luminance region so as to match the target value and obtain an image having an improved overall contrast can be obtained in the case of the follow light image.
[0123]
In the above description, the automatic gradation correction that simultaneously performs the gradation correction processing for correcting the luminance distribution so that the center of gravity of the low-luminance portion matches the target value mainly by using the correction table. Although the apparatus has been described, it may be realized as an automatic gradation correction method for performing processing corresponding to this automatic gradation correction apparatus. Further, an automatic gradation correction method corresponding to the flowchart of FIG. 20A showing the correction principle, an automatic gradation correction apparatus corresponding to this automatic gradation correction method, and further, this automatic gradation correction method is applied to a computer. The automatic gradation correction program to be executed may be realized as an automatic gradation correction program recording medium for recording on various recording media. The automatic gradation correction described above is performed except that the luminance distribution cannot be expanded and gradation correction processing cannot be performed simultaneously. The same effect as the device is achieved.
[0124]
(Embodiment 3)
In the following, the invention described in claim 1, claim 21, and claim 41 (further, claim 2, claim 11, claim 13, claim 14, claim 15, claim 15, claim 10) 16, claim 17, claim 18, claim 19, claim 20, claim 31, claim 32, claim 33, claim 34, claim 35, claim 36, claim 37, Claim 38, Claim 39, Claim 40, Claim 45, Claim 46, Claim 47, Claim 48, Claim 49, Claim 50, Claim 51, Claim 52) A corresponding third embodiment will be described with reference to the drawings.
In the third embodiment, the boundary between the low luminance portion and the high luminance portion can be changed according to the center of gravity of the luminance histogram of the input image.
[0125]
The configuration of the automatic gradation correction apparatus according to the third embodiment is a block diagram shown in FIG.
In FIG. 24, reference numeral 1101 denotes an image sensor that photoelectrically converts a captured image, 1102 denotes an A / D converter that receives an analog image signal from the image sensor 1101, and 1103 denotes a digital image signal that is input from the A / D converter 1102. The luminance signal calculation circuit 1104 is a luminance distribution creation circuit (luminance histogram creation unit) to which the luminance signal from the luminance signal calculation circuit 1103 is input. 1110 is a boundary value calculation to which the luminance distribution from the luminance distribution generation circuit 1104 is input. Circuit (boundary value calculation unit) 1105 is a centroid calculation circuit (centroid calculation unit) to which the luminance distribution from the luminance distribution generation circuit 1104 and the boundary value from the boundary value calculation circuit 1110 are input, and 1106 is from the luminance distribution generation circuit 1104 The distribution range calculation circuit to which the luminance distribution is input 1107 is a target for gradation correction A target value storage circuit 1108 for storing a target value is a scale based on the center of gravity from the center of gravity calculation circuit 1105, the maximum and minimum values of the distribution range from the distribution range calculation circuit 1106, and the target value from the target value storage circuit 1107. A correction table creation circuit for creating a correction table for tone correction 1109 is an image signal correction circuit for performing gradation correction on the digital image signal output from the A / D converter 1102 based on the correction table created by the correction table creation circuit 1108. It is.
[0126]
Note that the correction table creation circuit 1108 and the image signal correction circuit 1109 together constitute a gradation correction processing unit. However, when the gradation correction processing unit does not include the luminance histogram distribution expansion function, both the correction table creation circuit 1108 and the image signal correction circuit 1109 constitute both the luminance distribution expansion unit and the gradation correction processing unit. .
FIG. 27A is a flowchart showing the principle of the gradation correction process.
[0127]
That is, in step S301, a luminance histogram of the digital image is created, and in step S302, the luminance histogram is enlarged. Next, in step S310, the center of gravity of all the gradations of the enlarged luminance histogram is calculated, and in step S311, the boundary value between the low luminance part and the high luminance part of the enlarged luminance histogram is calculated. In step S303, the center of gravity of the low luminance part of the luminance histogram is obtained, and in step S304, the luminance histogram is corrected so that the center of gravity of the low luminance part matches the target value.
[0128]
Next, the operation will be described. The basic operation is the same as that of the first embodiment described above. However, the difference from the first embodiment is that a boundary value calculation circuit 1110 is added, and a luminance histogram is obtained using the central luminance level of the input luminance level axis as a boundary value. The boundary value can be changed and the boundary value can be set according to the input image, instead of dividing the low luminance side area that can be divided into two equal parts into the low luminance part and the high luminance side area into the high luminance part. Is a point.
Thus, by making the boundary value variable and accurately extracting the low luminance part including the backlight region in the backlight image, the backlight region can be more accurately corrected to the target luminance value.
[0129]
As already described, the luminance histogram created by the backlight image has a feature that two peaks can be formed on the high luminance side and the low luminance side as shown in FIG. At this time, if the centroid at all gradations is calculated, and the ratio of dark areas including the backlight area is large in all image areas, the centroid position is lower in luminance than the central gradation as shown in FIG. When the ratio of the dark area including the backlight area in the entire image area is small, the barycentric position is on the higher luminance side than the central gradation, as shown in FIG.
[0130]
Therefore, in the third embodiment, the center of gravity of all the gradations of the luminance histogram created by the luminance distribution creation circuit 1104 is calculated, and the boundary value is moved based on the calculated center of gravity position. By so doing, it is possible to correctly divide the low luminance part including the backlight region and the other high luminance part.
That is, the boundary value calculation circuit 1110 obtains the centroid of all the gradations of the luminance histogram created by the luminance distribution creation circuit 1104, and the gradation obtained by shifting the gradation calculated from the central gradation based on the position of the centroid, It is calculated as a boundary value between the low luminance part and the high luminance part.
[0131]
When the center of gravity of the luminance histogram generated by the luminance distribution generation circuit 1104 is expressed as G and the central gradation is expressed as H, the boundary value T is calculated by the following equation (20).
[Expression 20]
Figure 0003772133
The value “0.5” in the equation (20) is a coefficient for controlling the movement amount, and is not limited to “0.5”. For example, if “1.0” is set, the difference between the center gradation and the center of gravity of all gradations is the amount of movement.
[0132]
Next, the center-of-gravity calculation circuit 1105 sets the low luminance part from “0” gradation to the boundary value calculated by the boundary value calculation circuit 1110 as the low luminance part, and the gravity center position of the low luminance part of the luminance histogram created by the luminance distribution creation circuit 1104 The correction table creation circuit 1108 creates a luminance conversion table together with the target value stored in the target value storage circuit 1107 and the maximum and minimum values calculated by the distribution range calculation circuit 1106. The image signal correction circuit 1109 performs tone correction.
As a result, it is possible to obtain an image having a target brightness and an improved overall contrast.
[0133]
FIG. 27B shows a flowchart of gradation correction processing actually performed by such an automatic gradation correction apparatus of FIG. 24. First, in step S321, a luminance histogram of a digital image is created, and step S330 is executed. The center of gravity of all the gradations in this luminance histogram is obtained before expanding the luminance distribution. Next, in step S331, a boundary value between the low luminance portion and the high luminance portion of the luminance histogram is calculated, and in step S322, the center of gravity of the low luminance portion of the luminance histogram is obtained.
. Next, in step S323, the brightness distribution of the brightness histogram is expanded, and at the same time, the brightness distribution of the brightness histogram is corrected so that the center of gravity of the low brightness portion of the brightness histogram with the expanded brightness distribution matches the target value. Using this correction table, enlargement of the luminance histogram and correction of the luminance distribution so that the center of gravity of the low luminance portion matches the target value are performed simultaneously.
[0134]
This eliminates the need for a luminance distribution expansion unit (a conversion table dedicated to luminance distribution expansion), which is necessary when the luminance distribution is immediately expanded after creating the luminance histogram as shown in FIG. As described above, the calculation error after the decimal point can be eliminated.
[0135]
By the way, in the target value storage circuit 1107 of the third embodiment, the target value is set and stored in advance. However, similarly to the second embodiment, the target value is calculated from the target luminance distribution, and the calculated target value is stored as the target value. It can also be stored in the circuit 1107. In this case, as in the centroid calculation method of the centroid calculation circuit 1105, the low luminance part is obtained from “0” gradation to the boundary value, the centroid of the low luminance part of the target luminance distribution is obtained, and the obtained centroid position is set as the target value. do it.
[0136]
Note that the above calculation method of the boundary value is an example, and other methods may be used as long as the low luminance part can be correctly detected from the entire luminance histogram.
For example, in the boundary value calculation circuit 1110, as described in claim 2, it is also possible to divide the luminance range, obtain the centroid position as the feature amount of each region, and calculate the boundary value from the obtained centroid position.
[0137]
First, the luminance histogram created by the luminance distribution creating circuit 1104 is divided into two regions at the central gradation, and the center of gravity position is calculated in each region. Then, the midpoint of the obtained two centroids is used to calculate the movement amount.
When the luminance histogram generated by the luminance distribution generation circuit 1104 is divided into two equal parts, the centroid of the low luminance side region is expressed as G1, the centroid of the high luminance side region is expressed as G2, and the central gradation is expressed as H. (21).
[Expression 21]
Figure 0003772133
The value “1.0” in the expression (21) is a coefficient for controlling the movement amount. In the case of “1.0”, the midpoint between the two centroids is a boundary value.
[0138]
FIG. 26 shows boundary values calculated using the equations (20) and (21) for the same luminance histogram. FIG. 26A shows the boundary values calculated by equation (20), and FIG. 26B shows the values calculated by equation (21). As shown in the luminance histogram of FIG. 26, when the frequency concentrates on a limited gradation on the high luminance side and is higher than the total frequency on the low luminance side, the centroid positions of all gradation centroids are on the side where the frequency is concentrated. become. Therefore, in FIG. 26A, the boundary value is set in the mountain distribution of the low luminance part. However, in FIG. 26B, the high luminance side and the low luminance side are divided, and the “peak” on the low luminance side and the “mountain” on the high luminance side are considered separately, so that the boundary value is represented by the mountain distribution. The “valley” position can be set.
[0139]
Thus, by obtaining the boundary value that divides the luminance histogram into two, an accurate boundary value can be calculated even when the frequency of the luminance distribution is extreme.
As another boundary value calculation method, it is also possible to divide the luminance range into a large number, calculate the frequency of each region, and use a region with low frequency sandwiched between regions with high frequency as the boundary value.
[0140]
In the method of dividing the luminance histogram into two regions at the center gradation, calculating the center of gravity position in each region, and calculating the boundary value, the boundary value calculation circuit 1110 calculates the luminance range into two regions. The barycentric position of the low luminance area can also be used as the barycentric position used in the correction table creation circuit 1108.
By doing so, it is not necessary for the centroid calculation circuit 1105 to calculate the centroid position of the low luminance region up to the boundary value, and thus this centroid calculation circuit can be omitted.
[0141]
The configuration of the automatic gradation correction apparatus in this case is a block diagram shown in FIG. In FIG. 28, 1401 is an image sensor that photoelectrically converts a captured image, 1402 is an A / D converter that receives an analog image signal from the image sensor 1401, and 1403 is a digital image signal that is input from an A / D converter 1402. The luminance signal calculation circuit 1404 is a luminance distribution generation circuit to which the luminance signal is input from the luminance signal calculation circuit 1403, and 1410 is a target luminance distribution that stores a target luminance distribution that is a target for gradation correction. A storage circuit, 1409 is a boundary value calculation circuit to which the luminance distribution from the luminance distribution generation circuit 1404 is input, 1406 is a distribution range calculation circuit to which the luminance distribution from the luminance distribution generation circuit 1404 is input, and 1405 is a boundary value calculation circuit 1409. Target value calculation to which the boundary value from the target value and the target luminance distribution from the target luminance distribution storage circuit 1410 are input A circuit 1407 generates a correction table for tone correction based on the target value from the target value calculation circuit 1405, the maximum and minimum values of the distribution range from the distribution range calculation circuit 1406, and the barycentric position from the boundary value calculation circuit 1409. A correction table generation circuit 1408 is generated, and an image signal correction circuit 1408 performs gradation correction on the digital image signal output from the A / D converter 1402 based on the correction table generated by the correction table generation circuit 1407.
[0142]
Next, the operation will be described. The basic operation is the same as that of the above-described devices of claim 4 and claim 1, but the boundary value calculation circuit 1409 calculates the boundary value and the barycentric position of the low luminance part. Then, the target value calculation circuit 1405 calculates a target value from the target luminance distribution stored in the target luminance distribution storage circuit 1410 and the boundary value calculated by the boundary value calculation circuit 1409, and the correction table creation circuit 1407 calculates the distribution. A correction table is created based on the maximum value and minimum value obtained by the range calculation circuit 1406, the target value calculated by the target value calculation circuit 1405, and the barycentric position of the low luminance part obtained by the boundary value calculation circuit 1409.
[0143]
Further, in the correction table creation circuit in the automatic gradation correction apparatus according to claim 1 or 2, the luminance distribution is enlarged only on the low luminance side, and the center of gravity of the low luminance portion of the luminance histogram matches the target value. By creating a conversion table in which the luminance distribution on the high luminance side is expanded in the correction processing as described above, the gradation of the high luminance portion due to the gradation correction may be prevented from being crushed ( Corresponding to claim 11).
[0144]
In this case, since the maximum value of the luminance distribution is not required, the distribution range calculation circuit may calculate only the minimum value. By doing so, the amount of calculation can be reduced.
Further, as described in the first embodiment, the modifications described in claims 15 to 20 may be added.
That is, the luminance distribution creation circuit 104 may be limited in the integrated amount of the luminance distribution (corresponding to claim 15). In this way, by limiting the luminance histogram in advance, for example, when the background is overexposed in a backlight image or the like and the luminance level is concentrated at 255, the luminance distribution is concentrated on a certain gradation. Even when there is such an extreme bias, the correction amount can be calculated accurately.
[0145]
Also, when a skin tone area is extracted from the color difference signal and the brightness signal and a brightness histogram is created, the brightness distribution of the skin color area of the image is weighted to the brightness distribution of the entire image according to the skin color area to create a brightness histogram. (Corresponding to claim 16). In this way, gradation correction can be performed so that the skin color region is optimized by weighting.
Further, in the luminance distribution of the skin color region, the number of distributions of the high luminance portion may be weighted (corresponding to claim 17). For example, the high luminance part is weighted by multiplying the luminance distribution of the skin color region by a coefficient as shown in FIG.
[0146]
Further, the center of gravity position of the high brightness part may be calculated from the brightness histogram, and the correction amount of the high brightness part may be calculated according to the center of gravity position of the high brightness part (corresponding to claim 18).
Further, when the luminance distribution created by the luminance distribution creating circuit is discrete, correction may not be performed (corresponding to claim 19). This is because it can be determined that the image is an artificial image, and in the case of an artificial image, it is generally better not to perform tone correction.
Further, when the digital image signal is separated into a luminance signal and a color difference signal and gradation correction is performed on the luminance signal, the color difference signal of the image may be corrected according to the correction table. Corresponding to). Thereby, when the R, B, and G signals are generated from the luminance signal and the color difference signal that have been subjected to gradation correction, it is possible to alleviate the phenomenon that the saturation appears to have decreased due to the luminance correction.
[0147]
As described above, according to the third embodiment, the luminance histogram of the digital image is created, the centroids in all the gradations are calculated, and the boundary value between the low luminance part and the high luminance part is calculated based on this. A correction table that calculates the center of gravity of the low-brightness part, expands the brightness distribution of the brightness histogram, and simultaneously corrects the brightness histogram so that the center of gravity of the low-brightness part of the brightness histogram after the distribution expansion matches the target value Since it was created and corrected, the low-brightness part and the high-brightness part can be correctly divided according to the center of gravity of the entire brightness histogram, and the brightness histogram created from the digital image signal can be created by creating only one conversion table. The center of gravity of the low-brightness part is corrected so that it matches the brightness correction target value, and the low-brightness area in the backlight state becomes the target brightness value for the backlight image. Bright corrected, it is possible to obtain an image overall contrast is improved to. Similarly, an automatic gradation correction apparatus that can correct the luminance value of the low luminance region so as to match the target value and obtain an image having an improved overall contrast can be obtained in the case of the follow light image.
[0148]
In the above description, the automatic gradation correction that simultaneously performs the gradation correction processing for correcting the luminance distribution so that the center of gravity of the low-luminance portion matches the target value mainly by using the correction table. Although the apparatus has been described, it may be realized as an automatic gradation correction method for performing processing corresponding to this automatic gradation correction apparatus. Further, an automatic gradation correction method corresponding to the flowchart of FIG. 27A showing the correction principle, an automatic gradation correction apparatus corresponding to this automatic gradation correction method, and further, this automatic gradation correction method is applied to a computer. The automatic gradation correction program to be executed may be realized as an automatic gradation correction program recording medium for recording on various recording media. The automatic gradation correction described above is performed except that the luminance distribution cannot be expanded and gradation correction processing cannot be performed simultaneously. The same effect as the device is achieved.
[0149]
(Embodiment 4)
In the following, the invention described in claim 3, claim 23, and claim 42 (further, claims 7, 8, 11, 12, 13, 13, and 14). 15, claim 16, claim 17, claim 18, claim 19, claim 27, claim 27, claim 28, claim 31, 32, claim 33, claim 34, claim 35, Claim 36, Claim 37, Claim 38, Claim 39, Claim 40, Claim 45, Claim 46, Claim 47, Claim 48, Claim 49, Claim 50, Claim 51, Claim Embodiment 4 corresponding to the invention described in FIG. 52 will be described with reference to the drawings.
In the fourth embodiment, the boundary between the low luminance portion and the high luminance portion can be detected based on the shape of the luminance histogram.
[0150]
The configuration of the automatic gradation correction apparatus according to the fourth embodiment is a block diagram shown in FIG.
In FIG. 29, 1501 is an image sensor that photoelectrically converts a captured image, 1502 is an A / D converter that receives an analog image signal from the image sensor 1501, and 1503 is a digital image signal that is input from an A / D converter 1502. 1504, a luminance distribution creation circuit (luminance histogram creation unit) to which the luminance signal from the luminance signal calculation circuit 1503 is inputted, and 1512 a mountain distribution to which the luminance distribution from the luminance distribution creation circuit 1504 is inputted. A detection circuit (mountain distribution detection unit) 1511 is a boundary value calculation circuit (boundary value calculation unit) to which the range of the mountain distribution from the mountain distribution detection circuit 1512 and the luminance distribution from the luminance distribution creation circuit 1504 are input; In 1506, the luminance distribution from the luminance distribution generation circuit 1504 and the boundary value from the boundary value calculation circuit 1511 are input. A heart calculation circuit (center of gravity calculation unit), 1507 is a distribution range calculation circuit to which the luminance distribution from the luminance distribution creation circuit 1504 is input, and 1505 stores a target luminance distribution which is a target for performing gradation correction. A target luminance distribution storage circuit 1508 is a target value calculation circuit to which the target luminance distribution from the target luminance distribution storage circuit 1505 and a boundary value from the boundary value calculation circuit 1511 are input, and 1509 is a centroid and distribution range from the centroid calculation circuit 1506 A correction table creation circuit for creating a correction table for gradation correction based on the maximum value and minimum value of the distribution range from the calculation circuit 1507 and the target value from the target value calculation circuit 1508, 1510 is created by the correction table creation circuit 1509. Based on the corrected correction table, an image for performing gradation correction on the digital image signal output from the A / D converter 1502 A signal correction circuit. Note that the correction table creation circuit 1509 and the image signal correction circuit 1510 together constitute a gradation correction processing unit. However, when the gradation correction processing unit does not include the luminance histogram distribution expansion function, both the correction table creation circuit 1509 and the image signal correction circuit 1510 constitute both the luminance distribution expansion unit and the gradation correction processing unit. .
[0151]
FIG. 33A is a flowchart showing the principle of the gradation correction process.
That is, in step S401, a luminance histogram of the digital image is created, and in step S402, the luminance histogram is enlarged. Next, in step S410, a mountain-shaped distribution range in the luminance histogram is detected, and in step S411, a boundary value between the low-luminance portion and the high-luminance portion is calculated based on this mountain-shaped distribution range. In step S403, the center of gravity of the low luminance part of the luminance histogram is obtained, and in step S404, the luminance histogram is corrected so that the center of gravity of the low luminance part matches the target value.
[0152]
Next, the operation will be described. The basic operation is the same as in Embodiments 2 and 3 described above, but the boundary value calculation unit in the boundary value calculation circuit 1511 is different, and the peak of the histogram detected by the peak distribution detection circuit 1512 is different. The difference is that the boundary value is calculated using the range of the type distribution. The processing contents will be described below with reference to FIGS. 30, 31, 32, and 33. FIG.
In the luminance distribution created by the luminance distribution creating circuit 1504, the mountain-shaped distribution detecting circuit 1512 stores a range of a mountain-shaped distribution that is first discovered by scanning in the high luminance direction from the lowest luminance level. This range is set as range A. Similarly, the range of the “mountain” that is first detected is scanned from the highest luminance level in the low luminance direction. This range is set as range B.
Next, the boundary value calculation circuit 1511 calculates the centroid position of the range A and the centroid position of the range B of the luminance histogram, and obtains the midpoint of these two points as the boundary value between the low luminance portion and the high luminance portion.
[0153]
In FIG. 30, a luminance histogram is generated by the luminance distribution generation circuit 1504 in the backlight image and the direct light image, the range of the mountain distribution is detected by the mountain distribution detection circuit 1512, and the boundary value is obtained by the boundary value calculation circuit 1511. This is an example.
FIG. 30A is a luminance histogram of an image in a backlight state. In this state, peaks are generated on the low gradation side and the high luminance side, the peak range A is on the low luminance side, and the peak range B is on the high luminance side. Is detected, and the boundary value is the “valley” position of the two mountain distributions. On the other hand, in the image in the normal light state of FIG. 30B, since there is only one peak of the mountain distribution, the range A and the range B are the same range, and the boundary value between the low luminance part and the high luminance part. Is the same position as the center of gravity of the range A and the range B.
[0154]
Next, from the “0” gradation to the boundary value calculated by the boundary value calculation circuit 1511 is set as the low luminance part, and the target value calculation circuit 1508 and the centroid calculation circuit 1506 respectively set the target value in the same manner as in the second embodiment. The barycentric position is calculated, a correction table is generated by the correction table generation circuit 1509, and correction is performed by the image signal correction circuit 1510.
[0155]
FIG. 33B shows a flowchart of gradation correction processing actually performed by the automatic gradation correction apparatus of FIG. 29. First, in step S421, a luminance histogram of the digital image is created, and step S430 is performed. The range of the peak distribution of the luminance histogram is detected before expanding the luminance distribution. Next, in step S431, a boundary value between the low luminance portion and the high luminance portion of the luminance histogram is calculated before the luminance distribution is expanded, and in step S422, the gravity center of the low luminance portion of the luminance histogram is calculated as the luminance distribution. Ask before expanding. Next, in step S423, the luminance distribution of the luminance histogram is enlarged, and at the same time, the luminance distribution of the luminance histogram is corrected so that the center of gravity of the low luminance portion of the luminance histogram having the enlarged luminance distribution matches the target value. Using this correction table, enlargement of the luminance histogram and correction of the luminance distribution so that the center of gravity of the low luminance portion matches the target value are performed simultaneously.
This eliminates the need for a luminance distribution expansion unit (a conversion table dedicated to luminance distribution expansion) that is required when the luminance distribution is immediately expanded after the luminance histogram is created as shown in FIG. As described above, the calculation error after the decimal point can be eliminated.
[0156]
FIG. 31 shows a correction process for the backlight image of FIG. 30A, and FIG. 32 shows a correction process for the backlight image of FIG. FIGS. 31 and 32A are target value calculation processes in the target value calculation circuit 1508, FIGS. 31 and 32B are centroid calculation processes in the centroid calculation circuit 1506, and FIGS. ) Is a correction process in the image signal correction circuit 1510. However, it is assumed that the target luminance distribution storage circuit 1505 stores a luminance distribution having a normal distribution shape.
[0157]
In FIG. 31, since the peak on the low luminance side moves to the high luminance side and the distribution is expanded, it can be seen that the low luminance part is corrected brightly and the contrast is improved. However, in FIG. 32, since there is not much difference between the center of gravity position and the target value, the peak of the luminance histogram has hardly moved. Therefore, it can be seen that the contrast is improved, but the brightness is hardly changed.
[0158]
As described above, in the fourth embodiment, the backlight image and the direct light image are not divided, and in the backlight image, the low brightness region in the backlight state is corrected to be the target brightness value and the contrast is improved. An image with improved contrast can be obtained with almost no change in brightness in a follow-up image.
Therefore, if the automatic tone correction device of the fourth embodiment is used, correcting the image of a person wearing black clothes will cause the clothes to become gray. It can be solved without doing it.
In the above processing, the target luminance distribution is a luminance distribution having a normal distribution shape, but the present invention is not limited to this. For example, the same effect can be obtained in the target luminance distribution as shown in FIG.
[0159]
Further, as described in claim 7, the boundary value calculation circuit 1511 generates the boundary value calculated from the range of the mountain distribution detected by the mountain distribution detection circuit 1512 by the luminance distribution generation circuit 1504. By adjusting using the luminance histogram, the boundary value can be obtained more accurately in the backlight image.
The boundary value calculation circuit 1511 calculates the centroid positions of the two mountain distribution ranges detected by the mountain distribution detection circuit 1512, respectively, and uses the luminance histogram frequencies between the two centroid positions and the two points to determine the boundary value. Ask.
[0160]
By the way, in the boundary value calculation method by the boundary value calculation circuit 1511 so far, only the range of the mountain distribution first detected by the mountain distribution detection circuit 1512 is detected, so that three or more mountain distributions can be generated. In the luminance histogram, the boundary value may not be the valley position of the mountain distribution.
[0161]
FIG. 34 shows boundary values when there are three peak distributions of the luminance histogram. In this case, it can be seen that the boundary value is set in a mountain distribution in the middle.
Therefore, for example, the gravity center position of the luminance histogram between the two gravity centers g1 and g2 is represented as G, and the boundary value T is calculated by the following equation (22).
[Expression 22]
Figure 0003772133
In the equation (22), since the center of gravity position G always exists between g1 and g2, the boundary value is always calculated between g1 and g2. Therefore, in a follow-up image in which the distance between the two centroids is narrow, the boundary value does not change from when the boundary value is the midpoint of the two centroids, but in the case of a backlight image in which the distance between the two centroids is wide, The boundary value changes according to the position.
[0162]
FIG. 35 shows the boundary value obtained in the luminance histogram of FIG. 34 using equation (22). Since the boundary value is adjusted according to the barycentric position of the luminance distribution, the boundary value is the valley position of the mountain distribution.
As described above, the boundary value can be obtained more accurately by using the two gravity center positions and the frequency of the luminance histogram between the two points.
Further, as described in claim 8, it is possible to limit the range of the mountain distribution of the mountain distribution detection circuit 1512.
[0163]
This is shown in FIG. In FIG. 36, there is a limit on scanning from “255” to “0” direction. Therefore, the scan from “255” to the “0” direction is stopped in the middle even though the mountain distribution continues, and the detection range is more than the range detected by the scan from “0” to “255” direction. It is narrower. As a result, the position of the center of gravity of the range in which the restriction is provided increases and the boundary value also increases. Therefore, the target value also depends on the high luminance side.
Thereby, also in the gradation correction apparatus of Embodiment 4, it is possible to increase the luminance even in the following light condition by providing a limitation on the mountain-shaped distribution search.
[0164]
Further, in the correction table creation circuit in the automatic gradation correction device according to claim 3, claim 7 and claim 8, the luminance distribution is enlarged only on the low luminance side, and the center of gravity of the low luminance portion of the luminance histogram is obtained. By creating a conversion table that expands the brightness distribution on the high-brightness side in the process of correcting to match the target value, it prevents the gradation of the high-brightness part from being crushed by gradation correction (Corresponding to claim 11).
[0165]
In this case, since the maximum value of the luminance distribution is not required, the distribution range calculation circuit may calculate only the minimum value. Thereby, the amount of calculation can be reduced.
Further, as described in the first embodiment, the modifications described in claims 15 to 20 may be added.
[0166]
That is, the luminance distribution creation circuit 104 may be limited in the integrated amount of the luminance distribution (corresponding to claim 15). In this way, by limiting the luminance histogram in advance, for example, when the background is overexposed in a backlight image or the like and the luminance level is concentrated at 255, the luminance distribution is concentrated on a certain gradation. Even when there is such an extreme bias, the correction amount can be calculated accurately.
[0167]
Also, when a skin tone area is extracted from the color difference signal and the brightness signal and a brightness histogram is created, the brightness distribution of the skin color area of the image is weighted to the brightness distribution of the entire image according to the skin color area to create a brightness histogram. (Corresponding to claim 16). In this way, gradation correction can be performed so that the skin color region is optimized by weighting.
[0168]
Further, in the luminance distribution of the skin color region, the number of distributions of the high luminance portion may be weighted (corresponding to claim 17). For example, the high luminance part is weighted by multiplying the luminance distribution of the skin color region by a coefficient as shown in FIG.
Further, the center of gravity position of the high brightness part may be calculated from the brightness histogram, and the correction amount of the high brightness part may be calculated according to the center of gravity position of the high brightness part (corresponding to claim 18).
[0169]
Further, when the luminance distribution created by the luminance distribution creating circuit is discrete, correction may not be performed (corresponding to claim 19). This is because it can be determined that the image is an artificial image, and in the case of an artificial image, it is generally better not to perform tone correction.
Further, when the digital image signal is separated into a luminance signal and a color difference signal and gradation correction is performed on the luminance signal, the color difference signal of the image may be corrected according to the correction table. Corresponding to). Thereby, when the R, B, and G signals are generated from the luminance signal and the color difference signal that have been subjected to gradation correction, it is possible to alleviate the phenomenon that the saturation appears to have decreased due to the luminance correction.
[0170]
As described above, according to the fourth embodiment, the luminance histogram of the digital image is created, the range of the peak distribution of the luminance histogram is detected, and based on this, the low luminance portion and the high luminance portion of the luminance histogram are detected. Detecting the boundary value, obtaining the center of gravity of the low luminance part of the luminance histogram, creating a correction table for correcting the luminance histogram so that the center of gravity of the low luminance part coincides with the target value at the same time as expanding the luminance distribution of the luminance histogram, Since the correction is performed, the low-brightness part and the high-brightness part can be correctly divided according to the shape of the brightness histogram, and the brightness distribution of the brightness histogram created from the digital image signal can be obtained only by creating one conversion table. At the same time that the image is enlarged, correction is performed so that the center of gravity of the low-luminance part matches the luminance correction target value, and the backlight image is not divided into the backlight image and the follow light image. Can brighten the low-brightness area in the backlit state to the target brightness value and obtain an image with improved contrast. For a follow-up image, obtain an image with improved contrast with almost no change in brightness. An automatic gradation correction device that can be obtained is obtained.
[0171]
In the above description, the automatic gradation correction that simultaneously performs the gradation correction processing for correcting the luminance distribution so that the center of gravity of the low-luminance portion matches the target value mainly by using the correction table. Although the apparatus has been described, it may be realized as an automatic gradation correction method for performing processing corresponding to this automatic gradation correction apparatus. Further, an automatic gradation correction method corresponding to the flowchart of FIG. 33A showing the correction principle, an automatic gradation correction apparatus corresponding to this automatic gradation correction method, and further, this automatic gradation correction method is applied to a computer. The automatic gradation correction program to be executed may be realized as an automatic gradation correction program recording medium for recording on various recording media. The automatic gradation correction described above is performed except that the luminance distribution cannot be expanded and gradation correction processing cannot be performed simultaneously. The same effect as the device is achieved.
[0172]
(Embodiment 5)
In the following, the invention described in claim 9, claim 38, and claim 44 (further, claims 10, 11, 12, 13, 14, 15, and 15). 16, claim 17, claim 18, claim 19, claim 20, claim 30, claim 31, claim 32, claim 33, claim 34, claim 35, claim 36, claim 37, Claim 38, Claim 39, Claim 40, Claim 45, Claim 46, Claim 47, Claim 48, Claim 49, Claim 50, Claim 51, Claim 52) A corresponding fifth embodiment will be described with reference to the drawings.
In the fifth embodiment, the target value is corrected.
[0173]
FIG. 37 is a block diagram showing the configuration of the automatic gradation correction apparatus according to the fifth embodiment.
In FIG. 37, 2201 is an image sensor that photoelectrically converts a captured image, 2202 is an A / D converter that receives an analog image signal from the image sensor 2201, and 2203 is a digital image signal that is input from an A / D converter 2202. Luminance signal calculation circuit 2204 is a luminance distribution creation circuit (luminance histogram creation unit) to which the luminance signal from the luminance signal calculation circuit 2203 is input, and 2212 is a mountain distribution to which the luminance distribution from the luminance distribution generation circuit 2204 is input. A detection circuit 2211 is a boundary value calculation circuit to which the range of the mountain distribution from the mountain distribution detection circuit 2212 and the luminance distribution from the luminance distribution generation circuit 2204 are input. 2206 is a luminance distribution and boundary from the luminance distribution generation circuit 2204. Centroid calculation circuit (centroid calculation unit) 220 to which the boundary value from the value calculation circuit 2211 is input Is a distribution range calculation circuit to which the luminance distribution is input from the luminance distribution creation circuit 2204, 2205 is a target luminance distribution storage circuit that stores a target luminance distribution that is a target for gradation distribution, and 2208 is a target luminance A target luminance distribution from the distribution storage circuit 2205 and a target value calculation circuit to which the boundary value from the boundary value calculation circuit 2211 is input. A reference numeral 2213 is a center of gravity from the centroid calculation circuit 2206 and a target value from the target value calculation circuit 2208. A target value correction circuit (target value correction unit) 2209, the center of gravity from the center of gravity calculation circuit 2206, the maximum and minimum values of the distribution range from the distribution range calculation circuit 2207, and the target corrected by the target value correction circuit 2213. A correction table creation circuit for creating a correction table for gradation correction based on the value, 2210 is a correction table creation circuit 2209 An image signal correcting circuit for performing gradation correction on the digital image signal A / D converter 2202 is outputted based on the correction table created. Note that the correction table creation circuit 2209 and the image signal correction circuit 2210 together constitute a gradation correction processing unit. However, if the gradation correction processing unit does not include the luminance histogram distribution expansion function, both the correction table creation circuit 2209 and the image signal correction circuit 2210 constitute both the luminance distribution expansion unit and the gradation correction processing unit. .
[0174]
FIG. 39A is a flowchart showing the principle of the gradation correction process.
That is, in step S501, a luminance histogram of the digital image is created, and in step S502, the luminance histogram is enlarged. Next, in step S503, the center of gravity of the low luminance part of the enlarged luminance histogram is obtained, and in step S510, it is determined whether or not the target value is smaller than the gravity center position of the low luminance part of the luminance histogram before enlargement.
If it is smaller, the target value is corrected in step S511, otherwise step S511 is skipped. In step S504, the brightness histogram is corrected so that the center of gravity of the low brightness portion matches the target value.
[0175]
Next, the operation will be described. The basic operation is the same as that of the fourth embodiment described above, but the method of setting the target value is different, and the target value obtained by the target value calculation circuit 2208 is corrected by the target value correction circuit 2213. ing.
The target value calculation circuit 2208 calculates the target value using the luminance histogram stored in the target luminance distribution storage circuit 2205 as in the fourth embodiment.
Next, the target value correction circuit 2213 corrects the center of gravity position to be a new target value when the target value is smaller than the center of gravity position obtained by the center of gravity calculation circuit 2206.
[0176]
FIG. 39B shows a flowchart of gradation correction processing actually performed by such an automatic gradation correction apparatus of FIG. 37. First, in step S521, a luminance histogram of a digital image is created, and step S522 is executed. The center of gravity of the low luminance portion of the luminance histogram is obtained before expanding the luminance distribution. Next, in step S530, it is determined whether or not the target value is smaller than the gravity center position of the low luminance part of the luminance histogram. If the target value is smaller than the barycentric position of the low luminance part of the luminance histogram, the target value is corrected in step S531, otherwise step S531 is skipped. Next, in step S523, the luminance histogram is expanded, the luminance distribution of the luminance histogram is expanded, and at the same time, the luminance distribution of the luminance histogram is set so that the center of gravity of the low luminance portion of the luminance histogram expanded is coincident with the target value. A correction table for correcting the brightness is created, and using this correction table, the brightness histogram is enlarged and the brightness distribution is corrected so that the center of gravity of the low brightness portion matches the target value.
[0177]
This eliminates the need for a luminance distribution expansion unit (a conversion table dedicated to luminance distribution expansion), which is necessary for immediately expanding the luminance distribution after creating the luminance histogram as shown in FIG. As described above, the calculation error after the decimal point can be eliminated.
[0178]
FIG. 38 shows an automatic gradation correction apparatus according to the fourth embodiment that does not include a target value correction circuit and an automatic gradation correction apparatus according to the fifth embodiment that includes a target value correction circuit. It shows an example of the center of gravity position, target value, and luminance histogram when it is performed. In FIG. 38, (a) is the center of gravity position and target value, (b) is the result of correction by the automatic gradation correction apparatus of the fourth embodiment, and (c) is by the automatic gradation correction apparatus of the fifth embodiment. This is the result of correction.
In FIG. 38A, since the peak position of the target luminance distribution is on the lower luminance side than the peak position of the luminance histogram distribution, the target value is on the lower luminance side than the gravity center position. Therefore, in FIG. 38B, since the correction is performed so that the center of gravity position matches the target value smaller than the center of gravity position, the contrast is improved, but the image is corrected to be dark. However, in FIG. 38C, since the target value is corrected to the position of the center of gravity, the contrast is improved while maintaining the original brightness.
[0179]
Thus, when it is not desired to correct the image to be darker than the input image in a landscape photograph or the like, the target value correction circuit 2213 corrects the input so that the center of gravity position becomes the target value when the target value is smaller than the center of gravity position. It is possible to prevent the image from being corrected darker than the image.
In the target value correction circuit 2213, when the target value is larger than the centroid position, the target value can be corrected to be the centroid position. In this case, it is possible to prevent correction to be brighter than the input image.
Further, in the target value correcting circuit 2213, as described in claim 10, the target value is not corrected to the center of gravity position, but the target value is “higher” or “lower” than the center of gravity position. It can also be corrected. By doing so, it is possible to finely adjust the corrected brightness based on the brightness of the input image.
[0180]
Furthermore, in the correction table creation circuit in the automatic gradation correction device according to claim 9 and claim 10, the luminance distribution is enlarged only on the low luminance side, and the center of gravity of the low luminance portion of the luminance histogram matches the target value. By creating a conversion table in which the luminance distribution on the high luminance side is expanded in the correction process so that the correction is performed, it is possible to prevent the gradation of the high luminance portion from being crushed due to the gradation correction (claim). Corresponding to item 11).
[0181]
Further, as described in the first embodiment, the modifications described in claims 15 to 20 may be added.
That is, the luminance distribution creation circuit 104 may be limited in the integrated amount of the luminance distribution (corresponding to claim 15). In this way, by limiting the luminance histogram in advance, for example, when the background is overexposed in a backlight image or the like and the luminance level is concentrated at 255, the luminance distribution is concentrated on a certain gradation. Even when there is such an extreme bias, the correction amount can be calculated accurately.
[0182]
Also, when a skin tone area is extracted from the color difference signal and the brightness signal and a brightness histogram is created, the brightness distribution of the skin color area of the image is weighted to the brightness distribution of the entire image according to the skin color area to create a brightness histogram. (Corresponding to claim 16). In this way, gradation correction can be performed so that the skin color region is optimized by weighting.
Further, in the luminance distribution of the skin color region, the number of distributions of the high luminance portion may be weighted (corresponding to claim 17). For example, the high luminance part is weighted by multiplying the luminance distribution of the skin color region by a coefficient as shown in FIG.
[0183]
Further, the center of gravity position of the high brightness part may be calculated from the brightness histogram, and the correction amount of the high brightness part may be calculated according to the center of gravity position of the high brightness part (corresponding to claim 18).
Further, when the luminance distribution created by the luminance distribution creating circuit is discrete, correction may not be performed (corresponding to claim 19). This is because it can be determined that the image is an artificial image, and in the case of an artificial image, it is generally better not to perform tone correction.
Further, when the digital image signal is separated into a luminance signal and a color difference signal and gradation correction is performed on the luminance signal, the color difference signal of the image may be corrected according to the correction table. Corresponding to). Thereby, when the R, B, and G signals are generated from the luminance signal and the color difference signal that have been subjected to gradation correction, it is possible to alleviate the phenomenon that the saturation appears to have decreased due to the luminance correction.
[0184]
As described above, according to the fifth embodiment, the luminance histogram of the digital image is created, the range of the mountain distribution of the luminance histogram is detected, and based on this, the low luminance portion and the high luminance portion of the luminance histogram are detected. Calculate the boundary value, find the center of gravity of the low-brightness part of the luminance histogram, and if the target value is smaller than the barycentric position of the low-brightness part, correct the target value so that it becomes a new target value, Since a correction table was created to correct the luminance histogram so that the center of gravity of the low luminance part coincides with the target value at the same time as enlargement, and correction was performed, the low luminance part and the high luminance part are changed according to the shape of the luminance histogram. Can be divided correctly, and by correcting the target value, it is possible to prevent unwanted corrections to the luminance histogram, and to create a single conversion table, The brightness distribution of the created brightness histogram is expanded, and at the same time, correction is performed so that the center of gravity of the low brightness portion matches the brightness correction target value. An image with improved contrast and an improved contrast can be obtained so that the low-luminance region of the image becomes the target luminance value, and an image with improved contrast can be obtained with little change in brightness in a follow-up image. An automatic tone correction device is obtained.
[0185]
In the above description, the automatic gradation correction that simultaneously performs the gradation correction processing for correcting the luminance distribution so that the center of gravity of the low-luminance portion matches the target value mainly by using the correction table. Although the apparatus has been described, it may be realized as an automatic gradation correction method for performing processing corresponding to this automatic gradation correction apparatus. Further, an automatic gradation correction method corresponding to the flowchart of FIG. 39A showing the correction principle, an automatic gradation correction apparatus corresponding to the automatic gradation correction method, and further, this automatic gradation correction method is applied to a computer. The automatic gradation correction program to be executed may be realized as an automatic gradation correction program recording medium for recording on various recording media. The automatic gradation correction described above is performed except that the luminance distribution cannot be expanded and gradation correction processing cannot be performed simultaneously. The same effect as the device is achieved.
Further, in the fifth embodiment, the target value correcting unit is provided to correct the target value. However, even if this target value correcting unit is provided in the first to fourth embodiments, the same effect can be obtained. It is not limited only to the fifth embodiment.
[0186]
【The invention's effect】
As described above, according to the automatic gradation correction device of the first aspect of the present invention, since the boundary value between the low luminance region and the high luminance region is made variable, the backlight image is correctly included in the backlight image. There is an effect that the low luminance part can be calculated, and the backlight value can be more accurately corrected to the target luminance value.
[0187]
According to the automatic tone correction device of the second aspect of the present invention, since the luminance range is divided and the boundary value is calculated from the feature amount of each area, the high luminance side and the low luminance side are accurately calculated. It is possible to calculate a boundary value that divides.
[0188]
According to the automatic tone correction device of the third aspect of the present invention, the input image is backlit by detecting the peak distribution of the luminance histogram and calculating the boundary value using the detected peak distribution range. In this case, the image is corrected to the target brightness and an image with improved overall contrast is obtained, so that in the case of direct light, an image with improved contrast can be obtained without changing the original brightness. There is.
[0189]
According to the automatic gradation correcting device of the fourth aspect of the present invention, the center of gravity of the low luminance part of the target luminance distribution is obtained as the luminance correction target value, and the luminance distribution is expanded and the center of gravity of the low luminance part of the luminance histogram is obtained. Since the position is corrected so that it matches the brightness correction target value, the target brightness distribution of the same shape is used for the follow-up image and the backlight image, and it has the target brightness and the overall contrast is improved. There is an effect that an obtained image can be obtained.
[0190]
According to the automatic gradation correction device of the fifth aspect of the present invention, the target luminance distribution is given by a curve and stored, so that the target luminance distribution can be easily set and the storage capacity There is an effect that can be reduced.
[0191]
Further, according to the automatic gradation correction device of the sixth aspect of the present invention, since a plurality of target luminance distributions are set and stored, there is an effect that the luminance correction target value can be easily adjusted. .
[0192]
According to the automatic tone correction device of the seventh aspect of the present invention, the boundary value calculated from the range of the mountain distribution is adjusted using the luminance histogram, so that a more accurate boundary value is calculated. There is an effect that can.
[0193]
According to the automatic tone correction device of the eighth aspect of the present invention, since the range of the mountain distribution is limited, there is an effect that the brightness of the image can be corrected even in the following light image. .
[0194]
According to the automatic gradation correction device of claim 9 of the present invention, when the luminance correction target value is smaller than the barycentric position of the low luminance part of the luminance histogram, the luminance correction target value is set to the barycentric part of the low luminance part of the luminance histogram. Since the correction is made so as to match the position, it is possible to prevent the correction from being darker than the input image.
[0195]
According to the automatic gradation correction device of the tenth aspect of the present invention, the brightness correction target value is corrected so as to be near the gravity center position of the low brightness part of the brightness histogram. There is an effect that the brightness after correction can be finely adjusted based on the above.
[0196]
According to an automatic gradation correction device according to claim 11 of the present invention, in the automatic gradation correction device according to any one of claims 1, 2, and 3, the distribution of the high luminance histogram is only in the low luminance direction. The automatic gradation correction device according to any one of claims 4 to 8, and 10, wherein the correction is performed so that the center of gravity of the luminance histogram coincides with the luminance correction target value simultaneously with the enlargement. There is an effect that correction can be performed without causing the high luminance portion to be crushed.
[0197]
According to an automatic gradation correction device of a twelfth aspect of the present invention, in the automatic gradation correction device according to any one of the first, second, and third aspects, the gradation correction processing unit performs γ correction. Since the gradation correction process is performed by executing this, there is an effect that the center of gravity of the low luminance portion of the luminance histogram and the target value can be matched with one conversion table.
[0198]
According to an automatic gradation correction device of a thirteenth aspect of the present invention, in the automatic gradation correction device according to any one of the first, second, and third aspects, the gradation correction processing unit includes the luminance histogram. Correction processing that simultaneously performs both of the luminance distribution expansion processing and the processing for matching the center of gravity of the low luminance portion of the luminance histogram with the luminance distribution expanded to the luminance correction target value. Since the correction table is created, it is possible to match the center of gravity of the low brightness portion of the brightness histogram with the target value by creating the conversion table once.
[0199]
According to an automatic gradation correction device of a fourteenth aspect of the present invention, in the automatic gradation correction device according to any one of the first, second, and third aspects, the luminance histogram created by the luminance histogram creation unit. A luminance distribution expansion unit that expands the luminance distribution of the luminance histogram, and the centroid calculation unit performs the calculation of the centroid on the low luminance part of the luminance histogram in which the luminance distribution is expanded. There is an effect that automatic gradation correction can be performed by performing processing for making the center of gravity of the low luminance portion coincide with the target value after expanding the luminance distribution of the histogram.
[0200]
Further, according to the automatic gradation correction device according to claim 15 of the present invention, in the automatic gradation correction device according to any one of claims 1, 2, and 3, the luminance histogram is generated when the luminance histogram is created. Since the integrated amount of the distribution number is limited, there is an effect that the correction amount can be accurately calculated even when the gradation distribution of the luminance histogram is concentrated on a certain part.
[0201]
According to the automatic gradation correction device according to claim 16 of the present invention, in the automatic gradation correction device according to any one of claims 1, 2, and 3, the skin color region is obtained from the color difference signal and the luminance signal. When the luminance histogram is extracted and the luminance histogram is created, a luminance histogram obtained by weighting the luminance distribution of the flesh color portion of the image to the luminance distribution of the entire image according to the area of the flesh color region is obtained. Since the luminance histogram is weighted according to the area of the skin color region, there is an effect that, when there is a person, gradation correction can be performed so that the brightness of the skin color is optimized according to the area.
[0202]
Further, according to the automatic gradation correction device according to claim 17 of the present invention, in the automatic gradation correction device according to claims 1, 2, and 3, the luminance distribution of the skin color portion of the image is changed to the luminance distribution of the entire image. When weighting according to the area of the skin color area, the distribution of the high brightness part is weighted by weighting the distribution of the high brightness part of the skin color part. There is an effect that it can be suppressed.
[0203]
According to the automatic gradation correction device according to claim 18 of the present invention, in the automatic gradation correction device according to any one of claims 1, 2, and 3, the luminance calculated by the luminance histogram creation unit. By calculating the barycentric position of the high luminance part from the histogram and calculating the gradation correction amount of the high luminance part according to the barycentric position of the high luminance part, the gradation correction amount is limited by the barycentric position of the high luminance part Therefore, there is an effect that it is possible to suppress whiteout in the high luminance part.
[0204]
According to the automatic gradation correction device described in claim 19 of the present invention, in the automatic gradation correction device according to any one of claims 1, 2 and 3, in the gradation correction processing, a luminance distribution is obtained. Since gradation correction is not performed in a discrete case, there is an effect that gradation correction is not performed on an image that originally does not require gradation correction.
[0205]
According to the automatic gradation correction device of the twentieth aspect of the present invention, in the automatic gradation correction device according to any one of the first, second, and third aspects, the color difference signal of the image is output according to the correction table. Since the correction is made, it is possible to alleviate a phenomenon in which the saturation appears to be lowered by correcting the luminance.
[0206]
According to the automatic gradation correction method of claim 21 of the present invention, since the boundary value between the low luminance region and the high luminance region is made variable, the low luminance portion that correctly includes the backlight region in the backlight image. Can be calculated, and the luminance value can be more accurately corrected to the target brightness value.
[0207]
According to the automatic gradation correction method of claim 22 of the present invention, since the luminance range is divided and the boundary value is calculated from the feature amount of each region, the high luminance side and the low luminance side are accurately calculated. It is possible to calculate a boundary value that divides.
[0208]
According to the automatic gradation correction method of claim 23 of the present invention, the input image is obtained by detecting the peak distribution of the luminance histogram and calculating the boundary value using the detected peak distribution range. In the case of backlight, the image is corrected to the target brightness and the overall contrast is improved. In the case of direct light, an image with improved contrast can be obtained without changing the original brightness. effective.
[0209]
According to the automatic gradation correction method of claim 24 of the present invention, the center of gravity of the low luminance part of the target luminance distribution is obtained as the luminance correction target value, the luminance distribution is expanded and the center of gravity of the low luminance part of the luminance histogram is obtained. Since the position is corrected so that it matches the brightness correction target value, the target brightness distribution of the same shape is used for the follow-up image and the backlight image, and it has the target brightness and the overall contrast is improved. There is an effect that an obtained image can be obtained.
[0210]
Further, according to the automatic gradation correction method of claim 25 of the present invention, since the target luminance distribution is given by a curve and stored, the target luminance distribution can be easily set, and the storage capacity There is an effect that can be reduced.
[0211]
According to the automatic gradation correction method of claim 26 of the present invention, since a plurality of target luminance distributions are set and stored, there is an effect that the luminance correction target value can be easily adjusted. .
[0212]
According to the automatic gradation correction method of claim 27 of the present invention, the boundary value calculated from the range of the mountain distribution is adjusted using the luminance histogram, so that a more accurate boundary value is calculated. There is an effect that can.
[0213]
Further, according to the automatic gradation correction method according to claim 28 of the present invention, since the range of the mountain-shaped distribution is limited, there is an effect that the brightness of the image can be corrected even in a follow light image. .
[0214]
According to the automatic gradation correction method of claim 29 of the present invention, when the luminance correction target value is smaller than the centroid position of the low luminance portion of the luminance histogram, the luminance correction target value is set to the centroid of the low luminance portion of the luminance histogram. Since the position is corrected, there is an effect that it is possible to prevent the image from being corrected darker than the input image.
[0215]
According to the automatic gradation correction method of claim 30 of the present invention, the luminance correction target value is corrected to the vicinity of the center of gravity of the low luminance portion of the luminance histogram, so that the brightness of the input image is used as a basis. There is an effect that the brightness after correction can be finely adjusted.
[0216]
According to the automatic gradation correction method of claim 31 of the present invention, in the automatic gradation correction method of any one of claims 21, 22, and 23, the distribution of the luminance histogram is expanded only in the low luminance direction. 31. At the same time, the correction is performed so that the center of gravity of the luminance histogram matches the luminance correction target value. Therefore, in the automatic gradation correction method according to any one of claims 24 to 30, the high luminance portion is not crushed. There is an effect that can be corrected.
[0217]
According to the automatic gradation correction method of claim 32 of the present invention, in the automatic gradation correction method according to any one of claims 32, 33, and 35, the gradation correction processing step performs γ correction. Since the gradation correction process is performed by executing this, there is an effect that the center of gravity of the low luminance portion of the luminance histogram and the target value can be matched with one conversion table.
[0218]
According to the automatic gradation correction method of claim 33 of the present invention, in the automatic gradation correction method of any one of claims 21, 22, and 23, the gradation correction processing step includes the luminance The correction processing that simultaneously performs both the expansion processing of the luminance distribution of the histogram and the processing of matching the center of gravity of the low luminance portion of the luminance histogram in which the luminance distribution is expanded to the luminance correction target value, Since the correction table is created, it is possible to match the center of gravity of the low brightness portion of the brightness histogram with the target value by creating the conversion table once.
[0219]
Further, according to the automatic gradation correction method of claim 34 of the present invention, in the automatic gradation correction method of any one of claims 21, 22, and 23, the luminance histogram creation step and the centroid calculation step Further including a luminance distribution expanding step of expanding the luminance distribution of the luminance histogram, wherein the gravity center calculating step calculates the gravity center with respect to a low luminance portion of the luminance histogram in which the luminance distribution is expanded. Thus, after the luminance distribution of the luminance histogram is expanded in advance, automatic gradation correction can be performed by performing processing for matching the center of gravity of the low luminance portion with the target value.
[0220]
According to the automatic gradation correction method of claim 35 of the present invention, in the automatic gradation correction method of any one of claims 21, 22, and 23, the luminance histogram is generated when the luminance histogram is created. Since the integrated amount of the distribution number is limited, there is an effect that the correction amount can be accurately calculated even when the gradation distribution of the luminance histogram is concentrated on a certain part.
[0221]
According to an automatic gradation correction method of a thirty-sixth aspect of the present invention, in the automatic gradation correction method of any one of the twenty-first, twenty-second, and twenty-third aspects, a skin color region is obtained from a color difference signal and a luminance signal. When the luminance histogram is extracted and the luminance histogram is created, a luminance histogram obtained by weighting the luminance distribution of the flesh color portion of the image to the luminance distribution of the entire image according to the area of the flesh color region is created. Since the luminance histogram is weighted according to the area of the skin color region, there is an effect that, when there is a person, gradation correction can be performed so that the brightness of the skin color is optimized according to the area.
[0222]
According to an automatic gradation correction method of a thirty-seventh aspect of the present invention, in the automatic gradation correction method of the thirty-sixth aspect, the luminance distribution of the skin color portion of the image is changed to the luminance distribution of the entire image. When weighting according to the area, weighting is applied to the distribution of the high-brightness part by weighting the distribution of the high-brightness part of the flesh-colored part, so that the flesh-colored whiteout can be suppressed. There is an effect.
[0223]
According to the automatic gradation correction method of claim 38 of the present invention, in the automatic gradation correction method of any one of claims 21, 22, and 23, the luminance calculated by the luminance histogram creation step. By calculating the barycentric position of the high luminance part from the histogram and calculating the gradation correction amount of the high luminance part according to the barycentric position of the high luminance part, the gradation correction amount is limited by the barycentric position of the high luminance part Therefore, there is an effect that it is possible to suppress whiteout in the high luminance part.
[0224]
Further, according to the automatic gradation correction method according to claim 39 of the present invention, in the automatic gradation correction method according to any one of claims 21, 22, and 23, a luminance distribution is obtained in the gradation correction processing. Since gradation correction is not performed in a discrete case, there is an effect that gradation correction is not performed on an image that originally does not require gradation correction.
[0225]
According to the automatic gradation correction method of claim 40 of the present invention, in the automatic gradation correction method of any one of claims 21, 22, and 23, the color difference signal of the image is output according to the correction table. Since the correction is made, it is possible to alleviate a phenomenon in which the saturation appears to be lowered by correcting the luminance.
[0226]
According to the automatic gradation correction program recording medium of claim 41 of the present invention, since the boundary value between the low luminance region and the high luminance region is made variable, the low light image including the backlight region correctly in the backlight image. There is an effect that the luminance part can be calculated, and the backlight value can be more accurately corrected to the target luminance value.
[0227]
According to the automatic gradation correction program recording medium of claim 42 of the present invention, the input image is detected by detecting the peak distribution of the luminance histogram and calculating the boundary value using the detected peak distribution range. In the case of backlight, the image is corrected to the target brightness and the overall contrast is improved. In the case of direct light, it is possible to obtain an image with improved contrast without changing the original brightness. There is an effect that can be done.
[0228]
According to the automatic gradation correction program recording medium of claim 43 of the present invention, the center of gravity of the low luminance part of the target luminance distribution is obtained as the luminance correction target value, the luminance distribution is expanded and the low luminance part of the luminance histogram is obtained. The center of gravity of the image is corrected so that it matches the luminance correction target value, so that the target luminance distribution of the same shape is used for the follow-up image and the backlight image, the target brightness is obtained, and the overall contrast There is an effect that an image with improved can be obtained.
[0229]
According to the automatic gradation correction program recording medium of claim 44 of the present invention, when the luminance correction target value is smaller than the gravity center position of the low luminance portion of the luminance histogram, the luminance correction target value is set to the low luminance portion of the luminance histogram. Since the center of gravity is corrected to the center of gravity, there is an effect that it is possible to prevent correction to be darker than the input image.
[0230]
According to the automatic gradation correction program recording medium described in claim 45 of the present invention, in the automatic gradation correction program recording medium according to claim 41 or 42, the gradation correction processing step includes the luminance The correction processing that simultaneously performs both the expansion processing of the luminance distribution of the histogram and the processing of matching the center of gravity of the low luminance portion of the luminance histogram in which the luminance distribution is expanded to the luminance correction target value, Since the correction table is created, it is possible to match the center of gravity of the low brightness portion of the brightness histogram with the target value by creating the conversion table once.
[0231]
According to the automatic gradation correction program recording medium described in claim 46 of the present invention, in the automatic gradation correction program recording medium according to claim 41 or 42, the luminance histogram creation step and the centroid calculation step. Further including a luminance distribution expanding step of expanding the luminance distribution of the luminance histogram, wherein the gravity center calculating step calculates the gravity center with respect to a low luminance portion of the luminance histogram in which the luminance distribution is expanded. Thus, after the luminance distribution of the luminance histogram is expanded in advance, automatic gradation correction can be performed by the process of matching the center of gravity of the low luminance portion with the target value.
[0232]
According to the automatic gradation correction program recording medium of claim 47 of the present invention, in the automatic gradation correction program recording medium of claim 41 or 42, when the luminance histogram is created, a luminance distribution is created. Since there is a restriction on the integrated amount, the correction amount can be calculated accurately even when the gradation distribution of the luminance histogram is concentrated on a certain part.
[0233]
According to the automatic gradation correction program recording medium described in claim 48 of the present invention, the skin tone area is extracted from the color difference signal and the luminance signal in the automatic gradation correction program recording medium according to claim 41 or 42. A skin color area extracting step, and when creating the brightness histogram, creating a brightness histogram by weighting the brightness distribution of the skin color portion of the image to the brightness distribution of the entire image according to the area of the skin color area Since the brightness histogram of human skin color is weighted to the brightness histogram according to the area of the skin color area, if there is a person, tone correction can be performed so that the brightness of the skin color is optimized according to the area. There is an effect.
[0234]
According to the automatic gradation correction program recording medium described in claim 49 of the present invention, in the automatic gradation correction program recording medium according to claim 48, the luminance distribution of the flesh color portion of the image is changed to the luminance distribution of the entire image. When weighting according to the area of the flesh-colored area, the distribution of the high-brightness part of the flesh-colored part is weighted and weighted so that the distribution of the high-brightness part is weighted. There is an effect that it can be suppressed.
[0235]
According to the automatic gradation correction program recording medium described in claim 50 of the present invention, in the automatic gradation correction program recording medium according to claim 41 or 42, the luminance histogram calculated by the luminance histogram creating step. The center of gravity position of the high brightness part is calculated from the center of gravity, and the tone correction amount of the high brightness part is calculated according to the center of gravity position of the high brightness part. Therefore, there is an effect that whiteout in the high luminance portion can be suppressed.
[0236]
According to the automatic gradation correction program recording medium of claim 51 of the present invention, in the automatic gradation correction program recording medium of claim 41 or 42, the luminance distribution is discrete in the gradation correction processing. In such a case, since tone correction is not performed, there is an effect that tone correction is not performed on an image that originally does not require tone correction.
[0237]
According to the automatic gradation correction program recording medium of claim 52 of the present invention, in the automatic gradation correction program recording medium of claim 41 or 42, the color difference signal of the image is corrected according to the correction table. As a result, it is possible to alleviate a phenomenon in which the saturation appears to be reduced by correcting the luminance.
[Brief description of the drawings]
FIG. 1 is a block diagram of an automatic gradation correction apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram showing luminance histograms in a front light image and a backlight image.
FIG. 3 is an explanatory diagram of correction processing according to Embodiment 1 of the present invention.
FIG. 4 is a flowchart showing tone correction processing and its principle in Embodiment 1 of the present invention;
FIG. 5 is a diagram showing a graph when a correction table is set with a straight line;
FIG. 6 is an explanatory diagram when a correction table is set in accordance with the frequency of luminance histogram distribution.
FIG. 7 is an explanatory diagram when calculating the correction amount of the high luminance portion according to the gravity center position of the high luminance portion.
FIG. 8 is a graph when creating a correction table that matches the center of gravity of a high-luminance part with a target value;
FIG. 9 shows a discrete histogram.
FIG. 10 is a block diagram of an automatic gradation correction device according to claim 21;
FIG. 11 is a diagram showing a skin color region
FIG. 12 is an explanatory diagram of weighting of a skin color luminance histogram
FIG. 13 is a graph showing the weighting value of the high luminance part.
FIG. 14 is a block diagram of an automatic gradation correction apparatus according to claim 25;
FIG. 15 is a diagram showing a graph of a luminance conversion table
FIG. 16 is a diagram showing a correction operation by the automatic gradation correction device according to claim 16 of the present invention;
FIG. 17 is a block diagram of an automatic gradation correction apparatus according to Embodiment 2 of the present invention.
FIG. 18 is a diagram illustrating a luminance histogram and a target luminance distribution in a backlight image.
FIG. 19 is a diagram showing a luminance histogram after correction in the backlight image of FIG. 18;
FIG. 20 is a flowchart showing tone correction processing and its principle in Embodiment 2 of the present invention;
FIG. 21 is a diagram showing a target luminance distribution and a gravity center position in a front light image and a backlight image.
FIG. 22 is a diagram showing a target luminance distribution represented by a curve.
FIG. 23 is a diagram showing synthesis of target luminance distribution
FIG. 24 is a block diagram of an automatic gradation correction apparatus according to Embodiment 3 of the present invention.
FIG. 25 is a diagram showing the position of the center of gravity in a backlight image.
FIG. 26 is a diagram showing boundary values in a histogram in which frequencies are concentrated in a certain gradation.
FIG. 27 is a flowchart showing tone correction processing and its principle in Embodiment 3 of the present invention;
FIG. 28 is a block diagram of the automatic gradation correction device according to claim 9;
FIG. 29 is a block diagram of an automatic gradation correction apparatus according to Embodiment 4 of the present invention.
FIG. 30 is a diagram showing boundary values between a backlight image and a follow light image according to Embodiment 4 of the present invention;
FIG. 31 is an explanatory diagram of correction processing with a backlight image according to Embodiment 4 of the present invention;
FIG. 32 is an explanatory diagram of correction processing with a follow light image according to Embodiment 4 of the present invention;
FIG. 33 is a flowchart showing tone correction processing and its principle in Embodiment 4 of the present invention;
FIG. 34 is a diagram showing boundary values when there are three peaks in the luminance histogram.
FIG. 35 is a diagram showing boundary values when there are three peaks in the luminance histogram in the automatic tone correction device according to claim 11;
36 is an explanatory diagram of processing of the automatic gradation correction device according to claim 12. FIG.
FIG. 37 is a block diagram of an automatic gradation correction apparatus according to a fifth embodiment of the present invention.
FIG. 38 is a diagram showing a centroid position, a target value, and a luminance histogram when correction is performed in the fourth and fifth embodiments.
FIG. 39 is a flowchart showing tone correction processing and its principle in Embodiment 5 of the present invention;
FIG. 40 is an explanatory diagram of conventional correction processing.
FIG. 41 is a view showing a flowchart of conventional correction processing;
[Explanation of symbols]
101, 601, 1101, 1401, 1501, 2012, 3001, 3101
102,602,1102,1402,1502,2202,3002,3102 A / D converter
103,603,1103,1403,1503,2203,3003,3103 Luminance signal calculation circuit
104,604,1104,1404,1504,2204,3004,3104 Luminance distribution creation circuit
605, 1410, 1505, 2205 Target luminance distribution storage circuit
105,606,1105,1506,2206,3005,3105 center of gravity calculation circuit
106,607,1106,1406,1507,2207,3106 Distribution range calculation circuit
608, 1405, 1508, 2208 Target value calculation circuit
108,609,1108,1407,1509,2209,3008,3108 Correction table creation circuit
109,610,1109,1408,1510,2210,3109 Image signal correction circuit
1110, 1409, 1511, 2111, boundary value calculation circuit
1512, 2212 Mountain type distribution detection circuit
107, 1107, 3007, 3107 Target value storage circuit
2213 Target value correction circuit
2501 Feature acquisition step
2502 Various curve data import step
2503 Lower limit judgment step
2504 Under processing step
2505 Upper limit judgment step
2506 Over processing step
2507 Linear processing step
2508 Gradation correction curve storage step
3006 Distribution range calculation circuit
3009 Luminance signal correction circuit
3010, 3110 Color difference signal calculation circuit
3011 Color difference signal correction circuit
3111 Skin color region extraction circuit
3112 Skin color luminance distribution generation circuit

Claims (52)

デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成部と、
前記輝度ヒストグラムの重心を求め、全階調範囲の中央値と前記重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出部と、
前記境界値算出部により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を算出する重心算出部と、
前記輝度ヒストグラム作成部により作成された輝度ヒストグラムと、前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心と、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値とに基づいて補正テーブルを作成し、該補正テーブルを用いて、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が前記輝度補正目標値に一致するように階調補正処理を行う階調補正処理部とを備えた、
ことを特徴とする自動階調補正装置。
A luminance histogram creation unit for creating a luminance histogram of a digital image;
Obtains the center of gravity of the luminance histogram, and the boundary value calculation unit for calculating a boundary value of the low luminance part and high-luminance portion by using the center of gravity and the center value of the entire gradation range,
A centroid calculator that calculates the centroid of the low luminance portion of the luminance histogram on the basis of the boundary value calculated by the boundary value calculating unit,
A luminance histogram created by the luminance histogram creating unit, and the center of gravity of the low-intensity portion of the luminance histogram calculated by the centroid calculating unit, which is the target value of the destination of the center of gravity of the low-intensity portion of the luminance histogram luminance create a correction table on the basis of the corrected target value, the using the correction table, the gradation such that the center of gravity of the low luminance portion of the luminance histogram with expanding the luminance distribution coincides with the luminance correction target value correcting process A gradation correction processing unit for performing
An automatic gradation correction device characterized by that.
デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成部と、
前記輝度ヒストグラムを全階調範囲の中央値で分割した2つの領域のそれぞれの重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出部と、
前記境界値算出部により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を算出する重心算出部と、
前記輝度ヒストグラム作成部により作成された輝度ヒストグラムと、前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心と、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値とに基づいて補正テーブルを作成し、該補正テーブルを用いて、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が前記輝度補正目標値に一致するように階調補正処理を行う階調補正処理部とを備えた、
ことを特徴とする自動階調補正装置。
A brightness histogram creation section for creating a brightness histogram of a digital image;
A boundary value calculation unit that calculates a boundary value between the low luminance part and the high luminance part using the centroid of each of the two areas obtained by dividing the luminance histogram by the median value of the entire gradation range;
A centroid calculating unit that calculates the centroid of the low luminance part of the luminance histogram based on the boundary value calculated by the boundary value calculating unit;
The brightness histogram created by the brightness histogram creation unit, the center of gravity of the low brightness part of the brightness histogram calculated by the center of gravity calculation part, and the brightness that is the target value of the destination of the center of gravity of the low brightness part of the brightness histogram A correction table is created based on the correction target value, and a gradation correction process is performed using the correction table so that the luminance distribution is expanded and the center of gravity of the low luminance portion of the luminance histogram matches the luminance correction target value. A gradation correction processing unit for performing
An automatic gradation correction device characterized by that.
デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成部と、
前記輝度ヒストグラムを低輝度側から走査して最初に検出した山型分布を第1の範囲とし、前記輝度ヒストグラムを高輝度側から走査して最初に検出した山型分布を第2の範囲として検出する山型分布検出部と、
前記山型分布検出部が検出した山型分布の前記第1の範囲の重心と前記第2の範囲の重心との間に前記輝度ヒストグラムの低輝度部と高輝度部を分けるための境界値を算出する境界値算出部と、
前記境界値算出部により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を算出する重心算出部と、
前記輝度ヒストグラム作成部により作成された輝度ヒストグラムと、前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心と、前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値とに基づいて補正テーブルを作成し、該補正テーブルを用いて、輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が前記輝度補正目標値に一致するように階調補正処理を行う階調補正処理部とを備えた、
ことを特徴とする自動階調補正装置。
A luminance histogram creation unit for creating a luminance histogram of a digital image;
The peak distribution first detected by scanning the luminance histogram from the low luminance side is set as the first range, and the peak distribution first detected by scanning the luminance histogram from the high luminance side is detected as the second range. A mountain-shaped distribution detector
A boundary value for dividing the low luminance portion and the high luminance portion of the luminance histogram between the centroid of the first range and the centroid of the second range of the mountain distribution detected by the mountain distribution detection unit. A boundary value calculation unit for calculating,
A centroid calculator that calculates the centroid of the low luminance portion of the luminance histogram on the basis of the boundary value calculated by the boundary value calculating unit,
A luminance histogram created by the luminance histogram creating unit, and the center of gravity of the low-intensity portion of the luminance histogram calculated by the centroid calculating unit, which is the target value of the destination of the center of gravity of the low-intensity portion of the luminance histogram luminance create a correction table on the basis of the corrected target value, the using the correction table, the gradation such that the center of gravity of the low luminance portion of the luminance histogram with expanding the luminance distribution coincides with the luminance correction target value correcting process A gradation correction processing unit for performing
An automatic gradation correction device characterized by that.
請求項1または請求項2または請求項3記載の自動階調補正装置は、
目標輝度分布から前記輝度補正目標値を算出する目標値算出部をさらに備え、
前記目標値算出部は、前記境界値算出部から出力される境界値に基づき前記目標輝度分布の低輝度部の重心を輝度補正目標値として算出する、
ことを特徴とする自動階調補正装置。
The automatic gradation correction device according to claim 1, claim 2, or claim 3,
A target value calculation unit for calculating the luminance correction target value from the target luminance distribution;
The target value calculation unit calculates the center of gravity of the low luminance part of the target luminance distribution as a luminance correction target value based on the boundary value output from the boundary value calculation unit;
An automatic gradation correction device characterized by that.
請求項4記載の自動階調補正装置において、
前記階調補正処理を行う際に、前記目標値算出部は、目標とする輝度分布を
曲線により設定する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to claim 4,
When performing the gradation correction processing, the target value calculation unit sets a target luminance distribution by a curve,
An automatic gradation correction device characterized by that.
請求項4記載の自動階調補正装置において、
前記階調補正処理を行う際に、前記目標値算出部は、目標とする輝度分布を複数設定し記憶しておく、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to claim 4,
When performing the gradation correction process, the target value calculation unit sets and stores a plurality of target luminance distributions.
An automatic gradation correction device characterized by that.
請求項3記載の自動階調補正装置において、
前記階調補正処理を行う際に、前記境界値算出部は、前記山型分布の範囲から算出した境界値を、前記輝度ヒストグラムを用いて設定する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to claim 3,
When performing the gradation correction process, the boundary value calculation unit sets a boundary value calculated from the range of the mountain distribution using the luminance histogram.
An automatic gradation correction device characterized by that.
請求項記載の自動階調補正装置において、
前記階調補正処理を行う際に、前記山型分布検出部は、前記山型分布の範囲に制限を設ける、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to claim 3 ,
When performing the gradation correction processing, the mountain distribution detection unit provides a limit to the range of the mountain distribution.
An automatic gradation correction device characterized by that.
請求項3記載の自動階調補正装置は、
前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値が前記重心算出部により算出された前記輝度ヒストグラムの低輝度部の重心位置と異なっている場合は前記輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置に一致するように修正する目標値修正部をさらに備え、
前記階調補正処理部は、輝度分布を拡大すると同時に前記輝度ヒストグラムの低輝度部の重心を前記目標値修正部が出力する輝度補正目標値に一致するように階調補正処理を行う、
ことを特徴とする自動階調補正装置。
The automatic gradation correction device according to claim 3 is:
When the luminance correction target value, which is the target value of the movement destination of the center of gravity of the low luminance part of the luminance histogram, is different from the gravity center position of the low luminance part of the luminance histogram calculated by the gravity center calculating unit, the luminance correction target A target value correction unit that corrects the value so as to match the position of the center of gravity of the low luminance part of the luminance histogram;
The gradation correction processing unit performs a gradation correction process so that the center of gravity of the low luminance part of the luminance histogram is coincident with the luminance correction target value output by the target value correcting unit while expanding the luminance distribution.
An automatic gradation correction device characterized by that.
請求項記載の自動階調補正装置において、
前記階調補正処理を行う際の前記輝度補正目標値の修正は、輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置付近の値となるように修正する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to claim 9 ,
The correction of the luminance correction target value when performing the gradation correction processing is performed so that the luminance correction target value becomes a value near the centroid position of the low luminance portion of the luminance histogram.
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記階調補正処理において、前記輝度ヒストグラムの分布を低輝度方向にのみ拡大すると同時に輝度ヒストグラムの重心が輝度補正目標値に一致するように補正を行う、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
In the gradation correction processing, the distribution of the luminance histogram is expanded only in the low luminance direction, and at the same time, correction is performed so that the center of gravity of the luminance histogram matches the luminance correction target value.
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記階調補正処理部は、γ補正を実行することで前記階調補正処理を行う、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
The gradation correction processing unit performs the gradation correction processing by executing γ correction.
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記階調補正処理部は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、
前記補正テーブルを作成する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
The gradation correction processing unit simultaneously performs both a process of expanding the brightness distribution of the brightness histogram and a process of matching the center of gravity of the low brightness part of the brightness histogram with the brightness distribution expanded to the brightness correction target value. So that the correction
Creating the correction table;
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記輝度ヒストグラム作成部により作成された輝度ヒストグラムの輝度分布を拡大する輝度分布拡大部をさらに備え、
前記重心算出部は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行う、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
A luminance distribution expansion unit that expands the luminance distribution of the luminance histogram created by the luminance histogram creation unit;
The center-of-gravity calculation unit performs the calculation of the center of gravity with respect to a low-luminance part of a luminance histogram in which the luminance distribution is expanded.
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設ける、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
When creating the luminance histogram, a limit is placed on the integrated amount of the luminance distribution,
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出部をさらに有し、
前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
A skin color area extracting unit that extracts a skin color area from the color difference signal and the luminance signal;
When creating the luminance histogram, create a luminance histogram that weights the luminance distribution of the skin color portion of the image to the luminance distribution of the entire image according to the area of the skin color region,
An automatic gradation correction device characterized by that.
請求項16記載の自動階調補正装置において、
画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重する、
ことを特徴とする自動階調補正装置。
The automatic gradation correction device according to claim 16 , wherein
When weighting the luminance distribution of the flesh-colored portion of the image to the luminance distribution of the entire image according to the area of the flesh-colored region, the distribution of the high-luminance portion of the flesh-colored portion is weighted and weighted.
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記輝度ヒストグラム作成部により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
Calculating the gravity center position of the high luminance part from the luminance histogram calculated by the luminance histogram creating unit, and calculating the gradation correction amount of the high luminance part according to the gravity center position of the high luminance part;
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わない、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
In the gradation correction processing, gradation correction is not performed when the luminance distribution is discrete.
An automatic gradation correction device characterized by that.
請求項1,2,3のいずれかに記載の自動階調補正装置において、
補正テーブルに応じて画像の色差信号を補正する、
ことを特徴とする自動階調補正装置。
In the automatic gradation correction device according to any one of claims 1, 2 , and 3 ,
Correct the color difference signal of the image according to the correction table,
An automatic gradation correction device characterized by that.
デジタル画像の階調を補正する自動階調補正方法であって、
前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、
前記輝度ヒストグラムの重心を求め、全階調範囲の中央値と前記重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出工程と、
前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、
輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が、輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含む、
ことを特徴とする自動階調補正方法。
An automatic gradation correction method for correcting gradation of a digital image,
A luminance histogram creating step of creating a luminance histogram of the digital image;
Obtains the center of gravity of the luminance histogram, and the boundary value calculation step of calculating the boundary value of the low luminance part and high-luminance portion by using the center of gravity and the center value of the entire gradation range,
A centroid calculation step of obtaining the centroid of the low luminance portion of the luminance histogram on the basis of the boundary value calculated by the boundary value calculation step,
The center of gravity of the low luminance portion of the luminance histogram with expanding the luminance distribution, and a gradation correction processing step of performing gradation correction processing to match the brightness correction target value,
And an automatic gradation correction method.
デジタル画像の階調を補正する自動階調補正方法であって、
前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、
前記輝度ヒストグラムを全階調範囲の中央値で分割した2つの領域のそれぞれの重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出工程と、
前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、
輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が、輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含む、
ことを特徴とする自動階調補正方法。
An automatic gradation correction method for correcting gradation of a digital image,
A luminance histogram creating step of creating a luminance histogram of the digital image;
A boundary value calculating step of calculating a boundary value between the low luminance portion and the high luminance portion using the respective centroids of the two regions obtained by dividing the luminance histogram by the median value of the entire gradation range;
A center-of-gravity calculating step of obtaining a center of gravity of the low-luminance portion of the luminance histogram based on the boundary value calculated by the boundary value calculating step;
A gradation correction processing step of expanding a luminance distribution and performing a gradation correction process so that a center of gravity of a low luminance portion of the luminance histogram matches a luminance correction target value.
And an automatic gradation correction method.
デジタル画像の階調を補正する自動階調補正方法であって、
前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、
前記輝度ヒストグラムを低輝度側から走査して最初に検出した山型分布を第1の範囲とし、高輝度側から走査して最初に検出した山型分布を第2の範囲として検出する山型分布検出工程と、
前記山型分布検出工程が検出した山型分布の第1の範囲の重心と第2の範囲の重心との間に前記輝度ヒストグラムの低輝度部と高輝度部を分けるための境界値を算出する境界値算出工程と、
前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、
輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含む、
ことを特徴とする自動階調補正方法。
An automatic gradation correction method for correcting gradation of a digital image,
A luminance histogram creating step of creating a luminance histogram of the digital image;
The peak distribution first detected by scanning the brightness histogram from the low brightness side is set as the first range, and the peak distribution detected by scanning the brightness histogram from the high brightness side as the second range. A detection process;
A boundary value for dividing the low luminance portion and the high luminance portion of the luminance histogram between the centroid of the first range and the centroid of the second range of the mountain distribution detected by the mountain distribution detection step is calculated. A boundary value calculation step;
A centroid calculation step of obtaining the centroid of the low luminance portion of the luminance histogram on the basis of the boundary value calculated by the boundary value calculation step,
And a gradation correction processing step of performing gradation correction processing so that the center of gravity of the low luminance portion of the luminance histogram is equal to the luminance correction target value while expanding the luminance distribution,
And an automatic gradation correction method.
請求項21または請求項22または請求項23記載の自動階調補正方法は、
目標輝度分布から前記輝度補正目標値を算出する目標値算出工程をさらに備え、
前記目標値算出工程は、前記境界値算出工程から出力される境界値に基づき前記目標輝度分布の低輝度部の重心を輝度補正目標値として算出する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 21 or claim 22 or claim 23,
A target value calculating step of calculating the luminance correction target value from the target luminance distribution;
The target value calculation step calculates the center of gravity of the low luminance portion of the target luminance distribution as a luminance correction target value based on the boundary value output from the boundary value calculation step.
And an automatic gradation correction method.
請求項24記載の自動階調補正方法において、
前記目標値算出工程は、目標とする輝度分布を曲線により設定する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 24 , wherein
In the target value calculation step, a target luminance distribution is set by a curve.
And an automatic gradation correction method.
請求項24記載の自動階調補正方法において、
前記目標値算出工程は、目標とする輝度分布を複数設定し記憶しておく、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 24 , wherein
The target value calculation step sets and stores a plurality of target luminance distributions,
And an automatic gradation correction method.
請求項23記載の自動階調補正方法において、
前記境界値算出工程は、前記山型分布の範囲から算出した境界値を、輝度ヒストグラムを用いて設定する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 23 , wherein
In the boundary value calculation step, a boundary value calculated from the range of the mountain distribution is set using a luminance histogram.
And an automatic gradation correction method.
請求項23記載の自動階調補正方法において、
前記山型分布検出工程は、前記山型分布の範囲に制限を設ける、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 23 , wherein
The mountain-shaped distribution detection step sets a limit on the range of the mountain-shaped distribution.
And an automatic gradation correction method.
請求項23記載の自動階調補正方法は、
前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値が前記重心算出工程により算出された前記輝度ヒストグラムの低輝度部の重心位置と異なっている場合は前記輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置に一致するように修正する目標値修正工程をさらに備え、
前記階調補正処理工程は、輝度分布を拡大すると同時に前記輝度ヒストグラムの低輝度部の重心を前記目標値修正部が出力する輝度補正目標値に一致するように階調補正処理を行う、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 23,
When the luminance correction target value, which is the target value of the movement destination of the center of gravity of the low luminance portion of the luminance histogram, is different from the position of the gravity center of the low luminance portion of the luminance histogram calculated by the gravity center calculating step, the luminance correction target A target value correcting step of correcting the value so as to match the position of the center of gravity of the low luminance part of the luminance histogram;
The gradation correction processing step performs a gradation correction process so that the center of gravity of the low luminance part of the luminance histogram is coincident with the luminance correction target value output by the target value correcting unit at the same time as expanding the luminance distribution.
And an automatic gradation correction method.
請求項29記載の自動階調補正方法において、
前記輝度補正目標値の修正は、輝度補正目標値を輝度ヒストグラムの低輝度部の重心位置付近の値となるように修正する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 29 ,
The correction of the luminance correction target value is corrected so that the luminance correction target value becomes a value near the gravity center position of the low luminance portion of the luminance histogram.
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記輝度ヒストグラムの分布を低輝度方向にのみ拡大すると同時に輝度ヒストグラムの重心が輝度補正目標値に一致するように補正を行う、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
The distribution of the luminance histogram is expanded only in the low luminance direction, and at the same time, correction is performed so that the center of gravity of the luminance histogram matches the luminance correction target value.
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記階調補正処理工程は、γ補正を実行することで行う、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
The gradation correction processing step is performed by executing γ correction.
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記階調補正処理工程は、前記輝度ヒストグラムの輝度分布の拡大処理、および前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、
補正テーブルを作成する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
The gradation correction processing step simultaneously performs both a process of expanding the brightness distribution of the brightness histogram and a process of matching the center of gravity of the low brightness part of the brightness histogram with the brightness distribution expanded to the brightness correction target value. So that the correction
Create a correction table,
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記輝度ヒストグラム作成工程と前記重心算出工程との間に、前記輝度ヒストグラムの輝度分布を拡大する輝度分布拡大工程をさらに含み、
前記重心算出工程は、前記重心の算出を、前記輝度分布が拡大された輝度ヒストグラムの低輝度部に対して行う、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
A luminance distribution expansion step for expanding the luminance distribution of the luminance histogram between the luminance histogram creation step and the centroid calculation step;
The centroid calculating step performs the calculation of the centroid on a low luminance portion of a luminance histogram in which the luminance distribution is expanded.
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設ける、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
When creating the luminance histogram, a limit is placed on the integrated amount of the luminance distribution,
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出工程をさらに有し、
前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
A skin color region extracting step of extracting a skin color region from the color difference signal and the luminance signal;
When creating the luminance histogram, create a luminance histogram that weights the luminance distribution of the skin color portion of the image to the luminance distribution of the entire image according to the area of the skin color region,
And an automatic gradation correction method.
請求項36記載の自動階調補正方法において、
画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to claim 36 ,
When weighting the luminance distribution of the flesh-colored portion of the image to the luminance distribution of the entire image according to the area of the flesh-colored region, the distribution of the high-luminance portion of the flesh-colored portion is weighted and weighted.
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記輝度ヒストグラム作成工程により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
Calculating the center of gravity position of the high brightness part from the brightness histogram calculated by the brightness histogram creating step, and calculating the gradation correction amount of the high brightness part according to the center of gravity position of the high brightness part;
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わない、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
In the gradation correction processing, gradation correction is not performed when the luminance distribution is discrete.
And an automatic gradation correction method.
請求項21,22,23のいずれかに記載の自動階調補正方法において、
補正テーブルに応じて画像の色差信号を補正する、
ことを特徴とする自動階調補正方法。
The automatic gradation correction method according to any one of claims 21 , 22 , and 23 ,
Correct the color difference signal of the image according to the correction table,
And an automatic gradation correction method.
コンピュータに、デジタル画像の階調を補正する自動階調補正方法を実行させるプログラムを記録した記録媒体であって、
前記自動階調補正方法は、
前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、
前記輝度ヒストグラムの重心を求め、全階調範囲の中央値と前記重心を用いて低輝度部と高輝度部の境界値を算出する境界値算出工程と、
前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、
輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が、輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含む、
ことを特徴とする自動階調補正プログラム記録媒体。
A recording medium recording a program for causing a computer to execute an automatic gradation correction method for correcting gradation of a digital image,
The automatic gradation correction method is:
A luminance histogram creating step of creating a luminance histogram of the digital image;
Obtains the center of gravity of the luminance histogram, and the boundary value calculation step of calculating the boundary value of the low luminance part and high-luminance portion by using the center of gravity and the center value of the entire gradation range,
A centroid calculation step of obtaining the centroid of the low luminance portion of the luminance histogram on the basis of the boundary value calculated by the boundary value calculation step,
The center of gravity of the low luminance portion of the luminance histogram with expanding the luminance distribution, and a gradation correction processing step of performing gradation correction processing to match the brightness correction target value,
An automatic gradation correction program recording medium characterized by the above.
コンピュータに、デジタル画像の階調を補正する自動階調補正方法を実行させるプログラムを記録した記録媒体であって、
前記自動階調補正方法は、
前記デジタル画像の輝度ヒストグラムを作成する輝度ヒストグラム作成工程と、
前記輝度ヒストグラムを低輝度側から走査して最初に検出した山型分布を第1の範囲とし、高輝度側から走査して最初に検出した山型分布を第2の範囲として検出する山型分布検出工程と、
前記山型分布検出工程が検出した山型分布第1の範囲の重心と第2の範囲の重心との間に前記輝度ヒストグラムの低輝度部と高輝度部を分けるための境界値を算出する境界値算出工程と、
前記境界値算出工程により算出された境界値に基づき前記輝度ヒストグラムの低輝度部の重心を求める重心算出工程と、
輝度分布を拡大するとともに前記輝度ヒストグラムの低輝度部の重心が輝度補正目標値に一致するように階調補正処理を行う階調補正処理工程とを含む、
ことを特徴とする自動階調補正プログラム記録媒体。
A recording medium recording a program for causing a computer to execute an automatic gradation correction method for correcting gradation of a digital image,
The automatic gradation correction method is:
A luminance histogram creating step of creating a luminance histogram of the digital image;
The peak distribution first detected by scanning the brightness histogram from the low brightness side is set as the first range, and the peak distribution detected by scanning the brightness histogram from the high brightness side as the second range. A detection process;
Boundary for calculating a boundary value for dividing the low luminance portion and the high luminance portion of the luminance histogram between the centroid of the first range and the centroid of the second range detected by the mountain distribution detection step A value calculation process;
A centroid calculation step of obtaining the centroid of the low luminance portion of the luminance histogram on the basis of the boundary value calculated by the boundary value calculation step,
And a gradation correction processing step of performing gradation correction processing so that the center of gravity of the low luminance portion of the luminance histogram is equal to the luminance correction target value while expanding the luminance distribution,
An automatic gradation correction program recording medium characterized by the above.
請求項41または請求項42記載の自動階調補正方法は、
目標輝度分布から前記輝度補正目標値を算出する目標値算出工程をさらに備え、
前記目標値算出工程は、前記境界値算出工程から出力される境界値に基づき前記目標輝度分布の低輝度部の重心を輝度補正目標値として算出する、
ことを特徴とする自動階調補正プログラム記録媒体。
The automatic gradation correction method according to claim 41 or claim 42,
A target value calculating step of calculating the luminance correction target value from the target luminance distribution;
The target value calculation step calculates the center of gravity of the low luminance portion of the target luminance distribution as a luminance correction target value based on the boundary value output from the boundary value calculation step.
An automatic gradation correction program recording medium characterized by the above.
請求項42記載の自動階調補正方法は、
前記輝度ヒストグラムの低輝度部の重心の移動先の目標値である輝度補正目標値が前記重心算出工程により算出された前記輝度ヒストグラムの低輝度部の重心位置と異なっている場合は前記輝度補正目標値を前記輝度ヒストグラムの低輝度部の重心位置に一致するように修正する目標値修正工程をさらに備え、
前記階調補正処理工程は、輝度分布を拡大すると同時に前記輝度ヒストグラムの低輝度部の重心を前記目標値修正部が出力する輝度補正目標値に一致するように階調補正処理を行う、
ことを特徴とする自動階調補正プログラム記録媒体。
The automatic gradation correction method according to claim 42,
When the luminance correction target value, which is the target value of the movement destination of the center of gravity of the low luminance portion of the luminance histogram, is different from the position of the gravity center of the low luminance portion of the luminance histogram calculated by the gravity center calculating step, the luminance correction target A target value correcting step of correcting the value so as to match the position of the center of gravity of the low luminance part of the luminance histogram;
The gradation correction processing step performs a gradation correction process so that the center of gravity of the low luminance part of the luminance histogram is coincident with the luminance correction target value output by the target value correcting unit at the same time as expanding the luminance distribution.
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
前記階調補正処理工程は、前記輝度ヒストグラムの輝度分布の拡大処理、およ
び前記輝度分布が拡大された輝度ヒストグラムの低輝度部の重心を前記輝度補正
目標値に一致させる処理、の両者を同時に行う補正、がその内容となるように、
補正テーブルを作成する、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
The gradation correction processing step simultaneously performs both a process of expanding the brightness distribution of the brightness histogram and a process of matching the center of gravity of the low brightness part of the brightness histogram with the brightness distribution expanded to the brightness correction target value. So that the correction
Create a correction table,
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
前記輝度ヒストグラム作成工程と前記重心算出工程との間に、前記輝度ヒスト
グラムの輝度分布を拡大する輝度分布拡大工程をさらに含み、
前記重心算出工程は、前記重心の算出を、前記輝度分布が拡大された輝度ヒス
トグラムの低輝度部に対して行う、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
A luminance distribution expansion step for expanding the luminance distribution of the luminance histogram between the luminance histogram creation step and the centroid calculation step;
The centroid calculating step performs the calculation of the centroid on a low luminance portion of a luminance histogram in which the luminance distribution is expanded.
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
前記輝度ヒストグラムを作成する際に、輝度分布数の積算量に制限を設ける、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
When creating the luminance histogram, a limit is placed on the integrated amount of the luminance distribution,
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
色差信号、及び輝度信号から肌色領域を抽出する肌色領域抽出工程をさらに有し、
前記輝度ヒストグラムを作成する際に、画像の肌色部分の輝度分布を画像全体の輝度分布に、肌色領域の面積に応じて加重した輝度ヒストグラムを作成する、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
A skin color region extracting step of extracting a skin color region from the color difference signal and the luminance signal;
When creating the luminance histogram, create a luminance histogram that weights the luminance distribution of the skin color portion of the image to the luminance distribution of the entire image according to the area of the skin color region,
An automatic gradation correction program recording medium characterized by the above.
請求項48記載の自動階調補正プログラム記録媒体において、
画像の肌色部分の輝度分布を画像全体の輝度分布に肌色領域の面積に応じて加重する際に、肌色部分の高輝度部分の分布に重み付けをして加重する、
ことを特徴とする自動階調補正プログラム記録媒体。
The automatic gradation correction program recording medium according to claim 48 ,
When weighting the luminance distribution of the flesh-colored portion of the image to the luminance distribution of the entire image according to the area of the flesh-colored region, the distribution of the high-luminance portion of the flesh-colored portion is weighted and weighted.
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
前記輝度ヒストグラム作成工程により算出された輝度ヒストグラムから高輝度部の重心位置を算出し、高輝度部の重心位置に応じて高輝度部の階調補正量を算出する、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
Calculating the center of gravity position of the high brightness part from the brightness histogram calculated by the brightness histogram creating step, and calculating the gradation correction amount of the high brightness part according to the center of gravity position of the high brightness part;
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
前記階調補正処理において、輝度分布が離散的な場合には階調補正を行わない、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
In the gradation correction processing, gradation correction is not performed when the luminance distribution is discrete.
An automatic gradation correction program recording medium characterized by the above.
請求項41または42に記載の自動階調補正プログラム記録媒体において、
補正テーブルに応じて画像の色差信号を補正する、
ことを特徴とする自動階調補正プログラム記録媒体。
In the automatic gradation correction program recording medium according to claim 41 or 42 ,
Correct the color difference signal of the image according to the correction table,
An automatic gradation correction program recording medium characterized by the above.
JP2002172423A 2001-06-14 2002-06-13 Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium Expired - Fee Related JP3772133B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002172423A JP3772133B2 (en) 2001-06-14 2002-06-13 Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2001180642 2001-06-14
JP2001-180642 2001-06-14
JP2002172423A JP3772133B2 (en) 2001-06-14 2002-06-13 Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium

Publications (2)

Publication Number Publication Date
JP2003069825A JP2003069825A (en) 2003-03-07
JP3772133B2 true JP3772133B2 (en) 2006-05-10

Family

ID=26616928

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002172423A Expired - Fee Related JP3772133B2 (en) 2001-06-14 2002-06-13 Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium

Country Status (1)

Country Link
JP (1) JP3772133B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8351698B2 (en) 2009-08-31 2013-01-08 Canon Kabushiki Kaish Image processing apparatus and control method thereof

Families Citing this family (27)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004355566A (en) * 2003-05-30 2004-12-16 Casio Comput Co Ltd Image-processing device, image data correction program and fingerprint collation device
TWI245557B (en) 2003-09-11 2005-12-11 Matsushita Electric Ind Co Ltd Image compensation apparatus and method for the same
JP2005125549A (en) * 2003-10-22 2005-05-19 Brother Ind Ltd Image processing method for stamp platemaking, image processing method for label printing, recording medium and program
JP4506245B2 (en) * 2004-03-31 2010-07-21 花王株式会社 Skin simulation image forming method
JP4468734B2 (en) * 2004-04-27 2010-05-26 オリンパス株式会社 Video signal processing apparatus and video signal processing program
JP3949684B2 (en) 2004-04-30 2007-07-25 三菱電機株式会社 Gradation correction apparatus, gradation correction program, portable terminal device, and personal computer
JP2006325015A (en) * 2005-05-19 2006-11-30 Konica Minolta Photo Imaging Inc Image processing method, image processing apparatus, imaging apparatus, and image processing program
JP4517965B2 (en) * 2005-07-19 2010-08-04 ノーリツ鋼機株式会社 Image processing apparatus and image processing method
JP4063290B2 (en) 2005-07-25 2008-03-19 ブラザー工業株式会社 Image processing apparatus, image processing program, and image processing method
JP2007060169A (en) * 2005-08-23 2007-03-08 Sony Corp Image processing apparatus, image display apparatus and image processing method
JP4799104B2 (en) * 2005-09-26 2011-10-26 キヤノン株式会社 Information processing apparatus and control method therefor, computer program, and storage medium
JP4799105B2 (en) * 2005-09-26 2011-10-26 キヤノン株式会社 Information processing apparatus and control method therefor, computer program, and storage medium
KR100776134B1 (en) * 2005-12-23 2007-11-15 매그나칩 반도체 유한회사 Image sensor and method for controlling distribution of image brightness
JP4797666B2 (en) * 2006-02-03 2011-10-19 Nkワークス株式会社 Image processing apparatus and image processing method
US8014602B2 (en) 2006-03-29 2011-09-06 Seiko Epson Corporation Backlight image determining apparatus, backlight image determining method, backlight image correction apparatus, and backlight image correction method
US7916943B2 (en) 2006-06-02 2011-03-29 Seiko Epson Corporation Image determining apparatus, image determining method, image enhancement apparatus, and image enhancement method
US7916942B1 (en) 2006-06-02 2011-03-29 Seiko Epson Corporation Image determining apparatus, image enhancement apparatus, backlight image enhancement apparatus, and backlight image enhancement method
JP4916341B2 (en) 2007-02-28 2012-04-11 オリンパス株式会社 Image processing apparatus and image processing program
JP2009110169A (en) * 2007-10-29 2009-05-21 C Micro:Kk Medicament inspection apparatus and image processing method
KR101060488B1 (en) * 2008-04-21 2011-08-30 주식회사 코아로직 Optimal Image Selection Method and Device
JP4982574B2 (en) * 2008-09-10 2012-07-25 株式会社東芝 Display device and control method thereof
US8330771B2 (en) 2008-09-10 2012-12-11 Kabushiki Kaisha Toshiba Projection display device and control method thereof
WO2010113230A1 (en) * 2009-03-31 2010-10-07 パナソニック株式会社 Video signal processing method
JP4756398B2 (en) * 2009-12-07 2011-08-24 花王株式会社 Skin simulation image forming method
JP6031921B2 (en) 2012-09-28 2016-11-24 ブラザー工業株式会社 Image processing apparatus and program
JP2015011585A (en) * 2013-06-28 2015-01-19 株式会社リコー Image processing apparatus, image forming apparatus, image forming system, image processing method, and program
JP6049955B2 (en) * 2014-08-22 2016-12-21 オリンパス株式会社 Image processing apparatus, image processing method, and image processing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8351698B2 (en) 2009-08-31 2013-01-08 Canon Kabushiki Kaish Image processing apparatus and control method thereof

Also Published As

Publication number Publication date
JP2003069825A (en) 2003-03-07

Similar Documents

Publication Publication Date Title
JP3772133B2 (en) Automatic gradation correction device, automatic gradation correction method, and automatic gradation correction program recording medium
TWI231701B (en) Automatic tone correction device, automatic tone correction method, and tone correction program recording medium
WO2018133609A1 (en) Method for producing high dynamic range image from low dynamic range image
JP5205968B2 (en) Gradation correction method, gradation correction apparatus, gradation correction program, and image device
JP4163353B2 (en) Image processing device
JP3880553B2 (en) Image processing method and apparatus
US7876474B2 (en) Image processing device capable of suppressing over-correction in Retinex process
US20070040914A1 (en) Image sensing apparatus and image processing method
JP5235759B2 (en) Image processing apparatus, image processing method, and program
JP2005353069A (en) Chroma-adaptive image improvement device and method
JP6074254B2 (en) Image processing apparatus and control method thereof
JP6805968B2 (en) Image processing device, image projection device, and image processing method
JP5165076B2 (en) Video display device
JP3971395B2 (en) Apparatus and method for adaptive brightness value correction
JP3673092B2 (en) Image quality adjusting apparatus, image quality adjusting method, and recording medium recording image adjusting program
JP2008072604A (en) Image processing system, apparatus, medium, and program
JP2002536920A (en) Histogram equalization method
JP2006005699A (en) Image processor, image processing program, electronic camera, and image processing method
JP2000102033A (en) Automatic gradation correction method
JP4664938B2 (en) Image processing apparatus, image processing method, and program
JP2015087949A (en) Image processor and control method thereof, program, and storage medium
JP2001045298A (en) Method for processing picture, recording medium recording picture processing program and picture processor
JP4719559B2 (en) Image quality improving apparatus and program
US20080100749A1 (en) Image processing device capable of performing retinex process at high speed
JP2002223355A (en) Image processor and recording medium with image processing program recorded thereon

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050805

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060213

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100217

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110217

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120217

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees