JP3896438B2 - Digital camera and auto white balance control method - Google Patents

Digital camera and auto white balance control method Download PDF

Info

Publication number
JP3896438B2
JP3896438B2 JP10428599A JP10428599A JP3896438B2 JP 3896438 B2 JP3896438 B2 JP 3896438B2 JP 10428599 A JP10428599 A JP 10428599A JP 10428599 A JP10428599 A JP 10428599A JP 3896438 B2 JP3896438 B2 JP 3896438B2
Authority
JP
Japan
Prior art keywords
white balance
image
image signal
gain
converter
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
JP10428599A
Other languages
Japanese (ja)
Other versions
JP2000299876A (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.)
Fujifilm Corp
Original Assignee
Fujifilm 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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP10428599A priority Critical patent/JP3896438B2/en
Publication of JP2000299876A publication Critical patent/JP2000299876A/en
Application granted granted Critical
Publication of JP3896438B2 publication Critical patent/JP3896438B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Description

【0001】
【発明の属する技術分野】
本発明はデジタルカメラに係り、特にそのオートホワイトバランス制御技術に関する。
【0002】
【従来の技術】
CCD等の固体撮像素子から得られる画像信号から、赤(R)、緑(G)、青(B)の画素を別々に積算して色温度情報を得てホワイトバランスを補正する方式として、一般に、積算ブロックよりも前段(A/D変換前)のアナログゲインでホワイトバランスを補正する方式と、積算ブロックよりも後段(A/D変換後)のデジタルゲインで補正する方式とが知られている。前者の方式は例えば特開平5−37939号公報に開示され、後者の方式は特開平5−183925号公報に開示されている。
【0003】
【発明が解決しようとする課題】
しかしながら、積算ブロックより前段のアナログゲインでホワイトバランスを補正すると、アナログゲインのバラツキにより、一度に正確にゲインを合わせることは困難である。更に、ホワイトバランス補正後は、R、G、Bの積算データに補正に補正値が反映されるため、補正後の色温度情報を使用するのは困難である。また、ビデオカメラ(ムービー方式)のようにフィードバック制御方式を採用する方式もあるが、スチルカメラのように一瞬でホワイトバランス制御を行う必要があるものに対して適用するには不向きである。
【0004】
その一方、積算ブロックより後段のデジタルゲインでホワイトバランスを補正する場合、積算ブロックはゲイン補正回路の前の信号から取り出すため、後段のデジタルゲインで補正を行うと、AEレベルが変動してしまうという不具合がある。これは、AE用の検出データはR、G、Bの積算値から輝度レベルを計算しており、ホワイトバランスの演算はAEの演算より後に行われることに起因する。また、デジタルゲインでホワイトバランスを補正すると、デジタル信号にゲインをかけることになるため、画質劣化にもつながるという欠点がある。
【0005】
本発明はこのような事情に鑑みてなされたもので、短時間でホワイトバランス補正ができ、画質劣化が少なく、ホワイトバランス後のAEレベルが崩れないオートホワイトバランス制御方法を提供するとともに、その制御方法を実現可能なデジタルカメラを提供することを目的とする。
【0006】
【課題を解決するための手段】
前記目的を達成するために、本願請求項1に係るデジタルカメラは、光学像を電気信号に変換する撮像素子と、撮影シーンの光源種を判別する光源種判別手段と、前記光源種判別手段で判定した光源種に適した所定のホワイトバランス調整値にしたがって、前記撮像素子から取得したアナログ形式の画像信号のゲインを制御することによりホワイトバランスを補正する第1のホワイトバランス補正手段と、前記第1のホワイトバランス補正手段によってホワイトバランスが補正されたアナログ形式の画像信号からデジタル形式の画像信号に変換するA/D変換器と、前記A/D変換器から出力されたデジタル形式の画像信号に基づいて自動露出制御用の演算を行う自動露出制御手段と、前記自動露出制御手段の演算結果に応じた露出制御のもとで、前記画像の記録実行指示の受入に呼応して撮像され、前記A/D変換器から出力される画像信号に基づいて、各色チャンネルのホワイトバランス補正値を求め、当該求めたホワイトバランス補正値にしたがって前記A/D変換器から出力された前記画像信号の各色チャンネル毎のゲインを制御することによりホワイトバランスを補正する第2のホワイトバランス補正手段と、を備えたことを特徴としている。
【0007】
本発明によれば、A/D変換前段の第1のホワイトバランス補正手段においてアナログゲインでホワイトバランスを補正(粗補正)した後、更に、A/D変換後段の第2のホワイトバランス補正手段においてデジタルゲインでホワイトバランスを補正(微補正)するので、画質劣化が少なく、良好な画像を取得できる。光源種の判別にあたっては、撮像素子から得られる画像信号に基づいてシーン判別を行ってもよいし(内部測光方式)、外部センサで色温度を測定してもよい(外部測光方式)。
【0008】
本願請求項2に係るオートホワイトバランス制御方法は、撮影シーンの光源種を判別するステップと、その判別により特定した光源種に適した所定のホワイトバランス調整値にしたがって、前記撮像素子から取得したアナログ形式の画像信号のゲインを制御することにより第1のホワイトバランス補正を行うステップと、画像の記録実行指示の受入に呼応して撮像素子から読み出され、前記第1のホワイトバランス補正によってホワイトバランスが補正されたアナログ形式の画像信号をA/D変換器によってデジタル形式の画像信号に変換するステップと、デジタル形式の画像信号に基づいて自動露出制御用の演算を行うステップと、その演算結果に応じた露出制御のもとで、前記画像の記録実行指示の受入に呼応して撮像され、前記A/D変換器から出力されるデジタル形式の画像信号に基づいて、各色チャンネルのホワイトバランス補正値を求めるステップと、当該求めたホワイトバランス補正値にしたがって前記A/D変換器から出力された前記画像信号の各色チャンネル毎のゲインを制御することにより第2のホワイトバランス補正を行うステップと、を含むことを特徴としている。
【0010】
本発明に係るオートホワイトバランス制御方法によれば、AE演算より前段のアナログゲインでホワイトバランスを補正し、ホワイトバランスが粗補正されたデータに基づいてAE演算を行う。そして、そのAE演算に応じて適正な露出制御がなされた撮像系によって、画像の記録実行指示(例えば、シャッタボタンの全押しに相当するS2 =ONの信号)の受入に呼応して記録用の撮像(本撮像)が行われる。この本撮像で得られた画像データに対して、更にデジタルゲインでホワイトバランスの微補正を行うので、AEレベルが崩れることなくホワイトバランス制御ができる。
【0011】
【発明の実施の形態】
以下添付図面に従って本発明に係るデジタルカメラ及びオートホワイトバランス制御方法の好ましい実施の形態について詳説する。
図1は本発明が適用されたデジタルカメラの実施の形態を示すブロック図であり、図2はその要部の詳細な構成を示すブロック図である。これらの図に示すように、デジタルカメラ10は、主として、撮影レンズ12、絞り装置14、CCD固体撮像素子(以下、CCDという)16、アナログ信号処理部18、デジタル信号処理部20、中央演算処理装置(CPU)22、メモリカード24、及び液晶モニタ(LCD)26等から構成されている。
【0012】
撮影レンズ12及び絞り装置14を介してCCD16の受光面に結像された被写体像は、CCD16の各感光画素(センサ)で光の入射光量に応じた量の信号電荷に変換される。このようにして蓄積された信号電荷は、CCD駆動回路(ドライバ)28から加えられるリードゲートパルスによって垂直転送路に読み出された後、前記ドライバ28から加えられる垂直転送パルスによって水平転送路に転送され、水平転送パルスによって信号電荷に応じた電圧信号として順次読み出される。、CCD16は、各感光画素において蓄積した信号電荷をシャッタゲートパルスによってドレイン部に掃き出すことができ、これにより電荷の蓄積時間(シャッタスピード)を制御する、いわゆる電子シャッタ機能を有している。
【0013】
CCD16から順次読み出された電圧信号はアナログ信号処理部18に供給される。アナログ信号処理部18は、第1のゲインコントロール回路(以下、前段ゲインブロックという)30、タイミング発生回路32、及びA/D変換器34を含む。CCD16から出力された信号は各画素毎に赤(R)、緑(G)、青(B)の各色信号に分離されるとともに、前段ゲインブロック30においてアナログゲインによるホワイトバランス調整(第1のホワイトバランス補正)が行われる。
【0014】
前段ゲインブロック30は、R信号を増幅する増幅器30Rと、B信号を増幅する増幅器30Bとを有している(図2参照)。これら各増幅器30R、30BはCPU22から出力されるR制御値(R−CONT)、及びB制御値(B−CONT)にしたがってゲイン値が制御される。本例ではG信号を基準としてR信号とB信号のレベルを可変する制御がなされる。ホワイトバランス制御の詳細について後述する。
【0015】
前段ゲインブロック30から出力された信号はA/D変換器34に加えられる。A/D変換器34は、前段ゲインブロック30から順次加えられるR、G、B信号を10ビット(0〜1023)のデジタル形式のR、G、B信号に変換して出力する。尚、CCD駆動回路28、前段ゲインブロック30、及びA/D変換器34は、タイミング発生回路32から加えられるタイミング信号によって同期して駆動されるようになっている。
【0016】
A/D変換器34から出力されたR、G、B信号は、デジタル信号処理部20に加えられる。デジタル信号処理部20は、積算ブロック36、第2のゲインコントロール回路(後段ゲインブロックという)38、ガンマ補正ブロック40、YC処理ブロック42、及びエンコードブロック44を含む。
A/D変換器34から出力されたR、G、B信号は、バス46を介してCPU22内のダイナミックランダムアクセスメモリ(DRAM)48に導かれ、DRAM48のCCDデータ格納部48Aに記憶されるとともに、積算ブロック36に供給される。
【0017】
積算ブロック36は1画面を複数のエリア(例えば、64×64)に分割し、各エリア毎にR、G、B信号の色別の平均積算値を算出する回路であり、その算出結果はCPU22に提供される。また、この積算ブロック36はCPU22とともにAE演算部を構成している。
後段ゲインブロック38はDRAM48から読み出されたR、G、B信号のデジタル値をそれぞれ増減するための乗算器38R、38G、38Bから構成されており(図2参照)、各色チャンネルの乗算器38R、38G、38BにはCPU22からホワイトバランス補正のための補正値を示す制御信号(R−CONT、G−CONT、B−CONT)が加えられる。各乗算器38R、38G、38BはDRAM48から読み出されたR、G、B信号のデジタル値と、前記CPU22から供給される調整値とを乗算し、この乗算によってホワイトバランス調整されたR、G、B信号をガンマ補正ブロック40に出力する。
【0018】
かかる後段ゲインブロック38においても、Gチャンネルを基準としてR及びBの値が調整される。尚、後段ゲインブロック38におけるホワイトバランス補正(第2のホワイトバランス補正)の詳細については後述する。
ガンマ補正ブロック40は、ホワイトバランス調整されたR、G、B信号が所望のガンマ特性となるように入出力特性を変更し、また、10ビットの信号が8ビットの信号となるように変更し、YC処理ブロック42に出力する。
【0019】
YC処理ブロック42は、ガンマ補正されたR、G、B信号から輝度信号Yとクロマ信号Cr、Cbとを作成する回路で構成される。これらの輝度信号Yとクロマ信号Cr、Cb(YC信号)は、バス46を介してDRAM48に導かれ、DRAM48のYCデータ格納部48Bに記憶される。
撮影時にDRAM48に格納されたYC信号は、図示せぬ圧縮伸張回路によって所定のフォーマットに従って圧縮されたのち、メモリカード24などの記録媒体に記録される。メモリカードの種類として例えばスマートメディアが使用される。尚、記録媒体はこれに限らず、PCカード、フラッシュメモリーカード、ICカード、フロッピーディスク、光磁気ディスク(MO)、スティックメモリ等の他の種類であってもよい。
【0020】
メモリカード24に記録されているデータはCPU22を介して読み出しが可能であり、メモリカード24から読み出されたデータは、図示せぬ圧縮伸張回路において再生処理された後、DRAM48に格納される。画像信号を液晶モニタ26や図示せぬ外部機器に出力する場合には、DRAM48から輝度信号と色差信号をエンコードブロック44に供給する。
【0021】
エンコードブロック44は入力された輝度信号及び色差信号を所定の映像信号(例えば、NTSC形式のビデオ信号)に変換して出力部から出力する。これにより、撮影モード時にはCCD16を介して取得され撮像された画像が液晶モニタ26に表示され、また、再生モード時にはメモリカード24に記録されている画像が液晶モニタ26に再生表示される。尚、画像を表示する手段は液晶モニタ26に限らず、他の表示装置でもよい。
【0022】
CPU22は撮影開始指示スイッチに相当するシャッタボタン等の各種操作スイッチを含む操作部50からの入力に基づいて各回路を統括制御するとともに、オートフォーカス、自動露光制御、オートホワイトバランス等の制御を行う制御手段の役割を果たす。オートフォーカス制御は、例えばG信号の高周波成分が最大になるように撮影レンズ12を移動させるコントラストAFであり、シャッタボタンの半押し時にG信号の高周波成分が最大になるようにレンズ駆動部52を介して撮影レンズ12を合焦位置に移動させる。
【0023】
また、自動露光制御(AE)は、1フレームのR、G、B信号を積算した積算値に基づいて被写体輝度(撮影EV)を求め、この撮影EVに基づいて絞り値とシャッタスピードを決定し、絞り駆動部54を介して絞り装置14を駆動するとともに、決定したシャッタスピードとなるように電子シャッタによって電荷の蓄積時間を制御し、再度1フレームのR、G、B信号を取得して再度撮影EVを求める。
【0024】
シャッタボタンの半押し時に上記測光動作を複数回繰り返して正確な撮影EVを求め、この撮影EVに基づいて撮影時の絞り値とシャッタスピードを最終的に決定する。そして、シャッタボタンの全押し時に前記最終的に決定した絞り値になるように絞り駆動部44を介して絞り14を駆動し、また、決定したシャッタスピードとなるように電子シャッタによって電荷の蓄積時間を制御する。
【0025】
また、このデジタルカメラ10はストロボ装置56を有し、図示せぬストロボキーの操作に応じて、低輝度時にストロボ装置56を自動的に発光させる低輝度自動発光モード、被写体輝度にかかわらずストロボ装置56を発光させる強制発光モード、又はストロボ装置56の発光を禁止させる発光禁止モード等に設定される。
【0026】
CPU22はユーザが選択したストロボモードに応じて図示しないメインコンデンサの充電制御や、発光管(例えば、キセノン管)への放電(発光)タイミング等を制御する。また、CPU22はストロボモードの設定に応じたホワイトバランス制御を行うようになっている。EEPROM58にはホワイトバランス制御に必要な調整値データが格納されており、CPU22は必要に応じてこれらデータを活用する。
【0027】
次に、ホワイトバランス制御方法について説明する。
図3は、本例のデジタルカメラ10における画像記録動作時(録画時)の処理の流れを示すフローチャートである。CPU22はシャッタボタンの半押し(S1 =ON)操作の有無を監視し(ステップS310)、S1 がONしたことを検出すると、CCD16を含む撮像系の電源ON処理を行う(ステップS312)。そして、撮像系が安定状態になった後、AE処理を実行する(ステップS314)。ここでのAE演算結果に基づいて、適正露出にセットされた時の積算データを基に、最初のホワイトバランス処理(1)を行う(ステップS316)。
【0028】
この時のホワイトバランス制御は、積算ブロック36から受入するR、G、B画素の積算値からR/G、B/Gの比を求め、これらR/G、B/Gの値と、AE演算による撮影EV値の情報に基づいてシーン判別(光源種の判別)を行い、シーンに適した所定のホワイトバランス調整値に従って、前段ゲインブロック30のアンプゲインを制御する。尚、シーン判別においては、R/G、B/Gの値を利用するのに代えて、R−Y、B−Yなど色温度情報を用いてもよい。シーン判別の具体的手法については後述する。
【0029】
このホワイトバランス処理(1)によってAEレベルが変化することになるため、もう一度AE処理を行う(ステップS318)。次いで、AF処理を行う(ステップS320)。
その後、CPU22はシャッタボタンの全押し(S2 =ON)の有無を監視し(ステップS322)、S2 がONしたことを検出すると、記録用画像の取得(本撮像)の処理において、もう一度ホワイトバランス処理(2)を行う(S324)。ここでのホワイトバランス制御は、本撮像で得られた画像データから、R/G、B/Gを求め、これらR/G、B/Gの値に基づいて計算されたホワイトバランス調整値に従って、後段ゲインブロック38のゲインを制御する。
【0030】
すなわち、本撮像で取り込んだ1画面の画像データからRの積算値、Bの積算値、Gの積算値を得て、R/G、B/Gを求める。このとき、カラーフェリアを防ぐため色成分が高いデータは取り除き、残りのR/G、B/Gデータの各比の値が1(つまり、1画面においてR、G、Bの積算比率がR:G:B=1:1:1)になるように、各色チャンネルの信号に補正をかける。
【0031】
これにより、本撮像に係る画像に対してホワイトバランスの微調整を行うことができる。特に、ストロボ装置56は本撮像時にしか発光しないため、ステップS316で設定したホワイトバランスが、実際のストロボ発光によってずれることがあるが、本実施の形態のように、本撮像時にデジタルゲインによるホワイトバランスの微補正を行うことにより、良好な画像を取得することができる。
【0032】
続いて、画像信号の黒レベル補正を行う(ステップS326)。これは、CCDから取得される画像信号のバイアスレベルが多少上下に変動するために、画像信号からバイアス分を除去する処理である。尚、かかる黒レベル補正に必要な黒レベルを知るために、CCD16の感光画素の一部が遮光されている。
画像の取り込みが終了すると、CPU22は撮像系の電源OFF処理を行う(ステップS328)。そして、液晶モニタ26にプレビュー画を再生表示するとともに(ステップS330)、当該取得画像のデータをメモリカード24に書き込む(ステップS332)。メモリカード24への記録処理が終了したら、処理はステップS310に戻り、次の録画開始指示の入力を待つ。
【0033】
図4には、本例のデジタルカメラ10において、シャッタボタンが押される前から、液晶モニタ26に動画(スルー画)を表示させている場合の撮影動作の処理手順が示されている。録画待機中に動画を表示させるモードの場合、先ず、CPU22は撮像系の電源ON処理を行い(ステップS410)、CCD16からの画像取り込みを可能にする。そして、動画についてAE処理を行うとともに(ステップS412)、前段ゲインブロック30を用いて、フィードバック制御によるホワイトバランス処理(3)を行う(ステップS414)。
【0034】
次いで、CPU22はシャッタボタンの半押し(S1 =ON)操作の有無を判定し(ステップS416)、S1 がONしていないときは、ステップS410に戻って、上記処理ステップS410〜S416)が繰り返され、液晶モニタ26には動画が表示される。
ステップS416においてS1 がONしたことが検出されると、静止画取り込みのためのAE処理を実行する(ステップS418)。次いで、シーン判別に基づくホワイトバランス処理(4)を行う(ステップS420)。この処理は、図3のステップS316で説明したホワイトバランス処理(1)とほぼ同様であるが、ステップS414においてフィードバックによるホワイトバランス補正がかけられているので、正確なシーン判別を行うために、ゲインの逆算、或いは、S1 =ONに連動してホワイトバランス補正のリセットが必要となる。尚、ステップS414における動画のホワイトバランスの結果を活用することも考えられるが、フィードバックによるホワイトバランス補正が収束する前にシャッタボタンが押される場合もあり得るので、本例ではS1 がONした後に改めてホワイトバランス補正を行うようにしている。
【0035】
ステップS420に示したホワイトバランス処理(4)によってAEレベルが変化することになるため、もう一度AE処理を行う(ステップS422)。次いで、AF処理を行う(ステップS424)。
その後、CPU22はシャッタボタンの全押し(S2 =ON)の有無を監視し(ステップS426)、S2 がONしたことを検出すると、本撮像の処理において、もう一度ホワイトバランス処理(5)を行う(S428)。ここでのホワイトバランス制御は、図3のステップS324で説明したホワイトバランス処理(2)と同様の処理であり、後段ゲインブロック38のデジタルゲインを制御して、ホワイトバランスの微補正を行う。
【0036】
続いて、画像信号の黒レベル補正を行い(ステップS430)、画像の取り込みが終了したらCPU22は撮像系の電源OFF処理を行う(ステップS432)。そして、液晶モニタ26にプレビュー画を再生表示するとともに(ステップS434)、当該取得画像のデータをメモリカード24に書き込む(ステップS436)。メモリカード24への記録処理が終了した後、処理はステップS410に戻り、次の録画開始指示の入力を待つことになる。尚、S1 =ON及びS2 =ONの信号は図示せぬリモコン装置から与えられてもよい。
【0037】
また、撮影条件をユーザが手動で設定するマニュアル撮影モードの場合、又は、ストロボ発光時には、前段ゲインブロック30は予め決められている所定のゲインに切り替えられる。この時、前段ゲインブロック30におけるホワイトバランス制御では、EEPROM58に保存されている各ポジションの調整されたデータを使用することになる。尚、前記マニュアル撮影モード時、又は、ストロボ発光時には、後段ゲインブロック38のデジタルゲインでは補正を行わず、前段ゲインブロック30のアナログゲインのみでホワイトバランス補正を行う態様も可能である。
【0038】
次に、シーン判別の手法及びシーン判別に基づくホワイトバランス制御方法の一例について説明する。
前段ゲインブロック30におけるゲインの調整値に相当するR制御値(R−CONT)、及びB制御値(B−CONT)は、ストロボモードに応じて次のように決定される。
【0039】
まず、低輝度自動発光モードの場合のホワイトバランス制御について、図5のフローチャートを参照しながら説明する。
この場合、シャッタボタンの半押し(S1 =ON)時に1フレーム分のR、G、Bデータから撮影EV値を取得すると(ステップS510)、その撮影EV値に基づいて低輝度発光するか否かを判別する(ステップS512)。ここで、撮影EV値が所定の値(10EV)以下の場合には、低輝度発光すると判別し、ストロボ光に適したホワイトバランス制御を行う(ステップS514)。即ち、ストロボ光に対して良好なホワイトバランスを行うためのホワイトバランスゲイン値Rg、BgがEEPROM58内に予め準備されており、これらのゲイン値Rg、Bgを示す調整値(R−CONT、B−CONT)が前段ゲインブロック30に加えられる。
【0040】
一方、ステップS512において低輝度発光しないと判定した時は、積算ブロック36から受入する各エリアごとのR、G、B信号の色別の平均積算値から、R信号の積算値とG信号の積算値との比R/G、及びB信号の積算値とG信号の積算値との比B/Gを求める(ステップS516)。次に、日陰らしさを検出する(ステップS518)。この日陰らしさの検出は、以下に示す日陰らしさの評価値を計算することによって行う。
【0041】
【数1】
日陰らしさの評価値 =F(屋外らしさ)*F(日陰らしさ)*F(青空)
上記式において、F(屋外らしさ)は、図8に示すように撮影EV値を変数とする屋外日陰らしさを表すメンバシップ関数の値である。また、F(日陰らしさ)は、図10に示すように所定の輝度以下のエリアであって、日陰検出枠内に入るエリアの個数を変数とする日陰らしさを表すメンバシップ関数の値であり、F(青空)は、図11に示すように所定の輝度以上のエリアであって、青空検出枠内に入るエリアの個数を変数とする青空を表すメンバシップ関数の値である。
【0042】
ここで、各エリアの輝度(EV値Evi)は、次式、
【0043】
【数2】
Evi=Ev+log2(Gi/45)
但し、Ev:撮影EV値
Gi:各エリアのGの平均積算値
に基づいて計算する。尚、上記式中の45は、A/D変換後の値の中での適正値である。
【0044】
また、日陰検出枠、青空検出枠等は、図7に示すように横軸をR/Gとし、縦軸をB/Gとするグラフ上に表された枠であり、各検出枠ごとに光源種などの色分布の範囲を規定するものである。
さて、前記F(日陰らしさ)の値は、〔数2〕式によって求めたエリアのEV値Eviが12以下のエリアであって、エリアごとに求めたR/G、B/Gが、図7上の日陰検出枠に入るエリアの個数を求め、その個数に基づいて図10に示すメンバシップ関数から求める。同様に、F(青空)の値は、エリアのEV値Eviが12.5を越えるエリアであって、エリアごとに求めたR/G、B/Gが、図7上の青空検出枠に入るエリアの個数を求め、その個数に基づいて図11に示すメンバシップ関数から求める。尚、F(青空)は、青空検出枠に入るエリアの個数が多い程、日陰らしさの評価値を下げる方向に作用する値をとる。
【0045】
図2のステップS518では、F(屋外らしさ)と、F(日陰らしさ)と、F(青空)の各メンバシップ関数の値を積算して日陰らしさの評価値を求める。そして、ステップS520では、上記ステップS518で求めた日陰らしさの評価値が、所定の基準値(この実施の形態では、0.47)以上か否かを判別し、日陰らしさの評価値が0.47以上の場合には、屋外の日陰であると判別し、屋外の日陰に適したホワイトバランス制御を行う(ステップS522)。屋外の日陰のシーンに適したホワイトバランスを行うためのゲイン値がEEPROM58内に予め準備されており、これらのゲイン値を示す調整値(R−CONT、B−CONT)が前段ゲインブロック30に加えられることによってホワイトバランス補正が行われる。
【0046】
一方、日陰らしさの評価値が、0.47未満の場合には、デーライト(晴れ)と判別し、デーライトに適したホワイトバランス制御を行う(ステップS524)。デーライトのシーンに適したホワイトバランスを行うためのゲイン値がEEPROM58内に予め準備されており、これらのゲイン値を示す調整値(R−CONT、B−CONT)が前段ゲインブロック30に加えられることによってホワイトバランス補正が行われる。
【0047】
次に、発光禁止モードの場合のホワイトバランス制御について、図6のフローチャートを参照しながら説明する。
この場合、シャッタボタンの半押し時に撮影EV値を取得するとともに(ステップS630)、図5のステップS516と同様に全画面が64×64に分割された各エリアごとのR/G、B/Gを求める(ステップS632)。
【0048】
次に、前述した日陰らしさの評価値の他に、蛍光灯(昼光色、昼白色、白色)らしさの評価値、及びタングステン電球らしさの評価値を、次式、
【0049】
【数3】
昼光色らしさの評価値=F1(屋内らしさ)*F(昼光色蛍光灯らしさ)
【0050】
【数4】
昼白色らしさの評価値=F1(屋内らしさ)*F(昼白色蛍光灯らしさ)
【0051】
【数5】
白色らしさの評価値 =F1(屋内らしさ)*F(白色蛍光灯らしさ)
【0052】
【数6】
電球らしさの評価値 =F2(屋内らしさ)*F(電球らしさ)*F(肌)
に基づいて算出する。
ここで、〔数3〕式乃至〔数5〕式におけるF1(屋内らしさ)は、図9に示すように撮影EV値を変数とする屋内(蛍光灯)らしさを表すメンバシップ関数の値であり、〔数6〕式におけるF2(屋内らしさ)は、図9に示すように撮影EV値(カッコ内の数値)を変数とする屋内(タングステン電球)らしさを表すメンバシップ関数の値である。
【0053】
また、〔数3〕式乃至〔数6〕式におけるF(昼光色蛍光灯らしさ)、F(昼白色蛍光灯らしさ)、F(白色蛍光灯らしさ)及びF(電球らしさ)は、それぞれ図7に示した昼光色検出枠、昼白色検出枠、白色検出枠、及びタングステン電球検出枠内に入るエリアの個数を変数とする、図12に示す蛍光灯・電球らしさを表すメンバシップ関数の値である。
【0054】
更に、〔数6〕式におけるF(肌)は、図7に示した肌色検出枠内に入るエリアの個数を変数とする、図13に示す肌色を表すメンバシップ関数の値である。尚、F(肌)は、肌色検出枠内のエリア数が多くなるにしたがって電球らしさの評価値を下げるように作用する。これは、肌色があるシーンで、タングステン電球色に対するホワイトバランス制御を強くかけると、赤味がとんで白っぽくなり顔色が悪くなるからである。
【0055】
さて、日陰らしさの評価値(〔数1〕式参照)、及び昼光色らしさの評価値、昼白色らしさの評価値、白色らしさの評価値、電球らしさの評価値が算出されると、これらの5つの評価値のうちの最大値が、0.47以上か否かを判別する(図6のステップS636)。そして、最大値が0.47以上の場合には、その最大値をとる評価値の光源色に適したホワイトバランス制御を行う(ステップS638)。
【0056】
一方、最大値が、0.47未満の場合には、デーライトと判別し、デーライトに適したホワイトバランス制御を行う(ステップS640)。
ここで、日陰、昼光色蛍光灯、昼白色蛍光灯、白色蛍光灯、タングステン電球、及びデーライトの各光源色に適したホワイトバランス制御は、各光源色に対して良好なホワイトバランスを行うためのゲイン値がEEPROM58内に予め準備されており、これらのゲイン値を示す調整値(R−CONT、B−CONT)が前段ゲインブロック30に加えられることによってホワイトバランス補正が行われる。
【0057】
また、この実施の形態では、光源種検出のための評価値を〔数1〕式や、〔数3〕式乃至〔数6〕式に基づいて算出するようにしたが、更に他の要素(他のメンバシップ関数)を付加して算出するようにしてもよい。更に、光源種はこの実施の形態に限定されず、例えば、蛍光灯は1種類又は2種類でもよい。
本発明の実施の形態によれば、前段ゲインブロック30のアナログゲインでホワイトバランスを補正(粗調整)し、更に、本撮像で得られた画像に対して後段のゲインブロック38のデジタルゲインでホワイトバランスを補正(微調整)するようにしたので、画質劣化が少なく、またAEレベルが崩れることなくホワイトバランス制御ができる。
【0058】
特に、本実施の形態によれば、シャッタボタンの半押し(S1 =ON)時に、シーン判定に基づいてホワイトバランス制御を行った後、シャッタボタンの全押し(S2 =ON)時に、デジタルゲインによる微補正を行うため、電球や蛍光灯のミックス光に対しても、的確なホワイトバランス制御ができる。
また、ストロボ光が届かず、外部光源の影響が大きいシーンや、異なった色温度のストロボ発光時でも的確なホワイトバランス制御ができる。
【0059】
【発明の効果】
以上説明したように本発明によれば、撮影シーンの光源種の判別に基づいてA/D変換前にアナログゲインによる第1のホワイトバランス補正を行い、A/D変換後にデジタルゲインによる第2のホワイトバランス補正を行うようにしたので、短時間でホワイトバランス補正をすることができ、画質劣化が少なく、ホワイトバランス後にAEで求められたレベルと出力レベルが大きく変動することもない。
【図面の簡単な説明】
【図1】本発明が適用されたデジタルカメラの実施の形態を示すブロック図
【図2】図1に示したデジタルカメラの要部構成を示すブロック図
【図3】本例のデジタルカメラにおける画像記録動作時の処理の流れを示すフローチャート
【図4】本例のデジタルカメラにおいて動画表示状態から画像記録動作を開始する時の処理の流れを示すフローチャート
【図5】低輝度発光モード時のオートホワイトバランス制御方法を説明するために用いたフローチャート
【図6】発光禁止モード時のオートホワイトバランス制御方法を説明するために用いたフローチャート
【図7】光源種などの色分布の範囲を示す検出枠を示すグラフ
【図8】屋外らしさを表すメンバシップ関数を示すグラフ
【図9】屋内らしさを表すメンバシップ関数を示すグラフ
【図10】日陰らしさを表すメンバシップ関数を示すグラフ
【図11】青空を表すメンバシップ関数を示すグラフ
【図12】蛍光灯・電球らしさを表すメンバシップ関数を示すグラフ
【図13】肌色を表すメンバシップ関数を示すグラフ
【符号の説明】
10…デジタルカメラ、16…CCD(撮像素子)、18…アナログ信号処理部、20…デジタル信号処理部、22…中央演算処理装置(CPU)、24…メモリカード、30…前段ゲインブロック(第1のホワイトバランス補正手段)、34…A/D変換器、36…積算ブロック、38…後段ゲインブロック(第2のホワイトバランス補正手段)
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a digital camera, and more particularly to an auto white balance control technique thereof.
[0002]
[Prior art]
As a method of correcting white balance by obtaining color temperature information by separately integrating red (R), green (G), and blue (B) pixels from an image signal obtained from a solid-state imaging device such as a CCD. A method of correcting the white balance with an analog gain before the integration block (before A / D conversion) and a method of correcting with a digital gain after the integration block (after A / D conversion) are known. . The former method is disclosed, for example, in JP-A-5-37939, and the latter method is disclosed in JP-A-5-183925.
[0003]
[Problems to be solved by the invention]
However, if the white balance is corrected with the analog gain before the integration block, it is difficult to accurately adjust the gain at once due to variations in the analog gain. Furthermore, after white balance correction, the correction value is reflected in the correction data in the accumulated R, G, and B data, so that it is difficult to use the corrected color temperature information. Also, there is a method that employs a feedback control method such as a video camera (movie method), but it is not suitable for application to a device that needs to perform white balance control instantaneously, such as a still camera.
[0004]
On the other hand, when the white balance is corrected with the digital gain at the subsequent stage from the integration block, the integration block takes out from the signal before the gain correction circuit, and therefore the AE level fluctuates when correction is performed with the digital gain at the subsequent stage. There is a bug. This is because the AE detection data calculates the luminance level from the integrated values of R, G, and B, and the white balance calculation is performed after the AE calculation. In addition, when white balance is corrected with digital gain, gain is applied to the digital signal, which leads to a disadvantage of image quality degradation.
[0005]
The present invention has been made in view of such circumstances, and provides an automatic white balance control method capable of correcting white balance in a short time, causing little deterioration in image quality, and maintaining the AE level after white balance. An object is to provide a digital camera capable of realizing the method.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, a digital camera according to claim 1 of the present application includes an imaging device that converts an optical image into an electrical signal, a light source type determining unit that determines a light source type of a shooting scene, and the light source type determining unit. According to the predetermined white balance adjustment value suitable for the determined light source type, Obtained from the image sensor First white balance correction means for correcting white balance by controlling the gain of an analog image signal; The white balance is corrected by the first white balance correction means. An A / D converter for converting an analog image signal into a digital image signal; Under the exposure control according to the calculation result of the automatic exposure control means, the automatic exposure control means for performing the calculation for automatic exposure control based on the digital image signal output from the A / D converter, Captured in response to acceptance of the recording execution instruction for the image, Based on the image signal output from the A / D converter, a white balance correction value for each color channel is obtained, and according to the obtained white balance correction value. The image signal output from the A / D converter Each color channel Every game And second white balance correction means for correcting white balance by controlling in.
[0007]
According to the present invention, after the white balance is corrected (roughly corrected) with the analog gain in the first white balance correction means before the A / D conversion, and further in the second white balance correction means after the A / D conversion. Since the white balance is corrected (finely corrected) with digital gain, it is possible to acquire a good image with little image quality deterioration. In determining the light source type, scene determination may be performed based on an image signal obtained from the image sensor (internal photometry method), or the color temperature may be measured by an external sensor (external photometry method).
[0008]
An automatic white balance control method according to claim 2 of the present invention includes a step of determining a light source type of a shooting scene, and a predetermined white balance adjustment value suitable for the light source type specified by the determination, Obtained from the image sensor A step of performing a first white balance correction by controlling a gain of an analog image signal, and reading out from the image sensor in response to reception of an image recording execution instruction. Converting an analog image signal whose balance has been corrected to a digital image signal by an A / D converter; A step of performing an automatic exposure control calculation based on a digital image signal, and under the exposure control according to the calculation result, is imaged in response to acceptance of the recording execution instruction of the image, A step of obtaining a white balance correction value of each color channel based on a digital image signal output from the A / D converter, and according to the obtained white balance correction value The image signal output from the A / D converter Each color channel Every game And performing a second white balance correction by controlling in.
[0010]
According to the auto white balance control method of the present invention, the white balance is corrected with the analog gain before the AE calculation, and the AE calculation is performed based on the data on which the white balance is roughly corrected. Then, the image pickup system in which appropriate exposure control is performed in accordance with the AE calculation uses the image recording execution instruction (for example, S2 = ON signal corresponding to full pressing of the shutter button) for recording. Imaging (main imaging) is performed. Since the white balance is finely corrected with the digital gain for the image data obtained by the actual imaging, the white balance can be controlled without losing the AE level.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of a digital camera and an auto white balance control method according to the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 is a block diagram showing an embodiment of a digital camera to which the present invention is applied, and FIG. 2 is a block diagram showing a detailed configuration of a main part thereof. As shown in these drawings, the digital camera 10 mainly includes a photographing lens 12, an aperture device 14, a CCD solid-state imaging device (hereinafter referred to as CCD) 16, an analog signal processing unit 18, a digital signal processing unit 20, and a central processing unit. A device (CPU) 22, a memory card 24, a liquid crystal monitor (LCD) 26, and the like are included.
[0012]
The subject image formed on the light receiving surface of the CCD 16 via the photographing lens 12 and the diaphragm device 14 is converted into signal charges of an amount corresponding to the amount of incident light by each photosensitive pixel (sensor) of the CCD 16. The signal charges accumulated in this way are read out to the vertical transfer path by the read gate pulse applied from the CCD drive circuit (driver) 28, and then transferred to the horizontal transfer path by the vertical transfer pulse applied from the driver 28. Then, it is sequentially read out as a voltage signal corresponding to the signal charge by the horizontal transfer pulse. The CCD 16 has a so-called electronic shutter function that can sweep out the signal charge accumulated in each photosensitive pixel to the drain portion by a shutter gate pulse, thereby controlling the charge accumulation time (shutter speed).
[0013]
The voltage signal sequentially read from the CCD 16 is supplied to the analog signal processing unit 18. The analog signal processing unit 18 includes a first gain control circuit (hereinafter referred to as a pre-stage gain block) 30, a timing generation circuit 32, and an A / D converter 34. The signal output from the CCD 16 is separated into red (R), green (G), and blue (B) color signals for each pixel and white balance adjustment (first white) by analog gain in the pre-stage gain block 30. Balance correction) is performed.
[0014]
The pre-stage gain block 30 includes an amplifier 30R that amplifies the R signal and an amplifier 30B that amplifies the B signal (see FIG. 2). The gain values of these amplifiers 30R and 30B are controlled according to the R control value (R-CONT) and B control value (B-CONT) output from the CPU 22. In this example, control is performed to vary the levels of the R signal and the B signal with reference to the G signal. Details of the white balance control will be described later.
[0015]
The signal output from the pre-stage gain block 30 is applied to the A / D converter 34. The A / D converter 34 converts the R, G, and B signals sequentially added from the preceding gain block 30 into a 10-bit (0 to 1023) digital R, G, and B signal and outputs the converted signal. The CCD drive circuit 28, the pre-stage gain block 30, and the A / D converter 34 are driven in synchronization with a timing signal applied from the timing generation circuit 32.
[0016]
The R, G, and B signals output from the A / D converter 34 are added to the digital signal processing unit 20. The digital signal processing unit 20 includes an integration block 36, a second gain control circuit (referred to as a subsequent stage gain block) 38, a gamma correction block 40, a YC processing block 42, and an encoding block 44.
The R, G and B signals output from the A / D converter 34 are guided to a dynamic random access memory (DRAM) 48 in the CPU 22 via the bus 46 and stored in the CCD data storage section 48A of the DRAM 48. , And supplied to the integration block 36.
[0017]
The integration block 36 is a circuit that divides one screen into a plurality of areas (for example, 64 × 64), and calculates an average integration value for each color of the R, G, and B signals for each area. Provided to. The integration block 36 constitutes an AE calculation unit together with the CPU 22.
The post-stage gain block 38 includes multipliers 38R, 38G, and 38B for increasing and decreasing the digital values of the R, G, and B signals read from the DRAM 48 (see FIG. 2), and the multipliers 38R for the respective color channels. , 38G, 38B are supplied with control signals (R-CONT, G-CONT, B-CONT) indicating correction values for white balance correction from the CPU 22. Each of the multipliers 38R, 38G, and 38B multiplies the digital values of the R, G, and B signals read from the DRAM 48 by the adjustment value supplied from the CPU 22, and the white balance adjusted R, G by this multiplication. , B signals are output to the gamma correction block 40.
[0018]
Also in the latter-stage gain block 38, the values of R and B are adjusted based on the G channel. The details of the white balance correction (second white balance correction) in the latter-stage gain block 38 will be described later.
The gamma correction block 40 changes the input / output characteristics so that the R, G, B signals subjected to white balance adjustment have the desired gamma characteristics, and changes so that the 10-bit signal becomes an 8-bit signal. , Output to the YC processing block 42.
[0019]
The YC processing block 42 is configured by a circuit that creates a luminance signal Y and chroma signals Cr and Cb from the R, G, and B signals that have been subjected to gamma correction. The luminance signal Y and chroma signals Cr and Cb (YC signal) are led to the DRAM 48 via the bus 46 and stored in the YC data storage section 48B of the DRAM 48.
The YC signal stored in the DRAM 48 at the time of shooting is compressed according to a predetermined format by a compression / expansion circuit (not shown) and then recorded on a recording medium such as the memory card 24. For example, smart media is used as the type of memory card. The recording medium is not limited to this, but may be other types such as a PC card, a flash memory card, an IC card, a floppy disk, a magneto-optical disk (MO), and a stick memory.
[0020]
Data recorded in the memory card 24 can be read out via the CPU 22, and the data read out from the memory card 24 is reproduced in a compression / decompression circuit (not shown) and then stored in the DRAM 48. When outputting an image signal to the liquid crystal monitor 26 or an external device (not shown), a luminance signal and a color difference signal are supplied from the DRAM 48 to the encoding block 44.
[0021]
The encoding block 44 converts the input luminance signal and color difference signal into a predetermined video signal (for example, a video signal in the NTSC format) and outputs it from the output unit. As a result, an image acquired and captured via the CCD 16 is displayed on the liquid crystal monitor 26 in the photographing mode, and an image recorded on the memory card 24 is reproduced and displayed on the liquid crystal monitor 26 in the reproduction mode. The means for displaying an image is not limited to the liquid crystal monitor 26, and other display devices may be used.
[0022]
The CPU 22 performs overall control of each circuit based on input from the operation unit 50 including various operation switches such as a shutter button corresponding to a shooting start instruction switch, and performs control such as autofocus, automatic exposure control, and auto white balance. Acts as a control means. The autofocus control is, for example, contrast AF that moves the photographing lens 12 so that the high frequency component of the G signal is maximized, and the lens driving unit 52 is set so that the high frequency component of the G signal is maximized when the shutter button is half-pressed. Then, the photographing lens 12 is moved to the in-focus position.
[0023]
The automatic exposure control (AE) obtains the subject brightness (shooting EV) based on the integrated value obtained by integrating the R, G, and B signals of one frame, and determines the aperture value and the shutter speed based on the shot EV. In addition to driving the diaphragm device 14 via the diaphragm driving unit 54, the charge accumulation time is controlled by the electronic shutter so that the determined shutter speed is obtained, and the R, G, B signals of one frame are acquired again, and then again. The shooting EV is obtained.
[0024]
When the shutter button is half-pressed, the above photometric operation is repeated a plurality of times to obtain an accurate shooting EV, and the aperture value and shutter speed at the time of shooting are finally determined based on this shooting EV. Then, when the shutter button is fully pressed, the diaphragm 14 is driven via the diaphragm driving unit 44 so that the finally determined diaphragm value is obtained, and the electric charge accumulation time is obtained by the electronic shutter so that the determined shutter speed is obtained. To control.
[0025]
The digital camera 10 also has a strobe device 56. A low-brightness automatic flash mode in which the strobe device 56 automatically emits light at low brightness in response to an operation of a strobe key (not shown), regardless of subject brightness. 56 is set to a forced light emission mode in which light is emitted from 56, or a light emission inhibition mode in which light emission from the flash device 56 is prohibited.
[0026]
The CPU 22 controls charging of a main capacitor (not shown), discharge (light emission) timing to a light emitting tube (for example, a xenon tube), and the like according to a strobe mode selected by the user. Further, the CPU 22 performs white balance control according to the setting of the strobe mode. The EEPROM 58 stores adjustment value data necessary for white balance control, and the CPU 22 utilizes these data as necessary.
[0027]
Next, a white balance control method will be described.
FIG. 3 is a flowchart showing the flow of processing during the image recording operation (during recording) in the digital camera 10 of this example. The CPU 22 monitors whether or not the shutter button is half-pressed (S1 = ON) (step S310). When the CPU 22 detects that the S1 is turned on, the CPU 22 performs power-on processing of the imaging system including the CCD 16 (step S312). Then, after the imaging system becomes stable, AE processing is executed (step S314). On the basis of the AE calculation result here, the first white balance processing (1) is performed based on the integration data when the appropriate exposure is set (step S316).
[0028]
In this case, the white balance control calculates the ratio of R / G and B / G from the integrated values of the R, G and B pixels received from the integrating block 36, and calculates the R / G and B / G values and the AE calculation. Scene discrimination (light source type discrimination) is performed on the basis of the information of the shooting EV value obtained by, and the amplifier gain of the pre-stage gain block 30 is controlled according to a predetermined white balance adjustment value suitable for the scene. In scene determination, color temperature information such as RY and BY may be used instead of using the values of R / G and B / G. A specific method for scene discrimination will be described later.
[0029]
Since the AE level is changed by the white balance process (1), the AE process is performed again (step S318). Next, AF processing is performed (step S320).
Thereafter, the CPU 22 monitors whether or not the shutter button is fully pressed (S2 = ON) (step S322). When the CPU 22 detects that the S2 is turned on, the white balance process is performed once again in the process of acquiring the recording image (main imaging). (2) is performed (S324). In this white balance control, R / G and B / G are obtained from image data obtained by actual imaging, and the white balance adjustment value calculated based on these R / G and B / G values is used. The gain of the subsequent stage gain block 38 is controlled.
[0030]
That is, the R integrated value, the B integrated value, and the G integrated value are obtained from the image data of one screen captured by the main imaging, and R / G and B / G are obtained. At this time, in order to prevent color failure, data with high color components is removed, and the ratio values of the remaining R / G and B / G data are 1 (that is, the integration ratio of R, G, and B is R: G: B = 1: 1: 1) is applied to each color channel signal.
[0031]
Thereby, fine adjustment of white balance can be performed on the image related to the main imaging. In particular, since the strobe device 56 emits light only during main imaging, the white balance set in step S316 may be shifted due to actual strobe light emission. However, as in the present embodiment, white balance due to digital gain is used during main imaging. A fine image can be obtained by performing the fine correction.
[0032]
Subsequently, the black level of the image signal is corrected (step S326). This is processing for removing the bias from the image signal because the bias level of the image signal acquired from the CCD slightly fluctuates up and down. In order to know the black level necessary for such black level correction, a part of the photosensitive pixels of the CCD 16 is shielded from light.
When the image capture is completed, the CPU 22 performs power-off processing for the imaging system (step S328). Then, the preview image is reproduced and displayed on the liquid crystal monitor 26 (step S330), and the data of the acquired image is written in the memory card 24 (step S332). When the recording process to the memory card 24 is completed, the process returns to step S310 and waits for the input of the next recording start instruction.
[0033]
FIG. 4 shows a processing procedure of the photographing operation in the case where the moving image (through image) is displayed on the liquid crystal monitor 26 before the shutter button is pressed in the digital camera 10 of this example. In a mode in which a moving image is displayed during recording standby, first, the CPU 22 performs power-on processing of the imaging system (step S410), and enables image capture from the CCD 16. Then, AE processing is performed on the moving image (step S412), and white balance processing (3) by feedback control is performed using the pre-stage gain block 30 (step S414).
[0034]
Next, the CPU 22 determines whether or not the shutter button is half-pressed (S1 = ON) (step S416). If S1 is not ON, the process returns to step S410 and the above processing steps S410 to S416) are repeated. The moving image is displayed on the liquid crystal monitor 26.
If it is detected in step S416 that S1 is turned on, an AE process for capturing a still image is executed (step S418). Next, white balance processing (4) based on scene discrimination is performed (step S420). This process is almost the same as the white balance process (1) described in step S316 in FIG. 3, but since the white balance correction by feedback is applied in step S414, the gain is determined in order to perform accurate scene discrimination. It is necessary to reset the white balance correction in conjunction with the reverse calculation of S1 or S1 = ON. Although it is conceivable to use the result of the white balance of the moving image in step S414, since the shutter button may be pressed before the white balance correction by feedback converges, in this example, after S1 is turned on again. White balance correction is performed.
[0035]
Since the AE level is changed by the white balance process (4) shown in step S420, the AE process is performed again (step S422). Next, AF processing is performed (step S424).
Thereafter, the CPU 22 monitors whether or not the shutter button is fully pressed (S2 = ON) (step S426), and when it is detected that S2 is turned on, the white balance process (5) is performed once again in the main imaging process (S428). ). The white balance control here is the same process as the white balance process (2) described in step S324 in FIG. 3, and the digital gain of the latter-stage gain block 38 is controlled to perform a fine correction of the white balance.
[0036]
Subsequently, the black level of the image signal is corrected (step S430), and when the image capture is completed, the CPU 22 performs power-off processing of the imaging system (step S432). Then, the preview image is reproduced and displayed on the liquid crystal monitor 26 (step S434), and the data of the acquired image is written to the memory card 24 (step S436). After the recording process to the memory card 24 is completed, the process returns to step S410 and waits for the input of the next recording start instruction. The signals S1 = ON and S2 = ON may be given from a remote controller (not shown).
[0037]
Further, in the manual shooting mode in which the user manually sets the shooting conditions, or at the time of strobe light emission, the pre-stage gain block 30 is switched to a predetermined gain. At this time, in the white balance control in the pre-stage gain block 30, the adjusted data of each position stored in the EEPROM 58 is used. In the manual photographing mode or the strobe light emission, the digital gain of the subsequent gain block 38 is not corrected but the white balance correction is performed only with the analog gain of the previous gain block 30.
[0038]
Next, an example of a scene discrimination method and a white balance control method based on scene discrimination will be described.
The R control value (R-CONT) and the B control value (B-CONT) corresponding to the gain adjustment value in the pre-stage gain block 30 are determined as follows according to the strobe mode.
[0039]
First, the white balance control in the low luminance automatic light emission mode will be described with reference to the flowchart of FIG.
In this case, when the shooting EV value is acquired from the R, G, B data for one frame when the shutter button is half-pressed (S1 = ON) (step S510), whether or not low-luminance light emission is performed based on the shooting EV value. Is determined (step S512). Here, when the photographing EV value is equal to or less than the predetermined value (10 EV), it is determined that the light emission is low luminance, and white balance control suitable for strobe light is performed (step S514). That is, white balance gain values Rg and Bg for performing good white balance with respect to the strobe light are prepared in advance in the EEPROM 58, and adjustment values (R-CONT, B-) indicating these gain values Rg and Bg are prepared. CONT) is added to the pre-stage gain block 30.
[0040]
On the other hand, when it is determined in step S512 that low luminance emission is not performed, the integrated value of the R signal and the integrated value of the G signal are calculated from the average integrated value for each color of the R, G, and B signals received from the integrating block 36. A ratio R / G to the value and a ratio B / G between the integrated value of the B signal and the integrated value of the G signal are obtained (step S516). Next, shading is detected (step S518). The detection of the shade is performed by calculating the evaluation value of the shade shown below.
[0041]
[Expression 1]
Evaluation value of shade-likeness = F (likeness of outdoors) * F (likeness of shade) * F (blue sky)
In the above formula, F (likeness of outdoors) is a value of a membership function representing the degree of shade of the outdoors with the shooting EV value as a variable as shown in FIG. Further, F (shadeness) is a value of a membership function that represents shading, which is an area having a predetermined luminance or less as shown in FIG. As shown in FIG. 11, F (blue sky) is a membership function value representing a blue sky, which is an area having a predetermined luminance or higher and the number of areas falling within the blue sky detection frame is a variable.
[0042]
Here, the luminance (EV value Evi) of each area is expressed by the following equation:
[0043]
[Expression 2]
Evi = Ev + log 2 (Gi / 45)
However, Ev: Shooting EV value
Gi: Average integrated value of G in each area
Calculate based on Incidentally, 45 in the above formula is an appropriate value among the values after A / D conversion.
[0044]
Further, the shade detection frame, the blue sky detection frame, and the like are frames represented on a graph in which the horizontal axis is R / G and the vertical axis is B / G as shown in FIG. It defines the range of color distribution such as seeds.
The F (shadeness) value is an area where the EV value Evi of the area obtained by the equation (2) is 12 or less, and R / G and B / G obtained for each area are shown in FIG. The number of areas that fall within the upper shade detection frame is obtained, and the membership function shown in FIG. 10 is obtained based on the number of areas. Similarly, the value of F (blue sky) is an area where the EV value Evi of the area exceeds 12.5, and R / G and B / G obtained for each area enter the blue sky detection frame in FIG. The number of areas is obtained, and the membership function shown in FIG. 11 is obtained based on the number. Note that F (blue sky) takes a value that acts in the direction of lowering the evaluation value of shading as the number of areas entering the blue sky detection frame increases.
[0045]
In step S518 in FIG. 2, the evaluation values of the shade-likeness are obtained by integrating the values of the membership functions of F (outdoor-likeness), F (shade-likeness), and F (blue sky). In step S520, it is determined whether or not the shade evaluation value obtained in step S518 is equal to or greater than a predetermined reference value (0.47 in this embodiment). In the case of 47 or more, it is determined that it is an outdoor shade, and white balance control suitable for the outdoor shade is performed (step S522). Gain values for white balance suitable for outdoor shaded scenes are prepared in the EEPROM 58 in advance, and adjustment values (R-CONT, B-CONT) indicating these gain values are added to the pre-stage gain block 30. As a result, white balance correction is performed.
[0046]
On the other hand, if the evaluation value of shading is less than 0.47, it is determined as daylight (clear) and white balance control suitable for daylight is performed (step S524). Gain values for white balance suitable for a daylight scene are prepared in the EEPROM 58 in advance, and adjustment values (R-CONT, B-CONT) indicating these gain values are added to the pre-stage gain block 30. As a result, white balance correction is performed.
[0047]
Next, white balance control in the light emission inhibition mode will be described with reference to the flowchart of FIG.
In this case, the shooting EV value is acquired when the shutter button is half-pressed (step S630), and R / G and B / G for each area in which the entire screen is divided into 64 × 64 as in step S516 of FIG. Is obtained (step S632).
[0048]
Next, in addition to the above-described evaluation value of shade, the evaluation value of the fluorescent lamp (daylight color, neutral white, white), and the evaluation value of tungsten light bulb,
[0049]
[Equation 3]
Daylight color evaluation value = F 1 (Like indoors) * F (Like daylight fluorescent lights)
[0050]
[Expression 4]
Evaluation value of daylight whiteness = F 1 (Like indoor) * F (Like white fluorescent light)
[0051]
[Equation 5]
Evaluation value of whiteness = F 1 (Like indoor) * F (Like white fluorescent light)
[0052]
[Formula 6]
Evaluation value of light bulb quality = F 2 (Indoor) * F (Light bulb) * F (Skin)
Calculate based on
Here, F in [Expression 3] to [Expression 5] 1 As shown in FIG. 9, (indoorness) is a value of a membership function representing indoorness (fluorescent lamp) with the photographing EV value as a variable. 2 As shown in FIG. 9, (indoorness) is a value of a membership function that represents the likelihood of indoor (tungsten bulb) with the shooting EV value (the value in parentheses) as a variable.
[0053]
In addition, F (daylight fluorescent lamp-like), F (daylight white fluorescent-light), F (white fluorescent lamp-like) and F (bulb-likeness) in [Expression 3] to [Expression 6] are shown in FIG. 12 is a membership function value indicating the fluorescent lamp / bulb characteristic shown in FIG. 12 with the number of areas included in the illustrated daylight color detection frame, day white color detection frame, white color detection frame, and tungsten light bulb detection frame as variables.
[0054]
Further, F (skin) in the equation (6) is a membership function value representing the skin color shown in FIG. 13 with the number of areas falling within the skin color detection frame shown in FIG. 7 as a variable. Note that F (skin) acts to lower the evaluation value of the light bulb as the number of areas in the skin color detection frame increases. This is because, in a scene with skin color, if white balance control is strongly applied to the tungsten light bulb color, the reddish color will fade and the face color will become worse.
[0055]
When the evaluation value of shade (see the formula [1]), the evaluation value of the daylight color, the evaluation value of the day whiteness, the evaluation value of the whiteness, and the evaluation value of the light bulb are calculated, these 5 It is determined whether or not the maximum value among the two evaluation values is 0.47 or more (step S636 in FIG. 6). If the maximum value is 0.47 or more, white balance control suitable for the light source color of the evaluation value that takes the maximum value is performed (step S638).
[0056]
On the other hand, when the maximum value is less than 0.47, it is determined as daylight, and white balance control suitable for daylight is performed (step S640).
Here, the white balance control suitable for each light source color of shade, daylight fluorescent lamp, day white fluorescent lamp, white fluorescent lamp, tungsten bulb, and daylight is used for performing a good white balance for each light source color. Gain values are prepared in advance in the EEPROM 58, and white balance correction is performed by adding adjustment values (R-CONT, B-CONT) indicating these gain values to the pre-stage gain block 30.
[0057]
In this embodiment, the evaluation value for detecting the light source type is calculated based on the formula [1] and the formulas [3] to [6]. Other membership functions) may be added for calculation. Furthermore, the type of light source is not limited to this embodiment, and for example, one or two fluorescent lamps may be used.
According to the embodiment of the present invention, the white balance is corrected (coarse adjustment) with the analog gain of the front gain block 30, and the white gain is applied with the digital gain of the subsequent gain block 38 to the image obtained by the main imaging. Since the balance is corrected (finely adjusted), the image quality is hardly deteriorated and the white balance can be controlled without losing the AE level.
[0058]
In particular, according to the present embodiment, after white balance control is performed based on scene determination when the shutter button is half-pressed (S1 = ON), the digital gain is applied when the shutter button is fully pressed (S2 = ON). Since fine correction is performed, accurate white balance control can be performed even for mixed light from a light bulb or a fluorescent lamp.
In addition, accurate white balance control can be performed even in scenes where the strobe light does not reach and the influence of the external light source is great, or when strobes with different color temperatures are emitted.
[0059]
【The invention's effect】
As described above, according to the present invention, the first white balance correction by the analog gain is performed before the A / D conversion based on the determination of the light source type of the shooting scene, and the second white by the digital gain is performed after the A / D conversion. Since the white balance correction is performed, the white balance correction can be performed in a short time, the image quality is hardly deteriorated, and the level and the output level obtained by AE after the white balance are not greatly changed.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an embodiment of a digital camera to which the present invention is applied.
FIG. 2 is a block diagram showing the main configuration of the digital camera shown in FIG.
FIG. 3 is a flowchart showing a flow of processing during an image recording operation in the digital camera of this example.
FIG. 4 is a flowchart showing a processing flow when an image recording operation is started from a moving image display state in the digital camera of this example.
FIG. 5 is a flowchart used to explain an auto white balance control method in a low-luminance light emission mode.
FIG. 6 is a flowchart used for explaining an auto white balance control method in a light emission inhibition mode.
FIG. 7 is a graph showing a detection frame indicating a color distribution range such as a light source type.
FIG. 8 is a graph showing a membership function representing outdoor appearance
FIG. 9 is a graph showing a membership function representing indoorness
FIG. 10 is a graph showing a membership function representing shading.
FIG. 11 is a graph showing a membership function representing a blue sky.
FIG. 12 is a graph showing a membership function representing the likelihood of a fluorescent lamp / bulb.
FIG. 13 is a graph showing a membership function representing skin color.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Digital camera, 16 ... CCD (imaging device), 18 ... Analog signal processing part, 20 ... Digital signal processing part, 22 ... Central processing unit (CPU), 24 ... Memory card, 30 ... Pre-stage gain block (1st White balance correction means), 34 ... A / D converter, 36 ... integration block, 38 ... latter stage gain block (second white balance correction means)

Claims (2)

光学像を電気信号に変換する撮像素子と、
撮影シーンの光源種を判別する光源種判別手段と、
前記光源種判別手段で判定した光源種に適した所定のホワイトバランス調整値にしたがって、前記撮像素子から取得したアナログ形式の画像信号のゲインを制御することによりホワイトバランスを補正する第1のホワイトバランス補正手段と、
前記第1のホワイトバランス補正手段によってホワイトバランスが補正されたアナログ形式の画像信号からデジタル形式の画像信号に変換するA/D変換器と、
前記A/D変換器から出力されたデジタル形式の画像信号に基づいて自動露出制御用の演算を行う自動露出制御手段と、
前記自動露出制御手段の演算結果に応じた露出制御のもとで、前記画像の記録実行指示の受入に呼応して撮像され、前記A/D変換器から出力される画像信号に基づいて、各色チャンネルのホワイトバランス補正値を求め、当該求めたホワイトバランス補正値にしたがって前記A/D変換器から出力された前記画像信号の各色チャンネル毎のゲインを制御することによりホワイトバランスを補正する第2のホワイトバランス補正手段と、
を備えたことを特徴とするデジタルカメラ。
An image sensor that converts an optical image into an electrical signal;
Light source type discriminating means for discriminating the light source type of the shooting scene;
A first white balance that corrects white balance by controlling the gain of an analog image signal acquired from the image sensor in accordance with a predetermined white balance adjustment value suitable for the light source type determined by the light source type determining means. Correction means;
An A / D converter for converting an analog image signal whose white balance has been corrected by the first white balance correcting means into a digital image signal;
Automatic exposure control means for performing calculation for automatic exposure control based on a digital image signal output from the A / D converter;
Under the exposure control according to the calculation result of the automatic exposure control means , each color is picked up in response to acceptance of the recording execution instruction of the image and based on the image signal output from the A / D converter calculated white balance correction value of the channel, the second to correct the white balance by controlling the gain of each color channel of the image signal output from the a / D converter in accordance with the white balance correction value calculated White balance correction means,
A digital camera characterized by comprising
撮影シーンの光源種を判別するステップと、
その判別により特定した光源種に適した所定のホワイトバランス調整値にしたがって、前記撮像素子から取得したアナログ形式の画像信号のゲインを制御することにより第1のホワイトバランス補正を行うステップと、
画像の記録実行指示の受入に呼応して撮像素子から読み出され、前記第1のホワイトバランス補正によってホワイトバランスが補正されたアナログ形式の画像信号をA/D変換器によってデジタル形式の画像信号に変換するステップと、
デジタル形式の画像信号に基づいて自動露出制御用の演算を行うステップと、
その演算結果に応じた露出制御のもとで、前記画像の記録実行指示の受入に呼応して撮像され、前記A/D変換器から出力されるデジタル形式の画像信号に基づいて、各色チャンネルのホワイトバランス補正値を求めるステップと、
当該求めたホワイトバランス補正値にしたがって前記A/D変換器から出力された前記画像信号の各色チャンネル毎のゲインを制御することにより第2のホワイトバランス補正を行うステップと、
を含むことを特徴とするオートホワイトバランス制御方法。
Determining the light source type of the shooting scene;
Performing a first white balance correction by controlling the gain of an analog image signal acquired from the image sensor according to a predetermined white balance adjustment value suitable for the type of light source specified by the determination;
The analog image signal read from the image sensor in response to the reception of the image recording execution instruction and corrected for white balance by the first white balance correction is converted into a digital image signal by the A / D converter. Converting, and
Performing automatic exposure control based on digital image signals;
Under the exposure control according to the calculation result, the image is picked up in response to acceptance of the recording execution instruction of the image, and based on the digital image signal output from the A / D converter, Obtaining a white balance correction value;
Performing a second white balance correction by controlling the gain of each color channel of the image signal output from the A / D converter in accordance with the white balance correction value obtained,
An auto white balance control method comprising:
JP10428599A 1999-04-12 1999-04-12 Digital camera and auto white balance control method Expired - Fee Related JP3896438B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10428599A JP3896438B2 (en) 1999-04-12 1999-04-12 Digital camera and auto white balance control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10428599A JP3896438B2 (en) 1999-04-12 1999-04-12 Digital camera and auto white balance control method

Publications (2)

Publication Number Publication Date
JP2000299876A JP2000299876A (en) 2000-10-24
JP3896438B2 true JP3896438B2 (en) 2007-03-22

Family

ID=14376670

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10428599A Expired - Fee Related JP3896438B2 (en) 1999-04-12 1999-04-12 Digital camera and auto white balance control method

Country Status (1)

Country Link
JP (1) JP3896438B2 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001309393A (en) * 2000-04-19 2001-11-02 Olympus Optical Co Ltd Imaging unit
JP4526746B2 (en) * 2001-09-07 2010-08-18 株式会社リコー Color imaging device
JP3903095B2 (en) * 2002-01-29 2007-04-11 富士フイルム株式会社 White balance control method and digital camera
JP3903094B2 (en) * 2002-01-29 2007-04-11 富士フイルム株式会社 White balance control method and digital camera
JP3903093B2 (en) * 2002-01-29 2007-04-11 富士フイルム株式会社 White balance control method and digital camera
JP3630149B2 (en) 2002-06-14 2005-03-16 カシオ計算機株式会社 Imaging apparatus, white balance control method, and white balance control program
US7598986B2 (en) 2003-01-10 2009-10-06 Fujifilm Corporation Image pick-up apparatus and white balance control method
JP4366966B2 (en) 2003-03-13 2009-11-18 株式会社ニコン White balance adjustment circuit
JP4264808B2 (en) * 2003-03-28 2009-05-20 富士フイルム株式会社 Moving image processing apparatus and method
EP1668918B1 (en) 2003-08-26 2017-06-07 Casio Computer Co., Ltd. Image pickup apparatus and white balance control method
US7423779B2 (en) * 2004-03-30 2008-09-09 Omnivision Technologies, Inc. Method and apparatus for automatic white balance
JP2008072575A (en) * 2006-09-15 2008-03-27 Canon Inc Image processor, method, and computer program
JP2008124928A (en) * 2006-11-14 2008-05-29 Toshiba Corp Auto white balance system
JP5317737B2 (en) 2009-02-03 2013-10-16 キヤノン株式会社 Imaging apparatus, control method thereof, and program
JP5545169B2 (en) * 2010-10-26 2014-07-09 株式会社リコー IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, AND IMAGING DEVICE CONTROL PROGRAM
JP5706705B2 (en) * 2011-02-04 2015-04-22 キヤノン株式会社 Image processing apparatus, control method therefor, and imaging apparatus
JP5104975B2 (en) * 2011-04-18 2012-12-19 ソニー株式会社 Imaging device
JP6924901B2 (en) * 2017-10-14 2021-08-25 華為技術有限公司Huawei Technologies Co.,Ltd. Photography method and electronic equipment
CN112584117B (en) * 2020-12-11 2022-07-15 中国第一汽车股份有限公司 White balance adjusting method, device, equipment and storage medium

Also Published As

Publication number Publication date
JP2000299876A (en) 2000-10-24

Similar Documents

Publication Publication Date Title
JP3896438B2 (en) Digital camera and auto white balance control method
US7683966B2 (en) Digital camera having an electronic flash device using LED as a flash light source
JP3849834B2 (en) Auto white balance control method
US7924343B2 (en) Photographing apparatus and exposure control method
JP2006020278A (en) Image pickup device
JP2007243616A (en) Exposure control method, and imaging apparatus
JP2008124994A (en) Imaging device and exposure controlling method
US8228423B2 (en) Imaging apparatus and method for controlling flash emission
KR100651813B1 (en) Strobo control apparatus, and strobo control method
JP2004157417A (en) Digital camera and exposure setting method in performing af control
JP4360011B2 (en) Image processing apparatus, image processing method, and recording medium
JP4158029B2 (en) White balance adjustment method and electronic camera
JP4735051B2 (en) Imaging device
US8041206B2 (en) Imaging apparatus and method for controlling flash emission
JP2006332936A (en) Imaging apparatus
JP2003242504A (en) Image processor
JP2005109999A (en) White balance adjustment method and camera
JP2004343177A (en) Imaging apparatus
US7973829B2 (en) Image sensing apparatus, image sensing method, recording medium, and program for controlling exposure by correcting a brightness value when an optical filter is manually inserted
JP3903093B2 (en) White balance control method and digital camera
JP3903095B2 (en) White balance control method and digital camera
JP4081581B2 (en) Auto white balance control method
JP2001211457A (en) Digital camera and automatic white balance control method for the digital camera
JP2005260738A (en) Imaging apparatus and its exposure control method
JP2000004445A (en) Camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040817

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060804

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060809

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060926

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

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061127

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061121

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110105

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120105

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120105

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130105

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees