JP4240261B2 - Image processing apparatus and method, and recording medium - Google Patents

Image processing apparatus and method, and recording medium Download PDF

Info

Publication number
JP4240261B2
JP4240261B2 JP2000322229A JP2000322229A JP4240261B2 JP 4240261 B2 JP4240261 B2 JP 4240261B2 JP 2000322229 A JP2000322229 A JP 2000322229A JP 2000322229 A JP2000322229 A JP 2000322229A JP 4240261 B2 JP4240261 B2 JP 4240261B2
Authority
JP
Japan
Prior art keywords
signal
color difference
correction
luminance signal
correction value
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
JP2000322229A
Other languages
Japanese (ja)
Other versions
JP2002135584A (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.)
Sony Corp
Original Assignee
Sony Corp
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 Sony Corp filed Critical Sony Corp
Priority to JP2000322229A priority Critical patent/JP4240261B2/en
Publication of JP2002135584A publication Critical patent/JP2002135584A/en
Application granted granted Critical
Publication of JP4240261B2 publication Critical patent/JP4240261B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、画像処理装置および方法、並びに記録媒体に関し、例えば、ディスプレイやプリンタ等のような画像出力装置のダイナミックレンジに適合させて画像の階調を補正する場合に用いて好適な画像処理装置および方法、並びに記録媒体に関する。
【0002】
【従来の技術】
近年、ディジタルカメラやスキャナ等のような固体撮像素子(CCD:Charge Coupled Device)を搭載した画像信号取得装置においては、固体撮像素子の性能が向上したことや多段階的に露光を行うことが可能となったことによって、階調のダイナミックレンジが従来よりも広い画像信号(以下、広ダイナミックレンジ画像信号と記述する)を取得することができるようになっている。
【0003】
一方、画像信号を記録する記録メディアの記録フォーマット、ディスプレイやプリンタへの出力信号フォーマット、放送信号フォーマット等は、依然として従来の8ビット幅や10ビット幅のダイナミックレンジ(以下、狭ダイナミックレンジと記述する)に制限されている。
【0004】
したがって、広ダイナミックレンジ画像信号を取得できる電子機器から、従来の狭ダイナミックレンジに対応する電子機器に対して画像信号を出力する場合には、広ダイナミックレンジ画像信号の階調を補正する必要がある(ダイナミックレンジを狭くする必要がある)。
【0005】
ここで、画像信号のダイナミックレンジを補正する従来の技術について説明する。
【0006】
特開平9−331539号公報には、放送用ビデオカメラにおいて3原色信号R,G,Bの階調を個別に補正することにより、画像信号のダイナミックレンジを補正する技術が開示されている。図1は、そのような放送用ビデオカメラにおける階調補正処理部の構成の一例を示している。この階調補正処理部において、3原色信号R,G,Bは、補正値演算回路1に入力される。また、3原色信号R,G,Bは、それぞれ対応する階調補正回路2R,2G,2Bに入力される。
【0007】
補正値演算回路1は、入力される3原色信号R,G,Bを用いて輝度信号を生成し、その輝度信号に基づいて補正値を演算し、階調補正回路2R,2G,2Bに出力する。
【0008】
階調補正回路2Rは、赤色信号Rの階調を補正するためのルックアップテーブル(以下、LUTと記述する)を内蔵しており、補正値演算回路1から入力される補正値および赤色信号Rを、内蔵するLUTに照らし合わせ、対応する値を補正値としてガンマ補正回路3に出力する。階調補正回路2Gは、緑色信号Gの階調を補正するためのLUTを内蔵しており、補正値演算回路1から入力される補正値および緑色信号Gを、内蔵するLUTに照らし合わせ、対応する値を補正値をしてガンマ補正回路3に出力する。階調補正回路2Bは、青色信号Bの階調を補正するためのLUTを内蔵しており、補正値演算回路1から入力される補正値および青色信号Bを、内蔵するLUTに照らし合わせ、対応する値を補正値をしてガンマ補正回路3に出力する。
【0009】
ガンマ補正回路3Rは、階調補正回路2Rから入力される補正された赤色信号Rにガンマ補正を施してマトリクス回路4に出力する。ガンマ補正回路3Gは、階調補正回路2Gから入力される補正された緑色信号Gにガンマ補正を施してマトリクス回路4に出力する。ガンマ補正回路3Bは、階調補正回路2Bから入力される補正された青色信号Bにガンマ補正を施してマトリクス回路4に出力する。マトリクス回路4は、ガンマ補正された3原色信号R,G,Bを、輝度信号Yoと色差信号CrO,CbOに変換する。
【0010】
図1に示した階調補正処理部は、3原色信号R,G,Bを、それぞれ同じ比率で階調補正するので、色相を変化させることなく画像信号のダイナミックレンジを所望の幅に圧縮することが可能である。
【0011】
しかしながら、当該階調補正処理部は、3原色信号R,G,Bのそれぞれに対して、階調補正回路2およびガンマ補正回路3が必要であるので、これを民生用の機器(ディジタルカメラ、ビデオカメラ、テレビジョン受像機等)に用いた場合、コスト高になるとともに回路規模が大きくなる問題がある。
【0012】
特開平11−55598号公報には、テレビジョン受像機において画像信号のうちの輝度信号Yに対してだけ階調補正を行うことにより、画像信号のダイナミックレンジを補正する技術が開示されている。図2は、そのようなテレビジョン受像器の階調補正処理部の構成の一例を示している。
【0013】
この階調補正処理部において、入力される輝度信号Yは、補正値演算回路11、輝度補正回路12、および色差補正回路13に供給され、入力される色差信号Cr,Cbは、色差補正回路13に供給される。
【0014】
補正値演算回路11は、入力される輝度信号Yに基づき、輝度補正回路12における階調補正が最適に実行される補正値を演算して輝度補正回路12に出力する。階調補正回路12は、輝度信号Yの階調を補正するためのLUTを内蔵しており、補正値演算回路11から入力される補正値および輝度信号Yを、内蔵するLUTに照らし合わせ、対応する値を補正値Yoとして出力する。補正値Yoは、色差補正回路13にも供給される。
【0015】
色差補正回路13は、色差信号Cr,Cbの入力輝度信号Yに対する比を維持するために、階調補正前の輝度信号Yと補正後の輝度信号Yoの比であるYo/Yを色差信号Cr,Cbに乗算することによって正規化し、色差信号CrO,CbOを生成する。
【0016】
【発明が解決しようとする課題】
図2に示したような階調補正処理部は、輝度信号Yに対してだけ階調補正を行うので構成要素の数が少なくなり、コストの上昇を抑止するとともに、回路規模の大型化を抑止することができる。しかしながら、次のような課題が存在する。
【0017】
第1の課題としては、色差信号の値が大きい画素の輝度補正に誤差が生じてしまうことである。なお、3原色信号R,G,Bと、輝度信号Yまたは色差信号CrO,CbOの関係は、次式(1),(2)のとおりとする。
Y=0.30R+0.59G+0.11B ・・・(1)
Cr=R−Y
Cb=B−Y ・・・(2)
【0018】
輝度信号Yの階調補正において、色差信号Cr,Cbの情報は考慮されていないが、輝度信号Yには、3原色信号R,G,Bのバランスを表す情報が欠落しているために、3原色信号R,G,Bのバランスが崩れている画素、すなわち色差の大きい画素に対しては、輝度信号Yの階調補正が正しく行われない。
【0019】
例えば、入力された赤色信号Rが最大値(1と仮定する)であり、緑色信号Gおよび青色信号Bが最小値(0と仮定する)である場合、入力輝度信号Yは0.3となる。
【0020】
そのような画素は、階調補正後においても、赤色信号Rが最大値(1と仮定する)であり、緑色信号Gおよび青色信号Bが最小値(0と仮定する)である画素に変換されるべきであり、そのように変換された場合には、当該画素の輝度信号Y=0.3となる。
【0021】
しかしながら、例えば、輝度補正回路12に図3に示すような輝度補正用のLUTが与えられているとすれば、輝度信号Y=0.3は、輝度補正用のLUTに従って、輝度信号Yo=0.6に補正されることになってしまい、適切な補正値(いまの場合、Y=0.3)と比較して誤差が生じてしまう。このような現象は、無彩色以外の全ての画素に対して起こる可能性がある課題があった。
【0022】
第2の課題としては、色相に変化が発生してしまうことである。
【0023】
具体的には、例えば、入力された赤色信号Rが最大値であり、緑色信号Gおよび青色信号Bが最小値である場合、色差信号Crは、最大値となる。このとき、輝度信号Y=0.3が、図3のLUTに従ってYo=0.6に変換されると、色差補正回路13において、色差信号Crに2(=0.6/0.3)が乗算されることになる。しかしながら、色差信号Crは、既に最大値であるのでクリッピング処理により変化しない。一方、最大値をとらない色差信号Cbには、2が乗算される。この結果、Cr/Yが一定に保たれず、色相に変化が発生してしまう課題があった。
【0024】
また仮に、色差信号Crに対してクリッピング処理を行わずにCr/Yの値を保持したとしても、3原色信号R,G,Bに変換する際、赤色信号Rに対してクリッピング処理が行われるので結果的に色相に変化が生じてしまう課題があった。
【0025】
本発明はこのような状況に鑑みてなされたものであり、色差信号の値が大きい画素の輝度信号Yに対してだけ階調補正を行う場合において、色相に変化が発生することを抑止できるようにするものである。
【0026】
【課題を解決するための手段】
本発明の画像処理装置は、入力された画像信号の輝度信号を用いて、画素の輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則を生成する生成手段と、生成された変換規則を参照することにより、入力された画像信号の画素毎、輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を取得する取得手段と、入力された画像信号の画素毎、取得された補正値を用いて輝度信号および色差信号を補正する補正手段とを含み、生成手段は、輝度信号Y、および大色差信号Cを変数とし、大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、補正値kを算出して変換規則を生成する
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す
【0028】
前記生成手段は、入力された画像信号の輝度信号のヒストグラムを作成する作成手段と、ヒストグラムを累積して、累積ヒストグラムを作成する累積手段と、累積ヒストグラムを所定の対数曲線に近似させて近似曲線を生成する近似手段と、近似曲線に基づいて変換規則を作成する作成手段とを含むようにすることができる。
【0029】
前記補正手段は、入力された画像信号の画素毎、取得された補正値を乗算することにより、輝度信号および色差信号を補正するようにすることができる。
【0030】
本発明の画像処理装置は、被写体の光学像を画像信号に変換する変換手段をさらに含むことができる。
【0032】
本発明の画像処理方法は、入力された画像信号の輝度信号を用いて、画素の輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則を生成する生成ステップと、生成された変換規則を参照することにより、入力された画像信号の画素毎、輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を取得する取得ステップと、
入力された画像信号の画素毎、取得された補正値を用いて輝度信号および色差信号を補正する補正ステップとを含み、生成ステップは、輝度信号Y、および大色差信号Cを変数とし、大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、補正値kを算出して変換規則を生成する
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す
【0033】
本発明の記録媒体は、入力された画像信号の輝度信号を用いて、画素の輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則を生成する生成ステップと、生成された変換規則を参照することにより、入力された画像信号の画素毎、輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を取得する取得ステップと、入力された画像信号の画素毎、取得された補正値を用いて輝度信号および色差信号を補正する補正ステップとを含み、生成ステップは、輝度信号Y、および大色差信号Cを変数とし、大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、補正値kを算出して変換規則を生成する
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す、処理を画像処理装置のコンピュータに実行させるプログラムが記録されている。
【0034】
本発明においては、入力された画像信号の輝度信号が用いられて、画素の輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則が生成され、生成された変換規則が参照されることにより、入力された画像信号の画素毎、輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値が取得され、入力された画像信号の画素毎、取得された補正値を用いて輝度信号および色差信号が補正される。なお、生成の処理では、輝度信号Y、および大色差信号Cを変数とし、大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、補正値kが算出されて変換規則が生成される
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す
【0035】
【発明の実施の形態】
本発明の一実施の形態であるディジタルカメラの構成例について、図4を参照して説明する。このディジタルカメラ30は、単板式CCDを用いており、被写体の光画像を広ダイナミックレンジ(例えば、16ビット幅)の画像信号として取得し、適宜、狭ダイナミックレンジ(例えば、8ビット幅)の画像信号に変換して出力するものである。
【0036】
ディジタルカメラ30の光学系は、被写体の光画像を集光するレンズ31、光画像の光量を調整する絞り32、光画像の入射時間を調整するシャッタ33、CCD37が強い感度を有する赤外領域の光を除去する赤外線カットフィルタ(IRフィルタ)34、CCD37が離散的なサンプリングすると発生する折り返しを抑止するために光の高周波成分を除去する光学ローパスフィルタ(LPF)35、および、CCD37の4画素に対応する領域毎、図5に示すように配置された原色系(赤(R)、緑(G)、および青(B))のフィルタであって光信号から3原色光R,G,Bを抽出する色フィルタ36から構成される。
【0037】
なお、レンズ31に赤外領域除去用のコーティングを施すことにより、赤外線カットフィルタ34を省略してもよい。色フィルタ36としては、例えば、図5に示したもの以外、例えば、補色系(黄色(Ye)、シアン(Cy)、マゼンダ(Mg))と緑(G)のフィルタが配置されたものを用いてもよい。
【0038】
さらに、ディジタルカメラ30は、光学系を介して入力される光画像を光電変換し、広ダイナミックレンジの画像信号をCDS38に出力するCCD37、CCD37から入力される画像信号をサンプリングすることによってノイズを低減させるCDS(Corelated Double Sampling)38、被写体の明るさに適応して画像信号の振幅を電気的に増幅するAGC(Auto Gain Controller)39、アナログの画像信号をディジタル化するA/Dコンバータ40、DSP(Digital Signal Procesor)等より成り、広ダイナミックレンジのディジタル画像信号を狭ダイナミックレンジのディジタル画像信号に変換する画像処理部41、CCD37の水平走査タイミングおよび垂直走査タイミングを発生するタイミングジェネレータ42、および、ドライブ45を制御して、磁気ディスク46、光ディスク47、光磁気ディスク48、または半導体メモリ49に記憶されている制御用プログラムを読み出して、読み出した制御用プログラム、操作部44から入力されるユーザからのコマンド等に基づいて、ディジタルカメラ30の全体を制御する制御部43から構成される。
【0039】
なお、画像処理部41は、入力されるディジタル画像信号のダイナミックレンジを変換する他、入力されるディジタル画像信号を静止画像としてJPEG(Joint Photographic Experts Group)方式等に従い圧縮符号化して所定の記録メディアに記録したり、動画像としてMPEG(Moving Picture Experts Group)方式等に従い圧縮符号化して所定の記録メディアに記録したり、所定の記録媒体から符号化された画像信号を読み出して復号する。
【0040】
このディジタルカメラ30において、レンズ31乃至色フィルタ36より成る光学系を介して入力された光画像は、CCD37によって広ダイナミックレンジの画像信号に変換され、CDS38によってノイズ低減処理が施され、AGC39によって振幅が増幅されて、さらに、A/Dコンバータ40によってディジタル化されて、画像処理部41に入力される。画像処理部41に入力された広ダイナミックレンジのディジタル画像信号は、狭ダイナミックレンジのディジタル画像信号に変換される。
【0041】
次に、図6は、画像処理部41の第1の構成例を示している。画像処理部41には、1画素に対してディジタル化された3原色信号R,G,Bのうちのいずれかが入力される。
【0042】
ホワイトバランス回路(WB)51は、各画素の原色信号レベルを調整して画像における色バランスを整え、ガンマ補正回路(γ)52に出力する。ガンマ補正回路52は、各画素の原色信号に対し、ガンマ補正を施して遅延回路(DL)53に出力する。遅延回路53は、RGB補間同時化回路54が近傍の所定の数の画素を用いて各画素の3原色信号R,G,Bを復元する処理と、アパーチャ補正信号生成回路55が近傍の所定の数の画素を用いてエッジ強調信号を生成する処理とに用いられるサンプリング位相が異なる各色チャンネルの信号の位相を一致させて、RGB補間同時化回路54およびアパーチャ補正信号生成回路55に出力する。
【0043】
RGB補間同時化回路54は、全ての画素にそれぞれ対応する3原色信号R,G,Bを復元するために、対象とする画素の近傍の画素の赤色信号R、緑色信号G、または青色信号Bを用いて欠損している色信号を補間し、画素に対応する3原色信号R,G,Bの各位相を同期させて同時に加算器56に出力する。アパーチャ補正信号生成回路55は、全ての画素にそれぞれ対応するエッジ強調信号を、対象とする画素の近傍の画素の赤色信号R、緑色信号G、または青色信号Bを用いて生成し、加算器56に出力する。
【0044】
加算器56は、RGB補間同時化回路54から入力される3原色信号R,G,Bのそれぞれに、アパーチャ補正信号生成回路55から入力されるエッジ強調信号を加算することよってF特補正を施して、輝度信号生成マトリクス回路57および帯域制限フィルタ58に出力する。
【0045】
輝度信号生成マトリクス回路57は、加算器56から入力される3原色信号R,G,Bを式(1)に代入して輝度信号Yを生成し、補正値演算回路60および階調補正回路61に出力する。
【0046】
帯域制限フィルタ58は、色差信号Cr,Cbの帯域に合わせるために、加算器56からの3原色信号R,G,Bの帯域を制限し、色差信号生成マトリクス回路59に出力する。色差信号生成マトリクス回路59は、帯域制限された3原色信号R,G,Bを、式(1),(2)に代入して色差信号Cr,Cbを生成し、補正値演算回路60および階調補正回路61に出力する。
【0047】
補正値演算回路60は、輝度信号生成マトリクス回路57から入力される輝度信号Y、および色差信号生成マトリクス回路59から入力される色差信号Cr,Cbに基づき、補正値kを演算して階調補正回路61に出力する。
【0048】
階調補正回路61は、次式(3)に示すように、補正値演算回路60から入力される補正値kを、輝度信号生成マトリクス回路57から入力される輝度信号Y、および色差信号生成マトリクス回路59から入力される色差信号Cr,Cbにそれぞれ乗算し、得られる値を補正した輝度信号Yo、および色差信号CrO,CbOとして出力する。
Yo =k・Y
CrO=k・Cr
CbO=k・Cb ・・・(3)
【0049】
このように、同一の補正値kを輝度信号Yおよび色差信号Cr,Cbに乗算することにより、色信号間の比率が変化することが抑止され、色差信号Cr,Cbの信号レベルが大きい場合、輝度信号Yの補正誤差を減少させることができる。
【0050】
図7は、補正値演算回路60の詳細な構成例を示している。補正値演算回路60のヒストグラム生成回路71は、輝度信号生成マトリクス回路57から順次入力される輝度信号Yのヒストグラム(輝度信号Yの各信号レベルに対する頻度分布)を画像単位で生成して、補正値LUT生成回路72に出力する。
【0051】
補正値LUT生成回路72は、ヒストグラム生成回路71から入力される輝度信号Yのヒストグラムに基づき、輝度信号Yおよび色差信号C(色差信号Crと色差信号Cbの信号レベルの大きい方の信号)の組み合わせに対する補正値kを示す補正値LUTを生成して、補正値LUTメモリ74に記憶させる。
【0052】
具体的には、補正値LUT生成回路72は、ヒストグラム生成回路71から入力される輝度信号Yのヒストグラムを累積し、ヒストグラムの各信号レベルに対する頻度を累積して、図8に示す曲線Aのような累積ヒストグラムを生成する。さらに、人間の視覚特性に関するウェーバ・フェヒナの法則(人間の感覚量は、刺激強度の対数に比例する)を考慮して、曲線Aを所定の対数曲線に近似させて曲線Bを得る。図8において、横軸は入力輝度レベルYを示し、縦軸は、累積頻度に補正後の輝度信号のダイナミックレンジを適合させた輝度信号レベルYeを示す。
【0053】
曲線Bは、次式(4)によって与えられる。
Ye=a・log(Y)+b ・・・(4)
ここで、a,bは所定の係数である。
【0054】
次に、補正値LUT生成回路72は、次式(5)によって表現される輝度信号Yおよび色差信号Cの組み合わせに対応する補正値kを示す補正値LUTを生成し、補正値LUTメモリ74に記憶させる。
【数1】

Figure 0004240261
・・・(5)
ここで、Cmaxは、色差信号Cが取り得る信号レベルの最大値である。
【0055】
図7に戻る。比較器73は、色差信号生成マトリクス回路59から入力される色差信号Cr,Cbの信号レベルを比較し、信号レベルが大きい方を色差信号Cとして補正値LUTメモリ74に出力する。補正値LUTメモリ74は、補正値LUT生成回路72からの補正値LUTを記憶する。補正値LUTメモリ74はまた、入力される輝度信号Yおよび色差信号Cの組み合わせを補正値LUTに照らし合わせ、対応する補正値kを取得して階調補正回路61に出力する。
【0056】
画像処理部41の第1の構成例(図6)の階調補正処理について、図9のフローチャートを参照して説明する。この階調補正処理は、輝度信号生成マトリクス回路57が出力した輝度信号Yと、色差信号生成マトリクス回路59が出力した色差信号Cr,Cbに対して施される。
【0057】
ステップS1において、補正値演算回路60のヒストグラム生成回路71は、輝度信号生成マトリクス回路57から入力された輝度信号Yのヒストグラムを画像単位で生成し、補正値LUT生成回路72に出力する。ステップS2において、補正値LUT生成回路72は、ヒストグラム生成回路71から入力された輝度信号Yのヒストグラムに基づき、輝度信号Yおよび色差信号Cの組み合わせに対する補正値kを示す補正値LUTを生成して補正値LUTメモリ74に記憶させる。
【0058】
ステップS3において、比較器73は、色差信号マトリクス回路59から入力された色差信号Cr,Cbを比較し、信号レベルが大きい方を色差信号Cとして補正値LUTメモリ74に出力する。ステップS4において、補正値LUTメモリ74は、入力された輝度信号Yおよび色差信号Cを補正値LUTに照らし合わせ、対応する補正値kを取得して階調補正回路61に出力する。
【0059】
ステップS5において、階調補正回路61は、式(3)に示すように、補正値演算回路60から入力された補正値kを、輝度信号生成マトリクス回路57から入力された輝度信号Y、および色差信号生成マトリクス回路59から入力された色差信号Cr,Cbにそれぞれ乗算し、得られる値を補正した輝度信号Yo、および色差信号CrO,CbOとして出力する。
【0060】
以上説明したように、画像処理部41の第1の構成例の階調補正処理によれば、輝度信号Yおよび色差信号Cr,Cbに同一の補正値kを乗算することによって補正を行う。
【0061】
なお、輝度信号Yおよび色差信号Cの組み合わせと補正値kは、式(5)に示した関係を有するので、例えば、色差信号Cの信号レベルが最大値である場合、補正値k=1となるので、入力された輝度信号Yおよび色差信号Cr,Cbにはk=1が乗算されて、入力された輝度信号Yおよび色差信号Cr,Cbが、そのまま補正された輝度信号Yoおよび色差信号CrO,CbOとして出力される。よって、補正された色差信号CrO,CbOにオーバフローが発生して色相が変化するようなことが抑止できる。
【0062】
また、例えば、色差信号Cr,Cbの信号レベルがいずれも0であって、色差信号Cが最小値(=0)である場合(画素が無彩色である場合)、式(5)は、次式(6)となり、補正された輝度信号Yo=Yeとなる。すなわち、無彩色の画素については、人の視覚特性を考慮した階調補正(図8の曲線B)が施されることになる。
k=Ye/Y ・・・(6)
【0063】
次に、図10は、画像処理部41の第2の構成例を示している。画像処理部41の第2の構成例は、図6に示した第1の構成例と比較した場合、加算器56以降の構成が異なる。第2の構成例において、加算器56は、RGB補間同時化回路54から入力される3原色信号R,G,Bのそれぞれに、アパーチャ補正信号生成回路55から入力されるエッジ強調信号を加算することよってF特補正を施して、補正LUT生成回路81および階調補正回路82に出力する。
【0064】
補正LUT生成回路81は、加算器56から入力される3原色信号R,G,Bに基づき、3原色信号R,G,Bのそれぞれを補正するための補正LUTを生成して、階調補正回路82に出力する。階調補正回路82は、補正LUT生成回路81から入力される補正LUTを記憶する。階調補正回路82はまた、加算器56から入力される3原色信号R,G,Bを補正LUTに照らし合わせて、対応する値を補正された3原色信号R,G,Bとして輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。
【0065】
輝度信号生成マトリクス回路83は、階調補正回路82から入力される補正された3原色信号R,G,Bを式(1)に代入することにより、輝度信号Yoを生成する。
【0066】
帯域制限フィルタ84は、色差信号Cr,Cbの帯域に合わせるために、階調補正回路82から入力される補正された3原色信号R,G,Bの帯域を制限し、色差信号生成マトリクス回路85に出力する。色差信号生成マトリクス回路85は、帯域制限されて補正された3原色信号R,G,Bを、式(1),(2)に代入して色差信号CrO,CbOを生成する。
【0067】
なお、図10に示した画像処理部41の第2の構成例において、図6に示した第1の構成例と共通する回路には同じ符号を附しているので、それらの説明については省略する。
【0068】
図11は、画像処理部41の第2の構成例を成す補正LUT生成回路81の第1の構成例を示している。補正LUT生成回路81の輝度信号合成回路91は、加算器56から入力される3原色信号R,G,Bを式(1)に代入して輝度信号Yを生成し、ヒストグラム生成回路92に出力する。ヒストグラム生成回路92は、輝度信号合成回路92から順次入力される輝度信号Yのヒストグラムを画像単位で生成して階調補正LUT生成回路93に出力する。
【0069】
階調補正LUT生成回路93は、ヒストグラム生成回路92から入力される輝度信号Yのヒストグラムを累積して累積ヒストグラムを生成し、それを所定の対数曲線に近似させて図8の曲線Bのような対数近似曲線を得る。さらに、階調補正LUT生成回路93は、対数近似曲線に基づき、3原色信号R,G,Bのそれぞれに対応する補正LUTを生成して、階調補正回路82のLUTメモリ101R乃至101Bに記憶させる。
【0070】
階調補正回路82を構成するLUTメモリ101Rは、階調補正LUT生成回路93から入力される赤色信号Rを補正するための補正LUTを記憶し、加算器56から入力される赤色信号Rを補正LUTに照らし合わせ、補正された赤色信号Rを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。LUTメモリ101Gは、階調補正LUT生成回路93から入力される緑色信号Gを補正するための補正LUTを記憶し、加算器56から入力される緑色信号Gを補正LUTに照らし合わせ、補正された緑色信号Gを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。LUTメモリ101Bは、階調補正LUT生成回路93から入力される青色信号Bを補正するための補正LUTを記憶し、加算器56から入力される青色信号Bを補正LUTに照らし合わせ、補正された青色信号Bを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。
【0071】
次に、画像処理部41の第2の構成例を成す補正LUT生成回路81の第1の構成例等による階調補正処理について、図12のフローチャートを参照して説明する。この階調補正処理は、加算器56から出力された3原色信号R,G,Bに対して施される。
【0072】
ステップS11において、補正LUT生成回路81の輝度信号合成回路91は、加算器56から入力された3原色信号R,G,Bを式(1)に代入して輝度信号Yを生成し、ヒストグラム生成回路92に出力する。ステップS12において、ヒストグラム生成回路92は、輝度信号合成回路92から順次入力された輝度信号Yのヒストグラムを画像単位で生成して階調補正LUT生成回路93に出力する。
【0073】
ステップS13において、階調補正LUT生成回路93は、ヒストグラム生成回路92から入力された輝度信号Yのヒストグラムを累積して累積ヒストグラムを生成し、それを所定の対数曲線に近似させて図8の曲線Bのような対数近似曲線を得る。さらに、階調補正LUT生成回路93は、対数近似曲線に基づき、3原色信号R,G,Bのそれぞれに対応する補正LUTを生成して、対応するLUTメモリ101R乃至101Bに記憶させる。
【0074】
ステップS14において、LUTメモリ101Rは、加算器56から入力された赤色信号Rを記憶した補正LUTに照らし合わせ、得られた補正された赤色信号Rを輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。同様に、LUTメモリ101Gは、補正された緑色信号Gを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力し、LUTメモリ101Bは、補正された青色信号Bを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。
【0075】
ステップS15において、輝度信号生成マトリクス回路83は、階調補正回路82から入力された補正された3原色信号R,G,Bを式(1)に代入することによって輝度信号Yoを生成する。一方、帯域制限フィルタ84は、色差信号Cr,Cbの帯域に合わせるために、階調補正回路82から入力された補正された3原色信号R,G,Bの帯域を制限し、色差信号生成マトリクス回路85に出力する。色差信号生成マトリクス回路85は、帯域制限されて補正された3原色信号R,G,Bを、式(1),(2)に代入して色差信号CrO,CbOを生成する。
【0076】
図13は、画像処理部41の第2の構成例を成す補正LUT生成回路81の第2の構成例を示している。補正LUT生成回路81の第2の構成例には、加算器56から緑色信号Gだけが入力される。
【0077】
補正LUT生成回路81の第2の構成例において、ヒストグラム生成回路111は、加算器56から順次入力される緑色信号Gのヒストグラムを画像単位で生成して階調補正LUT生成回路112に出力する。
【0078】
階調補正LUT生成回路112は、ヒストグラム生成回路111から入力される緑色信号Gのヒストグラムを累積して累積ヒストグラムを生成し、それを所定の対数曲線に近似させて図8の曲線Bのような対数近似曲線を得る。さらに、階調補正LUT生成回路112は、対数近似曲線に基づき、3原色信号R,G,Bのそれぞれに対応する補正LUTを生成して、階調補正回路82のLUTメモリ101R乃至101Bに記憶させる。
【0079】
次に、画像処理部41の第2の構成例を成す補正LUT生成回路81の第2の構成例等による階調補正処理について、図14のフローチャートを参照して説明する。この階調補正処理は、加算器56から出力された3原色信号R,G,Bに対して施される。
【0080】
ステップS21において、ヒストグラム生成回路111は、加算器56から順次入力された緑色信号Gのヒストグラムを画像単位で生成して階調補正LUT生成回路112に出力する。
【0081】
ステップS22において、階調補正LUT生成回路112は、ヒストグラム生成回路111から入力された緑色信号Gのヒストグラムを累積して累積ヒストグラムを生成し、それを所定の対数曲線に近似させて図8の曲線Bのような対数近似曲線を得る。さらに、階調補正LUT生成回路112は、対数近似曲線に基づき、3原色信号R,G,Bのそれぞれに対応する補正LUTを生成して、対応するLUTメモリ101R乃至101Bに記憶させる。
【0082】
ステップS23において、LUTメモリ101Rは、加算器56から入力された赤色信号Rを補正LUTに照らし合わせ、得られた補正された赤色信号Rを輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。同様に、LUTメモリ101Gは、補正された緑色信号Gを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力し、LUTメモリ101Bは、補正された青色信号Bを取得して輝度信号生成マトリクス回路83および帯域制限フィルタ84に出力する。
【0083】
ステップS24において、輝度信号生成マトリクス回路83は、階調補正回路82から入力された補正された3原色信号R,G,Bを式(1)に代入することによって輝度信号Yoを生成する。一方、帯域制限フィルタ84は、色差信号Cr,Cbの帯域に合わせるために、階調補正回路82から入力された補正された3原色信号R,G,Bの帯域を制限し、色差信号生成マトリクス回路85に出力する。色差信号生成マトリクス回路85は、帯域制限されて補正された3原色信号R,G,Bを、式(1),(2)に代入して色差信号CrO,CbOを生成する。
【0084】
以上説明したように、画像処理部41の第2の構成例によれば、3原色信号R,G,Bのそれぞれに対して、適切な階調補正を施すことができるので、色相を変化させずに、画像信号のダイナミックレンジを変更することが可能である。
【0085】
なお、本発明は、画像のダイナミックレンジを変更せずに階調を変更させる場合に適用することも可能である。
【0086】
また、本発明は、本実施の形態のようなディジタルカメラのみならず、例えば、スキャナ、ファクシミリ、コピー装置など、画像信号を処理する電子機器に適用することが可能である。
【0087】
ところで、上述した一連の処理は、ハードウェアにより実行させることもできるが、ソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、記録媒体からインストールされる。
【0088】
この記録媒体は、図4に示すように、コンピュータとは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク46(フロッピディスクを含む)、光ディスク47(CD-ROM(Compact Disc-Read Only Memory)、DVD(Digital Versatile Disc)を含む)、光磁気ディスク48(MD(Mini Disc)を含む)、もしくは半導体メモリ49などよりなるパッケージメディアにより構成されるだけでなく、コンピュータに予め組み込まれた状態でユーザに提供される、プログラムが記録されているROMやハードディスクなどで構成される。
【0089】
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に従って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
【0090】
【発明の効果】
以上のように、本発によれば、階調変換後の画像信号に色相の変化が発生することを抑止することが可能となる。
【図面の簡単な説明】
【図1】3原色信号R,G,Bの階調を個別に補正する従来の階調補正処理部の構成の一例を示すブロック図である。
【図2】画像信号のうちの輝度信号Yだけに対して階調補正を行う従来の階調補正処理部の構成の一例を示している。
【図3】輝度信号の階調補正特性を説明するための図である。
【図4】本発明の一実施の形態であるディジタルカメラ30の構成例を示すブロック図である。
【図5】色フィルタ36の一例を示す図である。
【図6】ディジタルカメラ30の画像処理部41の第1の構成例を示すブロック図である。
【図7】補正値演算回路60の構成例を示すブロック図である。
【図8】人の視覚特性に対応した階調補正LUTについて説明するための図である。
【図9】画像処理部41の第1の構成例の階調補正処理を説明するフローチャートである。
【図10】ディジタルカメラ30の画像処理部41の第2の構成例を示すブロック図である。
【図11】図10の補正LUT生成回路81の第1の構成例を示すブロック図である。
【図12】画像処理部41の第2の構成例の階調補正処理を説明するフローチャートである。
【図13】図10の補正LUT生成回路81の第2の構成例を示すブロック図である。
【図14】画像処理部41の第2の構成例の階調補正処理を説明するフローチャートである。
【符号の説明】
30 ディジタルカメラ, 31 レンズ, 32 絞り, 33 シャッタ, 34 赤外線カットフィルタ, 35 ローパスフィルタ, 36 色フィルタ, 37 CCD, 38 CDS, 39 オートゲインコントローラ, 40A/Dコンバータ, 41 画像処理部, 42 タイミングジェネレータ,43 制御部, 44 操作部, 45 ドライブ, 46 磁気ディスク,47 光ディスク, 48 光磁気ディスク, 49 半導体メモリ, 56加算器, 57 輝度信号生成マトリクス回路, 58 帯域制限フィルタ,59 色差信号生成マトリクス回路, 60 補正値演算回路, 61 階調補正回路, 71 ヒストグラム生成回路, 72 補正値LUT生成回路, 73 比較器, 74 補正値LUTメモリ, 81 補正LUT生成回路, 82 階調補正回路, 83 輝度信号マトリクス回路, 84 帯域制限フィルタ, 85 色差信号マトリクス回路, 91 輝度信号合成回路, 92 ヒストグラム生成回路, 93 階調補正LUT生成回路, 101 LUTメモリ, 111ヒストグラム生成回路, 112 階調補正LUT生成回路[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an image processing apparatus and method, and a recording medium. For example, the image processing apparatus is suitable for use in correcting the gradation of an image in conformity with the dynamic range of an image output apparatus such as a display or a printer. And a method and a recording medium.
[0002]
[Prior art]
In recent years, image signal acquisition devices equipped with a solid-state image pickup device (CCD: Charge Coupled Device) such as a digital camera or a scanner have improved the performance of the solid-state image pickup device and can perform exposure in multiple stages. As a result, an image signal having a wider dynamic range of gradation than the conventional one (hereinafter referred to as a wide dynamic range image signal) can be acquired.
[0003]
On the other hand, the recording format of the recording medium for recording the image signal, the output signal format to the display or printer, the broadcast signal format, etc. are still described as the conventional 8-bit width or 10-bit width dynamic range (hereinafter referred to as narrow dynamic range). ).
[0004]
Therefore, when an image signal is output from an electronic device capable of acquiring a wide dynamic range image signal to an electronic device compatible with a conventional narrow dynamic range, it is necessary to correct the gradation of the wide dynamic range image signal. (It is necessary to narrow the dynamic range).
[0005]
Here, a conventional technique for correcting the dynamic range of the image signal will be described.
[0006]
Japanese Patent Laid-Open No. 9-331539 discloses a technique for correcting the dynamic range of an image signal by individually correcting the gradations of the three primary color signals R, G, and B in a broadcast video camera. FIG. 1 shows an example of the configuration of a gradation correction processing unit in such a broadcast video camera. In this gradation correction processing unit, the three primary color signals R, G, and B are input to the correction value calculation circuit 1. The three primary color signals R, G, B are input to the corresponding gradation correction circuits 2R, 2G, 2B, respectively.
[0007]
The correction value calculation circuit 1 generates a luminance signal using the input three primary color signals R, G, and B, calculates a correction value based on the luminance signal, and outputs it to the gradation correction circuits 2R, 2G, and 2B. To do.
[0008]
The gradation correction circuit 2R includes a lookup table (hereinafter referred to as LUT) for correcting the gradation of the red signal R, and the correction value and red signal R input from the correction value calculation circuit 1 are incorporated. Are compared with the built-in LUT and the corresponding value is output to the gamma correction circuit 3 as a correction value. The gradation correction circuit 2G has a built-in LUT for correcting the gradation of the green signal G. The correction value input from the correction value calculation circuit 1 and the green signal G are checked against the built-in LUT. The value to be corrected is output as a correction value to the gamma correction circuit 3. The gradation correction circuit 2B has a built-in LUT for correcting the gradation of the blue signal B, and the correction value input from the correction value calculation circuit 1 and the blue signal B are compared with the built-in LUT. The value to be corrected is output as a correction value to the gamma correction circuit 3.
[0009]
The gamma correction circuit 3R performs gamma correction on the corrected red signal R input from the gradation correction circuit 2R and outputs the corrected red signal R to the matrix circuit 4. The gamma correction circuit 3G performs gamma correction on the corrected green signal G input from the gradation correction circuit 2G and outputs the corrected signal to the matrix circuit 4. The gamma correction circuit 3B performs gamma correction on the corrected blue signal B input from the gradation correction circuit 2B, and outputs it to the matrix circuit 4. The matrix circuit 4 converts the gamma-corrected three primary color signals R, G, and B into a luminance signal Yo and color difference signals CrO and CbO.
[0010]
Since the gradation correction processing unit shown in FIG. 1 performs gradation correction on the three primary color signals R, G, and B at the same ratio, the dynamic range of the image signal is compressed to a desired width without changing the hue. It is possible.
[0011]
However, since the gradation correction processing unit requires the gradation correction circuit 2 and the gamma correction circuit 3 for each of the three primary color signals R, G, and B, they are used as consumer devices (digital cameras, When used in a video camera, a television receiver, etc., there is a problem that the cost increases and the circuit scale increases.
[0012]
Japanese Patent Application Laid-Open No. 11-55598 discloses a technique for correcting the dynamic range of an image signal by performing gradation correction only on the luminance signal Y of the image signal in a television receiver. FIG. 2 shows an example of the configuration of the gradation correction processing unit of such a television receiver.
[0013]
In the gradation correction processing unit, the input luminance signal Y is supplied to the correction value calculation circuit 11, the luminance correction circuit 12, and the color difference correction circuit 13, and the input color difference signals Cr and Cb are supplied to the color difference correction circuit 13. To be supplied.
[0014]
Based on the input luminance signal Y, the correction value calculation circuit 11 calculates a correction value at which gradation correction in the luminance correction circuit 12 is optimally executed and outputs the correction value to the luminance correction circuit 12. The gradation correction circuit 12 has a built-in LUT for correcting the gradation of the luminance signal Y, and compares the correction value and the luminance signal Y input from the correction value calculation circuit 11 with the built-in LUT. The value to be output is output as the correction value Yo. The correction value Yo is also supplied to the color difference correction circuit 13.
[0015]
In order to maintain the ratio of the color difference signals Cr and Cb to the input luminance signal Y, the color difference correction circuit 13 uses Yo / Y, which is the ratio of the luminance signal Y before gradation correction and the luminance signal Yo after correction, as the color difference signal Cr. , Cb is normalized to generate color difference signals CrO, CbO.
[0016]
[Problems to be solved by the invention]
Since the gradation correction processing unit as shown in FIG. 2 performs gradation correction only on the luminance signal Y, the number of components is reduced, and an increase in cost is suppressed and an increase in circuit scale is also suppressed. can do. However, the following problems exist.
[0017]
The first problem is that an error occurs in luminance correction of a pixel having a large color difference signal value. The relationship between the three primary color signals R, G, B and the luminance signal Y or the color difference signals CrO, CbO is as shown in the following equations (1), (2).
Y = 0.30R + 0.59G + 0.11B (1)
Cr = R−Y
Cb = BY (2)
[0018]
In the gradation correction of the luminance signal Y, the information on the color difference signals Cr and Cb is not taken into consideration, but the luminance signal Y lacks information indicating the balance of the three primary color signals R, G and B. The gradation correction of the luminance signal Y is not correctly performed on the pixel in which the balance of the three primary color signals R, G, and B is lost, that is, the pixel having a large color difference.
[0019]
For example, when the input red signal R is the maximum value (assuming 1) and the green signal G and the blue signal B are minimum values (assuming 0), the input luminance signal Y is 0.3. .
[0020]
Such a pixel is converted into a pixel in which the red signal R has the maximum value (assuming 1) and the green signal G and the blue signal B have the minimum values (assuming 0) even after gradation correction. When converted in such a manner, the luminance signal Y of the pixel is 0.3.
[0021]
However, for example, if a luminance correction LUT as shown in FIG. 3 is given to the luminance correction circuit 12, the luminance signal Y = 0.3 is equal to the luminance signal Yo = 0 in accordance with the luminance correction LUT. .6, and an error occurs as compared with an appropriate correction value (Y = 0.3 in this case). Such a phenomenon has a problem that may occur for all pixels other than achromatic colors.
[0022]
The second problem is that the hue changes.
[0023]
Specifically, for example, when the input red signal R has a maximum value and the green signal G and the blue signal B have minimum values, the color difference signal Cr has a maximum value. At this time, when the luminance signal Y = 0.3 is converted to Yo = 0.6 according to the LUT of FIG. 3, the color difference correction circuit 13 sets 2 (= 0.6 / 0.3) to the color difference signal Cr. Will be multiplied. However, since the color difference signal Cr is already the maximum value, it does not change due to the clipping process. On the other hand, the color difference signal Cb that does not take the maximum value is multiplied by 2. As a result, there is a problem that Cr / Y is not kept constant and a change occurs in hue.
[0024]
Even if the Cr / Y value is held without performing the clipping process on the color difference signal Cr, the clipping process is performed on the red signal R when converting to the three primary color signals R, G, and B. As a result, there is a problem that the hue changes.
[0025]
The present invention has been made in view of such a situation, and in the case where gradation correction is performed only for the luminance signal Y of a pixel having a large value of the color difference signal, it is possible to suppress the occurrence of a change in hue. It is to make.
[0026]
[Means for Solving the Problems]
  The image processing apparatus according to the present invention uses a luminance signal of an input image signal to correct a correction value corresponding to a combination of a pixel luminance signal and a larger color difference signal having a larger signal level of two types of color difference signals. Generating means for generating a conversion rule indicating a large color difference with a larger signal level of the luminance signal and the two kinds of color difference signals for each pixel of the input image signal by referring to the generated conversion rule Acquisition means for acquiring a correction value corresponding to the combination with the signal, and correction means for correcting the luminance signal and the color difference signal using the acquired correction value for each pixel of the input image signal,The generation means uses the luminance signal Y and the large color difference signal C as variables, and the maximum signal level that the large color difference signal can take. Cmax Based on a function f (Y, C) represented by the following equation using as a constant, a correction value k is calculated to generate a conversion rule:
k = f (Y, C) = (Ye / Y) ^ (( Cmax -C) / ( Cmax ))
However, Ye is a logarithmic conversion value of the luminance signal Y, and ^ indicates a power.
[0028]
  The generating unit is configured to input an input image signal.Luminance signalCreating means for creating a histogram, accumulating means for accumulating histograms to create a cumulative histogram, approximating means for approximating the cumulative histogram to a predetermined logarithmic curve to generate an approximate curve, and conversion based on the approximate curve Including creation means for creating rules.Can be made.
[0029]
  The correction means includesAcquired for each pixel of the input image signalBy multiplying the correction value,Luminance signalandColor difference signalCan be corrected.
[0030]
  An image processing apparatus according to the present inventionImageIt further includes conversion means for converting to a signal.Can be removed.
[0032]
  The image processing method of the present invention uses a luminance signal of an input image signal to correct a correction value corresponding to a combination of a pixel luminance signal and a larger color difference signal having a larger signal level of two kinds of color difference signals. A generation step for generating a conversion rule indicating a large color difference for each pixel of the input image signal, a luminance signal and a larger color level of the two types of color difference signals by referring to the generated conversion rule An acquisition step of acquiring a correction value corresponding to the combination with the signal;
  A correction step of correcting the luminance signal and the color difference signal using the acquired correction value for each pixel of the input image signal,The generation step uses the luminance signal Y and the large color difference signal C as variables, and the maximum signal level that the large color difference signal can take. Cmax Based on a function f (Y, C) represented by the following equation using as a constant, a correction value k is calculated to generate a conversion rule:
k = f (Y, C) = (Ye / Y) ^ (( Cmax -C) / ( Cmax ))
However, Ye is a logarithmic conversion value of the luminance signal Y, and ^ indicates a power.
[0033]
  The recording medium of the present invention uses the luminance signal of the input image signal to obtain a correction value corresponding to the combination of the pixel luminance signal and the larger color difference signal having the larger signal level of the two types of color difference signals. A large color difference signal having a larger signal level of the luminance signal and the two kinds of color difference signals for each pixel of the input image signal by referring to the generated conversion rule and a generation step for generating the conversion rule to be shown An acquisition step for acquiring a correction value corresponding to the combination of the correction signal, and a correction step for correcting the luminance signal and the color difference signal for each pixel of the input image signal using the acquired correction value,The generation step uses the luminance signal Y and the large color difference signal C as variables, and the maximum signal level that the large color difference signal can take. Cmax Based on a function f (Y, C) represented by the following equation using as a constant, a correction value k is calculated to generate a conversion rule:
k = f (Y, C) = (Ye / Y) ^ (( Cmax -C) / ( Cmax ))
Where Ye is a logarithmically converted value of the luminance signal Y, and ^ indicates a power.A program that causes a computer of the image processing apparatus to execute processing is recorded.
[0034]
  In the present invention, the luminance signal of the input image signal is used, and the correction value corresponding to the combination of the luminance signal of the pixel and the larger color difference signal having the larger signal level of the two types of color difference signals is shown. A conversion rule is generated, and by referring to the generated conversion rule, for each pixel of the input image signal, a combination of the luminance signal and the larger color difference signal having the larger signal level of the two types of color difference signals The correction value corresponding to is acquired, and the luminance signal and the color difference signal are corrected for each pixel of the input image signal using the acquired correction value. In the generation process,Maximum value of signal level that can be taken by large color difference signal with luminance signal Y and large color difference signal C as variables Cmax Based on a function f (Y, C) represented by the following equation using as a constant, a correction value k is calculated and a conversion rule is generated.
k = f (Y, C) = (Ye / Y) ^ (( Cmax -C) / ( Cmax ))
However, Ye is a logarithmic conversion value of the luminance signal Y, and ^ indicates a power.
[0035]
DETAILED DESCRIPTION OF THE INVENTION
A configuration example of a digital camera according to an embodiment of the present invention will be described with reference to FIG. The digital camera 30 uses a single-plate CCD, acquires a light image of a subject as an image signal with a wide dynamic range (for example, 16-bit width), and appropriately selects an image with a narrow dynamic range (for example, 8-bit width). It is converted into a signal and output.
[0036]
The optical system of the digital camera 30 includes a lens 31 for condensing a light image of a subject, a diaphragm 32 for adjusting the light amount of the light image, a shutter 33 for adjusting the incident time of the light image, and an infrared region in which the CCD 37 has high sensitivity. An infrared cut filter (IR filter) 34 that removes light, an optical low-pass filter (LPF) 35 that removes high-frequency components of light to suppress aliasing that occurs when the CCD 37 performs discrete sampling, and four pixels of the CCD 37 Filters of primary colors (red (R), green (G), and blue (B)) arranged as shown in FIG. 5 for each corresponding region, and the three primary colors R, G, and B are extracted from the optical signal. The color filter 36 to extract is comprised.
[0037]
The infrared cut filter 34 may be omitted by applying a coating for removing the infrared region to the lens 31. As the color filter 36, for example, a filter in which complementary color systems (yellow (Ye), cyan (Cy), magenta (Mg)) and green (G) are arranged, for example, other than the one shown in FIG. 5 is used. May be.
[0038]
Further, the digital camera 30 photoelectrically converts an optical image input through the optical system, and outputs a wide dynamic range image signal to the CDS 38. The digital camera 30 reduces noise by sampling the image signal input from the CCD 37. CDS (Corelated Double Sampling) 38, AGC (Auto Gain Controller) 39 that electrically amplifies the amplitude of the image signal in accordance with the brightness of the subject, A / D converter 40 that digitizes the analog image signal, DSP (Digital Signal Processors) and the like, an image processing unit 41 that converts a wide dynamic range digital image signal into a narrow dynamic range digital image signal, a timing generator 42 that generates a horizontal scanning timing and a vertical scanning timing of the CCD 37, and Controlling the drive 45, magnetic disk 46, optical disk 47, light The control program stored in the air disk 48 or the semiconductor memory 49 is read, and the entire digital camera 30 is controlled based on the read control program, a user command input from the operation unit 44, and the like. The control unit 43 is configured.
[0039]
In addition to converting the dynamic range of the input digital image signal, the image processing unit 41 compresses and encodes the input digital image signal as a still image according to a JPEG (Joint Photographic Experts Group) method or the like, and performs predetermined recording media. Or is compressed and encoded as a moving image according to the MPEG (Moving Picture Experts Group) method or the like and recorded on a predetermined recording medium, or an encoded image signal is read from the predetermined recording medium and decoded.
[0040]
In this digital camera 30, the optical image input through the optical system including the lens 31 to the color filter 36 is converted into an image signal with a wide dynamic range by the CCD 37, subjected to noise reduction processing by the CDS 38, and amplitude is processed by the AGC 39. Are further digitized by the A / D converter 40 and input to the image processing unit 41. The wide dynamic range digital image signal input to the image processing unit 41 is converted into a narrow dynamic range digital image signal.
[0041]
Next, FIG. 6 illustrates a first configuration example of the image processing unit 41. One of the three primary color signals R, G, and B digitized for one pixel is input to the image processing unit 41.
[0042]
The white balance circuit (WB) 51 adjusts the primary color signal level of each pixel to adjust the color balance in the image, and outputs it to the gamma correction circuit (γ) 52. The gamma correction circuit 52 performs gamma correction on the primary color signal of each pixel and outputs it to the delay circuit (DL) 53. The delay circuit 53 includes a process in which the RGB interpolation synchronization circuit 54 restores the three primary color signals R, G, and B of each pixel using a predetermined number of pixels in the vicinity, and the aperture correction signal generation circuit 55 has a predetermined value in the vicinity. The phases of the signals of the respective color channels having different sampling phases used for the process of generating the edge enhancement signal using a number of pixels are made to coincide with each other and output to the RGB interpolation synchronization circuit 54 and the aperture correction signal generation circuit 55.
[0043]
The RGB interpolation synchronization circuit 54 restores the three primary color signals R, G, and B corresponding to all the pixels, respectively, so that the red signal R, the green signal G, or the blue signal B of the pixel in the vicinity of the target pixel is obtained. Is used to interpolate the missing color signal, and the phases of the three primary color signals R, G, B corresponding to the pixels are synchronized and output to the adder 56 simultaneously. The aperture correction signal generation circuit 55 generates edge enhancement signals respectively corresponding to all the pixels using the red signal R, the green signal G, or the blue signal B of the pixels in the vicinity of the target pixel, and the adder 56 Output to.
[0044]
The adder 56 performs F-special correction by adding the edge enhancement signal input from the aperture correction signal generation circuit 55 to each of the three primary color signals R, G, and B input from the RGB interpolation synchronization circuit 54. And output to the luminance signal generation matrix circuit 57 and the band limiting filter 58.
[0045]
The luminance signal generation matrix circuit 57 generates the luminance signal Y by substituting the three primary color signals R, G, and B input from the adder 56 into the equation (1), and the correction value calculation circuit 60 and the gradation correction circuit 61. Output to.
[0046]
The band limiting filter 58 limits the bands of the three primary color signals R, G, and B from the adder 56 and outputs them to the color difference signal generation matrix circuit 59 in order to match the bands of the color difference signals Cr and Cb. The color difference signal generation matrix circuit 59 generates the color difference signals Cr and Cb by substituting the band-limited three primary color signals R, G, and B into the equations (1) and (2). Output to the tone correction circuit 61.
[0047]
The correction value calculation circuit 60 calculates the correction value k based on the luminance signal Y input from the luminance signal generation matrix circuit 57 and the color difference signals Cr and Cb input from the color difference signal generation matrix circuit 59 to correct the gradation. Output to the circuit 61.
[0048]
As shown in the following equation (3), the gradation correction circuit 61 uses the correction value k input from the correction value calculation circuit 60, the luminance signal Y input from the luminance signal generation matrix circuit 57, and the color difference signal generation matrix. The color difference signals Cr and Cb input from the circuit 59 are respectively multiplied, and the resulting values are output as corrected luminance signals Yo and color difference signals CrO and CbO.
Yo = k · Y
CrO = k · Cr
CbO = k · Cb (3)
[0049]
Thus, by multiplying the luminance signal Y and the color difference signals Cr and Cb by the same correction value k, the ratio between the color signals is prevented from changing, and when the signal levels of the color difference signals Cr and Cb are large, The correction error of the luminance signal Y can be reduced.
[0050]
FIG. 7 shows a detailed configuration example of the correction value calculation circuit 60. The histogram generation circuit 71 of the correction value calculation circuit 60 generates a histogram of the luminance signal Y sequentially input from the luminance signal generation matrix circuit 57 (frequency distribution with respect to each signal level of the luminance signal Y) for each image, and corrects the correction value. The data is output to the LUT generation circuit 72.
[0051]
The correction value LUT generation circuit 72 is a combination of the luminance signal Y and the color difference signal C (the signal having the larger signal level of the color difference signal Cr and the color difference signal Cb) based on the histogram of the luminance signal Y input from the histogram generation circuit 71. A correction value LUT indicating a correction value k is generated and stored in the correction value LUT memory 74.
[0052]
Specifically, the correction value LUT generation circuit 72 accumulates the histogram of the luminance signal Y input from the histogram generation circuit 71, accumulates the frequency for each signal level of the histogram, and represents the curve A shown in FIG. Generate a cumulative histogram. Further, in consideration of Weber-Fechina's law regarding human visual characteristics (human sensory amount is proportional to logarithm of stimulus intensity), curve A is approximated to a predetermined logarithmic curve to obtain curve B. In FIG. 8, the horizontal axis indicates the input luminance level Y, and the vertical axis indicates the luminance signal level Ye in which the dynamic range of the corrected luminance signal is adapted to the cumulative frequency.
[0053]
Curve B is given by the following equation (4).
Ye = a · log (Y) + b (4)
Here, a and b are predetermined coefficients.
[0054]
Next, the correction value LUT generation circuit 72 generates a correction value LUT indicating the correction value k corresponding to the combination of the luminance signal Y and the color difference signal C expressed by the following equation (5), and stores the correction value LUT in the correction value LUT memory 74. Remember.
[Expression 1]
Figure 0004240261
... (5)
Here, Cmax is the maximum signal level that the color difference signal C can take.
[0055]
Returning to FIG. The comparator 73 compares the signal levels of the color difference signals Cr and Cb input from the color difference signal generation matrix circuit 59 and outputs the higher signal level to the correction value LUT memory 74 as the color difference signal C. The correction value LUT memory 74 stores the correction value LUT from the correction value LUT generation circuit 72. The correction value LUT memory 74 also compares the input combination of the luminance signal Y and the color difference signal C with the correction value LUT, acquires the corresponding correction value k, and outputs it to the gradation correction circuit 61.
[0056]
The gradation correction processing of the first configuration example (FIG. 6) of the image processing unit 41 will be described with reference to the flowchart of FIG. This gradation correction processing is performed on the luminance signal Y output from the luminance signal generation matrix circuit 57 and the color difference signals Cr and Cb output from the color difference signal generation matrix circuit 59.
[0057]
In step S <b> 1, the histogram generation circuit 71 of the correction value calculation circuit 60 generates a histogram of the luminance signal Y input from the luminance signal generation matrix circuit 57 for each image and outputs it to the correction value LUT generation circuit 72. In step S2, the correction value LUT generation circuit 72 generates a correction value LUT indicating the correction value k for the combination of the luminance signal Y and the color difference signal C based on the histogram of the luminance signal Y input from the histogram generation circuit 71. The correction value is stored in the LUT memory 74.
[0058]
In step S <b> 3, the comparator 73 compares the color difference signals Cr and Cb input from the color difference signal matrix circuit 59 and outputs the color signal having the higher signal level to the correction value LUT memory 74 as the color difference signal C. In step S 4, the correction value LUT memory 74 compares the input luminance signal Y and color difference signal C with the correction value LUT, acquires the corresponding correction value k, and outputs it to the gradation correction circuit 61.
[0059]
In step S5, the gradation correction circuit 61 uses the correction value k input from the correction value calculation circuit 60, the luminance signal Y input from the luminance signal generation matrix circuit 57, and the color difference, as shown in Expression (3). The color difference signals Cr and Cb input from the signal generation matrix circuit 59 are respectively multiplied, and the resulting values are corrected and output as luminance signals Yo and color difference signals CrO and CbO.
[0060]
As described above, according to the gradation correction process of the first configuration example of the image processing unit 41, the correction is performed by multiplying the luminance signal Y and the color difference signals Cr and Cb by the same correction value k.
[0061]
Note that the combination of the luminance signal Y and the color difference signal C and the correction value k have the relationship shown in Expression (5). Therefore, for example, when the signal level of the color difference signal C is the maximum value, the correction value k = 1. Therefore, the input luminance signal Y and the color difference signals Cr and Cb are multiplied by k = 1, and the input luminance signal Y and the color difference signals Cr and Cb are directly corrected as the luminance signal Yo and the color difference signal CrO. , CbO. Therefore, it is possible to prevent the hue from changing due to overflow in the corrected color difference signals CrO and CbO.
[0062]
For example, when the signal levels of the color difference signals Cr and Cb are both 0 and the color difference signal C is the minimum value (= 0) (when the pixel is an achromatic color), the equation (5) is expressed as follows: Equation (6) is obtained, and the corrected luminance signal Yo = Ye. That is, for achromatic pixels, gradation correction (curve B in FIG. 8) is performed in consideration of human visual characteristics.
k = Ye / Y (6)
[0063]
Next, FIG. 10 shows a second configuration example of the image processing unit 41. The second configuration example of the image processing unit 41 differs from the first configuration example shown in FIG. In the second configuration example, the adder 56 adds the edge enhancement signal input from the aperture correction signal generation circuit 55 to each of the three primary color signals R, G, and B input from the RGB interpolation synchronization circuit 54. Accordingly, the F special correction is performed, and the result is output to the correction LUT generation circuit 81 and the gradation correction circuit 82.
[0064]
The correction LUT generation circuit 81 generates a correction LUT for correcting each of the three primary color signals R, G, and B based on the three primary color signals R, G, and B input from the adder 56, and performs gradation correction. Output to the circuit 82. The gradation correction circuit 82 stores the correction LUT input from the correction LUT generation circuit 81. The gradation correction circuit 82 also compares the three primary color signals R, G, and B input from the adder 56 with the correction LUT, and generates a luminance signal as the three primary color signals R, G, and B with the corresponding values corrected. The data is output to the matrix circuit 83 and the band limiting filter 84.
[0065]
The luminance signal generation matrix circuit 83 generates the luminance signal Yo by substituting the corrected three primary color signals R, G, and B input from the gradation correction circuit 82 into the equation (1).
[0066]
The band limiting filter 84 limits the band of the corrected three primary color signals R, G, and B input from the gradation correction circuit 82 to match the band of the color difference signals Cr and Cb, and the color difference signal generation matrix circuit 85. Output to. The color difference signal generation matrix circuit 85 generates the color difference signals CrO and CbO by substituting the band limited and corrected three primary color signals R, G, and B into the equations (1) and (2).
[0067]
In the second configuration example of the image processing unit 41 illustrated in FIG. 10, the same reference numerals are given to circuits that are common to the first configuration example illustrated in FIG. 6, and descriptions thereof are omitted. To do.
[0068]
FIG. 11 illustrates a first configuration example of the correction LUT generation circuit 81 that forms the second configuration example of the image processing unit 41. The luminance signal synthesis circuit 91 of the correction LUT generation circuit 81 generates the luminance signal Y by substituting the three primary color signals R, G, and B input from the adder 56 into the equation (1) and outputs the luminance signal Y to the histogram generation circuit 92. To do. The histogram generation circuit 92 generates a histogram of the luminance signal Y sequentially input from the luminance signal synthesis circuit 92 for each image and outputs it to the gradation correction LUT generation circuit 93.
[0069]
The gradation correction LUT generation circuit 93 generates a cumulative histogram by accumulating the histogram of the luminance signal Y input from the histogram generation circuit 92, and approximates it to a predetermined logarithmic curve, as shown by a curve B in FIG. Obtain a logarithmic approximation curve. Further, the gradation correction LUT generation circuit 93 generates correction LUTs corresponding to the three primary color signals R, G, and B based on the logarithmic approximation curve, and stores them in the LUT memories 101R to 101B of the gradation correction circuit 82. Let
[0070]
The LUT memory 101R constituting the gradation correction circuit 82 stores a correction LUT for correcting the red signal R input from the gradation correction LUT generation circuit 93, and corrects the red signal R input from the adder 56. The corrected red signal R is acquired in light of the LUT and output to the luminance signal generation matrix circuit 83 and the band limiting filter 84. The LUT memory 101G stores a correction LUT for correcting the green signal G input from the gradation correction LUT generation circuit 93, and compares the green signal G input from the adder 56 with the correction LUT for correction. The green signal G is acquired and output to the luminance signal generation matrix circuit 83 and the band limiting filter 84. The LUT memory 101B stores a correction LUT for correcting the blue signal B input from the gradation correction LUT generation circuit 93, and compares the blue signal B input from the adder 56 with the correction LUT for correction. The blue signal B is acquired and output to the luminance signal generation matrix circuit 83 and the band limiting filter 84.
[0071]
Next, the tone correction processing by the first configuration example of the correction LUT generation circuit 81 constituting the second configuration example of the image processing unit 41 will be described with reference to the flowchart of FIG. This gradation correction process is performed on the three primary color signals R, G, and B output from the adder 56.
[0072]
In step S11, the luminance signal synthesis circuit 91 of the correction LUT generation circuit 81 generates the luminance signal Y by substituting the three primary color signals R, G, and B input from the adder 56 into the equation (1) to generate a histogram. Output to the circuit 92. In step S <b> 12, the histogram generation circuit 92 generates a histogram of the luminance signal Y sequentially input from the luminance signal synthesis circuit 92 for each image and outputs it to the gradation correction LUT generation circuit 93.
[0073]
In step S13, the gradation correction LUT generation circuit 93 accumulates the histogram of the luminance signal Y input from the histogram generation circuit 92 to generate a cumulative histogram, approximates it to a predetermined logarithmic curve, and curves in FIG. A log approximation curve such as B is obtained. Further, the gradation correction LUT generation circuit 93 generates correction LUTs corresponding to the three primary color signals R, G, and B based on the logarithmic approximation curve, and stores them in the corresponding LUT memories 101R to 101B.
[0074]
In step S <b> 14, the LUT memory 101 </ b> R compares the red signal R input from the adder 56 with the stored correction LUT and the obtained corrected red signal R is sent to the luminance signal generation matrix circuit 83 and the band limiting filter 84. Output. Similarly, the LUT memory 101G acquires the corrected green signal G and outputs it to the luminance signal generation matrix circuit 83 and the band limiting filter 84, and the LUT memory 101B acquires the corrected blue signal B and acquires the luminance signal. The data is output to the generation matrix circuit 83 and the band limiting filter 84.
[0075]
In step S15, the luminance signal generation matrix circuit 83 generates the luminance signal Yo by substituting the corrected three primary color signals R, G, and B input from the gradation correction circuit 82 into Equation (1). On the other hand, the band limiting filter 84 limits the bands of the corrected three primary color signals R, G, and B input from the gradation correction circuit 82 in order to match the bands of the color difference signals Cr and Cb, and the color difference signal generation matrix. Output to the circuit 85. The color difference signal generation matrix circuit 85 generates the color difference signals CrO and CbO by substituting the band limited and corrected three primary color signals R, G, and B into the equations (1) and (2).
[0076]
FIG. 13 shows a second configuration example of the correction LUT generation circuit 81 constituting the second configuration example of the image processing unit 41. Only the green signal G is input from the adder 56 to the second configuration example of the correction LUT generation circuit 81.
[0077]
In the second configuration example of the correction LUT generation circuit 81, the histogram generation circuit 111 generates a histogram of the green signal G sequentially input from the adder 56 for each image and outputs it to the gradation correction LUT generation circuit 112.
[0078]
The gradation correction LUT generation circuit 112 generates a cumulative histogram by accumulating the histogram of the green signal G input from the histogram generation circuit 111, and approximates it to a predetermined logarithmic curve, as shown by a curve B in FIG. Obtain a logarithmic approximation curve. Furthermore, the gradation correction LUT generation circuit 112 generates correction LUTs corresponding to the three primary color signals R, G, and B based on the logarithmic approximation curve, and stores them in the LUT memories 101R to 101B of the gradation correction circuit 82. Let
[0079]
Next, gradation correction processing according to the second configuration example of the correction LUT generation circuit 81 constituting the second configuration example of the image processing unit 41 will be described with reference to the flowchart of FIG. This gradation correction process is performed on the three primary color signals R, G, and B output from the adder 56.
[0080]
In step S <b> 21, the histogram generation circuit 111 generates a histogram of the green signal G sequentially input from the adder 56 for each image and outputs it to the gradation correction LUT generation circuit 112.
[0081]
In step S22, the gradation correction LUT generation circuit 112 generates a cumulative histogram by accumulating the histogram of the green signal G input from the histogram generation circuit 111, and approximates it to a predetermined logarithmic curve to obtain the curve of FIG. A log approximation curve such as B is obtained. Further, the gradation correction LUT generation circuit 112 generates correction LUTs corresponding to the three primary color signals R, G, and B based on the logarithmic approximation curve, and stores them in the corresponding LUT memories 101R to 101B.
[0082]
In step S23, the LUT memory 101R compares the red signal R input from the adder 56 with the correction LUT, and outputs the corrected red signal R obtained to the luminance signal generation matrix circuit 83 and the band limiting filter 84. . Similarly, the LUT memory 101G acquires the corrected green signal G and outputs it to the luminance signal generation matrix circuit 83 and the band limiting filter 84, and the LUT memory 101B acquires the corrected blue signal B and acquires the luminance signal. The data is output to the generation matrix circuit 83 and the band limiting filter 84.
[0083]
In step S24, the luminance signal generation matrix circuit 83 generates the luminance signal Yo by substituting the corrected three primary color signals R, G, and B input from the gradation correction circuit 82 into Equation (1). On the other hand, the band limiting filter 84 limits the bands of the corrected three primary color signals R, G, and B input from the gradation correction circuit 82 in order to match the bands of the color difference signals Cr and Cb, and the color difference signal generation matrix. Output to the circuit 85. The color difference signal generation matrix circuit 85 generates the color difference signals CrO and CbO by substituting the band limited and corrected three primary color signals R, G, and B into the equations (1) and (2).
[0084]
As described above, according to the second configuration example of the image processing unit 41, appropriate gradation correction can be performed on each of the three primary color signals R, G, and B, so that the hue is changed. Without changing the dynamic range of the image signal.
[0085]
Note that the present invention can also be applied to the case where the gradation is changed without changing the dynamic range of the image.
[0086]
The present invention can be applied not only to a digital camera as in the present embodiment, but also to an electronic device that processes image signals, such as a scanner, a facsimile, and a copying apparatus.
[0087]
By the way, the series of processes described above can be executed by hardware, but can also be executed by software. When a series of processing is executed by software, a program constituting the software may execute various functions by installing a computer incorporated in dedicated hardware or various programs. For example, it is installed from a recording medium in a general-purpose personal computer or the like.
[0088]
As shown in FIG. 4, the recording medium is distributed to provide a program to the user separately from the computer, and includes a magnetic disk 46 (including a floppy disk) on which the program is recorded, an optical disk 47 (CD- ROM (Compact Disc-Read Only Memory), DVD (including Digital Versatile Disc)), magneto-optical disk 48 (including MD (Mini Disc)), or semiconductor memory 49, etc. It is configured by a ROM, a hard disk or the like on which a program is recorded, which is provided to the user in a state of being pre-installed in the computer.
[0089]
In the present specification, the step of describing the program recorded in the recording medium is not limited to the processing performed in time series according to the described order, but is not necessarily performed in time series, either in parallel or individually. The process to be executed is also included.
[0090]
【The invention's effect】
  As aboveLightAccording totoneIt is possible to prevent the hue change from occurring in the converted image signal.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating an example of a configuration of a conventional gradation correction processing unit that individually corrects gradations of three primary color signals R, G, and B;
FIG. 2 shows an example of a configuration of a conventional gradation correction processing unit that performs gradation correction only on a luminance signal Y of image signals.
FIG. 3 is a diagram for explaining gradation correction characteristics of a luminance signal.
FIG. 4 is a block diagram illustrating a configuration example of a digital camera 30 according to an embodiment of the present invention.
5 is a diagram illustrating an example of a color filter 36. FIG.
6 is a block diagram illustrating a first configuration example of an image processing unit 41 of the digital camera 30. FIG.
7 is a block diagram showing a configuration example of a correction value calculation circuit 60. FIG.
FIG. 8 is a diagram for explaining a gradation correction LUT corresponding to a human visual characteristic.
FIG. 9 is a flowchart illustrating tone correction processing of the first configuration example of the image processing unit 41;
10 is a block diagram illustrating a second configuration example of the image processing unit 41 of the digital camera 30. FIG.
11 is a block diagram illustrating a first configuration example of a correction LUT generation circuit 81 in FIG. 10;
FIG. 12 is a flowchart for explaining gradation correction processing of the second configuration example of the image processing unit 41;
13 is a block diagram showing a second configuration example of the correction LUT generation circuit 81 of FIG.
FIG. 14 is a flowchart illustrating tone correction processing of the second configuration example of the image processing unit 41;
[Explanation of symbols]
30 Digital Camera, 31 Lens, 32 Aperture, 33 Shutter, 34 Infrared Cut Filter, 35 Low Pass Filter, 36 Color Filter, 37 CCD, 38 CDS, 39 Auto Gain Controller, 40 A / D Converter, 41 Image Processing Unit, 42 Timing Generator , 43 control unit, 44 operation unit, 45 drive, 46 magnetic disk, 47 optical disk, 48 magneto-optical disk, 49 semiconductor memory, 56 adder, 57 luminance signal generation matrix circuit, 58 band limiting filter, 59 color difference signal generation matrix circuit , 60 correction value calculation circuit, 61 gradation correction circuit, 71 histogram generation circuit, 72 correction value LUT generation circuit, 73 comparator, 74 correction value LUT memory, 81 correction LUT generation circuit, 82 gradation Positive circuit, 83 luminance signal matrix circuit, 84 band limiting filter, 85 color difference signal matrix circuit, 91 luminance signal synthesis circuit, 92 histogram generation circuit, 93 gradation correction LUT generation circuit, 101 LUT memory, 111 histogram generation circuit, 112 floor Adjustment correction LUT generation circuit

Claims (7)

画像信号の階調を補正する画像処理装置において、
入力された前記画像信号の輝度信号を用いて、画素の前記輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則を生成する生成手段と、
生成された前記変換規則を参照することにより、入力された前記画像信号の画素毎、前記輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する前記補正値を取得する取得手段と、
入力された前記画像信号の画素毎、取得された前記補正値を用いて前記輝度信号および前記色差信号を補正する補正手段とを含み、
前記生成手段は、前記輝度信号Y、および前記大色差信号Cを変数とし、前記大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、前記補正値kを算出して前記変換規則を生成する
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す
画像処理装置。
In an image processing apparatus that corrects the gradation of an image signal,
Using the luminance signal of the input image signal, a conversion rule indicating a correction value corresponding to a combination of the luminance signal of the pixel and the larger color difference signal having the larger signal level of the two types of color difference signals is generated. Generating means for
By referring to the generated conversion rule, each pixel of the input image signal corresponds to a combination of the luminance signal and the larger color difference signal having the larger signal level of the two types of color difference signals. An acquisition means for acquiring a correction value;
Correction means for correcting the luminance signal and the color difference signal using the acquired correction value for each pixel of the input image signal,
The generating means uses the luminance signal Y and the large color difference signal C as variables, and a function f (Y, C) shown in the following equation using the maximum signal level Cmax that the large color difference signal can take as a constant. Based on this, the conversion value is generated by calculating the correction value k.
k = f (Y, C) = (Ye / Y) ^ (( Cmax− C) / ( Cmax ))
However, Ye is a logarithmically converted value of the luminance signal Y, and ^ is an image processing device indicating a power .
前記変換規則は、ルックアップテーブルである
請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the conversion rule is a lookup table.
前記生成手段は、
入力された前記画像信号の前記輝度信号のヒストグラムを作成する作成手段と、
前記ヒストグラムを累積して、累積ヒストグラムを作成する累積手段と、
前記累積ヒストグラムを所定の対数曲線に近似させて近似曲線を生成する近似手段と、
前記近似曲線に基づいて前記変換規則を作成する作成手段と
を含む
請求項に記載の画像処理装置。
The generating means includes
Creating means for creating a histogram of the luminance signal of the input image signal;
Accumulating means for accumulating the histogram to create a cumulative histogram;
Approximation means for approximating the cumulative histogram to a predetermined logarithmic curve to generate an approximate curve;
The image processing apparatus according to claim 1 , further comprising: a creating unit that creates the conversion rule based on the approximate curve.
前記補正手段は、
入力された前記画像信号の画素毎、取得された前記補正値を乗算することにより、前記輝度信号および前記色差信号を補正する
ことを特徴とする請求項1に記載の画像処理装置。
The correction means includes
The image processing apparatus according to claim 1, wherein the luminance signal and the color difference signal are corrected by multiplying the acquired correction value for each pixel of the input image signal.
被写体の光学像を画像信号に変換する変換手段を
さらに含む請求項1に記載の画像処理装置。
The image processing apparatus according to claim 1, further comprising conversion means for converting an optical image of a subject into an image signal.
画像信号の階調を補正する画像処理装置の画像処理方法において、
入力された前記画像信号の輝度信号を用いて、画素の前記輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則を生成する生成ステップと、
生成された前記変換規則を参照することにより、入力された前記画像信号の画素毎、前記輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する前記補正値を取得する取得ステップと、
入力された前記画像信号の画素毎、取得された前記補正値を用いて前記輝度信号および前記色差信号を補正する補正ステップとを含み、
前記生成ステップは、前記輝度信号Y、および前記大色差信号Cを変数とし、前記大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、前記補正値kを算出して前記変換規則を生成する
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す
画像処理方法。
In the image processing method of the image processing apparatus for correcting the gradation of the image signal,
Using the luminance signal of the input image signal, a conversion rule indicating a correction value corresponding to a combination of the luminance signal of the pixel and the larger color difference signal having the larger signal level of the two types of color difference signals is generated. Generating step to
By referring to the generated conversion rule, each pixel of the input image signal corresponds to a combination of the luminance signal and the larger color difference signal having the larger signal level of the two types of color difference signals. An acquisition step of acquiring a correction value;
A correction step of correcting the luminance signal and the color difference signal using the acquired correction value for each pixel of the input image signal,
In the generating step, the function f (Y, C) shown in the following equation using the luminance signal Y and the large color difference signal C as variables and the maximum value Cmax of the signal level that the large color difference signal can take as a constant is used. Based on this, the conversion value is generated by calculating the correction value k.
k = f (Y, C) = (Ye / Y) ^ (( Cmax− C) / ( Cmax ))
However, Ye is a logarithmic conversion value of the luminance signal Y, and ^ is an image processing method indicating a power .
画像信号の階調を補正する画像処理装置の制御用のプログラムであって、
入力された前記画像信号の輝度信号を用いて、画素の前記輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する補正値を示す変換規則を生成する生成ステップと、
生成された前記変換規則を参照することにより、入力された前記画像信号の画素毎、前記輝度信号と2種類の色差信号のうちの信号レベルが大きい方の大色差信号との組み合わせに対応する前記補正値を取得する取得ステップと、
入力された前記画像信号の画素毎、取得された前記補正値を用いて前記輝度信号および前記色差信号を補正する補正ステップとを含み、
前記生成ステップは、前記輝度信号Y、および前記大色差信号Cを変数とし、前記大色差信号が取り得る信号レベルの最大値 Cmax を定数として用いた次式に示す関数f(Y,C)に基づき、前記補正値kを算出して前記変換規則を生成する
k=f(Y,C)=(Ye/Y)^(( Cmax −C)/( Cmax ))
ただし、Yeは、輝度信号Yの対数変換値であり、^は累乗を示す
処理を画像処理装置のコンピュータに実行させるプログラムが記録されている記録媒体。
A program for controlling an image processing apparatus for correcting the gradation of an image signal,
Using the luminance signal of the input image signal, a conversion rule indicating a correction value corresponding to a combination of the luminance signal of the pixel and the larger color difference signal having the larger signal level of the two types of color difference signals is generated. Generating step to
By referring to the generated conversion rule, each pixel of the input image signal corresponds to a combination of the luminance signal and the larger color difference signal having the larger signal level of the two types of color difference signals. An acquisition step of acquiring a correction value;
A correction step of correcting the luminance signal and the color difference signal using the acquired correction value for each pixel of the input image signal,
In the generating step, the function f (Y, C) shown in the following equation using the luminance signal Y and the large color difference signal C as variables and the maximum value Cmax of the signal level that the large color difference signal can take as a constant is used. Based on this, the conversion value is generated by calculating the correction value k.
k = f (Y, C) = (Ye / Y) ^ (( Cmax− C) / ( Cmax ))
However, Ye is a logarithm conversion value of the luminance signal Y, and ^ is a recording medium on which a program for causing the computer of the image processing apparatus to execute a process indicating a power is recorded.
JP2000322229A 2000-10-23 2000-10-23 Image processing apparatus and method, and recording medium Expired - Fee Related JP4240261B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000322229A JP4240261B2 (en) 2000-10-23 2000-10-23 Image processing apparatus and method, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000322229A JP4240261B2 (en) 2000-10-23 2000-10-23 Image processing apparatus and method, and recording medium

Publications (2)

Publication Number Publication Date
JP2002135584A JP2002135584A (en) 2002-05-10
JP4240261B2 true JP4240261B2 (en) 2009-03-18

Family

ID=18800139

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000322229A Expired - Fee Related JP4240261B2 (en) 2000-10-23 2000-10-23 Image processing apparatus and method, and recording medium

Country Status (1)

Country Link
JP (1) JP4240261B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4774757B2 (en) * 2004-09-17 2011-09-14 株式会社ニコン Image processing apparatus, image processing program, electronic camera, and image processing method
JP5003196B2 (en) * 2007-02-19 2012-08-15 ソニー株式会社 Image processing apparatus and method, and program
JP4342590B1 (en) 2008-03-26 2009-10-14 株式会社東芝 Pixel conversion apparatus and conversion method thereof
JP4853524B2 (en) * 2009-01-06 2012-01-11 三菱電機株式会社 Image processing device
JP5877693B2 (en) * 2011-11-18 2016-03-08 株式会社キーエンス Image processing sensor, image processing method, and computer program
JP5932068B1 (en) 2015-01-06 2016-06-08 オリンパス株式会社 Image processing apparatus, imaging apparatus, image processing method, and image processing program

Also Published As

Publication number Publication date
JP2002135584A (en) 2002-05-10

Similar Documents

Publication Publication Date Title
JP4003399B2 (en) Image processing apparatus and method, and recording medium
US8208038B2 (en) Image signal processing device and image signal processing method
US7057653B1 (en) Apparatus capable of image capturing
US9438875B2 (en) Image processing apparatus, image processing method, and program
US7030913B2 (en) White balance control apparatus and method, and image pickup apparatus
US5548330A (en) Image pickup device for generating a corrected luminance signal
US8081239B2 (en) Image processing apparatus and image processing method
WO2007058126A1 (en) Image processing system and image processing program
JP2007110576A (en) Color correction device for subject image data and control method thereof
US20070229682A1 (en) Imaging apparatus, video signal processing circuit, video signal processing method and computer program product
JP4544308B2 (en) Image processing apparatus, imaging apparatus, method, and program
JP3969836B2 (en) Signal processing apparatus and imaging signal processing method
JP2004363853A (en) Method and device for reducing noise of image signal
JP2004328564A (en) Color correcting apparatus, color correcting method, color correcting program, and digital camera using color correcting apparatus
JP4240261B2 (en) Image processing apparatus and method, and recording medium
JPH11313338A (en) Signal processor and photographing signal processing method
JP2005142832A (en) Outline correcting circuit and imaging unit
JP2001238129A (en) Image processing apparatus and recording medium
JP2007288573A (en) Chroma suppress processing device
JP2001189945A (en) Image pickup device
JP3837881B2 (en) Image signal processing method and electronic camera
JP3578246B2 (en) Solid-state imaging device
US8854256B2 (en) Image capture apparatus and method of controlling the same
JP2004096444A (en) Image processor and method thereof
JP3865127B2 (en) Signal processing apparatus and method, recording medium, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080410

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080415

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080616

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080821

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081010

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081217

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees