JP2005033332A - White balance control unit and electronic equipment - Google Patents
White balance control unit and electronic equipment Download PDFInfo
- Publication number
- JP2005033332A JP2005033332A JP2003193815A JP2003193815A JP2005033332A JP 2005033332 A JP2005033332 A JP 2005033332A JP 2003193815 A JP2003193815 A JP 2003193815A JP 2003193815 A JP2003193815 A JP 2003193815A JP 2005033332 A JP2005033332 A JP 2005033332A
- Authority
- JP
- Japan
- Prior art keywords
- coefficient
- white balance
- color
- chromaticity
- adjustment amount
- 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.)
- Pending
Links
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、ホワイトバランス制御装置及び電子機器に関する。
【0002】
【従来の技術】
従来より、デジタルカメラには、撮像した白い被写体をヒトの見た目に合わせるように、被写体の出力信号を自動的に調整するホワイトバランス調整を行うものがある。
ホワイトバランス調整の方式には、大別して、外部測定方式とTTL(Through The Lens)方式とがあり、後者は、さらに、全画面平均方式と無彩色検出方式とに分けられる。
【0003】
上記のうち、TTLの無彩色検出方式は、ホワイトバランス調整の主流となってきており、具体的には、画像中から白やグレー等の無彩色の領域を抽出して、その部分の色差が0「ゼロ」となるように補正する方式である。ここで、無彩色の領域を抽出(検出)する方法として、例えば、画像の色度情報を用いて色度平面上で黒体輻射軌跡の近傍の画素を無彩色と判定する方法が提案されている(例えば、特許文献1参照。)
そして、無彩色検出方式は、無彩色と判定した画素の色度情報を積分して、積分値のRGBがR:G:B=1:1:1となるように色調補正するのが一般的となっている。
しかしながら、上記の場合、光源に照らされた白やグレーの被写体と、黒体輻射軌跡の近傍に位置する有彩色の被写体が混在していると、無彩色の被写体だけでなく有彩色の被写体の画素の色度情報も積分され、有彩色の被写体の彩度を下げるように色調補正してしまい、ホワイトバランス調整を適正に行うことが困難となる。
【0004】
そこで、ホワイトバランス調整に画素の輝度値を利用するホワイトバランス制御装置が提案されており、輝度値が大きい画素ほどホワイトバランス調整量の重み付けを大きくする加重処理を施して積分することによって、ホワイトバランス調整量を算出するようになっている(例えば、特許文献2参照。)。
【0005】
【特許文献1】
特開2002−112282号公報
【特許文献2】
特開2002−232906号公報
【0006】
【発明が解決しようとする課題】
ところで、例えば、撮像装置の撮像領域の一部に青空が入るシーンでは、青空部分に対応する画素の輝度値が、撮像領域の全ての画素の輝度値の平均値以上になることが多く、特に、半逆光のようなシーンにおいて顕著となっている。
しかしながら、上記の場合において、特許文献2等のように、画素の輝度値が大きいほどホワイトバランス調整量の重み付けが大きくなるように加重処理を施して積分すると、積分結果であるホワイトバランス調整量に対して青空部分に対応する画素の影響度合が大きくなり、青空の彩度を下げる方向に色調補正されてしまう。この結果、青空が色あせ、画像全体が黄ばんだ印象になるといった画質劣化を招いてしまう。
このように、画素の輝度値が大きいほどホワイトバランス調整量の重み付けが大きくなるように加重処理を施して積分しただけでは、最適なホワイトバランス調整量を算出することができず、画像のホワイトバランス調整を適正に行うことができなかった。
【0007】
本発明の課題は、画像のホワイトバランス調整を適正に行うことができ、これにより、画像の色合いをより自然なものとすることができるホワイトバランス制御装置及び電子機器を提供することである。
【0008】
【課題を解決するための手段】
請求項1に記載の発明は、入力された画像情報に対応する画像の色情報に基づいてホワイトバランス調整量を設定する調整量設定手段を備えるホワイトバランス制御装置であって、
前記画像情報のうちの色情報に基づいて、前記画像の色空間における色座標を算出する色座標算出手段と、
前記色情報に基づいて、前記画像の輝度値を算出する輝度値算出手段と、
前記輝度値算出手段により算出された画像の輝度値と、前記色座標算出手段により算出された画像の色座標とに基づいて、前記ホワイトバランス調整量の重み付けに係る輝度係数を設定する輝度係数設定手段と、を備え、
前記調整量設定手段は、前記輝度係数設定手段により設定された輝度係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴としている。
【0009】
請求項1に記載の発明によれば、輝度値算出手段により算出された画像の輝度値と、色座標算出手段により算出された画像の色座標とに基づいて、ホワイトバランス調整量の重み付けに係る輝度係数を設定する輝度係数設定手段を備え、調整量設定手段は、輝度係数設定手段により設定された輝度係数を考慮した色情報に基づいて、ホワイトバランス調整量を設定する。即ち、画像の輝度値と、画像の色空間における色座標とに基づいて設定された輝度係数を考慮した色情報に基づいて、ホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整を従来よりも適正に行うことができることとなって、画像の色合いをより自然なものとすることができる。
【0010】
請求項2に記載の発明は、請求項1に記載のホワイトバランス制御装置において、
前記画像を複数のブロックに分割する画像分割手段を備え、
前記色座標算出手段は、前記画像情報のうち、前記画像分割手段により分割された複数のブロックの各々に対応する部分の色情報に基づいて、色度空間における各ブロックの色度座標を算出し、
前記輝度値算出手段は、前記複数のブロックの各々に対応する前記色情報に基づいて、各ブロックの輝度値を算出し、
前記輝度係数設定手段は、前記輝度値算出手段により算出された各ブロックの輝度値と、前記色座標算出手段により算出された各ブロックの色度座標とに基づいて、前記ホワイトバランス調整量の重み付けに係る各ブロックの輝度係数を設定し、
前記調整量設定手段は、前記輝度係数設定手段により設定された各ブロックの輝度係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴としている。
【0011】
請求項2に記載の発明によれば、請求項1に記載の発明と同様の効果が得られるのは無論のこと、特に、各ブロックの輝度値と、各ブロックの色度座標とに基づいて、ホワイトバランス調整量の重み付けに係る各ブロックの輝度係数を設定し、各ブロックの輝度係数を考慮した色情報に基づいて、ホワイトバランス調整量をより適正な値に設定することができる。
【0012】
請求項3に記載の発明は、請求項2に記載のホワイトバランス制御装置において、
前記色度空間が色度に応じて区切られた各色区域毎の輝度値と輝度係数とが対応付けられた輝度係数設定テーブルを記憶する設定テーブル記憶手段を備え、
前記輝度係数設定手段は、前記各ブロックの色度座標から色区域を特定し、前記設定テーブル記憶手段に記憶された輝度係数設定テーブルに基づいて、各ブロックの輝度値から輝度係数を設定することを特徴としている。
【0013】
請求項3に記載の発明によれば、請求項2に記載の発明と同様の効果が得られるのは無論のこと、特に、各ブロックの色度座標から色度空間が色度に応じて区切られた色区域を特定して、色区域毎の輝度値と輝度係数とが対応付けられた輝度係数設定テーブルに基づいて、各ブロックの輝度値から輝度係数を設定することができる。即ち、色度空間の色区域を考慮してホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整をより適正に行うことができる。
【0014】
請求項4に記載の発明は、請求項3に記載のホワイトバランス制御装置において、
前記色区域毎に設定された前記ホワイトバランス調整量の重み付けに係る色区域係数を記憶する色区域係数記憶手段と、
前記各ブロックの色度座標が属する色区域の色区域係数を前記色区域係数記憶手段から取得して設定する色区域係数設定手段と、を備え、
前記調整量設定手段は、さらに、前記色区域係数設定手段により設定された色区域係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴としている。
【0015】
請求項4に記載の発明によれば、請求項3に記載の発明と同様の効果が得られるのは無論のこと、特に、色区域毎に設定されたホワイトバランス調整量の重み付けに係る色区域係数を記憶する色区域係数記憶手段から、各ブロックの色度座標が属する色区域の色区域係数を取得して設定して、設定された色区域係数を考慮した色情報に基づいて、ホワイトバランス調整量を設定することができる。即ち、色区域係数を考慮してホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整をより適正に行うことができる。
【0016】
請求項5に記載の発明は、請求項2〜4の何れか一項に記載のホワイトバランス制御装置において、
前記ブロックの各々の色度座標に基づいて、前記ホワイトバランス調整量の重み付けに係る各ブロックの色度係数を設定する色度係数設定手段を備え、
前記調整量設定手段は、さらに、前記色度係数設定手段により設定された各ブロックの色度係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴としている。
【0017】
請求項5に記載の発明によれば、請求項2〜4に記載の発明と同様の効果が得られるのは無論のこと、特に、ブロックの各々の色度座標に基づいて、ホワイトバランス調整量の重み付けに係る各ブロックの色度係数を設定して、設定された各ブロックの色度係数を考慮した色情報に基づいて、ホワイトバランス調整量を設定することができる。即ち、色度係数を考慮してホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整をより適正に行うことができる。
【0018】
請求項6に記載の発明は、請求項4に記載のホワイトバランス制御装置において、
前記ブロックの各々の色度座標に基づいて、前記ホワイトバランス調整量の重み付けに係る各ブロックの色度係数を設定する色度係数設定手段と、
前記色度係数設定手段により設定された各ブロックの色度係数と、前記輝度係数設定手段により設定された各ブロックの輝度係数と、前記色区域係数設定手段により設定された色区域係数とに基づいて、無彩色点を判定する無彩色点判定手段と、
前記無彩色点判定手段により判定された無彩色点の前記色度座標に基づいて、前記色区域係数を前記色区域係数記憶手段から取得して再設定する色区域係数再設定手段と、を備え、
前記調整量設定手段は、さらに、前記色区域係数再設定手段により再設定された色区域係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴としている。
【0019】
請求項6に記載の発明によれば、請求項4に記載の発明と同様の効果が得られるのは無論のこと、特に、各ブロックの色度係数と、各ブロックの輝度係数と、色区域係数とに基づいて、無彩色点を判定することができる。さらに、判定された無彩色点の色度座標に基づいて、色区域係数を再設定して、再設定された色区域係数を考慮した色情報に基づいて、ホワイトバランス調整量を設定することができる。即ち、各ブロックの色度係数と各ブロックの輝度係数と色区域係数とを考慮して無彩色点の判定を適正に行うことができ、さらに、無彩色点の色度座標を考慮して色区域係数をより適正な値に再設定することができることとなって、再設定された色区域係数を用いてホワイトバランス調整量をより適正な値に設定することができる。
【0020】
請求項7に記載の発明は、請求項6に記載のホワイトバランス制御装置において、
前記色区域係数再設定手段により再設定された色区域係数に基づいて、前記無彩色点を再判定する再判定手段を備え、
前記調整量設定手段は、前記再判定手段にて再判定された無彩色点の前記色度座標に基づいて、前記ホワイトバランス調整量を設定することを特徴としている。
【0021】
請求項7に記載の発明によれば、請求項6に記載の発明と同様の効果が得られるのは無論のこと、特に、再設定された色区域係数に基づいて、無彩色点を再判定して、再判定された無彩色点の色度座標に基づいて、ホワイトバランス調整量を設定することができる。即ち、色区域係数を用いて無彩色点の再判定を適正に行うことができることとなって、再判定された無彩色点の色度座標を考慮してホワイトバランス調整量をより適正な値に設定することができる。
【0022】
請求項8に記載の発明は、請求項2〜7の何れか一項に記載のホワイトバランス制御装置において、
前記輝度係数設定手段は、前記色度空間における青色側の特定の範囲内に含まれる前記ブロックの輝度係数を、前記ブロックの輝度値が大きいほど小さく設定することを特徴としている。
【0023】
請求項8に記載の発明によれば、請求項2〜7に記載の発明と同様の効果が得られるのは無論のこと、特に、色度空間における青色側の特定の範囲内に含まれるブロックの輝度係数を、ブロックの輝度値が大きいほど小さく設定することができる。これにより、色度空間における青色側の特定の範囲内に含まれるブロックのホワイトバランス調整量に対する寄与度を小さくすることができ、画像の青色の部分(例えば、青空)の彩度を下げることがなくなって、ホワイトバランス調整が適正に施された画像を得ることができる。
【0024】
請求項9に記載の発明は、請求項2〜8の何れか一項に記載のホワイトバランス制御装置において、
前記輝度係数設定手段は、前記色度空間における青色側の特定の範囲以外の所定の範囲内に含まれる前記ブロックの輝度係数を、前記ブロックの輝度値が大きいほど大きく設定することを特徴としている。
【0025】
請求項9に記載の発明によれば、請求項2〜8に記載の発明と同様の効果が得られるのは無論のこと、特に、色度空間における青色側の特定の範囲以外の所定の範囲内に含まれるブロックの輝度係数を、ブロックの輝度値が大きいほど大きく設定することができる。これにより、色度空間における青色側の特定の範囲以外の所定の範囲内に含まれるブロックのホワイトバランス調整量に対する寄与度を大きくすることができ、画像の青色以外の部分、即ち、例えば白色の部分等の彩度を高めて、ホワイトバランス調整が適正に施された画像を得ることができる。
【0026】
請求項10に記載の発明は、請求項1〜9の何れか一項に記載のホワイトバランス制御装置を備える電子機器であって、
前記画像を撮像する撮像手段を備えることを特徴としている。
【0027】
請求項10に記載の発明によれば、画像を撮像する撮像手段を備える電子機器であっても、請求項1〜9に記載の発明と同様の効果を得ることができる。
【0028】
【発明の実施の形態】
以下に、本発明について、図面を用いて具体的な態様を説明する。ただし、発明の範囲は、図示例に限定されない。
図1は、本発明に係るホワイトバランス制御装置を備える電子機器の好適な一例として例示するデジタルカメラの要部構成を示すブロック図である。
【0029】
図1に示すように、デジタルカメラ100は、撮像部1、A/D変換回路2、画像用メモリ3、表示装置4、不揮発性メモリ5、RAM6、ROM7、CPU8、電源スイッチ9、レリーズスイッチ10、照明用光源11等を備えて構成されている。
【0030】
撮像部1は、光路上において被写体の光学像を結像する撮像レンズ1aと、撮像レンズ1aの合焦位置調整のために当該撮像レンズ1aを光軸方向に移動させる駆動モータ1bと、撮像レンズ1aにより結像された光学像を光電変換し、光電変換した画像信号(アナログ信号)をA/D変換回路2に出力する、例えばCCD(Charge Coupled Device)等の撮像素子1c(撮像手段)と、CPU8により開放量が制御されることで撮像素子1cに入射する光の量を調節する絞り部1dとを備えている。
【0031】
A/D変換回路2は、撮像素子1cから出力され入力されたアナログ信号をデジタル信号に変換し、変換したデジタル画像信号を画像用メモリ3に出力する。ここで、本実施の形態におけるA/D変換回路2は、撮像素子1cに入射した光の強度が大きいほど大きな値のデジタル画像信号に変換するものとする。
画像用メモリ3は、A/D変換回路2を介して入力されたデジタル画像信号を一時的に格納する。
表示装置4は、例えばLCD(Liquid Crystal Display)やEL(Electro Luminescence)ディスプレイ等により構成され、CPU8から出力され入力された表示信号に従って撮像画像や操作画面等を表示する。
不揮発性メモリ5は、例えばメモリカード等により構成され、画像用メモリ3に記憶されたデジタル画像信号のうち、CPU8の制御下にて各種の画像処理が施されたデジタル画像信号を記憶する。
【0032】
RAM(Random Access Memory)6は、例えば、揮発性の半導体メモリであり、CPU8が処理中のプログラム、データ等を一時的に記憶する作業領域を有している。
【0033】
ROM(Read Only Memory)7は、読み出し専用のメモリであり、CPU8により実行されるデジタルカメラ100としての各種の処理にかかるアプリケーションプログラムや、各種動作に使用するデータ等を記憶する。具体的には、ROM7は、調整量設定プログラム7aと、画像分割プログラム7bと、色度座標算出プログラム7cと、輝度値算出プログラム7dと、輝度係数設定プログラム7eと、無彩色点判定プログラム7fと、再判定プログラム7g等を記憶している。
【0034】
また、ROM7は、設定テーブル記憶手段を構成しており、色度平面S(色度空間(色空間):図3参照)が色度に応じて区切られた各光源領域(色区域)毎の輝度値と輝度係数とが対応付けられた輝度係数設定テーブルT1を記憶している。
さらに、ROM7は、各ブロックの色度座標と、ホワイトバランス調整量の重み付けに係る各ブロックの色度係数(図4及び図5参照)とが対応付けられた色度係数設定テーブルT2を記憶している。
また、ROM7は、色区域係数記憶手段を構成しており、各光源領域と、ホワイトバランス調整量の重み付けに係る光源領域係数(色区域係数)とが対応付けられた光源領域係数設定テーブルT3を記憶している。具体的には、光源領域係数設定テーブルT3として、第一の光源領域係数に係る第一の光源領域係数設定テーブルT31(図7参照)と、第二の光源領域係数に係る第二の光源領域係数設定テーブルT32(図8(a)〜図8(b)参照)とが挙げられる。
【0035】
CPU(Central Processing Unit)8は、ROM7に記憶されているデジタルカメラ100としての各種機能に関る各種アプリケーションプログラムを読み出してRAM6内の作業領域に展開し、当該プログラムに従って動画や静止画の撮像処理等の各種処理を実行する。
具体的には、撮像処理において、CPU8は、調整量設定手段として、調整量設定プログラム7aに従って、画像用メモリ3に格納されたデジタル画像信号に基づき、撮像画像G(図2(a)参照)の色データ(色情報)に基づいてホワイトバランス調整量を設定するホワイトバランス調整処理を行う。
【0036】
また、ホワイトバランス調整処理にて、CPU8は、画像分割手段として、画像分割プログラム7bに従って、画像用メモリ3に格納したデジタル画像信号に基づいて、撮像画像Gを複数(例えば、横:64×縦:48)のブロックに分割する(図2(b)参照)。
さらに、CPU8は、色座標算出手段として、色度座標算出プログラム7cに従って、デジタル画像信号のうち、分割された複数のブロックの各々に対応する信号に含まれる色データに基づいて、色度平面Sにおける各ブロックの色度座標を算出する。
【0037】
さらに、CPU8は、色度係数設定手段として、色度係数設定テーブルT2を用いて、ブロックの各々の色度座標に基づいてホワイトバランス調整量の重み付けに係る各ブロックの色度係数を設定する。
また、CPU8は、色区域係数設定手段として、各ブロックの色度座標が属する光源領域(色区域:光源領域H、光源領域M、光源領域L、光源領域F;図5参照)の色区域係数としての第一の光源領域係数を第一の光源領域係数設定テーブルT31から取得して設定する(図7参照)。
【0038】
さらに、CPU8は、輝度値算出手段として、輝度値算出プログラム7dに従って、複数のブロックの各々に対応する色データに基づいて、各ブロックの輝度値Yを算出する。
また、CPU8は、輝度係数設定手段として、輝度係数設定プログラム7eに従って、各ブロックの輝度値Yと各ブロックの色度座標とに基づいて、ホワイトバランス調整量の重み付けに係る各ブロックの輝度係数を設定する。即ち、CPU8は、各ブロックの色度座標から光源領域を特定し、ROM7に記憶されている輝度係数設定テーブルT1(図6参照)に基づいて、各ブロックの輝度値から輝度係数を設定する。
【0039】
さらに、CPU8は、無彩色点判定手段として、無彩色点判定プログラム7fに従って、各ブロックの色度係数と、光源領域に応じて設定された各ブロックの輝度係数と、第一の光源領域係数とに基づいて、色度平面Sにおける無彩色点を判定する。
【0040】
また、CPU8は、色区域係数再設定手段として、色度平面Sおける無彩色点の色度座標に基づいて、第二の光源領域係数設定テーブルT32から色区域係数としての第二の光源領域係数を取得して設定(再設定)する(図8参照)。
さらに、CPU8は、再判定手段として、再判定プログラム7gに従って、設定された第二の光源領域係数に基づいて無彩色点を再判定する。
【0041】
また、CPU8は、算出した無彩色点の色度座標に基づいて、ホワイトバランス調整量を算出して、この値を最終的なホワイトバランス調整量として設定する。
【0042】
電源スイッチ9は、ユーザの操作に基づいて、デジタルカメラ100の電源を投入或いは遮断するための指示信号を出力する。
レリーズスイッチ10は、ユーザの操作に基づいて、CPU8に撮像動作の開始を指示する指示信号を出力する。ここで、出力された指示信号がCPU8に入力されると、CPU8は、図示しないシャッター装置を駆動して画像の撮像を行うようになっている。
照明用光源11は、ストロボ等により構成され、CPU8から出力され入力された発光タイミング制御信号に従って照明補助用としての光を発光する。
【0043】
次に、CPU8の制御下におけるホワイトバランス調整処理について、図2〜図8を参照して説明する。
ここで、図2(a)は、デジタルカメラ100により撮像された画像Gを模式的に示した図であり、図2(b)は、撮像画像Gを複数のブロックに分割した状態を示すものである。また、図3は、ホワイトバランス調整処理に係る色度平面Sを複数のセルに分割した状態を模式的に示した図であり、図4は、複数のセルに分割された色度平面Sにおける黒体輻射軌跡BLを模式的に示した図であり、図5は、複数のセルに分割された色度平面S内にて設定された光源領域を模式的に示した図である。なお、図4及び図5の色度平面S内に記載された各数値は、色度係数を表している。
また、図6(a)及び図6(b)は、ホワイトバランス調整処理に係る輝度係数設定テーブルT1を模式的に示した図である。さらに、図7は、ホワイトバランス調整処理に係る第一の光源領域係数設定テーブルT31を模式的に示した図であり、図8(a)〜図8(d)は、ホワイトバランス調整処理に係る第二の光源領域係数設定テーブルT32を模式的に示した図である。
【0044】
CPU8は、被写体の撮像処理中に、撮像された画像G(図2(a)参照)のホワイトバランス調整処理を実行するようになっている。
このホワイトバランス調整処理において、CPU8は、ROM7から調整量設定プログラム7aを読み出してRAM6に展開し、この調整量設定プログラム7aに基づいて、当該撮像処理において取得して画像用メモリ3に格納したデジタル画像信号に基づいて、撮像画像Gのホワイトバランス調整量を設定する。
以下に、CPU8の制御下におけるホワイトバランス調整量の算出方法について詳細に説明する。
【0045】
先ず、CPU8は、ROM7から画像分割プログラム7bを読み出してRAM6に展開し、この画像分割プログラム7bに従って、画像用メモリ3に格納したデジタル画像信号に基づく1フレームの画像G1を、例えば横:64×縦:48のブロックに分割する(図2(b)参照)。
【0046】
次に、CPU8は、ROM7から色度座標算出プログラム7cを読み出してRAM6に展開し、この色度座標算出プログラム7cに従って、各ブロックの色データに基づいて、色度平面S(図3参照)における各ブロックの色度座標を算出する。
具体的には、CPU8は、先ず、図示しないRGB分離回路によってデジタル画像信号をR、G、Bの3成分に分離し、各ブロック毎にR、G、B信号の平均値(R、G、B)を算出する。なお、このとき、飽和した画素を検出し、飽和画素については平均値の算出には用いないものとする。
続けて、CPU8は、所定の演算プログラムに従って、算出したブロック毎のR、G、B平均値(R、G、B)に、色度座標を調整するための基準(例えば、D50)のRGBゲインを乗算して、各画素のR’、G’、B’データ(R’、G’、B’)を算出する。
ここで、
R’=gR_D50×R
G’=gG_D50×G
B’=gB_D50×B
とする。
そして、CPU8は、所定の演算プログラムに従って、各画素のR’、G’、B’データを用いて色度値を算出し、その値を各ブロック毎の色度座標とする。即ち、縦軸:g=G/(R+G+B)、横軸:r=R/(R+G+B)の色度平面Sにおける色度値として、
r=R’/(R’+G’+B’)
g=G’/(R’+G’+B’)
を算出する。
【0047】
<第一の評価>
次に、CPU8は、色度平面Sにおける無彩色点を判定する第一の評価を行う。
この第一の評価として、具体的には、CPU8は、先ず、色度平面Sを、例えば横:32×縦:16のセルに分割して(図3参照)、色度平面S内にて所定の光源(例えば、太陽光)下にて表現される黒体輻射軌跡BL(図4参照)に基づいて、複数のセルのうちの所定数のセルが属する光源領域として、例えば光源領域H、光源領域M、光源領域L、光源領域Fの4つを設定する(図5参照)。
【0048】
そして、CPU8は、ROM7に記憶されている色度係数設定テーブルT2を用いて、各ブロックの色度座標に基づいて各ブロックの色度係数を設定する。ここで、色度係数設定テーブルT2には、各ブロックに対応する複数のセルのうちの各光源領域内に存するセルの色度係数のみが、例えば黒体輻射軌跡BLからの距離に応じて設定されている。即ち、光源領域内に存するセル以外のセルに対しては、色度係数として0「ゼロ」が設定されている。
次に、CPU8は、ROM7に記憶されている第一の光源領域係数設定テーブルT31を用いて、光源領域毎に第一の光源領域係数を設定する。具体的には、図7に示すように、CPU8は、例えば、光源領域Hの光源領域係数として0.2を、光源領域Mの光源領域係数として0.4を、光源領域Lの光源領域係数として0.2を、光源領域Fの光源領域係数として0.2をそれぞれ設定する。
【0049】
そして、CPU8は、ROM7から輝度値算出プログラム7dを読み出してRAM6に展開し、この輝度値算出プログラム7dに従って、各ブロックに対応する色データに基づいて、各ブロックの輝度値Yを算出する。具体的には、CPU8は、各ブロックの(R’、G’、B’)データに基づいて、
Y=0.3×R+0.6×G+0.1×B
の式を用いて各ブロックの輝度値Yを算出する。
続けて、CPU8は、ROM7から輝度係数設定プログラム7eを読み出してRAM6に展開し、この輝度係数設定プログラム7eに従って、各ブロックの輝度値Yと各ブロックの色度平面Sにおける色度座標とに基づいて、ホワイトバランス調整量の重み付けに係る各ブロックの輝度係数を設定する。具体的には、CPU8は、各ブロックの色度座標から光源領域を特定し、ROM7に記憶されている輝度係数設定テーブルT1に基づいて、各ブロックの輝度値から輝度係数を設定するようになっている。これにより、例えば、図6(b)に示すように、光源領域H(色度空間における青色側の特定の範囲)内の色度座標に対応するブロックの輝度係数は、それらブロックの輝度値が大きいほど小さくなるように設定され、また、図6(a)に示すように、光源領域F、M、L(色度空間における青色側の特定の範囲以外の所定の範囲)内の色度座標に対応するブロックの輝度係数は、それらブロックの輝度値が大きいほど大きくなるように設定される。
【0050】
次に、CPU8は、ROM7から無彩色点判定プログラム7fを読み出してRAM6に展開し、この無彩色点判定プログラム7fに従って、各ブロックの色度係数と、光源領域に応じて設定された各ブロックの輝度係数と、光源領域係数とに基づいて、色度平面Sにおける無彩色点を判定する。
具体的には、先ず、CPU8は、所定の演算プログラムに従って、各ブロックの(R’、G’、B’)データに色度係数と輝度係数とを乗算し、続けて、係数が乗算された(R’、G’、B’)データを光源領域毎に積算する。
ここで、算出された各光源領域の(R’、G’、B’)データの積算値を、
光源領域Hの積算値:(R_sum_H、G_sum_H、B_sum_H)
光源領域Mの積算値:(R_sum_M、G_sum_M、B_sum_M)
光源領域Lの積算値:(R_sum_L、G_sum_L、B_sum_L)
光源領域Fの積算値:(R_sum_F、G_sum_F、B_sum_F)
とする。
そして、CPU8は、所定の演算プログラムに従って、各光源領域の(R’、G’、B’)データの積算値を光源領域係数によって加重積分して、画像全体の積分結果を算出する。
ここで、算出された画像全体の積分結果を、
(R_sum1、G_sum1、B_sum1)
とする。
続けて、CPU8は、所定の演算プログラムに従って、算出された画像全体の積分結果(R_sum1、G_sum1、B_sum1)を用いて色度値を算出して、その値を画像の無彩色点とする。即ち、色度値として、
r_sum1=R_sum1/(R_sum1+G_sum1+B_sum1)
g_sum1=G_sum1/(R_sum1+G_sum1+B_sum1)
を算出する。
【0051】
<第二の評価>
次に、CPU8は、第一の評価にて判定された無彩色点を再判定する第二の評価を行う。
この第二の評価として、具体的には、CPU8、先ず、色度平面Sにおける無彩色点の色度座標に基づいて、第二の光源領域係数設定テーブルT32から第二の光源領域係数を取得して設定する。
即ち、CPU8は、例えば、無彩色点の色度座標が色度平面S内にて6000Kよりも高色温度側の範囲に存する場合には、光源領域Hに対応する係数が大きく、且つ、光源領域Lに対応する係数が0「ゼロ」となるように第二の光源領域係数を再設定し(図8(a)参照)、また、無彩色点の色度座標が色度平面S内にて3000Kよりも低色温度側の範囲に存する場合には、光源領域Lに対応する係数が大きく、且つ、光源領域Hに対応する係数が0「ゼロ」となるように第二の光源領域係数を再設定する(図8(b)参照)。また、CPU8は、上記以外の場合には、光源領域Mに対応する係数が大きくなるように第二の光源領域係数を再設定するようになっているが(図8(c)参照)、撮像画像が蛍光灯下にて撮像された画像である可能性が高いと判断した場合には、光源領域Fに対応する係数が大きくなるように第二の光源領域係数を再設定する(図8(d)参照)。
なお、CPU8は、撮像画像が蛍光灯下にて撮像された画像である可能性の判断を、例えば、所定のプログラムに従って、無彩色点の色度座標と自然光源下における黒体輻射軌跡BLとを比較することで、縦軸方向(+g方向)に対するズレ量が所定値よりも大きいか否かにより行うようになっている。
【0052】
次に、CPU8は、ROM7から再判定プログラム7gを読み出してRAM6に展開し、この再判定プログラム7gに従って、上記のようにして再設定された第二の光源領域係数に基づいて、無彩色点を再判定する。
具体的には、CPU8は、先ず、所定の演算プログラムに従って、各光源領域の(R’、G’、B’)データの積算値を、再設定された光源領域係数によって加重積分して、画像全体の積分結果を算出する。
ここで、算出された画像全体の積分結果を、
(R_sum2、G_sum2、B_sum2)
とする。
続けて、CPU8は、所定の演算プログラムに従って、算出された画像全体の積分結果(R_sum2、G_sum2、B_sum2)を用いて色度値を算出して、その値を画像の無彩色点とする。即ち、色度値として、
r_sum2=R_sum2/(R_sum2+G_sum2+B_sum2)
g_sum2=G_sum2/(R_sum2+G_sum2+B_sum2)
を算出する。
【0053】
次に、CPU8は、所定の演算プログラムに従って、算出した無彩色点のRGB信号がR:G:B=1:1:1となるようにホワイトバランス調整量を算出して、この値を最終的なホワイトバランス調整量として設定する。
ここで、算出されたホワイトバランス調整量を、
Rgain=g_sum2/r_sum2
Bgain=g_sum2/b_sum2
とする。なお、b_sum2=1−g_sum2−r_sum2とする。
【0054】
そして、CPU8は、上記のようにして設定されたホワイトバランス調整量を用いて撮像画像Gにホワイトバランス調整処理を施して不揮発性メモリ5に記憶する。
【0055】
以上のように、本実施の形態のデジタルカメラ100によれば、各ブロックの輝度値と、各ブロックの色度平面Sにおける色度座標とに基づいて、ホワイトバランス調整量の重み付けに係る各ブロックの輝度係数を設定するので、各ブロックの輝度係数を各ブロックの輝度値と各ブロックの色度平面Sにおける色度座標とを考慮したものとすることができる。
具体的には、CPU8は、各ブロックの色度座標から光源領域を特定して、光源領域毎の輝度値と輝度係数とが対応付けられた輝度係数設定テーブルT1に基づいて、各ブロックの輝度値から輝度係数を設定することができる。例えば、光源領域H内の色度座標に対応するブロックの輝度係数を、それらブロックの輝度値が大きいほど小さくなるように設定するので、光源領域Hに対応するブロックのホワイトバランス調整量に対する寄与度を小さくすることができ、画像Gのうち、例えば青空等の青色の部分の彩度を下げることがなくなる。また、光源領域F、M、L内の色度座標に対応するブロックの輝度係数を、それらブロックの輝度値が大きいほど大きくなるように設定するので、光源領域F、M、Lに対応するブロックのホワイトバランス調整量に対する寄与度を大きくすることができ、画像Gのうち、例えば白色の部分等の彩度を高めることができる。
従って、各ブロックの輝度係数を考慮した色データに基づいてホワイトバランス調整量を適正に設定することができる。
【0056】
即ち、本実施の形態によれば、上記のようにして設定された輝度係数と、光源領域毎のホワイトバランス調整量の重み付けに係る第一の光源領域係数と、ブロックの各々のホワイトバランス調整量の重み付けに係る色度係数とに基づいて、画像の無彩色点を判定することができる。
さらに、無彩色点の色度座標を考慮して第二の光源領域係数をより適正な値に再設定することができる。
また、再設定された第二の光源領域係数を用いて無彩色点の再判定を適正に行うことができ、再判定された無彩色点の色度座標に基づいて、ホワイトバランス調整量を設定することができる。
このようにして、撮像画像Gのホワイトバランス調整量をより適正な値に設定することができることとなって、画像のホワイトバランス調整を従来よりも適正に行うことができ、画像の色合いをより自然なものとすることができる。
【0057】
<色空間の変形例>
上記実施の形態では、色空間として色度平面Sを例示したが、これに限られるものではなく、画像の無彩色点の検出に用いることができる色空間であれば良く、例えば、図9(a)に示す色差信号(R−Y)、(B−Y)を座標軸とする色空間や、図9(b)に示す色差信号(R−G)、(B−G)を座標軸とする色空間や、図9(c)に示すR信号とG信号との比R/G、B信号とG信号との比B/Gを座標軸とする色空間等が挙げられる。これらの場合、例えば、各色空間において、黒体輻射軌跡BLに基づいて所定の大きさの矩形状の領域S1、S2、S3を設定し、各領域S1、S2、S3内に存する画像の色座標に基づいて設定されたホワイトバランス調整量の重み付け係数を用いて、画像の無彩色点を検出するような構成となっている。
【0058】
なお、本発明は、上記実施の形態に限定されることなく、本発明の趣旨を逸脱しない範囲において、種々の改良並びに設計の変更を行っても良い。
例えば、輝度係数、光源領域係数及び色度係数の具体的な値は、例えば画像や光源等の種類に応じて適宜任意に変更可能となっていることは勿論である。
また、上記実施の形態では、光源領域Hに対応するブロックの輝度係数を設定し、且つ、光源領域F、M、Lに対応するブロックの輝度係数を設定するような構成としたが、これら輝度係数の設定は常時両方とも行う必要はなく、例えば画像や光源等の種類によっては、何れか片方のみを設定する構成であっても良い。
さらに、上記実施の形態では、電子機器としてデジタルカメラ100を例示したが、これに限られるものではなく、画像Gを撮像する撮像手段を備える電子機器であれば如何なるものであっても良い。
また、設定テーブル記憶手段や色区域係数記憶手段としてROM7を例示したが、これに限られるものではなく、例えば、電気的に書き換え可能な記憶手段であっても良く、これにより、ユーザは必要に応じて輝度係数設定テーブルT1や第一の光源領域係数設定テーブルT31や第二の光源領域係数設定テーブルT32の内容を変更することができる。また、同様に、色度係数設定テーブルT2の内容も変更することもできる。
【0059】
【発明の効果】
請求項1に記載の発明によれば、画像の輝度値と、画像の色空間における色座標とに基づいて設定された輝度係数を考慮した色情報に基づいて、ホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整を従来よりも適正に行うことができることとなって、画像の色合いをより自然なものとすることができる。
【0060】
請求項2に記載の発明によれば、各ブロックの輝度係数を考慮した色情報に基づいて、ホワイトバランス調整量をより適正な値に設定することができる。
【0061】
請求項3に記載の発明によれば、色度空間の色区域を考慮してホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整をより適正に行うことができる。
【0062】
請求項4に記載の発明によれば、色区域係数を考慮してホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整をより適正に行うことができる。
【0063】
請求項5に記載の発明によれば、色度係数を考慮してホワイトバランス調整量を適正な値に設定することができ、画像のホワイトバランス調整をより適正に行うことができる。
【0064】
請求項6に記載の発明によれば、各ブロックの色度係数と各ブロックの輝度係数と色区域係数とを考慮して無彩色点の判定を適正に行うことができ、さらに、無彩色点の色度座標を考慮して色区域係数をより適正な値に再設定することができることとなって、再設定された色区域係数を用いてホワイトバランス調整量をより適正な値に設定することができる。
【0065】
請求項7に記載の発明によれば、色区域係数を用いて無彩色点の再判定を適正に行うことができることとなって、再判定された無彩色点の色度座標を考慮してホワイトバランス調整量をより適正な値に設定することができる。
【0066】
請求項8に記載の発明によれば、色度空間における青色側の特定の範囲内に含まれるブロックのホワイトバランス調整量に対する寄与度を小さくすることができ、画像の青色の部分(例えば、青空)の彩度を下げることがなくなって、ホワイトバランス調整が適正に施された画像を得ることができる。
【0067】
請求項9に記載の発明によれば、色度空間における青色側の特定の範囲以外の所定の範囲内に含まれるブロックのホワイトバランス調整量に対する寄与度を大きくすることができ、画像の青色以外の部分、即ち、例えば白色の部分等の彩度を高めて、ホワイトバランス調整が適正に施された画像を得ることができる。
【0068】
請求項10に記載の発明によれば、電子機器は画像を撮像する撮像手段を備えるので、請求項1〜9に記載の発明と同様の効果を得ることができる。
【図面の簡単な説明】
【図1】本発明に係るホワイトバランス制御装置を備える電子機器の好適な一例として例示するデジタルカメラの要部構成を示すブロック図である。
【図2】図1のデジタルカメラにより撮像された画像を模式的に示した図である。
【図3】図1のデジタルカメラによるホワイトバランス調整処理に係る色度平面を複数のセルに分割した状態を模式的に示した図である。
【図4】図3の複数のセルに分割された色度平面における黒体輻射軌跡を模式的に示した図である。
【図5】図3の複数のセルに分割された色度平面内にて設定された光源領域を模式的に示した図である。
【図6】図1のデジタルカメラによるホワイトバランス調整処理に係る輝度係数設定テーブルを模式的に示した図である。
【図7】図1のデジタルカメラによるホワイトバランス調整処理に係る第一の光源領域係数設定テーブルを模式的に示した図である。
【図8】図1のデジタルカメラによるホワイトバランス調整処理に係る第二の光源領域係数設定テーブルを模式的に示した図である。
【図9】色空間の変形例を模式的に示した図である。
【符号の説明】
100 デジタルカメラ(電子機器)
1c 撮像素子(撮像手段)
7 ROM(ホワイトバランス制御装置、設定テーブル記憶手段、色区域係数記憶手段)
8 CPU(ホワイトバランス制御装置、調整量設定手段、画像分割手段、色座標算出手段、輝度値算出手段、輝度係数設定手段、色区域係数設定手段、色度係数設定手段、無彩色点判定手段、色区域係数再設定手段、再判定手段)
G 画像
S 色度平面(色空間)
H、M、L、F 光源領域(色区域)
T1 輝度係数設定テーブル[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a white balance control device and an electronic apparatus.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, some digital cameras perform white balance adjustment that automatically adjusts an output signal of a subject so that a captured white subject matches a human appearance.
The white balance adjustment methods are roughly classified into an external measurement method and a TTL (Through The Lens) method, and the latter is further divided into a full screen average method and an achromatic color detection method.
[0003]
Among the above, the TTL achromatic detection method has become the mainstream of white balance adjustment. Specifically, an achromatic region such as white or gray is extracted from the image, and the color difference of that portion is detected. This is a method of correcting so as to be 0 “zero”. Here, as a method for extracting (detecting) an achromatic region, for example, a method for determining a pixel near a black body radiation locus on the chromaticity plane as an achromatic color using chromaticity information of an image has been proposed. (For example, see Patent Document 1)
The achromatic color detection method generally integrates the chromaticity information of pixels determined to be achromatic color, and corrects the color tone so that RGB of the integrated value becomes R: G: B = 1: 1: 1. It has become.
However, in the above case, if a white or gray subject illuminated by a light source and a chromatic subject located near the black body radiation locus are mixed, not only an achromatic subject but also a chromatic subject. The chromaticity information of the pixels is also integrated, and the color tone is corrected so as to lower the saturation of the chromatic subject, making it difficult to adjust the white balance appropriately.
[0004]
Therefore, a white balance control device that uses the luminance value of a pixel for white balance adjustment has been proposed, and the white balance is integrated by performing a weighting process that increases the weight of the white balance adjustment amount as the luminance value of the pixel increases. The adjustment amount is calculated (for example, see Patent Document 2).
[0005]
[Patent Document 1]
JP 2002-112282 A
[Patent Document 2]
Japanese Patent Laid-Open No. 2002-232906
[0006]
[Problems to be solved by the invention]
By the way, for example, in a scene where a blue sky enters a part of the imaging area of the imaging device, the luminance value of the pixel corresponding to the blue sky part often becomes equal to or higher than the average value of the luminance values of all the pixels in the imaging area. This is particularly noticeable in scenes like semi-backlight.
However, in the above case, as in
As described above, it is not possible to calculate the optimal white balance adjustment amount by simply performing weighting and integration so that the weight of the white balance adjustment amount increases as the luminance value of the pixel increases. Adjustment could not be performed properly.
[0007]
An object of the present invention is to provide a white balance control device and an electronic apparatus that can appropriately adjust the white balance of an image and thereby can make the color of the image more natural.
[0008]
[Means for Solving the Problems]
The invention according to
Color coordinate calculation means for calculating color coordinates in a color space of the image based on color information of the image information;
A luminance value calculating means for calculating a luminance value of the image based on the color information;
A luminance coefficient setting for setting a luminance coefficient related to the weighting of the white balance adjustment amount based on the luminance value of the image calculated by the luminance value calculating unit and the color coordinate of the image calculated by the color coordinate calculating unit Means, and
The adjustment amount setting means sets the white balance adjustment amount based on color information considering the luminance coefficient set by the luminance coefficient setting means.
[0009]
According to the first aspect of the present invention, the white balance adjustment amount is weighted based on the luminance value of the image calculated by the luminance value calculating unit and the color coordinate of the image calculated by the color coordinate calculating unit. Luminance coefficient setting means for setting the luminance coefficient is provided, and the adjustment amount setting means sets the white balance adjustment amount based on the color information considering the luminance coefficient set by the luminance coefficient setting means. That is, the white balance adjustment amount can be set to an appropriate value based on the color information considering the luminance coefficient set based on the luminance value of the image and the color coordinates in the color space of the image, White balance adjustment can be performed more appropriately than before, and the color of the image can be made more natural.
[0010]
The invention according to
Image dividing means for dividing the image into a plurality of blocks;
The color coordinate calculation means calculates chromaticity coordinates of each block in the chromaticity space based on color information of a portion corresponding to each of a plurality of blocks divided by the image division means in the image information. ,
The luminance value calculating means calculates a luminance value of each block based on the color information corresponding to each of the plurality of blocks,
The luminance coefficient setting unit weights the white balance adjustment amount based on the luminance value of each block calculated by the luminance value calculating unit and the chromaticity coordinate of each block calculated by the color coordinate calculating unit. Set the luminance coefficient of each block related to
The adjustment amount setting means sets the white balance adjustment amount based on color information considering the luminance coefficient of each block set by the luminance coefficient setting means.
[0011]
According to the second aspect of the present invention, it is possible to obtain the same effect as the first aspect of the invention, in particular, based on the luminance value of each block and the chromaticity coordinates of each block. The luminance coefficient of each block related to the weighting of the white balance adjustment amount can be set, and the white balance adjustment amount can be set to a more appropriate value based on the color information considering the luminance coefficient of each block.
[0012]
According to a third aspect of the present invention, in the white balance control device according to the second aspect,
A setting table storage unit that stores a luminance coefficient setting table in which a luminance value and a luminance coefficient are associated with each color area in which the chromaticity space is divided according to chromaticity;
The luminance coefficient setting means specifies a color area from the chromaticity coordinates of each block, and sets the luminance coefficient from the luminance value of each block based on the luminance coefficient setting table stored in the setting table storage means. It is characterized by.
[0013]
According to the third aspect of the invention, it is possible to obtain the same effect as the second aspect of the invention, and in particular, the chromaticity space is divided according to the chromaticity from the chromaticity coordinates of each block. The specified color area is specified, and the brightness coefficient can be set from the brightness value of each block based on the brightness coefficient setting table in which the brightness value and the brightness coefficient for each color area are associated with each other. That is, the white balance adjustment amount can be set to an appropriate value in consideration of the color area of the chromaticity space, and the white balance adjustment of the image can be performed more appropriately.
[0014]
The invention according to
A color area coefficient storage means for storing a color area coefficient related to the weighting of the white balance adjustment amount set for each color area;
Color gamut coefficient setting means for obtaining and setting the color gamut coefficient of the color gamut to which the chromaticity coordinate of each block belongs from the color gamut coefficient storage means, and
The adjustment amount setting means is further characterized in that the white balance adjustment amount is set based on color information in consideration of the color area coefficient set by the color area coefficient setting means.
[0015]
According to the invention described in
[0016]
The invention according to
Chromaticity coefficient setting means for setting a chromaticity coefficient of each block related to the weighting of the white balance adjustment amount based on the chromaticity coordinates of each of the blocks;
The adjustment amount setting means is further characterized in that the white balance adjustment amount is set based on color information in consideration of the chromaticity coefficient of each block set by the chromaticity coefficient setting means.
[0017]
According to the invention described in
[0018]
According to a sixth aspect of the present invention, in the white balance control device according to the fourth aspect,
Chromaticity coefficient setting means for setting the chromaticity coefficient of each block related to the weighting of the white balance adjustment amount based on the chromaticity coordinates of each of the blocks;
Based on the chromaticity coefficient of each block set by the chromaticity coefficient setting means, the luminance coefficient of each block set by the luminance coefficient setting means, and the color area coefficient set by the color area coefficient setting means Achromatic point judging means for judging the achromatic point,
Color area coefficient resetting means for obtaining the color area coefficient from the color area coefficient storage means and resetting the color area coefficient based on the chromaticity coordinates of the achromatic color point determined by the achromatic color point determination means. ,
The adjustment amount setting means is further characterized in that the white balance adjustment amount is set based on color information in consideration of the color area coefficient reset by the color area coefficient resetting means.
[0019]
According to the invention described in
[0020]
The invention according to
Re-determination means for re-determining the achromatic color point based on the color area coefficient reset by the color area coefficient resetting means;
The adjustment amount setting means sets the white balance adjustment amount based on the chromaticity coordinates of the achromatic color point re-determined by the re-determination means.
[0021]
According to the seventh aspect of the present invention, the same effect as that of the sixth aspect of the invention can be obtained. In particular, the achromatic color point is re-determined based on the reset color gamut coefficient. Thus, the white balance adjustment amount can be set based on the chromaticity coordinates of the achromatic color point determined again. In other words, the achromatic color point can be re-determined using the color area coefficient, and the white balance adjustment amount is set to a more appropriate value in consideration of the chromaticity coordinates of the re-determined achromatic color point. Can be set.
[0022]
The invention according to
The luminance coefficient setting means is characterized in that the luminance coefficient of the block included in a specific range on the blue side in the chromaticity space is set to be smaller as the luminance value of the block is larger.
[0023]
According to the eighth aspect of the invention, it is possible to obtain the same effect as that of the second to seventh aspects of the invention, in particular, a block included in a specific range on the blue side in the chromaticity space. Can be set smaller as the luminance value of the block increases. Thereby, the contribution to the white balance adjustment amount of the block included in the specific range on the blue side in the chromaticity space can be reduced, and the saturation of the blue portion (for example, blue sky) of the image can be reduced. Thus, it is possible to obtain an image appropriately adjusted for white balance.
[0024]
The invention according to
The luminance coefficient setting means sets the luminance coefficient of the block included in a predetermined range other than the specific range on the blue side in the chromaticity space as the luminance value of the block increases. .
[0025]
According to the ninth aspect of the present invention, it is possible to obtain the same effect as that of the second to eighth aspects of the invention, in particular, a predetermined range other than the specific range on the blue side in the chromaticity space. The luminance coefficient of the block included in the block can be set larger as the luminance value of the block is larger. As a result, the degree of contribution to the white balance adjustment amount of the block included in a predetermined range other than the specific range on the blue side in the chromaticity space can be increased. It is possible to obtain an image in which white balance adjustment is appropriately performed by increasing the saturation of a portion or the like.
[0026]
Invention of
An image pickup means for picking up the image is provided.
[0027]
According to the tenth aspect of the present invention, even an electronic device including an image pickup unit that picks up an image can obtain the same effects as those of the first to ninth aspects of the invention.
[0028]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, specific embodiments of the present invention will be described with reference to the drawings. However, the scope of the invention is not limited to the illustrated examples.
FIG. 1 is a block diagram illustrating a main configuration of a digital camera exemplified as a preferred example of an electronic apparatus including a white balance control device according to the present invention.
[0029]
As shown in FIG. 1, the
[0030]
The
[0031]
The A /
The
The
The
[0032]
A RAM (Random Access Memory) 6 is, for example, a volatile semiconductor memory, and has a work area for temporarily storing a program, data, and the like being processed by the
[0033]
A ROM (Read Only Memory) 7 is a read-only memory, and stores application programs related to various processes performed by the
[0034]
Further, the
Further, the
The
[0035]
A CPU (Central Processing Unit) 8 reads out various application programs related to various functions as the
Specifically, in the imaging process, the
[0036]
Further, in the white balance adjustment process, the
Further, the
[0037]
Further, the
Further, the
[0038]
Further, the
Further, the
[0039]
Further, the
[0040]
Further, the
Further, the
[0041]
Further, the
[0042]
The
The
The
[0043]
Next, the white balance adjustment process under the control of the
Here, FIG. 2A is a diagram schematically illustrating an image G captured by the
FIGS. 6A and 6B are diagrams schematically showing a luminance coefficient setting table T1 related to white balance adjustment processing. Further, FIG. 7 is a diagram schematically showing the first light source region coefficient setting table T31 related to the white balance adjustment processing, and FIGS. 8A to 8D are related to the white balance adjustment processing. It is the figure which showed typically the 2nd light source area | region coefficient setting table T32.
[0044]
The
In this white balance adjustment process, the
Hereinafter, a method for calculating the white balance adjustment amount under the control of the
[0045]
First, the
[0046]
Next, the
Specifically, the
Subsequently, the
here,
R ′ = gR_D50 × R
G ′ = gG_D50 × G
B ′ = gB_D50 × B
And
Then, the
r = R ′ / (R ′ + G ′ + B ′)
g = G ′ / (R ′ + G ′ + B ′)
Is calculated.
[0047]
<First evaluation>
Next, the
Specifically, as the first evaluation, the
[0048]
Then, the
Next, the
[0049]
Then, the
Y = 0.3 × R + 0.6 × G + 0.1 × B
Is used to calculate the luminance value Y of each block.
Subsequently, the
[0050]
Next, the
Specifically, first, the
Here, the calculated integrated value of the (R ′, G ′, B ′) data of each light source region,
Integrated value of light source region H: (R_sum_H, G_sum_H, B_sum_H)
Integrated value of light source region M: (R_sum_M, G_sum_M, B_sum_M)
Integrated value of light source region L: (R_sum_L, G_sum_L, B_sum_L)
Integrated value of light source region F: (R_sum_F, G_sum_F, B_sum_F)
And
Then, the
Here, the integration result of the entire image calculated is
(R_sum1, G_sum1, B_sum1)
And
Subsequently, the
r_sum1 = R_sum1 / (R_sum1 + G_sum1 + B_sum1)
g_sum1 = G_sum1 / (R_sum1 + G_sum1 + B_sum1)
Is calculated.
[0051]
<Second evaluation>
Next, the
Specifically, as the second evaluation, the
That is, for example, when the chromaticity coordinate of the achromatic color point is in the range on the higher color temperature side than 6000 K in the chromaticity plane S, the
The
[0052]
Next, the
Specifically, the
Here, the integration result of the entire image calculated is
(R_sum2, G_sum2, B_sum2)
And
Subsequently, the
r_sum2 = R_sum2 / (R_sum2 + G_sum2 + B_sum2)
g_sum2 = G_sum2 // (R_sum2 + G_sum2 + B_sum2)
Is calculated.
[0053]
Next, the
Here, the calculated white balance adjustment amount is
Rgain = g_sum2 / r_sum2
Bgain = g_sum2 / b_sum2
And Note that b_sum2 = 1−g_sum2-r_sum2.
[0054]
Then, the
[0055]
As described above, according to the
Specifically, the
Accordingly, the white balance adjustment amount can be appropriately set based on the color data considering the luminance coefficient of each block.
[0056]
That is, according to the present embodiment, the luminance coefficient set as described above, the first light source region coefficient relating to the weighting of the white balance adjustment amount for each light source region, and the white balance adjustment amount of each block The achromatic color point of the image can be determined based on the chromaticity coefficient related to the weighting.
Furthermore, the second light source area coefficient can be reset to a more appropriate value in consideration of the chromaticity coordinates of the achromatic color point.
In addition, the achromatic color point can be re-determined properly using the reset second light source area coefficient, and the white balance adjustment amount is set based on the chromaticity coordinates of the re-determined achromatic color point. can do.
In this way, the white balance adjustment amount of the captured image G can be set to a more appropriate value, the white balance adjustment of the image can be performed more appropriately than before, and the color of the image can be made more natural. Can be.
[0057]
<Modification of color space>
In the above embodiment, the chromaticity plane S is exemplified as the color space. However, the present invention is not limited to this, and any color space that can be used for detecting an achromatic color point of an image may be used. The color space having the color difference signals (R−Y) and (B−Y) shown in a) as coordinate axes, and the color having the color difference signals (R−G) and (B−G) shown in FIG. 9B as coordinate axes. Examples thereof include a space, a color space having a ratio R / G between the R signal and the G signal and a ratio B / G between the B signal and the G signal as coordinate axes shown in FIG. In these cases, for example, in each color space, rectangular areas S1, S2, and S3 having a predetermined size are set based on the black body radiation locus BL, and the color coordinates of the images existing in the areas S1, S2, and S3 are set. The achromatic color point of the image is detected using the weighting coefficient of the white balance adjustment amount set based on the above.
[0058]
The present invention is not limited to the above embodiment, and various improvements and design changes may be made without departing from the spirit of the present invention.
For example, the specific values of the luminance coefficient, the light source region coefficient, and the chromaticity coefficient can be arbitrarily changed as appropriate according to the type of image, light source, and the like.
In the above embodiment, the luminance coefficient of the block corresponding to the light source region H is set, and the luminance coefficient of the block corresponding to the light source region F, M, L is set. It is not necessary to always set both coefficients. For example, depending on the type of image or light source, only one of the coefficients may be set.
Furthermore, in the above embodiment, the
Further, the
[0059]
【The invention's effect】
According to the first aspect of the invention, the white balance adjustment amount is set to an appropriate value based on the color information considering the luminance coefficient set based on the luminance value of the image and the color coordinate in the color space of the image. Therefore, the white balance adjustment of the image can be performed more appropriately than before, and the color of the image can be made more natural.
[0060]
According to the second aspect of the present invention, the white balance adjustment amount can be set to a more appropriate value based on the color information in consideration of the luminance coefficient of each block.
[0061]
According to the third aspect of the invention, the white balance adjustment amount can be set to an appropriate value in consideration of the color area of the chromaticity space, and the white balance adjustment of the image can be performed more appropriately.
[0062]
According to the fourth aspect of the invention, the white balance adjustment amount can be set to an appropriate value in consideration of the color area coefficient, and the white balance adjustment of the image can be performed more appropriately.
[0063]
According to the fifth aspect of the present invention, the white balance adjustment amount can be set to an appropriate value in consideration of the chromaticity coefficient, and the white balance adjustment of the image can be performed more appropriately.
[0064]
According to the invention described in
[0065]
According to the seventh aspect of the present invention, the achromatic color point can be re-determined appropriately using the color area coefficient, and the white color is considered in consideration of the chromaticity coordinates of the re-determined achromatic color point. The balance adjustment amount can be set to a more appropriate value.
[0066]
According to the eighth aspect of the present invention, it is possible to reduce the contribution to the white balance adjustment amount of the block included in the specific range on the blue side in the chromaticity space, and to reduce the blue portion (for example, blue sky) of the image ) Is not lowered, and an image with appropriate white balance adjustment can be obtained.
[0067]
According to the ninth aspect of the present invention, it is possible to increase the contribution to the white balance adjustment amount of a block included in a predetermined range other than the specific range on the blue side in the chromaticity space, and to make the image other than the blue color of the image In other words, the saturation of the white portion, for example, the white portion, is increased, and an image in which white balance adjustment is appropriately performed can be obtained.
[0068]
According to the invention described in
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a main configuration of a digital camera exemplified as a preferred example of an electronic apparatus including a white balance control device according to the invention.
FIG. 2 is a diagram schematically showing an image captured by the digital camera of FIG. 1;
FIG. 3 is a diagram schematically showing a state in which a chromaticity plane related to white balance adjustment processing by the digital camera of FIG. 1 is divided into a plurality of cells.
4 is a diagram schematically showing a black body radiation locus in a chromaticity plane divided into a plurality of cells in FIG. 3. FIG.
5 is a diagram schematically showing a light source region set in a chromaticity plane divided into a plurality of cells in FIG. 3. FIG.
6 is a diagram schematically showing a luminance coefficient setting table related to white balance adjustment processing by the digital camera of FIG. 1. FIG.
7 is a diagram schematically showing a first light source region coefficient setting table related to white balance adjustment processing by the digital camera of FIG. 1. FIG.
FIG. 8 is a diagram schematically showing a second light source area coefficient setting table related to white balance adjustment processing by the digital camera of FIG. 1;
FIG. 9 is a diagram schematically showing a modification of the color space.
[Explanation of symbols]
100 Digital camera (electronic equipment)
1c Image sensor (imaging means)
7 ROM (white balance control device, setting table storage means, color area coefficient storage means)
8 CPU (white balance control device, adjustment amount setting means, image division means, color coordinate calculation means, luminance value calculation means, luminance coefficient setting means, color area coefficient setting means, chromaticity coefficient setting means, achromatic color point determination means, Color area coefficient resetting means, redetermination means)
G image
S Chromaticity plane (color space)
H, M, L, F Light source area (color area)
T1 brightness coefficient setting table
Claims (10)
前記画像情報のうちの色情報に基づいて、前記画像の色空間における色座標を算出する色座標算出手段と、
前記色情報に基づいて、前記画像の輝度値を算出する輝度値算出手段と、
前記輝度値算出手段により算出された画像の輝度値と、前記色座標算出手段により算出された画像の色座標とに基づいて、前記ホワイトバランス調整量の重み付けに係る輝度係数を設定する輝度係数設定手段と、を備え、
前記調整量設定手段は、前記輝度係数設定手段により設定された輝度係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴とするホワイトバランス制御装置。A white balance control device comprising adjustment amount setting means for setting a white balance adjustment amount based on color information of an image corresponding to input image information,
Color coordinate calculation means for calculating color coordinates in a color space of the image based on color information of the image information;
A luminance value calculating means for calculating a luminance value of the image based on the color information;
A luminance coefficient setting for setting a luminance coefficient related to the weighting of the white balance adjustment amount based on the luminance value of the image calculated by the luminance value calculating unit and the color coordinate of the image calculated by the color coordinate calculating unit Means, and
The white balance control device, wherein the adjustment amount setting means sets the white balance adjustment amount based on color information considering the luminance coefficient set by the luminance coefficient setting means.
前記色座標算出手段は、前記画像情報のうち、前記画像分割手段により分割された複数のブロックの各々に対応する部分の色情報に基づいて、色度空間における各ブロックの色度座標を算出し、
前記輝度値算出手段は、前記複数のブロックの各々に対応する前記色情報に基づいて、各ブロックの輝度値を算出し、
前記輝度係数設定手段は、前記輝度値算出手段により算出された各ブロックの輝度値と、前記色座標算出手段により算出された各ブロックの色度座標とに基づいて、前記ホワイトバランス調整量の重み付けに係る各ブロックの輝度係数を設定し、
前記調整量設定手段は、前記輝度係数設定手段により設定された各ブロックの輝度係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴とする請求項1に記載のホワイトバランス制御装置。Image dividing means for dividing the image into a plurality of blocks;
The color coordinate calculation means calculates chromaticity coordinates of each block in the chromaticity space based on color information of a portion corresponding to each of a plurality of blocks divided by the image division means in the image information. ,
The luminance value calculating means calculates a luminance value of each block based on the color information corresponding to each of the plurality of blocks,
The luminance coefficient setting unit weights the white balance adjustment amount based on the luminance value of each block calculated by the luminance value calculating unit and the chromaticity coordinate of each block calculated by the color coordinate calculating unit. Set the luminance coefficient of each block related to
The white adjustment amount according to claim 1, wherein the adjustment amount setting unit sets the white balance adjustment amount based on color information in consideration of a luminance coefficient of each block set by the luminance coefficient setting unit. Balance control device.
前記輝度係数設定手段は、前記各ブロックの色度座標から色区域を特定し、前記設定テーブル記憶手段に記憶された輝度係数設定テーブルに基づいて、各ブロックの輝度値から輝度係数を設定することを特徴とする請求項2に記載のホワイトバランス制御装置。A setting table storage unit that stores a luminance coefficient setting table in which a luminance value and a luminance coefficient are associated with each color area in which the chromaticity space is divided according to chromaticity;
The luminance coefficient setting means specifies a color area from the chromaticity coordinates of each block, and sets the luminance coefficient from the luminance value of each block based on the luminance coefficient setting table stored in the setting table storage means. The white balance control device according to claim 2.
前記各ブロックの色度座標が属する色区域の色区域係数を前記色区域係数記憶手段から取得して設定する色区域係数設定手段と、を備え、
前記調整量設定手段は、さらに、前記色区域係数設定手段により設定された色区域係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴とする請求項3に記載のホワイトバランス制御装置。A color area coefficient storage means for storing a color area coefficient related to the weighting of the white balance adjustment amount set for each color area;
Color gamut coefficient setting means for obtaining and setting the color gamut coefficient of the color gamut to which the chromaticity coordinate of each block belongs from the color gamut coefficient storage means, and
The said adjustment amount setting means further sets the said white balance adjustment amount based on the color information which considered the color area coefficient set by the said color area coefficient setting means. White balance control device.
前記調整量設定手段は、さらに、前記色度係数設定手段により設定された各ブロックの色度係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴とする請求項2〜4の何れか一項に記載のホワイトバランス制御装置。Chromaticity coefficient setting means for setting a chromaticity coefficient of each block related to the weighting of the white balance adjustment amount based on the chromaticity coordinates of each of the blocks;
3. The adjustment amount setting unit further sets the white balance adjustment amount based on color information considering the chromaticity coefficient of each block set by the chromaticity coefficient setting unit. The white balance control apparatus as described in any one of -4.
前記色度係数設定手段により設定された各ブロックの色度係数と、前記輝度係数設定手段により設定された各ブロックの輝度係数と、前記色区域係数設定手段により設定された色区域係数とに基づいて、無彩色点を判定する無彩色点判定手段と、
前記無彩色点判定手段により判定された無彩色点の前記色度座標に基づいて、前記色区域係数を前記色区域係数記憶手段から取得して再設定する色区域係数再設定手段と、を備え、
前記調整量設定手段は、さらに、前記色区域係数再設定手段により再設定された色区域係数を考慮した色情報に基づいて、前記ホワイトバランス調整量を設定することを特徴とする請求項4に記載のホワイトバランス制御装置。Chromaticity coefficient setting means for setting the chromaticity coefficient of each block related to the weighting of the white balance adjustment amount based on the chromaticity coordinates of each of the blocks;
Based on the chromaticity coefficient of each block set by the chromaticity coefficient setting means, the luminance coefficient of each block set by the luminance coefficient setting means, and the color area coefficient set by the color area coefficient setting means Achromatic point judging means for judging the achromatic point,
Color area coefficient resetting means for obtaining the color area coefficient from the color area coefficient storage means and resetting the color area coefficient based on the chromaticity coordinates of the achromatic color point determined by the achromatic color point determination means. ,
5. The white balance adjustment amount according to claim 4, wherein the adjustment amount setting unit further sets the white balance adjustment amount based on color information in consideration of the color area coefficient reset by the color area coefficient resetting unit. The white balance control device described.
前記調整量設定手段は、前記再判定手段にて再判定された無彩色点の前記色度座標に基づいて、前記ホワイトバランス調整量を設定することを特徴とする請求項6に記載のホワイトバランス制御装置。Re-determination means for re-determining the achromatic color point based on the color area coefficient reset by the color area coefficient resetting means;
7. The white balance according to claim 6, wherein the adjustment amount setting unit sets the white balance adjustment amount based on the chromaticity coordinates of the achromatic color point re-determined by the re-determination unit. Control device.
前記画像を撮像する撮像手段を備えることを特徴とする電子機器。An electronic apparatus comprising the white balance control device according to any one of claims 1 to 9,
An electronic apparatus comprising: an imaging unit that captures the image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003193815A JP2005033332A (en) | 2003-07-08 | 2003-07-08 | White balance control unit and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003193815A JP2005033332A (en) | 2003-07-08 | 2003-07-08 | White balance control unit and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005033332A true JP2005033332A (en) | 2005-02-03 |
Family
ID=34205179
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003193815A Pending JP2005033332A (en) | 2003-07-08 | 2003-07-08 | White balance control unit and electronic equipment |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005033332A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007043439A (en) * | 2005-08-03 | 2007-02-15 | Casio Comput Co Ltd | White balance adjustment apparatus and method |
JP2009506700A (en) * | 2005-08-30 | 2009-02-12 | ノキア コーポレイション | Image processing apparatus with auto white balance |
KR101092539B1 (en) | 2005-02-18 | 2011-12-14 | 삼성전자주식회사 | Image apparatus for controlling white-balance automatically and method for controlling white-balance thereof |
KR101131109B1 (en) | 2010-05-31 | 2012-04-03 | 인하대학교 산학협력단 | Auto white balance setting method by white detection considering sensor characteristic |
-
2003
- 2003-07-08 JP JP2003193815A patent/JP2005033332A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101092539B1 (en) | 2005-02-18 | 2011-12-14 | 삼성전자주식회사 | Image apparatus for controlling white-balance automatically and method for controlling white-balance thereof |
JP2007043439A (en) * | 2005-08-03 | 2007-02-15 | Casio Comput Co Ltd | White balance adjustment apparatus and method |
JP2009506700A (en) * | 2005-08-30 | 2009-02-12 | ノキア コーポレイション | Image processing apparatus with auto white balance |
JP2012100362A (en) * | 2005-08-30 | 2012-05-24 | Nokia Corp | Image processing apparatus including automatic white balance |
US8941755B2 (en) | 2005-08-30 | 2015-01-27 | Nokia Corporation | Image processing device with automatic white balance |
KR101131109B1 (en) | 2010-05-31 | 2012-04-03 | 인하대학교 산학협력단 | Auto white balance setting method by white detection considering sensor characteristic |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI524709B (en) | Image capture apparatus, method of controlling image capture apparatus, and electronic device | |
JP4004943B2 (en) | Image composition method and imaging apparatus | |
US20080129860A1 (en) | Digital camera | |
JP6597794B2 (en) | Image processing apparatus and image processing method | |
US9077944B2 (en) | Image pickup device, image processing method, and storage medium | |
JP2006081037A (en) | Image pickup device | |
US9036046B2 (en) | Image processing apparatus and method with white balance correction | |
US20130057726A1 (en) | Image processing apparatus and image processing method | |
JP4717720B2 (en) | Image processing apparatus and method, and program | |
US7646406B2 (en) | Image taking apparatus | |
JP4544308B2 (en) | Image processing apparatus, imaging apparatus, method, and program | |
JP2010091596A (en) | Display device, image capturing apparatus and projector | |
JP4222130B2 (en) | White balance control device and electronic device | |
JP5316923B2 (en) | Imaging apparatus and program thereof | |
JP5042453B2 (en) | Strobe control device, strobe control program, strobe control method | |
JP4210920B2 (en) | White balance adjustment method and camera | |
JP2012124652A (en) | Imaging apparatus and image processing method | |
JP2005033332A (en) | White balance control unit and electronic equipment | |
JP4396225B2 (en) | White balance control device and electronic device | |
JP4752434B2 (en) | Color correction processing program and electronic camera | |
JP2002223386A (en) | Photographing device | |
JP2008085915A (en) | Imaging apparatus, and imaging method | |
JP6137248B2 (en) | Display device and imaging device | |
JP2004363658A (en) | Image signal processor | |
JP2004056568A (en) | Image composing method and image pickup device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20060616 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081226 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20090106 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20090428 |