[go: up one dir, main page]

JP3865127B2 - Signal processing apparatus and method, recording medium, and program - Google Patents

Signal processing apparatus and method, recording medium, and program Download PDF

Info

Publication number
JP3865127B2
JP3865127B2 JP2002055824A JP2002055824A JP3865127B2 JP 3865127 B2 JP3865127 B2 JP 3865127B2 JP 2002055824 A JP2002055824 A JP 2002055824A JP 2002055824 A JP2002055824 A JP 2002055824A JP 3865127 B2 JP3865127 B2 JP 3865127B2
Authority
JP
Japan
Prior art keywords
signal
correction
histogram
luminance signal
gain
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
JP2002055824A
Other languages
Japanese (ja)
Other versions
JP2003259206A (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 JP2002055824A priority Critical patent/JP3865127B2/en
Publication of JP2003259206A publication Critical patent/JP2003259206A/en
Application granted granted Critical
Publication of JP3865127B2 publication Critical patent/JP3865127B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は信号処理装置および方法、記録媒体、並びにプログラムに関し、特に、入力信号または出力信号のヒストグラムに基づいて、補正パターンのゲインを制御することにより、回路規模の拡大、または、ソフトウェアの処理による負荷の増加を抑えながら、より効果的な階調変換を行うことができるようにした、信号処理装置および方法、記録媒体、並びにプログラムに関する。
【0002】
【従来の技術】
従来、例えば、デジタルカメラ、テレビジョン受像機、またはプリンタ等の画像信号を処理する装置においては、入力された画像信号に様々な処理を行う。
【0003】
図1は、従来のビデオカメラの構成例を示す図である。
【0004】
図1に示すビデオカメラ1において、図示せぬ被写体からの光はレンズ部11を介して、図2に示すように、前面にイエロー(Ye)、シアン(Cy)、マゼンタ(Mg)、およびグリーン(G)フィルタがモザイク状に配列された補色系フィルタが装着された、CCD(Charge Coupled Device)等を用いた撮像素子により構成されるCCD12に入射され、光電変換される。
【0005】
CCD12は、受光部において光電変換した映像信号を出力し、AGC(Automatic Gain Control)回路13に供給する。AGC回路13は、内蔵するCDS(Correlated Double Sampling circuit)(図示せず)において入力された映像信号に相関二重サンプリングを施してノイズを除去した後、映像信号のゲインを調整し、そのゲインが調整された映像信号をA/D(Analog / Digital)変換回路14に供給する。
【0006】
A/D変換回路14は、入力されたアナログ信号をデジタル信号に変換し、1Hディレーライン回路15に出力する。1Hディレーライン回路15は、入力された映像信号を1ライン遅延させ、Y信号生成回路16に出力する。
【0007】
Y信号生成回路16は、入力された映像信号の、隣り合う画素に対応する映像信号同士を加算することで、映像信号の輝度信号(以下、Y信号と称する)を生成する。
【0008】
また、1Hディレーライン回路21は、1Hディレーライン回路15の出力信号をさらに1ライン遅延させる。加算器22は、1Hディレーライン回路21の出力信号およびA/D変換回路14の出力を合成し、垂直アパーチャ補正回路31に供給する。垂直アパーチャ補正回路31は、垂直方向のハイパスフィルタにより構成され、1Hディレーライン回路15および加算器22より取得した映像信号に基づいて、垂直アパーチャ補正信号信号を生成する。
【0009】
水平アパーチャ補正回路32は、水平方向のハイパスフィルタにより構成され、Y信号生成回路16より取得したY信号に基づいて、水平アパーチャ補正信号を生成する。生成された垂直アパーチャ補正信号および水平アパーチャ補正信号は、図示は省略するがマイクロコンピュータ80によりそれぞれのゲインが調整された後、加算器33により加算され、さらに加算器34においてY信号に加算される。
【0010】
ニー回路35は、加算器34より出力されたY信号を取得すると、図3に示す曲線131のようにY信号の高輝度域の振幅特性を抑えることにより、CCD出力のダイナミックレンジを圧縮し、ガンマ補正回路36に出力する。
【0011】
ガンマ補正回路36は、ニー回路35より供給されたY信号のガンマ特性を、モニタの出力特性に合わせて補正し、ホワイトクリップ回路(以下、WC(White Clip)回路と称する)37に出力する。
【0012】
WC回路37は、ガンマ補正が行われたY信号のホワイトクリップを行い、D/A変換回路38に供給する。D/A(Digital / Analog)変換回路38は、入力されたデジタル信号であるY信号をアナログ信号に変換し、加算器61に供給する。
【0013】
また、YC信号生成回路41は、1Hディレーライン回路15および加算器22の出力を取得すると、上述したY信号の他に、入力した信号の、対応する画素が隣り合う値で差分をとり、2種類の色差信号(以下、Cr信号またはCy信号と称する)を生成する。
【0014】
RGBマトリクス回路42は、YC信号生成回路41より取得したY信号、Cr信号、およびCy信号を、赤(Red)成分、青(Blue)成分、および緑(Green)成分からなるRGB信号に変換し、ホワイトバランス回路(以下、WB(White Balance)回路と称する)43に供給する。
【0015】
WB回路43は、入力されたRGB信号の色温度を調整する。ガンマ補正回路44は、WB回路43から出力されたRGB信号のガンマ特性を、モニタの出力特性に合わせて補正し、エンコーダ回路45に出力する。エンコーダ回路45は、NTSC(National Television System Committee)またはPAL(Phase Alternating Line)等の信号規格に沿うように、取得したRGB信号を色差信号に変換し、図示せぬサブキャリア信号を用いて変調する。D/A変換回路46は、エンコーダ回路45が出力した色差信号をアナログ信号に変換し、加算器61に供給する。
【0016】
加算器61は、同期信号発生回路51により生成される同期信号とともに、供給されたY信号および色差信号を合成し、テレビジョン信号であるVBS(Video Burst Sync signal)信号を生成し、出力端子62を介して出力させる。
【0017】
また、YC信号生成回路41の出力を取得したAE(Auto Exposure)検波回路71は、マイクロコンピュータ80より供給された検波枠設定情報に基づいて、検波枠内のY信号について1フィールド分を積分し、その積分値をマイクロコンピュータ80に供給する。
【0018】
積分値を供給されたマイクロコンピュータ80は、積分値に基づいて、レンズ部11、タイミングジェネレータ回路(以下、TG(Timing Generator)回路と称する)81、AGC回路13の動作を制御する。TG回路81は、マイクロコンピュータ80に制御され、CCD12の駆動を制御する。
【0019】
また、ホワイトバランス検波回路(以下、WB検波回路と称する)72は、RGBマトリクス回路42からの出力であるRGB信号を取得すると、マイクロコンピュータより取得した検波枠設定情報に基づいて、検波枠内のRGB信号について1フィールド分を積分し、その積分値をマイクロコンピュータ80に供給する。マイクロコンピュータ80は、供給された積分値に基づいて、色温度を調整するためのRGBのゲインバランスを計算し、WB回路43を制御して、RGB信号のゲインを調整する。
【0020】
さらに、マイクロコンピュータ80には、必要に応じて、ドライブ90が接続され、磁気ディスク91、光ディスク92、光磁気ディスク93、或いは半導体メモリ94などが適宜装着され、それらから読み出されたコンピュータプログラムが、必要に応じてマイクロコンピュータ80に内蔵されるRAM等にインストールされる。
【0021】
以上のようなビデオカメラ1において、通常撮影の場合、マイクロコンピュータ80は、AE検波回路71より取得した検波信号である検波枠内の積分値に基づいて、撮影画像のAEレベルを管理し、撮影画像のAEレベルが目標AEレベルよりも明るいと判定した場合、レンズ部11を制御して絞りを絞ったり、TG回路81を制御してCCD12の電子シャッター機能を作動させ、CCD12における露光量を調整させたり、AGC回路13を制御して映像信号の増幅を抑えたりする。
【0022】
【発明が解決しようとする課題】
しかしながら、この場合、例えば、屋内において、屋内よりも明るい屋外を見通す窓の側に立つ人物を撮像するような逆光撮影の場合、取り込んだ撮影画像全体のAE検波レベルが屋外の明るいエリアと屋内の暗いエリアの平均となってしまうので、このAE検波レベルに基づいて調整されたときの撮影画像は、屋内のエリアが暗くなりすぎてしまう場合があった。
【0023】
これに対して、撮影環境が逆光状態であると判定した場合、マイクロコンピュータ80が各部を制御して、露光量が大きくなるように制御することで撮影対象である人物が適正な振幅レベルになるようにするという方法がある。
【0024】
しかしながら、この場合、撮影画像におけるもともと明るい屋外のエリアはさらに明るくなってしまい、白飛びしてしまう等の弊害が発生してしまうという課題があった。
【0025】
図4は、撮影画像が白飛びを発生させる様子を示す図である。直線141は、露光量を調整する前の、入射光の明るさと撮影画像に対応する信号レベルの関係を示し、曲線142は、露光量を調整した後の、入射光の明るさと撮影画像に対応する信号レベルの関係を示す。また、屋内の明るさが点A1であり、屋外の明るさが点A3であるとする。
【0026】
図4において、露光量調整前における、点A1に対応する信号レベルは点B1であり、点A3に対応する信号レベルは点B3である。すなわち、撮影画像における屋内のエリアの信号レベルB1は、屋外のエリアの信号レベルB3と比較して非常に小さいので、上述したように、撮影画像の屋内のエリアが暗すぎてしまう結果になる。
【0027】
そこで、上述したように屋内のエリアが明るくなるように露光量を調整した場合、入射光の明るさと撮影画像に対応する信号レベルの関係は曲線142になる。従って、点A1に対応する信号レベルは点B2となり、調整前よりも明るくなる。しかしながら、この場合、点A2以上の明るさにおいて、信号レベルはB4の最大レベルになるので、明るさが点A3である撮影画像の屋外のエリアで白飛びが発生してしまう。
【0028】
以上のような問題に対して、多重露光を用いて、露光量を明るい屋外に合わせた場合と、暗い屋内に合わせた場合とで撮影を行い、これらの撮影画像を適応的に合成させることで、撮影画像のダイナミックレンジを広く取る方法がある。
【0029】
しかしながら、この場合、撮像デバイスを倍速で駆動したり、画像合成のために大規模な回路を用意したりする必要があるという課題があった。
【0030】
また、限られた階調を有効利用するための信号処理として、撮影画像の画像信号に対してヒストグラムの分布を均一にするヒストグラム等化を行う場合があるが、この処理によって、全ての撮影画像の見た目が良くなるとは限らないという課題もあった。
【0031】
本発明はこのような状況に鑑みてなされたものであり、回路規模の拡大、または、ソフトウェアの処理による負荷の増加を抑えながら、より効果的な階調変換を行うことができるようにしたものである。
【0032】
【課題を解決するための手段】
本発明の撮像装置は、入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正手段と、輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出手段と、ヒストグラム算出手段により算出されたヒストグラムに基づいて、補正手段による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定手段と、補正手段による補正により得られた補正後信号のそれぞれと、ゲイン決定手段により決定されたゲインのそれぞれを乗算する乗算手段と、乗算手段による乗算の結果に基づいて、入力された輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成手段とを備えることを特徴とする。
【0033】
前記補正パターンは、互いに異なる複数の関数により構成され、補正手段は、関数のそれぞれについて、輝度信号を補正して補正後信号を得るようにすることができる。
【0034】
前記補正パターンは、互いに異なる、少なくとも1つの凸を含む曲線の関数により構成され、補正手段は、関数のそれぞれについて、輝度信号を補正して補正後信号を得ることができる。
【0035】
前記補正パターンは、互いに係数の異なる複数の正弦関数を含み、補正手段は、正弦関数のそれぞれについて、輝度信号を補正して補正後信号を得るようにすることができる。
【0036】
前記補正パターンは、輝度信号の振幅レベルの中央より明るい側と暗い側とで、それぞれ、階調を調整する第1の補正パターン、および、振幅レベルを3分割し、それぞれのレベルで階調を調整する第2の補正パターンにより構成され、補正手段は、第1の補正パターンを用いて輝度信号を補正し、第1の補正信号を得るとともに、第2の補正パターンを用いて輝度信号を補正し、第2の補正信号を得るようにすることができる。
【0037】
前記補正手段は、補正パターンを記憶する記憶手段を備えるようにすることができる。
【0038】
前記記憶手段により記憶されている補正パターンは、入力された輝度信号と、補正後信号との関係を示すルックアップテーブルにより構成されるようにすることができる。
【0039】
前記ヒストグラム算出手段は、輝度信号に対応する画像の一部、または全部からなる所定の領域について、ヒストグラムを算出するようにすることができる。
【0040】
前記ヒストグラム算出手段は、算出したヒストグラムに基づいて、輝度信号の信号レベルの小さい方から度数を累積させた度数分布であるヒストグラム累積度数分布をさらに算出するようにすることができる。
【0041】
前記ゲイン決定手段は、ヒストグラム算出手段により算出されたヒストグラム累積度数分布と、補正後信号の階調特性との差が最小となるように、ゲインを決定するようにすることができる。
【0042】
前記出力用輝度信号生成手段は、乗算手段による乗算の結果のそれぞれを加算する第1の加算手段と、第1の加算手段による加算結果と輝度信号を加算し、出力用輝度信号を生成する第2の加算手段とを備えるようにすることができる。
【0043】
本発明の信号処理方法は、入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正ステップと、輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出ステップと、ヒストグラム算出ステップの処理により算出されたヒストグラムに基づいて、補正ステップの処理による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定ステップと、補正ステップの処理による補正により得られた補正後信号のそれぞれと、ゲイン決定ステップの処理により決定されたゲインのそれぞれを乗算する乗算ステップと、乗算ステップの処理による乗算の結果に基づいて、入力された輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成ステップとを含むことを特徴とする。
【0044】
本発明の記録媒体のプログラムは、入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正ステップと、輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出ステップと、ヒストグラム算出ステップの処理により算出されたヒストグラムに基づいて、補正ステップの処理による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定ステップと、補正ステップの処理による補正により得られた補正後信号のそれぞれと、ゲイン決定ステップの処理により決定されたゲインのそれぞれを乗算する乗算ステップと、乗算ステップの処理による乗算の結果に基づいて、入力された輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成ステップとを含むことを特徴とする。
【0045】
本発明のプログラムは、入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正ステップと、輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出ステップと、ヒストグラム算出ステップの処理により算出されたヒストグラムに基づいて、補正ステップの処理による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定ステップと、補正ステップの処理による補正により得られた補正後信号のそれぞれと、ゲイン決定ステップの処理により決定されたゲインのそれぞれを乗算する乗算ステップと、乗算ステップの処理による乗算の結果に基づいて、入力された輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成ステップとをコンピュータに実現させる。
【0046】
本発明の信号処理装置および方法、記録媒体、並びにプログラムにおいては、入力された輝度信号に対して、互いに異なる補正パターンで補正が行われ、複数の補正後信号を得られ、輝度信号に対応する画像のヒストグラムが算出され、算出されたヒストグラムに基づいて、補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインが決定され、補正により得られた補正後信号のそれぞれと、決定されたゲインのそれぞれが乗算され、乗算の結果に基づいて、入力された輝度信号に階調補正を施した出力用輝度信号が生成される。
【0047】
信号処理装置は、独立した装置であってもよいし、例えば、記録再生装置、撮像装置、または表示装置等の映像信号を扱うその他の装置の信号処理を行うブロックであってもよい。
【0048】
【発明の実施の形態】
図5は、本発明を適用したビデオカメラの基本的な構成例を示すブロック図である。なお、図1を用いて説明したのと同様の構成を有する部分については、その説明は省略する。
【0049】
図5に示すビデオカメラ200において、図示せぬ被写体からの光は、マイクロコンピュータ204に絞りを制御されたレンズ部11を介して、図示せぬ、被写体の高周波成分(細かい被写体)を光学的に除去する光学LPF(Low Pass Filter)、赤外線をカットする赤外カットフィルタ、および、図2に示すような色配列が施された補色フィルタを通して、補色単板CCDを用いたCCD12に入射し、光電変換される。CCD12は、マイクロコンピュータ204に制御されたTG回路81に駆動を制御され、入射光を光電変換した電荷を、図2に示すように、フィールド読み出し方式で2ラインずつ加算して読み出す。
【0050】
すなわち、図2において、読み出しライン121−1において、光電素子105および101に対応する電荷が合成された信号(G+Cy)、光電素子106および102に対応する電荷が合成された信号(Mg+Ye)、光電素子107および103に対応する電荷が合成された信号(G+Cy)、並びに、光電素子108および104に対応する電荷が合成された信号(Mg+Ye)が、水平レジスタ125を介して出力される。
【0051】
また、同様に、読み出しライン121−2において、光電素子113および109に対応する電荷が合成された信号(Mg+Cy)、光電素子114および110に対応する電荷が合成された信号(G+Ye)、光電素子115および111に対応する電荷が合成された信号(Mg+Cy)、並びに、光電素子116および112に対応する電荷が合成された信号(G+Ye)が、水平レジスタ125を介して出力される。
【0052】
さらに、同様に、読み出しライン122−1において、光電素子109および105に対応する電荷が合成された信号(Cy+G)、光電素子110および106に対応する電荷が合成された信号(Ye+Mg)、光電素子111および107に対応する電荷が合成された信号(Cy+G)、並びに、光電素子112および108に対応する電荷が合成された信号(Ye+Mg)が、水平レジスタ125を介して出力される。
【0053】
このように出力された映像信号は、図1を用いて説明したように、AGC回路13、A/D変換回路14、および1Hディレーライン回路15を介して、Y信号生成回路16に供給される。
【0054】
Y信号生成回路16は、上述した映像信号について、隣同士を加算する。すなわち、読み出しライン121−1において、以下の式(1)ように合成され、輝度信号(Y)が生成される。
【0055】
Y={(G+Cy)+(Mg+Ye)}/2=(2B+3G+2R)/2・・・(1)
ただし、Cy,Mg、およびYeは以下のようにする。
Cy=G+B・・・(2)
Mg=R+B・・・(3)
Ye=G+R・・・(4)
【0056】
同様に、Cy,Mg、およびYeが式(2)乃至式(4)のように表される場合、読み出しライン121−2においては式(5)のように、読み出しライン122−1においては式(6)のように合成される。
【0057】
Y={(Mg+Cy)+(G+Ye)}/2=(2B+3G+2R)/2・・・(5)
Y={(Cy+G)+(Ye+Mg)}/2=(2B+3G+2R)/2・・・(6)
【0058】
以上のように生成されたY信号は、加算器34において、水平アパーチャ補正信号および垂直アパーチャ補正信号と合成され、輪郭補正が行われたあと、階調変換回路201に供給される。
【0059】
また、1Hディレーライン回路15および1Hディレーライン回路21の出力信号を取得したYC信号生成回路41は、式(1)、式(5)、および式(6)に示すようなY信号を生成するとともに、上述した映像信号について、隣同士の差分を算出し、色差信号(CrおよびCb)を生成する。すなわち、読み出しライン121−1において、以下の式(7)および式(8)ように合成され、色差信号(CrおよびCb)が生成される。
【0060】
Cr={(Mg+Ye)−(G+Cy)}=2R−G・・・(7)
Cb={(G+Ye)−(Mg+Cy)}=2B−G・・・(8)
【0061】
以上のように生成されたY信号、Cr信号、およびCy信号は、階調変換回路201に供給される。図6に、階調変換回路201の詳細な構成例を示す。
【0062】
垂直アパーチャ補正回路31より出力された垂直アパーチャ補正信号は、加算器33により、水平アパーチャ補正回路32より出力された水平アパーチャ補正信号と合成され、アパーチャ補正信号として、階調変換回路201に入力される。
【0063】
また、Y信号生成回路16より出力されたY信号は、加算器34において、上述したアパーチャ補正信号と合成され、入力Y信号として、階調変換回路201に入力される。
【0064】
階調変換回路201に入力された入力Y信号は、信号処理部211に供給され、信号処理部211により、予め定められた補正パターンに基づいて補正される。補正パターンは、信号処理部211が内蔵するROM211Aにより記憶されている。なお、信号処理部211がRAMを内蔵するようにし、その内蔵するRAMが補正パターンを記憶するようにしてもよい。また、信号処理部211が予め定められた補正パターンで入力信号を補正できるような演算回路を有するようにしてもよい。
【0065】
信号処理部211が内蔵するROM211Aには、2種類の補正パターンが記憶されており、信号処理部211は、それぞれの補正パターンで入力Y信号を補正し、それぞれ異なる加算器に出力する。
【0066】
ROM211に記憶されている2種類の補正パターンは、後述するように、それぞれ、互いに異なる関数により構成されている。第1の補正パターンは、画像の振幅レベルを中央で分割し、明るい側と暗い側の階調を調整する、図7に示すような関数で構成されており、第2の補正パターンは、画像の振幅レベルを3つに分割し、それぞれの階調を調整する、図8に示すような関数で構成されている。
【0067】
図7は、第1の補正パターンを構成する関数の例を示すグラフである。
【0068】
図7において、曲線261乃至264は、第1の補正パターンを構成し、以下に示す式(9)および式(10)で表される関数をグラフにしたものである。
【0069】
【数1】

Figure 0003865127
【0070】
ここで、横軸は入力信号を0乃至1に正規化したものとし、nは予め定められた定数であり、偶数とする。また、αは、値dlt1の定義域内の最大値を1に正規化するための正規化定数である。図7の曲線261は式(9)に対応し、曲線262はn=2の場合の式(10)に対応し、曲線263はn=4の場合の式(10)に対応し、曲線264はn=6の場合の式(10)に対応するグラフである。
【0071】
図8は、第2の補正パターンを構成する関数の例を示すグラフである。
【0072】
図8において、曲線271乃至274は、第2の補正パターンを構成し、以下に示す式(12)および式(13)で表される関数をグラフにしたものである。
【0073】
【数2】
Figure 0003865127
【0074】
ここで、横軸は入力信号を0乃至1に正規化したものとし、nは予め定められた定数であり、奇数とする。また、αは、値dlt2の定義域内の最大値を1に正規化するための正規化定数である。図8の曲線271は式(12)に対応し、曲線272はn=1の場合の式(13)に対応し、曲線273はn=3の場合の式(12)に対応し、曲線274はn=5の場合の式(13)に対応するグラフである。
【0075】
信号処理部211は、以上のような補正パターンにおいて、入力Y信号を補正するが、これらの関数を回路で実現する場合、その演算回路の規模が大きくなってしまうので、これらの関数を表現するルックアップテーブルを作成し、内蔵するROMまたはRAMなどで記憶させるようにする方が好ましい。
【0076】
信号処理部211は、第1の補正パターンを用いて補正した入力Y信号である第1基本補正後信号を乗算器213に出力し、第2の補正パターンを用いて補正した入力Y信号である第2基本補正後信号を乗算器212に出力する。
【0077】
マイクロコンピュータ204は、信号処理部211による第1の補正パターンを用いた補正の度合いを決定する係数である第1ゲイン、および、信号処理部211による第2の補正パターンを用いた補正の度合いを決定する係数である第2ゲインの値を、後述するように決定する。そして、マイクロコンピュータ204は、決定した第1ゲインおよび第2ゲインを、それぞれ、第1ゲイン信号および第2ゲイン信号として、乗算器213および乗算器212に供給する。
【0078】
乗算器213は、マイクロコンピュータ204より供給された第1ゲイン信号、および信号処理部211より出力された第1基本補正後Y信号の乗算を行い、第1乗算済みY信号として、加算器214に供給する。乗算器212は、同様に、マイクロコンピュータ204より供給された第2ゲイン信号、および、信号処理部211より出力された第2基本補正後Y信号の乗算を行い、第2乗算済みY信号として、加算器214に供給する。
【0079】
加算器214は、乗算器213より供給された第1乗算済みY信号、および、乗算器212より供給された第2乗算済みY信号を加算し、第1の補正パターンおよび第2の補正パターンを用いた補正に関する全補正量が含まれる補正後Y信号として加算器223に供給する。
【0080】
ところで、階調変換回路201に入力されたアパーチャ補正信号は、乗算器221において、マイクロコンピュータ204において設定されて供給された、アパーチャ補正信号用のゲイン信号である第3ゲイン信号と乗算され、乗算済みアパーチャ補正信号として、加算器222に供給される。
【0081】
加算器222は、乗算器221より供給された乗算済みアパーチャ補正信号、および、入力Y信号とを加算し、アパーチャ補正済みY信号として、加算器223に供給する。
【0082】
階調変換回路201の入力信号である入力Y信号は、加算器34において、アパーチャ補正信号が加算されているが、階調変換を受けて階調の抑えられた部分においては、アパーチャ補正信号も同様に抑えられてしまうため、その部分の色の境目がぼやけてしまう。しかしながら、加算器222において、第3ゲイン信号を乗算することにより、最終的に階調補正を施していない状態にした乗算済みアパーチャ補正信号を加算することにより、階調が少なくなった部分も相対的にエッジの強調された、見た目の画質が向上した画像を得ることができる。
【0083】
加算器223は、加算器223より供給されたアパーチャ補正済みY信号と、加算器214より供給された補正後Y信号とを加算し、階調変換処理を施した出力Y信号として、ニー回路35に出力する。その後、Y信号は、図1において説明した場合と同様の処理が行われ、出力端子62よりVBS信号として出力される。
【0084】
なお、同期信号発生回路203は、図5に示すように加算器61にアナログの同期信号を供給する以外にも、Y信号の垂直方向アドレス情報、水平方向アドレス情報、または、動作のタイミングを制御する情報等を含むデジタルの同期信号を生成し、各部に供給する。
【0085】
以上のようにして、階調変換回路201は、撮影画像のY信号に対して階調補正を施す。
【0086】
また、階調変換回路201には、スイッチ回路231が内蔵されている。スイッチ回路231は、マイクロコンピュータ204によりスイッチ回路制御信号を用いて制御され、出力する信号を切り替えることにより、入力Y信号および出力Y信号を時分割的にヒストグラム算出回路202に供給する。
【0087】
上述したように、マイクロコンピュータ204は、第1ゲインおよび第2ゲインを算出し、それぞれ、第1ゲイン信号および第2ゲイン信号として階調補正変換回路201に供給することで、階調補正変換回路201がY信号の階調を補正する度合いを制御する。このとき、マイクロコンピュータ204は、ヒストグラム算出回路202において算出されたY信号のヒストグラムに基づいて、第1ゲインおよび第2ゲインを算出する。ヒストグラム算出回路202は、入力された入力Y信号または出力Y信号に基づいて、そのY信号のヒストグラムを算出する。
【0088】
図9は、ヒストグラム算出回路202の詳細な構成例を示す図である。
【0089】
図9において、出力Y信号は、階調変換回路201によりヒストグラム算出回路202の比較器301乃至303に供給される。また、それとともに、マイクロコンピュータ204は、値Laを比較器301に供給し、値LaおよびLbを比較器302に供給し、値Lbを比較器303に供給する。このとき式(15)が成り立つ。なお、Lmaxは、予め定められたY信号の最大信号レベルである。
【0090】
0<La<Lb<Lmax ・・・(15)
【0091】
比較器301は、階調変換回路201より供給された出力Y信号の信号レベルINを、マイクロコンピュータ204より供給された値0および値Laと比較し、以下に示す式(16)で表される条件を満たす場合、値が「1」の信号をANDゲート311に供給する。
【0092】
0≦IN<La ・・・(16)
【0093】
なお、出力Y信号の信号レベルINが式(16)を満たさない場合、比較器301は、値が「0」の信号をANDゲート311に供給する。
【0094】
また、同様に、比較器302は、階調変換回路201より供給された出力Y信号の信号レベルINを、マイクロコンピュータ204より供給された値Laおよび値Lbと比較し、以下に示す式(17)で表される条件を満たす場合、値が「1」の信号をANDゲート312に供給する。
【0095】
La≦IN<Lb ・・・(17)
【0096】
なお、出力Y信号の信号レベルINが式(17)を満たさない場合、比較器302は、値が「0」の信号をANDゲート312に供給する。
【0097】
さらに、同様に、比較器303は、階調変換回路201より供給された出力Y信号の信号レベルINを、マイクロコンピュータ204より供給された値Lbおよび値Lmaxと比較し、以下に示す式(18)で表される条件を満たす場合、値が「1」の信号をANDゲート313に供給する。
【0098】
Lb≦IN≦Lmax ・・・(18)
【0099】
なお、出力Y信号の信号レベルINが式(18)を満たさない場合、比較器303は、値が「0」の信号をANDゲート313に供給する。
【0100】
また、同期信号発生回路203は、図5において説明したビデオカメラ200の各部の動作するタイミングを制御しており、さらに、ヒストグラム算出回路202に供給される出力Y信号の水平方向アドレス情報Hadrおよび垂直方向アドレス情報Vadrを、出力Y信号がヒストグラム算出回路202に供給されるタイミングに合わせて、ヒストグラム算出回路202が内蔵する比較器304に供給する。
【0101】
さらに、マイクロコンピュータ204は、ヒストグラムを生成する領域の境界線の座標である境界設定値Hs,He,Vs、およびVeをヒストグラム算出回路202の比較器304に供給する。
【0102】
ヒストグラム算出回路202の比較器304は、同期信号203より供給された出力Y信号のアドレス情報HadrおよびVadrを取得し、マイクロコンピュータ204より、領域の境界線の座標である境界設定値Hs,He,Vs、およびVeを取得すると、それらを比較し、以下に示す式(19)および式(20)で表される条件を満たす場合、値が「1」の信号をANDゲート311乃至313に供給する。
【0103】
Hs≦IN<He ・・・(19)
Vs≦IN<Ve ・・・(20)
【0104】
なお、同期信号発生回路203より供給される、出力Y信号のアドレス情報HadrおよびVadrが、式(19)および式(20)の条件を満たさない場合、比較器304は、値「0」の信号をANDゲート311乃至313に供給する。
【0105】
ANDゲート311は、入力された2つの信号の値がともに「1」である場合、値が「1」の信号をカウンタ321に供給する。また、それ以外の場合、ANDゲート311は、値が「0」の信号をカウンタ321に供給する。
【0106】
また、同様に、ANDゲート312は、入力された2つの信号の値がともに「1」である場合、値が「1」の信号をカウンタ322に供給し、それ以外の場合、値が「0」の信号をカウンタ322に供給する。
【0107】
さらに、ANDゲート313も同様に、入力された2つの信号の値がともに「1」である場合は値が「1」の信号を、それ以外の場合は値が「0」の信号をカウンタ323に供給する。
【0108】
カウンタ321乃至323は、値が「1」の信号を入力された回数をカウントする。また、カウンタ321乃至323は、図示は省略するが、同期信号発生回路203より出力Y信号のアドレス情報を供給されており、1フィールド分の出力Y信号についてカウントしたと判定すると、それぞれ、カウント結果であるヒストグラム値をマイクロコンピュータ204に供給する。
【0109】
マイクロコンピュータ204は、それらのヒストグラム値に基づいて、出力Y信号のヒストグラムを生成する。
【0110】
また、階調変換回路201は、時分割的に、出力Y信号とともに入力Y信号をヒストグラム算出回路202に供給しており、そのとき、同期信号発生回路203も出力Y信号の場合と同様に、入力Y信号に対応するアドレス情報をヒストグラム算出回路202に供給する。
【0111】
ヒストグラム算出回路202は、上述した出力Y信号についての場合と同様に、入力Y信号に対するヒストグラム値を算出し、1フィールド毎にマイクロコンピュータ204に供給する。そして、マイクロコンピュータ204は、それらのヒストグラム値に基づいて、入力Y信号に対するヒストグラムを生成する。
【0112】
以上のようにして、マイクロコンピュータ204は、階調変換回路201の入力信号である入力Y信号、および、階調変換回路201の出力信号である出力Y信号に対応するヒストグラム値を取得し、後述するように、第1ゲインおよび第2ゲインの値を決定するためのヒストグラムを生成することができる。
【0113】
次に、図10のフローチャートを参照して、Y信号の階調を変換する階調変換処理について説明する。
【0114】
最初に、ステップS1において、マイクロコンピュータ204は、ヒストグラム算出回路202においてヒストグラム値を算出する検波領域を設定する。マイクロコンピュータ204は、検波領域を設定し、その領域の境界線の座標である境界設定値Hs,He,Vs、およびVeをヒストグラム算出回路202に供給する。ヒストグラム算出回路202は、取得した境界設定値に基づいて、撮影画像のうち、マイクロコンピュータ204が設定した検波領域内に対応する入力Y信号および出力Y信号について、ヒストグラム値を算出する。
【0115】
検波領域を設定したマイクロコンピュータ204は、ステップS2において、ゲインの値を設定する。マイクロコンピュータ204は、後述するように、ヒストグラム算出回路202より取得したヒストグラム値に基づいて、入力Y信号および出力Y信号のヒストグラムを生成し、そのヒストグラムに基づいて、第1ゲイン、第2ゲイン、および第3ゲインの値を設定する。
【0116】
ステップS3において、階調変換回路201は、Y信号補正処理を実行する。Y信号補正処理については、図11のフローチャートを参照して後述する。
【0117】
そして、ステップS4において、階調変換回路201は、アパーチャ補正処理を実行する。アパーチャ補正処理については、図12のフローチャートを参照して後述する。
【0118】
Y信号補正処理およびアパーチャ補正処理を終了した階調変換回路201は、ステップS5において、補正後Y信号およびアパーチャ補正済みY信号を加算し、出力Y信号を生成する。
【0119】
マイクロコンピュータ204は、ステップS6において、同期信号生成回路203より供給される同期信号に基づいて、階調変換回路201が1フィールド分のY信号の階調を変換したか否かを判定する。マイクロコンピュータ204は、階調変換回路201が階調を変換したY信号が1フィールド分に達しておらず、1フィールド分のY信号の階調をまだ変換していないと判定した場合、ステップS3に戻り、それ以降の処理を繰り返す。
【0120】
階調変換回路201が1フィールド分のY信号の階調を変換したと判定した場合、マイクロコンピュータ204は、ステップS7に進み、同期信号生成回路203より供給される同期信号に基づいて、Y信号の入力が終了したか否かを判定する。
【0121】
Y信号の入力が終了していないと判定した場合、マイクロコンピュータ204は、ステップS2に戻り、それ以降の処理を繰り返す。また、Y信号の入力が終了したと判定した場合、マイクロコンピュータ204は、階調変換処理を終了する。
【0122】
次に、図11のフローチャートを参照して、図10のステップS3において実行されるY信号補正処理について説明する。
【0123】
階調変換回路201は、ステップS21において、2種類の補正パターンで入力Y信号の基本補正を行い、第1基本補正後Y信号および第2基本補正後Y信号を生成する。階調変換回路201は、上述したように、入力Y信号に式(9)および式(10)の関数で表される第1の補正パターンを加算することで基本補正を行い、第1基本補正後Y信号を生成するとともに、入力Y信号に式(12)および式(13)の関数で表される第2の補正パターンを加算することで基本補正を行い、第2基本補正後Y信号を生成する。
【0124】
そして、ステップS22において、階調変換回路201は、第1基本補正後Y信号および、マイクロコンピュータ204より供給された第1ゲイン信号を乗算し、第1乗算済みY信号を生成する。さらに、ステップS23において、階調変換回路201は、第2基本補正後Y信号および、マイクロコンピュータ204より供給された第2ゲイン信号を乗算し、第2乗算済みY信号を生成する。
【0125】
階調変換回路201は、ステップS24において、生成した第1乗算済みY信号および第2乗算済みY信号を加算し、補正後Y信号を生成する。そして、補正後Y信号を生成した階調変換回路201は、Y信号補正処理を終了し、図10のステップS4に進む。
【0126】
次に、図10のステップS4において実行されるアパーチャ補正処理について、図12のフローチャートを参照して説明する。
【0127】
最初に、階調変換回路201は、ステップS41において、アパーチャ補正信号、および、マイクロコンピュータ204に供給された第3ゲイン信号を乗算し、乗算済みアパーチャ補正信号を生成する。
【0128】
そして、階調変換回路201は、ステップS42に進み、乗算済みアパーチャ補正信号および入力Y信号を加算し、アパーチャ補正済みY信号を生成する。アパーチャ補正済みY信号を生成した階調変換回路201は、アパーチャ補正処理を終了し、図10のステップS5に進む。
【0129】
以上のようにして、Y信号の階調を補正する処理が行われる。
【0130】
次に、ヒストグラム算出回路202によるヒストグラム積分処理について、図13乃至図15のフローチャートを参照して説明する。
【0131】
最初に、ヒストグラム算出回路202は、ステップS61において、マイクロコンピュータ204に供給されたヒストグラム値の算出に用いる検波領域、第1の閾値、および第2の閾値を設定する。
【0132】
ヒストグラム算出回路202は、階調変換回路201より入力Y信号または出力Y信号からなる入力信号を取得し、取得した入力信号に対応するアドレス信号を同期信号発生回路203より取得する。
【0133】
ヒストグラム算出回路202は、ステップS62において、入力信号および入力信号に対応するアドレス信号を取得したか否かを判定し、取得したと判定するまで待機する。
【0134】
そして、ステップS63において、ヒストグラム算出回路202は、同期信号発生回路203より取得したアドレス信号に基づいて、取得した入力信号が、マイクロコンピュータ204に供給された検波領域内であるか否かを判定する。検波領域内ではないと判定した場合、ヒストグラム算出回路202は、図15のステップS81に進む。また、検波領域内であると判定した場合、ヒストグラム算出回路202は、ステップS64に進む。
【0135】
ステップS64において、ヒストグラム算出回路202は、取得した入力信号の値が、0より大きく、かつ、マイクロコンピュータ204に供給された第1の閾値以下であるか否かを判定する。入力信号の値が0より大きく、かつ、第1の閾値以下であると判定した場合、ヒストグラム算出回路202は、ステップS65に進み、同期信号発生回路203より取得したアドレス信号に基づいて、入力信号が入力Y信号であるか否かを判定する。
【0136】
入力信号が入力Y信号であると判定した場合、ヒストグラム算出回路202は、ステップS66に進み、入力Y信号に対応するヒストグラム値である第1入力ヒストグラム値をカウントアップし、図15のステップS81に進む。
【0137】
図13のステップS65において、入力信号が出力Y信号であり、入力Y信号ではないと判定した場合、ヒストグラム算出回路202は、ステップS67に進み、出力Y信号に対応するヒストグラム値である第1出力ヒストグラム値をカウントアップし、図15のステップS81に進む。
【0138】
また、ステップS64において、入力信号が0以下である、または第1の閾値より大きいと判定した場合、ヒストグラム算出回路202は、図14のステップS71に進む。
【0139】
図14のステップS71において、ヒストグラム算出回路202は、取得した入力信号の値が、マイクロコンピュータ204に供給された第1の閾値より大きく、かつ、マイクロコンピュータ204に供給された第2の閾値以下であるか否かを判定する。入力信号の値が第1の閾値より大きく、かつ、第2の閾値以下であると判定した場合、ヒストグラム算出回路202は、ステップS72に進み、同期信号発生回路203より取得したアドレス信号に基づいて、入力信号が入力Y信号であるか否かを判定する。
【0140】
入力信号が入力Y信号であると判定した場合、ヒストグラム算出回路202は、ステップS73に進み、入力Y信号に対応するヒストグラム値である第2入力ヒストグラム値をカウントアップし、図15のステップS81に進む。
【0141】
図14のステップS72において、入力信号が出力Y信号であり、入力Y信号ではないと判定した場合、ヒストグラム算出回路202は、ステップS74に進み、出力Y信号に対応するヒストグラム値である第2出力ヒストグラム値をカウントアップし、図15のステップS81に進む。
【0142】
また、ステップS71において、入力信号が第1の閾値以下である、または第2の閾値より大きいと判定した場合、図14のステップS75に進む。
【0143】
図14のステップS75において、ヒストグラム算出回路202は、取得した入力信号の値が、マイクロコンピュータ204に供給された第2の閾値より大きく、かつ、予め設定されている入力信号の最大値以下であるか否かを判定する。入力信号の値が第2の閾値より大きく、かつ、最大値以下であると判定した場合、ヒストグラム算出回路202は、ステップS76に進み、同期信号発生回路203より取得したアドレス信号に基づいて、入力信号が入力Y信号であるか否かを判定する。
【0144】
入力信号が入力Y信号であると判定した場合、ヒストグラム算出回路202は、ステップS777に進み、入力Y信号に対応するヒストグラム値である第3入力ヒストグラム値をカウントアップし、図15のステップS81に進む。
【0145】
図14のステップS76において、入力信号が出力Y信号であり、入力Y信号ではないと判定した場合、ヒストグラム算出回路202は、ステップS78に進み、出力Y信号に対応するヒストグラム値である第3出力ヒストグラム値をカウントアップし、図15のステップS81に進む。
【0146】
また、ステップS75において、入力信号が第2の閾値以下である、または最大値より大きいと判定した場合、図14のステップS79に進み、エラー処理を実行し、図15のステップS81に進む。
【0147】
図15のステップS81において、ヒストグラム算出回路202は、同期信号発生回路203より供給される入力信号のアドレス情報に基づいて、1フィールド分の信号について処理を行ったか否かを判定する。行っていないと判定した場合、ヒストグラム算出回路202は、図13のステップS62に戻り、それ以降の処理を繰り返す。
【0148】
1フィールド分の信号について処理を行ったと判定した場合、ヒストグラム算出回路202は、ステップS82において、算出した第1乃至第3入力ヒストグラム値、並びに、第1乃至第3出力ヒストグラム値をマイクロコンピュータ204に供給し、ステップS83において、カウンタをリセットする。
【0149】
そして、ヒストグラム算出回路202は、ステップS84において、入力が終了したか否かを判定し、終了していないと判定した場合、図13のステップS61に戻り、それ以降の処理を繰り返す。また、入力が終了したと判定した場合、ヒストグラム算出回路202は、ヒストグラム積分処理を終了する。
【0150】
次に、マイクロコンピュータ204が第1ゲイン、第2ゲイン、および第3ゲインの値を設定するゲイン調整処理について、図16のフローチャートを参照して説明する。
【0151】
最初に、マイクロコンピュータ204は、ステップS101において、ヒストグラム算出回路202より第1乃至第3入力ヒストグラム値、並びに、第1乃至第3ヒストグラム値からなるヒストグラム値を取得したか否かを判定し、取得したと判定するまで待機する。
【0152】
ヒストグラム値を取得したと判定した場合、マイクロコンピュータ204は、ステップS102に進み、取得したヒストグラム値より、正規化ヒストグラム累積度数分布情報を算出する。
【0153】
図17は、マイクロコンピュータ204が算出する正規化ヒストグラム累積度数分布情報をグラフで表した図である。
【0154】
図17において、横軸は、ヒストグラム値の算出に用いられたY信号の信号レベルであり、縦軸は、カウントされた度数であるヒストグラム値を表す。ここで、横軸および縦軸の値は、それぞれ、最大値が「1」となるように正規化されている。また、直線351は、理想的な累積度数分布を示す累積度数分布を表しており、曲線352は、ヒストグラム値に基づいて算出された累積度数分布を表している。
【0155】
例えば、図17が、出力Y信号に対する累積度数分布情報を表したグラフである場合、点C1に対する累積度数D2は、ヒストグラム算出回路202においてカウントされた第1出力ヒストグラム値であり、点C2に対する累積度数D3は、ヒストグラム算出回路202においてカウントされた第1および第2出力ヒストグラム値を加算した値であり、点C3に対する累積度数D5は、ヒストグラム算出回路202においてカウントされた第1乃至第3出力ヒストグラム値を加算した値である。なお、入力Y信号に対する累積度数分布情報をグラフで表す場合も同様である。
【0156】
これに対して、理想的な累積度数分布の場合、点C1乃至点C3に対する累積度数は、それぞれ、D1,D4,D5となり、全ての信号レベルに均一に分布する。
【0157】
図16に戻り、正規化ヒストグラム累積度数分布情報を算出したマイクロコンピュータ204は、ステップS103において、算出した正規化ヒストグラム累積度数分布情報の、理想累積度数分布情報との差分を算出する。
【0158】
図18は、正規化ヒストグラム累積度数分布情報の、理想累積度数分布情報との差分をグラフに表した図である。
【0159】
図18において、横軸は、Y信号の信号レベルを示し、縦軸は、理想累積度数分布との差分を表している。また、直線361は、基準となる理想累積度数分布を示し、曲線362は、正規化ヒストグラム累積度数分布情報を表している。
【0160】
例えば、図18が、出力Y信号に対する累積度数分布情報の、理想累積度数分布情報との差分を表したグラフである場合、点E1に対する差分値F2は、ヒストグラム算出回路202においてカウントされた第1出力ヒストグラム値の、理想累積度数との差分値(D2−D1)であり、点E2に対する差分値F1は、ヒストグラム算出回路202においてカウントされた第1および第2出力ヒストグラム値を加算した値の、理想累積度数との差分値(D3−D4)である。なお、点E3に対する差分は、ヒストグラム値を合計した全累積度数と理想累積度数分布における全累積度数との比較であるので、その差分値は「0」となっている。なお、入力Y信号に対する累積度数分布情報の、理想累積度数分布情報との差分をグラフで表す場合も同様に表す。
【0161】
マイクロコンピュータ204は、階調変換回路201において入力Y信号に対して施す補正量が、図18に示した曲線362と近似するように第1ゲインおよび第2ゲインの値を設定する。これにより、撮影画像に対して、ヒストグラム等化処理を施した場合と同様の効果を得ることができる。
【0162】
階調変換回路201において、階調の補正量は、以下の式(21)で表すことができる。
【0163】
階調補正量=Gb×sin(2π×n/N)+Ga×sin(π×n/N) ・・・(21)
ただし、
1≦n≦N ・・・(22)
【0164】
式(21)において、Gaは第1ゲインの値、Gbは第2ゲインの値を示しており、Nは、ヒストグラム算出回路202において、Y信号の信号レベルを分割した数であるヒストグラム分割数である。すなわち、上述した例の場合、ヒストグラム分割数Nの値は「3」である。
【0165】
マイクロコンピュータ204が算出する、第1入力ヒストグラム値乃至第n入力ヒストグラム値を合計した正規化累積度数、または、第1出力ヒストグラム値乃至第n出力ヒストグラム値を合計した正規化累積度数をH[n]とし、H[n]の、完全に均等に分布された理想累積度数との差分をh[n]とすると、h[n]は以下の式(23)で表される。
【0166】
h[n]=H[n]−n/N ・・・(23)
【0167】
式(23)において、h[n]は、ヒストグラム値と平均度数との差分値と等価である。
【0168】
マイクロコンピュータ204は、式(21)に示す階調補正量と、式(23)に示すh[n]との差分が最小になるように、GaおよびGbを決定する。これにより、階調補正回路201は、Y信号に対して、ダイナミックレンジを有効に活用しながら、階調を改善することができる。ただし、マイクロコンピュータ204は、単純にこの差を最小にするのではなく、逆光補正に適した形でGaおよびGbの値を決定する。
【0169】
ところで、式(21)において、階調補正量を構成する右辺第2項による補正は、逆光状態の撮影画像を見やすくするための補正であり、右辺第1項による補正は、撮影画像のY信号がダイナミックレンジを有効に使用するための補正である。従って、マイクロコンピュータ204は、逆光補正重視の階調補正を行うために、最初に、最小2乗法を用いて、従来のガンマ補正と同様の効果を施す式(21)の右辺第2項の係数Gaを決定する。
【0170】
マイクロコンピュータ204は、ヒストグラム算出回路202より取得したヒストグラム値に対応する全ての信号レベルについて、補正量の2乗誤差Errを算出する。Gaに対応する2乗誤差をErrGaとすると、ErrGaは、以下の式(24)のように表される。
【0171】
【数3】
Figure 0003865127
【0172】
式(24)をnについて微分した値が「0」となる場合、この誤差が最小となる。式(24)をnについて微分した式を以下の式(25)に示す。
【0173】
【数4】
Figure 0003865127
【0174】
マイクロコンピュータ204は、式(25)において、ErrGa´の値を「0」にするように、Gaの値を算出する。これにより、階調補正回路201は、Y信号に対して、逆光補正を目的とした階調補正を行うことができる。
【0175】
次に、マイクロコンピュータ204は、式(21)の右辺第1項の係数Gbを求めるために、Gaの場合と同様に、補正量の2乗誤差Errを計算する。Errは、以下の式(26)のように表される。
【0176】
【数5】
Figure 0003865127
【0177】
ここで、Gaは既に求められているため、以下のように式(27)を定義する。
【0178】
【数6】
Figure 0003865127
【0179】
式(27)を用いて式(26)を表すと、式(26)は、以下の式(28)のように表される。
【0180】
【数7】
Figure 0003865127
【0181】
式(28)は、式(24)と同様の構成であるので、マイクロコンピュータ204は、Gaを算出した回路、またはプログラム等を用いて、Gbを求めることができる。これにより、マイクロコンピュータ204は、第1ゲインおよび第2ゲインの算出に必要な回路またはプログラムの規模を最小限に抑えることができる。
【0182】
図16に戻り、マイクロコンピュータ204は、ステップS104において、上述したように、ステップS103において算出された差分値に基づいて、最小2乗法により第1ゲインの値Gaを算出する。
【0183】
そして、ステップS105において、マイクロコンピュータ204は、上述したように算出された第1ゲインの値に基づいて、最小2乗法により第2ゲインの値Gbを算出する。
【0184】
第1ゲインおよび第2ゲインの値を算出したマイクロコンピュータ204は、ステップS106において、算出された第1ゲインおよび第2ゲインの値に基づいて、第3ゲインの値を算出し、ゲイン調整処理を終了する。
【0185】
算出された第1ゲイン乃至第3ゲインの値は、それぞれ、第1ゲイン信号乃至第3ゲイン信号として、マイクロコンピュータ204により階調補正回路201に供給される。階調補正回路201は、供給された第1ゲイン信号乃至第3ゲイン信号に基づいて、Y信号に対して逆光補正を重視した階調補正を行う。これにより、最適な撮影画像を得ることができる。
【0186】
図19は、撮影画像に上述したような階調補正を行った場合の、入射光の明るさと撮影画像に対応する信号レベルの関係を示す図である。
【0187】
図19において、直線381は、階調補正を行う前の、入射光の明るさと撮影画像に対応する信号レベルの関係を示し、曲線382は、露光量を調整しただけの場合の、入射光の明るさと撮影画像に対応する信号レベルの関係を示し、曲線391は、階調補正を行った後の入射光の明るさと撮影画像に対応する信号レベルの関係を示す。また、屋内の明るさが点G1であり、屋外の明るさが点G3であるとする。
【0188】
このとき、階調補正後における点G1に対応する信号レベルは、露光量を調整しただけの場合と同様の点H2であり、点G3に対応する信号レベルは、階調補正前の信号レベルと同様の点H3になる。すなわち、上述したような階調補正を行った場合、明るさの変化に対する信号レベルの変化の度合いを変えることが出来るため、撮影画像における屋内のエリアの信号レベルについてのみ、点H1から点H2に引き上げることができ、屋外のエリアの信号レベルH3との差を小さくすることができる。これにより、ビデオカメラ200は、撮影画像の屋内のエリアと屋外のエリアの明るさを近づけることができ、最適な逆光補正が行われた撮影画像を提供することができる。
【0189】
以上において、マイクロコンピュータ204は、第1のゲインおよび第2のゲインの値を最小2乗法により求めるように説明したが、これに限らず、撮影画像のパターンに応じて、最初に、第1ゲインおよび第2ゲインの値のとる範囲を限定するようにしても良い。以下にその動作を説明する。
【0190】
マイクロコンピュータ204は、第1ゲインおよび第2ゲインの値を求めるために、1フィールド毎にヒストグラム値をヒストグラム算出回路202より取得する。そのとき、マイクロコンピュータ204は、所定の閾値を用いて、取得したヒストグラム値を分類し、そのパターンを解析する。所定の閾値は、どのような値に設定しても構わないが、ヒストグラム算出回路202が信号レベルを3分割してヒストグラム値をカウントするので、カウントされる検波領域内のY信号の総数の3分の1に設定するのが望ましい。
【0191】
マイクロコンピュータ204は、ヒストグラム算出回路202より取得したヒストグラム値を所定の閾値で分類し、ヒストグラム値が閾値以上である場合、値「1」を設定し、ヒストグラム値が閾値より小さい場合、値「0」を設定して、撮影画像に対応するY信号の信号レベルの分布を大まかに分類する。
【0192】
そして、マイクロコンピュータ204は、得られた分布パターンを図20に示すようなルックアップテーブルと比較し、その撮影画像に対する処理方法を決定する。
【0193】
図20は、マイクロコンピュータ204が有するルックアップテーブルの例を示す図である。
【0194】
図20において、ルックアップテーブル400は、出力ヒストグラム値のパターンを示す項目401、および、その出力ヒストグラム値のパターンに対する処理方法を示す項目402により構成される。項目401は、第1出力ヒストグラム値のパターンを示す項目412、第2出力ヒストグラム値のパターンを示す項目413、第3出力ヒストグラム値のパターンを示す項目414により構成される。
【0195】
例えば、下から3段目の場合、項目412には値「1」が設定され、項目413には値「0」が設定され、項目414には値「1」が設定されている。そして、項目402には「補正」が設定されている。すなわち、第1出力ヒストグラム値と第3出力ヒストグラム値が所定の閾値以上であり、この分布パターンの場合、マイクロコンピュータ204は、階調変換回路201に補正処理を実行させる。
【0196】
マイクロコンピュータ204は、図20に示すようなルックアップテーブルを参照することにより、Y信号の信号レベルの分布パターンによって、8通りの処理を行う。
【0197】
具体的には、第1乃至第3出力ヒストグラム値全てが所定の閾値より小さい場合、または、第1乃至第3出力ヒストグラム値全てが所定の閾値以上の値をとる場合、閾値の値によるが、この分布パターンは、存在しないはずの分布パターンか、または信号レベルが均一に分布されていることを示している。従って、この場合、マイクロコンピュータ204は、第1のゲインおよび第2のゲインの値を「0」に設定することで、階調変換を行わないように階調変換回路201を制御する。
【0198】
第1出力ヒストグラム値のみが閾値以上の値をとる場合、または、第3出力ヒストグラム値のみが閾値以上の値をとる場合、ヒストグラムが、信号レベルの低い方、または、高い方に極端に集中していることを示している。従って、この場合、AE機能が収束途中である可能性があるので、マイクロコンピュータ204は、第1のゲインおよび第2のゲインの値を「0」に設定することで、階調変換を行わないように階調変換回路201を制御する。
【0199】
第3出力ヒストグラム値のみが閾値より小さい場合、AE機能が収束していない可能性もあるが、AE機能が既に収束していて、非常に大光量の小さな被写体が撮像されていることも考えられる。従って、この場合、マイクロコンピュータ204は、第1のゲインの値を「1」に設定し、第2のゲインの値を「0」に設定し、図21に示す曲線461のような階調変換を行うように階調変換回路201を制御する。
【0200】
図21は、マイクロコンピュータ204が設定する階調変換補正のパターンの例を示す図である。
【0201】
図21において、横軸は、階調変換回路201に入力される入力Y信号の信号レベルを示し、縦軸は、階調変換回路201より出力される出力Y信号の信号レベルを示す。また、直線451は、補正前の入力信号レベルと出力信号レベルの関係を示し、曲線461は、補正後の入力信号レベルと出力信号レベルの関係を示す。
【0202】
マイクロコンピュータ204は、スイッチ回路231を制御して、階調変換前後のヒストグラムを確認しながら第1ゲインの値を増やしていき、補正の度合いを調整する。
【0203】
第1出力ヒストグラム値のみが閾値より小さい場合、上述した場合とは逆に、マイクロコンピュータ204は、第1のゲインの値を「−1」に設定し、第2のゲインの値を「0」に設定し、図22に示す曲線471のような階調変換を行うように階調変換回路201を制御する。
【0204】
図22は、マイクロコンピュータ204が設定する階調変換補正のパターンの他の例を示す図である。
【0205】
図22において、曲線471は、補正後の入力信号レベルと出力信号レベルの関係を示す。マイクロコンピュータ204は、スイッチ回路231を制御して、階調変換前後のヒストグラムを確認しながら第1ゲインの値を減らしていき、補正の度合いを調整する。
【0206】
第2出力ヒストグラム値のみが閾値より小さい場合、逆光状態であると判断し、マイクロコンピュータ204は、第1のゲインの値を「0」に設定し、第2のゲインの値を「1」に設定し、図23に示す曲線481のような階調変換を行うように階調変換回路201を制御する。
【0207】
図23は、マイクロコンピュータ204が設定する階調変換補正のパターンの、さらに他の例を示す図である。
【0208】
図23において、曲線481は、補正後の入力信号レベルと出力信号レベルの関係を示す。マイクロコンピュータ204は、スイッチ回路231を制御して、階調変換前後のヒストグラムを確認しながら第2ゲインの値を増やしていき、補正の度合いを調整する。
【0209】
第2出力ヒストグラム値のみが閾値以上の値をとる場合、過度な順光状態であると判断し、マイクロコンピュータ204は、第1のゲインの値を「0」に設定し、第2のゲインの値を「−1」に設定し、図24に示す曲線491のような階調変換を行うように階調変換回路201を制御する。
【0210】
図24は、マイクロコンピュータ204が設定する階調変換補正のパターンの、さらに他の例を示す図である。
【0211】
図24において、曲線491は、補正後の入力信号レベルと出力信号レベルの関係を示す。マイクロコンピュータ204は、スイッチ回路231を制御して、階調変換前後のヒストグラムを確認しながら第2ゲインの値を減らしていき、補正の度合いを調整する。
【0212】
以上のように、マイクロコンピュータ204は、ヒストグラムの分布パターンに応じて、階調補正回路201が行う補正のパターンを限定することができる。なお、マイクロコンピュータ204が、上述したような補正のパターンの限定範囲内で、図16のフローチャートを参照して説明したような最小2乗法により、補正の度合いを調整するようにしてもよい。
【0213】
以上のようにして、大規模な回路を用いたり、ソフトウェアによる過大な負荷をかけたりすることなく、容易に、撮影画像に対応するY信号に対して、階調を有効利用した補正を行うことができる。
【0214】
なお、以上においては、ヒストグラム算出回路202は、信号レベルを3分割するように説明したが、これに限らず、何分割してもよいし、分割しないようにしてもよい。また、ヒストグラム値を算出する検波領域は、1フィールド分のY信号に対して、複数存在するようにしても良い。さらに、図5において説明した各回路は、その一部または全部が他の回路と一体化されていてもよい。
【0215】
また、階調変換回路201の信号処理部211は、互いに異なる2つの関数を用いて、入力Y信号に対して基本補正を行うように説明したが、これに限らず、いくつの関数を用いて基本補正を行うようにしてもよい。その際、マイクロコンピュータ204が設定するゲインの数は、信号処理部211が行う基本補正の数に応じて変化する。また、信号処理部211は、内蔵するROM211A等に基本補正用のルックアップテーブルを予め記憶しておき、そのルックアップテーブルに基づいて基本補正を行うようにしてもよい。
【0216】
また、以上においては、ビデオカメラについて説明したが、これに限らず、例えば、デジタルカメラ、VTR(Video Tape Recorder)等の画像録画再生装置、テレビジョン受像機、プロジェクタ、プリンタ、または、それらと同等の機能を有するその他の装置等であってもよく、様々な装置に広く適用可能である。
【0217】
さらに、以上の処理は、ハードウェアにより実行することができるが、ソフトウェアにより実行させることもできる。一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、専用のハードウェアに組み込まれているコンピュータ、または、各種のプログラムをインストールすることで、各種の機能を実行することが可能な、例えば汎用のパーソナルコンピュータなどに、ネットワークや記録媒体からインストールされる。
【0218】
この記録媒体は、図5に示すように、装置本体とは別に、ユーザにプログラムを提供するために配布される、プログラムが記録されている磁気ディスク91(フロッピディスクを含む)、光ディスク92(CD-ROM(Compact Disk-Read Only Memory),DVD(Digital Versatile Disk)を含む)、光磁気ディスク93(MD(Mini-Disk)を含む)、もしくは半導体メモリ94などよりなるパッケージメディアにより構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される、プログラムが記録されているマイクロコンピュータ204に内蔵されているROMなどで構成される。
【0219】
なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、記載された順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。
【0220】
【発明の効果】
以上のように、本発明の信号処理装置および方法、記録媒体、並びにプログラムによれば、回路規模の拡大、または、ソフトウェアの処理による負荷の増加を抑えながら、より効果的な階調変換を行うことができる。
【図面の簡単な説明】
【図1】従来のビデオカメラの構成例を示す図である。
【図2】補色系フィルタが装着された、CCDより電荷が出力される様子を示す図である。
【図3】ニー回路によるダイナミックレンジの圧縮の様子を示す図である。
【図4】撮影画像が白飛びを発生させる様子を示す図である。
【図5】本発明を適用したビデオカメラの基本的な構成例を示すブロック図である。
【図6】図5に示す階調変換回路の詳細な構成例を示す図である。
【図7】第1の補正パターンを構成する関数の例を示すグラフである。
【図8】第1の補正パターンを構成する関数の他の例を示すグラフである。
【図9】ヒストグラム算出回路202の詳細な構成例を示す図である。
【図10】階調変換処理について説明するフローチャートである。
【図11】図10のステップS3において実行されるY信号補正処理について説明するフローチャートである。
【図12】図10のステップS4において実行されるアパーチャ補正処理について説明するフローチャートである。
【図13】ヒストグラム算出回路によるヒストグラム積分処理について説明するフローチャートである。
【図14】ヒストグラム算出回路によるヒストグラム積分処理について説明する、図13に続くフローチャートである。
【図15】ヒストグラム算出回路によるヒストグラム積分処理について説明する、図14に続くフローチャートである。
【図16】マイクロコンピュータによるゲイン調整処理について説明するフローチャートである。
【図17】マイクロコンピュータが算出する正規化ヒストグラム累積度数分布情報を示すグラフである。
【図18】正規化ヒストグラム累積度数分布情報の、理想累積度数分布情報との差分を示すグラフである。
【図19】撮影画像に階調補正を行った場合の、入射光の明るさと撮影画像に対応する信号レベルの関係を示すグラフである。
【図20】マイクロコンピュータが有するルックアップテーブルの例を示す図である。
【図21】マイクロコンピュータが設定する階調変換補正のパターンの例を示す図である。
【図22】マイクロコンピュータが設定する階調変換補正のパターンの他の例を示す図である。
【図23】マイクロコンピュータが設定する階調変換補正のパターンの、さらに他の例を示す図である。
【図24】マイクロコンピュータが設定する階調変換補正のパターンの、さらに他の例を示す図である。
【符号の説明】
200 ビデオカメラ, 201 階調変換回路, 202 ヒストグラム算出回路, 203 同期信号発生回路, 204 マイクロコンピュータ, 211 信号処理部, 211A ROM, 231 スイッチ回路, 301乃至304 比較器, 311乃至313 ANDゲート, 321乃至323 カウンタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a signal processing apparatus and method, a recording medium, and a program, and in particular, by controlling a gain of a correction pattern based on a histogram of an input signal or an output signal, thereby increasing a circuit scale or processing by software. The present invention relates to a signal processing apparatus and method, a recording medium, and a program capable of performing more effective gradation conversion while suppressing an increase in load.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, in an apparatus for processing an image signal such as a digital camera, a television receiver, or a printer, various processes are performed on the input image signal.
[0003]
FIG. 1 is a diagram illustrating a configuration example of a conventional video camera.
[0004]
In the video camera 1 shown in FIG. 1, light from a subject (not shown) passes through the lens unit 11 and has yellow (Ye), cyan (Cy), magenta (Mg), and green on the front as shown in FIG. 2. (G) The light is incident on a CCD 12 configured by an image pickup device using a CCD (Charge Coupled Device) or the like, to which a complementary color filter in which filters are arranged in a mosaic pattern is mounted, and is subjected to photoelectric conversion.
[0005]
The CCD 12 outputs a video signal photoelectrically converted in the light receiving unit and supplies it to an AGC (Automatic Gain Control) circuit 13. The AGC circuit 13 performs correlated double sampling on a video signal input in a built-in CDS (Correlated Double Sampling circuit) (not shown) to remove noise, and then adjusts the gain of the video signal. The adjusted video signal is supplied to an A / D (Analog / Digital) conversion circuit 14.
[0006]
The A / D conversion circuit 14 converts the input analog signal into a digital signal and outputs it to the 1H delay line circuit 15. The 1H delay line circuit 15 delays the input video signal by one line and outputs it to the Y signal generation circuit 16.
[0007]
The Y signal generation circuit 16 adds the video signals corresponding to the adjacent pixels of the input video signal, thereby generating a luminance signal (hereinafter referred to as a Y signal) of the video signal.
[0008]
The 1H delay line circuit 21 further delays the output signal of the 1H delay line circuit 15 by one line. The adder 22 combines the output signal of the 1H delay line circuit 21 and the output of the A / D conversion circuit 14 and supplies the resultant signal to the vertical aperture correction circuit 31. The vertical aperture correction circuit 31 includes a vertical high-pass filter, and generates a vertical aperture correction signal signal based on the video signal acquired from the 1H delay line circuit 15 and the adder 22.
[0009]
The horizontal aperture correction circuit 32 includes a high-pass filter in the horizontal direction, and generates a horizontal aperture correction signal based on the Y signal acquired from the Y signal generation circuit 16. The generated vertical aperture correction signal and horizontal aperture correction signal are added by the adder 33 after being adjusted by the microcomputer 80, though not shown, and further added to the Y signal by the adder 34. .
[0010]
When obtaining the Y signal output from the adder 34, the knee circuit 35 compresses the dynamic range of the CCD output by suppressing the amplitude characteristic of the high luminance region of the Y signal as shown by the curve 131 in FIG. Output to the gamma correction circuit 36.
[0011]
The gamma correction circuit 36 corrects the gamma characteristic of the Y signal supplied from the knee circuit 35 according to the output characteristic of the monitor, and outputs it to a white clip circuit (hereinafter referred to as a WC (White Clip) circuit) 37.
[0012]
The WC circuit 37 performs white clipping of the Y signal that has been subjected to gamma correction, and supplies it to the D / A conversion circuit 38. The D / A (Digital / Analog) conversion circuit 38 converts the input Y signal, which is a digital signal, into an analog signal and supplies the analog signal to the adder 61.
[0013]
Also, when the YC signal generation circuit 41 obtains the outputs of the 1H delay line circuit 15 and the adder 22, in addition to the Y signal described above, the YC signal generation circuit 41 takes a difference between adjacent values of the input signal and 2 A kind of color difference signal (hereinafter referred to as Cr signal or Cy signal) is generated.
[0014]
The RGB matrix circuit 42 converts the Y signal, Cr signal, and Cy signal acquired from the YC signal generation circuit 41 into an RGB signal composed of a red (Red) component, a blue (Blue) component, and a green (Green) component. The white balance circuit (hereinafter referred to as a WB (White Balance) circuit) 43 is supplied.
[0015]
The WB circuit 43 adjusts the color temperature of the input RGB signal. The gamma correction circuit 44 corrects the gamma characteristics of the RGB signal output from the WB circuit 43 in accordance with the output characteristics of the monitor, and outputs the corrected gamma characteristics to the encoder circuit 45. The encoder circuit 45 converts the acquired RGB signal into a color difference signal so as to comply with a signal standard such as NTSC (National Television System Committee) or PAL (Phase Alternating Line), and modulates it using a subcarrier signal (not shown). . The D / A conversion circuit 46 converts the color difference signal output from the encoder circuit 45 into an analog signal and supplies the analog signal to the adder 61.
[0016]
The adder 61 combines the supplied Y signal and the color difference signal together with the synchronization signal generated by the synchronization signal generation circuit 51 to generate a VBS (Video Burst Sync signal) signal which is a television signal, and an output terminal 62. Output via.
[0017]
The AE (Auto Exposure) detection circuit 71 that has acquired the output of the YC signal generation circuit 41 integrates one field for the Y signal in the detection frame based on the detection frame setting information supplied from the microcomputer 80. The integral value is supplied to the microcomputer 80.
[0018]
The microcomputer 80 supplied with the integral value controls the operation of the lens unit 11, the timing generator circuit (hereinafter referred to as a TG (Timing Generator) circuit) 81, and the AGC circuit 13 based on the integral value. The TG circuit 81 is controlled by the microcomputer 80 and controls the drive of the CCD 12.
[0019]
Further, when the white balance detection circuit (hereinafter referred to as a WB detection circuit) 72 acquires an RGB signal that is an output from the RGB matrix circuit 42, the white balance detection circuit 72 (hereinafter referred to as a WB detection circuit) The RGB signal is integrated for one field, and the integrated value is supplied to the microcomputer 80. The microcomputer 80 calculates the RGB gain balance for adjusting the color temperature based on the supplied integral value, and controls the WB circuit 43 to adjust the gain of the RGB signal.
[0020]
Furthermore, a drive 90 is connected to the microcomputer 80 as necessary, and a magnetic disk 91, an optical disk 92, a magneto-optical disk 93, a semiconductor memory 94, or the like is appropriately mounted, and a computer program read from these is loaded. If necessary, it is installed in a RAM or the like built in the microcomputer 80.
[0021]
In the video camera 1 as described above, in the case of normal shooting, the microcomputer 80 manages the AE level of the shot image based on the integrated value in the detection frame, which is the detection signal acquired from the AE detection circuit 71, and takes the shot. When it is determined that the AE level of the image is brighter than the target AE level, the aperture is reduced by controlling the lens unit 11 or the electronic shutter function of the CCD 12 is operated by controlling the TG circuit 81 to adjust the exposure amount in the CCD 12 Or the AGC circuit 13 is controlled to suppress the amplification of the video signal.
[0022]
[Problems to be solved by the invention]
However, in this case, for example, in the case of backlighting in which an image of a person standing on the side of a window that looks brighter than indoors is taken indoors, the AE detection level of the entire captured image is in the outdoor bright area and indoors. Since this is the average of the dark area, the indoor area may become too dark in the captured image when adjusted based on this AE detection level.
[0023]
On the other hand, when it is determined that the shooting environment is in the backlight state, the microcomputer 80 controls each unit and controls the exposure amount to be large so that the person who is the shooting target has an appropriate amplitude level. There is a way to do so.
[0024]
However, in this case, the originally bright outdoor area in the photographed image is further brightened, and there is a problem that an adverse effect such as whiteout occurs.
[0025]
FIG. 4 is a diagram illustrating how a captured image causes whiteout. A straight line 141 indicates the relationship between the brightness of the incident light and the signal level corresponding to the photographed image before adjusting the exposure amount, and a curve 142 corresponds to the brightness of the incident light and the photographed image after adjusting the exposure amount. The relationship of the signal level to be shown is shown. Also, assume that the indoor brightness is point A1 and the outdoor brightness is point A3.
[0026]
In FIG. 4, the signal level corresponding to the point A1 before the exposure amount adjustment is the point B1, and the signal level corresponding to the point A3 is the point B3. That is, the signal level B1 of the indoor area in the photographed image is very small compared to the signal level B3 of the outdoor area, and as described above, the indoor area of the photographed image is too dark.
[0027]
Therefore, when the exposure amount is adjusted so that the indoor area becomes bright as described above, the relationship between the brightness of the incident light and the signal level corresponding to the captured image becomes a curve 142. Accordingly, the signal level corresponding to the point A1 is the point B2, which is brighter than before the adjustment. However, in this case, since the signal level is the maximum level of B4 at the brightness equal to or higher than point A2, whiteout occurs in the outdoor area of the photographed image whose brightness is point A3.
[0028]
To solve the above problems, multiple exposure is used to shoot when the exposure is adjusted to a bright outdoors and when the exposure is adjusted to a dark indoor, and these captured images are combined adaptively. There is a method of widening the dynamic range of the photographed image.
[0029]
However, in this case, there is a problem that it is necessary to drive the imaging device at double speed or to prepare a large-scale circuit for image composition.
[0030]
Further, as signal processing for effectively using the limited gradation, there is a case where histogram equalization is performed to make the histogram distribution uniform with respect to the image signal of the photographed image. There is also a problem that the appearance of is not always improved.
[0031]
The present invention has been made in view of such a situation, and is capable of performing more effective gradation conversion while suppressing an increase in circuit scale or an increase in load due to software processing. It is.
[0032]
[Means for Solving the Problems]
  The imaging apparatus of the present inventionThe input luminance signal is corrected with different correction patterns to obtain a plurality of corrected signals.Correction means;LuminanceA histogram calculating means for calculating a histogram of an image corresponding to the signal, and a correcting means based on the histogram calculated by the histogram calculating means;Gain determining means for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by the correction, each of the corrected signals obtained by the correction by the correcting means, and the gain determining means Multiplying means for multiplying each of the gains; and output luminance signal generating means for generating an output luminance signal obtained by performing gradation correction on the input luminance signal based on the result of multiplication by the multiplying means;It is characterized by providing.
[0033]
  The correction pattern includes a plurality of different functions, and the correction means corrects the luminance signal for each function to obtain a corrected signal.Can be.
[0034]
  The correction pattern is configured by a function of curves different from each other and including at least one convex, and the correction means corrects the luminance signal for each function to obtain a corrected signal.be able to.
[0035]
  The correction pattern includes a plurality of sine functions having different coefficients, and the correction means corrects the luminance signal for each sine function to obtain a corrected signal.Can be.
[0036]
  The correction pattern includes a first correction pattern for adjusting the gradation on the brighter side and the darker side than the center of the amplitude level of the luminance signal, and the amplitude level divided into three, and the gradation is adjusted at each level. The correction unit is configured by a second correction pattern to be adjusted, and the correction unit corrects the luminance signal using the first correction pattern to obtain the first correction signal, and corrects the luminance signal using the second correction pattern. To obtain a second correction signal.Can be.
[0037]
  The correction means includes storage means for storing a correction pattern.Can be.
[0038]
  The correction pattern stored by the storage means is configured by a look-up table indicating the relationship between the input luminance signal and the corrected signal.Can be.
[0039]
  The histogram calculation means includesHistogram for a predetermined area consisting of part or all of the image corresponding to the luminance signalIt can be calculated.
[0040]
  The histogram calculation means further calculates a histogram cumulative frequency distribution that is a frequency distribution in which the frequencies are accumulated from the smaller signal level of the luminance signal based on the calculated histogram.Can be.
[0041]
  The gain determining means includesHistogram cumulative frequency distribution calculated by the histogram calculation means,Corrected signalIn order to minimize the difference from the tone characteristics ofDetermine the gainCan be.
[0042]
  The output luminance signal generation unit adds a first addition unit that adds each of the multiplication results of the multiplication unit, and adds the addition result of the first addition unit and the luminance signal to generate an output luminance signal. 2 addition meansCan be.
[0043]
  The signal processing method of the present invention includes:The input luminance signal is corrected with different correction patterns to obtain a plurality of corrected signals.A correction step;LuminanceBased on the histogram calculation step for calculating the histogram of the image corresponding to the signal, and the correction step processing based on the histogram calculated by the histogram calculation step processingA gain determination step for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by correction, each of the corrected signals obtained by correction by the correction step processing, and processing of the gain determination step A multiplication step that multiplies each of the gains determined by the step, and an output luminance signal generation that generates an output luminance signal obtained by performing gradation correction on the input luminance signal based on the result of multiplication by the processing of the multiplication step Step andIt is characterized by including.
[0044]
  The program of the recording medium of the present invention isThe input luminance signal is corrected with different correction patterns to obtain a plurality of corrected signals.A correction step;LuminanceBased on the histogram calculation step for calculating the histogram of the image corresponding to the signal, and the correction step processing based on the histogram calculated by the histogram calculation step processingA gain determination step for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by correction, each of the corrected signals obtained by correction by the correction step processing, and processing of the gain determination step A multiplication step that multiplies each of the gains determined by the step, and an output luminance signal generation that generates an output luminance signal obtained by performing gradation correction on the input luminance signal based on the result of multiplication by the processing of the multiplication step Step andIt is characterized by including.
[0045]
  The program of the present inventionThe input luminance signal is corrected with different correction patterns to obtain a plurality of corrected signals.A correction step;LuminanceBased on the histogram calculation step for calculating the histogram of the image corresponding to the signal, and the correction step processing based on the histogram calculated by the histogram calculation step processingA gain determination step for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by correction, each of the corrected signals obtained by correction by the correction step processing, and processing of the gain determination step A multiplication step that multiplies each of the gains determined by the step, and an output luminance signal generation that generates an output luminance signal obtained by performing gradation correction on the input luminance signal based on the result of multiplication by the processing of the multiplication step Step andIs realized on a computer.
[0046]
  In the signal processing apparatus and method, recording medium, and program of the present invention,The input luminance signal is corrected with mutually different correction patterns, a plurality of corrected signals are obtained, a histogram of an image corresponding to the luminance signal is calculated, and correction is performed based on the calculated histogram. A plurality of gains that determine the respective degrees of the plurality of corrected signals obtained are determined, each of the corrected signals obtained by the correction is multiplied by the determined gain, and based on the result of the multiplication Then, an output luminance signal is generated by performing gradation correction on the input luminance signal.
[0047]
The signal processing device may be an independent device, or may be a block that performs signal processing of other devices that handle video signals such as a recording / playback device, an imaging device, or a display device.
[0048]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 5 is a block diagram showing a basic configuration example of a video camera to which the present invention is applied. In addition, the description is abbreviate | omitted about the part which has the structure similar to having demonstrated using FIG.
[0049]
In the video camera 200 shown in FIG. 5, light from a subject (not shown) optically transmits a high-frequency component (fine subject) (not shown) of the subject via the lens unit 11 whose aperture is controlled by the microcomputer 204. Through an optical LPF (Low Pass Filter) to be removed, an infrared cut filter for cutting infrared rays, and a complementary color filter having a color arrangement as shown in FIG. Converted. The CCD 12 is controlled to be driven by the TG circuit 81 controlled by the microcomputer 204, and reads out the electric charge obtained by photoelectrically converting the incident light by adding two lines at a time in a field readout method as shown in FIG.
[0050]
That is, in FIG. 2, in the readout line 121-1, a signal (G + Cy) in which charges corresponding to the photoelectric elements 105 and 101 are combined, a signal (Mg + Ye) in which charges corresponding to the photoelectric elements 106 and 102 are combined, photoelectric A signal (G + Cy) in which charges corresponding to the elements 107 and 103 are combined and a signal (Mg + Ye) in which charges corresponding to the photoelectric elements 108 and 104 are combined are output via the horizontal register 125.
[0051]
Similarly, in the readout line 121-2, a signal (Mg + Cy) in which charges corresponding to the photoelectric elements 113 and 109 are combined, a signal (G + Ye) in which charges corresponding to the photoelectric elements 114 and 110 are combined, a photoelectric element A signal (Mg + Cy) in which charges corresponding to 115 and 111 are combined and a signal (G + Ye) in which charges corresponding to the photoelectric elements 116 and 112 are combined are output via the horizontal register 125.
[0052]
Similarly, in the readout line 122-1, a signal (Cy + G) in which charges corresponding to the photoelectric elements 109 and 105 are combined, a signal (Ye + Mg) in which charges corresponding to the photoelectric elements 110 and 106 are combined, a photoelectric element A signal (Cy + G) in which charges corresponding to 111 and 107 are combined and a signal (Ye + Mg) in which charges corresponding to the photoelectric elements 112 and 108 are combined are output via the horizontal register 125.
[0053]
The video signal output in this way is supplied to the Y signal generation circuit 16 via the AGC circuit 13, the A / D conversion circuit 14, and the 1H delay line circuit 15 as described with reference to FIG. .
[0054]
The Y signal generation circuit 16 adds the adjacent video signals described above. That is, in the readout line 121-1, the luminance signal (Y) is generated by being synthesized as in the following formula (1).
[0055]
Y = {(G + Cy) + (Mg + Ye)} / 2 = (2B + 3G + 2R) / 2 (1)
However, Cy, Mg, and Ye are as follows.
Cy = G + B (2)
Mg = R + B (3)
Ye = G + R (4)
[0056]
Similarly, when Cy, Mg, and Ye are expressed as in the equations (2) to (4), the equation in the readout line 122-1 is the equation in the readout line 122-1, as in the equation (5). Synthesized as in (6).
[0057]
Y = {(Mg + Cy) + (G + Ye)} / 2 = (2B + 3G + 2R) / 2 (5)
Y = {(Cy + G) + (Ye + Mg)} / 2 = (2B + 3G + 2R) / 2 (6)
[0058]
The Y signal generated as described above is combined with the horizontal aperture correction signal and the vertical aperture correction signal in the adder 34, subjected to contour correction, and then supplied to the gradation conversion circuit 201.
[0059]
The YC signal generation circuit 41 that has acquired the output signals of the 1H delay line circuit 15 and the 1H delay line circuit 21 generates Y signals as shown in the equations (1), (5), and (6). At the same time, with respect to the above-described video signal, a difference between adjacent ones is calculated to generate color difference signals (Cr and Cb). That is, in the readout line 121-1, the color difference signals (Cr and Cb) are generated by synthesizing as the following equations (7) and (8).
[0060]
Cr = {(Mg + Ye)-(G + Cy)} = 2R-G (7)
Cb = {(G + Ye)-(Mg + Cy)} = 2B-G (8)
[0061]
The Y signal, Cr signal, and Cy signal generated as described above are supplied to the gradation conversion circuit 201. FIG. 6 shows a detailed configuration example of the gradation conversion circuit 201.
[0062]
The vertical aperture correction signal output from the vertical aperture correction circuit 31 is combined with the horizontal aperture correction signal output from the horizontal aperture correction circuit 32 by the adder 33 and input to the gradation conversion circuit 201 as the aperture correction signal. The
[0063]
The Y signal output from the Y signal generation circuit 16 is combined with the above-described aperture correction signal in the adder 34 and input to the gradation conversion circuit 201 as an input Y signal.
[0064]
The input Y signal input to the gradation conversion circuit 201 is supplied to the signal processing unit 211 and is corrected by the signal processing unit 211 based on a predetermined correction pattern. The correction pattern is stored in the ROM 211A built in the signal processing unit 211. Note that the signal processing unit 211 may incorporate a RAM, and the built-in RAM may store the correction pattern. Further, the signal processing unit 211 may have an arithmetic circuit that can correct the input signal with a predetermined correction pattern.
[0065]
Two types of correction patterns are stored in the ROM 211A built in the signal processing unit 211, and the signal processing unit 211 corrects the input Y signal with each correction pattern and outputs it to different adders.
[0066]
As will be described later, the two types of correction patterns stored in the ROM 211 are each composed of different functions. The first correction pattern is configured by a function as shown in FIG. 7 that divides the amplitude level of the image at the center and adjusts the gradation on the bright side and the dark side. The amplitude level is divided into three, and each tone is adjusted, and the function is configured as shown in FIG.
[0067]
FIG. 7 is a graph illustrating an example of a function constituting the first correction pattern.
[0068]
In FIG. 7, curves 261 to 264 form the first correction pattern, and are graphs of functions represented by the following expressions (9) and (10).
[0069]
[Expression 1]
Figure 0003865127
[0070]
Here, the horizontal axis is obtained by normalizing the input signal from 0 to 1, and n is a predetermined constant, which is an even number. Α is a normalization constant for normalizing the maximum value in the domain of the value dlt1 to 1. The curve 261 in FIG. 7 corresponds to Equation (9), the curve 262 corresponds to Equation (10) when n = 2, the curve 263 corresponds to Equation (10) when n = 4, and the curve 264 Is a graph corresponding to Equation (10) in the case of n = 6.
[0071]
FIG. 8 is a graph illustrating an example of a function constituting the second correction pattern.
[0072]
In FIG. 8, curves 271 to 274 form the second correction pattern, and graph the functions expressed by the following expressions (12) and (13).
[0073]
[Expression 2]
Figure 0003865127
[0074]
Here, the horizontal axis is obtained by normalizing the input signal from 0 to 1, and n is a predetermined constant, which is an odd number. Α is a normalization constant for normalizing the maximum value in the domain of the value dlt2 to 1. The curve 271 in FIG. 8 corresponds to the equation (12), the curve 272 corresponds to the equation (13) when n = 1, the curve 273 corresponds to the equation (12) when n = 3, and the curve 274 Is a graph corresponding to Equation (13) when n = 5.
[0075]
The signal processing unit 211 corrects the input Y signal in the correction pattern as described above. However, when these functions are realized by a circuit, the scale of the arithmetic circuit becomes large, and thus these functions are expressed. It is preferable to create a lookup table and store it in a built-in ROM or RAM.
[0076]
The signal processing unit 211 outputs the first basic corrected signal, which is an input Y signal corrected using the first correction pattern, to the multiplier 213, and is the input Y signal corrected using the second correction pattern. The second basic corrected signal is output to multiplier 212.
[0077]
The microcomputer 204 determines the first gain, which is a coefficient for determining the degree of correction using the first correction pattern by the signal processing unit 211, and the degree of correction using the second correction pattern by the signal processing unit 211. The value of the second gain, which is a coefficient to be determined, is determined as will be described later. The microcomputer 204 supplies the determined first gain and second gain to the multiplier 213 and the multiplier 212 as a first gain signal and a second gain signal, respectively.
[0078]
The multiplier 213 performs multiplication of the first gain signal supplied from the microcomputer 204 and the first basic corrected Y signal output from the signal processing unit 211, and outputs the first multiplied Y signal to the adder 214. Supply. Similarly, the multiplier 212 multiplies the second gain signal supplied from the microcomputer 204 and the second basic corrected Y signal output from the signal processing unit 211 to obtain a second multiplied Y signal. This is supplied to the adder 214.
[0079]
The adder 214 adds the first multiplied Y signal supplied from the multiplier 213 and the second multiplied Y signal supplied from the multiplier 212, and adds the first correction pattern and the second correction pattern. The signal is supplied to the adder 223 as a corrected Y signal including all the correction amounts related to the correction used.
[0080]
By the way, the aperture correction signal input to the gradation conversion circuit 201 is multiplied and multiplied by the third gain signal which is a gain signal for the aperture correction signal set and supplied by the microcomputer 204 in the multiplier 221. This is supplied to the adder 222 as a completed aperture correction signal.
[0081]
The adder 222 adds the multiplied aperture correction signal supplied from the multiplier 221 and the input Y signal, and supplies the result to the adder 223 as an aperture corrected Y signal.
[0082]
The input Y signal, which is an input signal of the gradation conversion circuit 201, is added with an aperture correction signal in the adder 34. However, in the portion where gradation is suppressed by gradation conversion, the aperture correction signal is also added. Similarly, since it is suppressed, the boundary of the color of the part becomes blurred. However, the adder 222 multiplies the third gain signal to add the multiplied aperture correction signal that has not been subjected to gradation correction, so that the portion where the gradation is reduced is also relative. Thus, it is possible to obtain an image with enhanced edge quality and improved visual quality.
[0083]
The adder 223 adds the aperture corrected Y signal supplied from the adder 223 and the corrected Y signal supplied from the adder 214, and outputs the knee circuit 35 as an output Y signal subjected to gradation conversion processing. Output to. Thereafter, the Y signal is processed as in the case described with reference to FIG. 1 and is output from the output terminal 62 as a VBS signal.
[0084]
The synchronization signal generation circuit 203 controls the vertical address information, the horizontal address information of the Y signal, or the operation timing in addition to supplying an analog synchronization signal to the adder 61 as shown in FIG. A digital synchronization signal including information to be generated is generated and supplied to each unit.
[0085]
As described above, the gradation conversion circuit 201 performs gradation correction on the Y signal of the captured image.
[0086]
The gradation conversion circuit 201 includes a switch circuit 231. The switch circuit 231 is controlled by the microcomputer 204 using the switch circuit control signal, and supplies the input Y signal and the output Y signal to the histogram calculation circuit 202 in a time division manner by switching signals to be output.
[0087]
As described above, the microcomputer 204 calculates the first gain and the second gain, and supplies the first gain and the second gain to the gradation correction conversion circuit 201 as the first gain signal and the second gain signal, respectively. 201 controls the degree to which the gradation of the Y signal is corrected. At this time, the microcomputer 204 calculates the first gain and the second gain based on the histogram of the Y signal calculated by the histogram calculation circuit 202. The histogram calculation circuit 202 calculates a histogram of the Y signal based on the input Y signal or output Y signal.
[0088]
FIG. 9 is a diagram illustrating a detailed configuration example of the histogram calculation circuit 202.
[0089]
In FIG. 9, the output Y signal is supplied by the gradation conversion circuit 201 to the comparators 301 to 303 of the histogram calculation circuit 202. At the same time, the microcomputer 204 supplies the value La to the comparator 301, supplies the values La and Lb to the comparator 302, and supplies the value Lb to the comparator 303. At this time, equation (15) holds. Note that Lmax is a predetermined maximum signal level of the Y signal.
[0090]
0 <La <Lb <Lmax (15)
[0091]
The comparator 301 compares the signal level IN of the output Y signal supplied from the gradation conversion circuit 201 with the value 0 and the value La supplied from the microcomputer 204, and is expressed by the following equation (16). When the condition is satisfied, a signal having a value “1” is supplied to the AND gate 311.
[0092]
0 ≦ IN <La (16)
[0093]
When the signal level IN of the output Y signal does not satisfy Expression (16), the comparator 301 supplies a signal having a value “0” to the AND gate 311.
[0094]
Similarly, the comparator 302 compares the signal level IN of the output Y signal supplied from the gradation conversion circuit 201 with the value La and the value Lb supplied from the microcomputer 204, and the following equation (17) ), A signal having a value “1” is supplied to the AND gate 312.
[0095]
La ≦ IN <Lb (17)
[0096]
When the signal level IN of the output Y signal does not satisfy Expression (17), the comparator 302 supplies a signal having a value “0” to the AND gate 312.
[0097]
Similarly, the comparator 303 compares the signal level IN of the output Y signal supplied from the gradation conversion circuit 201 with the value Lb and the value Lmax supplied from the microcomputer 204, and the following equation (18) ), A signal having a value of “1” is supplied to the AND gate 313.
[0098]
Lb ≦ IN ≦ Lmax (18)
[0099]
When the signal level IN of the output Y signal does not satisfy Expression (18), the comparator 303 supplies a signal having a value “0” to the AND gate 313.
[0100]
The synchronization signal generation circuit 203 controls the operation timing of each part of the video camera 200 described with reference to FIG. 5, and further, the horizontal address information Hadr and vertical of the output Y signal supplied to the histogram calculation circuit 202. The direction address information Vadr is supplied to the comparator 304 built in the histogram calculation circuit 202 in accordance with the timing at which the output Y signal is supplied to the histogram calculation circuit 202.
[0101]
Further, the microcomputer 204 supplies the boundary set values Hs, He, Vs, and Ve, which are the coordinates of the boundary line of the region where the histogram is generated, to the comparator 304 of the histogram calculation circuit 202.
[0102]
The comparator 304 of the histogram calculation circuit 202 acquires the address information Hadr and Vadr of the output Y signal supplied from the synchronization signal 203, and receives the boundary set values Hs, He, which are the coordinates of the boundary lines of the region from the microcomputer 204. When Vs and Ve are acquired, they are compared, and when the conditions represented by the following expressions (19) and (20) are satisfied, signals having a value of “1” are supplied to the AND gates 311 to 313. .
[0103]
Hs ≦ IN <He (19)
Vs ≦ IN <Ve (20)
[0104]
When the address information Hadr and Vadr of the output Y signal supplied from the synchronization signal generation circuit 203 does not satisfy the conditions of the equations (19) and (20), the comparator 304 outputs a signal with a value “0”. Are supplied to AND gates 311 to 313.
[0105]
The AND gate 311 supplies a signal having a value “1” to the counter 321 when the values of the two input signals are both “1”. In other cases, the AND gate 311 supplies a signal whose value is “0” to the counter 321.
[0106]
Similarly, the AND gate 312 supplies a signal with a value of “1” to the counter 322 when the values of the two input signals are both “1”, otherwise the value is “0”. Is supplied to the counter 322.
[0107]
Further, the AND gate 313 similarly counts a signal having a value of “1” when the values of the two input signals are both “1”, and a signal having a value of “0” otherwise. To supply.
[0108]
The counters 321 to 323 count the number of times a signal having a value “1” is input. Although not shown in the figure, the counters 321 to 323 are supplied with the address information of the output Y signal from the synchronization signal generation circuit 203. When it is determined that the output Y signal for one field has been counted, the respective count results Is supplied to the microcomputer 204.
[0109]
The microcomputer 204 generates a histogram of the output Y signal based on the histogram values.
[0110]
In addition, the gradation conversion circuit 201 supplies the input Y signal to the histogram calculation circuit 202 together with the output Y signal in a time division manner. At that time, the synchronization signal generation circuit 203 also has the same manner as the output Y signal. Address information corresponding to the input Y signal is supplied to the histogram calculation circuit 202.
[0111]
As in the case of the output Y signal described above, the histogram calculation circuit 202 calculates a histogram value for the input Y signal and supplies it to the microcomputer 204 for each field. Then, the microcomputer 204 generates a histogram for the input Y signal based on the histogram values.
[0112]
As described above, the microcomputer 204 obtains histogram values corresponding to the input Y signal that is the input signal of the gradation conversion circuit 201 and the output Y signal that is the output signal of the gradation conversion circuit 201, which will be described later. As described above, a histogram for determining the values of the first gain and the second gain can be generated.
[0113]
Next, a gradation conversion process for converting the gradation of the Y signal will be described with reference to the flowchart of FIG.
[0114]
First, in step S <b> 1, the microcomputer 204 sets a detection region for calculating a histogram value in the histogram calculation circuit 202. The microcomputer 204 sets a detection region and supplies boundary setting values Hs, He, Vs, and Ve, which are the coordinates of the boundary line of the region, to the histogram calculation circuit 202. Based on the acquired boundary setting value, the histogram calculation circuit 202 calculates a histogram value for an input Y signal and an output Y signal corresponding to the detection region set by the microcomputer 204 in the captured image.
[0115]
The microcomputer 204 that has set the detection region sets a gain value in step S2. As will be described later, the microcomputer 204 generates a histogram of the input Y signal and the output Y signal based on the histogram value acquired from the histogram calculation circuit 202, and based on the histogram, the first gain, the second gain, And the value of the third gain is set.
[0116]
In step S3, the gradation conversion circuit 201 executes Y signal correction processing. The Y signal correction process will be described later with reference to the flowchart of FIG.
[0117]
In step S4, the gradation conversion circuit 201 executes aperture correction processing. The aperture correction process will be described later with reference to the flowchart of FIG.
[0118]
In step S5, the gradation conversion circuit 201 that has finished the Y signal correction process and the aperture correction process adds the corrected Y signal and the aperture corrected Y signal to generate an output Y signal.
[0119]
In step S <b> 6, the microcomputer 204 determines whether or not the gradation conversion circuit 201 has converted the gradation of the Y signal for one field based on the synchronization signal supplied from the synchronization signal generation circuit 203. If the microcomputer 204 determines that the Y signal whose gradation has been converted by the gradation conversion circuit 201 has not reached one field and has not yet converted the gradation of the Y signal for one field, step S3 Return to and repeat the subsequent processing.
[0120]
When the gradation conversion circuit 201 determines that the gradation of the Y signal for one field has been converted, the microcomputer 204 proceeds to step S7, and based on the synchronization signal supplied from the synchronization signal generation circuit 203, the Y signal It is determined whether or not the input is completed.
[0121]
If it is determined that the input of the Y signal has not ended, the microcomputer 204 returns to step S2 and repeats the subsequent processing. If the microcomputer 204 determines that the input of the Y signal has ended, the microcomputer 204 ends the gradation conversion process.
[0122]
Next, the Y signal correction process executed in step S3 of FIG. 10 will be described with reference to the flowchart of FIG.
[0123]
In step S21, the gradation conversion circuit 201 performs basic correction of the input Y signal using two types of correction patterns, and generates a first basic corrected Y signal and a second basic corrected Y signal. As described above, the gradation conversion circuit 201 performs basic correction by adding the first correction pattern expressed by the functions of Expressions (9) and (10) to the input Y signal, and performs the first basic correction. A basic Y correction is performed by generating a post-Y signal and adding a second correction pattern expressed by the functions of Expressions (12) and (13) to the input Y signal. Generate.
[0124]
In step S 22, the gradation conversion circuit 201 multiplies the first basic corrected Y signal and the first gain signal supplied from the microcomputer 204 to generate a first multiplied Y signal. In step S23, the gradation conversion circuit 201 multiplies the second basic corrected Y signal and the second gain signal supplied from the microcomputer 204 to generate a second multiplied Y signal.
[0125]
In step S24, the gradation conversion circuit 201 adds the generated first multiplied Y signal and the second multiplied Y signal to generate a corrected Y signal. Then, the gradation conversion circuit 201 that has generated the corrected Y signal ends the Y signal correction processing, and proceeds to step S4 in FIG.
[0126]
Next, the aperture correction process executed in step S4 of FIG. 10 will be described with reference to the flowchart of FIG.
[0127]
First, in step S41, the gradation conversion circuit 201 multiplies the aperture correction signal and the third gain signal supplied to the microcomputer 204 to generate a multiplied aperture correction signal.
[0128]
Then, the gradation conversion circuit 201 proceeds to step S42, adds the multiplied aperture correction signal and the input Y signal, and generates an aperture corrected Y signal. The gradation conversion circuit 201 that has generated the aperture-corrected Y signal ends the aperture correction process and proceeds to step S5 in FIG.
[0129]
As described above, the process of correcting the gradation of the Y signal is performed.
[0130]
Next, histogram integration processing by the histogram calculation circuit 202 will be described with reference to the flowcharts of FIGS.
[0131]
First, in step S61, the histogram calculation circuit 202 sets a detection region, a first threshold value, and a second threshold value used for calculation of the histogram value supplied to the microcomputer 204.
[0132]
The histogram calculation circuit 202 acquires an input signal composed of an input Y signal or an output Y signal from the gradation conversion circuit 201, and acquires an address signal corresponding to the acquired input signal from the synchronization signal generation circuit 203.
[0133]
In step S62, the histogram calculation circuit 202 determines whether or not an input signal and an address signal corresponding to the input signal have been acquired, and waits until it is determined that it has been acquired.
[0134]
In step S 63, the histogram calculation circuit 202 determines whether or not the acquired input signal is within the detection region supplied to the microcomputer 204 based on the address signal acquired from the synchronization signal generation circuit 203. . If it is determined that it is not within the detection region, the histogram calculation circuit 202 proceeds to step S81 in FIG. If it is determined that the current region is within the detection region, the histogram calculation circuit 202 proceeds to step S64.
[0135]
In step S <b> 64, the histogram calculation circuit 202 determines whether or not the value of the acquired input signal is greater than 0 and less than or equal to the first threshold supplied to the microcomputer 204. If it is determined that the value of the input signal is greater than 0 and less than or equal to the first threshold value, the histogram calculation circuit 202 proceeds to step S65 and based on the address signal acquired from the synchronization signal generation circuit 203, Is an input Y signal.
[0136]
If it is determined that the input signal is the input Y signal, the histogram calculation circuit 202 proceeds to step S66, counts up the first input histogram value that is the histogram value corresponding to the input Y signal, and proceeds to step S81 in FIG. move on.
[0137]
If it is determined in step S65 of FIG. 13 that the input signal is the output Y signal and not the input Y signal, the histogram calculation circuit 202 proceeds to step S67, and the first output is a histogram value corresponding to the output Y signal. The histogram value is counted up, and the process proceeds to step S81 in FIG.
[0138]
If it is determined in step S64 that the input signal is 0 or less or greater than the first threshold value, the histogram calculation circuit 202 proceeds to step S71 in FIG.
[0139]
In step S <b> 71 of FIG. 14, the histogram calculation circuit 202 has a value of the acquired input signal that is greater than the first threshold supplied to the microcomputer 204 and less than or equal to the second threshold supplied to the microcomputer 204. It is determined whether or not there is. If it is determined that the value of the input signal is greater than the first threshold and less than or equal to the second threshold, the histogram calculation circuit 202 proceeds to step S72 and based on the address signal acquired from the synchronization signal generation circuit 203. It is determined whether or not the input signal is an input Y signal.
[0140]
If it is determined that the input signal is the input Y signal, the histogram calculation circuit 202 proceeds to step S73, counts up the second input histogram value that is a histogram value corresponding to the input Y signal, and proceeds to step S81 in FIG. move on.
[0141]
If it is determined in step S72 of FIG. 14 that the input signal is the output Y signal and not the input Y signal, the histogram calculation circuit 202 proceeds to step S74, and the second output is a histogram value corresponding to the output Y signal. The histogram value is counted up, and the process proceeds to step S81 in FIG.
[0142]
If it is determined in step S71 that the input signal is equal to or lower than the first threshold value or greater than the second threshold value, the process proceeds to step S75 in FIG.
[0143]
In step S75 of FIG. 14, the histogram calculation circuit 202 has a value of the acquired input signal that is greater than the second threshold value supplied to the microcomputer 204 and is equal to or less than a preset maximum value of the input signal. It is determined whether or not. If it is determined that the value of the input signal is greater than the second threshold value and less than or equal to the maximum value, the histogram calculation circuit 202 proceeds to step S76 and inputs the input signal based on the address signal acquired from the synchronization signal generation circuit 203. It is determined whether the signal is an input Y signal.
[0144]
If it is determined that the input signal is the input Y signal, the histogram calculation circuit 202 proceeds to step S777, counts up the third input histogram value that is the histogram value corresponding to the input Y signal, and proceeds to step S81 in FIG. move on.
[0145]
If it is determined in step S76 of FIG. 14 that the input signal is the output Y signal and not the input Y signal, the histogram calculation circuit 202 proceeds to step S78, and the third output is a histogram value corresponding to the output Y signal. The histogram value is counted up, and the process proceeds to step S81 in FIG.
[0146]
If it is determined in step S75 that the input signal is equal to or smaller than the second threshold value or greater than the maximum value, the process proceeds to step S79 in FIG. 14, error processing is performed, and the process proceeds to step S81 in FIG.
[0147]
In step S <b> 81 of FIG. 15, the histogram calculation circuit 202 determines whether or not processing has been performed on the signal for one field based on the address information of the input signal supplied from the synchronization signal generation circuit 203. If it is determined that it has not been performed, the histogram calculation circuit 202 returns to step S62 in FIG. 13 and repeats the subsequent processing.
[0148]
If it is determined that the signal for one field has been processed, the histogram calculation circuit 202 sends the calculated first to third input histogram values and the first to third output histogram values to the microcomputer 204 in step S82. In step S83, the counter is reset.
[0149]
In step S84, the histogram calculation circuit 202 determines whether or not the input has been completed. If it is determined that the input has not ended, the histogram calculation circuit 202 returns to step S61 in FIG. 13 and repeats the subsequent processing. If it is determined that the input has been completed, the histogram calculation circuit 202 ends the histogram integration process.
[0150]
Next, gain adjustment processing in which the microcomputer 204 sets the values of the first gain, the second gain, and the third gain will be described with reference to the flowchart of FIG.
[0151]
First, in step S101, the microcomputer 204 determines whether or not the histogram calculation circuit 202 has acquired the first to third input histogram values and the histogram values including the first to third histogram values. Wait until it is determined that it has been done.
[0152]
If it is determined that the histogram value has been acquired, the microcomputer 204 proceeds to step S102, and calculates normalized histogram cumulative frequency distribution information from the acquired histogram value.
[0153]
FIG. 17 is a graph showing normalized histogram cumulative frequency distribution information calculated by the microcomputer 204.
[0154]
In FIG. 17, the horizontal axis represents the signal level of the Y signal used for calculating the histogram value, and the vertical axis represents the histogram value that is the counted frequency. Here, the values on the horizontal axis and the vertical axis are normalized so that the maximum value is “1”. A straight line 351 represents the cumulative frequency distribution indicating the ideal cumulative frequency distribution, and a curve 352 represents the cumulative frequency distribution calculated based on the histogram value.
[0155]
For example, when FIG. 17 is a graph representing the cumulative frequency distribution information for the output Y signal, the cumulative frequency D2 for the point C1 is the first output histogram value counted by the histogram calculation circuit 202, and the cumulative for the point C2. The frequency D3 is a value obtained by adding the first and second output histogram values counted in the histogram calculation circuit 202, and the cumulative frequency D5 for the point C3 is the first to third output histograms counted in the histogram calculation circuit 202. It is a value obtained by adding values. The same applies when the cumulative frequency distribution information for the input Y signal is represented by a graph.
[0156]
On the other hand, in the case of an ideal cumulative frequency distribution, the cumulative frequencies for points C1 to C3 are D1, D4, and D5, respectively, and are uniformly distributed over all signal levels.
[0157]
Returning to FIG. 16, the microcomputer 204 that has calculated the normalized histogram cumulative frequency distribution information calculates a difference between the calculated normalized histogram cumulative frequency distribution information and the ideal cumulative frequency distribution information in step S 103.
[0158]
FIG. 18 is a graph showing the difference between the normalized histogram cumulative frequency distribution information and the ideal cumulative frequency distribution information.
[0159]
In FIG. 18, the horizontal axis indicates the signal level of the Y signal, and the vertical axis indicates the difference from the ideal cumulative frequency distribution. A straight line 361 indicates a reference ideal cumulative frequency distribution, and a curve 362 indicates normalized histogram cumulative frequency distribution information.
[0160]
For example, when FIG. 18 is a graph showing the difference between the cumulative frequency distribution information for the output Y signal and the ideal cumulative frequency distribution information, the difference value F2 for the point E1 is the first value counted by the histogram calculation circuit 202. The output histogram value is a difference value (D2-D1) from the ideal cumulative frequency, and the difference value F1 for the point E2 is a value obtained by adding the first and second output histogram values counted in the histogram calculation circuit 202. It is a difference value (D3-D4) with the ideal cumulative frequency. Note that the difference with respect to the point E3 is a comparison between the total cumulative frequency obtained by summing up the histogram values and the total cumulative frequency in the ideal cumulative frequency distribution, so the difference value is “0”. The same applies to the case where the difference between the cumulative frequency distribution information for the input Y signal and the ideal cumulative frequency distribution information is represented by a graph.
[0161]
The microcomputer 204 sets the values of the first gain and the second gain so that the correction amount applied to the input Y signal in the gradation conversion circuit 201 approximates the curve 362 shown in FIG. Thereby, it is possible to obtain the same effect as when the histogram equalization process is performed on the photographed image.
[0162]
In the gradation conversion circuit 201, the gradation correction amount can be expressed by the following equation (21).
[0163]
Gradation correction amount = Gb × sin (2π × n / N) + Ga × sin (π × n / N) (21)
However,
1 ≦ n ≦ N (22)
[0164]
In Expression (21), Ga represents the value of the first gain, Gb represents the value of the second gain, and N represents the number of histogram divisions, which is the number obtained by dividing the signal level of the Y signal in the histogram calculation circuit 202. is there. That is, in the example described above, the value of the histogram division number N is “3”.
[0165]
The normalized cumulative frequency calculated by the microcomputer 204 that is the sum of the first input histogram value to the nth input histogram value or the normalized cumulative frequency that is the sum of the first output histogram value to the nth output histogram value is H [n. ], And h [n] is represented by the following formula (23), where h [n] is the difference between H [n] and the ideal cumulative frequency distributed evenly.
[0166]
h [n] = H [n] -n / N (23)
[0167]
In equation (23), h [n] is equivalent to the difference value between the histogram value and the average frequency.
[0168]
The microcomputer 204 determines Ga and Gb so that the difference between the gradation correction amount shown in Expression (21) and h [n] shown in Expression (23) is minimized. Thereby, the gradation correction circuit 201 can improve the gradation while effectively utilizing the dynamic range for the Y signal. However, the microcomputer 204 does not simply minimize this difference, but determines the values of Ga and Gb in a form suitable for backlight correction.
[0169]
By the way, in Expression (21), the correction by the second term on the right side constituting the gradation correction amount is a correction for making the captured image in the backlight state easy to see, and the correction by the first term on the right side is the Y signal of the captured image Is a correction for effectively using the dynamic range. Therefore, in order to perform gradation correction emphasizing backlight correction, the microcomputer 204 first uses the least square method to apply the same effect as that of the conventional gamma correction to the coefficient of the second term on the right side of Equation (21). Determine Ga.
[0170]
The microcomputer 204 calculates the square error Err of the correction amount for all signal levels corresponding to the histogram values acquired from the histogram calculation circuit 202. Assuming that the square error corresponding to Ga is ErrGa, ErrGa is expressed as the following Expression (24).
[0171]
[Equation 3]
Figure 0003865127
[0172]
When the value obtained by differentiating Equation (24) with respect to n is “0”, this error is minimized. An expression obtained by differentiating the expression (24) with respect to n is shown in the following expression (25).
[0173]
[Expression 4]
Figure 0003865127
[0174]
The microcomputer 204 calculates the value of Ga so that the value of ErrGa ′ is “0” in the equation (25). Accordingly, the gradation correction circuit 201 can perform gradation correction for the purpose of backlight correction on the Y signal.
[0175]
Next, the microcomputer 204 calculates the square error Err of the correction amount in the same manner as in the case of Ga in order to obtain the coefficient Gb of the first term on the right side of the equation (21). Err is expressed as the following equation (26).
[0176]
[Equation 5]
Figure 0003865127
[0177]
Here, since Ga has already been obtained, Expression (27) is defined as follows.
[0178]
[Formula 6]
Figure 0003865127
[0179]
When Expression (26) is expressed using Expression (27), Expression (26) is expressed as the following Expression (28).
[0180]
[Expression 7]
Figure 0003865127
[0181]
Since the equation (28) has the same configuration as the equation (24), the microcomputer 204 can obtain Gb by using a circuit or a program that calculates Ga. Thereby, the microcomputer 204 can minimize the scale of a circuit or a program necessary for calculating the first gain and the second gain.
[0182]
Returning to FIG. 16, in step S <b> 104, the microcomputer 204 calculates the first gain value Ga by the least square method based on the difference value calculated in step S <b> 103 as described above.
[0183]
In step S105, the microcomputer 204 calculates the second gain value Gb by the least square method based on the first gain value calculated as described above.
[0184]
In step S106, the microcomputer 204 that has calculated the values of the first gain and the second gain calculates a value of the third gain based on the calculated values of the first gain and the second gain, and performs gain adjustment processing. finish.
[0185]
The calculated values of the first gain to the third gain are supplied to the gradation correction circuit 201 by the microcomputer 204 as the first gain signal to the third gain signal, respectively. The gradation correction circuit 201 performs gradation correction with an emphasis on backlight correction on the Y signal based on the supplied first gain signal to third gain signal. Thereby, an optimal captured image can be obtained.
[0186]
FIG. 19 is a diagram illustrating the relationship between the brightness of incident light and the signal level corresponding to the captured image when the above-described gradation correction is performed on the captured image.
[0187]
In FIG. 19, a straight line 381 indicates the relationship between the brightness of the incident light and the signal level corresponding to the photographed image before gradation correction, and a curve 382 indicates the incident light when the exposure amount is only adjusted. The relationship between the brightness and the signal level corresponding to the photographed image is shown, and the curve 391 shows the relationship between the brightness of the incident light after gradation correction and the signal level corresponding to the photographed image. Also, assume that the indoor brightness is point G1 and the outdoor brightness is point G3.
[0188]
At this time, the signal level corresponding to the point G1 after the gradation correction is the same point H2 as that in the case where only the exposure amount is adjusted, and the signal level corresponding to the point G3 is the signal level before the gradation correction. A similar point H3 is obtained. That is, when the gradation correction as described above is performed, the degree of change in the signal level with respect to the change in brightness can be changed, so that only the signal level of the indoor area in the photographed image is changed from the point H1 to the point H2. Therefore, the difference from the signal level H3 in the outdoor area can be reduced. As a result, the video camera 200 can bring the brightness of the indoor area and the outdoor area of the captured image close to each other, and can provide a captured image that has been optimally corrected for backlight.
[0189]
In the above description, the microcomputer 204 has been described so as to obtain the values of the first gain and the second gain by the method of least squares. However, the present invention is not limited to this. The range that the second gain value can take may be limited. The operation will be described below.
[0190]
The microcomputer 204 acquires a histogram value for each field from the histogram calculation circuit 202 in order to obtain the values of the first gain and the second gain. At that time, the microcomputer 204 classifies the acquired histogram values using a predetermined threshold and analyzes the pattern. The predetermined threshold value may be set to any value, but since the histogram calculation circuit 202 divides the signal level into three and counts the histogram value, 3 is the total number of Y signals in the detection region to be counted. It is desirable to set to 1 /.
[0191]
The microcomputer 204 classifies the histogram values acquired from the histogram calculation circuit 202 by a predetermined threshold value, sets a value “1” when the histogram value is equal to or larger than the threshold value, and sets a value “0” when the histogram value is smaller than the threshold value. ”To roughly classify the signal level distribution of the Y signal corresponding to the captured image.
[0192]
Then, the microcomputer 204 compares the obtained distribution pattern with a lookup table as shown in FIG. 20, and determines a processing method for the captured image.
[0193]
FIG. 20 is a diagram illustrating an example of a lookup table included in the microcomputer 204.
[0194]
In FIG. 20, the look-up table 400 includes an item 401 indicating an output histogram value pattern and an item 402 indicating a processing method for the output histogram value pattern. The item 401 includes an item 412 indicating the pattern of the first output histogram value, an item 413 indicating the pattern of the second output histogram value, and an item 414 indicating the pattern of the third output histogram value.
[0195]
For example, in the third row from the bottom, a value “1” is set in the item 412, a value “0” is set in the item 413, and a value “1” is set in the item 414. In the item 402, “correction” is set. That is, the first output histogram value and the third output histogram value are equal to or greater than a predetermined threshold value. In the case of this distribution pattern, the microcomputer 204 causes the gradation conversion circuit 201 to perform correction processing.
[0196]
The microcomputer 204 performs eight kinds of processing according to the signal level distribution pattern of the Y signal by referring to a lookup table as shown in FIG.
[0197]
Specifically, when all of the first to third output histogram values are smaller than a predetermined threshold value, or when all of the first to third output histogram values have values equal to or larger than the predetermined threshold value, depending on the threshold value, This distribution pattern indicates a distribution pattern that should not exist or that the signal level is uniformly distributed. Therefore, in this case, the microcomputer 204 controls the gradation conversion circuit 201 so as not to perform gradation conversion by setting the values of the first gain and the second gain to “0”.
[0198]
When only the first output histogram value is greater than or equal to the threshold value, or when only the third output histogram value is greater than or equal to the threshold value, the histogram is extremely concentrated on the lower or higher signal level. It shows that. Therefore, in this case, since there is a possibility that the AE function is in the middle of convergence, the microcomputer 204 does not perform gradation conversion by setting the values of the first gain and the second gain to “0”. In this way, the gradation conversion circuit 201 is controlled.
[0199]
If only the third output histogram value is smaller than the threshold value, the AE function may not have converged, but the AE function has already converged, and it is possible that a subject with a very large amount of light has been captured. . Therefore, in this case, the microcomputer 204 sets the first gain value to “1”, sets the second gain value to “0”, and performs gradation conversion as shown by the curve 461 in FIG. The gradation conversion circuit 201 is controlled to perform the above.
[0200]
FIG. 21 is a diagram illustrating an example of a gradation conversion correction pattern set by the microcomputer 204.
[0201]
In FIG. 21, the horizontal axis indicates the signal level of the input Y signal input to the gradation conversion circuit 201, and the vertical axis indicates the signal level of the output Y signal output from the gradation conversion circuit 201. A straight line 451 indicates the relationship between the input signal level and the output signal level before correction, and a curve 461 indicates the relationship between the input signal level and the output signal level after correction.
[0202]
The microcomputer 204 controls the switch circuit 231 to increase the value of the first gain while checking the histogram before and after the gradation conversion, and adjust the degree of correction.
[0203]
When only the first output histogram value is smaller than the threshold value, the microcomputer 204 sets the first gain value to “−1” and the second gain value to “0”, contrary to the case described above. And the gradation conversion circuit 201 is controlled to perform gradation conversion as shown by a curve 471 in FIG.
[0204]
FIG. 22 is a diagram showing another example of the gradation conversion correction pattern set by the microcomputer 204. In FIG.
[0205]
In FIG. 22, a curve 471 indicates the relationship between the corrected input signal level and output signal level. The microcomputer 204 controls the switch circuit 231 to reduce the value of the first gain while checking the histogram before and after the gradation conversion and adjust the degree of correction.
[0206]
If only the second output histogram value is smaller than the threshold value, it is determined that the backlight is in the backlight state, and the microcomputer 204 sets the first gain value to “0” and the second gain value to “1”. Then, the gradation conversion circuit 201 is controlled to perform gradation conversion as indicated by a curve 481 shown in FIG.
[0207]
FIG. 23 is a diagram showing still another example of the gradation conversion correction pattern set by the microcomputer 204.
[0208]
In FIG. 23, a curve 481 shows the relationship between the corrected input signal level and output signal level. The microcomputer 204 controls the switch circuit 231 to increase the value of the second gain while checking the histogram before and after gradation conversion, and adjust the degree of correction.
[0209]
If only the second output histogram value takes a value equal to or greater than the threshold value, it is determined that the light is in an excessively lighted state, and the microcomputer 204 sets the first gain value to “0” and sets the second gain value. The value is set to “−1”, and the gradation conversion circuit 201 is controlled to perform gradation conversion as indicated by a curve 491 shown in FIG.
[0210]
FIG. 24 is a diagram showing still another example of the gradation conversion correction pattern set by the microcomputer 204.
[0211]
In FIG. 24, a curve 491 shows the relationship between the corrected input signal level and output signal level. The microcomputer 204 controls the switch circuit 231 to reduce the value of the second gain while checking the histogram before and after the gradation conversion, and adjust the degree of correction.
[0212]
As described above, the microcomputer 204 can limit the correction pattern performed by the gradation correction circuit 201 in accordance with the distribution pattern of the histogram. The microcomputer 204 may adjust the degree of correction by the least square method as described with reference to the flowchart of FIG. 16 within the limited range of the correction pattern as described above.
[0213]
As described above, the correction using the gradation is effectively performed on the Y signal corresponding to the photographed image easily without using a large-scale circuit or applying an excessive load by software. Can do.
[0214]
In the above description, the histogram calculation circuit 202 has been described so as to divide the signal level into three. However, the present invention is not limited to this. Further, a plurality of detection regions for calculating histogram values may exist for one field of Y signals. Furthermore, each circuit described in FIG. 5 may be partly or entirely integrated with another circuit.
[0215]
In addition, the signal processing unit 211 of the gradation conversion circuit 201 has been described as performing basic correction on the input Y signal using two different functions. However, the present invention is not limited to this. Basic correction may be performed. At this time, the number of gains set by the microcomputer 204 changes according to the number of basic corrections performed by the signal processing unit 211. The signal processing unit 211 may store a basic correction lookup table in advance in the built-in ROM 211A or the like, and perform basic correction based on the lookup table.
[0216]
In the above description, the video camera has been described. However, the present invention is not limited to this. For example, a digital camera, an image recording / playback device such as a VTR (Video Tape Recorder), a television receiver, a projector, a printer, or the like. Other devices having the above functions may be used and can be widely applied to various devices.
[0217]
Further, the above processing 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 network or a recording medium into a general-purpose personal computer or the like.
[0218]
As shown in FIG. 5, the recording medium is distributed to provide a program to the user separately from the apparatus main body, and includes a magnetic disk 91 (including a floppy disk) on which the program is recorded, an optical disk 92 (CD -ROM (Compact Disk-Read Only Memory), DVD (Digital Versatile Disk) included), magneto-optical disk 93 (MD (Mini-Disk) included), or only composed of package media consisting of semiconductor memory 94, etc. Instead, it is configured by a ROM or the like built in the microcomputer 204 in which a program is provided, which is provided to the user in a state of being preinstalled in the apparatus main body.
[0219]
In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the described order, but is not necessarily performed in chronological order. It also includes processes that are executed individually.
[0220]
【The invention's effect】
As described above, according to the signal processing apparatus and method, the recording medium, and the program of the present invention, more effective gradation conversion is performed while suppressing an increase in circuit scale or an increase in load due to software processing. be able to.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a configuration example of a conventional video camera.
FIG. 2 is a diagram illustrating a state in which charges are output from a CCD equipped with a complementary color filter.
FIG. 3 is a diagram showing a state of dynamic range compression by a knee circuit.
FIG. 4 is a diagram illustrating a situation in which a captured image causes whiteout.
FIG. 5 is a block diagram illustrating a basic configuration example of a video camera to which the present invention has been applied.
6 is a diagram illustrating a detailed configuration example of a gradation conversion circuit illustrated in FIG. 5;
FIG. 7 is a graph showing an example of a function constituting the first correction pattern.
FIG. 8 is a graph showing another example of a function constituting the first correction pattern.
9 is a diagram showing a detailed configuration example of a histogram calculation circuit 202. FIG.
FIG. 10 is a flowchart illustrating tone conversion processing.
FIG. 11 is a flowchart illustrating a Y signal correction process executed in step S3 of FIG.
12 is a flowchart for explaining aperture correction processing executed in step S4 of FIG.
FIG. 13 is a flowchart for describing histogram integration processing by a histogram calculation circuit.
FIG. 14 is a flowchart following FIG. 13 for explaining the histogram integration processing by the histogram calculation circuit.
FIG. 15 is a flowchart following FIG. 14 for explaining the histogram integration processing by the histogram calculation circuit.
FIG. 16 is a flowchart for describing gain adjustment processing by a microcomputer;
FIG. 17 is a graph showing normalized histogram cumulative frequency distribution information calculated by a microcomputer.
FIG. 18 is a graph showing a difference between normalized histogram cumulative frequency distribution information and ideal cumulative frequency distribution information.
FIG. 19 is a graph showing the relationship between the brightness of incident light and the signal level corresponding to the photographed image when tone correction is performed on the photographed image.
FIG. 20 is a diagram illustrating an example of a lookup table included in a microcomputer.
FIG. 21 is a diagram illustrating an example of a gradation conversion correction pattern set by a microcomputer.
FIG. 22 is a diagram showing another example of the gradation conversion correction pattern set by the microcomputer.
FIG. 23 is a diagram showing still another example of the gradation conversion correction pattern set by the microcomputer.
FIG. 24 is a diagram showing still another example of the gradation conversion correction pattern set by the microcomputer.
[Explanation of symbols]
200 Video Camera, 201 Gradation Conversion Circuit, 202 Histogram Calculation Circuit, 203 Synchronization Signal Generation Circuit, 204 Microcomputer, 211 Signal Processing Unit, 211 A ROM, 231 Switch Circuit, 301 to 304 Comparator, 311 to 313 AND Gate, 321 Thru 323 counters

Claims (14)

入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正手段と、
前記輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出手段と、
前記ヒストグラム算出手段により算出された前記ヒストグラムに基づいて、前記補正手段による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定手段と、
前記補正手段による補正により得られた前記補正後信号のそれぞれと、前記ゲイン決定手段により決定された前記ゲインのそれぞれを乗算する乗算手段と、
前記乗算手段による乗算の結果に基づいて、入力された前記輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成手段と
を備えることを特徴とする信号処理装置。
Correction means for correcting the input luminance signal with different correction patterns to obtain a plurality of corrected signals ;
Histogram calculation means for calculating a histogram of an image corresponding to the luminance signal;
Gain determining means for determining a plurality of gains for determining the respective degrees of a plurality of corrected signals obtained by correction by the correcting means based on the histogram calculated by the histogram calculating means ;
Multiplying means for multiplying each of the corrected signals obtained by the correction by the correcting means and each of the gains determined by the gain determining means;
A signal processing apparatus comprising: an output luminance signal generation unit configured to generate an output luminance signal obtained by performing gradation correction on the input luminance signal based on a result of multiplication by the multiplication unit.
前記補正パターンは、互いに異なる複数の関数により構成され、
前記補正手段は、前記関数のそれぞれについて、前記輝度信号を補正して前記補正後信号を得る
ことを特徴とする請求項1に記載の信号処理装置。
The correction pattern is composed of a plurality of different functions,
The correction means corrects the luminance signal for each of the functions to obtain the corrected signal.
The signal processing apparatus according to claim 1, characterized in that.
前記補正パターンは、互いに異なる、少なくとも1つの凸を含む曲線の関数により構成され、
前記補正手段は、前記関数のそれぞれについて、前記輝度信号を補正して前記補正後信号を得る
ことを特徴とする請求項1に記載の信号処理装置。
The correction pattern is constituted by a function of curves different from each other and including at least one convexity,
The signal processing apparatus according to claim 1 , wherein the correction unit corrects the luminance signal for each of the functions to obtain the corrected signal .
前記補正パターンは、互いに係数の異なる複数の正弦関数を含み、
前記補正手段は、前記正弦関数のそれぞれについて、前記輝度信号を補正して前記補正後信号を得る
ことを特徴とする請求項1に記載の信号処理装置。
The correction pattern includes a plurality of sine functions having different coefficients from each other,
The signal processing apparatus according to claim 1 , wherein the correction unit corrects the luminance signal for each of the sine functions to obtain the corrected signal .
前記補正パターンは、前記輝度信号の振幅レベルの中央より明るい側と暗い側とで、それぞれ、前記階調を調整する第1の補正パターン、および、前記振幅レベルを3分割し、それぞれのレベルで前記階調を調整する第2の補正パターンにより構成され、
前記補正手段は、前記第1の補正パターンを用いて前記輝度信号を補正し、第1の補正信号を得るとともに、前記第2の補正パターンを用いて前記輝度信号を補正し、第2の補正信号を得る
ことを特徴とする請求項1に記載の信号処理装置。
The correction pattern is divided into a first correction pattern for adjusting the gradation and the amplitude level in three parts on the brighter side and the darker side than the center of the amplitude level of the luminance signal. A second correction pattern for adjusting the gradation,
The correction means corrects the luminance signal using the first correction pattern to obtain a first correction signal, corrects the luminance signal using the second correction pattern, and performs a second correction. The signal processing apparatus according to claim 1 , wherein a signal is obtained .
前記補正手段は、
前記補正パターンを記憶する記憶手段を備える
ことを特徴とする請求項1に記載の信号処理装置。
The correction means includes
The signal processing apparatus according to claim 1, further comprising storage means for storing the correction pattern .
前記記憶手段により記憶されている前記補正パターンは、入力された前記輝度信号と、前記補正後信号との関係を示すルックアップテーブルにより構成される
ことを特徴とする請求項6に記載の信号処理装置。
The signal processing according to claim 6 , wherein the correction pattern stored in the storage unit is configured by a look-up table indicating a relationship between the input luminance signal and the corrected signal. apparatus.
前記ヒストグラム算出手段は、前記輝度信号に対応する画像の一部、または全部からなる所定の領域について、前記ヒストグラムを算出する
ことを特徴とする請求項1に記載の信号処理装置。
The signal processing apparatus according to claim 1 , wherein the histogram calculation unit calculates the histogram for a predetermined region including a part or all of an image corresponding to the luminance signal .
前記ヒストグラム算出手段は、算出した前記ヒストグラムに基づいて、前記輝度信号の信号レベルの小さい方から度数を累積させた度数分布であるヒストグラム累積度数分布をさらに算出する
ことを特徴とする請求項1に記載の信号処理装置。
Said histogram calculating means, on the basis of the calculated histogram, to claim 1, characterized by further calculating a histogram cumulative frequency distribution is a frequency distribution obtained by accumulating the frequency from the smaller signal level of the luminance signal The signal processing apparatus as described.
前記ゲイン決定手段は、前記ヒストグラム算出手段により算出された前記ヒストグラム累積度数分布と、前記補正後信号の階調特性との差が最小となるように、前記ゲインを決定する
ことを特徴とする請求項9に記載の信号処理装置。
Said gain determining means, the said histogram cumulative frequency distribution calculated by histogram calculation means, so that the difference between the gradation characteristic of the corrected signal is minimized, claims and determines the gain Item 10. The signal processing device according to Item 9 .
前記出力用輝度信号生成手段は、
前記乗算手段による乗算の結果のそれぞれを加算する第1の加算手段と、
前記第1の加算手段による加算結果と前記輝度信号を加算し、前記出力用輝度信号を生成する第2の加算手段と
を備えることを特徴とする請求項1に記載の信号処理装置。
The output luminance signal generation means includes:
First addition means for adding each of the results of multiplication by the multiplication means;
Second addition means for adding the addition result by the first addition means and the luminance signal to generate the output luminance signal;
The signal processing apparatus according to claim 1, characterized in that it comprises a.
入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正ステップと、
前記輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出ステップと、
前記ヒストグラム算出ステップの処理により算出された前記ヒストグラムに基づいて、前記補正ステップの処理による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定ステップと、
前記補正ステップの処理による補正により得られた前記補正後信号のそれぞれと、前記ゲイン決定ステップの処理により決定された前記ゲインのそれぞれを乗算する乗算ステップと、
前記乗算ステップの処理による乗算の結果に基づいて、入力された前記輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成ステップと
を含むことを特徴とする信号処理方法。
A correction step for correcting the input luminance signal with different correction patterns and obtaining a plurality of corrected signals ;
A histogram calculating step of calculating a histogram of an image corresponding to the luminance signal;
A gain determination step for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by the correction by the correction step processing based on the histogram calculated by the histogram calculation step ;
A multiplication step of multiplying each of the post-correction signals obtained by correction by the processing of the correction step and each of the gains determined by the processing of the gain determination step;
An output luminance signal generation step for generating an output luminance signal obtained by performing gradation correction on the input luminance signal based on a result of multiplication by the processing of the multiplication step. .
入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正ステップと、
前記輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出ステップと、
前記ヒストグラム算出ステップの処理により算出された前記ヒストグラムに基づいて、前記補正ステップの処理による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定ステップと、
前記補正ステップの処理による補正により得られた前記補正後信号のそれぞれと、前記ゲイン決定ステップの処理により決定された前記ゲインのそれぞれを乗算する乗算ステップと、
前記乗算ステップの処理による乗算の結果に基づいて、入力された前記輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成ステップと
を含むことを特徴とするコンピュータが読み取り可能なプログラムが記録されている記録媒体。
A correction step for correcting the input luminance signal with different correction patterns and obtaining a plurality of corrected signals ;
A histogram calculating step of calculating a histogram of an image corresponding to the luminance signal;
A gain determination step for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by the correction by the correction step processing based on the histogram calculated by the histogram calculation step ;
A multiplication step of multiplying each of the post-correction signals obtained by correction by the processing of the correction step and each of the gains determined by the processing of the gain determination step;
An output luminance signal generation step for generating an output luminance signal obtained by performing gradation correction on the input luminance signal based on a result of multiplication by the processing of the multiplication step ; A recording medium on which possible programs are recorded.
入力された輝度信号に対して、互いに異なる補正パターンで補正を行い、複数の補正後信号を得る補正ステップと、
前記輝度信号に対応する画像のヒストグラムを算出するヒストグラム算出ステップと、
前記ヒストグラム算出ステップの処理により算出された前記ヒストグラムに基づいて、前記補正ステップの処理による補正により得られる複数の補正後信号の、それぞれの度合いを決定する複数のゲインを決定するゲイン決定ステップと、
前記補正ステップの処理による補正により得られた前記補正後信号のそれぞれと、前記ゲイン決定ステップの処理により決定された前記ゲインのそれぞれを乗算する乗算ステップと、
前記乗算ステップの処理による乗算の結果に基づいて、入力された前記輝度信号に階調補正を施した出力用輝度信号を生成する出力用輝度信号生成ステップと
を含む処理をコンピュータが実行可能なことを特徴とするプログラム。
A correction step for correcting the input luminance signal with different correction patterns and obtaining a plurality of corrected signals ;
A histogram calculating step of calculating a histogram of an image corresponding to the luminance signal;
A gain determination step for determining a plurality of gains for determining the respective degrees of the plurality of corrected signals obtained by the correction by the correction step processing based on the histogram calculated by the histogram calculation step ;
A multiplication step of multiplying each of the post-correction signals obtained by correction by the processing of the correction step and each of the gains determined by the processing of the gain determination step;
The computer can execute a process including an output luminance signal generation step for generating an output luminance signal obtained by performing gradation correction on the input luminance signal based on a result of multiplication by the multiplication step. A program characterized by
JP2002055824A 2002-03-01 2002-03-01 Signal processing apparatus and method, recording medium, and program Expired - Fee Related JP3865127B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002055824A JP3865127B2 (en) 2002-03-01 2002-03-01 Signal processing apparatus and method, recording medium, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002055824A JP3865127B2 (en) 2002-03-01 2002-03-01 Signal processing apparatus and method, recording medium, and program

Publications (2)

Publication Number Publication Date
JP2003259206A JP2003259206A (en) 2003-09-12
JP3865127B2 true JP3865127B2 (en) 2007-01-10

Family

ID=28666571

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002055824A Expired - Fee Related JP3865127B2 (en) 2002-03-01 2002-03-01 Signal processing apparatus and method, recording medium, and program

Country Status (1)

Country Link
JP (1) JP3865127B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5111310B2 (en) * 2008-09-09 2013-01-09 キヤノン株式会社 Image processing method and image processing apparatus
JP5651340B2 (en) * 2010-01-22 2015-01-14 ミツミ電機株式会社 Image quality control apparatus, image quality control method, and image quality control program

Also Published As

Publication number Publication date
JP2003259206A (en) 2003-09-12

Similar Documents

Publication Publication Date Title
US8208038B2 (en) Image signal processing device and image signal processing method
US9438875B2 (en) Image processing apparatus, image processing method, and program
JP4163353B2 (en) Image processing device
JP3762725B2 (en) Imaging system and image processing program
US7742637B2 (en) Apparatus, method, and program for taking an image, and apparatus, method, and program for processing an image
US7358988B1 (en) Image signal processor for performing image processing appropriate for an output device and method therefor
US7995135B2 (en) Image capturing apparatus for adjusting an exposure value that is set lower than the correct exposure value
JP4003399B2 (en) Image processing apparatus and method, and recording medium
US7057653B1 (en) Apparatus capable of image capturing
US8081239B2 (en) Image processing apparatus and image processing method
US20070076103A1 (en) Image pickup apparatus and image processing method
US20030184660A1 (en) Automatic white balance for digital imaging
US8913154B2 (en) Image processing apparatus
US9749546B2 (en) Image processing apparatus and image processing method
KR20080035981A (en) Image processing apparatus, imaging apparatus, image processing method and computer program
JP4212741B2 (en) Image processing device
JP2001238129A (en) Image processing apparatus and recording medium
US20070211165A1 (en) Imaging device, method for controlling imaging device, program of method for controlling imaging device, recording medium in which program of method for controlling imaging device is recorded
JP3865127B2 (en) Signal processing apparatus and method, recording medium, and program
JP2003069821A (en) Imaging system
JP4240261B2 (en) Image processing apparatus and method, and recording medium
JP2009022044A (en) Image processing apparatus and image processing program
JP2009065691A (en) Image processing apparatus, recording medium and image processing program
JP2001238128A (en) Image processing apparatus
JP2004215063A (en) Photographing device and outline correction method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040728

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060406

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060418

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060615

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060927

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

Free format text: PAYMENT UNTIL: 20091013

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101013

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111013

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121013

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees