JP2004312366A - White balance control method and imaging apparatus - Google Patents

White balance control method and imaging apparatus Download PDF

Info

Publication number
JP2004312366A
JP2004312366A JP2003103102A JP2003103102A JP2004312366A JP 2004312366 A JP2004312366 A JP 2004312366A JP 2003103102 A JP2003103102 A JP 2003103102A JP 2003103102 A JP2003103102 A JP 2003103102A JP 2004312366 A JP2004312366 A JP 2004312366A
Authority
JP
Japan
Prior art keywords
gain
white balance
limit value
balance adjustment
limit
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.)
Granted
Application number
JP2003103102A
Other languages
Japanese (ja)
Other versions
JP4277258B2 (en
Inventor
Genta Sato
玄太 佐藤
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 Holdings Corp
Original Assignee
Fuji Photo Film Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Photo Film Co Ltd filed Critical Fuji Photo Film Co Ltd
Priority to JP2003103102A priority Critical patent/JP4277258B2/en
Publication of JP2004312366A publication Critical patent/JP2004312366A/en
Application granted granted Critical
Publication of JP4277258B2 publication Critical patent/JP4277258B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a white balance control method and an imaging apparatus capable of realizing white balance correction corresponding to the light source type and reduction in excess correction of an object color in a well-balanced way. <P>SOLUTION: The gain for automatic white balance adjustment is calculated from RGB data outputted from a CCD (a step S210). When the calculated R gain (or B gain) exceeds a G gain by a specified multiple (steps S212, S214), an R gain (or B gain) is clipped at a limit value (steps S216, S220). Information of the specified multiples AR, AB is set to an EEPROM in a camera. A limiter function of the white balance correction has also a function of specifying a lower limit of the gain in addition to the function of specifying the upper limit of the gain. Since the gain clip processing can prevent excess correction of the object color and carry out white balance correction to a degree within a range until clipping is made, a failure such as the occurrence of a low color temperature scene can be avoided. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はホワイトバランス制御方法及び撮像装置に係り、特にデジタルカメラやビデオカメラなどに好適なホワイトバランス制御技術に関する。
【0002】
【従来の技術】
特許文献1は、色の偏ったシーン、例えば、木目調の机や壁など、タングステン光源と類似の物体色を含むシーンにおいてホワイトバランスの過補正がかかり、色味の損なったカラーフェリアシーンができてしまうことを防止することも目的として、ゲインを規制するリミッタ領域を設定し、被写体輝度に応じてリミッタ領域を変更することにより、各色信号に対するゲインを制御する方法を開示している。
【0003】
【特許文献1】
特開2000−78606号公報
【0004】
【発明が解決しようとする課題】
従来、色温度の低いシーンにおけるオートホワイトバランス補正は、机などの木目調の物体色と光源色との区別が困難なために誤って物体色を光源と判断して補正をしてしまい、ホワイトバランスゲインのかかりすぎによる破綻した画像が得られてしまうことがある。例えば、木製の机、柱などが背景にあるシーンを撮影すると、机や柱の色を光源の色と誤判定して過度のホワイトバランス補正がおきるために、人物などの顔色が過補正で青白くなってしまう。
【0005】
特許文献1のように、ホワイトバランス補正時のリミッタ領域を設けることにより、上記のようなカラーフェリア現象は抑制されるが、低色温度シーンなどにおいてホワイトバランス補正がかからないことになってしまうという欠点がある。
【0006】
このようなシーンは、カラーフェリア防止と、低色温度などのホワイトバランス補正とを考量し、どちらかを捨ててどちらかを助けるようなトレードオフの関係にあるため、両方を完全に満たす補正を行うことは非常に困難である。
【0007】
また、従来のオートホワイトバランス補正においては、物体色を光源と判断してホワイトバランス調整を行ってしまうために、撮影時に画角を少し変えて机や柱などを画面の外に移すと、ホワイトバランス補正量が大きく変わってしまい、画角を少しでも変えると色が変わるハンチング現象が発生し得る。
【0008】
なお、上述したカラーフェリア現象は、水銀灯やメタルハライド光源などの光源色に類似の緑シーン(例えば、芝生や木の葉などの葉緑を含むシーン)においても同様に発生し得る。
【0009】
本発明はこのような事情に鑑みてなされたもので、光源種に対応した適切なホワイトバランス補正と、物体色の過補正軽減という相反する事項を両者バランスよく実現し得るホワイトバランス制御方法及び撮像装置を提供することを目的とする。
【0010】
【課題を解決するための手段】
前記目的を達成するために本発明に係るホワイトバランス制御方法は、撮像手段を介して取得される画像信号に基づいてホワイトバランス調整用のゲインを算出するゲイン算出工程と、ホワイトバランス調整に用いる色別のゲインについて上限及び下限のうち少なくとも一方を規制する制限値を設定する制限値設定工程と、前記ゲイン算出工程において前記制限値の制限を外れたゲインが算出される場合に、前記制限値によってゲインを制限するリミッタ処理工程と、前記制限値による制限の下で決定されたゲインに基づき色信号を補正してホワイトバランス調整を行うホワイトバランス調整工程と、を含むことを特徴とする。
【0011】
本発明によれば、撮像手段を用いて被写体を撮像することにより得られる画像信号を基にホワイトバランス調整用のゲインが算出される。例えば、R(赤),G(緑),B(青)の3原色に色分解された画像信号の場合、Gを基準とするR,Bのゲインを算出してもよいし、RGB各色についてそれぞれゲインを算出してもよい。
【0012】
本発明では最終的に出力されるゲインに対して制限が設けられており、算出されたゲインが制限値の制限内であれば、そのゲインに基づいてホワイトバランスの補正を行う。その一方、算出されたゲインが制限値の制限を外れる場合(上限値を超える場合、或いは下限値を下回る場合)においては、ゲインを制限値でクリップし、制限値が示すゲインによってホワイトバランスの補正を行う。
【0013】
このように、ホワイトバランスゲインの算出アルゴリズムを用いて算出されたゲインについて一定の制限値でクリップするようにしたので、ある程度の範囲(クリップされるまでの範囲)で光源色に応じたホワイトバランス補正が可能であるとともに、それを超える又は下回るシーンの物体色についての過補正も防止される。
【0014】
上記方法発明を具現化する装置を提供するため、本発明に係る撮像装置は、被写体の光学像を電気信号に変換する撮像手段と、前記撮像手段を介して取得される画像信号に基づいてホワイトバランス調整用のゲインを算出するゲイン算出手段と、ホワイトバランス調整に用いるゲインの上限及び下限のうち少なくとも一方を規制する制限値を設定する制限値設定手段と、前記ゲイン算出手段において前記制限値の制限を外れたゲインが算出される場合に、前記制限値によってゲインを制限するリミッタ処理手段と、前記制限値による制限の中で決定されたゲインに基づき色信号を補正してホワイトバランス調整を行うホワイトバランス調整手段と、を備えたことを特徴とする。
【0015】
本発明の一態様によれば、前記制限値設定手段は、前記制限値を記憶する不揮発性の記憶手段を含むことを特徴とする。
【0016】
また、本発明の他の態様によれば、前記制限値設定手段は、低色温度シーンにおけるホワイトバランスの過補正を防止するように、少なくともB信号に対するゲインの上限値を設定することを特徴とする。
【0017】
ある程度大きいゲインが算出され得る低色温度シーンにおいて、所定の上限値を超えるゲインが算出されるときに、そのゲインをクリップ処理することにより、一定の範囲についてはホワイトバランスを補正でき、また物体色の過補正による破綻も防止できる。
【0018】
【発明の実施の形態】
以下添付図面に従って本発明に係るホワイトバランス制御方法及び撮像装置の好ましい実施の形態について詳説する。
【0019】
図1は本発明の実施形態に係るデジタルカメラの背面図である。同図に示したように、カメラ1の背面には、ファインダー2、多機能の十字キー3、メニュー/実行キー4、キャンセルキー5、表示キー6、モード切替レバー7及び液晶モニタ52が設けられている。
【0020】
十字キー3は、上下左右の4方向の指示を入力し得る操作キーであり、液晶モニタ52に表示されるメニュー画面における各種設定項目の選択や設定内容の変更を指示する手段(カーソル移動手段)として使用されるとともに、電子ズームの倍率調整や再生コマの送り/戻しを指示する手段として用いられる。
【0021】
メニュー/実行キー4は、メニュー画面の表示を指示するメニューボタンとしての機能と、選択内容の確定及び処理の実行などを指令するOKボタンとしての機能とを兼備した操作キーである。例えば、セットアップモードが選択されると、液晶モニタ52上にセットアップ画面が表示される。セットアップ画面においては、記録画素数(画像サイズ)、記録画質(圧縮率)、立ち上げ時の液晶モニタ52のON/OFF選択、オートパワーオフ時間、オープニング画面の表示設定、日時設定、ホワイトバランスモードの設定などの各種設定項目が表示される。ユーザは十字キー3を操作して、セットアップ画面から変更したい項目を選択したり、設定内容を変更したりしてから、メニュー/実行キー4を押して指示の確定を行う。
【0022】
キャンセルキー5は、メニューから選んだ項目の取消(キャンセル)や一つ前の操作状態に戻る時などに使用される。表示キー6は、液晶モニタ52をON/OFF操作したり、再生方法や再生中のコマ番号等の表示/非表示を切り替えたりするための操作手段である。
【0023】
モード切替レバー7は、「撮影モード」と「再生モード」とを切り替えるための操作部である。また、カメラ上面に配設されているモードダイヤル8を回転させることにより、セットアップモード、連写/ブラケティングモード、マニュアル撮影モード、オート撮影モード、人物撮影モード、風景撮影モード、及び夜景撮影モードのうち何れか1のモードを選択できるようになっている。
【0024】
モードダイヤル8の中央部には、シャッターボタン9が設けられている。シャッターボタン9は、半押し時にONするS1 スイッチと、全押し時にONするS2 スイッチとを有する二段ストローク式のスイッチで構成されている。シャッターボタン9の「半押し」によって自動ピント合わせ(AF)及び自動露出制御(AE)が作動してAFとAEをロックし、「半押し」から更に押し込む「全押し」の状態で撮影(記録用の撮影動作)が実行される。
【0025】
液晶モニタ52は、撮影時に画角確認用の電子ファインダーとして使用できるとともに、撮影した画像のプレビュー画やカメラ1に装填されたメモリカード(図2中符号56として記載)から読み出した再生画像等を表示することができる。また、液晶モニタ52には、撮影可能コマ数(動画については撮影可能時間)や再生コマ番号の表示、ストロボ発光の有無、マクロモード表示、記録画質(クオリティー)表示、画素数表示等の情報も表示される。液晶モニタ52は、ユーザインターフェース用表示画面としても利用され、必要に応じてメニュー情報や選択項目、設定内容などの情報が表示される。液晶モニタ52に代えて、有機ELなど他の方式の表示装置(表示手段)を用いることも可能である。
【0026】
撮影者は、ファインダー2又は液晶モニタ52に映し出されるリアルタイム画像(スルー画)を確認しながら、構図(画角)を決定し、シャッターボタン9を押下して撮影を行う。なお、図1中符号11はグリップ部、符号13は電源スイッチである。
【0027】
図2は本実施形態に係るデジタルカメラのブロック図である。カメラ1の撮影レンズ10は、単焦点レンズでもよいし、ズームレンズ等の焦点距離可変のものでもよい。撮影レンズ10及び絞り12を通過した光はCCD固体撮像素子(以下、CCDという。)14に入射する。CCD14の受光面には多数のフォトセンサ(受光素子)が二次元的に配列され、各フォトセンサに対応して赤(R),緑(G),青(B)の原色カラーフィルタが所定の配列形態で配置されている。
【0028】
CCD14の受光面に結像された被写体像は、CCD14上の各センサで光の入射光量に応じた量の信号電荷に変換される。このようにして蓄積された信号電荷は、CCD駆動回路16から加えられるリードゲートパルスによってシフトレジスタに読み出され、レジスタ転送パルスによって信号電荷に応じた電圧信号として順次読み出される。このCCD14は、蓄積した信号電荷をシャッターゲートパルスによって掃き出すことができ、これにより電荷の蓄積時間(シャッタースピード)を制御する、いわゆる電子シャッター機能を有している。
【0029】
CCD14から順次読み出された電圧信号(画像信号)は、相関二重サンプリング回路(CDS回路)18に加えられ、ここで各受光素子(画素)ごとのR,G,B信号がサンプリングホールドされ、A/D変換器20に加えられる。A/D変換器20は、CDS回路18から順次加えられるR,G,B信号をデジタル信号に変換して出力する。CCD駆動回路16、CDS回路18及びA/D変換器20は、タイミング発生回路22から加えられるタイミング信号によって同期して駆動されるようになっている。
【0030】
A/D変換器20から出力されたR,G,B信号は、一旦メモリ24に格納され、その後、メモリ24に格納されたR,G,B信号は、デジタル信号処理回路26に加えられる。デジタル信号処理回路26は、同時化回路28、ホワイトバランス調整回路30、ガンマ補正回路32、輝度・色差信号(YC信号)作成回路34、及びメモリ36から構成されている。
【0031】
同時化回路28は、メモリ24から読み出された点順次のR,G,B信号を同時式に変換し、R,G,B信号を同時にホワイトバランス調整回路30に出力する。ホワイトバランス調整回路30は、R,G,B信号のデジタル値をそれぞれ増減するための乗算器30R、30G、30Bから構成されており、R,G,B信号は、それぞれ乗算器30R、30G、30Bに加えられる。
【0032】
乗算器30R、30G、30Bの他の入力には、中央処理装置(CPU)38からホワイトバランス制御するためのホワイトバランス補正値(ゲイン値)Rg、Gg、Bgが加えられており、乗算器30R、30G、30Bはそれぞれ2入力を乗算し、この乗算によってホワイトバランス調整されたR’,G’,B’信号をガンマ補正回路32に出力する。
【0033】
ホワイトバランス補正値をRg,Gg,Bg、補正する前の信号をR,G,Bとし、ホワイトバランス調整回路30での補正結果をR’,G’,B’とすると、補正結果R’,G’,B’は、次式、
【0034】
【数1】
R’=Rg×R
G’=Gg×G
B’=Bg×B
によって表される。
【0035】
CPU38からホワイトバランス調整回路30に加えられるホワイトバランス補正値Rg、Gg、Bgの詳細については後述する。
【0036】
ガンマ補正回路32は、ホワイトバランス調整されたR’,G’,B’信号が所望のガンマ特性となるように入出力特性を変更し、YC信号作成回路34に出力する。YC信号作成回路34は、ガンマ補正されたR,G,B信号から輝度信号Yとクロマ信号Cr,Cbとを作成する。これらの輝度信号Yとクロマ信号Cr,Cb(YC信号)は、メモリ24と同じメモリ空間のメモリ36に格納される。
【0037】
ここで、メモリ36内のYC信号を読み出し、液晶モニタ52に出力することにより、動画又は静止画を液晶モニタ52に表示させることができる。また、シャッターボタン9のS2 スイッチONに応動して撮影され、メモリ36に格納されたYC信号は、圧縮/伸張回路54によってJPEGなど所定のフォーマットに従って圧縮された後、メモリカード56その他の記録媒体に記録される。
【0038】
画像データを保存する手段(記録部)としての記録媒体としては、スマートメディア(Solid−State Floppy Disk Card)、PCカード、コンパクトフラッシュ、磁気ディスク、光ディスク、光磁気ディスク、メモリスティックなどを適用でき、電子的、磁気的、若しくは光学的、又はこれらの組み合わせによる方式に従って読み書き可能な種々の媒体を用いることができる。使用される媒体に応じた信号処理手段とインターフェースが適用される。異種、同種の記録メディアを問わず、複数の媒体を装着可能な構成にしてもよい。また、画像を保存する手段は、カメラ本体に着脱可能なリムーバブルメディアに限らず、カメラ1に内蔵された記録媒体(内部メモリ)であってもよい。
【0039】
再生モード時には、メモリカード56に記録されている画像データが読み出され、圧縮/伸張回路54によって伸張処理された後、液晶モニタ52に出力される。こうして、液晶モニタ52に再生画像が表示される。
【0040】
CPU38は、所定のプログラムに従って本カメラシステムを制御する制御手段として機能するとともに、自動露出(AE)演算、自動焦点調節(AF)演算、及びオートホワイトバランス(AWB)演算など各種演算を実施する演算手段として機能する。メモリ24、36は、CPU38の実行プログラムの展開領域及びCPU38の演算作業用領域として利用される。
【0041】
モードダイヤル8、シャッターボタン9等を含むカメラ操作部40から信号はCPU38に入力される。CPU38はカメラ操作部40からの入力信号に基づいてカメラ1の各回路を制御し、例えば、レンズ駆動制御、AE・AF制御、AWB制御、撮影動作制御、CCD14からの電荷読出制御、画像処理制御、メモリカードの読み書き制御、液晶モニタの表示制御などを行う。
【0042】
なお、カメラ操作部40の中には、プッシュ式のスイッチ部材、ダイヤル部材、レバースイッチなどの構成によるものに限らず、メニュー画面から所望の項目を選択するようなユーザインターフェースによって実現されるものも含まれている。
【0043】
また、本例のカメラ1は、ストロボ装置46を有し、図示せぬストロボキーの操作に応じて、低輝度時にストロボ装置46を自動的に発光させる自動発光モード、被写体輝度にかかわらずストロボ装置46を発光させる強制発光モード、又はストロボ装置46の発光を禁止させる発光禁止モード等に設定される。
【0044】
CPU38はユーザが選択したストロボモードに応じて図示しないメインコンデンサの充電制御や発光管(例えば、キセノン管)への放電(発光)タイミング等を制御する。CPU38はストロボモードの設定に応じたホワイトバランス制御を行うようになっている。
【0045】
CPU38に接続されたEEPROM58には、ホワイトバランス制御に必要な目標値データ、リミット値(例えば、ゲインの上限、下限を示す制限倍数値)データ、AE・AF制御に必要なデータ、或いはユーザが個別に設定した各種設定情報などが格納されている。EEPROM58は、情報の書き換えが可能な不揮発性の記憶手段であり、電源OFF時においても情報内容が保持される。CPU38は必要に応じてEEPROM58内のデータを参照して演算等を行う。
【0046】
カメラ1のAF制御は、例えばG信号の高周波成分が最大になるように撮影レンズ10を移動させるコントラストAFであり、シャッターボタン9の半押し時にG信号の高周波成分が最大になるようにレンズ駆動部42を介して撮影レンズ10を合焦位置に移動させる。
【0047】
AE制御は、図3に示すように予め決めた露出▲1▼〜▲4▼にて複数回(最大4回)R,G,B信号を取り込み、これらのR,G,B信号を積算した積算値に基づいて被写体輝度(撮影EV値)を求める。
【0048】
次に、上記撮影EV値の測定の詳細について説明する。
【0049】
図4に示すように、1画面を複数のエリア(例えば、8×8)に分割し、各分割エリアごとにR,G,B信号から求めた輝度信号を積算し、その積算値に基づいて各分割エリアのEV値(EVi)を求める。
続いて、図4に示すように撮影モードに対応して各分割エリアのEV値に重み付けを行い、画面全体のEV′値を次式によって算出する。
【0050】
【数2】
EV′=log{Σ(W×2EVi )/ΣW
ただし、i:0〜63(8×8の分割エリアを示す添え字)
:撮影モードに応じた各分割エリアごとの重み係数
すなわち、撮影モードがオート撮影モード又は人物撮影モードの場合には、図4(A)の重み付け係数に示すように中央重点測光方式となり、風景撮影モードの場合には、図4(B)に示すように最外周に位置する分割エリアの重み付けを減じた測光方式となり、夜景撮影モードの場合には、図4(C)に示すように平均測光方式となる。
【0051】
上記のように算出したEV′に対し、更に、次式に示すように撮影モードに応じた露出補正ΔEVを行って撮影EV値を求める。
【0052】
【数3】
EV=EV′−ΔEV
なお、ΔEVは、例えば、人物撮影モードの場合にはΔEV=0、風景撮影モード、夜景撮影モードの場合にはΔEV=0.3とする。
【0053】
上記のようにして求めた撮影EV値に基づいて撮影時の絞り値とシャッタースピードを最終的に決定する。
【0054】
そして、シャッターボタン9の全押し時に決定した絞り値になるように絞り駆動部44を介して絞り12を駆動し、また、決定したシャッタースピードとなるように電子シャッターによって電荷の蓄積時間を制御する。
【0055】
次に、上記の如く構成されたカメラ1のホワイトバランス制御方法について説明する。なお、ストロボ装置46を発光させて撮影を行う場合には、ストロボ光に対して良好なホワイトバランスを行うためのホワイトバランス補正値Rg、Gg、Bgがホワイトバランス調整回路30に加えられるため、以下、ストロボが発光しない場合(発光禁止モードの場合)のホワイトバランス制御について、図5のフローチャートを参照しながら説明する。
【0056】
シャッターボタン9の全押し(S2 =ON)に応動してCCD14より取得された1画面分のRGBデータはメモリ24に記憶される。撮像画面は複数のエリア(例えば、8×8)に分割され、分割エリアごとにR,G,B信号の色別の積算値が算出される(ステップS110)。得られた色別の積算値から一画素あたりの平均値が計算され、その平均値からR信号とG信号の比R/G、及びB信号とG信号の比B/Gが求められる(ステップS112)。
【0057】
なお、各分割エリアごとのR,G,B信号の平均積算値は、図2に示した積算回路48によって算出され、CPU38に送られている。また、積算回路48とCPU38との間には乗算器50R、50G、50Bが設けられており、乗算器50R、50G、50Bには、機器のバラツキを調整するための調整ゲイン値が加えられるようになっている。
【0058】
こうして、各分割エリアごとに求められる色情報(R/G,B/G)は、それぞれの分割エリアが図6の表色座標上に表された検出枠のうちの何れの検出枠内に入るかを判別するために使用される。なお、図6上における日陰−曇り検出枠、昼光色検出枠等の検出枠は、横軸をR/G、縦軸をB/Gとする表色座標上に表された枠であり、各検出枠ごとに光源種などの色分布の範囲を規定するものである。
【0059】
図6では、高色温度検出枠、青空検出枠、日陰−曇り検出枠、昼光色検出枠、緑検出枠、6領域に分割された昼白色−白色蛍光灯検出枠、温白色検出枠、肌色検出枠、2領域に分割されたタングステン検出枠、低色温度検出枠が示されているが、検出枠の種類や数、設定範囲などについては本例に限定されず、多様な設計が可能である。
【0060】
図6に示した検出枠を用い、撮像画面の各分割エリアに対応する64点(R/G、B/G)の分布を得て、各検出枠に出力された点のみに関して、各検出枠に入った個数と、各検出枠での平均座標とが算出される(図5のステップS114)。
【0061】
次いで、各検出枠に入った個数と各検出枠での平均座標との重み付けによって分布の重心点を計算する(ステップS116)。
【0062】
重心点のR/G座標をRd 、重心点のB/G座標をBd 、各検出枠における平均R/G,B/G値をそれぞれRi ,Bi 、検出個数をNi とすると、重心点の座標は次式で計算される。
【0063】
【数4】
Rd =Σ(Ni ×Ri )/Ni
Bd =Σ(Ni ×Bi )/Ni
こうして求めた重心点から目標点(例えばグレーになる点)までの逆数をかけることにより、ホワイトバランス補正用のゲインが算出される(ステップS118)。
【0064】
R/GのWBゲインをGr 、B/GのWBゲインをGb 、(R/G,B/G)の目標点を(Tr ,Tb )とすると、WBゲインは次式で計算される。
【0065】
【数5】
Gr =Tr /Rd
Gb =Tb /Bd
なお、目標点は(1,1)に限定されず、光源の雰囲気を残すように、シーンに応じて目標点を設定する態様もある。
【0066】
図7はホワイトバランス補正のリミッタ処理(補正上限を規定するオーバーフロー処理)の手順を示すフローチャートである。図6で説明したように、ホワイトバランスゲインが算出されたら(図7のステップS210)、まず、Gゲインに対してのRゲイン量及Bゲイン量をみて、Rゲイン(又はBゲイン)がGに対して規定倍数量を超えているか否かを判定する(ステップS212、ステップS214)。Gに対するRゲインの規定倍数値(AR )及びGに対するBゲインの規定倍数値(AB )はEEPROM58に設定されている。この設定値を変更することにより、制限領域を可変できる。
【0067】
ステップS212において、もし、RゲインがGゲインに対してAR 倍を超えていた場合にはRゲインをAR ×Gゲインの値でクリップしておく(ステップS216)。その一方、ステップS212においてRゲインがGゲインに対してAR 倍を超えていなかった場合には、算出されたRゲインの値をそのまま使用する(ステップS218)。
【0068】
同様に、ステップS214において、もし、BゲインがGゲインに対してAB 倍を超えていた場合にはBゲインをAB ×Gゲインの値でクリップしておく(ステップS220)。その一方、ステップS214においてBゲインがGゲインに対してAB 倍を超えていなかった場合には、算出されたBゲインの値をそのまま使用する(ステップS222)。
【0069】
また、図7で説明したホワイトバランス補正の上限制限機能に加えて、本例のカメラ1はホワイトバランス補正の下限制限機能も有している。
【0070】
図8に補正下限を規定するアンダーフロー処理の手順を示す。図6で説明したように、ホワイトバランスゲインが算出されたら(図8のステップS310)、まず、Gゲインに対してのRゲイン量及Bゲイン量をみて、Rゲイン(又はBゲイン)がGに対して所定の下限倍数量を下回っているか否かを判定する(ステップS312、ステップS314)。Gに対するRゲインの下限倍数値(CR )及びGに対するBゲインの下限倍数値(CB )はEEPROM58に設定されている。この設定値を変更することにより、制限領域を可変できる。
【0071】
ステップS312において、もし、RゲインがGゲインに対してCR 倍を下回っていた場合にはRゲインをCR ×Gゲインの値でクリップしておく(ステップS316)。その一方、ステップS312においてRゲインがGゲインに対してCR 倍を下回っていなければ、算出されたRゲインの値をそのまま使用する(ステップS318)。
【0072】
同様に、ステップS314において、もし、BゲインがGゲインに対してCB 倍を下回っていた場合にはBゲインをCB ×Gゲインの値でクリップしておく(ステップS320)。その一方、ステップS314においてBゲインがGゲインに対してCB 倍を下回っていなかった場合には、算出されたBゲインの値をそのまま使用する(ステップS322)。
【0073】
図7及び図8で説明したリミッタ機能によって、ある程度の制限を超えた(又は下回った)ゲインが算出されるときにゲインをクリップ処理するので、物体色の過補正を防止できる。また、一定の上限又は下限においてゲインをクリップするとはいえ、制限の範囲内においてある程度ホワイトバランスを補正することになるため、低色温度シーン等においても色味が破綻することはない。
【0074】
例えば、低色温度シーンおけるゲインのクリップ値の一例として、Gゲインのデジタル値を88とするとき、Bゲインの上限を500、Rゲインの下限を80とする。
【0075】
図9に上記実施形態に係るカメラ1の要部構成をまとめた概念図を示す。シャッターボタン9の押下によってCCD14から画像信号が取り出される。CCD14から出力された信号はA/D変換器20によってデジタル信号に変換される。取得された画像データを基にホワイトバランスゲインが算出され、オーバーフロー処理部62及びアンダーフロー処理部63において制限がかけられて最終的なゲイン値が決定される。
【0076】
決定されたゲイン値によりホワイトバランス調整回路30において各色信号のバランスが調整される。ホワイトバランス調整回路30でホワイトバランス調整が施された画像信号は、ガンマ変換部68においてガンマ変換が施されるなど所要の処理を経て最終画像として表示部(液晶モニタ52)や記録部(メモリカード56)などの出力部70に出力される。
【0077】
上述の実施形態では、主に静止画を記録するデジタルカメラを例示したが、本発明の適用範囲はこれに限定されず、動画記録可能なデジタルカメラ、ビデオカメラ、DVDカメラなどの電子カメラ、或いは、カメラ付き携帯電話機、カメラ付きPDA、カメラ付きモバイルパソコンなど、電子撮像機能を備えた他の撮像装置についても本発明を適用できる。
【0078】
【発明の効果】
以上説明したように本発明によれば、被写体を撮像して得られる画像信号に基づいて算出されるホワイトバランス調整用のゲインについて制限が設定されており、算出されたゲインが制限値の制限内であれば、そのゲインに基づいてホワイトバランスの補正を行う一方、算出されたゲインが制限値の制限を外れる場合(上限値を超える場合、或いは下限値を下回る場合)においては、ゲインを制限値でクリップし、制限値が示すゲインによってホワイトバランスの補正を行うようにしたので、ある程度の光源色に応じたホワイトバランス補正が可能であるとともに、物体色の場合の過補正を防止することが可能である。
【図面の簡単な説明】
【図1】本発明の実施形態に係るデジタルカメラの背面図
【図2】本発明の実施形態に係るデジタルカメラのブロック図
【図3】撮影EV値の求め方を説明するために用いた図
【図4】撮影モード別の測光方式を説明するために用いた図
【図5】オートホワイトバランス制御方法を説明するために用いたフローチャート
【図6】光源種などの色分布の範囲を示す検出枠を示すグラフ
【図7】ホワイトバランス補正におけるリミッタ処理(オーバーフロー処理)の手順を示したフローチャート
【図8】ホワイトバランス補正におけるリミッタ処理(アンダーフロー処理)の手順を示したフローチャート
【図9】本実施形態に係るカメラの要部構成をまとめた概念図
【符号の説明】
1…カメラ、3…十字キー、4…メニュー/実行キー、14…CCD、26…デジタル信号処理回路、30…ホワイトバランス調整回路、38…CPU、48…積算回路、52…液晶モニタ、56…メモリカード
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a white balance control method and an imaging apparatus, and more particularly to a white balance control technique suitable for a digital camera, a video camera, and the like.
[0002]
[Prior art]
Japanese Patent Laid-Open No. 2004-133867 provides a color feria scene in which color balance is over-corrected in a color-biased scene, for example, a scene including an object color similar to a tungsten light source, such as a wood-grained desk or wall, resulting in a loss of color. In order to prevent such a situation, there is disclosed a method of controlling the gain for each color signal by setting a limiter region for regulating the gain and changing the limiter region according to the subject luminance.
[0003]
[Patent Document 1]
Japanese Patent Laid-Open No. 2000-78606
[Problems to be solved by the invention]
Conventionally, auto white balance correction for scenes with low color temperature is difficult to distinguish between a wood-like object color such as a desk and a light source color. A broken image may be obtained due to excessive application of balance gain. For example, if you shoot a scene with a wooden desk, pillar, etc. in the background, the color of the desk or pillar will be misjudged as the color of the light source, and excessive white balance correction will occur. turn into.
[0005]
By providing a limiter area at the time of white balance correction as in Patent Document 1, the above-described color feria phenomenon is suppressed, but the white balance correction is not applied in a low color temperature scene or the like. There is.
[0006]
In such scenes, there is a trade-off relationship that takes into account color feria prevention and white balance correction such as low color temperature, and abandons one of them to help either. It is very difficult to do.
[0007]
Also, in the conventional auto white balance correction, the object color is determined as the light source and white balance adjustment is performed.Therefore, if the angle of view is slightly changed during shooting and the desk or column is moved off the screen, The balance correction amount changes greatly, and if the angle of view is changed even a little, a hunting phenomenon in which the color changes may occur.
[0008]
Note that the above-described color feria phenomenon can occur in a similar manner in a green scene similar to a light source color such as a mercury lamp or a metal halide light source (for example, a scene including leafy greens such as grass and leaves).
[0009]
The present invention has been made in view of such circumstances, and a white balance control method and imaging capable of realizing a contradictory matter of appropriate white balance correction corresponding to a light source type and reduction of overcorrection of an object color in a balanced manner. An object is to provide an apparatus.
[0010]
[Means for Solving the Problems]
In order to achieve the above object, a white balance control method according to the present invention includes a gain calculation step of calculating a gain for white balance adjustment based on an image signal acquired via an imaging unit, and a color used for white balance adjustment. A limit value setting step for setting a limit value that restricts at least one of an upper limit and a lower limit for another gain, and a gain that is outside the limit value is calculated in the gain calculation step. And a limiter processing step for limiting the gain, and a white balance adjustment step for performing white balance adjustment by correcting the color signal based on the gain determined under the restriction by the restriction value.
[0011]
According to the present invention, the gain for white balance adjustment is calculated based on the image signal obtained by imaging the subject using the imaging means. For example, in the case of an image signal that is color-separated into three primary colors of R (red), G (green), and B (blue), R and B gains based on G may be calculated. Each gain may be calculated.
[0012]
In the present invention, a limit is set for the gain that is finally output. If the calculated gain is within the limit of the limit value, the white balance is corrected based on the gain. On the other hand, when the calculated gain is outside the limit value (when exceeding the upper limit value or below the lower limit value), the gain is clipped at the limit value, and the white balance is corrected by the gain indicated by the limit value. I do.
[0013]
In this way, the gain calculated using the white balance gain calculation algorithm is clipped with a certain limit value, so white balance correction according to the light source color within a certain range (the range until clipping) Is possible, and overcorrection for object colors above or below the scene is also prevented.
[0014]
In order to provide an apparatus that embodies the above method invention, an imaging apparatus according to the present invention includes an imaging unit that converts an optical image of a subject into an electrical signal, and a white signal based on an image signal acquired through the imaging unit. A gain calculating means for calculating a gain for balance adjustment; a limit value setting means for setting a limit value for restricting at least one of an upper limit and a lower limit of a gain used for white balance adjustment; and When a gain out of the limit is calculated, a limiter processing means for limiting the gain by the limit value and a white balance adjustment by correcting the color signal based on the gain determined in the limit by the limit value White balance adjusting means.
[0015]
According to an aspect of the present invention, the limit value setting unit includes a nonvolatile storage unit that stores the limit value.
[0016]
According to another aspect of the present invention, the limit value setting means sets at least an upper limit value of a gain for the B signal so as to prevent overcorrection of white balance in a low color temperature scene. To do.
[0017]
In a low color temperature scene where a large gain can be calculated, when a gain exceeding a predetermined upper limit value is calculated, the white balance can be corrected for a certain range by clipping the gain, and the object color Failure due to overcorrection can be prevented.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of a white balance control method and an imaging apparatus according to the present invention will be described in detail with reference to the accompanying drawings.
[0019]
FIG. 1 is a rear view of a digital camera according to an embodiment of the present invention. As shown in the figure, a finder 2, a multifunction cross key 3, a menu / execution key 4, a cancel key 5, a display key 6, a mode switching lever 7 and a liquid crystal monitor 52 are provided on the back of the camera 1. ing.
[0020]
The cross key 3 is an operation key that can input instructions in four directions, up, down, left, and right, and means for instructing selection of various setting items and change of setting contents on a menu screen displayed on the liquid crystal monitor 52 (cursor moving means). It is also used as a means for instructing magnification adjustment of electronic zoom and sending / returning of playback frames.
[0021]
The menu / execution key 4 is an operation key having both a function as a menu button for instructing display of a menu screen and a function as an OK button for instructing selection confirmation, execution of processing, and the like. For example, when the setup mode is selected, a setup screen is displayed on the liquid crystal monitor 52. On the setup screen, the number of recording pixels (image size), recording image quality (compression rate), ON / OFF selection of the LCD monitor 52 at startup, auto power off time, opening screen display settings, date and time settings, white balance mode Various setting items such as settings are displayed. The user operates the cross key 3 to select an item to be changed from the setup screen or change the setting contents, and then press the menu / execution key 4 to confirm the instruction.
[0022]
The cancel key 5 is used to cancel (cancel) an item selected from the menu or return to the previous operation state. The display key 6 is an operation means for turning on / off the liquid crystal monitor 52 and switching between display / non-display of a reproduction method and a frame number being reproduced.
[0023]
The mode switching lever 7 is an operation unit for switching between “shooting mode” and “reproduction mode”. Further, by rotating the mode dial 8 provided on the upper surface of the camera, a setup mode, a continuous shooting / bracketing mode, a manual shooting mode, an auto shooting mode, a portrait shooting mode, a landscape shooting mode, and a night scene shooting mode can be selected. Any one of the modes can be selected.
[0024]
A shutter button 9 is provided at the center of the mode dial 8. The shutter button 9 is composed of a two-stroke switch having an S1 switch that is turned on when half-pressed and an S2 switch that is turned on when fully pressed. When the shutter button 9 is “half-pressed”, automatic focusing (AF) and automatic exposure control (AE) are activated to lock AF and AE. Shooting operation) is executed.
[0025]
The liquid crystal monitor 52 can be used as an electronic viewfinder for checking the angle of view at the time of shooting, and also displays a preview image of the shot image, a reproduced image read from a memory card (denoted by reference numeral 56 in FIG. 2) loaded in the camera 1, and the like. Can be displayed. The LCD monitor 52 also displays information such as the number of storable frames (shootable time for movies), playback frame number display, presence / absence of strobe light emission, macro mode display, recording image quality (quality) display, and pixel count display. Is displayed. The liquid crystal monitor 52 is also used as a user interface display screen, and displays information such as menu information, selection items, and setting contents as necessary. Instead of the liquid crystal monitor 52, other types of display devices (display means) such as an organic EL can be used.
[0026]
The photographer determines the composition (angle of view) while confirming the real-time image (through image) displayed on the finder 2 or the liquid crystal monitor 52, and presses the shutter button 9 to perform photographing. In FIG. 1, reference numeral 11 denotes a grip portion, and reference numeral 13 denotes a power switch.
[0027]
FIG. 2 is a block diagram of the digital camera according to the present embodiment. The taking lens 10 of the camera 1 may be a single focus lens or a variable focal length such as a zoom lens. The light that has passed through the taking lens 10 and the aperture 12 enters a CCD solid-state image sensor (hereinafter referred to as CCD) 14. A large number of photosensors (light-receiving elements) are two-dimensionally arranged on the light-receiving surface of the CCD 14, and primary color filters of red (R), green (G), and blue (B) corresponding to each photosensor are predetermined. Arranged in array form.
[0028]
The subject image formed on the light receiving surface of the CCD 14 is converted into signal charges of an amount corresponding to the amount of incident light by each sensor on the CCD 14. The signal charges accumulated in this way are read out to the shift register by a read gate pulse applied from the CCD drive circuit 16, and sequentially read out as a voltage signal corresponding to the signal charge by a register transfer pulse. The CCD 14 has a so-called electronic shutter function that can sweep out the accumulated signal charge by a shutter gate pulse and thereby control the charge accumulation time (shutter speed).
[0029]
The voltage signal (image signal) sequentially read out from the CCD 14 is applied to a correlated double sampling circuit (CDS circuit) 18, where the R, G, B signals for each light receiving element (pixel) are sampled and held. It is added to the A / D converter 20. The A / D converter 20 converts the R, G, B signals sequentially added from the CDS circuit 18 into digital signals and outputs them. The CCD drive circuit 16, the CDS circuit 18 and the A / D converter 20 are driven in synchronism with a timing signal applied from the timing generation circuit 22.
[0030]
The R, G, B signals output from the A / D converter 20 are temporarily stored in the memory 24, and then the R, G, B signals stored in the memory 24 are added to the digital signal processing circuit 26. The digital signal processing circuit 26 includes a synchronization circuit 28, a white balance adjustment circuit 30, a gamma correction circuit 32, a luminance / color difference signal (YC signal) creation circuit 34, and a memory 36.
[0031]
The synchronization circuit 28 converts the dot-sequential R, G, B signals read from the memory 24 into simultaneous equations and outputs the R, G, B signals to the white balance adjustment circuit 30 simultaneously. The white balance adjustment circuit 30 includes multipliers 30R, 30G, and 30B for increasing and decreasing the digital values of the R, G, and B signals. The R, G, and B signals are respectively multiplied by the multipliers 30R, 30G, and 30G, respectively. Added to 30B.
[0032]
White balance correction values (gain values) Rg, Gg, and Bg for white balance control from the central processing unit (CPU) 38 are added to other inputs of the multipliers 30R, 30G, and 30B. , 30G, and 30B each multiply two inputs, and output R ′, G ′, and B ′ signals that have undergone white balance adjustment by this multiplication to the gamma correction circuit 32.
[0033]
If the white balance correction values are Rg, Gg, Bg, the signals before correction are R, G, B, and the correction results in the white balance adjustment circuit 30 are R ′, G ′, B ′, the correction results R ′, G ′ and B ′ are the following equations:
[0034]
[Expression 1]
R ′ = Rg × R
G ′ = Gg × G
B ′ = Bg × B
Represented by
[0035]
Details of the white balance correction values Rg, Gg, and Bg applied from the CPU 38 to the white balance adjustment circuit 30 will be described later.
[0036]
The gamma correction circuit 32 changes the input / output characteristics so that the white balance-adjusted R ′, G ′, B ′ signals have the desired gamma characteristics, and outputs them to the YC signal generation circuit 34. The YC signal creation circuit 34 creates a luminance signal Y and chroma signals Cr and Cb from the gamma-corrected R, G and B signals. These luminance signal Y and chroma signals Cr and Cb (YC signal) are stored in the memory 36 in the same memory space as the memory 24.
[0037]
Here, by reading the YC signal in the memory 36 and outputting it to the liquid crystal monitor 52, a moving image or a still image can be displayed on the liquid crystal monitor 52. Further, the YC signal that is shot in response to the S2 switch ON of the shutter button 9 and stored in the memory 36 is compressed by the compression / expansion circuit 54 according to a predetermined format such as JPEG, and then the memory card 56 or other recording medium. To be recorded.
[0038]
Smart media (Solid-State Floppy Disk Card), PC card, compact flash, magnetic disk, optical disk, magneto-optical disk, memory stick, etc. can be applied as a recording medium as means (recording unit) for storing image data, Various media that can be read and written in accordance with an electronic, magnetic, optical, or combination thereof can be used. A signal processing means and an interface corresponding to the medium to be used are applied. A configuration in which a plurality of media can be mounted regardless of different types or the same type of recording media may be adopted. The means for storing the image is not limited to a removable medium that can be attached to and detached from the camera body, but may be a recording medium (internal memory) built in the camera 1.
[0039]
In the reproduction mode, the image data recorded on the memory card 56 is read out, decompressed by the compression / expansion circuit 54, and then output to the liquid crystal monitor 52. In this way, the reproduced image is displayed on the liquid crystal monitor 52.
[0040]
The CPU 38 functions as a control means for controlling the camera system according to a predetermined program, and performs various calculations such as automatic exposure (AE) calculation, automatic focus adjustment (AF) calculation, and auto white balance (AWB) calculation. Functions as a means. The memories 24 and 36 are used as a development area for the execution program of the CPU 38 and a calculation work area for the CPU 38.
[0041]
Signals are input to the CPU 38 from the camera operation unit 40 including the mode dial 8 and the shutter button 9. The CPU 38 controls each circuit of the camera 1 based on an input signal from the camera operation unit 40, for example, lens drive control, AE / AF control, AWB control, photographing operation control, charge readout control from the CCD 14, and image processing control. , Read / write control of memory card, display control of LCD monitor, etc.
[0042]
The camera operation unit 40 is not limited to a push-type switch member, dial member, lever switch, or the like, but may be realized by a user interface that selects a desired item from a menu screen. include.
[0043]
In addition, the camera 1 of this example has a strobe device 46, an automatic flash mode in which the strobe device 46 automatically emits light at low brightness in response to an operation of a strobe key (not shown), and a strobe device regardless of subject brightness. 46 is set to a forced light emission mode in which light is emitted from 46, or a light emission inhibition mode in which light emission from the strobe device 46 is prohibited.
[0044]
The CPU 38 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. The CPU 38 performs white balance control according to the setting of the strobe mode.
[0045]
The EEPROM 58 connected to the CPU 38 has target value data necessary for white balance control, limit value (for example, limit multiple values indicating upper and lower gains) data, data necessary for AE / AF control, or individual users. Stores various setting information set in. The EEPROM 58 is a non-volatile storage unit that can rewrite information, and retains information contents even when the power is turned off. The CPU 38 performs calculations and the like with reference to the data in the EEPROM 58 as necessary.
[0046]
The AF control of the camera 1 is, for example, contrast AF that moves the photographing lens 10 so that the high-frequency component of the G signal is maximized, and the lens is driven so that the high-frequency component of the G signal is maximized when the shutter button 9 is half-pressed. The photographing lens 10 is moved to the in-focus position via the unit 42.
[0047]
In the AE control, as shown in FIG. 3, the R, G, and B signals are fetched a plurality of times (up to four times) at predetermined exposures (1) to (4), and these R, G, and B signals are integrated. Subject brightness (shooting EV value) is obtained based on the integrated value.
[0048]
Next, details of the measurement of the photographing EV value will be described.
[0049]
As shown in FIG. 4, one screen is divided into a plurality of areas (for example, 8 × 8), luminance signals obtained from R, G, and B signals are integrated for each divided area, and based on the integrated value. The EV value (EVi) of each divided area is obtained.
Subsequently, as shown in FIG. 4, the EV value of each divided area is weighted corresponding to the shooting mode, and the EV ′ value of the entire screen is calculated by the following equation.
[0050]
[Expression 2]
EV ′ = log 2 {Σ (W i × 2 EVi ) / ΣW i }
However, i: 0 to 63 (subscript indicating an 8 × 8 divided area)
W i : The weighting coefficient for each divided area according to the shooting mode, that is, when the shooting mode is the auto shooting mode or the person shooting mode, the center-weighted metering method is used as shown in the weighting coefficient of FIG. In the landscape shooting mode, as shown in FIG. 4 (B), the photometry method is performed by reducing the weight of the divided areas located on the outermost periphery, and in the night scene shooting mode, as shown in FIG. 4 (C). Average metering method.
[0051]
The EV ′ calculated as described above is further subjected to exposure correction ΔEV corresponding to the shooting mode as shown in the following equation to obtain the shooting EV value.
[0052]
[Equation 3]
EV = EV′−ΔEV
Note that ΔEV is, for example, ΔEV = 0 in the portrait shooting mode, and ΔEV = 0.3 in the landscape shooting mode and the night scene shooting mode.
[0053]
The aperture value and shutter speed at the time of shooting are finally determined based on the shooting EV value obtained as described above.
[0054]
Then, the aperture 12 is driven via the aperture drive unit 44 so that the aperture value determined when the shutter button 9 is fully pressed, and the charge accumulation time is controlled by the electronic shutter so that the determined shutter speed is obtained. .
[0055]
Next, a white balance control method for the camera 1 configured as described above will be described. Note that, when shooting with the flash device 46 emitting light, white balance correction values Rg, Gg, and Bg for performing good white balance with respect to the flash light are added to the white balance adjustment circuit 30. The white balance control when the strobe does not emit light (in the light emission inhibition mode) will be described with reference to the flowchart of FIG.
[0056]
The RGB data for one screen acquired from the CCD 14 in response to the full press of the shutter button 9 (S2 = ON) is stored in the memory 24. The imaging screen is divided into a plurality of areas (for example, 8 × 8), and an integrated value for each color of the R, G, and B signals is calculated for each divided area (step S110). An average value per pixel is calculated from the obtained integrated value for each color, and a ratio R / G between the R signal and the G signal and a ratio B / G between the B signal and the G signal are obtained from the average value (step). S112).
[0057]
Note that the average integrated values of the R, G, and B signals for each divided area are calculated by the integrating circuit 48 shown in FIG. Further, multipliers 50R, 50G, and 50B are provided between the integrating circuit 48 and the CPU 38, and an adjustment gain value for adjusting variation of devices is added to the multipliers 50R, 50G, and 50B. It has become.
[0058]
In this way, the color information (R / G, B / G) obtained for each divided area falls within any detection frame among the detection frames represented by the color coordinates in FIG. Used to determine whether. Note that the detection frames such as the shade-clouding detection frame and the daylight color detection frame in FIG. 6 are frames represented on the color coordinates with the horizontal axis being R / G and the vertical axis being B / G. A range of color distribution such as a light source type is defined for each frame.
[0059]
In FIG. 6, a high color temperature detection frame, a blue sky detection frame, a shade-cloud detection frame, a daylight color detection frame, a green detection frame, a day white-white fluorescent light detection frame divided into six regions, a warm white detection frame, and a skin color detection A tungsten detection frame divided into two regions and a low color temperature detection frame are shown, but the types and number of detection frames, the setting range, etc. are not limited to this example, and various designs are possible. .
[0060]
Using the detection frames shown in FIG. 6, a distribution of 64 points (R / G, B / G) corresponding to each divided area of the imaging screen is obtained, and each detection frame is only related to the points output to each detection frame. And the average coordinates in each detection frame are calculated (step S114 in FIG. 5).
[0061]
Next, the barycentric point of the distribution is calculated by weighting the number in each detection frame and the average coordinates in each detection frame (step S116).
[0062]
If the R / G coordinate of the center of gravity point is Rd, the B / G coordinate of the center of gravity point is Bd, the average R / G and B / G values in each detection frame are Ri and Bi, and the number of detection is Ni, the coordinates of the center of gravity point Is calculated by the following equation.
[0063]
[Expression 4]
Rd = Σ (Ni × Ri) / Ni
Bd = Σ (Ni × Bi) / Ni
A gain for white balance correction is calculated by multiplying the reciprocal from the center of gravity obtained in this way to a target point (for example, a point that becomes gray) (step S118).
[0064]
When the WB gain of R / G is Gr, the WB gain of B / G is Gb, and the target point of (R / G, B / G) is (Tr 1, Tb), the WB gain is calculated by the following equation.
[0065]
[Equation 5]
Gr = Tr / Rd
Gb = Tb / Bd
The target point is not limited to (1, 1), and there is an aspect in which the target point is set according to the scene so as to leave the atmosphere of the light source.
[0066]
FIG. 7 is a flowchart showing the procedure of white balance correction limiter processing (overflow processing for defining the correction upper limit). As described with reference to FIG. 6, when the white balance gain is calculated (step S <b> 210 in FIG. 7), first, the R gain (or B gain) is set to G by looking at the R gain amount and the B gain amount with respect to the G gain. It is determined whether or not the specified multiple quantity is exceeded (steps S212 and S214). The specified multiple value (AR) of the R gain for G and the specified multiple value (AB) of the B gain for G are set in the EEPROM 58. By changing this set value, the restricted area can be varied.
[0067]
In step S212, if the R gain exceeds AR times with respect to the G gain, the R gain is clipped with a value of AR × G gain (step S216). On the other hand, if the R gain does not exceed AR times the G gain in step S212, the calculated R gain value is used as it is (step S218).
[0068]
Similarly, in step S214, if the B gain exceeds AB times the G gain, the B gain is clipped with a value of AB × G gain (step S220). On the other hand, if the B gain does not exceed AB times the G gain in step S214, the calculated B gain value is used as it is (step S222).
[0069]
In addition to the white balance correction upper limit limiting function described with reference to FIG. 7, the camera 1 of this example also has a white balance correction lower limit limiting function.
[0070]
FIG. 8 shows an underflow process procedure for defining the correction lower limit. As described with reference to FIG. 6, when the white balance gain is calculated (step S <b> 310 in FIG. 8), first, the R gain (or B gain) is set to G by looking at the R gain amount and the B gain amount with respect to the G gain. It is determined whether or not it is below a predetermined lower limit multiple quantity (steps S312 and S314). The lower limit multiple value (CR) of the R gain for G and the lower limit multiple value (CB) of the B gain for G are set in the EEPROM 58. By changing this set value, the restricted area can be varied.
[0071]
In step S312, if the R gain is less than CR times the G gain, the R gain is clipped with a value of CR × G gain (step S316). On the other hand, if the R gain is not less than CR times the G gain in step S312, the calculated R gain value is used as it is (step S318).
[0072]
Similarly, in step S314, if the B gain is less than CB times the G gain, the B gain is clipped with a value of CB × G gain (step S320). On the other hand, if the B gain is not less than CB times the G gain in step S314, the calculated B gain value is used as it is (step S322).
[0073]
Since the gain is clipped when the gain that exceeds (or falls below) a certain limit is calculated by the limiter function described with reference to FIGS. 7 and 8, overcorrection of the object color can be prevented. Further, although the gain is clipped at a certain upper limit or lower limit, the white balance is corrected to some extent within the limit range, so that the color does not fail even in a low color temperature scene or the like.
[0074]
For example, as an example of a gain clip value in a low color temperature scene, when the G gain digital value is 88, the upper limit of the B gain is 500, and the lower limit of the R gain is 80.
[0075]
FIG. 9 is a conceptual diagram summarizing the main configuration of the camera 1 according to the embodiment. When the shutter button 9 is pressed, an image signal is extracted from the CCD 14. The signal output from the CCD 14 is converted into a digital signal by the A / D converter 20. A white balance gain is calculated on the basis of the acquired image data, and the final gain value is determined by being limited by the overflow processing unit 62 and the underflow processing unit 63.
[0076]
The balance of each color signal is adjusted by the white balance adjustment circuit 30 according to the determined gain value. The image signal that has been subjected to white balance adjustment by the white balance adjustment circuit 30 is subjected to necessary processing such as gamma conversion by a gamma conversion unit 68, and as a final image, a display unit (liquid crystal monitor 52) or a recording unit (memory card). 56) or the like.
[0077]
In the above-described embodiment, the digital camera that mainly records a still image is exemplified, but the scope of application of the present invention is not limited to this, and an electronic camera such as a digital camera, a video camera, and a DVD camera capable of recording a moving image, or The present invention can also be applied to other imaging devices having an electronic imaging function, such as a mobile phone with camera, a PDA with camera, and a mobile personal computer with camera.
[0078]
【The invention's effect】
As described above, according to the present invention, a limit is set for the gain for white balance adjustment calculated based on the image signal obtained by imaging the subject, and the calculated gain is within the limit value limit. If so, the white balance is corrected based on the gain, and if the calculated gain is outside the limit value limit (when exceeding the upper limit value or below the lower limit value), the gain is set to the limit value. The white balance is corrected using the gain indicated by the limit value, so that it is possible to correct the white balance according to the light source color to some extent and prevent overcorrection in the case of object colors. It is.
[Brief description of the drawings]
FIG. 1 is a rear view of a digital camera according to an embodiment of the present invention. FIG. 2 is a block diagram of the digital camera according to an embodiment of the present invention. FIG. 4 is a diagram used for explaining a photometry method for each photographing mode. FIG. 5 is a flowchart used for explaining an auto white balance control method. FIG. 6 is a detection showing a range of color distribution such as a light source type. FIG. 7 is a flowchart showing a limiter processing (overflow processing) procedure in white balance correction. FIG. 8 is a flowchart showing a limiter processing (underflow processing) procedure in white balance correction. Schematic diagram summarizing the main configuration of the camera according to the embodiment [Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 ... Camera, 3 ... Cross key, 4 ... Menu / execution key, 14 ... CCD, 26 ... Digital signal processing circuit, 30 ... White balance adjustment circuit, 38 ... CPU, 48 ... Integration circuit, 52 ... Liquid crystal monitor, 56 ... Memory card

Claims (4)

撮像手段を介して取得される画像信号に基づいてホワイトバランス調整用のゲインを算出するゲイン算出工程と、
ホワイトバランス調整に用いるゲインの上限及び下限のうち少なくとも一方を規制する制限値を設定する制限値設定工程と、
前記ゲイン算出工程において前記制限値の制限を外れたゲインが算出される場合に、前記制限値によってゲインを制限するリミッタ処理工程と、
前記制限値による制限の中で決定されたゲインに基づき色信号を補正してホワイトバランス調整を行うホワイトバランス調整工程と、
を含むことを特徴とするホワイトバランス制御方法。
A gain calculating step of calculating a gain for white balance adjustment based on an image signal acquired via the imaging means;
A limit value setting step for setting a limit value for restricting at least one of the upper limit and the lower limit of the gain used for white balance adjustment;
A limiter processing step of limiting the gain by the limit value when a gain outside the limit value is calculated in the gain calculation step;
A white balance adjustment step of performing white balance adjustment by correcting the color signal based on the gain determined in the limit by the limit value;
A white balance control method comprising:
被写体の光学像を電気信号に変換する撮像手段と、
前記撮像手段を介して取得される画像信号に基づいてホワイトバランス調整用のゲインを算出するゲイン算出手段と、
ホワイトバランス調整に用いるゲインの上限及び下限のうち少なくとも一方を規制する制限値を設定する制限値設定手段と、
前記ゲイン算出手段において前記制限値の制限を外れたゲインが算出される場合に、前記制限値によってゲインを制限するリミッタ処理手段と、
前記制限値による制限の中で決定されたゲインに基づき色信号を補正してホワイトバランス調整を行うホワイトバランス調整手段と、
を備えたことを特徴とする撮像装置。
Imaging means for converting an optical image of a subject into an electrical signal;
Gain calculating means for calculating a gain for white balance adjustment based on an image signal acquired via the imaging means;
Limit value setting means for setting a limit value for restricting at least one of the upper limit and the lower limit of the gain used for white balance adjustment;
Limiter processing means for limiting the gain by the limit value when the gain calculation means calculates a gain outside the limit value;
White balance adjustment means for performing white balance adjustment by correcting the color signal based on the gain determined in the restriction by the restriction value;
An imaging apparatus comprising:
前記制限値設定手段は、前記制限値を記憶する不揮発性の記憶手段を含むことを特徴とする請求項2記載の撮像装置。The imaging apparatus according to claim 2, wherein the limit value setting unit includes a non-volatile storage unit that stores the limit value. 前記制限値設定手段は、低色温度シーンにおけるホワイトバランスの過補正を防止するように、少なくともB信号に対するゲインの上限値を設定することを特徴とする請求項2又は3記載の撮像装置。4. The image pickup apparatus according to claim 2, wherein the limit value setting means sets at least an upper limit value of a gain for the B signal so as to prevent overcorrection of white balance in a low color temperature scene.
JP2003103102A 2003-04-07 2003-04-07 White balance control method and imaging apparatus Expired - Fee Related JP4277258B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003103102A JP4277258B2 (en) 2003-04-07 2003-04-07 White balance control method and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003103102A JP4277258B2 (en) 2003-04-07 2003-04-07 White balance control method and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2004312366A true JP2004312366A (en) 2004-11-04
JP4277258B2 JP4277258B2 (en) 2009-06-10

Family

ID=33466353

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003103102A Expired - Fee Related JP4277258B2 (en) 2003-04-07 2003-04-07 White balance control method and imaging apparatus

Country Status (1)

Country Link
JP (1) JP4277258B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007036438A (en) * 2005-07-25 2007-02-08 Fujifilm Holdings Corp Color discrimination method and device of imaging apparatus, and exposure control method of imaging apparatus
JP2008035069A (en) * 2006-07-27 2008-02-14 Matsushita Electric Ind Co Ltd Video signal processor
JP2010508729A (en) * 2006-10-26 2010-03-18 クゥアルコム・インコーポレイテッド Automatic white balance statistics collection
US8606005B2 (en) 2010-11-30 2013-12-10 Brother Kogyo Kabushiki Kaisha Image processing apparatus and image-processing method for adjusting white balance of images
CN112492191A (en) * 2020-12-18 2021-03-12 浙江大华技术股份有限公司 Image acquisition method, device, equipment and medium

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007036438A (en) * 2005-07-25 2007-02-08 Fujifilm Holdings Corp Color discrimination method and device of imaging apparatus, and exposure control method of imaging apparatus
JP4626432B2 (en) * 2005-07-25 2011-02-09 富士フイルム株式会社 Color discriminating method and apparatus in imaging apparatus and exposure control method of imaging apparatus
JP2008035069A (en) * 2006-07-27 2008-02-14 Matsushita Electric Ind Co Ltd Video signal processor
JP2010508729A (en) * 2006-10-26 2010-03-18 クゥアルコム・インコーポレイテッド Automatic white balance statistics collection
US8606005B2 (en) 2010-11-30 2013-12-10 Brother Kogyo Kabushiki Kaisha Image processing apparatus and image-processing method for adjusting white balance of images
CN112492191A (en) * 2020-12-18 2021-03-12 浙江大华技术股份有限公司 Image acquisition method, device, equipment and medium
CN112492191B (en) * 2020-12-18 2022-02-18 浙江大华技术股份有限公司 Image acquisition method, device, equipment and medium

Also Published As

Publication number Publication date
JP4277258B2 (en) 2009-06-10

Similar Documents

Publication Publication Date Title
US8625021B2 (en) Image capture with region-based adjustment of imaging properties
US7623775B2 (en) Camera, aperture controlling method and apparatus, lens controlling method and apparatus, and edging amount controlling method and apparatus
JP4679685B2 (en) Digital camera composition auxiliary frame selection method and digital camera
JP4914300B2 (en) Imaging apparatus and imaging control method
US8665355B2 (en) Image capture with region-based adjustment of contrast
JP4158029B2 (en) White balance adjustment method and electronic camera
WO2019111659A1 (en) Image processing device, imaging device, image processing method, and program
JP2004201228A (en) Method and device for extracting face area
JP2004297650A (en) Control method of white balance and digital camera
JP4277258B2 (en) White balance control method and imaging apparatus
JP2002218495A (en) White balance control method and electronic camera
JP2008017198A (en) Device and method for calculating light source color, and photographing device
JP4043928B2 (en) Digital camera
US8041206B2 (en) Imaging apparatus and method for controlling flash emission
JP4385240B2 (en) Auto white balance control method for digital camera and digital camera
JP2004229154A (en) Method for controlling white balance and imaging device
JP3903093B2 (en) White balance control method and digital camera
JP2007110221A (en) Imaging apparatus
JP3903095B2 (en) White balance control method and digital camera
JP2002218478A (en) Method for controlling auto white balance for digital camera and digital camera
JP3903094B2 (en) White balance control method and digital camera
JP2002218494A (en) Digital camera and white balance correction method
JP4284573B2 (en) Auto white balance control method for digital camera and digital camera
JP2000115627A (en) Digital camera having exposure meter function
JP2004349931A (en) Digital camera

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060227

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061211

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080403

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080701

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080901

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081125

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090121

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090226

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

Free format text: PAYMENT UNTIL: 20120319

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4277258

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120319

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130319

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20130319

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140319

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees