JP2004186876A - Digital camera - Google Patents

Digital camera Download PDF

Info

Publication number
JP2004186876A
JP2004186876A JP2002349870A JP2002349870A JP2004186876A JP 2004186876 A JP2004186876 A JP 2004186876A JP 2002349870 A JP2002349870 A JP 2002349870A JP 2002349870 A JP2002349870 A JP 2002349870A JP 2004186876 A JP2004186876 A JP 2004186876A
Authority
JP
Japan
Prior art keywords
gain
sensitivity
value
image data
light
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
JP2002349870A
Other languages
Japanese (ja)
Other versions
JP4043928B2 (en
Inventor
Manabu Hyodo
学 兵藤
Hirokazu Kobayashi
寛和 小林
Masaya Tamaru
雅也 田丸
Masahiko Sugimoto
雅彦 杉本
Koichi Sakamoto
浩一 坂本
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 JP2002349870A priority Critical patent/JP4043928B2/en
Publication of JP2004186876A publication Critical patent/JP2004186876A/en
Application granted granted Critical
Publication of JP4043928B2 publication Critical patent/JP4043928B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Transforming Light Signals Into Electric Signals (AREA)
  • Studio Devices (AREA)
  • Solid State Image Pick-Up Elements (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a digital camera capable of properly composing a highlight part even when the images whose highlight scene is photographed with different sensitivities. <P>SOLUTION: OB processing sections 70A, 70B, LMTX 72A, 72B, WB adjustment sections 74A, 74B, gamma correction sections 76A, 76B apply black correction processing, color correction processing, white balance adjustment, and gamma correction to image data high, image data low photographed at a high sensitivity and a low sensitivity. A histogram calculation section 78 calculates the histogram of the image data high. A gain calculation section 80 calculates the adjustment gain for dynamic range adjustment of a CCD on the basis of highlight data of the histogram and a luminance level of a photographed image to calculate the gains h_gain and l_gain on the basis of the adjustment gain. A multiplier 82A multiplies the h_gain with the image data high, a multiplier 82B multiplies the l_gain with the image data low, and an adder 84 summates the products of the both. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明はデジタルカメラに係り、特に、感度の異なる画像信号を合成することによりダイナミックレンジを拡大することができるデジタルカメラに関する。
【0002】
【従来の技術】
現在広く普及しているデジタルカメラにおけるCCD等の撮像素子のダイナミックレンジは、写真フィルムに比べると一般的に狭い。このため、ハイコントラストの被写体を撮影する場合には、受光量がダイナミックレンジを超え、撮像素子出力が飽和してしまい、被写体の情報が欠落してしまう場合があった。このような問題を解決するため、異なる感度で撮影した撮影画像を合成することにより、ダイナミックレンジの拡大を図る技術が提案されている(例えば特許文献1参照)。
【0003】
この技術では、異なる感度で撮影した撮影画像毎にホワイトバランス補正値を算出し、各々の撮影画像でホワイトバランス調整を行っている。
【0004】
ハイコントラストな撮影環境で非常に明るい被写体を撮影する場合には、このように異なる感度で撮影した撮影画像を合成することは、ダイナミックレンジの拡大につながり、明るい部分(ハイライト部分)のディテール再現などに効果的である。
【0005】
【特許文献1】
特開2001−94999号公報(第3頁、図9)
【0006】
【発明が解決しようとする課題】
しかしながら、上記従来技術では、曇天や室内等のローコントラストな撮影環境で撮影した場合には、ダイナミックレンジを広くすることでハイライト部の階調が軟調(ねむくなる)になり、却ってハイライト部の再現が悪化する場合がある、という問題があった。
【0007】
本発明は、上記事実を考慮してなされたものであり、異なる感度で撮影した画像を合成する場合において、ハイコントラストシーンを撮影した場合でもハイライト部を適正に再現することができるデジタルカメラを提供することを目的とする。
【0008】
【課題を解決するための手段】
上記目的を達成するために、請求項1記載の発明は、被写体を第1の感度及び前記第1の感度よりも低い第2の感度で撮像する撮像素子と、前記第1の感度で撮像した第1の撮像画像及び前記第2の感度で撮像した第2の撮像画像の少なくとも一方に基づいて、前記被写体の輝度レベルを検出する輝度レベル検出手段と、前記第1の撮像画像のヒストグラムを算出するヒストグラム算出手段と、前記ヒストグラムの予め定めたハイライト側のハイライトデータと前記輝度レベルとに基づいてハイコントラストらしさを表す評価値を求め、該求めた評価値に基づいて前記撮像素子のダイナミックレンジを調整するための調整ゲインを算出するゲイン算出手段と、前記調整ゲインに基づいて前記第1の撮像画像と前記第2の撮像画像とを合成する合成手段と、を備えたことを特徴とする。
【0009】
撮像素子は、被写体を第1の感度で撮像すると共に、第1の感度よりも低い第2の感度でも撮像する。これにより、第1の感度で撮像した第1の撮像画像と、第2の感度で撮像した第2の撮像画像と、の感度の異なる2つの撮像画像が得られる。
【0010】
このように、異なる感度で撮像することができる撮像素子は、例えば、被写体からの光を第1の感度で受光し、受光した光量に応じた信号を出力する複数の第1受光素子と、被写体からの光を前記第1の感度より低い第2の感度で受光し、受光した光量に応じた信号を出力する複数の第2受光素子とが設けられた構成とすることができる。この場合、第2受光素子は、第1受光素子間に位置するよう設けられていてもよいし、チャネルストッパ等の受光量の混合を防止する手段を備えた第1受光素子上に設けられていてもよい。
【0011】
輝度レベル検出手段は、第1の撮像画像及び第2の撮像画像の少なくとも一方に基づいて、被写体の輝度レベルを検出する。輝度レベルは、例えば撮像画像のR,G,Bの各色データから求めることができるが、専用のセンサで検出してもよい。
【0012】
ヒストグラム算出手段は、第1の撮像画像のヒストグラムを算出する。ゲイン算出手段は、ヒストグラムの予め定めたハイライト側のハイライトデータと輝度レベル検出手段により検出した輝度レベルとに基づいてハイコントラストらしさを表す評価値を求める。
【0013】
そして、求めた評価値に基づいて撮像素子のダイナミックレンジを調整するための調整ゲインを算出する。
【0014】
合成手段は、調整ゲインに基づいて第1の撮像画像と第2の撮像画像とを合成する。
【0015】
このように、第1の撮像画像からヒストグラムを求め、このヒストグラムの予め定めたハイライト側のハイライトデータと輝度レベル検出手段により検出した輝度レベルとに基づいてハイコントラストらしさを表す評価値を求めるため、適正に撮影シーンのハイコントラストらしさを検出することができる。
【0016】
そして、このハイコントラストらしさに基づいてダイナミックレンジを調整するため、感度の異なる第1の撮像画像と第2の撮像画像とを合成した場合であっても、撮影シーンに応じて適正にダイナミックレンジを調整し、より適正に階調処理を行うことが可能となる。
【0017】
具体的には、ハイライトデータ及び輝度レベルの少なくとも一方が高い場合には、ハイコントラストの度合いが高くなると考えられるので、請求項2に記載したように、ゲイン算出手段は、ハイコントラストらしさを表す評価値がが高くなるに従って合成手段による合成画像のダイナミックレンジが広くなるように作用するメンバシップ関数により調整ゲインを算出する。
【0018】
すなわち、ハイコントラストらしさを表す評価値が高くなるに従ってダイナミックレンジが広くなり、ハイコントラストらしさを表す評価値が低くなるに従ってダイナミックレンジが狭くなるように調整ゲインが定められる。
【0019】
これにより、ハイコントラストシーンを撮影した場合において高感度と低感度の画像を合成した場合でも、どのような撮影シーンにおいても同じように高感度と低感度の画像を合成する場合と比較してハイライト部を適正に再現することができ、ロバスト性のある階調制御が可能となる。
【0020】
また、請求項3に記載したように、前記ヒストグラム算出手段及び前記ゲイン算出手段による処理と前記第2の撮像画像に関する処理とを並列して行うことが好ましい。これにより、処理の高速化を図ることができる。
【0021】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態の一例について詳細に説明する。
【0022】
図1は本発明に係るデジタルカメラの背面図であり、図2はカメラ上面に設けられたモードダイヤルの平面図である。
【0023】
図2に示すようにモードダイヤル1は、ダイヤル上のアイコン1A〜1FがマークMに合うように回転させることにより、複数段階の露出で撮影する連写/ブラケティングモード1A、絞りやシャッタースピードを各々設定可能なマニュアル撮影モード1B、様々な被写体の撮影に適したオート撮影モード1C、人物を撮影する場合に適した人物モード1D、風景を撮影する場合に適した風景モード1E、及び夜景を撮影する場合に適した夜景モード1F等の撮影モードに設定できるようになっている。なお、図2上では、風景モード1Eが設定されている。
【0024】
また、これらの撮影モードの他に、絞り及びシャッタスピードの組み合わせを選択できるP(プログラム)モード、絞りを選択でき、シャッタースピードが自動的に選択されるA(絞り優先)モード、シャッタースピードを選択でき、絞りが自動的に選択されるS(シャッタースピード優先)モード等の撮影モードを設定することができる。さらに、各撮影モードについて、自動的にストロボ発光するオートモード、人物を撮影した場合に赤目になるのを軽減するための赤目軽減モード、ストロボ光を強制発光させるストロボ強制発光モード、ストロボ光を発光すると共にシャッタースピードを長めにして人物と夜景とをバランスよく撮影するためのスローシンクロモード等のストロボモードを設定することができる。
【0025】
また、モードダイヤル1の中央には、半押し時にONするスイッチS1と、全押し時にONするスイッチS2とを有するシャッタボタン2が設けられている。
【0026】
このデジタルカメラの背面には、図1に示すようにファインダ接眼部3、シフトキー4、表示キー5、撮影モード/再生モード切替えレバー6、キャンセルキー7、実行キー8、マルチファンクションの十字キー9、及び液晶モニタ52が設けられている。
【0027】
図3は、図1に示したデジタルカメラの内部構成を示すブロック図である。
【0028】
本実施の形態に係るデジタルカメラには、撮影レンズ10、撮影レンズ10を通過する光の光量を調整する絞り12、撮影レンズ10、絞り12を通過した被写体からの光を高感度及び低感度のそれぞれの受光素子により受光して被写体像を示すR、G、B3色のカラーアナログ画像信号を出力するCCD(Charge Coupled Device)14が設けられている。
【0029】
ここで、本実施の形態に係るCCD14の構造について説明する。CCD14には、図4に示すようなハニカムCCDを採用することができる。
【0030】
このCCD14の撮像部は、図4に示すように、1画素の1色について1つずつ割り当てられると共に、所定の配列ピッチ(水平配列ピッチ=Ph(μm)、垂直配列ピッチ=Pv(μm))で、かつ隣接する受光素子PD1が垂直方向及び水平方向にずらされて2次元配置された複数の受光素子PD1と、この受光素子PD1の前面に形成された開口部APを迂回するように配置され、かつ受光素子PD1からの信号(電荷)を取り出して垂直方向に転送する垂直転送電極VELと、垂直方向最下に位置する垂直転送電極VELの垂直方向下側に配置され、垂直転送電極VELから転送されてきた信号を外部へ転送する水平転送電極HELと、を備えている。なお、同図に示す例では、開口部APを八角形のハニカム形状に形成している。
【0031】
ここで、水平方向に直線状に並んで配置された複数の垂直転送電極VELにより構成される垂直転送電極群には、各々垂直転送駆動信号V1、V2、・・・、V8の何れか1つを同時に印加することができるように構成されている。なお、同図に示す例では、1段目の垂直転送電極群に対して垂直転送駆動信号V3が、2段目の垂直転送電極群に対して垂直転送駆動信号V4が、3段目の垂直転送電極群に対して垂直転送駆動信号V5が、4段目の垂直転送電極群に対して垂直転送駆動信号V6が、5段目の垂直転送電極群に対して垂直転送駆動信号V7が、6段目の垂直転送電極群に対して垂直転送駆動信号V8が、7段目の垂直転送電極群に対して垂直転送駆動信号V1が、8段目の垂直転送電極群に対して垂直転送駆動信号V2が、各々印加できるように構成されている。
【0032】
一方、各受光素子PD1は隣接する1つの垂直転送電極VELに対し転送ゲートTGを介して電気的に接続されるように構成されている。同図に示す例では、各受光素子PD1が右下に隣接する垂直転送電極VELに転送ゲートTGを介して接続されるように構成されている。
【0033】
なお、同図において‘R’が記入された受光素子PD1の前面に形成された開口部APは赤色の光を透過する色分離フィルタ(カラーフィルタ)で覆われており、‘G’が記入された受光素子PD1の前面に形成された開口部APは緑色の光を透過する色分離フィルタで覆われており、‘B’が記入された受光素子PD1の前面に形成された開口部APは青色の光を透過する色分離フィルタで覆われている。すなわち、‘R’が記入された受光素子PD1は赤色光を、‘G’が記入された受光素子PD1は緑色光を、‘B’が記入された受光素子PD1は青色光を、各々受光し、受光した光量に応じたアナログ信号を各々出力する。
【0034】
CCD14は、更に、上述の受光素子PD1に比して低感度な受光素子PD2を備えている。受光素子PD2は図4に示される如く、複数の受光素子PD1間に設けられている。この受光素子PD2も受光素子PD1と同様に、その前面に受光素子PD1の開口部より面積が小さい開口部APが形成され、隣接する1つの垂直転送電極VELに対して転送ゲートTGにより電気的に接続されている。また、この受光素子PD2には、その前面に形成された開口部APに、受光素子PD1と同様にRGBいずれかのカラーフィルタが装着されている。このように、受光素子PD2の受光面積を受光素子PD1の受光面積より小さくしているので、受光素子PD1に比して低感度なRGB信号が得られる。
【0035】
なお、受光素子PD2の転送ゲートTGが接続される電極は、隣接する受光素子PD1の転送ゲートTGが接続される電極とは異ならせて設けられている。
【0036】
撮影レンズ10及び絞り12を介してCCD14の受光面に結像された被写体像は、各受光素子PD1、PD2で光の入射光量に応じた量の信号電荷に各々変換される。このようにして蓄積された高感度又は低感度の信号電荷の各々は、CCD駆動回路16から加えられるリードゲートパルスによってシフトレジスタに読み出され、レジスタ転送パルスによって信号電荷に応じた電圧信号として順次読み出される。尚、このCCD14は、蓄積した信号電荷をシャッタゲートパルスによって掃き出すことができ、これにより電荷の蓄積時間(シャッタスピード)を制御する、いわゆる電子シャッタ機能を有している。
【0037】
また、詳細は後述するが、本実施の形態においては、先に受光素子PD1の電荷を読み出してから受光素子PD2の電荷を読み出す。すなわち、高感度の信号電荷を読み出した後に、低感度の信号電荷を読み出す。
【0038】
CCD14から順次読み出された高感度又は低感度の電圧信号は、相関二重サンプリング回路(CDS回路)18に加えられ、ここで各画素ごとのR、G、B信号がサンプリングホールドされ、A/D変換器20に加えられる。A/D変換器20は、CDS回路18から順次加えられる高感度のR、G、B信号及び低感度のR、G、B信号を例えば12ビットの高感度のデジタルのR、G、B信号(第1の撮像画像)及び低感度のデジタルのR、G、B信号(第2の撮像画像)に変換して出力する。尚、CCD駆動回路16、CDS回路18及びA/D変換器20は、タイミング発生回路(TG)22から加えられるタイミング信号によって同期して駆動されるようになっている。
【0039】
A/D変換器20から出力された高感度又は低感度のR、G、B信号は、一旦メモリ24に格納され、その後、メモリ24に格納されたR、G、B信号は、デジタル信号処理回路26に加えられる。デジタル信号処理回路26は、合成処理部30、同時化回路32、YC信号作成回路34、及びメモリ36から構成されている。
【0040】
合成処理部30は、図5に示すように、OB処理部70A、70B、LMTX72A、72B、WB調整部74A、74B、ガンマ補正部76A、76B、ヒストグラム算出部78、ゲイン算出部80、乗算器82A、82B,加算器84、及びリミッタ86で構成されている。OB処理部70Aには、高感度で撮影された撮影画像のR,G,Bデータが入力され、OB処理部70Bには、低感度で撮影された撮影画像のR,G,Bデータが入力される。
【0041】
OB処理部70A、70Bは、黒レベルを補正する処理を行う。すなわち、元の画像データからCCD14の遮光エリアのデータを減算することによりオフセット調整し、黒レベルを補正する。
【0042】
LMTX72A、72Bは、例えば3×3マトリクス回路で構成され、色相又は彩度を調整することにより色補正する。
【0043】
WB調整部74A、74Bは、CPU38によって指定されたホワイトバランス補正用のゲイン値Rg,Gg,BgをR,G,Bデータに各々乗算することにより、ホワイトバランスの調整を行う。
【0044】
ガンマ補正部76A、76Bは、ホワイトバランス調整されたR、G、Bデータが所望のガンマ特性となるように入出力特性を変更する。
【0045】
ヒストグラム算出部78は、詳細は後述するが、例えばGデータのヒストグラムを算出する。
【0046】
ゲイン算出部80は、ヒストグラム算出部78で算出されたヒストグラムのうち、予め定めたハイライト側のハイライトデータと、後述するCPU38によって演算された撮影画像の輝度レベルを表す撮影EV値とに基づいて、CCD14のダイナミックレンジを調整するための調整ゲインを算出する。そして、この調整ゲインに基づく高感度のR,G,Bデータに乗算するためのh_gain及び低感度のR,G,Bデータに乗算するためのl_gainを算出する。このh_gain及びl_gainの算出については後述する。
【0047】
乗算器82Aは、ガンマ補正された高感度のR,G,Bデータにh_gainを乗算して加算器84に出力する。乗算器82Bは、ガンマ補正された低感度のR,G,Bデータにl_gainを乗算して加算器84に出力する。
【0048】
加算器84は、h_gainが乗算された高感度のR,G,Bデータにl_gainが乗算された低感度のR,G,Bデータを加算することにより両者を合成し、リミッタ86へ出力する。リミッタ86は、R,G,Bデータが予め定めたビット数(例えば8ビット)で表現できる範囲に収まるようにする。
【0049】
同時化回路32は、メモリ24から読み出された点順次のR、G、B信号を同時式に変換してYC信号作成回路34へ出力する。
【0050】
YC信号作成回路34は、合成されたR、G、B信号から輝度信号Yとクロマ信号Cr、Cbとを作成する。これらの輝度信号Yとクロマ信号Cr、Cb(YC信号)は、メモリ36に格納される。
【0051】
ここで、メモリ36内のYC信号を読み出し、液晶モニタ52に出力することにより動画又は静止画を液晶モニタ52に表示させることができる。また、撮影後のYC信号は、圧縮/伸長回路54によって所定のフォーマットに圧縮されたのち、記録部56にてメモリカードなどの記録媒体に記録される。更に、再生モード時にはメモリカードなどに記録されている画像データが圧縮/伸長回路54によって伸長処理された後、液晶モニタ52に出力され、液晶モニタ52に再生画像が表示されるようになっている。
【0052】
なお、CCD14は本発明の撮像素子に相当し、ヒストグラム算出部78は本発明のヒストグラム算出手段に相当し、ゲイン算出部80は本発明のゲイン算出手段に相当し、加算器86は本発明の合成手段に相当する。
【0053】
CPU38は、図1に示したモードダイヤル1、シャッタボタン2等を含むカメラ操作部40からの入力に基づいて各回路を統括制御するとともに、オートフォーカス、自動露光制御、オートホワイトバランス等の制御を行う。このオートフォーカス制御は、例えばG信号の高周波成分が最大になるように撮影レンズ10を移動させるコントラストAFであり、シャッタボタン2の半押し時にG信号の高周波成分が最大になるように駆動部42を介して撮影レンズ10を合焦位置に移動させる。
【0054】
自動露光制御では、図6に示すように予め決めた露出▲1▼〜▲4▼にて最大4回R、G、B信号を取り込み、これらのR、G、B信号を積算した積算値に基づいて被写体輝度(撮影EV値)を求める。これは、シャッタボタン2の半押し時に実行される。なお、撮影EV値を求める処理は、本発明の輝度レベル検出手段に相当する。
【0055】
また、CPU38には、撮影EV値などの各種データを記憶するためのメモリ39、ストロボ光を発光するためのストロボ60及びストロボ調光センサ62を駆動するための駆動部64が接続されており、これらを制御する。
【0056】
ストロボ60は、例えば撮影EV値が予め定めた所定値以下の場合、すなわち被写体が暗く、十分なコントラストが得られない撮影状況の場合に発光し、被写体にストロボ光を照射する。
【0057】
ストロボ調光センサ62は、ストロボ60で発光したストロボ光を検出し、その光量に応じた検出電圧を駆動部64へ出力する。駆動部64では、ストロボ調光センサ62から出力された検出電圧が予め定めた所定値になった場合、すなわち、十分なコントラストが得られる程度に被写体にストロボ光が照射された場合にストロボ60によるストロボ光の発光を停止させる。これにより、適正な光量に調光される。
【0058】
次に、撮影EV値の測定の詳細について説明する。
【0059】
図7に示すように、1画面を複数のエリア(8×8)に分割し、各分割エリアごとに例えば高感度のR、G、B信号から求めた輝度信号を積算し、その積算値に基づいて各分割エリアのEV値(EVi)を求める。続いて、図7に示すように撮影モードに対応して各分割エリアのEV値に重み付けを行い、画面全体のEV’値を次式によって算出する。
【0060】
【数1】

Figure 2004186876
【0061】
但し、iは、分割エリアの各々を示す添え字であり、上記の場合、0〜63の値を取り得る。Nは、分割エリア数を示し、上記の場合は8×8=64である。ΔEVisoは、所定の感度(例えばISO200)を基準としてEV値補正量であり、感度が変更されても、EV’が一定となるように調整するための値である。Wiは、各分割エリアごとの重み係数であり、例えば図7に示すように中央重点測光方式の重み係数を用いる。
【0062】
上記のように算出したEV’に対し、更に、次式に示すように撮影モードに応じた露出補正ΔEVを行って撮影EV値を求める。求めた撮影EV値は、メモリ39に記憶される。
【0063】
EV=EV’−ΔEV …(2)
なお、ΔEVは、例えば、人物モードの場合にはΔEV=0、風景モード、夜景モードの場合にはΔEV=0.3とする。
【0064】
上記のようにして求めた撮影EV値に基づいて撮影時の絞り値とシャッタスピードを最終的に決定する。
【0065】
そして、シャッタボタンの全押し時に前記決定した絞り値になるように絞り駆動部44を介して絞り12を駆動し、また、決定したシャッタスピードとなるように電子シャッタによって電荷の蓄積時間を制御する。
【0066】
次に、本実施の形態の作用として、デジタルカメラ11で実行される処理ルーチンについて図8に示すフローチャートを参照して説明する。なお、図8に示す処理ルーチンは、シャッタボタン2が全押しされた場合に実行される。
【0067】
まず、シャッタボタン2が半押しされると、CPU38は、高感度の画像信号の取り込みをTG22及びCCD駆動回路16を介してCCD14に指示する。これにより、CCD14から高感度の画像データがメモリ24に一旦取り込まれ、CPU38によって前述したオートフォーカス制御及び自動露光制御が行われる。これにより、撮影EV値、シャッタスピード、絞り値が決定され、駆動部42及び駆動部44が制御される。
【0068】
そして、シャッタボタン2が全押しされると、ステップ100において、CPU38は、高感度の画像信号の取り込みをTG22及びCCD駆動回路16を介してCCD14に指示する。これにより、CCD14から高感度の画像データがメモリ24に一旦取り込まれる。
【0069】
次に、ステップ102では、ホワイトバランスを調整するためのゲイン値Rg,Gg,Bgの算出が行われる。
【0070】
次に、ホワイトバランス調整用のゲイン値の算出について、図9に示すフローチャートを参照して説明する。
【0071】
なお、ストロボ発光しない撮影の場合には、図9に示したホワイトバランス制御は、撮影モードが夜景モード以外の場合に実行され、その他の撮影モードの場合には通常のホワイトバランス制御によりゲイン値Rg,Gg,Bgが算出される。
【0072】
また、ストロボ発光する撮影の場合には、予め定めた撮影モード及びストロボモードの場合で、かつストロボ発光すると判断した場合に図9に示すホワイトバランス制御が実行される。
【0073】
以下の表に、ストロボ発光する撮影の場合に、図9に示したホワイトバランス制御が実行される撮影モード及びストロボモードの組み合わせを示す。例えば撮影モード及びストロボモードが共にオートモードで、EV値が所定閾値以下の場合には、以下のホワイトバランス制御が実行され、その他の場合、例えば撮影モードが風景モードでストロボモードが強制発光モードの場合には、通常のホワイトバランス制御が行われる。
【0074】
【表1】
Figure 2004186876
【0075】
まず、EV値や撮影モード及びストロボモードからストロボ発光するか否かが判断され、撮影モードが夜景モードの場合で、かつストロボ発光しないと判断された場合には、周知の方法によりデーライト光を光源としたストロボ発光しない場合に適したホワイトバランス制御を行うためのホワイトバランス補正値Rg、Gg、Bgが設定され、WB調整部74A、74Bに出力される。
【0076】
また、ストロボ発光すると判断された場合は、撮影モード及びストロボモードが上記の表1の○で示される組み合わせであるか否かが判断される。そして、ストロボ発光すると判断し、かつ撮影モード及びストロボモードが上記の表1の○で示される組み合わせでないと判断された場合には、周知の方法により通常のストロボ発光時のホワイトバランス制御を行うためのホワイトバランス補正値Rg、Gg、Bgが設定され、WB調整部74A、74Bに出力される。
【0077】
そして、撮影モードが夜景モード以外で、かつストロボ発光しないと判断した場合又は撮影モード及びストロボモードが上記の表1の○で示される組み合わせであるか場合には、CPU38は、シャッタボタンの半押し時に求めた撮影EV値をメモリ39から読み込む(ステップ200)。
【0078】
シャッタボタンの全押し時に撮像された高感度の画像のR、G、B信号は一旦メモリ24に格納されているが、この画像を複数のエリア(例えば8×8)に分割し、各分割エリアごとにR、G、B信号の色別の積算値を積算回路48によって求める(ステップ202)。
【0079】
R,G,B信号の積算値Rt,Gt,Btは、積算回路48とCPU38との間に設けられた乗算器(乗算手段)50R、50G、50Bに出力され、乗算器50R、50G、50Bによって予め定められた基準WB(ホワイトバランス)ゲイン値(基準制御値)Rc,Gc、Bcが掛けられる(ステップ204)。なお、基準WBゲイン値Rc,Gc、Bcは、予めメモリ39に記憶されている。
【0080】
基準WBゲイン値Rc,Gc,Bcが掛けられたR,G,B信号の積算値Rt’,Gt’,Bt’は、CPU38に入力される。
【0081】
この基準WBゲイン値Rc,Gc,Bcは、ストロボ発光しない撮影の場合には、天気が晴れの場合のように、光源がデーライト光の場合にホワイトバランスが適正となるように調整するためのゲイン値Rd,Gd,Bdが設定される。また、ストロボ発光して撮影する場合には、ストロボ光が被写体に十分に到達した場合のように、光源としてストロボ光が支配的な場合にホワイトバランスが適正となるように調整するためのゲイン値Rst,Gst,Bstが設定される。
【0082】
そして、CPU38は、入力されたR信号の積算値Rt’とG信号の積算値Gt’との比Rt’/Gt’、及びB信号の積算値とG信号の積算値との比Bt’/Gt’を求める(ステップ206)。
【0083】
上記のようにして各分割エリアごとに求められるRt’/Gt’、Bt’/Gt’は、その分割エリアが、図10に示すグラフ上に表された検出枠のうちの、どの検出枠内に入るかを判別するために使用される。なお、図10における各検出枠は、環境光源などの色分布の範囲を規定するものである。
【0084】
図10に示すように、検出枠には、青空検出枠、日陰検出枠、昼光色(蛍光灯)検出枠、昼白色(蛍光灯)検出枠、白色(蛍光灯)検出枠、デーライト検出枠、電球色蛍光灯検出枠、電球(タングステン電球)検出枠がある。なお、デーライト検出枠は、ストロボ発光しない撮影の場合の検出枠であり、ストロボ撮影する場合には、ストロボ検出枠となる。
【0085】
そして、CPU38は、Rt’/Gt’=X’、Bt’/Gt’=Y’として、各分割エリアごとに求められたRt’/Gt’、Bt’/Gt’で表される(X’、Y’)が、これらの検出枠のうちのどの検出枠内に入るかを判別し、その個数をカウントする(ステップ208)。このとき、ストロボ発光しない撮影の場合には、日陰検出枠内の個数は、分割エリアのEV値が所定値以下のものについてのみカウントし、青空検出枠内の個数は、EV値が所定値以上のものだけについてカウントする。
【0086】
次に、各検出枠内に存在する(X’、Y’)の平均値(Xa’Ya’)を求める(ステップ210)。ここで、jは、各検出枠の各々を示す添え字である。なお、平均値でなく、重心値でもよい。
【0087】
次に、各検出枠に対応して設けられたメンバシップ関数により、色に関する光源らしさ(日陰らしさ等)を表す評価値Fc()を算出する(ステップ212)。メンバシップ関数は、検出枠内の個数を変数として色に関する光源らしさを表す評価値Fc()を出力する関数である。すなわち、評価値が高ければ、その検出枠に対応する光源(環境光源)の可能性が高くなる。
【0088】
Fc(CLD)は、図11に示すように、日陰検出枠内に入る分割エリアの個数を変数とした日陰らしさを表すメンバシップ関数の値である。
【0089】
Fc(SKY)は、図12に示すように、青空検出枠内に入る分割エリアの個数を変数とした青空らしさを表すメンバシップ関数の値である。
【0090】
Fc(EXD)、Fc(EXN)、Fc(W)、Fc(EXL)、Fc(TNG)は、図11に示したFc(CLD)と同様のメンバシップ関数である。ここで、Fc(EXD)は、昼光色検出枠内に入る分割エリアの個数を変数とした昼光色の蛍光灯らしさを表すメンバシップ関数であり、Fc(EXN)は、昼白色検出枠内に入る分割エリアの個数を変数とした昼白色の蛍光灯らしさを表すメンバシップ関数の値であり、Fc(W)は、白色検出枠内に入る分割エリアの個数を変数とした白色の蛍光灯らしさを表すメンバシップ関数であり、Fc(EXL)は、電球色蛍光灯検出枠内に入る分割エリアの個数を変数とした電球色の蛍光灯らしさを表すメンバシップ関数であり、Fc(TNG)は、電球検出枠内に入る分割エリアの個数を変数とした電球らしさを表すメンバシップ関数の値である。
【0091】
Fc(DAY)は、デーライト検出枠内に入る分割エリアの個数を変数とした晴れらしさを表すメンバシップ関数の値であり、このメンバシップ関数は、図11に示す日陰らしさを表すメンバシップ関数と同様である。
【0092】
Fc(TYP)は、ストロボ検出枠内に入る分割エリアの個数を変数としたストロボらしさ、すなわちストロボ光が支配的であるか否かを表すメンバシップ関数の値であり、このメンバシップ関数は、図11に示す日陰らしさを表すメンバシップ関数と同様である。
【0093】
次に、各検出枠に対応して設けられたメンバシップ関数により、輝度に関する光源らしさ(屋内らしさ、屋外らしさ)を表す評価値Fy()を算出する(ステップ214)。メンバシップ関数は、ステップ200で取得したEV値を変数として輝度に関する光源らしさを表す評価値を出力する関数である。
【0094】
Fy(屋外らしさDAY)は、図13に示すように、EV値を変数としたデーライトの屋外らしさを表すメンバシップ関数の値である。
【0095】
Fy(屋外らしさCLD)は、図14に示すように、EV値を変数とした日陰の屋外らしさを表すメンバシップ関数の値である。
【0096】
Fy(屋内らしさEXD)、Fy(屋内らしさEXN)、Fy(屋内らしさTNG)は、図15に示すように、それぞれEV値を変数とした昼光色の蛍光灯の屋内らしさ又は昼白色の蛍光灯の屋内らしさ又はタングステン電球の屋内らしさを表すメンバシップ関数の値である。また、Fy(屋内らしさW)は、EV値を変数とした白色の蛍光灯の屋内らしさを表すメンバシップ関数の値であり、Fy(屋内らしさEXN)と同様である。また、Fy(屋内らしさEXL)は、EV値を変数とした電球色の蛍光灯の屋内らしさを表すメンバシップ関数の値であり、Fy(屋内らしさTNG)と同様である。
【0097】
次に、色に関する光源らしさを表す評価値及び輝度に関する評価値を表す評価値から各検出枠について総合的な光源らしさの評価値Hを求める(ステップ216)。なお、ストロボ発光しない場合で、撮影モードが風景モードの場合には、H〜H、Hについてのみ行う。これは、風景モードの場合は、通常屋外で撮影されるが、屋外の場合に光源がタングステン電球等である場合は考えられないからである。
【0098】
評価値H〜Hは、以下の式によって求められる。
【0099】
(日陰らしさの評価値)=Fc(CLD)×Fy(屋外らしさ)×Fc(SKY) …(3)
(昼光色の蛍光灯らしさの評価値)=Fc(EXD)×Fy(屋内らしさEXD) …(4)
(昼白色の蛍光灯らしさの評価値)=Fc(EXN)×Fy(屋内らしさEXN) …(5)
(白色の蛍光灯らしさの評価値)=Fc(W)×Fy(屋内らしさW) …(6)
(電球色蛍光灯らしさの評価値)=Fc(EXL)×Fy(屋内らしさEXL) …(7)
(電球らしさの評価値)=Fc(TNG)×Fy(屋内らしさTNG) …(8)
(晴れらしさの評価値)=Fc(DAY)×Fy(屋外らしさDAY) …(9)
なお、ストロボ撮影する場合には、Hは次式となる。
【0100】
(ストロボらしさの評価値)=Fc(TYP)×Fy(屋外らしさDAY) …(10)
ここで、0≦Fc()、Fy()≦1であるため、0≦H≦1である。なお、Fc(SKY)は、図12に示すように、青空検出枠内に入る分割エリアの個数が多い程、日陰らしさの評価値を下げる方向に作用する値をとる。
【0101】
また、Fy(屋内らしさ)は、図15に示すように、EV値が高い程、それらの検出枠の評価値を下げる方向に作用する値をとる。このように、光源らしさの評価値Hは、色分布だけでなく輝度も考慮して決定されるため、適正に光源を特定することが可能となる。例えば、蛍光灯が点灯した室内と室外とで同じ色の被写体を撮影した場合に、色分布のみで光源を特定した場合には、光源の特定を誤ってしまい、カラーフェリアが発生してしまう場合がある。
【0102】
しかしながら、本実施の形態では、輝度が低い場合、すなわち室内で撮影されたような場合には、Fy(室内らしさ)が高くなり、輝度が高い場合、すなわち室外で撮影されたような場合には、Fy(室内らしさ)が低くなるため、光源を正確に特定することができ、カラーフェリアが発生するのを防ぐことができる。
【0103】
そして、上記のように各検出枠に対応した光源らしさの評価値が算出されると、これらの評価値のうち予め定めた所定閾値以上の(例えば0.4以上)か否かを判別する(ステップ218)。そして、評価値が所定閾値以上のものが存在する場合には、評価値が所定閾値以上のものを環境光源の候補として選択する。
【0104】
次に、選択された環境光源の各々について、以下の式に従って環境光源又はストロボ光と環境光源とが混合された混合光源の色が白色となるようにホワイトバランス制御を行うための制御値(ゲイン値)G、G、Gを算出する(ステップ220)。
【0105】
={Σ(gr×H)/ΣH}×{Σ(G×H)/ΣH} …(11)
={Σ(gb×H)/ΣH}×{Σ(G×H)/ΣH} …(12)
=Σ(G×H)/ΣH …(13)
ここで、上記(11)〜(13)式は、評価値が所定閾値以上のものについて算出され、例えば所定閾値以上の評価値がH〜Hである場合には、H〜Hの光源についてgr,gbが算出され、算出されたgr,gb、H〜Hを用いて各Σ内の計算が行われる。また、gr,gbは、各検出枠における光源の色を所定色とするために必要なゲインであり、次式で示される。
【0106】
gr=Xc/Xa’×Tx …(14)
gb=Yc/Ya’×Ty …(15)
ここで、Xc=Rc/Gc、Yc=Bc/Gcである。また、Tx、Tyは、基準WBゲイン値が掛けられていない元の画像データのR,G,Bの積算値について求めたX、Yの平均値をXa(=Xa’/Xc)、Ya(=Ya’/Yc)とした場合における、Xa、Yaの目標値であり、所定色に対応する。すなわち、gr,gbは、元の画像データのR,G,Bの積算値についてXa、Yaを求めた場合に、このXa、Yaで示される光源(環境光源又はストロボ光と環境光源との混合光源)の色を所定色とするために必要なゲインである。なお、Tx、Tyは、例えば1である。
【0107】
従って、上記(11)、(12)式の第1項は、評価値Hを重みとしたgr,gbの加重平均値をそれぞれ表している。また、第2項は、明るさを補正するための項であり、ストロボ光を発光しない撮影の場合におけるGは次式で表される。
【0108】
=g×(露出補正ゲイン/128) …(16)
ここで、gは、光源が晴れの場合に適したホワイトバランス制御を行うために必要なG(グリーン)のゲインである。露出補正ゲインは、以下の表のようになる。
【0109】
【表2】
Figure 2004186876
【0110】
このように明るさを補正するのは、ストロボ光が発光しない場合は周囲の光源だけであるため、明るさが足りなくなる場合があるためである。
【0111】
また、ストロボ光を発光する撮影の場合には、GはGstであり、固定値となるため、明るさは補正されない。
【0112】
なお、デーライト検出枠(又はストロボ検出枠)の評価値Hが所定閾値以上であるとして選択されている場合には、gr=Xc、gb=Ycとする。
【0113】
このようにして、環境光源又は混合光源の色を所定色にするための制御値GRR、Gが算出されると、これらの制御値が、基準WBゲイン値との間の値で、かつ環境光源又は混合光源に適した値となるように、環境光源に応じて調整される(ステップ222)。調整後の制御値は、ホワイトバランス補正値Rg、Gg、Bgとして表され、次式により得られる。
【0114】
Rg=(G−Rd)×Hmax×L+Rd …(17)
Gg=(G−Gd)×Hmax×L+Gd …(18)
Bg=(G−Bd)×Hmax×L+Bd …(19)
ここで、Hmaxは、Hの最大値であり、Hmaxに対応する光源を撮影時の光源として特定することができる。例えばHmaxがHであれば、光源は、昼光色の蛍光灯であると判断することができる。また、Lはローワードコレクション係数であり、各光源に対応して予め定められた値であり、各々の光源下での撮影においてホワイトバランスが適正となるように実験等によって決定された値である。ローワードコレクション係数は、予めメモリ39に記憶されている。なお、Lは光源に拘わらず固定値としてもよい。
【0115】
また、0≦L≦1であり、L=0の場合は、Rg=Rc、Gg=Gc、Bg=Bcとなり、基準WBゲイン値でのホワイトバランス制御が行われる。また、L=1及びHmax=1の場合には、Rg=G、Gg=G、Bg=Gとなる。このように、ホワイトバランス補正値Rg、Gg、Bgは、基準WBゲイン値から環境光源の色を所定色にするための制御値G、G、Gとの間の値で、かつHmaxで特定された環境光源に適したホワイトバランス制御を行うことができる値となる。
【0116】
このように算出されたホワイトバランス補正値Rg、Gg、Bgは、WB調整部74A、74Bへ出力され(ステップ224)、元の高感度及び低感度の画像データのR、G、Bの各信号がホワイトバランス調整される。補正後の信号をR’、G’、B’とすると、R’、G’、B’は、次式で表される。
【0117】
R’=Rg×R …(20)
G’=Gg×G …(21)
B’=Bg×B …(22)
一方、所定閾値以上の評価値Hが1つもない場合には、ホワイトバランス補正値Rg、Gg、BgをそれぞれRc、Gc、Bcに設定して(ステップ226)、WB調整部74A、74Bへ出力する(ステップ224)。
【0118】
このように、本実施形態では、環境光源の色だけでなくEV値をも考慮して環境光源を定めるため、環境光源を正確に定めることができる。また、環境光源の色は、本撮影での撮像画像の画像データから求めているため、撮像シーケンスを複雑にすることなく環境光源を正確に定めることができる。
【0119】
そして、ホワイトバランス補正値Rg、Gg、Bgは、基準WBゲイン値から環境光源の色を所定色にするための制御値G、G、Gとの間の値で、かつHmaxで特定された環境光源に適したホワイトバランス制御を行うことができる値となるため、各々の環境光源に対して適正にホワイトバランス制御することができ、カラーフェリアの発生を抑えることができる。
【0120】
ステップ104では、OB処理部70Aにより、高感度の画像データに対して黒補正処理が行われる。
【0121】
ステップ106では、LMTX72Aにより、高感度の画像データに対して3×3マトリクスによる色補正処理が行われる。
【0122】
ステップ108では、WB調整部74により、ステップ102で算出されたホワイトバランス補正用のゲイン値Rg,Gg,Bgが高感度のR,G,Bデータに各々乗算されホワイトバランスの調整が行われる。なお、Gのデータは、予め定めた1より大きい所定値(例えば1.375)を乗算するようにしてもよい。これは、例えば光源が電球のような赤みの多い光源の場合には、GよりもRのゲインを下げたい場合があり、このような場合にはGのゲインを1より大きい所定値とすることにより、相対的にRのゲインを下げることができるからである。
【0123】
ステップ110では、高感度の画像データに対してガンマ補正処理が行われる。
【0124】
また、上記のステップ102〜110の処理と並行して、ステップ112において、低感度の画像信号処理が行われる。すなわち、CPU38が、低感度の画像信号の取り込みをTG22及びCCD駆動回路16を介してCCD14に指示する。これにより、CCD14から低感度の画像データがメモリ24に取り込まれる。
【0125】
そして、高感度の画像データと同様に、低感度の画像データに対して、OB処理部70B、LMTX72B、WB調整部74B、ガンマ補正部76Bによってそれぞれ黒補正処理、色補正処理、ホワイトバランス調整、ガンマ補正が行われる。
【0126】
このように、高感度の画像データに基づいてホワイトバランス調整用のゲイン値を算出する処理等と並行して低感度の画像データの処理を行うため、処理の高速化を図ることができる。
【0127】
また、ステップ108の高感度の画像データに対するホワイトバランス調整処理及びステップ110のガンマ補正処理と並行して、ステップ114において、ヒストグラム算出部78により画像データのヒストグラム算出処理が行われ、ステップ116において、算出したヒストグラムに基づいてダイナミックレンジを調整するためのゲインを算出するゲイン算出処理が行われる。
【0128】
ヒストグラム算出部78では、高感度の画像データのうち例えばGデータのヒストグラムを算出する。まず、12ビットのGデータを例えば6ビットシフトして6ビット換算のデータとしてヒストグラムを求める。このようなヒストグラムの一例を図16に示す。
【0129】
そして、予め定めたハイライト側、すなわちGデータの累積頻度100%からX%(例えば0.1%)下がった位置のデータをハイライト側の最大値とし(図16では‘52’)、これを6ビットシフト(2倍)した値をハイライトデータとする。このハイライトデータは、ホワイトバランス調整用のゲインを掛けたときにハイライト側のデータが飽和するか否かを表す情報として用いられる。
【0130】
ゲイン算出部80では、このハイライトデータと、撮影EV値とに基づいて、CCD14のダイナミックレンジを調整するための調整ゲインを算出する。そして、この調整ゲインに基づく高感度のR,G,Bデータに乗算するためのh_gain及び低感度のR,G,Bデータに乗算するためのl_gainを算出する。
【0131】
まず、ストロボ発光しない撮影の場合には、図17(A)に示すようなハイライトデータと評価値1との関係を表すメンバシップ関数により、ハイライトデータに対応する評価値1を求め、図17(B)に示すような撮影EV値と評価値2との対応関係を表すメンバシップ関数により、撮影EV値に対応する評価値2を求める。
【0132】
評価値1を算出するメンバシップ関数は、図17(A)に示すように、ホワイトバランス調整用のゲイン(例えば1.375)を掛けたときにハイライト側のデータが飽和する所定値(図17(A)では3000)までは、ハイライトデータが大きくなるに従って評価値1も徐々に大きくなり、ハイライトデータが所定値以上の場合には一定値‘1’となるような関数である。
【0133】
また、評価値2を算出するメンバシップ関数は、図17(B)に示すように、撮影EV値が晴天の場合のEV値(図17(B)では13.5)までは、撮影EV値が大きくなるに従って評価値2も徐々に大きくなり、撮影EV値が晴天の場合のEV値以上の場合には一定値‘1’となるような関数である。
【0134】
そして、評価値1に評価値2を乗算する。この評価値1に評価値2を乗算した値は、撮影シーンのハイコントラストの度合い、すなわち撮影シーンのハイコントラストらしさを表す評価値であり、値が大きいほどハイコントラストシーンらしく、値が小さいほどハイコントラストシーンらしくなく、ローコントラストシーンらしくなる。このように、ヒストグラムを用いてハイライト側の最大値を求め、これと被写体輝度とにより精度よくハイコントラストシーンの検出が可能となる。
【0135】
次に、ダイナミックレンジを調整するためのトータルゲインp(調整ゲイン)を図17(C)に示すようなトータルゲインpと評価値1×評価値2との関係を表すメンバシップ関数により求める。
【0136】
トータルゲインpを算出するメンバシップ関数は、図17(C)に示すように、評価値1×評価値2が大きくなるに従ってトータルゲインpが徐々に小さくなるような関数である。トータルゲインpは1未満の値であり、例えば図17(C)に示すように、0.8〜0.9の範囲の値となる。
【0137】
なお、ストロボ発光する撮影の場合には、被写体の輝度とハイコントラストシーンとの関係が薄いと考えられるため、撮影EV値に基づく評価値2は算出せず、図18(A)に示すメンバシップ関数により、ハイライトデータに基づく評価値1を求め、図18(C)に示すメンバシップ関数により評価値1に基づくトータルゲインpを求める。
【0138】
そして、このトータルゲインpを用いた高感度の画像データと低感度の画像データの合成式から高感度の画像データに乗算するh_gain及び低感度の画像データに乗算するl_gainを算出する。
【0139】
合成式は、合成データをdata、高感度のデータをhigh、低感度のデータをlowとして次式で表される。
【0140】
data = [high+Min(high/th,1)×low] × Max(1−S×high/th,p) …(23)
ここで、thは閾値であり、Sは、高感度の画像データと低感度の画像データとの飽和比をSh:Slとした場合に、S=1−{Sh/(Sh+Sl)}で表される値である。例えば、飽和比Sh:Slを4:1とした場合、S=0.2である。
【0141】
(23)式より、合成データdataは、高感度の画像データhighに重みMin(high/th,1)が乗算された低感度の画像データを加算し、これに重みMax(−0.2×high/th+1,p)が乗算されたものである。
【0142】
重みMin(high/th,1)は、図19に示すように、高感度の画像データhighがthよりも小さい区間では、highが大きくなるに従って傾き(high/th)で大きくなる値を出力し、highがth以上の場合には‘1’を出力する関数である。
【0143】
また、重みMax(1−S×high/th+1,p)は、図20に示すように、高感度の画像データhighがthよりも小さい区間では、highが大きくなるに従って傾き(1−S×high/th)で小さくなる値を出力し、highがth以上の場合にはSを出力する関数である。なお、図20では、S=0.2、p=0.8の場合について示した。
【0144】
図21には、高感度の画像データhigh、低感度の画像データlow、及び上記(23)式の第1項までの合成画像データdataにおける輝度−階調値(階調値は8ビット換算値)の特性を示した。図21に示すように、上記(23)式の第1項は、高感度の画像データhighに図19に示すような特性の重みMin(high/th,1)が乗算された低感度の画像データlowが加えられた値となる。
【0145】
従って、輝度がE1の範囲(高感度の画像データhighが閾値th以下の範囲)では、高感度の画像データhighに、high/thの重みが乗算された低感度の画像データlowが加えられた値となり、輝度がE2の範囲では、高感度の画像データhighと低感度の画像データlowが1対1で加算された値となる。
【0146】
また、図22には、高感度の画像データhigh、低感度の画像データlow、及び上記(23)式の合成画像データdataにおける輝度−階調値の特性を示した。合成画像データdataは、高感度の画像データhighに図19に示すような特性の重みMin(high/th,1)が乗算された低感度の画像データlowが加えられた値に、さらに図20に示すような特性の重みMax(1−S×high/th+1,p)が乗算された値である。
【0147】
従って、輝度がE1の範囲では、合成データdataは、上記(23)式の第1項の値に(1−S×high/th)の重みが乗算された値となり、輝度がE2の範囲では、上記(23)式の第1項の値にトータルゲインpが乗算された値となる。
【0148】
ここで、トータルゲインpは、0.8〜0.9の範囲に設定されるため、図22に示すように、合成データdataの特性を表すラインは、高感度の画像データhighの特性を表すラインよりも全体的に下側に下がると共に、上昇の仕方が緩やかとなる。すなわち、合成データdataのダイナミックレンジは、高感度の画像データhighと比較して広くなる。
【0149】
ダイナミックレンジは、トータルゲインpが小さくなるに従って、すなわちハイコントラストシーンらしさが高いほど広くなり、トータルゲインpが大きくするに従って、すなわちハイコントラストシーンらしさが低いほど狭くなる。
【0150】
これにより、ハイコントラストの度合いが高いときにダイナミックレンジが広くなるため、ハイコントラストシーンを撮影した場合において高感度と低感度の画像データを合成した場合でもハイライト部を適正に再現することができ、ロバスト性のある階調制御が可能となる。
【0151】
ところで、上記(23)式は、以下のように変形することができる。
【0152】
data = (high+wl×low) × wt
= wt×high + (wl×wt)×low …(24)
ここで、wl=Min(high/th,1)、wt= Max(1−S×high/th+1,p)である。
【0153】
上記(24)式より、h_gain=wt、l_gain=wl・wtとなる。従って、h_gain、l_gainは、wl、wt、すなわちMin(high/th,1)、Max(1−S×high/th+1,p)を求めることにより定める。そして、合成データは、h_gainで重み付けした高感度の画像データとl_gainで重み付けした低感度の画像データとを加算することにより得られる。
【0154】
ステップ112では、乗算器82Aにより、ガンマ補正された高感度のR,G,Bデータにステップ116で算出したh_gainを乗算して加算器84に出力すると共に、乗算器82Bにより、ガンマ補正された低感度のR,G,Bデータにステップ116で算出したl_gainを乗算して加算器84に出力する。
【0155】
ステップ120では、加算器84により、h_gainが乗算された高感度のR,G,Bデータにl_gainが乗算された低感度のR,G,Bデータが加算され、各色の合成データdataが生成される。
【0156】
ステップ122では、リミッタ86により、各色の合成データdataが予め定めたビット数(例えば8ビット)で表現できる範囲に収まるように調整される。
【0157】
ステップ124では、同時化回路32により、メモリ24から読み出された点順次のR、G、B信号が同時式に変換され、YC信号作成回路34へ出力される。
【0158】
ステップ126では、YC信号作成回路34により、合成されたR、G、B信号から輝度信号Yとクロマ信号Cr、Cbとが作成される。これらの輝度信号Yとクロマ信号Cr、Cb(YC信号)は、メモリ36に格納される。
【0159】
ステップ128では、圧縮/伸長回路54により、YC信号が所定のフォーマットに圧縮される。
【0160】
ステップ130では、記録部56により、圧縮された画像データがメモリカードなどの記録媒体に記録される。
【0161】
このように、本実施の形態では、画像データのヒストグラムを用いてハイライト側の最大値を求め、これと被写体輝度とにより精度よくハイコントラストらしさを表す評価値を求め、この評価値からダイナミックレンジを調整するトータルゲインpを求めて高感度と低感度の画像データの特性を変化させている。
【0162】
これにより、撮影シーンに応じて適正にダイナミックレンジをコントロールすることができる。例えばハイコントラストらしさの評価値が高いときにのみダイナミックレンジが広くなるため、ハイコントラストシーンを撮影した場合には、どのような撮影シーンにおいても同じように高感度と低感度の画像データを合成する場合と比較して、ハイライト部を適正に再現することができ、ロバスト性のある階調制御が可能となる。
【0163】
また、本実施の形態では、高感度の画像データに基づいてホワイトバランス調整用のゲイン値を算出する処理等と並行して低感度の画像データの処理を行うため、処理の高速化を図ることができる。
【0164】
なお、本実施の形態では、高感度の受光素子PD1と低感度の受光素子PD2の各々を設け、高感度信号及び低感度信号を得る例について説明したが、図23に示されるように、1つの受光素子PDの受光領域をチャネルストッパ94により高感度の受光を行う受光面積が広い高感度受光領域92と低感度の受光を行う受光面積が狭い低感度受光領域90とに分割し、それぞれの領域により高感度信号及び低感度信号が得られるような構成としてもよい。なお、受光素子PDにはチャネルストッパ94が設けられているため、高感度で受光された信号と低感度で受光された信号とが混合されずに、双方の信号を別々に受光することができる。
【0165】
【発明の効果】
以上説明したように本発明によれば、異なる感度で撮影した画像を合成する場合において、ハイコントラストシーンを撮影した場合でもハイライト部を適正に再現することができる、という効果を有する。
【図面の簡単な説明】
【図1】本発明に係るデジタルカメラの背面図である。
【図2】デジタルカメラの上面に設けられたモードダイヤルの平面図である。
【図3】デジタルカメラの内部構成を示すブロック図である。
【図4】CCDの概略構成図である。
【図5】デジタル信号処理回路のブロック図である。
【図6】EV値の求め方について説明するための図である。
【図7】測光方式について説明するための図である。
【図8】デジタルカメラの処理の流れを示すフローチャートである。
【図9】ホワイトバランス調整用のゲイン算出処理の流れを示すフローチャートである。
【図10】光源の色分布の範囲としての検出枠を示すグラフである。
【図11】日陰らしさを表すメンバシップ関数を示すグラフである。
【図12】青空のメンバシップ関数を示すグラフである。
【図13】デーライトの屋外らしさを表すメンバシップ関数を示すグラフである。
【図14】屋外らしさを表すメンバシップ関数を示すグラフである。
【図15】屋内らしさを表すメンバシップ関数を示すグラフである。
【図16】画像データのヒストグラムである。
【図17】(A)はハイライトデータと評価値1との関係を示す線図、(B)は被写体輝度と評価値2との関係を示す線図、(C)は評価値1×評価値2とトータルゲインpとの関係を示す線図である。
【図18】(A)はハイライトデータと評価値1との関係を示す線図、(B)は被写体輝度と評価値2との関係を示す線図である。
【図19】高感度の画像データと重みとの関係を示す線図である。
【図20】高感度の画像データと重みとの関係を示す線図である。
【図21】高感度画像、低感度画像、及び合成画像の輝度−階調特性を示す線図である。
【図22】高感度画像、低感度画像、及び合成画像の輝度−階調特性を示す線図である。
【図23】CCDの他の形態の概略構成図である。
【符号の説明】
10 撮影レンズ
11 デジタルカメラ
12 CCD
18 CDS回路
20 A/D変換器
26 デジタル信号処理回路
30 合成処理部
32 同時化回路
34 YC信号作成回路
40 カメラ操作部
52 液晶モニタ
54 伸長回路
56 記録部[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a digital camera, and more particularly to a digital camera capable of expanding a dynamic range by synthesizing image signals having different sensitivities.
[0002]
[Prior art]
The dynamic range of an image sensor such as a CCD in a digital camera that is currently widely used is generally narrower than that of a photographic film. For this reason, when shooting a high-contrast subject, the amount of received light exceeds the dynamic range, the output of the image sensor is saturated, and subject information may be lost. In order to solve such a problem, there has been proposed a technique for expanding the dynamic range by synthesizing photographed images photographed with different sensitivities (see, for example, Patent Document 1).
[0003]
In this technique, a white balance correction value is calculated for each captured image captured with different sensitivities, and white balance adjustment is performed for each captured image.
[0004]
When shooting very bright subjects in a high-contrast shooting environment, combining images shot with different sensitivities in this way leads to an expansion of the dynamic range, and detail reproduction of bright areas (highlight areas). This is effective.
[0005]
[Patent Document 1]
JP 2001-94999 A (page 3, FIG. 9)
[0006]
[Problems to be solved by the invention]
However, in the above prior art, when shooting in a low-contrast shooting environment such as cloudy or indoors, the dynamic range is widened so that the gradation of the highlight portion becomes soft (smooth), and on the contrary, the highlight portion There is a problem that the reproduction of the image may deteriorate.
[0007]
The present invention has been made in consideration of the above facts, and in the case of synthesizing images shot at different sensitivities, a digital camera capable of appropriately reproducing the highlight portion even when shooting a high contrast scene is provided. The purpose is to provide.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, the invention described in claim 1 is configured to capture an image of a subject with a first sensitivity and a second sensitivity lower than the first sensitivity, and with the first sensitivity. Based on at least one of the first picked-up image and the second picked-up image picked up with the second sensitivity, a luminance level detecting means for detecting the luminance level of the subject and a histogram of the first picked-up image are calculated. And calculating an evaluation value representing the likelihood of high contrast based on highlight data on a predetermined highlight side of the histogram and the luminance level, and based on the calculated evaluation value, dynamics of the image sensor Gain calculating means for calculating an adjustment gain for adjusting the range, and combining the first captured image and the second captured image based on the adjustment gain And forming means, characterized by comprising a.
[0009]
The imaging device captures an image of the subject with the first sensitivity and also with a second sensitivity lower than the first sensitivity. As a result, two captured images having different sensitivities between the first captured image captured with the first sensitivity and the second captured image captured with the second sensitivity are obtained.
[0010]
As described above, the imaging device capable of imaging with different sensitivities includes, for example, a plurality of first light receiving elements that receive light from the subject with the first sensitivity and output a signal corresponding to the received light amount, and the subject. And a plurality of second light receiving elements for receiving a signal corresponding to the received light amount. In this case, the second light receiving element may be provided so as to be positioned between the first light receiving elements, or may be provided on the first light receiving element provided with means for preventing mixing of received light amounts such as a channel stopper. May be.
[0011]
The brightness level detection means detects the brightness level of the subject based on at least one of the first captured image and the second captured image. The luminance level can be obtained from each color data of R, G, B of the captured image, for example, but may be detected by a dedicated sensor.
[0012]
The histogram calculation means calculates a histogram of the first captured image. The gain calculating means obtains an evaluation value representing the likelihood of high contrast based on highlight data on the highlight side in the histogram and the brightness level detected by the brightness level detecting means.
[0013]
Then, an adjustment gain for adjusting the dynamic range of the image sensor is calculated based on the obtained evaluation value.
[0014]
The synthesizing unit synthesizes the first captured image and the second captured image based on the adjustment gain.
[0015]
In this manner, a histogram is obtained from the first captured image, and an evaluation value representing the likelihood of high contrast is obtained based on the highlight data on the highlight side of the histogram and the luminance level detected by the luminance level detecting means. Therefore, it is possible to appropriately detect the high contrast likelihood of the shooting scene.
[0016]
In order to adjust the dynamic range based on the high contrast, the dynamic range is appropriately adjusted according to the shooting scene even when the first captured image and the second captured image having different sensitivities are combined. It is possible to adjust and perform gradation processing more appropriately.
[0017]
Specifically, when at least one of the highlight data and the luminance level is high, it is considered that the degree of high contrast becomes high. Therefore, as described in claim 2, the gain calculation means represents the high contrast likelihood. The adjustment gain is calculated by a membership function that acts so that the dynamic range of the synthesized image by the synthesizing means becomes wider as the evaluation value becomes higher.
[0018]
That is, the adjustment gain is determined so that the dynamic range becomes wider as the evaluation value representing the high contrast likelihood becomes higher, and the dynamic range becomes narrower as the evaluation value showing the high contrast likelihood becomes lower.
[0019]
As a result, even when a high-sensitivity and low-sensitivity image is combined when shooting a high-contrast scene, the high-sensitivity and low-sensitivity images are the same in any shooting scene as compared to when combining high-sensitivity images. The light part can be reproduced appropriately, and robust gradation control is possible.
[0020]
In addition, as described in claim 3, it is preferable that the processing by the histogram calculation unit and the gain calculation unit and the processing related to the second captured image are performed in parallel. As a result, the processing speed can be increased.
[0021]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings.
[0022]
FIG. 1 is a rear view of a digital camera according to the present invention, and FIG. 2 is a plan view of a mode dial provided on the upper surface of the camera.
[0023]
As shown in FIG. 2, the mode dial 1 is rotated so that the icons 1A to 1F on the dial are aligned with the mark M, so that the continuous shooting / bracketing mode 1A for shooting with multiple exposures, the aperture and the shutter speed are set. Manual shooting mode 1B that can be set, auto shooting mode 1C suitable for shooting various subjects, portrait mode 1D suitable for shooting a person, landscape mode 1E suitable for shooting a landscape, and night scene shooting It is possible to set a shooting mode such as night view mode 1F suitable for the case. In FIG. 2, the landscape mode 1E is set.
[0024]
In addition to these shooting modes, you can select a combination of aperture and shutter speed, P (program) mode, you can select an aperture, A (aperture priority) mode in which the shutter speed is automatically selected, and shutter speed It is possible to set a photographing mode such as an S (shutter speed priority) mode in which an aperture is automatically selected. In addition, for each shooting mode, auto mode that automatically fires the flash, red-eye reduction mode to reduce red-eye when a person is shot, flash forced flash mode that forces the flash to fire, flash light emission At the same time, it is possible to set a flash mode such as a slow sync mode for shooting a person and a night scene in a balanced manner by increasing the shutter speed.
[0025]
In the center of the mode dial 1, a shutter button 2 having a switch S1 that is turned on when half-pressed and a switch S2 that is turned on when fully pressed is provided.
[0026]
On the back of the digital camera, as shown in FIG. 1, a viewfinder eyepiece 3, a shift key 4, a display key 5, a shooting mode / playback mode switching lever 6, a cancel key 7, an execution key 8, and a multifunction cross key 9 And a liquid crystal monitor 52 are provided.
[0027]
FIG. 3 is a block diagram showing an internal configuration of the digital camera shown in FIG.
[0028]
The digital camera according to the present embodiment includes a photographic lens 10, a diaphragm 12 that adjusts the amount of light that passes through the photographic lens 10, and light from a subject that has passed through the photographic lens 10 and the diaphragm 12 with high sensitivity and low sensitivity. A CCD (Charge Coupled Device) 14 is provided that outputs R, G, and B color analog image signals indicating the subject image received by each light receiving element.
[0029]
Here, the structure of the CCD 14 according to the present embodiment will be described. As the CCD 14, a honeycomb CCD as shown in FIG. 4 can be adopted.
[0030]
As shown in FIG. 4, the CCD 14 has an image pickup unit assigned one by one for each color of one pixel and a predetermined arrangement pitch (horizontal arrangement pitch = Ph (μm), vertical arrangement pitch = Pv (μm)). And adjacent light receiving elements PD1 are arranged so as to bypass a plurality of light receiving elements PD1 that are two-dimensionally shifted in the vertical direction and the horizontal direction, and an opening AP formed in the front surface of the light receiving element PD1. In addition, a vertical transfer electrode VEL that takes out a signal (charge) from the light receiving element PD1 and transfers it in the vertical direction and a vertical transfer electrode VEL that is positioned at the lowest in the vertical direction are arranged on the lower side in the vertical direction, A horizontal transfer electrode HEL for transferring the transferred signal to the outside. In the example shown in the figure, the opening AP is formed in an octagonal honeycomb shape.
[0031]
Here, each of the vertical transfer electrode groups constituted by a plurality of vertical transfer electrodes VEL arranged in a straight line in the horizontal direction has one of the vertical transfer drive signals V1, V2,. Can be applied simultaneously. In the example shown in the figure, the vertical transfer drive signal V3 is applied to the first-stage vertical transfer electrode group, and the vertical transfer drive signal V4 is applied to the second-stage vertical transfer electrode group. The vertical transfer drive signal V5 for the transfer electrode group, the vertical transfer drive signal V6 for the fourth vertical transfer electrode group, and the vertical transfer drive signal V7 for the fifth vertical transfer electrode group are 6 The vertical transfer drive signal V8 for the vertical transfer electrode group at the stage, the vertical transfer drive signal V1 for the vertical transfer electrode group at the seventh stage, and the vertical transfer drive signal for the vertical transfer electrode group at the eighth stage. V2 can be applied to each.
[0032]
On the other hand, each light receiving element PD1 is configured to be electrically connected to one adjacent vertical transfer electrode VEL via a transfer gate TG. In the example shown in the figure, each light receiving element PD1 is configured to be connected to a vertical transfer electrode VEL adjacent to the lower right via a transfer gate TG.
[0033]
In the figure, the opening AP formed on the front surface of the light receiving element PD1 in which “R” is entered is covered with a color separation filter (color filter) that transmits red light, and “G” is entered. The opening AP formed on the front surface of the light receiving element PD1 is covered with a color separation filter that transmits green light, and the opening AP formed on the front surface of the light receiving element PD1 on which “B” is written is blue. It is covered with a color separation filter that transmits light. That is, the light receiving element PD1 in which “R” is written receives red light, the light receiving element PD1 in which “G” is written receives green light, and the light receiving element PD1 in which “B” is written receives blue light. Each analog signal corresponding to the amount of received light is output.
[0034]
The CCD 14 further includes a light receiving element PD2 that is less sensitive than the light receiving element PD1 described above. As shown in FIG. 4, the light receiving element PD2 is provided between the plurality of light receiving elements PD1. Similarly to the light receiving element PD1, the light receiving element PD2 is formed with an opening AP having a smaller area than the opening of the light receiving element PD1, and is electrically connected to one adjacent vertical transfer electrode VEL by the transfer gate TG. It is connected. Further, in the light receiving element PD2, any one of RGB color filters is mounted in the opening AP formed on the front surface thereof, similarly to the light receiving element PD1. Thus, since the light receiving area of the light receiving element PD2 is smaller than the light receiving area of the light receiving element PD1, an RGB signal having a lower sensitivity than the light receiving element PD1 can be obtained.
[0035]
The electrode to which the transfer gate TG of the light receiving element PD2 is connected is provided different from the electrode to which the transfer gate TG of the adjacent light receiving element PD1 is connected.
[0036]
The subject image formed on the light receiving surface of the CCD 14 via the photographing lens 10 and the diaphragm 12 is converted into signal charges of an amount corresponding to the amount of incident light by each of the light receiving elements PD1 and PD2. Each of the high-sensitivity or low-sensitivity signal charges accumulated in this way is read to the shift register by a read gate pulse applied from the CCD drive circuit 16, and sequentially as a voltage signal corresponding to the signal charge by the register transfer pulse. Read out. 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).
[0037]
Although details will be described later, in the present embodiment, the charge of the light receiving element PD2 is read after the charge of the light receiving element PD1 is read first. That is, after reading out the high-sensitivity signal charge, the low-sensitivity signal charge is read out.
[0038]
The high-sensitivity or low-sensitivity voltage signal sequentially read from the CCD 14 is applied to a correlated double sampling circuit (CDS circuit) 18 where the R, G, B signals for each pixel are sampled and held, and A / It is added to the D converter 20. The A / D converter 20 converts a high-sensitivity R, G, B signal and a low-sensitivity R, G, B signal sequentially applied from the CDS circuit 18 into, for example, a 12-bit high-sensitivity digital R, G, B signal. (First captured image) and low-sensitivity digital R, G, B signals (second captured image) are converted and output. The CCD drive circuit 16, the CDS circuit 18, and the A / D converter 20 are driven in synchronization with a timing signal applied from a timing generation circuit (TG) 22.
[0039]
The high-sensitivity or low-sensitivity 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 digital signal processing. Applied to circuit 26. The digital signal processing circuit 26 includes a synthesis processing unit 30, a synchronization circuit 32, a YC signal creation circuit 34, and a memory 36.
[0040]
As shown in FIG. 5, the synthesis processing unit 30 includes an OB processing unit 70A, 70B, LMTX 72A, 72B, a WB adjustment unit 74A, 74B, a gamma correction unit 76A, 76B, a histogram calculation unit 78, a gain calculation unit 80, and a multiplier. 82A and 82B, an adder 84, and a limiter 86. R, G, B data of a photographed image taken with high sensitivity is input to the OB processing unit 70A, and R, G, B data of a photographed image photographed with low sensitivity is input to the OB processing unit 70B. Is done.
[0041]
The OB processing units 70A and 70B perform processing for correcting the black level. That is, offset adjustment is performed by subtracting the data of the light shielding area of the CCD 14 from the original image data, and the black level is corrected.
[0042]
The LMTXs 72A and 72B are composed of, for example, a 3 × 3 matrix circuit, and perform color correction by adjusting hue or saturation.
[0043]
The WB adjusting units 74A and 74B adjust the white balance by multiplying the R, G, and B data by gain values Rg, Gg, and Bg for white balance correction specified by the CPU 38, respectively.
[0044]
The gamma correction units 76A and 76B change the input / output characteristics so that the R, G, and B data subjected to white balance adjustment have desired gamma characteristics.
[0045]
Although details will be described later, the histogram calculation unit 78 calculates a histogram of G data, for example.
[0046]
The gain calculation unit 80 is based on highlight data on the highlight side determined in advance in the histogram calculated by the histogram calculation unit 78 and a shooting EV value representing the luminance level of the shot image calculated by the CPU 38 to be described later. Thus, an adjustment gain for adjusting the dynamic range of the CCD 14 is calculated. Then, h_gain for multiplying the high-sensitivity R, G, B data based on the adjustment gain and l_gain for multiplying the low-sensitivity R, G, B data are calculated. The calculation of h_gain and l_gain will be described later.
[0047]
The multiplier 82A multiplies g_corrected high-sensitivity R, G, B data by h_gain and outputs the result to the adder 84. The multiplier 82B multiplies the low-sensitivity R, G, B data subjected to gamma correction by l_gain and outputs the result to the adder 84.
[0048]
The adder 84 adds the low-sensitivity R, G, B data multiplied by l_gain to the high-sensitivity R, G, B data multiplied by h_gain, synthesizes both, and outputs them to the limiter 86. The limiter 86 keeps R, G, B data within a range that can be expressed by a predetermined number of bits (for example, 8 bits).
[0049]
The synchronization circuit 32 converts the dot-sequential R, G, B signals read from the memory 24 into simultaneous equations and outputs the converted signals to the YC signal generation circuit 34.
[0050]
The YC signal creation circuit 34 creates a luminance signal Y and chroma signals Cr and Cb from the combined R, G, and B signals. These luminance signal Y and chroma signals Cr and Cb (YC signal) are stored in the memory 36.
[0051]
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. The YC signal after photographing is compressed into a predetermined format by the compression / decompression circuit 54 and then recorded on a recording medium such as a memory card by the recording unit 56. Further, in the reproduction mode, the image data recorded on the memory card or the like is decompressed by the compression / decompression circuit 54 and then output to the liquid crystal monitor 52 so that the reproduced image is displayed on the liquid crystal monitor 52. .
[0052]
The CCD 14 corresponds to the image sensor of the present invention, the histogram calculator 78 corresponds to the histogram calculator of the present invention, the gain calculator 80 corresponds to the gain calculator of the present invention, and the adder 86 corresponds to the present invention. It corresponds to the synthesis means.
[0053]
The CPU 38 controls each circuit based on inputs from the camera operation unit 40 including the mode dial 1 and the shutter button 2 shown in FIG. 1, and performs control such as autofocus, automatic exposure control, and auto white balance. Do. This autofocus control is, for example, contrast AF that moves the taking lens 10 so that the high-frequency component of the G signal is maximized, and the drive unit 42 so that the high-frequency component of the G signal is maximized when the shutter button 2 is half-pressed. Then, the photographing lens 10 is moved to the in-focus position.
[0054]
In the automatic exposure control, as shown in FIG. 6, the R, G, B signals are fetched up to four times at predetermined exposures (1) to (4), and these R, G, B signals are integrated. Based on this, the subject brightness (shooting EV value) is obtained. This is executed when the shutter button 2 is half-pressed. Note that the process for obtaining the photographing EV value corresponds to the luminance level detecting means of the present invention.
[0055]
The CPU 38 is connected to a memory 39 for storing various data such as a photographing EV value, a strobe 60 for emitting strobe light, and a drive unit 64 for driving a strobe light control sensor 62. Control these.
[0056]
The strobe 60 emits light when, for example, the photographing EV value is equal to or smaller than a predetermined value, that is, in a photographing situation where the subject is dark and sufficient contrast cannot be obtained, and the subject is irradiated with strobe light.
[0057]
The strobe light control sensor 62 detects strobe light emitted from the strobe 60 and outputs a detection voltage corresponding to the amount of light to the drive unit 64. The drive unit 64 uses the strobe 60 when the detection voltage output from the strobe dimming sensor 62 reaches a predetermined value, that is, when the subject is irradiated with strobe light to such an extent that sufficient contrast is obtained. Stop flash light emission. Thereby, the light intensity is adjusted to an appropriate light amount.
[0058]
Next, details of the measurement of the photographing EV value will be described.
[0059]
As shown in FIG. 7, one screen is divided into a plurality of areas (8 × 8), and luminance signals obtained from, for example, high-sensitivity R, G, and B signals are integrated for each divided area, and the integrated value is obtained. Based on this, the EV value (EVi) of each divided area is obtained. Subsequently, as shown in FIG. 7, 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.
[0060]
[Expression 1]
Figure 2004186876
[0061]
However, i is a subscript indicating each of the divided areas, and can take a value of 0 to 63 in the above case. N indicates the number of divided areas. In the above case, 8 × 8 = 64. ΔEViso is an EV value correction amount based on a predetermined sensitivity (for example, ISO 200), and is a value for adjusting EV ′ to be constant even when the sensitivity is changed. Wi is a weighting factor for each divided area, and for example, as shown in FIG.
[0062]
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. The obtained shooting EV value is stored in the memory 39.
[0063]
EV = EV′−ΔEV (2)
Note that ΔEV is, for example, ΔEV = 0 in the portrait mode, and ΔEV = 0.3 in the landscape mode and the night view mode.
[0064]
The aperture value and shutter speed at the time of shooting are finally determined based on the shooting EV value obtained as described above.
[0065]
Then, when the shutter button is fully pressed, the diaphragm 12 is driven through the diaphragm driving unit 44 so that the determined diaphragm value is obtained, and the charge accumulation time is controlled by the electronic shutter so that the determined shutter speed is achieved. .
[0066]
Next, as an operation of the present embodiment, a processing routine executed by the digital camera 11 will be described with reference to a flowchart shown in FIG. Note that the processing routine shown in FIG. 8 is executed when the shutter button 2 is fully pressed.
[0067]
First, when the shutter button 2 is half-pressed, the CPU 38 instructs the CCD 14 through the TG 22 and the CCD drive circuit 16 to take in a highly sensitive image signal. As a result, high-sensitivity image data is once taken from the CCD 14 into the memory 24, and the above-described autofocus control and automatic exposure control are performed by the CPU 38. Thereby, the photographing EV value, the shutter speed, and the aperture value are determined, and the drive unit 42 and the drive unit 44 are controlled.
[0068]
When the shutter button 2 is fully pressed, in step 100, the CPU 38 instructs the CCD 14 via the TG 22 and the CCD drive circuit 16 to capture a high-sensitivity image signal. As a result, high-sensitivity image data is temporarily captured from the CCD 14 into the memory 24.
[0069]
Next, in step 102, gain values Rg, Gg, and Bg for adjusting the white balance are calculated.
[0070]
Next, calculation of a gain value for white balance adjustment will be described with reference to a flowchart shown in FIG.
[0071]
In the case of shooting without strobe light emission, the white balance control shown in FIG. 9 is executed when the shooting mode is other than the night scene mode, and in other shooting modes, the gain value Rg is obtained by normal white balance control. , Gg, Bg are calculated.
[0072]
Further, in the case of shooting with strobe light emission, white balance control shown in FIG. 9 is executed in the case of a predetermined shooting mode and strobe mode and when it is determined that strobe light emission is performed.
[0073]
The following table shows combinations of shooting modes and flash modes in which the white balance control shown in FIG. 9 is executed in the case of shooting with strobe light emission. For example, when the shooting mode and the flash mode are both the auto mode and the EV value is equal to or less than a predetermined threshold, the following white balance control is executed. In other cases, for example, the shooting mode is the landscape mode and the flash mode is the forced flash mode. In this case, normal white balance control is performed.
[0074]
[Table 1]
Figure 2004186876
[0075]
First, it is determined whether or not strobe light is emitted from the EV value, the shooting mode, and the strobe mode. When the shooting mode is the night scene mode and it is determined that the strobe light is not emitted, daylight light is emitted by a well-known method. White balance correction values Rg, Gg, and Bg for performing white balance control suitable for the case where the strobe is not emitted as a light source are set and output to the WB adjustment units 74A and 74B.
[0076]
If it is determined that the flash light is emitted, it is determined whether or not the shooting mode and the flash mode are combinations indicated by the circles in Table 1 above. If it is determined that the flash light is emitted and the shooting mode and the flash mode are determined not to be a combination indicated by a circle in Table 1, the white balance control during normal flash light emission is performed by a well-known method. White balance correction values Rg, Gg, and Bg are set and output to the WB adjustment units 74A and 74B.
[0077]
When it is determined that the shooting mode is other than the night scene mode and the flash is not emitted, or when the shooting mode and the flash mode are combinations indicated by the circles in Table 1, the CPU 38 presses the shutter button halfway. The photographing EV value obtained at times is read from the memory 39 (step 200).
[0078]
R, G, and B signals of a high-sensitivity image captured when the shutter button is fully pressed are temporarily stored in the memory 24. This image is divided into a plurality of areas (for example, 8 × 8), and each divided area is divided. For each of the R, G, and B signals, an integrated value for each color is obtained by the integrating circuit 48 (step 202).
[0079]
The integrated values Rt, Gt, Bt of the R, G, B signals are output to multipliers (multiplier means) 50R, 50G, 50B provided between the integrating circuit 48 and the CPU 38, and the multipliers 50R, 50G, 50B are output. Is multiplied by a predetermined reference WB (white balance) gain value (reference control value) Rc, Gc, Bc (step 204). The reference WB gain values Rc, Gc, Bc are stored in the memory 39 in advance.
[0080]
The integrated values Rt ′, Gt ′, Bt ′ of the R, G, B signals multiplied by the reference WB gain values Rc, Gc, Bc are input to the CPU 38.
[0081]
The reference WB gain values Rc, Gc, and Bc are used to adjust the white balance so that the white balance is appropriate when the light source is daylight light, such as when the weather is sunny, in the case of shooting without strobe light emission. Gain values Rd, Gd, and Bd are set. Also, when shooting with strobe light, a gain value for adjusting the white balance to be appropriate when the strobe light is dominant as a light source, such as when the strobe light reaches the subject sufficiently Rst, Gst, and Bst are set.
[0082]
Then, the CPU 38 has a ratio Rt ′ / Gt ′ between the integrated value Rt ′ of the input R signal and the integrated value Gt ′ of the G signal, and a ratio Bt ′ / Gt of the integrated value of the B signal and the integrated value of the G signal. Gt ′ is obtained (step 206).
[0083]
Rt ′ / Gt ′ and Bt ′ / Gt ′ obtained for each divided area as described above are the detection frames in which the divided area is detected among the detection frames represented on the graph shown in FIG. Used to determine whether to enter. Note that each detection frame in FIG. 10 defines a range of color distribution such as an environmental light source.
[0084]
As shown in FIG. 10, the detection frame includes a blue sky detection frame, a shade detection frame, a daylight color (fluorescent light) detection frame, a daylight white (fluorescent light) detection frame, a white (fluorescent light) detection frame, a daylight detection frame, There are a light bulb color fluorescent light detection frame and a light bulb (tungsten light bulb) detection frame. The daylight detection frame is a detection frame for shooting without flash emission, and becomes a strobe detection frame for shooting with flash.
[0085]
Then, the CPU 38 represents Rt ′ / Gt ′ = X ′, Bt ′ / Gt ′ = Y ′, and Rt ′ / Gt ′, Bt ′ / Gt ′ obtained for each divided area (X i It is determined in which detection frame of these detection frames “′, Y i ′” falls, and the number thereof is counted (step 208). At this time, in the case of shooting without strobe lighting, the number in the shade detection frame is counted only for the EV value of the divided area that is equal to or smaller than the predetermined value, and the number in the blue sky detection frame is equal to or greater than the predetermined value. Count only about things.
[0086]
Next, an average value (Xa j 'Ya j ') of (X i ', Y i ') existing in each detection frame is obtained (step 210). Here, j is a subscript indicating each detection frame. The center of gravity value may be used instead of the average value.
[0087]
Next, an evaluation value Fc () representing the light source-likeness (shade-likeness, etc.) relating to the color is calculated by the membership function provided corresponding to each detection frame (step 212). The membership function is a function that outputs an evaluation value Fc () representing the light source likeness with respect to the color using the number in the detection frame as a variable. That is, if the evaluation value is high, the possibility of a light source (environment light source) corresponding to the detection frame increases.
[0088]
As shown in FIG. 11, Fc (CLD) is a value of a membership function that represents the likelihood of being shaded with the number of divided areas that fall within the shade detection frame as a variable.
[0089]
As shown in FIG. 12, Fc (SKY) is a membership function value representing the likelihood of blue sky with the number of divided areas that fall within the blue sky detection frame as a variable.
[0090]
Fc (EXD), Fc (EXN), Fc (W), Fc (EXL), and Fc (TNG) are membership functions similar to Fc (CLD) shown in FIG. Here, Fc (EXD) is a membership function representing the likelihood of a fluorescent light of daylight color with the number of divided areas that fall within the daylight color detection frame as a variable, and Fc (EXN) is a division function that falls within the daylight white detection frame. This is a membership function value representing the likelihood of a daylight fluorescent lamp with the number of areas as a variable, and Fc (W) represents the likelihood of a white fluorescent lamp with the number of divided areas within the white detection frame as a variable. Fc (EXL) is a membership function that represents the likelihood of a fluorescent light of a light bulb color with the number of divided areas within the light bulb color fluorescent light detection frame as a variable, and Fc (TNG) is a light bulb This is a membership function value representing the light bulb likeness with the number of divided areas falling within the detection frame as a variable.
[0091]
Fc (DAY) is a value of a membership function that represents the clearness with the number of divided areas that fall within the daylight detection frame as a variable. This membership function is a membership function that represents the shadedness shown in FIG. It is the same.
[0092]
Fc (TYP) is a strobe characteristic with the number of divided areas falling within the strobe detection frame as a variable, that is, a membership function value indicating whether or not strobe light is dominant. This is the same as the membership function representing the shading shown in FIG.
[0093]
Next, an evaluation value Fy () representing the light source likelihood (indoorness, outdoorness) relating to the luminance is calculated by a membership function provided corresponding to each detection frame (step 214). The membership function is a function that outputs an evaluation value representing the light source-likeness related to the luminance using the EV value acquired in step 200 as a variable.
[0094]
As shown in FIG. 13, Fy (outdoor likelihood DAY) is a value of a membership function that represents the outdoorness of the daylight with the EV value as a variable.
[0095]
As shown in FIG. 14, Fy (outdoor likelihood CLD) is a value of a membership function that represents the outdoor appearance of shade with the EV value as a variable.
[0096]
As shown in FIG. 15, Fy (indoorness EXD), Fy (indoorness EXN), and Fy (indoorness TNG) are respectively the indoorness of daylight fluorescent lamps with the EV value as a variable or the whiteness of daylight fluorescent lamps. This is a membership function value representing the indoorness or the indoorness of a tungsten light bulb. Fy (indoorness W) is a value of a membership function representing the indoorness of a white fluorescent lamp with the EV value as a variable, and is the same as Fy (indoorness EXN). Also, Fy (indoorness EXL) is a membership function value representing the indoorness of a fluorescent light bulb with the EV value as a variable, and is the same as Fy (indoorness TNG).
[0097]
Next, a comprehensive light source evaluation value H j is obtained for each detection frame from the evaluation value indicating the light source likelihood relating to the color and the evaluation value indicating the evaluation value relating to the luminance (step 216). In the case where the flash is not emitted and the shooting mode is the landscape mode, only H 1 to H 2 and H 7 are performed. This is because, in the landscape mode, the image is usually taken outdoors, but it is not considered that the light source is a tungsten bulb or the like in the outdoors.
[0098]
Evaluation values H 1 to H 7 are obtained by the following equations.
[0099]
H 1 (Evaluation value of shade) = Fc (CLD) × Fy (likeness of outdoors) × Fc (SKY) (3)
H 2 (Evaluation value of the likelihood of daylight fluorescent lamp) = Fc (EXD) × Fy (Indoorness EXD) (4)
H 3 (Evaluation value of the likelihood of daylight fluorescent light) = Fc (EXN) × Fy (Indoorness EXN) (5)
H 4 (Evaluation value of white fluorescent lamp-likeness) = Fc (W) × Fy (indoor-likeness W) (6)
H 5 (Evaluation value of the likelihood of a light bulb color fluorescent lamp) = Fc (EXL) × Fy (Individuality EXL) (7)
H 6 (Evaluation value of light bulb-likeness) = Fc (TNG) × Fy (Indoor-likeness TNG) (8)
H 7 (Evaluation value of sunnyness) = Fc (DAY) × Fy (Outdoor likeness DAY) (9)
In the case of flash photography is, H 7 becomes the following equation.
[0100]
H 7 (Evaluation value of strobe) = Fc (TYP) × Fy (Outdoor likelihood DAY) (10)
Here, since 0 ≦ Fc () and Fy () ≦ 1, 0 ≦ H j ≦ 1. As shown in FIG. 12, Fc (SKY) takes a value that acts in the direction of lowering the evaluation value of shading as the number of divided areas in the blue sky detection frame increases.
[0101]
Further, as shown in FIG. 15, Fy (indoorness) takes a value that acts in the direction of lowering the evaluation value of the detection frames as the EV value is higher. As described above, the evaluation value H j of the light source quality is determined in consideration of not only the color distribution but also the luminance, so that the light source can be appropriately specified. For example, when shooting a subject of the same color in a room where the fluorescent lamp is lit, and when the light source is specified only by the color distribution, the light source is incorrectly specified and a color failure occurs. There is.
[0102]
However, in this embodiment, when the luminance is low, that is, when the image is taken indoors, Fy (appearance of the room) is high, and when the luminance is high, that is, when the image is taken outdoor. , Fy (likeness in the room) is reduced, so that the light source can be specified accurately and the occurrence of color feria can be prevented.
[0103]
Then, when the evaluation value of the light source likelihood corresponding to each detection frame is calculated as described above, it is determined whether or not the evaluation value is equal to or more than a predetermined threshold value (for example, 0.4 or more) among these evaluation values ( Step 218). If there is an evaluation value that is equal to or greater than a predetermined threshold value, an evaluation value that is equal to or greater than the predetermined threshold value is selected as an environmental light source candidate.
[0104]
Next, for each selected environment light source, a control value (gain for performing white balance control so that the color of the environment light source or the mixed light source in which the strobe light and the environment light source are mixed is white according to the following formula: Value) G R , G B , GG are calculated (step 220).
[0105]
G R = {Σ (gr j × H j ) / ΣH j } × {Σ (G j × H j ) / ΣH j } (11)
G B = {Σ (gb j × H j ) / ΣH j } × {Σ (G j × H j ) / ΣH j } (12)
G G = Σ (G j × H j ) / ΣH j (13)
Here, the (11) to (13), when the evaluation value is calculated for more than a predetermined threshold value, for example, evaluation values higher than a predetermined threshold is H 2 to H 5 is H 2 to H 5 Gr j and gb j are calculated for each of the light sources, and calculations in each Σ are performed using the calculated gr j , gb j and H 2 to H 5 . Further, gr j and gb j are gains necessary for setting the color of the light source in each detection frame to a predetermined color, and are represented by the following equations.
[0106]
gr j = Xc / Xa j '× Tx j (14)
gb j = Yc / Ya j ' × Ty j ... (15)
Here, Xc = Rc / Gc and Yc = Bc / Gc. Tx j and Ty j are the average values of X i and Y i obtained for the integrated values of R, G, and B of the original image data not multiplied by the reference WB gain value, Xa j (= Xa j ' / Xc), Ya j (= Ya j ′ / Yc), Xa j , Ya j target values, corresponding to a predetermined color. That is, gr j and gb j are the light sources (environment light source or strobe light) indicated by Xa j and Ya j when Xa j and Ya j are obtained for the integrated values of R, G, and B of the original image data. Is a gain necessary to set the color of the mixed light source of the light source and the environmental light source to a predetermined color. Tx j and Ty j are 1, for example.
[0107]
Accordingly, the first terms of the above equations (11) and (12) represent the weighted average values of gr j and gb j with the evaluation value H j as the weight. The second term is a term for correcting the brightness, and G j in the case of shooting that does not emit strobe light is expressed by the following equation.
[0108]
G j = g j × (exposure correction gain / 128) (16)
Here, g j is a gain of G (green) necessary for performing white balance control suitable when the light source is sunny. The exposure compensation gain is as shown in the table below.
[0109]
[Table 2]
Figure 2004186876
[0110]
The reason for correcting the brightness in this manner is that if the strobe light does not emit light, only the surrounding light source is used, and the brightness may be insufficient.
[0111]
Further, in the case of shooting that emits strobe light, G j is Gst, which is a fixed value, and thus the brightness is not corrected.
[0112]
In the case where the evaluation value H 7 daylight detection frame (or flash detection frame) is selected as being equal to or greater than a predetermined threshold value, gr 7 = Xc, and gb 7 = Yc.
[0113]
In this way, the control value G RR G B to the color of the environmental light or mixed light in a predetermined color, the G G is calculated, these control values, a value between the reference WB gain value And it adjusts according to an environmental light source so that it may become a value suitable for an environmental light source or a mixed light source (step 222). The adjusted control values are expressed as white balance correction values Rg, Gg, and Bg, and are obtained by the following equations.
[0114]
Rg = (G R -Rd) × H max × L j + Rd ... (17)
Gg = (G G -Gd) × H max × L j + Gd ... (18)
Bg = (G B -Bd) × H max × L j + Bd ... (19)
Here, H max is the maximum value of H j , and the light source corresponding to H max can be specified as the light source at the time of shooting. For example, if the H max is a H 2, the light source may be determined to be a fluorescent lamp daylight. L j is a lowward correction coefficient, which is a predetermined value corresponding to each light source, and is a value determined by experiments or the like so that white balance is appropriate in shooting under each light source. is there. The lowward correction coefficient is stored in the memory 39 in advance. Note that L j may be a fixed value regardless of the light source.
[0115]
When 0 ≦ L j ≦ 1 and L j = 0, Rg = Rc, Gg = Gc, and Bg = Bc, and white balance control is performed with the reference WB gain value. Further, when L j = 1 and H max = 1, Rg = G R , Gg = G G , and Bg = G G. Thus, the white balance correction values Rg, Gg, and Bg are values between the control values G R , G B , and G G for setting the color of the environmental light source to a predetermined color from the reference WB gain value, and H This is a value that enables white balance control suitable for the environmental light source specified by max .
[0116]
The white balance correction values Rg, Gg, and Bg calculated in this way are output to the WB adjustment units 74A and 74B (step 224), and the R, G, and B signals of the original high-sensitivity and low-sensitivity image data are output. The white balance is adjusted. Assuming that the corrected signals are R ′, G ′, and B ′, R ′, G ′, and B ′ are expressed by the following equations.
[0117]
R ′ = Rg × R (20)
G ′ = Gg × G (21)
B ′ = Bg × B (22)
On the other hand, if there is no evaluation value Hj equal to or greater than the predetermined threshold, the white balance correction values Rg, Gg, and Bg are set to Rc, Gc, and Bc, respectively (step 226), and the WB adjustment units 74A and 74B are performed. Output (step 224).
[0118]
Thus, in this embodiment, since the environmental light source is determined in consideration of not only the color of the environmental light source but also the EV value, the environmental light source can be accurately determined. In addition, since the color of the environmental light source is obtained from the image data of the captured image in the actual photographing, the environmental light source can be accurately determined without complicating the imaging sequence.
[0119]
The white balance correction values Rg, Gg, and Bg are values between control values G R , G B , and G G for setting the color of the environmental light source to a predetermined color from the reference WB gain value, and at H max Since the value is such that white balance control suitable for the specified environmental light source can be performed, the white balance control can be appropriately performed for each environmental light source, and the occurrence of color failure can be suppressed.
[0120]
In step 104, black correction processing is performed on the highly sensitive image data by the OB processing unit 70A.
[0121]
In step 106, the LMTX 72A performs color correction processing using a 3 × 3 matrix on the highly sensitive image data.
[0122]
In step 108, the white balance adjustment is performed by the white balance correction gain values Rg, Gg, and Bg calculated in step 102 by the WB adjusting unit 74 and multiplied by the highly sensitive R, G, and B data, respectively. The G data may be multiplied by a predetermined value (for example, 1.375) larger than a predetermined one. For example, when the light source is a light source with a lot of redness such as a light bulb, there is a case where it is desired to lower the gain of R than G. In such a case, the gain of G is set to a predetermined value larger than 1. This is because the gain of R can be relatively lowered.
[0123]
In step 110, gamma correction processing is performed on the highly sensitive image data.
[0124]
In parallel with the processing in steps 102 to 110 described above, low-sensitivity image signal processing is performed in step 112. That is, the CPU 38 instructs the CCD 14 via the TG 22 and the CCD drive circuit 16 to capture a low-sensitivity image signal. As a result, low-sensitivity image data is taken into the memory 24 from the CCD 14.
[0125]
Similarly to the high-sensitivity image data, the black correction process, the color correction process, the white balance adjustment, and the low-sensitivity image data are respectively performed by the OB processing unit 70B, the LMTX 72B, the WB adjustment unit 74B, and the gamma correction unit 76B. Gamma correction is performed.
[0126]
As described above, since the processing of the low-sensitivity image data is performed in parallel with the processing for calculating the gain value for white balance adjustment based on the high-sensitivity image data, the processing speed can be increased.
[0127]
In parallel with the white balance adjustment processing for the high-sensitivity image data in step 108 and the gamma correction processing in step 110, the histogram calculation processing of the image data is performed by the histogram calculation unit 78 in step 114. A gain calculation process for calculating a gain for adjusting the dynamic range based on the calculated histogram is performed.
[0128]
The histogram calculation unit 78 calculates, for example, a histogram of G data out of high sensitivity image data. First, 12-bit G data is shifted by 6 bits, for example, and a histogram is obtained as 6-bit equivalent data. An example of such a histogram is shown in FIG.
[0129]
Then, the data on the predetermined highlight side, that is, the position where the cumulative frequency of G data is reduced by 100% (for example, 0.1%) is set as the maximum value on the highlight side ('52' in FIG. 16). A value obtained by shifting 6 by 6 bits ( 26 times) is used as highlight data. This highlight data is used as information indicating whether or not highlight side data is saturated when a gain for white balance adjustment is applied.
[0130]
The gain calculation unit 80 calculates an adjustment gain for adjusting the dynamic range of the CCD 14 based on the highlight data and the shooting EV value. Then, h_gain for multiplying the high-sensitivity R, G, B data based on the adjustment gain and l_gain for multiplying the low-sensitivity R, G, B data are calculated.
[0131]
First, in the case of shooting without strobe light emission, an evaluation value 1 corresponding to highlight data is obtained by a membership function representing the relationship between highlight data and evaluation value 1 as shown in FIG. An evaluation value 2 corresponding to the photographing EV value is obtained by a membership function representing a correspondence relationship between the photographing EV value and the evaluation value 2 as shown in FIG.
[0132]
As shown in FIG. 17A, the membership function for calculating the evaluation value 1 is a predetermined value (FIG. 17) at which highlight side data is saturated when a gain for white balance adjustment (eg, 1.375) is applied. Up to 3000 in 17 (A), the evaluation value 1 gradually increases as the highlight data increases, and becomes a constant value “1” when the highlight data is greater than or equal to a predetermined value.
[0133]
In addition, as shown in FIG. 17B, the membership function for calculating the evaluation value 2 is the shooting EV value up to the EV value when the shooting EV value is fine (13.5 in FIG. 17B). As the value increases, the evaluation value 2 also gradually increases, and when the shooting EV value is equal to or higher than the EV value when the sky is clear, the function is a constant value “1”.
[0134]
Then, the evaluation value 1 is multiplied by the evaluation value 2. A value obtained by multiplying the evaluation value 1 by the evaluation value 2 is an evaluation value representing the degree of high contrast of the photographic scene, that is, the high contrast likeness of the photographic scene. It does not look like a contrast scene, but looks like a low contrast scene. In this way, the maximum value on the highlight side is obtained using the histogram, and the high contrast scene can be detected with high accuracy based on this and the subject luminance.
[0135]
Next, the total gain p (adjustment gain) for adjusting the dynamic range is obtained by a membership function representing the relationship between the total gain p and the evaluation value 1 × evaluation value 2 as shown in FIG.
[0136]
As shown in FIG. 17C, the membership function for calculating the total gain p is a function such that the total gain p gradually decreases as the evaluation value 1 × evaluation value 2 increases. The total gain p is a value less than 1, for example, a value in the range of 0.8 to 0.9 as shown in FIG.
[0137]
In the case of shooting with strobe light emission, it is considered that the relationship between the brightness of the subject and the high contrast scene is weak, so the evaluation value 2 based on the shooting EV value is not calculated, and the membership shown in FIG. The evaluation value 1 based on the highlight data is obtained by the function, and the total gain p based on the evaluation value 1 is obtained by the membership function shown in FIG.
[0138]
Then, h_gain for multiplying the high-sensitivity image data and l_gain for multiplying the low-sensitivity image data are calculated from the synthesis formula of the high-sensitivity image data and the low-sensitivity image data using the total gain p.
[0139]
The synthesis formula is expressed by the following formula, where synthesis data is data, high sensitivity data is high, and low sensitivity data is low.
[0140]
data = [high + Min (high / th, 1) × low] × Max (1−S × high / th, p) (23)
Here, th is a threshold value, and S is represented by S = 1− {Sh / (Sh + Sl)} when the saturation ratio between the high-sensitivity image data and the low-sensitivity image data is Sh: Sl. Value. For example, when the saturation ratio Sh: Sl is 4: 1, S = 0.2.
[0141]
From the equation (23), the synthesized data data is obtained by adding low sensitivity image data obtained by multiplying the high sensitivity image data high by the weight Min (high / th, 1) to the weight Max (−0.2 ×). high / th + 1, p) is multiplied.
[0142]
As shown in FIG. 19, the weight Min (high / th, 1) outputs a value that increases with an inclination (high / th) as the high increases in a section where the high-sensitivity image data high is smaller than th. , A function that outputs '1' when high is greater than or equal to th.
[0143]
Further, as shown in FIG. 20, the weight Max (1−S × high / th + 1, p) has a slope (1−S × high) as the height increases in the section where the high-sensitivity image data high is smaller than th. / Th) is a function that outputs a smaller value and outputs S when high is greater than or equal to th. FIG. 20 shows the case where S = 0.2 and p = 0.8.
[0144]
FIG. 21 shows high-sensitivity image data high, low-sensitivity image data low, and luminance-gradation values (gradation values are converted into 8-bit values) in the combined image data data up to the first term of the above equation (23). ) Characteristics. As shown in FIG. 21, the first term of the above equation (23) is a low-sensitivity image obtained by multiplying the high-sensitivity image data high by the characteristic weight Min (high / th, 1) as shown in FIG. The data low value is added.
[0145]
Therefore, in the range where the luminance is E1 (the range where the high-sensitivity image data high is equal to or less than the threshold th), the low-sensitivity image data low multiplied by the weight of high / th is added to the high-sensitivity image data high. In the range where the luminance is E2, the high-sensitivity image data high and the low-sensitivity image data low are added on a one-to-one basis.
[0146]
FIG. 22 shows the luminance-gradation value characteristics of the high-sensitivity image data high, the low-sensitivity image data low, and the composite image data data of the above equation (23). The composite image data data is a value obtained by adding low-sensitivity image data low obtained by multiplying high-sensitivity image data high by characteristic weight Min (high / th, 1) as shown in FIG. 19 to FIG. Is a value multiplied by the characteristic weight Max (1−S × high / th + 1, p).
[0147]
Therefore, in the range where the luminance is E1, the composite data data is a value obtained by multiplying the value of the first term of the above equation (23) by the weight of (1−S × high / th), and in the range where the luminance is E2. The value of the first term of the above equation (23) is multiplied by the total gain p.
[0148]
Here, since the total gain p is set in the range of 0.8 to 0.9, as shown in FIG. 22, the line representing the characteristics of the composite data data represents the characteristics of the high-sensitivity image data high. As it goes down below the line as a whole, the way of ascending becomes gradual. That is, the dynamic range of the composite data “data” is wider than that of the high-sensitivity image data “high”.
[0149]
The dynamic range becomes wider as the total gain p becomes smaller, that is, as the high-contrast scene likelihood becomes higher, and becomes narrower as the total gain p becomes larger, that is, as the high-contrast scene likelihood becomes lower.
[0150]
This widens the dynamic range when the degree of high contrast is high, so that when you shoot a high-contrast scene, you can properly reproduce the highlight area even if you combine high-sensitivity and low-sensitivity image data. In addition, robust gradation control is possible.
[0151]
By the way, the above equation (23) can be modified as follows.
[0152]
data = (high + wl × low) × wt
= Wt x high + (wl x wt) x low (24)
Here, wl = Min (high / th, 1) and wt = Max (1−S × high / th + 1, p).
[0153]
From the above equation (24), h_gain = wt and l_gain = wl · wt. Accordingly, h_gain and l_gain are determined by obtaining wl and wt, that is, Min (high / th, 1), Max (1-S × high / th + 1, p). The combined data is obtained by adding high-sensitivity image data weighted with h_gain and low-sensitivity image data weighted with l_gain.
[0154]
In step 112, the high-sensitivity R, G, B data subjected to gamma correction by the multiplier 82A is multiplied by h_gain calculated in step 116 and output to the adder 84, and gamma correction is performed by the multiplier 82B. The low-sensitivity R, G, B data is multiplied by l_gain calculated in step 116 and output to the adder 84.
[0155]
In step 120, the adder 84 adds the low-sensitivity R, G, B data multiplied by l_gain to the high-sensitivity R, G, B data multiplied by h_gain to generate combined data data of each color. The
[0156]
In step 122, the limiter 86 adjusts the combined data data of each color so as to fall within a range that can be expressed by a predetermined number of bits (for example, 8 bits).
[0157]
In step 124, the dot-sequential R, G, B signals read from the memory 24 are converted into simultaneous equations by the synchronization circuit 32 and output to the YC signal generation circuit 34.
[0158]
In step 126, the YC signal creation circuit 34 creates a luminance signal Y and chroma signals Cr, Cb from the synthesized R, G, B signals. These luminance signal Y and chroma signals Cr and Cb (YC signal) are stored in the memory 36.
[0159]
In step 128, the compression / decompression circuit 54 compresses the YC signal into a predetermined format.
[0160]
In Step 130, the recording unit 56 records the compressed image data on a recording medium such as a memory card.
[0161]
As described above, in the present embodiment, the maximum value on the highlight side is obtained using the histogram of the image data, and an evaluation value representing the high-contrast characteristic is obtained with accuracy from this and the subject luminance, and the dynamic range is obtained from this evaluation value. The characteristic of the high-sensitivity and low-sensitivity image data is changed by obtaining the total gain p for adjusting the image.
[0162]
Thereby, the dynamic range can be appropriately controlled according to the shooting scene. For example, the dynamic range is widened only when the evaluation value for high contrast is high, so when shooting a high-contrast scene, high-sensitivity and low-sensitivity image data is combined in any shooting scene. Compared to the case, the highlight portion can be reproduced appropriately, and robust gradation control is possible.
[0163]
In the present embodiment, the processing of low-sensitivity image data is performed in parallel with the processing of calculating the gain value for white balance adjustment based on the high-sensitivity image data, so that the processing speed is increased. Can do.
[0164]
In the present embodiment, an example in which each of the high sensitivity light receiving element PD1 and the low sensitivity light receiving element PD2 is provided to obtain a high sensitivity signal and a low sensitivity signal has been described. However, as shown in FIG. The light receiving regions of one light receiving element PD are divided into a high sensitivity light receiving region 92 having a large light receiving area for receiving high sensitivity light by a channel stopper 94 and a low sensitivity light receiving region 90 having a small light receiving area for receiving low sensitivity light. A configuration may be employed in which a high sensitivity signal and a low sensitivity signal are obtained depending on the region. Since the light receiving element PD is provided with the channel stopper 94, the signal received with high sensitivity and the signal received with low sensitivity are not mixed, and both signals can be received separately. .
[0165]
【The invention's effect】
As described above, according to the present invention, in the case of synthesizing images shot with different sensitivities, there is an effect that the highlight portion can be appropriately reproduced even when a high contrast scene is shot.
[Brief description of the drawings]
FIG. 1 is a rear view of a digital camera according to the present invention.
FIG. 2 is a plan view of a mode dial provided on the upper surface of the digital camera.
FIG. 3 is a block diagram showing an internal configuration of the digital camera.
FIG. 4 is a schematic configuration diagram of a CCD.
FIG. 5 is a block diagram of a digital signal processing circuit.
FIG. 6 is a diagram for explaining how to obtain an EV value;
FIG. 7 is a diagram for explaining a photometric method.
FIG. 8 is a flowchart showing a processing flow of the digital camera.
FIG. 9 is a flowchart showing a flow of gain calculation processing for white balance adjustment.
FIG. 10 is a graph showing a detection frame as a color distribution range of a light source.
FIG. 11 is a graph showing a membership function representing shading.
FIG. 12 is a graph showing a blue sky membership function.
FIG. 13 is a graph showing a membership function representing the outdoorness of daylight.
FIG. 14 is a graph showing a membership function representing outdoorness.
FIG. 15 is a graph showing a membership function representing indoorness.
FIG. 16 is a histogram of image data.
17A is a diagram showing the relationship between highlight data and evaluation value 1, FIG. 17B is a diagram showing the relationship between subject brightness and evaluation value 2, and FIG. 17C is evaluation value 1 × evaluation; It is a diagram which shows the relationship between the value 2 and the total gain p.
18A is a diagram showing the relationship between highlight data and evaluation value 1, and FIG. 18B is a diagram showing the relationship between subject brightness and evaluation value 2.
FIG. 19 is a diagram showing the relationship between high-sensitivity image data and weights.
FIG. 20 is a diagram showing the relationship between high-sensitivity image data and weights.
FIG. 21 is a diagram illustrating luminance-gradation characteristics of a high-sensitivity image, a low-sensitivity image, and a composite image.
FIG. 22 is a diagram showing luminance-gradation characteristics of a high-sensitivity image, a low-sensitivity image, and a composite image.
FIG. 23 is a schematic configuration diagram of another embodiment of a CCD.
[Explanation of symbols]
10 Photography lens 11 Digital camera 12 CCD
18 CDS circuit 20 A / D converter 26 digital signal processing circuit 30 synthesis processing unit 32 synchronization circuit 34 YC signal creation circuit 40 camera operation unit 52 liquid crystal monitor 54 expansion circuit 56 recording unit

Claims (3)

被写体を第1の感度及び前記第1の感度よりも低い第2の感度で撮像する撮像素子と、
前記第1の感度で撮像した第1の撮像画像及び前記第2の感度で撮像した第2の撮像画像の少なくとも一方に基づいて、前記被写体の輝度レベルを検出する輝度レベル検出手段と、
前記第1の撮像画像のヒストグラムを算出するヒストグラム算出手段と、
前記ヒストグラムの予め定めたハイライト側のハイライトデータと前記輝度レベルとに基づいてハイコントラストらしさを表す評価値を求め、該求めた評価値に基づいて前記撮像素子のダイナミックレンジを調整するための調整ゲインを算出するゲイン算出手段と、
前記調整ゲインに基づいて前記第1の撮像画像と前記第2の撮像画像とを合成する合成手段と、
を備えたデジタルカメラ。
An image sensor for imaging a subject with a first sensitivity and a second sensitivity lower than the first sensitivity;
A luminance level detection means for detecting a luminance level of the subject based on at least one of a first captured image captured with the first sensitivity and a second captured image captured with the second sensitivity;
Histogram calculating means for calculating a histogram of the first captured image;
An evaluation value representing high contrast is determined based on highlight data on the highlight side of the histogram and the luminance level, and the dynamic range of the image sensor is adjusted based on the calculated evaluation value. A gain calculating means for calculating an adjustment gain;
Combining means for combining the first captured image and the second captured image based on the adjustment gain;
Digital camera equipped with.
前記ゲイン算出手段は、前記ハイコントラストらしさを表す評価値が高くなるに従って前記合成手段による合成画像のダイナミックレンジが広くなるように作用するメンバシップ関数により前記調整ゲインを算出することを特徴とする請求項1記載のデジタルカメラ。The gain calculating means calculates the adjustment gain by a membership function that acts so that a dynamic range of a synthesized image by the synthesizing means becomes wider as an evaluation value representing the high contrast likelihood becomes higher. Item 1. A digital camera according to Item 1. 前記ヒストグラム算出手段及び前記ゲイン算出手段による処理と前記第2の撮像画像に関する処理とを並列して行うことを特徴とする請求項1又は請求項2記載のデジタルカメラ。3. The digital camera according to claim 1, wherein the processing by the histogram calculation unit and the gain calculation unit and the processing related to the second captured image are performed in parallel.
JP2002349870A 2002-12-02 2002-12-02 Digital camera Expired - Fee Related JP4043928B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002349870A JP4043928B2 (en) 2002-12-02 2002-12-02 Digital camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002349870A JP4043928B2 (en) 2002-12-02 2002-12-02 Digital camera

Publications (2)

Publication Number Publication Date
JP2004186876A true JP2004186876A (en) 2004-07-02
JP4043928B2 JP4043928B2 (en) 2008-02-06

Family

ID=32752281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002349870A Expired - Fee Related JP4043928B2 (en) 2002-12-02 2002-12-02 Digital camera

Country Status (1)

Country Link
JP (1) JP4043928B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008091437A (en) * 2006-09-29 2008-04-17 Fujifilm Corp Solid-state imaging apparatus
JP2008228058A (en) * 2007-03-14 2008-09-25 Sony Corp Imaging apparatus, imaging method, exposure control method, and program
JP2009246593A (en) * 2008-03-31 2009-10-22 Fujitsu Microelectronics Ltd Image processor
EP2216987A2 (en) 2009-02-06 2010-08-11 Canon Kabushiki Kaisha Image capturing apparatus and control method thereof
JP2014519218A (en) * 2011-04-18 2014-08-07 クゥアルコム・インコーポレイテッド White balance optimization for high dynamic range images
US9077905B2 (en) 2009-02-06 2015-07-07 Canon Kabushiki Kaisha Image capturing apparatus and control method thereof
JP2017229025A (en) * 2016-06-24 2017-12-28 キヤノン株式会社 Image processing apparatus, image processing method, and program

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008091437A (en) * 2006-09-29 2008-04-17 Fujifilm Corp Solid-state imaging apparatus
JP2008228058A (en) * 2007-03-14 2008-09-25 Sony Corp Imaging apparatus, imaging method, exposure control method, and program
US8885093B2 (en) 2007-03-14 2014-11-11 Sony Corporation Image pickup apparatus, image pickup method, exposure control method, and program
JP2009246593A (en) * 2008-03-31 2009-10-22 Fujitsu Microelectronics Ltd Image processor
EP2216987A2 (en) 2009-02-06 2010-08-11 Canon Kabushiki Kaisha Image capturing apparatus and control method thereof
US8355059B2 (en) 2009-02-06 2013-01-15 Canon Kabushiki Kaisha Image capturing apparatus and control method thereof
EP2645705A2 (en) 2009-02-06 2013-10-02 Canon Kabushiki Kaisha Image capturing apparatus and control method thereof
US9077905B2 (en) 2009-02-06 2015-07-07 Canon Kabushiki Kaisha Image capturing apparatus and control method thereof
JP2014519218A (en) * 2011-04-18 2014-08-07 クゥアルコム・インコーポレイテッド White balance optimization for high dynamic range images
JP2017229025A (en) * 2016-06-24 2017-12-28 キヤノン株式会社 Image processing apparatus, image processing method, and program

Also Published As

Publication number Publication date
JP4043928B2 (en) 2008-02-06

Similar Documents

Publication Publication Date Title
JP4679685B2 (en) Digital camera composition auxiliary frame selection method and digital camera
JP3849834B2 (en) Auto white balance control method
JP4004943B2 (en) Image composition method and imaging apparatus
US7039307B2 (en) Digital still camera, imaging method, and exposure decision method
JP6521776B2 (en) Image processing apparatus, image processing method
TW201410017A (en) Image capture apparatus, method of controlling image capture apparatus, and electronic device
JP4717720B2 (en) Image processing apparatus and method, and program
JP4043928B2 (en) Digital camera
JP3967510B2 (en) Digital camera
JP2004297650A (en) Control method of white balance and digital camera
JP3551568B2 (en) Imaging device
JP3831934B2 (en) Camera automatic exposure device
JP4150599B2 (en) Digital camera with exposure compensation
JP4335728B2 (en) Image processing apparatus and method
JP2004349930A (en) Digital camera
JP3958700B2 (en) Digital camera
JP4385240B2 (en) Auto white balance control method for digital camera and digital camera
JP3903093B2 (en) White balance control method and digital camera
JP3903095B2 (en) White balance control method and digital camera
JP4277258B2 (en) White balance control method and imaging apparatus
JP4396225B2 (en) White balance control device and electronic device
JP4054263B2 (en) Imaging device and imaging condition setting method for imaging device
JP3903094B2 (en) White balance control method and digital camera
JP4077217B2 (en) Automatic exposure control device and program thereof
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: 20050224

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061218

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20071114

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111122

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121122

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121122

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20131122

Year of fee payment: 6

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees