JP5569361B2 - Imaging apparatus and white balance control method - Google Patents
Imaging apparatus and white balance control method Download PDFInfo
- Publication number
- JP5569361B2 JP5569361B2 JP2010265155A JP2010265155A JP5569361B2 JP 5569361 B2 JP5569361 B2 JP 5569361B2 JP 2010265155 A JP2010265155 A JP 2010265155A JP 2010265155 A JP2010265155 A JP 2010265155A JP 5569361 B2 JP5569361 B2 JP 5569361B2
- Authority
- JP
- Japan
- Prior art keywords
- white
- block
- image frame
- subject
- subject area
- 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.)
- Active
Links
Images
Landscapes
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
- Studio Devices (AREA)
- Image Processing (AREA)
- Color Television Image Signal Generators (AREA)
Description
本発明は、撮像装置およびホワイトバランス制御方法に関する。 The present invention relates to an imaging apparatus and a white balance control method.
撮像素子を用いて画像を撮像するデジタルカメラなどの撮像装置においては、人間にとって白く見える部分を画像上で白く再現するためのオートホワイトバランスと呼ばれる処理が行われている。オートホワイトバランスは、例えば、撮像素子から出力される画像フレームの中で白色(無彩色)を映したと推定される領域を検出し、検出した領域の色情報に基づいて算出した制御値(以下、WB制御値という。)を用いて、画像フレームの各画素の信号を調整することで実現できる。 In an image pickup apparatus such as a digital camera that picks up an image using an image pickup element, a process called auto white balance is performed to reproduce a white portion that appears white to humans on the image. The auto white balance is, for example, a control value (hereinafter referred to as a control value calculated based on color information of a detected area that detects an area estimated to be white (achromatic) in an image frame output from the image sensor. , And WB control value), and can be realized by adjusting the signal of each pixel of the image frame.
具体的には、例えば画像フレームを縦横16×16の256個のブロックに分割し、分割したブロックごとに、各ブロックに含まれる画素のRGBそれぞれの信号の積算値を算出して、ブロックごとのG信号の積算値に対するR信号およびB信号の積算値の比(G/R,G/B)を、各ブロックの特徴量(以下、WB評価値という。)として求める。そして、求めた各ブロックのWB評価値(G/R,G/B)を、G/R,G/Bを軸とした色空間(以下、WB色空間という。)にプロットする。 Specifically, for example, an image frame is divided into 256 blocks of vertical and horizontal 16 × 16, and for each divided block, an integrated value of RGB signals of pixels included in each block is calculated, and each block is calculated. A ratio (G / R, G / B) of the integrated value of the R signal and the B signal to the integrated value of the G signal is obtained as a feature amount (hereinafter referred to as a WB evaluation value) of each block. Then, the obtained WB evaluation values (G / R, G / B) of each block are plotted in a color space (hereinafter referred to as WB color space) with G / R, G / B as axes.
WB色空間上には、予め光源(昼光やタングステン光)の色温度を変化させた場合における黒体輻射の軌跡がリファレンスゲインとして用意されている。このWB色空間上で、プロットされた各ブロックのWB評価値(G/R,G/B)とリファレンスゲインとのマッチングをとることにより、画像フレームにおいて白色を映したと推定される領域を検出することができる。 On the WB color space, a black body radiation locus when the color temperature of a light source (daylight or tungsten light) is changed in advance is prepared as a reference gain. In this WB color space, by matching the WB evaluation values (G / R, G / B) of each plotted block with the reference gain, an area estimated to be white in the image frame is detected. can do.
以上のように検出された白色の領域は、光源の種類によってRGB積算比が異なっているが、この白色の領域におけるRGBの積算比がR:G:B=1:1:1となるようなゲイン(WB制御値)を各画素に乗算することで、オートホワイトバランスを実現することができる。これは人間の色順応のメカニズムに基づいており、人間は異なる光源下においても白いものが白く見えるように色順応が働くという仮説に基づいている。つまり、オートホワイトバランスとは、画面全体が白色となる基準被写体を撮影している状態で、撮影信号としてのR信号、G信号、B信号の出力レベルを等しくするホワイトバランス制御を、基準被写体を撮影せずに自動で行えるようにする処理ということができる。画面の中の白色を映した領域のR信号およびB信号の出力レベルをG信号と等しくするために、入力されたR信号およびB信号のそれぞれに対して乗算されるゲイン(係数)が、WB制御値となる。 The white area detected as described above has a different RGB integration ratio depending on the type of light source, but the RGB integration ratio in this white area is R: G: B = 1: 1: 1. Auto white balance can be achieved by multiplying each pixel by a gain (WB control value). This is based on the mechanism of human chromatic adaptation, and is based on the hypothesis that humans work in such a way that white objects appear white even under different light sources. In other words, auto white balance refers to white balance control that equalizes the output levels of the R signal, G signal, and B signal as shooting signals in a state where a reference subject whose entire screen is white is photographed. It can be said that processing can be performed automatically without taking a picture. In order to make the output level of the R signal and B signal in the area displaying white in the screen equal to the G signal, the gain (coefficient) multiplied by each of the input R signal and B signal is WB. Control value.
ところで、上記のようなオートホワイトバランスの方式は、被写体に無彩色の部分がない場合や、被写体のほとんどを有彩色(物体色)が占める場合には、画像フレームから白色の領域を検出できない、もしくは白色の領域を検出する処理の精度が低下するため、結果的に誤ったホワイトバランス制御を行ってしまうという欠点がある。具体的な例を示すと、高色温度の光源下において人肌がアップのシーンで、人肌の肌色を映した領域を低色温度光源下の白色(無彩色)を映した領域として誤って検出し、人肌を青白く補正するようなホワイトバランス制御を行ってしてしまうという問題が指摘されている。また、森林のように緑が占める割合が大きい場合にも、物体色の領域を蛍光灯によって照明された白色の領域として誤って検出し、誤ったホワイトバランス制御を行ってしまうことがある。このような誤ったホワイトバランス制御はカラーフェイリアと呼ばれている。 By the way, the auto white balance method as described above cannot detect a white region from an image frame when the subject does not have an achromatic part or when the subject is mostly chromatic (object color). Or, since the accuracy of the processing for detecting the white area is lowered, there is a disadvantage that erroneous white balance control is performed as a result. As a specific example, in a scene where the human skin is up under a light source with a high color temperature, the area that reflects the skin color of the human skin is mistakenly designated as the area that reflects the white color (achromatic color) under the low color temperature light source. A problem has been pointed out that white balance control is performed to detect and correct human skin to pale. In addition, even when the ratio of green is large as in a forest, an object color region may be erroneously detected as a white region illuminated by a fluorescent lamp, and erroneous white balance control may be performed. Such erroneous white balance control is called color failure.
以上のようなカラーフェイリアを改善する方法として、例えば、特許文献1や特許文献2に記載の技術が知られている。
As a method for improving the color failure as described above, for example, techniques described in
特許文献1には、動画撮影におけるカラーフェイリアの軽減方法として、被写体追尾情報を用いた制御方法が開示されている。具体的には、主要な被写体の代表的な色を示す領域(例えば、人物の肌色)を基準領域として設定し、追尾手段により、この基準領域を画面内での被写体の移動に合わせて追従させ、この基準領域に含まれる色情報を取得し、各フレームにおいて被写体の同一の部分(例えば人物の頬の部分)を表す画像データに基づいて、露出およびホワイトバランスを適正に補正できるようにしている。すなわち、この特許文献1に記載の技術では、利用者が設定した基準領域を、その色情報から順次取得されるフレームに対して探索することで、たとえば被写体が撮像装置に急に近づいてきた場合でも肌色引き込みによるカラーフェイリアを防止できるようにしている。
また、特許文献2には、複数の撮像システムにより動画像を追尾しながら撮像するシステムにおいて、被写体の移動に伴い被写体を撮像していたカメラからとのカメラに切り替えて被写体の撮像を引き継ぐ際に、被写体を撮像していた撮像条件を、撮像を引き継いだカメラの撮像条件として継承することで、カメラ切換時の不自然な画像の変化を抑制することが記載されている。
Further, in
しかしながら、特許文献1に記載の技術では、そもそもユーザが設定する被写体の代表的な色を示す基準領域が、光源色(無彩色)の領域なのか、物体色(有彩色)の領域なのか分からず、基準領域の色情報をどのようにホワイトバランス制御に用いるのか不明である。また、特許文献1に記載の技術では、被写体が動くことで異なる光源下に移動した場合、基準領域から得られる色情報は大きく変わってしまい、本来同一基準領域と判定しなければならないのに誤判定し、カラーフェイリアが発生してしまうという問題がある。
However, in the technique described in
また、特許文献2に記載の技術においても、被写体が異なる光源下に移動した場合、カメラ切換時にホワイトバランス等の撮像条件を引き継いでしまうので、移動後の撮影環境に適したホワイトバランスが設定できず、カラーフェイリアが発生してしまうという問題がある。
Also, in the technique described in
本発明は、上記に鑑みてなされたものであって、オートホワイトバランスの精度を向上させて、カラーフェイリアの発生を有効に抑制することができる撮像装置およびホワイトバランス制御方法を提供することを目的としている。 The present invention has been made in view of the above, and provides an imaging apparatus and a white balance control method capable of improving the accuracy of auto white balance and effectively suppressing the occurrence of color failure. It is aimed.
上述した課題を解決し、目的を達成するために、本発明に係る撮像装置は、撮像素子と、前記撮像素子から出力される画像フレームを複数のブロックに分割し、分割した複数のブロックそれぞれについて、各ブロックの色の特徴を表す特徴量を算出する特徴量算出手段と、前記特徴量に基づいて、前記複数のブロックのうちで、白色を映したブロックと推定される白ブロックを検出する白ブロック検出手段と、前記画像フレームの中で、追尾する被写体を映した被写体エリアを検出する被写体エリア検出手段と、前記画像フレームにおいて前記被写体エリア内から前記白ブロックが検出され、且つ、前記画像フレームよりも前に前記撮像素子から出力された画像フレームである先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されていない場合に、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて算出した制御値を用いて、前記画像フレームのホワイトバランスを制御するホワイトバランス制御手段と、を備えることを特徴とする。 In order to solve the above-described problems and achieve the object, an imaging apparatus according to the present invention divides an image sensor and an image frame output from the image sensor into a plurality of blocks, and each of the divided blocks. A feature amount calculating means for calculating a feature amount that represents a color feature of each block; and a white block that detects a white block that is estimated to be a white block from the plurality of blocks based on the feature amount. Block detecting means; subject area detecting means for detecting a subject area showing a subject to be tracked in the image frame; the white block is detected from the subject area in the image frame; and the image frame The white block from within the subject area in a preceding frame that is an image frame output from the image sensor before If not, the white balance of the image frame is controlled using a control value calculated based on the feature amount of the white block other than the white block detected in the subject area in the image frame. White balance control means.
また、本発明に係るホワイトバランス制御方法は、撮像素子から出力される画像フレームを複数のブロックに分割し、分割した複数のブロックそれぞれについて、各ブロックの色の特徴を表す特徴量を算出するステップと、前記特徴量に基づいて、前記複数のブロックのうちで、白色を映したブロックと推定される白ブロックを検出するステップと、前記画像フレームの中で、追尾する被写体を映した被写体エリアを検出するステップと、前記画像フレームにおいて前記被写体エリア内から前記白ブロックが検出され、且つ、前記画像フレームよりも前に前記撮像素子から出力された画像フレームである先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されていない場合に、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて算出した制御値を用いて、前記画像フレームのホワイトバランスを制御するステップと、を含むことを特徴とする。 In the white balance control method according to the present invention, the image frame output from the image sensor is divided into a plurality of blocks, and for each of the divided plurality of blocks, a feature amount representing a color feature of each block is calculated. And detecting a white block estimated as a white block from the plurality of blocks based on the feature amount; and a subject area showing a subject to be tracked in the image frame. Detecting the white block from within the subject area in the image frame, and detecting from the subject area in a preceding frame, which is an image frame output from the image sensor before the image frame. When no white block is detected, the image area is within the subject area. Using the control value calculated based on the feature amount of the white blocks other than al detected white blocks, characterized in that it comprises the steps of: controlling the white balance of the image frame.
本発明によれば、オートホワイトバランスの精度を向上させて、カラーフェイリアの発生を有効に抑制することができるという効果を奏する。 According to the present invention, it is possible to improve the accuracy of auto white balance and effectively suppress the occurrence of color failure.
以下に添付図面を参照して、この発明に係る撮像装置およびホワイトバランス制御方法の最良な実施の形態を詳細に説明する。なお、以下ではイメージセンサとしてCMOSセンサを用いたデジタルカメラに本発明を適用した例について説明するが、本発明は、CCDセンサを用いたデジタルカメラに対しても有効に適用可能である。また本発明は、デジタルカメラに限らず、被写体追尾機能とオートホワイトバランス機能とを備えた撮像装置に対して広く適用できる。 Exemplary embodiments of an imaging apparatus and a white balance control method according to the present invention will be explained below in detail with reference to the accompanying drawings. In the following, an example in which the present invention is applied to a digital camera using a CMOS sensor as an image sensor will be described. However, the present invention can be effectively applied to a digital camera using a CCD sensor. The present invention is not limited to digital cameras, and can be widely applied to image pickup apparatuses having a subject tracking function and an auto white balance function.
(第1の実施の形態)
図1は、本実施の形態に係るデジタルカメラの外観を示す図であり、図1−1は同デジタルカメラの上面図、図1−2は同デジタルカメラの正面図、図1−3は同デジタルカメラの裏面図である。
(First embodiment)
FIG. 1 is a diagram illustrating an appearance of a digital camera according to the present embodiment. FIG. 1-1 is a top view of the digital camera, FIG. 1-2 is a front view of the digital camera, and FIG. It is a reverse view of a digital camera.
本実施の形態に係るデジタルカメラは、図1−1に示すように、その上面に、静止画撮影が可能な枚数などを表示するサブLCD1と、静止画撮影の際に押圧操作されるレリーズシャッタボタン2と、画像を記録する記録(撮影)モードや記録された画像を再生する再生モード、カメラ設定のためのSETUPモードなどの各種モードの切替えの際に操作されるモードダイヤル3を有する。
As shown in FIG. 1A, the digital camera according to the present embodiment has a
また、本実施の形態に係るデジタルカメラは、図1−2に示すように、その正面に、ストロボを発光させるストロボ発光部4と、被写体までの距離を測定する測距ユニット5と、図示しないリモコン端末からの赤外線信号を受信するリモコン受光部6と、後述するズームレンズ25やフォーカスレンズ26、メカニカルシャッタ27およびこれらを一体に支持する支持部材などから構成される鏡胴ユニット7と、光学ファインダ(正面)8を有する。また、本実施の形態に係るデジタルカメラの側面には、後述するメモリカード80を挿入するメモリカードスロットルや電池を収容する電池収容部が設けられており、これらメモリカードスロットルや電池収容部は蓋体9により閉塞されている。
In addition, as shown in FIG. 1-2, the digital camera according to the present embodiment has a strobe
また、本実施の形態に係るデジタルカメラは、その裏面に、オートフォーカス作動時に点灯するオートフォーカスLED(AFLED)10と、ストロボ発光時に点灯するストロボLED11と、各種設定画面の表示や再生画像の表示および撮影時の電子ファインダとして用いられるLCDモニタ12と、光学ファインダ(裏面)13と、広角側ズーム時に操作されるズームボタン(WIDE)14および望遠側ズーム時に操作されるズームボタン(TELE)15と、電源スイッチ16と、セルフタイマの作動時に操作されるセルフタイマ/削除スイッチ17を有する。
In addition, the digital camera according to the present embodiment has an autofocus LED (AFLED) 10 that is turned on when the autofocus is activated, a
さらに、本実施の形態に係るデジタルカメラは、その裏面に、メニュー選択の際に操作されるメニュースイッチ18と、選択した事項を確定させる際に操作されるOKスイッチ19と、LCDモニタ12に表示する再生画像を切替える際に操作される画像確認スイッチ(左)20および画像確認スイッチ(右)21と、マクロ撮影を行う際に操作されるマクロスイッチ22と、ストロボ発光モードの切替え時に操作されるストロボスイッチ23と、LCDモニタ12の表示の切替え時に操作されるディスプレイスイッチ24を有する。
Furthermore, the digital camera according to the present embodiment has a
図2は、本実施の形態に係るデジタルカメラの制御系の構成を示すブロック図である。本実施の形態に係るデジタルカメラは、制御系の構成として、ズームレンズ25やフォーカスレンズ26、メカニカルシャッタ27を駆動するためのモータドライバ28と、イメージセンサであるCMOSセンサ30と、CMOSセンサ30から出力されるアナログの画像信号を処理してデジタル画像データを生成するアナログフロントエンド(AFE)40と、CMOSセンサ30およびAFE40に対して駆動タイミング信号を出力するタイミングジェネレータ(TG)50と、AFE40から出力されたデジタル画像データに対して各種デジタル画像処理を実行するとともにデジタルカメラ全体の動作を制御する信号処理IC60とを備えている。信号処理IC60には、上述したLCDモニタ12のほか、SDRAM70やメモリカード80、ROM90、操作部100などが接続されている。
FIG. 2 is a block diagram showing a configuration of a control system of the digital camera according to the present embodiment. The digital camera according to the present embodiment includes a
メカニカルシャッタ27は、開状態によりCMOSセンサ30に光を入射させ、閉状態によりCMOSセンサ30への光の入射を遮断する機械的なシャッタである。このメカニカルシャッタ27は、光学レンズであるズームレンズ25やフォーカスレンズ26とともに、モータドライバ28により駆動される。モータドライバ28によるズームレンズ25、フォーカスレンズ26およびメカニカルシャッタ27の駆動は、信号処理IC60の内部に含まれるCPU61によって制御される。
The
CMOSセンサ30は、光電変換機能によって、光学レンズにより結像した光学像をその明るさに比例した電気信号に変換して出力する固体撮像素子である。CMOSセンサ30は、TG50から出力される駆動タイミング信号に従って駆動され、各画素の露光や信号読み出しが制御される。CMOSセンサ30からの出力電気信号は、AFE40に入力される。
The
AFE40は、CMOSセンサ30の出力電気信号(アナログ画素信号)をサンプリングホールド(相関二重サンプリング)するCDS41と、CDS41によりサンプリングされた信号のゲインを調整するAGC(Auto Gain Control)42と、AGC42の出力をデジタル信号に変換するA/D変換機(A/D)43とを有する。これらAFE40を構成する各部は、TG50から出力される駆動タイミング信号に従ってCMOSセンサ30と同期して駆動され、また、AGC42におけるゲインの設定などは、信号処理IC60内部に含まれるCPU61の命令に従って実施される。AFE40により出力されるデジタルデータ(デジタル画像データ)は、信号処理IC60に入力される。
The
TG50には、信号処理IC60内部に含まれる同期信号生成部69によって生成された垂直同期信号VDおよび水平同期信号HDが供給される。TG50は、これら垂直同期信号VDおよび水平同期信号HDに基づいて、CMOSセンサ30およびAFE40を同期して駆動させるための駆動タイミング信号を生成し、生成した駆動タイミング信号をCMOSセンサ30およびAFE40に供給する。
The
信号処理IC60は、デジタルカメラ全体の動作を統括的に制御するCPU61と、垂直同期信号VDおよび水平同期信号HDに合わせてAFE40からデジタル画像データの取り込みを行うCMOSI/F部62と、SDRAM70へのデータの書き込みや読み出しを制御するメモリコントローラ63と、CMOSI/F部62から入力されたデジタル画像データを表示や記録が可能なYUVのデータ形式に変換するYUV変換部64と、画像データを所定のフォーマット(例えばJPEG)に従って圧縮および伸張する圧縮伸張部65と、LCDモニタ12や外部表示装置への表示データの出力を制御する表示出力制御部66と、表示や記録のサイズに合わせて画像サイズを変更するリサイズ処理部67と、メモリカード80へのデータの書き込みや読み出しを制御するメディアI/F部68と、CPU61の命令により垂直同期信号VDおよび水平同期信号HDを生成する同期信号生成部69とを有している。
The signal processing IC 60 includes a
AFE40から出力されるデジタル画像データは、CMOSI/F部62により画像フレームを一単位として信号処理IC60内部に取り込まれ、信号処理IC60内部で黒レベルの補正、欠損画素の補正、シェーディング補正などの画像処理が行われた上で、メモリコントローラ63によりSDRAM70に画像フレームごとのRGBデータ(RAW−RGB画像データ)として一時保管される。
Digital image data output from the
SDRAM70に保存された画像フレームごとのRAW−RGB画像データは、メモリコントローラ63によりSDRAM70から読み出され、ホワイトバランスのゲイン乗算やガンマ補正、RGB補間処理を経てYUV変換部64に供給される。YUV変換部64は、この画像データに対してエッジ強調や色設定などの各種画像処理を行うとともに、輝度/色差信号であるYUV画像データへの変換を行う。YUV変換部64で生成されたYUV画像データは、メモリコントローラ63により再度SDRAM70に格納される。
The RAW-RGB image data for each image frame stored in the
SDRAM70に保存されたYUV画像データは、メモリコントローラ63によりSDRAM70から読み出され、撮影モードアイコンなどを表示するためのOSD(オンスクリーンディスプレイ)データとともに表示出力制御部66に供給される。表示出力制御部66は、これらYUV画像データとOSDデータを合成して表示用データを生成し、同期信号などの信号を付加してLCDモニタ12に出力する。なお、表示出力制御部66は、生成した表示用データをTVビデオ信号として出力して外部表示装置に表示させることも可能であり、例えば外部表示装置がNTSCシステムのTVであれば、リサイズ処理部67により、そのシステムに合わせた水平・垂直の変倍処理が施された上で、TVに出力される。
The YUV image data stored in the
また、メモリカード80への記録時には、SDRAM70に保存されたYUV画像データが、CPU61の命令によりメモリコントローラ63によってSDRAM70から読み出されて圧縮伸張部65に供給され、圧縮伸張部65においてJPEGデータなどの圧縮データが生成される。ここで、SDRAM70に保存されたYUV画像データはフルサイズのデータであり、メモリカード80に記録する画像サイズがCMOSセンサ30の画像サイズよりも小さい場合は、リサイズ処理部67にて記録用に画像が縮小された上で圧縮伸張部65に供給される。圧縮伸張部65で生成された圧縮データ(JPEGデータ)は、メモリコントローラ63により再度SDRAM70に格納され、その後、ヘッダ追加などの処理が行われた後に、メディアI/F部68を介してメモリカード80に記録される。
When recording on the memory card 80, the YUV image data stored in the
以上の信号処理IC60内部における各部の動作は、CPU61の命令に従って実行される。CPU61は、例えばROM90に格納されたデジタルカメラの制御を行うための制御プログラムおよび制御データを、例えばSDRAM70上にロードし、ロードした制御プログラムのプログラムコードに基づいて、デジタルカメラ全体の動作を統括的に制御する。すなわち、CPU61は、操作部100の各種ボタンキーによる指示や図示しないリモコン端末からの動作指示等に基づいて、指示に応じた画像を適切に撮影、表示、記録できるように、モータドライバ28やAFE40、TG50、信号処理IC60内部の各処理部などを制御する。なお、操作部100は、撮影者がデジタルカメラの動作指示を行うためのものであり、図1に示したレリーズシャッタボタン2やズームボタン14,15などの各種ボタンキーが該当する。
The operation of each part in the signal processing IC 60 described above is executed in accordance with instructions from the
以下、レリーズシャッタボタン2の押下に応じて静止画を撮影する際のCPU61による制御について、さらに詳しく説明する。
Hereinafter, the control by the
レリーズシャッタボタン2が押下されると、撮影に先立ちAF(AUTO FOCUS)処理が行われる。AF処理としては、例えば、フォーカスレンズ26を移動させながらコントラストの最大値を見つける山登りAFなどが行わる。これは、映像信号のG信号(または輝度値であるY信号)の高周波成分からAF評価値を作成し、AF評価値が最大になるところのフォーカスレンズ26の位置(フォーカス位置)を算出して、フォーカスレンズ26を移動させる処理である。
When the
AFの評価値を取得するエリアについては、1つの画像フレームに対して複数のエリアを考慮するマルチエリアAFや、一部しか考慮しないスポットエリアAFなどがある。そして、AF評価値をもとに撮影シーンに適したフォーカス位置を算出し、そのポイントへフォーカスレンズ26を移動させる。フォーカスレンズ26は、CPU61の命令により、モータドライバ28を介して移動させることができる。
As areas for obtaining AF evaluation values, there are multi-area AF in which a plurality of areas are considered for one image frame, spot area AF in which only a part is considered, and the like. Then, a focus position suitable for the shooting scene is calculated based on the AF evaluation value, and the
次に、静止画撮影用の電子シャッタの設定や、AGC42の計算/設定、絞りの計算/設定が行われ(AE(AUTO EXPOUSRE)処理)、記録用の露光が行われる。電子シャッタの設定は、CPU61の命令により、CMOSセンサ30の駆動を制御するTG50により実行することができる。また、AGC42の設定は、CPU61の命令により、AFE40により実行することができる。
Next, an electronic shutter for still image shooting,
その後、静止画用の露光が完了した時点でメカニカルシャッタ27が閉じられ、CMOSセンサ30より静止画用のRGBデータ(RAW−RGB画像データ)が出力される。レリーズ第1処理(半押し)およびレリーズ第2処理(全押し)を搭載しているカメラシステムでは、レリーズ第1処理を実行することでAFやAE処理の計算を行い、レリーズ第2処理で記録用の露光が行われるような制御になっているのが一般的である。
Thereafter, when the exposure for the still image is completed, the
静止画用のRAW−RGB画像データは、CMOSI/F部62により信号処理IC60内部に取り込まれ、信号処理IC60内部で黒レベルの補正、欠損画素の補正、シェーディング補正などの画像処理が行われた上で、メモリコントローラ63によりSDRAM70に書き込まれる。インタレース転送であれば、複数回の転送によって、1つの画像フレームを構成する全てのデータが、RAW−RGB画像データとしてSDRAM70に書き込まれる。
RAW-RGB image data for still images is taken into the signal processing IC 60 by the CMOS I /
SDRAM70に書き込まれた静止画用のRAW−RGB画像データは、上述したように、SDRAM70から読み出され、ホワイトバランスのゲイン乗算やガンマ補正、RGB補間処理を経て、YUV変換部64でエッジ強調や色設定などの各種画像処理を行うとともに輝度/色差信号であるYUVデータに変換され、SDRAM70に書き戻される。
As described above, the RAW-RGB image data for the still image written in the
その後、SDRAM70に書き込まれたYUV画像データが、再度、SDRAM70から読み出され、必要に応じてリサイズ処理部67にて縮小処理が行われた上で、圧縮伸張部65で例えばJPEG圧縮などのデータ圧縮処理が行われる。そして、圧縮データ(JPEGデータ)が再度SDRAM70に書き戻され、ヘッダ追加などの処理が行われた後に、メディアI/F部68を介してメモリカード80に記録される。
Thereafter, the YUV image data written in the
次に、本実施の形態に係るデジタルカメラにおいて実施されるホワイトバランス制御について、詳細に説明する。 Next, white balance control performed in the digital camera according to the present embodiment will be described in detail.
本実施の形態に係るデジタルカメラによるホワイトバランス制御は、一例として、随時更新される画像フレームに対して連続的に実施される。すなわち、信号処理IC60には、上述したように、撮像素子であるCMOSセンサ30からの画像データが、AFE40を介して、フレーム画像を一単位として随時入力される。この信号処理IC60に入力される各画像フレームに対して、信号処理IC60内部のCPU61による処理として、ホワイトバランス制御が行われる。なお、ホワイトバランス制御の対象となる画像フレームは、静止画撮影前にLCDモニタ12などに表示するモニタリング用の画像の画像フレームであってもよいし、例えば連写撮影などで得られる連続した静止画の画像フレームであってもよい。また、静止画撮影前にモニタリング用の画像の画像フレームに対する処理で得られた後述のホワイトバランス制御値を記憶しておき、静止画撮影時に得られる画像フレームに対して記憶したホワイトバランス制御値を適用してホワイトバランス制御を行うようにしてもよい。
As an example, white balance control by the digital camera according to the present embodiment is continuously performed on image frames that are updated as needed. That is, as described above, image data from the
図3は、ホワイトバランス制御を実施するためのCPU61の機能構成を示す機能ブロック図である。CPU61は、例えば上述した制御プログラムの1つとしてROM90に格納され、メインメモリ(例えばSDRAM70)上にロードされたホワイトバランス制御用のプログラムを実行することによって、図3に示すように、特徴量算出部101、白ブロック検出部102、被写体エリア検出部103、ホワイトバランス制御部104の各機能を実現する。
FIG. 3 is a functional block diagram showing a functional configuration of the
特徴量算出部101は、CMOSセンサ30から出力され、AFE40を介して信号処理IC60に入力される画像フレームを複数のブロックに分割し、分割した複数のブロックそれぞれについてWB評価値を算出する処理機能である。
The feature
白ブロック検出部102は、特徴量算出部101により算出されたWB評価値に基づいて、複数に分割された画像フレームの各ブロックのうちで、白色を映したブロックと推定される白ブロックを検出する処理機能である。
Based on the WB evaluation value calculated by the feature
被写体エリア検出部103は、処理の対象としている現在の画像フレームの中で、追尾する被写体を写した領域である被写体エリアを検出する処理機能である。
The subject
本実施の形態に係るデジタルカメラは被写体追尾機能を備えており、被写体追尾機能がオンの状態での動作時には、CPU61が、信号処理IC60に時系列で連続的に入力される複数の画像フレームそれぞれに対して、例えばユーザにより追尾対象として指定された被写体が映っている領域(被写体エリア)を検出する処理を行う。この画像フレームから被写体エリアを検出する処理を行うのが、被写体エリア検出部103である。被写体追尾機能がオンの場合、画像フレームから検出された被写体エリアは、例えば、静止画撮影時における上述したAFの評価値を取得するエリアとして、また、AE処理のための測光エリアとして用いられる。なお、被写体追尾自体の手法に関しては様々な方式が提案されており、画像フレームから被写体エリアを検出する処理についても一般的な公知の技術を用いて行えばよいので、処理の詳細については説明を省略する。
The digital camera according to the present embodiment has a subject tracking function, and when operating with the subject tracking function turned on, the
ホワイトバランス制御部104は、白ブロック検出部102により検出された白ブロックのWB評価値に基づいてWB制御値を算出し、算出したWB制御値を用いて、画像フレームのホワイトバランスを制御する処理機能である。ここで、特に本実施の形態に係るデジタルカメラにおいては、このCPU61のホワイトバランス制御部104が、被写体エリア検出部103により検出された被写体エリアについての情報を利用することによって、従来技術と比較してより適切なWB制御値を算出し、高精度なホワイトバランス制御を行えるようにしている。
The white
すなわち、このホワイトバランス制御部104は、処理の対象としている現在の画像フレームにおいて、被写体エリア検出部103が検出した被写体エリア内から白エリアが検出され、且つ、現在の画像フレームよりも前にCMOSセンサ30から出力された画像フレーム(以下、先行フレームという。)において、被写体エリア検出部103が検出した被写体エリア(現在の画像フレームにおける追尾対象の被写体と同一の被写体を映したエリア)内から白ブロックが検出されていない場合には、現在の画像フレームにおいて被写体エリア内から検出された白ブロックを用いずに、それ以外の白ブロックのWB評価値に基づいてWB制御値を算出し、算出したWB制御値を用いて画像フレームのホワイトバランスを制御するようにしている。なお、上記の先行フレームは、現在の画像フレームの直前に出力された画像フレームだけに限らず、現在の画像フレームと同一の被写体を追尾している状態で現在の画像フレームよりも前に出力された画像フレームすべてを含むものである。
That is, the white
以下、CPU61が上記の特徴量算出部101、白ブロック検出部102、被写体エリア検出部103およびホワイトバランス制御部104の各機能を持つことにより実現されるホワイトバランス制御の具体例について、さらに詳しく説明する。
Hereinafter, specific examples of white balance control realized by the
CMOSセンサ30からAFE40を介して出力される画像フレームは、信号処理IC60のCMOSI/F部62により信号処理IC60内部に取り込まれ、メモリコントローラ63によりSDRAM70(フレームメモリ)に保管される。このとき、CMOSI/F部62は、信号処理IC60内部に取り込んだ画像フレームにおける特定部分あるいは画像フレーム全体のR,G,Bの値を読み込み、CPU61に入力する。
An image frame output from the
CPU61の特徴量算出部101は、信号処理IC60内部に取り込まれた画像フレームを予め定めた分割方法(例えば、縦横16×16の256分割)に従って複数のブロックに分割し、CMOSI/F部62が読み込んだR,G,Bの値を用いて、分割したブロックごとに、各ブロックに含まれる画素のRGBそれぞれの信号の積算値を求める。そして、特徴量算出部101は、ブロックごとのG信号の積算値に対するR信号およびB信号の積算値の比(G/R,G/B)を算出する。算出した値は、各ブロックの色の特徴を表す特徴量であり、これをWB評価値として用いる。
The feature
特徴量算出部101によって画像フレームにおける各ブロックのWB評価値(G/R,G/B)が算出されると、白ブロック検出部102が、算出された各ブロックのWB評価値(G/R,G/B)を、G/Rを横軸とし、G/Bを縦軸としたWB色空間上にプロットし、WB色空間上における各ブロックのWB評価値の分布から、白ブロックの検出を行う。
When the feature
図4は、各ブロックのWB評価値(G/R,G/B)をWB色空間上にプロットした様子を示す図である。WB色空間上には、図4に示すように、予め光源の色温度を変化させた場合における黒体輻射の軌跡がリファレンスゲインとして用意されている。そして、このリファレンスゲイン上において実際の撮影環境下で想定される光源色を中心にある程度の幅を持たせた領域(図4において楕円で示した領域)が、白検出エリアとして設定されている。 FIG. 4 is a diagram showing a state in which the WB evaluation values (G / R, G / B) of each block are plotted on the WB color space. On the WB color space, as shown in FIG. 4, the locus of black body radiation when the color temperature of the light source is changed in advance is prepared as a reference gain. An area (area indicated by an ellipse in FIG. 4) having a certain width around the light source color assumed under the actual shooting environment on the reference gain is set as a white detection area.
白ブロック検出部102は、特徴量算出部101により算出された各ブロックのWB評価値をWB色空間上にプロットしたときに、プロットされたWB評価値(図4中の黒色の点)が、WB色空間上に設定された白検出エリア内に位置するブロックを、画像フレームの中で白色を映したブロックと推定される白ブロックとして検出する。WB評価値が白検出エリア内に入っているか否かは、判定用のプログラムを用意してCPU61で実行することにより簡単に実現できる。なお、CMOSセンサ30の分光感度の分布により同じ照明、被写体でも色の特徴が変化するので、ホワイトバランス色空間上のリファレンスゲインおよび白検出エリアは、デジタルカメラが搭載するCMOSセンサ30の特性に合わせて決定しておくことが望ましい。
When the white
白ブロック検出部102により白ブロックが検出されると、ホワイトバランス制御部104は、検出された白ブロックのWB評価値(G/R,G/B)に基づいて、WB制御値を算出する。このとき、ホワイトバランス制御部104は、処理の対象としている現在の画像フレームにおいて被写体エリア内から白エリアが検出されているが、先行フレームにおいては被写体エリア内から白ブロックが検出されていない場合は、現在の画像フレームにおいて被写体エリア内から検出された白ブロックを用いずに、それ以外の白ブロックのWB評価値に基づいてWB制御値を算出する。WB制御値は、検出された白ブロックを画像上で白く見せるための制御値であり、白ブロック内における各画素のRGBの積算比がR:G:B=1:1:1に近づくように、R信号やB信号に対して乗算するゲインの値である。
When the white block is detected by the white
ここで、WB評価値は、上述したようにG信号の積算値に対するR信号およびB信号の積算値の比(G/R,G/B)であるので、1つの白ブロックのみに着目すれば、この白ブロックのG/Rの値をRゲインとし、G/BをBゲインとして、R信号に対してRゲインを乗算するともにB信号に対してBゲインを乗算することにより、RGBの積算比をR:G:B=1:1:1とすることができる。ただし、実際には1つの画像フレームから複数の白ブロックが検出され、検出された複数の白ブロックのWB評価値が異なる値を持つことが多い。そこで、ホワイトバランス制御部104は、例えば、検出された複数の白ブロックのG/Rの値の平均値をRゲインとし、検出された複数の白ブロックのG/Bの値の平均値をBゲインとして、WB制御値(Rゲイン,Bゲイン)を算出する。また、実際の撮影環境は複数の光源の影響を受ける場合も多く、図4に示す例のように、複数の白検出エリアにおいて白ブロックが検出される場合もある。このような場合には、ホワイトバランス制御部104は、例えば、複数の白検出エリアそれぞれで検出された白ブロックの数に応じて重みを付けた加重平均などによって、WB制御値を算出すればよい。また、各光源の影響が支配的な領域ごとに異なるWB制御値を算出し、領域の境界付近ではWB制御値を線形に変化させるようにしてもよい。なお、ホワイトバランス制御部104によるWB制御値の算出方法は、上記に限定されるものではなく、例えばカラーフェイリアを低減するための工夫、あるいはユーザにとって好ましい色合いに仕上がるような工夫など、様々な工夫を行った上で最終的に得られる値をWB制御値として決定するようにしてもよい。
Here, since the WB evaluation value is the ratio (G / R, G / B) of the integrated value of the R signal and the B signal with respect to the integrated value of the G signal as described above, attention should be paid to only one white block. The white block G / R value is set as R gain, G / B is set as B gain, R signal is multiplied by R gain, and B signal is multiplied by B gain, thereby integrating RGB. The ratio can be R: G: B = 1: 1: 1. However, actually, a plurality of white blocks are detected from one image frame, and the detected WB evaluation values of the plurality of white blocks often have different values. Therefore, the white
ホワイトバランス制御部104は、以上のようにして算出したWB制御値(Rゲイン,Bゲイン)を、フレーム画像を構成する各画素のR信号およびB信号に乗算することによって、画像フレームのホワイトバランスを制御する。具体的には、上述したように、YUV変換部64がSDRAM70から読み出されたRAW−RGB画像データをYUVデータに変換する前処理としてホワイトバランスのゲイン乗算が行われるが、この際、CPU61のホワイトバランス制御部104がYUV変換部64に対してWB制御値を設定することにより、このWB制御値に基づくホワイトバランス制御を実行する。
The white
図5および図6は、本実施の形態におけるホワイトバランス制御の具体的な一例を説明する図であり、図5は追尾対象の被写体の動きと時系列で入力される画像フレームAおよび画像フレームB内の被写体エリアの位置とを説明する図、図6は図5の画像フレームAおよび画像フレームBから算出したWB評価値をWB色空間上にプロットした様子を示す図である。 FIGS. 5 and 6 are diagrams for explaining a specific example of white balance control in the present embodiment. FIG. 5 illustrates image frame A and image frame B input in time series with the movement of the subject to be tracked. FIG. 6 is a diagram illustrating a state in which the WB evaluation values calculated from the image frame A and the image frame B in FIG. 5 are plotted on the WB color space.
図5に示す例は、追尾対象の被写体が、図5(a)に示すように、ある光源の光が直接照射されない位置から直接照射される位置(光源下)へと移動した場合を想定している。追尾対象の被写体が光源下へ移動する前に撮影(入力)された画像フレームが、図5(b)に示す画像フレームAであり、追尾対象の被写体が光源下へ移動した後に撮影(入力)された画像フレームが、図5(c)に示す画像フレームBである。つまり、画像フレームAは、画像フレームBとの関係において先行フレームとなる。また、図5(d)は、画像フレームAにおいて検出された被写体エリアに対応する画像フレームA内のブロックの位置を示しており、図5(e)は、画像フレームBにおいて検出された被写体エリアに対応する画像フレームB内のブロックの位置を示している。なお、この例では、説明を簡単にするために、1つの画像フレームにおけるブロックの数は、縦横6×9の54個であり、被写体エリアの大きさはブロック2個分に相当するものとしている。 The example shown in FIG. 5 assumes a case where the subject to be tracked moves from a position where light from a certain light source is not directly irradiated to a position where it is directly irradiated (under the light source) as shown in FIG. ing. An image frame shot (input) before the tracking target subject moves under the light source is an image frame A shown in FIG. 5B, and is shot (input) after the tracking target subject moves under the light source. The obtained image frame is an image frame B shown in FIG. That is, the image frame A becomes a preceding frame in relation to the image frame B. 5D shows the position of the block in the image frame A corresponding to the subject area detected in the image frame A, and FIG. 5E shows the subject area detected in the image frame B. The position of the block in the image frame B corresponding to is shown. In this example, in order to simplify the description, the number of blocks in one image frame is 54 × 6 × 9, and the size of the subject area is equivalent to two blocks. .
本実施の形態におけるホワイトバランス制御は、上述したように、画像フレームから検出された被写体エリアについての情報を利用して、適切なWB制御値を算出するようにしている。具体的には、画像フレームAでは、図5(d)の斜線で示す位置で被写体エリアが検出されるので、画像の左上を基準として(水平位置,垂直位置)=(2,2)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、被写体エリアに対応するブロックとなる。一方、画像フレームBでは、図5(e)の斜線で示す位置で被写体エリアが検出されるので、画像の左上を基準として(水平位置,垂直位置)=(4,4)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、被写体エリアに対応するブロックとなる。これら被写体エリアに対応するブロックの位置の情報を用い、白ブロックが被写体エリア内から検出されたか否かを判定する。 In the white balance control in the present embodiment, as described above, an appropriate WB control value is calculated using information on the subject area detected from the image frame. Specifically, in the image frame A, since the subject area is detected at the position indicated by the oblique lines in FIG. 5D, (horizontal position, vertical position) = (2, 2), ( A block of (horizontal size, vertical size) = (2, 1) is a block corresponding to the subject area. On the other hand, in the image frame B, since the subject area is detected at the position indicated by the oblique lines in FIG. 5E, (horizontal position, vertical position) = (4, 4), (horizontal size, A block of (vertical size) = (2, 1) is a block corresponding to the subject area. Using information on the position of the block corresponding to the subject area, it is determined whether or not a white block has been detected from within the subject area.
すなわち、画像フレームAに対するホワイトバランス制御では、(水平位置,垂直位置)=(2,2)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、白ブロックとして検出されたかどうかを判定する。ここで、画像フレームAの(水平位置,垂直位置)=(2,2)、(水平サイズ,垂直サイズ)=(2,1)のブロックのWB評価値(G/R,G/B)が、図6に示すように、(0.4,0.6)であったとすると、このWB評価値は白検出エリアから外れているため、画像フレームAにおいては、被写体エリア内から白ブロックは検出されていないと判定する。 That is, in the white balance control for the image frame A, it is determined whether or not a block of (horizontal position, vertical position) = (2, 2), (horizontal size, vertical size) = (2, 1) is detected as a white block. judge. Here, the WB evaluation value (G / R, G / B) of the block of (horizontal position, vertical position) = (2, 2), (horizontal size, vertical size) = (2, 1) of the image frame A is As shown in FIG. 6, if it is (0.4, 0.6), this WB evaluation value is out of the white detection area, so in the image frame A, a white block is detected from within the subject area. Judge that it is not.
一方、画像フレームBに対するホワイトバランス制御では、(水平位置,垂直位置)=(4,4)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、白ブロックとして検出されたかどうかを判定する。ここで、画像フレームBの(水平位置,垂直位置)=(4,4)、(水平サイズ,垂直サイズ)=(2,1)のブロックのWB評価値(G/R,G/B)が、図6に示すように、(0.5,0.9)であったとすると、このWB評価値は白検出エリア内に入っているため、画像フレームBにおいては、被写体エリア内から白ブロックが検出されたと判定する。 On the other hand, in the white balance control for the image frame B, it is determined whether a block of (horizontal position, vertical position) = (4, 4), (horizontal size, vertical size) = (2, 1) is detected as a white block. judge. Here, the WB evaluation values (G / R, G / B) of the block of (horizontal position, vertical position) = (4, 4), (horizontal size, vertical size) = (2, 1) of the image frame B are As shown in FIG. 6, if it is (0.5, 0.9), this WB evaluation value is in the white detection area, so in the image frame B, a white block is detected from within the subject area. It is determined that it has been detected.
画像フレームAと画像フレームBとにおいて、被写体検出エリアに対応するブロックのWB評価値が変化するのは、追尾対象の被写体が異なる光源下に移動した結果、追尾対象の被写体自体の色(物体色)は同じでも、光源が変化したことの影響により、CMOSセンサ30から出力される信号が変化するためである。従来技術では、このような場合でも、画像フレームBに対するホワイトバランス制御を行う際に、被写体エリア内から検出された白ブロックも含め、全ての白ブロックのWB評価値を用いてWB制御値の算出を行うようにしていた。このため、追尾対象の被写体を白くする方向のWB制御値が算出されてしまい、カラーフェイリアを生じさせてしまう場合があった。
In the image frame A and the image frame B, the WB evaluation value of the block corresponding to the subject detection area changes because the tracking target subject moves under a different light source, resulting in the color (object color) of the tracking target subject itself. This is because the signal output from the
これに対して、本実施の形態におけるホワイトバランス制御では、画像フレームBに対するホワイトバランス制御を行う際に、先行フレームである画像フレームAにおいて被写体エリア内から白ブロックが検出されていないため、被写体エリア内から検出された白ブロックのWB評価値をWB制御値の算出には用いず、被写体エリア内から検出された白ブロック以外の他の白ブロックのWB評価値を用いて、WB制御値の算出を行う。その結果、適切なWB制御値を算出することができ、ホワイトバランス制御を高精度に行って、カラーフェイリアの発生を有効に抑制することができる。 On the other hand, in the white balance control according to the present embodiment, when white balance control is performed on the image frame B, no white block is detected from the subject area in the image frame A that is the preceding frame. The WB evaluation value of the white block detected from the inside is not used for the calculation of the WB control value, but the WB control value is calculated using the WB evaluation value of the white block other than the white block detected from the subject area. I do. As a result, an appropriate WB control value can be calculated, white balance control can be performed with high accuracy, and the occurrence of color failure can be effectively suppressed.
図7および図8は、本実施の形態におけるホワイトバランス制御の他の具体例を説明する図であり、図7は追尾対象の被写体の動きと時系列で入力される画像フレームC、画像フレームDおよび画像フレームE内の被写体エリアの位置とを説明する図、図8は図7の画像フレームC、画像フレームDおよび画像フレームEから算出したWB評価値をWB色空間上にプロットした様子を示す図である。 7 and 8 are diagrams for explaining another specific example of the white balance control in the present embodiment. FIG. 7 shows the movement of the subject to be tracked and the image frame C and the image frame D input in time series. FIG. 8 is a diagram for explaining the position of the subject area in the image frame E. FIG. 8 shows a state in which the WB evaluation values calculated from the image frame C, the image frame D, and the image frame E in FIG. FIG.
図7に示す例は、図7(a)に示すように、ある光源下に位置している被写体が追尾対象として設定(ロックオン)された後、その追尾対象の被写体が、光源の光が直接照射されない位置へと移動し、さらにその後、光源下へと戻ってきた場合を想定している。追尾対象の被写体をロックオンしたときに撮影(入力)された画像フレームが、図7(b)に示す画像フレームCであり、追尾対象の被写体が光源下から移動した後に撮影(入力)された画像フレームが、図7(c)に示す画像フレームDであり、追尾対象の被写体が光源下へと戻ってきた後に撮影(入力)された画像フレームが、図7(d)に示す画像フレームEである。つまり、画像フレームDは、画像フレームEとの関係において先行フレームとなる。また、図7(e)は、画像フレームCにおいて検出された被写体エリアに対応する画像フレームC内のブロックの位置を示しており、図7(f)は、画像フレームDにおいて検出された被写体エリアに対応する画像フレームD内のブロックの位置を示しており、図7(g)は、画像フレームEにおいて検出された被写体エリアに対応する画像フレームE内のブロックの位置を示している。 In the example shown in FIG. 7, as shown in FIG. 7A, after a subject located under a certain light source is set as a tracking target (locked on), the subject to be tracked is light from the light source. It is assumed that the light has moved to a position that is not directly irradiated and then returned to the light source. An image frame captured (input) when the tracking target subject is locked on is an image frame C shown in FIG. 7B, and is captured (input) after the tracking target subject has moved from under the light source. The image frame is an image frame D shown in FIG. 7C, and an image frame taken (input) after the tracking target subject returns under the light source is an image frame E shown in FIG. 7D. It is. That is, the image frame D is a preceding frame in relation to the image frame E. FIG. 7E shows the position of the block in the image frame C corresponding to the subject area detected in the image frame C. FIG. 7F shows the subject area detected in the image frame D. 7 (g) shows the position of the block in the image frame E corresponding to the subject area detected in the image frame E. FIG.
画像フレームCでは、図7(e)の斜線で示す位置で被写体エリアが検出されるので、画像の左上を基準として(水平位置,垂直位置)=(3,4)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、被写体エリアに対応するブロックとなる。また、画像フレームDでは、図7(f)の斜線で示す位置で被写体エリアが検出されるので、画像の左上を基準として(水平位置,垂直位置)=(7,5)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、被写体エリアに対応するブロックとなる。また、画像フレームEでは、図7(g)の斜線で示す位置で被写体エリアが検出されるので、画像の左上を基準として(水平位置,垂直位置)=(5,5)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、被写体エリアに対応するブロックとなる。 In the image frame C, since the subject area is detected at the position indicated by the oblique lines in FIG. 7E, (horizontal position, vertical position) = (3,4), (horizontal size, vertical size) with the upper left of the image as a reference ) = (2, 1) is a block corresponding to the subject area. Further, in the image frame D, the subject area is detected at the position indicated by the oblique lines in FIG. 7F, so that the upper left corner of the image is the reference (horizontal position, vertical position) = (7, 5), (horizontal size, A block of (vertical size) = (2, 1) is a block corresponding to the subject area. Further, in the image frame E, the subject area is detected at the position indicated by the oblique lines in FIG. 7G, so that the upper left corner of the image is the reference (horizontal position, vertical position) = (5, 5), (horizontal size, A block of (vertical size) = (2, 1) is a block corresponding to the subject area.
本例の場合、画像フレームCの(水平位置,垂直位置)=(3,4)、(水平サイズ,垂直サイズ)=(2,1)のブロックのWB評価値(G/R,G/B)が、図8に示すように、(0.5,0.9)であり、白検出エリア内に入っているとする。画像フレームCは、追尾対象の被写体をロックオンしたときに撮影(入力)された画像フレームであるため、先行フレームとなる画像フレームは存在しない。このため、画像フレームCに対するホワイトバランス制御では、被写体エリア内から検出された白ブロックも含め、全ての白ブロックのWB評価値を用いてWB制御値の算出が行われる。 In this example, the WB evaluation value (G / R, G / B) of the block of (horizontal position, vertical position) = (3, 4), (horizontal size, vertical size) = (2, 1) of the image frame C ) Is (0.5, 0.9) as shown in FIG. 8, and is within the white detection area. Since the image frame C is an image frame shot (input) when the subject to be tracked is locked on, there is no image frame serving as a preceding frame. For this reason, in the white balance control for the image frame C, the WB control value is calculated using the WB evaluation values of all the white blocks including the white block detected in the subject area.
次に、画像フレームDに対するホワイトバランス制御では、画像フレームDの(水平位置,垂直位置)=(7,5)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、白ブロックとして検出されたかどうかを判定する。ここで、画像フレームDの(水平位置,垂直位置)=(7,5)、(水平サイズ,垂直サイズ)=(2,1)のブロックのWB評価値(G/R,G/B)が、図8に示すように、(0.4,0.6)であったとすると、このWB評価値は白検出エリアから外れているため、画像フレームDにおいては、被写体エリア内から白ブロックは検出されていないと判定する。 Next, in the white balance control for the image frame D, the (horizontal position, vertical position) = (7, 5), (horizontal size, vertical size) = (2, 1) block of the image frame D is a white block. Determine whether it was detected. Here, the WB evaluation values (G / R, G / B) of the block of (horizontal position, vertical position) = (7, 5), (horizontal size, vertical size) = (2, 1) of the image frame D are obtained. As shown in FIG. 8, if it is (0.4, 0.6), this WB evaluation value is out of the white detection area, so in the image frame D, a white block is detected from within the subject area. Judge that it is not.
次に、画像フレームEに対するホワイトバランス制御では、画像フレームEの(水平位置,垂直位置)=(5,5)、(水平サイズ,垂直サイズ)=(2,1)のブロックが、白ブロックとして検出されたかどうかを判定する。ここで、画像フレームEの(水平位置,垂直位置)=(5,5)、(水平サイズ,垂直サイズ)=(2,1)のブロックのWB評価値(G/R,G/B)が、図8に示すように、(0.5,0.9)であったとすると、このWB評価値は白検出エリア内に入っているため、画像フレームEにおいては、被写体エリア内から白ブロックが検出されたと判定する。 Next, in the white balance control for the image frame E, a block of (horizontal position, vertical position) = (5, 5), (horizontal size, vertical size) = (2, 1) of the image frame E is set as a white block. Determine whether it was detected. Here, the WB evaluation values (G / R, G / B) of the block of (horizontal position, vertical position) = (5, 5), (horizontal size, vertical size) = (2, 1) of the image frame E are As shown in FIG. 8, if it is (0.5, 0.9), since this WB evaluation value is in the white detection area, in the image frame E, a white block is detected from within the subject area. It is determined that it has been detected.
本例においては、画像フレームEに対するホワイトバランス制御を行う際に、先行フレームである画像フレームDにおいて被写体エリア内から白ブロックが検出されていないため、被写体エリア内から検出された白ブロックのWB評価値をWB制御値の算出には用いず、被写体エリア内から検出された白ブロック以外の他の白ブロックのWB評価値を用いて、WB制御値の算出を行う。その結果、上述した例と同様に、適切なWB制御値を算出することができ、ホワイトバランス制御を高精度に行って、カラーフェイリアの発生を有効に抑制することができる。 In this example, when white balance control is performed on the image frame E, no white block is detected from the subject area in the image frame D, which is the preceding frame. Therefore, the WB evaluation of the white block detected from the subject area is performed. The value is not used for calculating the WB control value, but the WB control value is calculated using the WB evaluation value of the white block other than the white block detected from the subject area. As a result, as in the above-described example, an appropriate WB control value can be calculated, white balance control can be performed with high accuracy, and the occurrence of color failure can be effectively suppressed.
図9は、被写体追尾機能がオンのときにCPU61により実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。この図9のフローチャートで示す一連の処理は、一例として、CMOSセンサ30からAFE40を介して信号処理IC60内部に画像フレームが入力されるたびに繰り返し行われる。
FIG. 9 is a flowchart showing a series of processes related to white balance control executed by the
信号処理IC60内部に画像フレームが入力されると(ステップS101)、CPU61の特徴量算出部101が、入力された画像フレームを複数のブロックに分割し、分割した複数のブロックそれぞれのWB評価値(G/R,G/B)を算出する(ステップS102)。
When an image frame is input into the signal processing IC 60 (step S101), the feature
次に、CPU61の白ブロック検出部102が、特徴量算出部101により算出されたWB評価値に基づいて、複数に分割された画像フレームの各ブロックのうちで、白色を映したブロックと推定される白ブロックを検出する(ステップS103)。
Next, the white
次に、追尾対象の被写体が既に設定(ロックオン)されているか否かが判定され(ステップS104)、追尾対象の被写体が既に設定されていれば(ステップS104:YES)、CPU61の被写体エリア検出部103が、ステップS101で入力された画像フレームの中から、この追尾対象の被写体を映した被写体エリアを検出する(ステップS105)。一方、追尾対象の被写体が設定されていない場合には(ステップS104:NO)、被写体エリア検出部103は、例えばユーザからの指定に従って、ステップS101で入力された画像フレーム中の被写体を追尾対象として設定し(ステップS106)、その被写体の位置を被写体エリアとする。
Next, it is determined whether or not the tracking target subject has already been set (locked on) (step S104). If the tracking target subject has already been set (step S104: YES), the
次に、CPU61のホワイトバランス制御部104が、白ブロック検出部102により検出された白ブロックの位置と、被写体エリア検出部103により検出された被写体エリアの位置とに基づいて、被写体エリア内から白ブロックが検出されているか否かを判定する(ステップS107)。そして、被写体エリア内から白ブロックが検出されていない場合には(ステップS107:NO)、ホワイトバランス制御部104は、判定結果フラグに1をセットして(ステップS108)、ステップS111に処理を移行する。なお、判定結果フラグは、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かを示す1ビットの情報であり、判定結果フラグ=0は被写体エリア内から白ブロックが検出されたことを示し、判定結果フラグ=1は被写体エリア内から白ブロックが検出されていないことを示している。
Next, based on the position of the white block detected by the white
一方、被写体エリア内から白ブロックが検出された場合には(ステップS107:YES)、ホワイトバランス制御部104は、判定結果フラグ=1となっているか否か、つまり、先行フレームにおいて被写体エリア内から白ブロックが検出されていないかどうかを確認する(ステップS109)。そして、判定結果フラグ=1となっている場合には(ステップS109:YES)、ホワイトバランス制御部104は、被写体エリア内から検出された白ブロックを除き、ステップS103で検出された白ブロックのWB評価値に基づいてWB制御値の算出を行う(ステップS110)。一方、判定結果フラグ=0となっている場合(ステップS109:NO)、あるいは、被写体エリア内から白ブロックが検出されなかった場合(ステップS107:NO)は、ステップS103で検出されたすべての白ブロックのWB評価値に基づいてWB制御値の算出を行う(ステップS111)。
On the other hand, when a white block is detected from the subject area (step S107: YES), the white
ステップS110またはステップS111で算出されたWB制御値は、例えば、RゲインおよびBゲインとしてYUV変換部64に設定される。そして、画像フレームを一単位とするRAW−RGB画像データのR信号に対してRゲインを乗算し、B信号に対してBゲインを乗算することで、オートホワイトバランスが行われる。
For example, the WB control values calculated in step S110 or step S111 are set in the
以上、具体的な例を挙げながら詳細に説明したように、本実施の形態に係るデジタルカメラでは、CPU61のホワイトバランス制御部104が、被写体エリア内から白ブロックが検出され、且つ、先行フレームにおいて被写体エリア内から白ブロックが検出されていない場合に、被写体エリア内から検出された白ブロック以外の白ブロックのWB評価値を用いて算出したWB制御値を用いて画像フレームのホワイトバランスを制御するようにしている。したがって、本実施の形態に係るデジタルカメラによれば、オートホワイトバランスの精度を向上させて、カラーフェイリアの発生を有効に抑制することができる。
As described above in detail with specific examples, in the digital camera according to the present embodiment, the white
(第2の実施の形態)
次に、第2の実施の形態に係るデジタルカメラついて説明する。本実施の形態に係るデジタルカメラは、追尾対象の被写体が人物の顔であるか否かを判定する機能を持ち、追尾対象の被写体が人物の顔である場合は、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かに関わらず、処理対象となる現在の画像フレームにおいて被写体エリア内から検出された白ブロックは用いずに、それ以外の他の白ブロックのWB評価値に基づいてWB制御値を算出するようにしたものである。なお、デジタルカメラの基本的な構成および処理の概要は上述した第1の実施の形態と同様であるため、以下、第1の実施の形態と同様の部分については同一の符号を付して重複した説明を省略する。
(Second Embodiment)
Next, a digital camera according to the second embodiment will be described. The digital camera according to the present embodiment has a function of determining whether or not the subject to be tracked is a person's face, and when the subject to be tracked is a person's face, from within the subject area in the preceding frame Regardless of whether or not a white block is detected, the white block detected from the subject area in the current image frame to be processed is not used, but based on the WB evaluation values of other white blocks. The control value is calculated. Since the basic configuration of the digital camera and the outline of the process are the same as those in the first embodiment described above, the same parts as those in the first embodiment are denoted by the same reference numerals and redundantly described below. The description which was made is abbreviate | omitted.
図10は、本実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPU61’の機能構成を示す機能ブロック図である。本実施の形態におけるCPU61’は、図10に示すように、第1の実施の形態におけるCPU61の機能構成(図3参照)に加えて、顔判定部105および補正部106をさらに備えている。
FIG. 10 is a functional block diagram illustrating a functional configuration of the
顔判定部105は、追尾対象の被写体が人物の顔であるか否かを判定する処理機能である。この顔判定部105は、一例として、画像フレームに対するパターンマッチングなどによって人物の顔を検出する処理を行い、被写体エリア検出部103により検出された被写体エリア内で人物の顔が検出された場合に、追尾対象の被写体が人物の顔であると判定する。なお、画像から人物の顔を検出する手法としては従来様々な方式が提案されており、顔判定部105は、これら公知の技術を採用して人物の顔を検出すればよい。また、顔判定部105による判定は、必ずしもすべての画像フレームに対して行う必要はなく、同一の被写体を追尾している間に追尾対象の被写体が人物の顔であると判定したら、その情報を記憶しておくことで、後の画像フレームでの判定を省略することができる。
The
本実施の形態におけるホワイトバランス制御では、顔判定部105によって追尾対象の被写体が人物の顔であると判定された場合に、ホワイトバランス制御部104’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かの判定を行わず、処理対象となる現在の画像フレームにおいて被写体エリア内から検出された白ブロックを用いずに、白ブロック検出部102により検出された他の白ブロックのWB評価値に基づいてWB制御値を算出する。すなわち、追尾対象の被写体が人物の顔であると判定されていれば、被写体エリアから白ブロックが検出されたとしても、それは白色の領域ではなく、光源の光の影響によりWB評価値が白検出エリアに入った領域であると判定できる。したがって、この場合には、ホワイトバランス制御部104’が被写体エリア内の白ブロックを除いた他の白ブロックのWB評価値に基づいてWB制御値を算出することで、より適切なホワイトバランス制御が可能になる。
In the white balance control in the present embodiment, when the
補正部106は、顔判定部105によって追尾対象の被写体が人物の顔であると判定された場合に、被写体エリアに含まれるブロックのWB評価値を用いて、ホワイトバランス制御部104’が算出したWB制御値を補正する処理機能である。具体的には、補正部106は、顔判定部105によって追尾対象の被写体が人物の顔であると判定された場合に、被写体エリアに含まれるブロックのWB評価値と、ホワイトバランス制御部104’が算出したWB制御値とを比較する。そして、両者の間に予め定めた閾値以上の乖離がある場合に、ホワイトバランス制御部104’が算出したWB制御値を、被写体エリアに含まれるブロックのWB評価値に近づけるように補正する。つまり、補正部106は、ホワイトバランス制御部104’が算出するWB制御値が、上述したWB色空間上で、被写体エリアに含まれるブロック(人物の顔を映したブロック)のWB評価値から一定の距離の範囲内におさまるようにフィードバック制御する。なお、補正部106による具体的な補正方法としては、本発明者が提案した特開2008−236101号公報に開示された技術を適用することができる。
When the
図11は、本実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPU61’により実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。この図11のフローチャートで示す一連の処理は、一例として、CMOSセンサ30からAFE40を介して信号処理IC60内部に画像フレームが入力されるたびに繰り返し行われる。なお、図11のフローチャートにおいて、ステップS201〜ステップS206の処理は、図9のフローチャートで示したステップS101〜ステップS106の処理と同様であり、ステップS208〜ステップS212の処理は、図9のフローチャートで示したステップS107〜ステップS211の処理と同様であるので、これらの処理の説明は省略する。
FIG. 11 is a flowchart showing a series of processes related to white balance control executed by the CPU 61 'when the subject tracking function is on in the digital camera according to the present embodiment. The series of processes shown in the flowchart of FIG. 11 is repeatedly performed every time an image frame is input from the
本実施の形態におけるホワイトバランス制御では、CPU61’のホワイトバランス制御部104’が、ステップS208において被写体エリア内から白ブロックが検出されているか否かを判定する前に、CPU61’の顔判定部105が、追尾対象の被写体が人物の顔か否かの判定を行う(ステップS207)。そして、追尾対象の被写体が人物の顔ではないと判定された場合に(ステップS207:NO)、ホワイトバランス制御部104’が、第1の実施形態と同様の処理(ステップS208〜ステップS212の処理)を実施する。一方、追尾対象の被写体が人物の顔であると判定された場合(ステップS207:YES)、ホワイトバランス制御部104’は、被写体エリア以外から検出された白ブロックのWB評価値に基づいて、WB制御値の算出を行う(ステップS213)。
In the white balance control in the present embodiment, the face
次に、CPU61’の補正部106が、ステップS213で算出されたWB制御値と、被写体エリア内のブロックのWB評価値とを比較し、両者の乖離が予め定めた閾値以上となっているか否かを判定する(ステップS214)。そして、両者の乖離が閾値以上となっている場合には(ステップS214:YES)、補正部106は、ステップS213で算出されたWB制御値を、被写体エリア内のブロックのWB評価値に近づけるように補正する(ステップS215)。
Next, the
以上のように、本実施の形態に係るデジタルカメラでは、CPU61’の顔判定部105が、追尾対象の被写体が人物の顔であるか否かを判定し、追尾対象の被写体が人物の顔であると判定された場合は、ホワイトバランス制御部104’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かに関わらず、被写体エリア以外から検出された白ブロックのWB評価値に基づいてWB制御値を算出するようにしている。したがって、上述した第1の実施の形態と比較して、さらにオートホワイトバランスの精度を向上させることができ、カラーフェイリアの発生をより有効に抑制することができる。
As described above, in the digital camera according to the present embodiment, the
また、本実施の形態に係るデジタルカメラによれば、追尾対象の被写体が人物の顔であると判定された場合に、CPU61’の補正部106が、ホワイトバランス制御部104’ により算出されたWB制御値を被写体エリア内のブロックのWB評価値と比較し、両者の乖離が閾値以上となっている場合に、ホワイトバランス制御部104’により算出されたWB制御値を被写体エリア内のブロックのWB評価値に近づけるように補正するので、人物の顔を考慮したオートホワイトバランスを実施することができ、カラーフェイリアの発生をより有効に抑制することができる。
Also, with the digital camera according to the present embodiment, when it is determined that the subject to be tracked is a person's face, the
(第3の実施の形態)
次に、第3の実施の形態に係るデジタルカメラついて説明する。本実施の形態に係るデジタルカメラは、被写体エリアの大きさを判定する機能を持ち、被写体エリアの大きさが基準値よりも小さい場合は、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かに関わらず、処理対象となる現在の画像フレームにおいて被写体エリア内から検出された白ブロックは用いずに、それ以外の他の白ブロックのWB評価値に基づいてWB制御値を算出するようにしたものである。なお、デジタルカメラの基本的な構成および処理の概要は上述した第1の実施の形態と同様であるため、以下、第1の実施の形態と同様の部分については同一の符号を付して重複した説明を省略する。
(Third embodiment)
Next, a digital camera according to the third embodiment will be described. The digital camera according to the present embodiment has a function of determining the size of the subject area. If the size of the subject area is smaller than the reference value, whether or not a white block is detected in the subject area in the preceding frame. Regardless of this, the WB control value is calculated based on the WB evaluation value of other white blocks without using the white block detected from the subject area in the current image frame to be processed. It is a thing. Since the basic configuration of the digital camera and the outline of the process are the same as those in the first embodiment described above, the same parts as those in the first embodiment are denoted by the same reference numerals and redundantly described below. The description which was made is abbreviate | omitted.
図12は、本実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPU61’’の機能構成を示す機能ブロック図である。本実施の形態におけるCPU61’’は、図12に示すように、第1の実施の形態におけるCPU61の機能構成(図3参照)に加えて、被写体エリア判定部107をさらに備えている。
FIG. 12 is a functional block diagram showing a functional configuration of the
被写体エリア判定部107は、被写体エリア検出部103により検出された被写体エリアの大きさを判定する処理機能である。画像フレーム全体の大きさに対して被写体エリアの大きさが十分に小さい場合は、被写体エリア内のブロックのWB評価値がWB制御値の算出に与える影響は小さくなる。例えば、画像フレーム全体を縦横16×16の256ブロックに分割した場合において、被写体エリアの大きさが1ブロック分にしか相当しないような場合には、被写体エリア内のブロックのWB評価値は無視することができる。本実施の形態においては、この被写体エリアの大きさが予め定めた基準値よりも小さいか否かを判定するために、被写体エリア判定部107が設けられている。
The subject
本実施の形態におけるホワイトバランス制御では、被写体エリア判定部107によって被写体エリアの大きさが基準値よりも小さいと判定された場合に、ホワイトバランス制御部104’’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かの判定を行わず、処理対象となる現在の画像フレームにおいて被写体エリア以外から検出された他の白ブロックのWB評価値に基づいてWB制御値を算出する。すなわち、被写体エリアの大きさが基準値よりも小さければ、被写体エリアを考慮せずにWB制御値を算出することができ、これにより、被写体追尾の影響によりオートホワイトバランスが不安定になることを有効に防止し、また、CPU61’’の処理負荷を低減させて電力消費量の削減を図ることができる。
In the white balance control according to the present embodiment, when the subject
図13は、本実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPU61’’により実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。この図13のフローチャートで示す一連の処理は、一例として、CMOSセンサ30からAFE40を介して信号処理IC60内部に画像フレームが入力されるたびに繰り返し行われる。なお、図13のフローチャートにおいて、ステップS301〜ステップS308の処理は、図9のフローチャートで示したステップS101〜ステップS108の処理と同様であり、ステップS310〜ステップS312の処理は、図9のフローチャートで示したステップS109〜ステップS111の処理と同様であるので、これらの処理の説明は省略する。
FIG. 13 is a flowchart showing a series of processes related to white balance control executed by the
本実施の形態におけるホワイトバランス制御では、被写体エリア内から白ブロックが検出されていると判定された場合に(ステップS307:Yes)、CPU61’’の被写体エリア判定部107が、被写体エリアの大きさが予め定めた基準値以上であるか否かを判定する(ステップS309)。そして、被写体エリアの大きさが基準値以上であると判定された場合に(ステップS309:YES)、ホワイトバランス制御部104’’が、第1の実施形態と同様に、判定結果フラグ=1となっているか否か、つまり、先行フレームにおいて被写体エリア内から白ブロックが検出されていないかどうかを確認する(ステップS310)。一方、被写体エリアの大きさが基準値よりも小さいと判定された場合には(ステップS309:NO)、ホワイトバランス制御部104’’は、ステップS310の判定を行うことなくステップS311に処理を移行し、ステップS311において、被写体エリア以外から検出された白ブロックのWB評価値に基づいて、WB制御値の算出を行う。
In the white balance control according to the present embodiment, when it is determined that a white block is detected from within the subject area (step S307: Yes), the subject
以上のように、本実施の形態に係るデジタルカメラでは、CPU61’’の被写体エリア判定部107が被写体エリアの大きさを判定し、被写体エリアの大きさが予め定めた基準値よりも小さい場合には、ホワイトバランス制御部104’’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かに関わらず、被写体エリア以外から検出された白ブロックのWB評価値に基づいてWB制御値を算出するようにしている。したがって、上述した第1の実施の形態と同様にオートホワイトバランスの精度を向上させて、カラーフェイリアの発生をより有効に抑制することができるとともに、被写体追尾の影響によりオートホワイトバランスが不安定になることを有効に防止することができ、さらに、CPU61’’の処理負荷を低減させて電力消費量の削減を図ることができる。
As described above, in the digital camera according to the present embodiment, when the subject
(第4の実施の形態)
次に、第4の実施の形態に係るデジタルカメラついて説明する。本実施の形態に係るデジタルカメラは、CMOSセンサ30から連続的に出力され信号処理IC60内に入力される複数の画像フレーム間において、追尾対象の被写体の背景が変化しているか否かを判定する機能を持ち、追尾対象の被写体の背景が変化している場合は、処理対象となる画像フレームに対するホワイトバランス制御を行わないようにしたものである。なお、デジタルカメラの基本的な構成および処理の概要は上述した第1の実施の形態と同様であるため、以下、第1の実施の形態と同様の部分については同一の符号を付して重複した説明を省略する。
(Fourth embodiment)
Next, a digital camera according to the fourth embodiment will be described. The digital camera according to the present embodiment determines whether the background of the subject to be tracked has changed between a plurality of image frames that are continuously output from the
図14は、本実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPU61’’’の機能構成を示す機能ブロック図である。本実施の形態におけるCPU61’’’は、図14に示すように、第1の実施の形態におけるCPU61の機能構成(図3参照)に加えて、背景変化判定部108をさらに備えている。
FIG. 14 is a functional block diagram showing a functional configuration of the
背景変化判定部108は、CMOSセンサ30から連続的に出力され信号処理IC60内に入力される複数の画像フレーム間において、追尾対象の被写体の背景が変化しているか否かを判定する処理機能である。
The background
固定された背景の中で追尾対象の被写体が移動しているような撮影シーンにおいては、画像における光源が大きく変化することはないが、例えばカメラアングルを随時変えながら追尾対象の被写体を追っているような撮影シーンにおいては、連続する複数の画像フレーム間で光源が大きく変わる可能性がある。そして、このように連続する複数の画像フレーム間で被写体の背景が変化し、光源が大きく変わるような場合には、画像フレーム単位でホワイトバランス制御を実行するとオートホワイトバランスが不安定になる可能性がある。 In a shooting scene where the subject to be tracked is moving in a fixed background, the light source in the image does not change significantly, but for example, the subject to be tracked may be followed while changing the camera angle as needed. In a photographic scene, the light source may change greatly between a plurality of consecutive image frames. If the background of the subject changes between a plurality of consecutive image frames and the light source changes greatly, auto white balance may become unstable if white balance control is executed in units of image frames. There is.
そこで、本実施の形態においては、CPU61’’’の背景変化判定部108が、連続する複数の画像フレーム間で被写体の背景が変化しているか否かを判定し、被写体の背景が変化していると判定された場合には、ホワイトバランス制御部104’’’が処理対象となる画像フレームに対するホワイトバランス制御を行わないようにしている。ホワイトバランス制御部104’’’がホワイトバランス制御を行わない場合は、現在の画像フレームに対応した新たなWB制御値が算出されない。この場合、現在の画像フレームに対応するRAW−RGB画像データのR信号およびB信号には、一例として、YUV変換部64に既に設定されているRゲインやBゲインが乗算されることになる。
Therefore, in the present embodiment, the background
背景変化判定部108が、連続する複数の画像フレーム間で被写体の背景が変化しているか否かを判定する手法としては、様々な手法が考えられる。例えば、画像フレームの上下左右端のAE評価値、WB評価値、AF評価値を、連続する画像フレーム間で比較することによって、背景が変化しているか否かを判定することができる。連続する複数の画像フレーム間で被写体の背景に変化がなければこれらの評価値の変化は小さい。一方、連続する複数の画像フレーム間で被写体の背景が変化していれば、これらの評価値が大きく変化する。したがって、背景変化判定部108は、連続する複数の画像フレーム間でこれらの評価値が予め定めた閾値以上変化している場合に、被写体の背景が変化していると判定することができる。
Various methods are conceivable for the background
図15は、本実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPU61’’’により実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。この図15のフローチャートで示す一連の処理は、一例として、CMOSセンサ30からAFE40を介して信号処理IC60内部に画像フレームが入力されるたびに繰り返し行われる。なお、図15のフローチャートにおいて、ステップS401〜ステップS406の処理は、図9のフローチャートで示したステップS101〜ステップS106の処理と同様であり、ステップS408〜ステップS412の処理は、図9のフローチャートで示したステップS107〜ステップS111の処理と同様であるので、これらの処理の説明は省略する。
FIG. 15 is a flowchart showing a series of processing related to white balance control executed by the
本実施の形態におけるホワイトバランス制御では、CPU61’’’のホワイトバランス制御部104’’’が、ステップS408において被写体エリア内から白ブロックが検出されているか否かを判定する前に、CPU61’’’の背景変化判定部108が、追尾対象の被写体の背景が変化しているか否かの判定を行う(ステップS407)。そして、追尾対象の被写体の背景に変化はないと判定された場合に(ステップS407:NO)、ホワイトバランス制御部104’’’が、第1の実施形態と同様の処理(ステップS408〜ステップS412の処理)を実施する。一方、追尾対象の被写体の背景が変化していると判定された場合には(ステップS407:YES)、ホワイトバランス制御部104’’’は、処理対象となる現在の画像フレームに対応するWB制御値の算出は行わずに、処理を終了する。
In the white balance control in the present embodiment, the
以上のように、本実施の形態に係るデジタルカメラでは、CPU61’’’の背景変化判定部108が連続する複数の画像フレーム間で追尾対象の被写体の背景が変化しているか否かを判定し、背景が変化していると判定された場合には、ホワイトバランス制御部104’’’が、処理対象となる現在の画像フレームに対するホワイトバランス制御を行わないようにしている。したがって、上述した第1の実施の形態と同様にオートホワイトバランスの精度を向上させて、カラーフェイリアの発生をより有効に抑制することができるとともに、光源が大きく変化することに起因してオートホワイトバランスが不安定になることを有効に防止することができる。
As described above, in the digital camera according to the present embodiment, the background
以上、本発明の具体的な実施の形態として第1乃至第4の実施の形態について詳しく説明したが、本発明は上述した各実施の形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化することができる。また、上述した各実施の形態に開示されている複数の構成要素の適宜な組み合わせにより、種々の発明を形成することができる。例えば、上述した各実施の形態に示される全構成要素からいくつかの構成要素を削除してもよい。さらに、異なる実施の形態にわたる構成要素を適宜組み合わせてもよい。 As described above, the first to fourth embodiments have been described in detail as specific embodiments of the present invention. However, the present invention is not limited to the above-described embodiments as they are, and the gist thereof is described in the implementation stage. The constituent elements can be modified and embodied without departing from the above. In addition, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the respective embodiments described above. For example, you may delete a some component from all the components shown by each embodiment mentioned above. Furthermore, constituent elements over different embodiments may be appropriately combined.
30 CMOSセンサ
60 信号処理IC
61(61’,61’’,61’’’) CPU
101 特徴量算出部
102 白ブロック検出部
103 被写体エリア検出部
104(104’,104’’,104’’’) ホワイトバランス制御部
105 顔判定部
106 補正部
107 被写体エリア判定部
108 背景変化判定部
30 CMOS sensor 60 Signal processing IC
61 (61 ′, 61 ″, 61 ′ ″) CPU
DESCRIPTION OF
Claims (6)
前記撮像素子から出力される画像フレームを複数のブロックに分割し、分割した複数のブロックそれぞれについて、各ブロックの色の特徴を表す特徴量を算出する特徴量算出手段と、
前記特徴量に基づいて、前記複数のブロックのうちで、白色を映したブロックと推定される白ブロックを検出する白ブロック検出手段と、
前記画像フレームの中で、追尾する被写体を映した被写体エリアを検出する被写体エリア検出手段と、
前記画像フレームにおいて前記被写体エリア内から前記白ブロックが検出され、且つ、前記画像フレームよりも前に前記撮像素子から出力された画像フレームである先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されていない場合に、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて算出した制御値を用いて、前記画像フレームのホワイトバランスを制御するホワイトバランス制御手段と、を備えることを特徴とする撮像装置。 An image sensor;
A feature amount calculating unit that divides an image frame output from the image sensor into a plurality of blocks, and calculates a feature amount representing a color feature of each block for each of the plurality of divided blocks;
Based on the feature amount, a white block detection unit that detects a white block that is estimated to be a block that reflects white among the plurality of blocks;
A subject area detecting means for detecting a subject area that shows a subject to be tracked in the image frame;
The white block is detected from within the subject area in the image frame, and the white block is detected from within the subject area in a preceding frame that is an image frame output from the image sensor before the image frame. A white balance for controlling the white balance of the image frame using a control value calculated based on the feature amount of the white block other than the white block detected in the subject area in the image frame. And an imaging device.
前記ホワイトバランス制御手段は、前記被写体が人物の顔であると判定された場合は、前記先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されたか否かに関わらず、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて、前記制御値を算出することを特徴とする請求項1に記載の撮像装置。 Face determination means for determining whether or not the subject is a person's face;
If it is determined that the subject is a person's face, the white balance control means determines whether the subject is in the image frame regardless of whether the white block is detected from within the subject area in the preceding frame. The imaging apparatus according to claim 1, wherein the control value is calculated based on the feature amount of the white block other than the white block detected from within the area.
前記ホワイトバランス制御手段は、前記被写体エリアの大きさが基準値よりも小さいと判定された場合は、前記先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されたか否かに関わらず、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて、前記制御値を算出することを特徴とする請求項1に記載の撮像装置。 A subject area determination means for determining the size of the subject area;
When it is determined that the size of the subject area is smaller than a reference value, the white balance control means determines whether the white block is detected from within the subject area in the preceding frame. The imaging apparatus according to claim 1, wherein the control value is calculated based on the feature amount of the white block other than the white block detected from within the subject area in a frame.
前記ホワイトバランス制御手段は、前記被写体の背景が変化していると判定された場合に、前記ホワイトバランスの制御を行わないことを特徴とする請求項1に記載の撮像装置。 A background change determination means for determining whether or not the background of the subject has changed between the plurality of image frames continuously output from the image sensor;
The imaging apparatus according to claim 1, wherein the white balance control unit does not control the white balance when it is determined that the background of the subject has changed.
前記特徴量に基づいて、前記複数のブロックのうちで、白色を映したブロックと推定される白ブロックを検出するステップと、
前記画像フレームの中で、追尾する被写体を映した被写体エリアを検出するステップと、
前記画像フレームにおいて前記被写体エリア内から前記白ブロックが検出され、且つ、前記画像フレームよりも前に前記撮像素子から出力された画像フレームである先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されていない場合に、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて算出した制御値を用いて、前記画像フレームのホワイトバランスを制御するステップと、を含むことを特徴とするホワイトバランス制御方法。 Dividing the image frame output from the image sensor into a plurality of blocks, and calculating a feature amount representing a color feature of each block for each of the plurality of divided blocks;
Detecting a white block that is estimated to be a white-colored block among the plurality of blocks based on the feature amount; and
Detecting a subject area showing a subject to be tracked in the image frame;
The white block is detected from within the subject area in the image frame, and the white block is detected from within the subject area in a preceding frame that is an image frame output from the image sensor before the image frame. If not, using the control value calculated based on the feature amount of the white block other than the white block detected in the subject area in the image frame, controlling the white balance of the image frame; And a white balance control method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010265155A JP5569361B2 (en) | 2010-11-29 | 2010-11-29 | Imaging apparatus and white balance control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010265155A JP5569361B2 (en) | 2010-11-29 | 2010-11-29 | Imaging apparatus and white balance control method |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012119756A JP2012119756A (en) | 2012-06-21 |
JP5569361B2 true JP5569361B2 (en) | 2014-08-13 |
Family
ID=46502162
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010265155A Active JP5569361B2 (en) | 2010-11-29 | 2010-11-29 | Imaging apparatus and white balance control method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5569361B2 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6494181B2 (en) | 2014-05-30 | 2019-04-03 | キヤノン株式会社 | Imaging device, control method thereof, and control program |
CN105981379B (en) * | 2014-09-17 | 2018-09-25 | 深圳市大疆创新科技有限公司 | Auto white balance system and method |
CN107959840A (en) * | 2017-12-07 | 2018-04-24 | 广东欧珀移动通信有限公司 | Image processing method, device, computer-readable recording medium and computer equipment |
JP7205380B2 (en) * | 2019-05-27 | 2023-01-17 | 三菱電機株式会社 | Imaging device and imaging method |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH09215001A (en) * | 1996-02-08 | 1997-08-15 | Hitachi Ltd | Image pickup device |
JP2000059807A (en) * | 1998-08-04 | 2000-02-25 | Hitachi Ltd | Color camera |
JP4668956B2 (en) * | 2007-06-29 | 2011-04-13 | 富士フイルム株式会社 | Image processing apparatus and method, and program |
JP5259291B2 (en) * | 2008-07-30 | 2013-08-07 | オリンパス株式会社 | White balance correction device and signal processing program |
-
2010
- 2010-11-29 JP JP2010265155A patent/JP5569361B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012119756A (en) | 2012-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5066398B2 (en) | Image processing apparatus and method, and program | |
KR101643321B1 (en) | A digital photographing apparatus, a method for controlling the same, and a computer-readable medium | |
KR101303410B1 (en) | Image capture apparatus and image capturing method | |
JP4787180B2 (en) | Imaging apparatus and imaging method | |
JP4615458B2 (en) | Exposure control method and imaging apparatus | |
JP4668956B2 (en) | Image processing apparatus and method, and program | |
JP5782813B2 (en) | Imaging apparatus and image display method | |
JP2014120844A (en) | Image processing apparatus and imaging apparatus | |
JP2008236101A (en) | Imaging device and imaging method | |
JP2017022610A (en) | Image processing apparatus and image processing method | |
TW201301866A (en) | Image processing device capable of generating wide-range image, image processing method, and recording medium | |
JP2010147786A (en) | Imaging device and image processing method | |
US10839497B2 (en) | Image processing apparatus and method | |
JP5211926B2 (en) | Digital camera, image processing apparatus, and image processing program | |
JP5569361B2 (en) | Imaging apparatus and white balance control method | |
JP2009278432A (en) | Imaging apparatus, and imaging method in imaging apparatus | |
JP5048599B2 (en) | Imaging device | |
JP4842919B2 (en) | Display device, photographing device, and display method | |
JP5311922B2 (en) | Imaging apparatus and control method thereof | |
JP2008298847A (en) | Photographing method and digital camera | |
JP2012163679A (en) | Imaging device, stroboscope control method, and stroboscope control program | |
JP2010103672A (en) | Imaging device | |
JP2016046610A (en) | Imaging apparatus | |
US10674092B2 (en) | Image processing apparatus and method, and image capturing apparatus | |
JP2005122016A (en) | Automatic focusing camera |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20131011 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140421 |
|
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: 20140527 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140609 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 5569361 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |