JP2012119756A - Imaging apparatus and white-balance control method - Google Patents

Imaging apparatus and white-balance control method Download PDF

Info

Publication number
JP2012119756A
JP2012119756A JP2010265155A JP2010265155A JP2012119756A JP 2012119756 A JP2012119756 A JP 2012119756A JP 2010265155 A JP2010265155 A JP 2010265155A JP 2010265155 A JP2010265155 A JP 2010265155A JP 2012119756 A JP2012119756 A JP 2012119756A
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.)
Granted
Application number
JP2010265155A
Other languages
Japanese (ja)
Other versions
JP5569361B2 (en
Inventor
Hiroshi Mizufuji
浩 水藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2010265155A priority Critical patent/JP5569361B2/en
Publication of JP2012119756A publication Critical patent/JP2012119756A/en
Application granted granted Critical
Publication of JP5569361B2 publication Critical patent/JP5569361B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Color Image Communication Systems (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)
  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide: an imaging device which can suppress occurence of color failure effectively by enhancing the accuracy of automatic white balance; and a white balance control method.SOLUTION: An imaging apparatus comprises: a feature quantity calculation unit 101 which divides an image frame output from a CMOS sensor into a plurality of blocks and calculates the WB evaluation values of the plurality of blocks thus divided; a white-block detection unit 102 which detects a white block based on the feature quantity thus calculated; a subject area detection unit 103 which detects a subject area from an image frame; and a white balance control unit 104 which controls the white balance of an image frame by calculating a WB control value based on the WB evaluation value of a white block detected from other than the subject when a white block is detected in the subject area of a current image frame and when no white block is detected in the subject area of a preceding frame.

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 Patent Document 1 and Patent Document 2 are known.

特許文献1には、動画撮影におけるカラーフェイリアの軽減方法として、被写体追尾情報を用いた制御方法が開示されている。具体的には、主要な被写体の代表的な色を示す領域(例えば、人物の肌色)を基準領域として設定し、追尾手段により、この基準領域を画面内での被写体の移動に合わせて追従させ、この基準領域に含まれる色情報を取得し、各フレームにおいて被写体の同一の部分(例えば人物の頬の部分)を表す画像データに基づいて、露出およびホワイトバランスを適正に補正できるようにしている。すなわち、この特許文献1に記載の技術では、利用者が設定した基準領域を、その色情報から順次取得されるフレームに対して探索することで、たとえば被写体が撮像装置に急に近づいてきた場合でも肌色引き込みによるカラーフェイリアを防止できるようにしている。   Patent Document 1 discloses a control method using subject tracking information as a method for reducing color failure in moving image shooting. Specifically, an area showing a representative color of a main subject (for example, a person's skin color) is set as a reference area, and the reference means is made to follow the movement of the subject on the screen by the tracking means. The color information included in the reference area is acquired, and exposure and white balance can be appropriately corrected based on image data representing the same portion of the subject (for example, the cheek portion of a person) in each frame. . That is, in the technique described in Patent Document 1, when a reference area set by a user is searched for frames sequentially acquired from the color information, for example, a subject suddenly approaches the imaging apparatus. However, it prevents color failure due to skin color pull-in.

また、特許文献2には、複数の撮像システムにより動画像を追尾しながら撮像するシステムにおいて、被写体の移動に伴い被写体を撮像していたカメラからとのカメラに切り替えて被写体の撮像を引き継ぐ際に、被写体を撮像していた撮像条件を、撮像を引き継いだカメラの撮像条件として継承することで、カメラ切換時の不自然な画像の変化を抑制することが記載されている。   Further, in Patent Document 2, in a system in which a moving image is tracked by a plurality of imaging systems, when switching from a camera that has captured a subject to a camera with the movement of the subject and taking over imaging of the subject, In addition, it is described that an unnatural image change at the time of camera switching is suppressed by inheriting an imaging condition for capturing an object as an imaging condition for a camera that has succeeded in imaging.

しかしながら、特許文献1に記載の技術では、そもそもユーザが設定する被写体の代表的な色を示す基準領域が、光源色(無彩色)の領域なのか、物体色(有彩色)の領域なのか分からず、基準領域の色情報をどのようにホワイトバランス制御に用いるのか不明である。また、特許文献1に記載の技術では、被写体が動くことで異なる光源下に移動した場合、基準領域から得られる色情報は大きく変わってしまい、本来同一基準領域と判定しなければならないのに誤判定し、カラーフェイリアが発生してしまうという問題がある。   However, in the technique described in Patent Document 1, it is determined whether the reference area indicating the representative color of the subject set by the user is the light source color (achromatic) area or the object color (chromatic color) area. It is unclear how the color information of the reference area is used for white balance control. Further, in the technique described in Patent Document 1, when the subject moves under a different light source due to movement, the color information obtained from the reference region changes greatly, and it is erroneous that the original reference region must be determined as the original. There is a problem that a color failure occurs.

また、特許文献2に記載の技術においても、被写体が異なる光源下に移動した場合、カメラ切換時にホワイトバランス等の撮像条件を引き継いでしまうので、移動後の撮影環境に適したホワイトバランスが設定できず、カラーフェイリアが発生してしまうという問題がある。   Also, in the technique described in Patent Document 2, when the subject moves under a different light source, the imaging condition such as white balance is inherited when the camera is switched, so that a white balance suitable for the shooting environment after the movement can be set. However, there is a problem that color failure occurs.

本発明は、上記に鑑みてなされたものであって、オートホワイトバランスの精度を向上させて、カラーフェイリアの発生を有効に抑制することができる撮像装置およびホワイトバランス制御方法を提供することを目的としている。   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.

図1−1は、デジタルカメラの上面図である。FIG. 1-1 is a top view of the digital camera. 図1−2は、デジタルカメラの正面図である。FIG. 1-2 is a front view of the digital camera. 図1−3は、デジタルカメラの裏面図である。FIG. 1-3 is a back view of the digital camera. 図2は、デジタルカメラの制御系の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of the control system of the digital camera. 図3は、第1の実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPUの機能構成を示す機能ブロック図である。FIG. 3 is a functional block diagram illustrating a functional configuration of a CPU for performing white balance control in the digital camera according to the first embodiment. 図4は、各ブロックのWB評価値をWB色空間上にプロットした様子を示す図である。FIG. 4 is a diagram illustrating a state in which the WB evaluation values of the respective blocks are plotted on the WB color space. 図5は、追尾対象の被写体の動きと時系列で入力される画像フレームAおよび画像フレームB内の被写体エリアの位置とを説明する図である。FIG. 5 is a diagram for explaining the movement of the subject to be tracked and the positions of the subject areas in the image frame A and the image frame B input in time series. 図6は、図5の画像フレームAおよび画像フレームBから算出したWB評価値をWB色空間上にプロットした様子を示す図である。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. 図7は、追尾対象の被写体の動きと時系列で入力される画像フレームC、画像フレームDおよび画像フレームE内の被写体エリアの位置とを説明する図である。FIG. 7 is a diagram for explaining the movement of the subject to be tracked and the position of the subject area in the image frame C, the image frame D, and the image frame E input in time series. 図8は、図7の画像フレームC、画像フレームDおよび画像フレームEから算出したWB評価値をWB色空間上にプロットした様子を示す図である。FIG. 8 is a diagram illustrating 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. 7 are plotted on the WB color space. 図9は、第1の実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPUにより実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。FIG. 9 is a flowchart showing a series of processes related to white balance control executed by the CPU when the subject tracking function is on in the digital camera according to the first embodiment. 図10は、第2の実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPUの機能構成を示す機能ブロック図である。FIG. 10 is a functional block diagram showing a functional configuration of a CPU for performing white balance control in the digital camera according to the second embodiment. 図11は、第2の実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPUにより実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。FIG. 11 is a flowchart showing a series of processes related to white balance control executed by the CPU when the subject tracking function is on in the digital camera according to the second embodiment. 図12は、第3の実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPUの機能構成を示す機能ブロック図である。FIG. 12 is a functional block diagram showing a functional configuration of a CPU for performing white balance control in a digital camera according to the third embodiment. 図13は、第3の実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPUにより実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。FIG. 13 is a flowchart showing a series of processes related to white balance control executed by the CPU when the subject tracking function is on in the digital camera according to the third embodiment. 図14は、第4の実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPUの機能構成を示す機能ブロック図である。FIG. 14 is a functional block diagram illustrating a functional configuration of a CPU for performing white balance control in a digital camera according to the fourth embodiment. 図15は、第4の実施の形態に係るデジタルカメラにおいて、被写体追尾機能がオンのときにCPUにより実行されるホワイトバランス制御に関わる一連の処理を示すフローチャートである。FIG. 15 is a flowchart showing a series of processes related to white balance control executed by the CPU when the subject tracking function is on in the digital camera according to the fourth embodiment.

以下に添付図面を参照して、この発明に係る撮像装置およびホワイトバランス制御方法の最良な実施の形態を詳細に説明する。なお、以下ではイメージセンサとして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 sub LCD 1 that displays the number of still images that can be taken and the like, and a release shutter that is pressed when taking a still image. A button 2 and a mode dial 3 that is operated when switching between various modes such as a recording (shooting) mode for recording an image, a playback mode for reproducing the recorded image, and a SETUP mode for camera setting.

また、本実施の形態に係るデジタルカメラは、図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 light emitting unit 4 that emits a strobe, a distance measuring unit 5 that measures the distance to the subject, and a not-shown figure. A remote control light receiving unit 6 that receives an infrared signal from a remote control terminal, a lens barrel unit 7 that includes a zoom lens 25, a focus lens 26, a mechanical shutter 27, and a support member that supports these integrally, and an optical finder. (Front) 8 is provided. Further, the side surface of the digital camera according to the present embodiment is provided with a memory card throttle for inserting a memory card 80, which will be described later, and a battery accommodating portion for accommodating a battery. The memory card throttle and the battery accommodating portion are covered with a lid. It is occluded by the body 9.

また、本実施の形態に係るデジタルカメラは、その裏面に、オートフォーカス作動時に点灯するオートフォーカス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 strobe LED 11 that is turned on when the strobe is lighted, a display of various setting screens, and a display of a playback image. And an LCD monitor 12 used as an electronic viewfinder at the time of photographing, an optical viewfinder (back surface) 13, a zoom button (WIDE) 14 operated during wide-angle zooming, and a zoom button (TELE) 15 operated during telephoto zooming And a power switch 16 and a self-timer / deletion switch 17 operated when the self-timer is activated.

さらに、本実施の形態に係るデジタルカメラは、その裏面に、メニュー選択の際に操作されるメニュースイッチ18と、選択した事項を確定させる際に操作されるOKスイッチ19と、LCDモニタ12に表示する再生画像を切替える際に操作される画像確認スイッチ(左)20および画像確認スイッチ(右)21と、マクロ撮影を行う際に操作されるマクロスイッチ22と、ストロボ発光モードの切替え時に操作されるストロボスイッチ23と、LCDモニタ12の表示の切替え時に操作されるディスプレイスイッチ24を有する。   Furthermore, the digital camera according to the present embodiment has a menu switch 18 that is operated when selecting a menu, an OK switch 19 that is operated when confirming a selected item, and a display on the LCD monitor 12 on the back side. An image confirmation switch (left) 20 and an image confirmation switch (right) 21 that are operated when switching the reproduction image to be performed, a macro switch 22 that is operated when performing macro photography, and a flash light emission mode that are operated. A strobe switch 23 and a display switch 24 operated when switching the display of the LCD monitor 12 are provided.

図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 motor driver 28 for driving a zoom lens 25, a focus lens 26, and a mechanical shutter 27, a CMOS sensor 30 as an image sensor, and a CMOS sensor 30 as a control system. An analog front end (AFE) 40 that processes the output analog image signal to generate digital image data, a timing generator (TG) 50 that outputs a drive timing signal to the CMOS sensor 30 and the AFE 40, and the AFE 40 A signal processing IC 60 that performs various digital image processing on the output digital image data and controls the operation of the entire digital camera is provided. In addition to the LCD monitor 12 described above, an SDRAM 70, a memory card 80, a ROM 90, an operation unit 100, and the like are connected to the signal processing IC 60.

メカニカルシャッタ27は、開状態によりCMOSセンサ30に光を入射させ、閉状態によりCMOSセンサ30への光の入射を遮断する機械的なシャッタである。このメカニカルシャッタ27は、光学レンズであるズームレンズ25やフォーカスレンズ26とともに、モータドライバ28により駆動される。モータドライバ28によるズームレンズ25、フォーカスレンズ26およびメカニカルシャッタ27の駆動は、信号処理IC60の内部に含まれるCPU61によって制御される。   The mechanical shutter 27 is a mechanical shutter that allows light to enter the CMOS sensor 30 in the open state and blocks light from entering the CMOS sensor 30 in the closed state. The mechanical shutter 27 is driven by a motor driver 28 together with the zoom lens 25 and the focus lens 26 which are optical lenses. Driving of the zoom lens 25, the focus lens 26, and the mechanical shutter 27 by the motor driver 28 is controlled by a CPU 61 included in the signal processing IC 60.

CMOSセンサ30は、光電変換機能によって、光学レンズにより結像した光学像をその明るさに比例した電気信号に変換して出力する固体撮像素子である。CMOSセンサ30は、TG50から出力される駆動タイミング信号に従って駆動され、各画素の露光や信号読み出しが制御される。CMOSセンサ30からの出力電気信号は、AFE40に入力される。   The CMOS sensor 30 is a solid-state imaging device that converts an optical image formed by an optical lens into an electrical signal proportional to its brightness and outputs the photoelectric image by a photoelectric conversion function. The CMOS sensor 30 is driven according to a drive timing signal output from the TG 50, and exposure and signal readout of each pixel are controlled. An output electrical signal from the CMOS sensor 30 is input to the AFE 40.

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 AFE 40 samples and holds the output electrical signal (analog pixel signal) of the CMOS sensor 30 (correlated double sampling), an AGC (Auto Gain Control) 42 that adjusts the gain of the signal sampled by the CDS 41, and the AGC 42 And an A / D converter (A / D) 43 for converting the output into a digital signal. Each part constituting the AFE 40 is driven in synchronism with the CMOS sensor 30 in accordance with a drive timing signal output from the TG 50, and gain setting and the like in the AGC 42 are performed in accordance with instructions of the CPU 61 included in the signal processing IC 60. The Digital data (digital image data) output by the AFE 40 is input to the signal processing IC 60.

TG50には、信号処理IC60内部に含まれる同期信号生成部69によって生成された垂直同期信号VDおよび水平同期信号HDが供給される。TG50は、これら垂直同期信号VDおよび水平同期信号HDに基づいて、CMOSセンサ30およびAFE40を同期して駆動させるための駆動タイミング信号を生成し、生成した駆動タイミング信号をCMOSセンサ30およびAFE40に供給する。   The TG 50 is supplied with the vertical synchronization signal VD and the horizontal synchronization signal HD generated by the synchronization signal generation unit 69 included in the signal processing IC 60. The TG 50 generates a drive timing signal for driving the CMOS sensor 30 and the AFE 40 in synchronization based on the vertical synchronization signal VD and the horizontal synchronization signal HD, and supplies the generated drive timing signal to the CMOS sensor 30 and the AFE 40. To do.

信号処理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 CPU 61 that comprehensively controls the operation of the entire digital camera, a CMOS I / F unit 62 that captures digital image data from the AFE 40 in accordance with the vertical synchronization signal VD and the horizontal synchronization signal HD, and an SDRAM 70. A memory controller 63 that controls writing and reading of data, a YUV conversion unit 64 that converts digital image data input from the CMOS I / F unit 62 into a YUV data format that can be displayed and recorded, and a predetermined image data. A compression / expansion unit 65 that compresses and expands according to a format (for example, JPEG), a display output control unit 66 that controls output of display data to the LCD monitor 12 and an external display device, and an image size that matches the display and recording size Resize processing unit 67 to be changed and data to the memory card 80 The media I / F unit 68 for controlling writing and reading, and a synchronizing signal generating unit 69 for generating a vertical synchronizing signal VD and horizontal synchronizing signal HD by a command CPU 61.

AFE40から出力されるデジタル画像データは、CMOSI/F部62により画像フレームを一単位として信号処理IC60内部に取り込まれ、信号処理IC60内部で黒レベルの補正、欠損画素の補正、シェーディング補正などの画像処理が行われた上で、メモリコントローラ63によりSDRAM70に画像フレームごとのRGBデータ(RAW−RGB画像データ)として一時保管される。   Digital image data output from the AFE 40 is taken into the signal processing IC 60 by the CMOS I / F unit 62 as a unit of an image frame, and an image such as black level correction, defect pixel correction, shading correction, etc. is generated inside the signal processing IC 60. After the processing is performed, the memory controller 63 temporarily stores the data in the SDRAM 70 as RGB data (RAW-RGB image data) for each image frame.

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 SDRAM 70 is read from the SDRAM 70 by the memory controller 63 and supplied to the YUV conversion unit 64 through white balance gain multiplication, gamma correction, and RGB interpolation processing. The YUV conversion unit 64 performs various image processing such as edge enhancement and color setting on the image data, and converts the image data into YUV image data that is a luminance / color difference signal. The YUV image data generated by the YUV conversion unit 64 is stored again in the SDRAM 70 by the memory controller 63.

SDRAM70に保存されたYUV画像データは、メモリコントローラ63によりSDRAM70から読み出され、撮影モードアイコンなどを表示するためのOSD(オンスクリーンディスプレイ)データとともに表示出力制御部66に供給される。表示出力制御部66は、これらYUV画像データとOSDデータを合成して表示用データを生成し、同期信号などの信号を付加してLCDモニタ12に出力する。なお、表示出力制御部66は、生成した表示用データをTVビデオ信号として出力して外部表示装置に表示させることも可能であり、例えば外部表示装置がNTSCシステムのTVであれば、リサイズ処理部67により、そのシステムに合わせた水平・垂直の変倍処理が施された上で、TVに出力される。   The YUV image data stored in the SDRAM 70 is read from the SDRAM 70 by the memory controller 63 and supplied to the display output control unit 66 together with OSD (on-screen display) data for displaying shooting mode icons and the like. The display output control unit 66 generates display data by combining the YUV image data and the OSD data, adds a signal such as a synchronization signal, and outputs the display data to the LCD monitor 12. The display output control unit 66 can output the generated display data as a TV video signal and display it on an external display device. For example, if the external display device is an NTSC system TV, a resize processing unit In step 67, horizontal / vertical scaling processing is performed according to the system, and then output to the TV.

また、メモリカード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 SDRAM 70 is read from the SDRAM 70 by the memory controller 63 according to an instruction from the CPU 61 and supplied to the compression / expansion unit 65. Compressed data is generated. Here, the YUV image data stored in the SDRAM 70 is full-size data, and when the image size to be recorded on the memory card 80 is smaller than the image size of the CMOS sensor 30, the resize processing unit 67 uses the image for recording. Is reduced and supplied to the compression / decompression unit 65. The compressed data (JPEG data) generated by the compression / decompression unit 65 is stored again in the SDRAM 70 by the memory controller 63, and after processing such as header addition is performed, the memory card is passed through the media I / F unit 68. 80.

以上の信号処理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 CPU 61. The CPU 61 loads, for example, a control program and control data for controlling the digital camera stored in the ROM 90 onto the SDRAM 70, for example, and performs overall operation of the digital camera based on the program code of the loaded control program. To control. In other words, the CPU 61 and the AFE 40 can appropriately capture, display, and record an image in accordance with an instruction based on various button keys of the operation unit 100 or an operation instruction from a remote terminal (not shown). , TG50, and each processing unit inside the signal processing IC 60 are controlled. The operation unit 100 is used by the photographer to instruct the operation of the digital camera, and corresponds to various button keys such as the release shutter button 2 and the zoom buttons 14 and 15 shown in FIG.

以下、レリーズシャッタボタン2の押下に応じて静止画を撮影する際のCPU61による制御について、さらに詳しく説明する。   Hereinafter, the control by the CPU 61 when shooting a still image in response to pressing of the release shutter button 2 will be described in more detail.

レリーズシャッタボタン2が押下されると、撮影に先立ちAF(AUTO FOCUS)処理が行われる。AF処理としては、例えば、フォーカスレンズ26を移動させながらコントラストの最大値を見つける山登りAFなどが行わる。これは、映像信号のG信号(または輝度値であるY信号)の高周波成分からAF評価値を作成し、AF評価値が最大になるところのフォーカスレンズ26の位置(フォーカス位置)を算出して、フォーカスレンズ26を移動させる処理である。   When the release shutter button 2 is pressed, AF (AUTO FOCUS) processing is performed prior to shooting. As the AF processing, for example, hill-climbing AF for finding the maximum contrast value while moving the focus lens 26 is performed. This is to create an AF evaluation value from the high frequency component of the G signal (or the Y signal that is the luminance value) of the video signal, and calculate the position (focus position) of the focus lens 26 where the AF evaluation value is maximized. In this process, the focus lens 26 is moved.

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 focus lens 26 is moved to that point. The focus lens 26 can be moved via the motor driver 28 according to a command from the CPU 61.

次に、静止画撮影用の電子シャッタの設定や、AGC42の計算/設定、絞りの計算/設定が行われ(AE(AUTO EXPOUSRE)処理)、記録用の露光が行われる。電子シャッタの設定は、CPU61の命令により、CMOSセンサ30の駆動を制御するTG50により実行することができる。また、AGC42の設定は、CPU61の命令により、AFE40により実行することができる。   Next, an electronic shutter for still image shooting, AGC 42 calculation / setting, and aperture calculation / setting are performed (AE (AUTO EXPOUSRE) processing), and recording exposure is performed. The setting of the electronic shutter can be executed by the TG 50 that controls the driving of the CMOS sensor 30 in accordance with an instruction from the CPU 61. The setting of the AGC 42 can be executed by the AFE 40 according to a command from the CPU 61.

その後、静止画用の露光が完了した時点でメカニカルシャッタ27が閉じられ、CMOSセンサ30より静止画用のRGBデータ(RAW−RGB画像データ)が出力される。レリーズ第1処理(半押し)およびレリーズ第2処理(全押し)を搭載しているカメラシステムでは、レリーズ第1処理を実行することでAFやAE処理の計算を行い、レリーズ第2処理で記録用の露光が行われるような制御になっているのが一般的である。   Thereafter, when the exposure for the still image is completed, the mechanical shutter 27 is closed, and the RGB data (RAW-RGB image data) for the still image is output from the CMOS sensor 30. In a camera system equipped with the first release process (half press) and the second release process (full press), AF and AE processes are calculated by executing the first release process, and recording is performed with the second release process. In general, the control is performed such that the exposure is performed.

静止画用の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 / F unit 62, and image processing such as black level correction, missing pixel correction, shading correction, and the like is performed inside the signal processing IC 60. Then, the data is written in the SDRAM 70 by the memory controller 63. In the case of interlaced transfer, all data constituting one image frame is written to the SDRAM 70 as RAW-RGB image data by a plurality of transfers.

SDRAM70に書き込まれた静止画用のRAW−RGB画像データは、上述したように、SDRAM70から読み出され、ホワイトバランスのゲイン乗算やガンマ補正、RGB補間処理を経て、YUV変換部64でエッジ強調や色設定などの各種画像処理を行うとともに輝度/色差信号であるYUVデータに変換され、SDRAM70に書き戻される。   As described above, the RAW-RGB image data for the still image written in the SDRAM 70 is read from the SDRAM 70, subjected to white balance gain multiplication, gamma correction, and RGB interpolation processing. Various image processing such as color setting is performed, converted into YUV data which is a luminance / color difference signal, and written back to the SDRAM 70.

その後、SDRAM70に書き込まれたYUV画像データが、再度、SDRAM70から読み出され、必要に応じてリサイズ処理部67にて縮小処理が行われた上で、圧縮伸張部65で例えばJPEG圧縮などのデータ圧縮処理が行われる。そして、圧縮データ(JPEGデータ)が再度SDRAM70に書き戻され、ヘッダ追加などの処理が行われた後に、メディアI/F部68を介してメモリカード80に記録される。   Thereafter, the YUV image data written in the SDRAM 70 is read out from the SDRAM 70 again, reduced in the resizing processing unit 67 as necessary, and then compressed and expanded by the compression / expansion unit 65, for example, data such as JPEG compression. Compression processing is performed. Then, the compressed data (JPEG data) is written back to the SDRAM 70 again, and after processing such as header addition is performed, the compressed data (JPEG data) is recorded on the memory card 80 via the media I / F unit 68.

次に、本実施の形態に係るデジタルカメラにおいて実施されるホワイトバランス制御について、詳細に説明する。   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 CMOS sensor 30 that is an image sensor is input to the signal processing IC 60 as needed by using a frame image as a unit via the AFE 40. White balance control is performed on each image frame input to the signal processing IC 60 as processing by the CPU 61 inside the signal processing IC 60. Note that the image frame subject to white balance control may be an image frame of a monitoring image displayed on the LCD monitor 12 or the like before still image shooting, or continuous still images obtained by continuous shooting or the like, for example. It may be an image frame of an image. In addition, a white balance control value (to be described later) obtained by processing on the image frame of the monitoring image is stored before still image shooting, and the white balance control value stored for the image frame obtained at the time of still image shooting is stored. It may be applied to perform white balance control.

図3は、ホワイトバランス制御を実施するためのCPU61の機能構成を示す機能ブロック図である。CPU61は、例えば上述した制御プログラムの1つとしてROM90に格納され、メインメモリ(例えばSDRAM70)上にロードされたホワイトバランス制御用のプログラムを実行することによって、図3に示すように、特徴量算出部101、白ブロック検出部102、被写体エリア検出部103、ホワイトバランス制御部104の各機能を実現する。   FIG. 3 is a functional block diagram showing a functional configuration of the CPU 61 for performing white balance control. The CPU 61 calculates a feature amount as shown in FIG. 3, for example, by executing a white balance control program stored in the ROM 90 as one of the control programs described above and loaded on the main memory (eg, SDRAM 70). Each function of the unit 101, the white block detection unit 102, the subject area detection unit 103, and the white balance control unit 104 is realized.

特徴量算出部101は、CMOSセンサ30から出力され、AFE40を介して信号処理IC60に入力される画像フレームを複数のブロックに分割し、分割した複数のブロックそれぞれについてWB評価値を算出する処理機能である。   The feature amount calculation unit 101 divides an image frame output from the CMOS sensor 30 and input to the signal processing IC 60 via the AFE 40 into a plurality of blocks, and calculates a WB evaluation value for each of the divided blocks. It is.

白ブロック検出部102は、特徴量算出部101により算出されたWB評価値に基づいて、複数に分割された画像フレームの各ブロックのうちで、白色を映したブロックと推定される白ブロックを検出する処理機能である。   Based on the WB evaluation value calculated by the feature amount calculation unit 101, the white block detection unit 102 detects a white block that is estimated to be a white block from among the blocks of the image frame divided into a plurality of parts. Processing function.

被写体エリア検出部103は、処理の対象としている現在の画像フレームの中で、追尾する被写体を写した領域である被写体エリアを検出する処理機能である。   The subject area detection unit 103 is a processing function that detects a subject area that is an area in which a subject to be tracked is captured in the current image frame to be processed.

本実施の形態に係るデジタルカメラは被写体追尾機能を備えており、被写体追尾機能がオンの状態での動作時には、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 CPU 61 respectively inputs a plurality of image frames that are continuously input to the signal processing IC 60 in time series. On the other hand, for example, a process of detecting a region (subject area) in which a subject designated as a tracking target by the user is shown. The subject area detection unit 103 performs processing for detecting the subject area from the image frame. When the subject tracking function is on, the subject area detected from the image frame is used, for example, as an area for acquiring the above-described AF evaluation value at the time of still image shooting and as a photometric area for AE processing. Various methods have been proposed for the method of subject tracking itself, and the processing for detecting the subject area from the image frame may be performed using a generally known technique, so the details of the processing will be described. Omitted.

ホワイトバランス制御部104は、白ブロック検出部102により検出された白ブロックのWB評価値に基づいてWB制御値を算出し、算出したWB制御値を用いて、画像フレームのホワイトバランスを制御する処理機能である。ここで、特に本実施の形態に係るデジタルカメラにおいては、このCPU61のホワイトバランス制御部104が、被写体エリア検出部103により検出された被写体エリアについての情報を利用することによって、従来技術と比較してより適切なWB制御値を算出し、高精度なホワイトバランス制御を行えるようにしている。   The white balance control unit 104 calculates a WB control value based on the WB evaluation value of the white block detected by the white block detection unit 102, and controls the white balance of the image frame using the calculated WB control value. It is a function. Here, in particular, in the digital camera according to the present embodiment, the white balance control unit 104 of the CPU 61 uses the information about the subject area detected by the subject area detection unit 103 to compare with the prior art. Thus, a more appropriate WB control value is calculated so that highly accurate white balance control can be performed.

すなわち、このホワイトバランス制御部104は、処理の対象としている現在の画像フレームにおいて、被写体エリア検出部103が検出した被写体エリア内から白エリアが検出され、且つ、現在の画像フレームよりも前にCMOSセンサ30から出力された画像フレーム(以下、先行フレームという。)において、被写体エリア検出部103が検出した被写体エリア(現在の画像フレームにおける追尾対象の被写体と同一の被写体を映したエリア)内から白ブロックが検出されていない場合には、現在の画像フレームにおいて被写体エリア内から検出された白ブロックを用いずに、それ以外の白ブロックのWB評価値に基づいてWB制御値を算出し、算出したWB制御値を用いて画像フレームのホワイトバランスを制御するようにしている。なお、上記の先行フレームは、現在の画像フレームの直前に出力された画像フレームだけに限らず、現在の画像フレームと同一の被写体を追尾している状態で現在の画像フレームよりも前に出力された画像フレームすべてを含むものである。   That is, the white balance control unit 104 detects a white area from the subject area detected by the subject area detection unit 103 in the current image frame to be processed, and detects the CMOS before the current image frame. In the image frame output from the sensor 30 (hereinafter referred to as the preceding frame), white is detected from within the subject area detected by the subject area detection unit 103 (the area where the same subject as the tracking target subject in the current image frame is shown). When no block is detected, the WB control value is calculated based on the WB evaluation value of the other white block without using the white block detected from the subject area in the current image frame. The white balance of the image frame is controlled using the WB control value.The preceding frame is not limited to the image frame output immediately before the current image frame, but is output before the current image frame while tracking the same subject as the current image frame. Including all the image frames.

以下、CPU61が上記の特徴量算出部101、白ブロック検出部102、被写体エリア検出部103およびホワイトバランス制御部104の各機能を持つことにより実現されるホワイトバランス制御の具体例について、さらに詳しく説明する。   Hereinafter, specific examples of white balance control realized by the CPU 61 having the above-described feature amount calculation unit 101, white block detection unit 102, subject area detection unit 103, and white balance control unit 104 will be described in more detail. To do.

CMOSセンサ30からAFE40を介して出力される画像フレームは、信号処理IC60のCMOSI/F部62により信号処理IC60内部に取り込まれ、メモリコントローラ63によりSDRAM70(フレームメモリ)に保管される。このとき、CMOSI/F部62は、信号処理IC60内部に取り込んだ画像フレームにおける特定部分あるいは画像フレーム全体のR,G,Bの値を読み込み、CPU61に入力する。   An image frame output from the CMOS sensor 30 via the AFE 40 is taken into the signal processing IC 60 by the CMOS I / F unit 62 of the signal processing IC 60 and stored in the SDRAM 70 (frame memory) by the memory controller 63. At this time, the CMOS I / F unit 62 reads R, G, and B values of a specific part or the entire image frame captured in the signal processing IC 60 and inputs them to the CPU 61.

CPU61の特徴量算出部101は、信号処理IC60内部に取り込まれた画像フレームを予め定めた分割方法(例えば、縦横16×16の256分割)に従って複数のブロックに分割し、CMOSI/F部62が読み込んだR,G,Bの値を用いて、分割したブロックごとに、各ブロックに含まれる画素のRGBそれぞれの信号の積算値を求める。そして、特徴量算出部101は、ブロックごとのG信号の積算値に対するR信号およびB信号の積算値の比(G/R,G/B)を算出する。算出した値は、各ブロックの色の特徴を表す特徴量であり、これをWB評価値として用いる。   The feature amount calculation unit 101 of the CPU 61 divides the image frame taken into the signal processing IC 60 into a plurality of blocks according to a predetermined division method (for example, 256 × 16 × 16), and the CMOS I / F unit 62 Using the read R, G, and B values, the integrated values of the RGB signals of the pixels included in each block are obtained for each divided block. Then, the feature amount calculation unit 101 calculates the 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 for each block. The calculated value is a feature amount representing the color feature of each block, and this is used as the WB evaluation value.

特徴量算出部101によって画像フレームにおける各ブロックのWB評価値(G/R,G/B)が算出されると、白ブロック検出部102が、算出された各ブロックのWB評価値(G/R,G/B)を、G/Rを横軸とし、G/Bを縦軸としたWB色空間上にプロットし、WB色空間上における各ブロックのWB評価値の分布から、白ブロックの検出を行う。   When the feature amount calculation unit 101 calculates the WB evaluation value (G / R, G / B) of each block in the image frame, the white block detection unit 102 calculates the WB evaluation value (G / R) of each block. , G / B) is plotted on the WB color space with G / R as the horizontal axis and G / B as the vertical axis, and the white block is detected from the distribution of the WB evaluation value of each block in the WB color space. I do.

図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 block detection unit 102 plots the WB evaluation value of each block calculated by the feature amount calculation unit 101 on the WB color space, the plotted WB evaluation value (black point in FIG. 4) A block located in the white detection area set in the WB color space is detected as a white block estimated as a block in which white is projected in the image frame. Whether or not the WB evaluation value is within the white detection area can be easily realized by preparing a determination program and executing it by the CPU 61. Since the color characteristics of the same illumination and subject change depending on the spectral sensitivity distribution of the CMOS sensor 30, the reference gain and the white detection area on the white balance color space match the characteristics of the CMOS sensor 30 mounted on the digital camera. It is desirable to decide it.

白ブロック検出部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 block detection unit 102, the white balance control unit 104 calculates a WB control value based on the WB evaluation value (G / R, G / B) of the detected white block. At this time, the white balance control unit 104 detects a white area from the subject area in the current image frame to be processed, but does not detect a white block from the subject area in the preceding frame. The WB control value is calculated based on the WB evaluation values of the other white blocks without using the white block detected in the subject area in the current image frame. The WB control value is a control value for making the detected white block appear white on the image, so that the RGB integration ratio of each pixel in the white block approaches R: G: B = 1: 1: 1. , The gain value multiplied by the R signal and the B signal.

ここで、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 balance control unit 104 uses, for example, an average value of G / R values of a plurality of detected white blocks as an R gain, and determines an average value of G / B values of the detected plurality of white blocks as B. As a gain, a WB control value (R gain, B gain) is calculated. The actual shooting environment is often affected by a plurality of light sources, and white blocks may be detected in a plurality of white detection areas as in the example shown in FIG. In such a case, the white balance control unit 104 may calculate the WB control value by, for example, a weighted average weighted according to the number of white blocks detected in each of the plurality of white detection areas. . Alternatively, a different WB control value may be calculated for each region where the influence of each light source is dominant, and the WB control value may be linearly changed near the boundary of the region. Note that the method of calculating the WB control value by the white balance control unit 104 is not limited to the above. For example, there are various methods such as a device for reducing the color failure or a device for producing a hue preferable for the user. You may make it determine the value finally obtained after devising as a WB control value.

ホワイトバランス制御部104は、以上のようにして算出したWB制御値(Rゲイン,Bゲイン)を、フレーム画像を構成する各画素のR信号およびB信号に乗算することによって、画像フレームのホワイトバランスを制御する。具体的には、上述したように、YUV変換部64がSDRAM70から読み出されたRAW−RGB画像データをYUVデータに変換する前処理としてホワイトバランスのゲイン乗算が行われるが、この際、CPU61のホワイトバランス制御部104がYUV変換部64に対してWB制御値を設定することにより、このWB制御値に基づくホワイトバランス制御を実行する。   The white balance control unit 104 multiplies the R signal and the B signal of each pixel constituting the frame image by the WB control value (R gain, B gain) calculated as described above, thereby white balance of the image frame. To control. Specifically, as described above, white balance gain multiplication is performed as pre-processing for converting the RAW-RGB image data read from the SDRAM 70 into YUV data by the YUV conversion unit 64. When the white balance control unit 104 sets a WB control value for the YUV conversion unit 64, white balance control based on the WB control value is executed.

図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 CMOS sensor 30 changes due to the influence of the change of the light source even if the same is applied. In the conventional technique, even in such a case, when white balance control is performed on the image frame B, the WB control value is calculated using the WB evaluation values of all the white blocks including the white block detected from within the subject area. Had to do. For this reason, the WB control value in the direction of whitening the subject to be tracked is calculated, which may cause a color failure.

これに対して、本実施の形態におけるホワイトバランス制御では、画像フレーム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 CPU 61 when the subject tracking function is on. The series of processes shown in the flowchart of FIG. 9 is repeatedly performed every time an image frame is input from the CMOS sensor 30 to the signal processing IC 60 via the AFE 40 as an example.

信号処理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 amount calculation unit 101 of the CPU 61 divides the input image frame into a plurality of blocks, and WB evaluation values ( G / R, G / B) is calculated (step S102).

次に、CPU61の白ブロック検出部102が、特徴量算出部101により算出されたWB評価値に基づいて、複数に分割された画像フレームの各ブロックのうちで、白色を映したブロックと推定される白ブロックを検出する(ステップS103)。   Next, the white block detection unit 102 of the CPU 61 is estimated as a block showing white in each of the blocks of the image frame divided into a plurality based on the WB evaluation value calculated by the feature amount calculation unit 101. A white block is detected (step S103).

次に、追尾対象の被写体が既に設定(ロックオン)されているか否かが判定され(ステップ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 CPU 61 detects the subject area. The unit 103 detects a subject area showing the subject to be tracked from the image frame input in step S101 (step S105). On the other hand, when the tracking target subject is not set (step S104: NO), the subject area detection unit 103 sets the subject in the image frame input in step S101 as the tracking target in accordance with, for example, designation from the user. Setting is made (step S106), and the position of the subject is set as a subject area.

次に、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 block detection unit 102 and the position of the subject area detected by the subject area detection unit 103, the white balance control unit 104 of the CPU 61 performs white detection from within the subject area. It is determined whether a block is detected (step S107). If no white block is detected from the subject area (step S107: NO), the white balance control unit 104 sets the determination result flag to 1 (step S108), and the process proceeds to step S111. To do. The determination result flag is 1-bit information indicating whether or not a white block is detected in the subject area in the preceding frame, and the determination result flag = 0 indicates that a white block is detected in the subject area. The determination result flag = 1 indicates that no white block is detected in the subject area.

一方、被写体エリア内から白ブロックが検出された場合には(ステップ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 balance control unit 104 determines whether or not the determination result flag = 1, that is, from the subject area in the preceding frame. It is confirmed whether or not a white block has been detected (step S109). If the determination result flag = 1 (step S109: YES), the white balance control unit 104 excludes the white block detected from the subject area, and the WB of the white block detected in step S103. Based on the evaluation value, a WB control value is calculated (step S110). On the other hand, if the determination result flag = 0 (step S109: NO), or if no white block is detected from within the subject area (step S107: NO), all the whites detected in step S103 are detected. A WB control value is calculated based on the WB evaluation value of the block (step S111).

ステップ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 YUV conversion unit 64 as R gain and B gain. Then, auto white balance is performed by multiplying the R signal of the RAW-RGB image data with the image frame as one unit by the R gain and multiplying the B signal by the B gain.

以上、具体的な例を挙げながら詳細に説明したように、本実施の形態に係るデジタルカメラでは、CPU61のホワイトバランス制御部104が、被写体エリア内から白ブロックが検出され、且つ、先行フレームにおいて被写体エリア内から白ブロックが検出されていない場合に、被写体エリア内から検出された白ブロック以外の白ブロックのWB評価値を用いて算出したWB制御値を用いて画像フレームのホワイトバランスを制御するようにしている。したがって、本実施の形態に係るデジタルカメラによれば、オートホワイトバランスの精度を向上させて、カラーフェイリアの発生を有効に抑制することができる。   As described above in detail with specific examples, in the digital camera according to the present embodiment, the white balance control unit 104 of the CPU 61 detects a white block from within the subject area, and in the preceding frame. When no white block is detected in the subject area, the white balance of the image frame is controlled using the WB control value calculated using the WB evaluation value of the white block other than the white block detected in the subject area. I am doing so. Therefore, according to the digital camera of the present embodiment, it is possible to improve the accuracy of auto white balance and effectively suppress the occurrence of color failure.

(第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 that has been made will be omitted.

図10は、本実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPU61’の機能構成を示す機能ブロック図である。本実施の形態におけるCPU61’は、図10に示すように、第1の実施の形態におけるCPU61の機能構成(図3参照)に加えて、顔判定部105および補正部106をさらに備えている。   FIG. 10 is a functional block diagram illustrating a functional configuration of the CPU 61 ′ for performing white balance control in the digital camera according to the present embodiment. As shown in FIG. 10, the CPU 61 ′ in this embodiment further includes a face determination unit 105 and a correction unit 106 in addition to the functional configuration of the CPU 61 in the first embodiment (see FIG. 3).

顔判定部105は、追尾対象の被写体が人物の顔であるか否かを判定する処理機能である。この顔判定部105は、一例として、画像フレームに対するパターンマッチングなどによって人物の顔を検出する処理を行い、被写体エリア検出部103により検出された被写体エリア内で人物の顔が検出された場合に、追尾対象の被写体が人物の顔であると判定する。なお、画像から人物の顔を検出する手法としては従来様々な方式が提案されており、顔判定部105は、これら公知の技術を採用して人物の顔を検出すればよい。また、顔判定部105による判定は、必ずしもすべての画像フレームに対して行う必要はなく、同一の被写体を追尾している間に追尾対象の被写体が人物の顔であると判定したら、その情報を記憶しておくことで、後の画像フレームでの判定を省略することができる。   The face determination unit 105 is a processing function that determines whether or not the tracking target subject is a human face. As an example, the face determination unit 105 performs a process of detecting a human face by pattern matching or the like with respect to an image frame, and when a human face is detected in the subject area detected by the subject area detection unit 103, It is determined that the subject to be tracked is a human face. Various methods have been proposed in the past for detecting a person's face from an image, and the face determination unit 105 may detect the person's face using these known techniques. The determination by the face determination unit 105 is not necessarily performed for all image frames. If it is determined that the subject to be tracked is a person's face while tracking the same subject, the information is obtained. By memorizing, determination in a later image frame can be omitted.

本実施の形態におけるホワイトバランス制御では、顔判定部105によって追尾対象の被写体が人物の顔であると判定された場合に、ホワイトバランス制御部104’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かの判定を行わず、処理対象となる現在の画像フレームにおいて被写体エリア内から検出された白ブロックを用いずに、白ブロック検出部102により検出された他の白ブロックのWB評価値に基づいてWB制御値を算出する。すなわち、追尾対象の被写体が人物の顔であると判定されていれば、被写体エリアから白ブロックが検出されたとしても、それは白色の領域ではなく、光源の光の影響によりWB評価値が白検出エリアに入った領域であると判定できる。したがって、この場合には、ホワイトバランス制御部104’が被写体エリア内の白ブロックを除いた他の白ブロックのWB評価値に基づいてWB制御値を算出することで、より適切なホワイトバランス制御が可能になる。   In the white balance control in the present embodiment, when the face determination unit 105 determines that the subject to be tracked is a person's face, the white balance control unit 104 ′ detects a white block from the subject area in the preceding frame. WB evaluation of other white blocks detected by the white block detection unit 102 without using the white block detected from the subject area in the current image frame to be processed without determining whether or not it has been detected. A WB control value is calculated based on the value. In other words, if it is determined that the subject to be tracked is a human face, even if a white block is detected from the subject area, it is not a white region, but the WB evaluation value is detected by white due to the influence of light from the light source. It can be determined that the area has entered the area. Therefore, in this case, the white balance control unit 104 ′ calculates the WB control value based on the WB evaluation values of other white blocks excluding the white block in the subject area, thereby enabling more appropriate white balance control. It becomes possible.

補正部106は、顔判定部105によって追尾対象の被写体が人物の顔であると判定された場合に、被写体エリアに含まれるブロックのWB評価値を用いて、ホワイトバランス制御部104’が算出したWB制御値を補正する処理機能である。具体的には、補正部106は、顔判定部105によって追尾対象の被写体が人物の顔であると判定された場合に、被写体エリアに含まれるブロックのWB評価値と、ホワイトバランス制御部104’が算出したWB制御値とを比較する。そして、両者の間に予め定めた閾値以上の乖離がある場合に、ホワイトバランス制御部104’が算出したWB制御値を、被写体エリアに含まれるブロックのWB評価値に近づけるように補正する。つまり、補正部106は、ホワイトバランス制御部104’が算出するWB制御値が、上述したWB色空間上で、被写体エリアに含まれるブロック(人物の顔を映したブロック)のWB評価値から一定の距離の範囲内におさまるようにフィードバック制御する。なお、補正部106による具体的な補正方法としては、本発明者が提案した特開2008−236101号公報に開示された技術を適用することができる。   When the face determination unit 105 determines that the tracking target subject is a human face, the correction unit 106 uses the WB evaluation value of the block included in the subject area to calculate the white balance control unit 104 ′. This is a processing function for correcting the WB control value. Specifically, when the face determination unit 105 determines that the tracking target subject is a human face, the correction unit 106 determines the WB evaluation value of the block included in the subject area and the white balance control unit 104 ′. Is compared with the calculated WB control value. When there is a divergence greater than or equal to a predetermined threshold value between the two, the WB control value calculated by the white balance control unit 104 ′ is corrected so as to approach the WB evaluation value of the block included in the subject area. That is, the correction unit 106 determines that the WB control value calculated by the white balance control unit 104 ′ is constant from the WB evaluation value of a block (a block showing a person's face) included in the subject area in the WB color space described above. The feedback control is performed so as to be within the range of the distance. In addition, as a specific correction method by the correction unit 106, the technique disclosed in Japanese Patent Laid-Open No. 2008-236101 proposed by the present inventor can be applied.

図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 CMOS sensor 30 to the signal processing IC 60 via the AFE 40 as an example. In the flowchart of FIG. 11, the processes in steps S201 to S206 are the same as the processes in steps S101 to S106 shown in the flowchart of FIG. 9, and the processes in steps S208 to S212 are the flowchart of FIG. Since this is the same as the processing in steps S107 to S211 shown, description of these processing is omitted.

本実施の形態におけるホワイトバランス制御では、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 balance determination unit 105 of the CPU 61 ′ before the white balance control unit 104 ′ of the CPU 61 ′ determines whether or not a white block is detected from the subject area in step S208. However, it is determined whether or not the subject to be tracked is a human face (step S207). When it is determined that the subject to be tracked is not a person's face (step S207: NO), the white balance control unit 104 ′ performs the same processing as the first embodiment (the processing from step S208 to step S212). ). On the other hand, when it is determined that the subject to be tracked is a person's face (step S207: YES), the white balance control unit 104 ′ determines the WB based on the WB evaluation value of the white block detected from other than the subject area. A control value is calculated (step S213).

次に、CPU61’の補正部106が、ステップS213で算出されたWB制御値と、被写体エリア内のブロックのWB評価値とを比較し、両者の乖離が予め定めた閾値以上となっているか否かを判定する(ステップS214)。そして、両者の乖離が閾値以上となっている場合には(ステップS214:YES)、補正部106は、ステップS213で算出されたWB制御値を、被写体エリア内のブロックのWB評価値に近づけるように補正する(ステップS215)。   Next, the correction unit 106 of the CPU 61 ′ compares the WB control value calculated in step S213 with the WB evaluation value of the block in the subject area, and whether or not the difference between them is equal to or greater than a predetermined threshold value. Is determined (step S214). If the difference between the two is equal to or greater than the threshold (step S214: YES), the correction unit 106 brings the WB control value calculated in step S213 closer to the WB evaluation value of the block in the subject area. (Step S215).

以上のように、本実施の形態に係るデジタルカメラでは、CPU61’の顔判定部105が、追尾対象の被写体が人物の顔であるか否かを判定し、追尾対象の被写体が人物の顔であると判定された場合は、ホワイトバランス制御部104’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かに関わらず、被写体エリア以外から検出された白ブロックのWB評価値に基づいてWB制御値を算出するようにしている。したがって、上述した第1の実施の形態と比較して、さらにオートホワイトバランスの精度を向上させることができ、カラーフェイリアの発生をより有効に抑制することができる。   As described above, in the digital camera according to the present embodiment, the face determination unit 105 of the CPU 61 ′ determines whether the subject to be tracked is a human face, and the subject to be tracked is a human face. If it is determined that the white block is present, the white balance control unit 104 ′ determines whether or not the white block is detected from within the subject area in the preceding frame, based on the WB evaluation value of the white block detected from other than the subject area. Thus, the WB control value is calculated. Therefore, compared to the first embodiment described above, the accuracy of auto white balance can be further improved, and the occurrence of color failure can be more effectively suppressed.

また、本実施の形態に係るデジタルカメラによれば、追尾対象の被写体が人物の顔であると判定された場合に、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 correction unit 106 of the CPU 61 ′ performs the WB calculated by the white balance control unit 104 ′. When the control value is compared with the WB evaluation value of the block in the subject area, and the difference between the two is equal to or greater than the threshold value, the WB control value calculated by the white balance control unit 104 ′ is used as the WB of the block in the subject area. Since correction is performed so as to approach the evaluation value, auto white balance in consideration of the face of a person can be performed, and the occurrence of color failure can be more effectively suppressed.

(第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 that has been made will be omitted.

図12は、本実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPU61’’の機能構成を示す機能ブロック図である。本実施の形態におけるCPU61’’は、図12に示すように、第1の実施の形態におけるCPU61の機能構成(図3参照)に加えて、被写体エリア判定部107をさらに備えている。   FIG. 12 is a functional block diagram showing a functional configuration of the CPU 61 ″ for performing white balance control in the digital camera according to the present embodiment. As shown in FIG. 12, the CPU 61 ″ in the present embodiment further includes a subject area determination unit 107 in addition to the functional configuration of the CPU 61 in the first embodiment (see FIG. 3).

被写体エリア判定部107は、被写体エリア検出部103により検出された被写体エリアの大きさを判定する処理機能である。画像フレーム全体の大きさに対して被写体エリアの大きさが十分に小さい場合は、被写体エリア内のブロックのWB評価値がWB制御値の算出に与える影響は小さくなる。例えば、画像フレーム全体を縦横16×16の256ブロックに分割した場合において、被写体エリアの大きさが1ブロック分にしか相当しないような場合には、被写体エリア内のブロックのWB評価値は無視することができる。本実施の形態においては、この被写体エリアの大きさが予め定めた基準値よりも小さいか否かを判定するために、被写体エリア判定部107が設けられている。   The subject area determination unit 107 is a processing function that determines the size of the subject area detected by the subject area detection unit 103. When the size of the subject area is sufficiently small relative to the size of the entire image frame, the influence of the WB evaluation value of the block in the subject area on the calculation of the WB control value is small. For example, when the entire image frame is divided into 256 × 16 × 16 blocks, if the size of the subject area corresponds to only one block, the WB evaluation value of the block in the subject area is ignored. be able to. In the present embodiment, a subject area determination unit 107 is provided to determine whether or not the size of the subject area is smaller than a predetermined reference value.

本実施の形態におけるホワイトバランス制御では、被写体エリア判定部107によって被写体エリアの大きさが基準値よりも小さいと判定された場合に、ホワイトバランス制御部104’’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かの判定を行わず、処理対象となる現在の画像フレームにおいて被写体エリア以外から検出された他の白ブロックのWB評価値に基づいてWB制御値を算出する。すなわち、被写体エリアの大きさが基準値よりも小さければ、被写体エリアを考慮せずにWB制御値を算出することができ、これにより、被写体追尾の影響によりオートホワイトバランスが不安定になることを有効に防止し、また、CPU61’’の処理負荷を低減させて電力消費量の削減を図ることができる。   In the white balance control according to the present embodiment, when the subject area determination unit 107 determines that the size of the subject area is smaller than the reference value, the white balance control unit 104 '' detects from the subject area in the preceding frame. Whether or not a white block has been detected is not determined, and a WB control value is calculated based on the WB evaluation value of another white block detected from outside the subject area in the current image frame to be processed. In other words, if the size of the subject area is smaller than the reference value, the WB control value can be calculated without taking the subject area into account, thereby making the auto white balance unstable due to the effect of subject tracking. It is possible to effectively prevent the power consumption by reducing the processing load on the CPU 61 ″.

図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 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. 13 is repeatedly performed every time an image frame is input from the CMOS sensor 30 to the signal processing IC 60 via the AFE 40 as an example. In the flowchart of FIG. 13, the processing of steps S301 to S308 is the same as the processing of steps S101 to S108 shown in the flowchart of FIG. 9, and the processing of steps S310 to S312 is the flowchart of FIG. 9. Since this is the same as the processing in steps S109 to S111 shown, description of these processing is omitted.

本実施の形態におけるホワイトバランス制御では、被写体エリア内から白ブロックが検出されていると判定された場合に(ステップ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 area determination unit 107 of the CPU 61 ″ determines the size of the subject area. Is greater than or equal to a predetermined reference value (step S309). If it is determined that the size of the subject area is greater than or equal to the reference value (step S309: YES), the white balance control unit 104 ″ determines that the determination result flag = 1 as in the first embodiment. Whether or not a white block is detected from the subject area in the preceding frame (step S310). On the other hand, when it is determined that the size of the subject area is smaller than the reference value (step S309: NO), the white balance control unit 104 '' proceeds to step S311 without performing the determination of step S310. In step S311, the WB control value is calculated based on the WB evaluation value of the white block detected from outside the subject area.

以上のように、本実施の形態に係るデジタルカメラでは、CPU61’’の被写体エリア判定部107が被写体エリアの大きさを判定し、被写体エリアの大きさが予め定めた基準値よりも小さい場合には、ホワイトバランス制御部104’’が、先行フレームにおいて被写体エリア内から白ブロックが検出されたか否かに関わらず、被写体エリア以外から検出された白ブロックのWB評価値に基づいてWB制御値を算出するようにしている。したがって、上述した第1の実施の形態と同様にオートホワイトバランスの精度を向上させて、カラーフェイリアの発生をより有効に抑制することができるとともに、被写体追尾の影響によりオートホワイトバランスが不安定になることを有効に防止することができ、さらに、CPU61’’の処理負荷を低減させて電力消費量の削減を図ることができる。   As described above, in the digital camera according to the present embodiment, when the subject area determination unit 107 of the CPU 61 ″ determines the size of the subject area and the size of the subject area is smaller than a predetermined reference value. The white balance control unit 104 ″ determines the WB control value based on the WB evaluation value of the white block detected from outside the subject area, regardless of whether or not the white block is detected from within the subject area in the preceding frame. I am trying to calculate. Therefore, as in the first embodiment described above, the accuracy of auto white balance can be improved, the occurrence of color failure can be more effectively suppressed, and auto white balance is unstable due to the effect of subject tracking. Can be effectively prevented, and further, the processing load on the CPU 61 ″ can be reduced to reduce the power consumption.

(第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 CMOS sensor 30 and input into the signal processing IC 60. When the background of the subject to be tracked has a function, the white balance control is not performed on the image frame to be processed. 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 that has been made will be omitted.

図14は、本実施の形態に係るデジタルカメラにおいて、ホワイトバランス制御を実施するためのCPU61’’’の機能構成を示す機能ブロック図である。本実施の形態におけるCPU61’’’は、図14に示すように、第1の実施の形態におけるCPU61の機能構成(図3参照)に加えて、背景変化判定部108をさらに備えている。   FIG. 14 is a functional block diagram showing a functional configuration of the CPU 61 ″ ″ for performing white balance control in the digital camera according to the present embodiment. As shown in FIG. 14, the CPU 61 ″ in the present embodiment further includes a background change determination unit 108 in addition to the functional configuration of the CPU 61 in the first embodiment (see FIG. 3).

背景変化判定部108は、CMOSセンサ30から連続的に出力され信号処理IC60内に入力される複数の画像フレーム間において、追尾対象の被写体の背景が変化しているか否かを判定する処理機能である。   The background change determination unit 108 is a processing function that determines whether the background of the subject to be tracked has changed between a plurality of image frames that are continuously output from the CMOS sensor 30 and input into the signal processing IC 60. is there.

固定された背景の中で追尾対象の被写体が移動しているような撮影シーンにおいては、画像における光源が大きく変化することはないが、例えばカメラアングルを随時変えながら追尾対象の被写体を追っているような撮影シーンにおいては、連続する複数の画像フレーム間で光源が大きく変わる可能性がある。そして、このように連続する複数の画像フレーム間で被写体の背景が変化し、光源が大きく変わるような場合には、画像フレーム単位でホワイトバランス制御を実行するとオートホワイトバランスが不安定になる可能性がある。   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 change determination unit 108 of the CPU 61 ′ ″ determines whether or not the background of the subject has changed between a plurality of consecutive image frames, and the background of the subject has changed. If it is determined that the image frame is present, the white balance control unit 104 ′ ″ does not perform white balance control on the image frame to be processed. When the white balance control unit 104 ″ ″ does not perform white balance control, a new WB control value corresponding to the current image frame is not calculated. In this case, as an example, the R and B signals of the RAW-RGB image data corresponding to the current image frame are multiplied by the R gain and B gain already set in the YUV conversion unit 64.

背景変化判定部108が、連続する複数の画像フレーム間で被写体の背景が変化しているか否かを判定する手法としては、様々な手法が考えられる。例えば、画像フレームの上下左右端のAE評価値、WB評価値、AF評価値を、連続する画像フレーム間で比較することによって、背景が変化しているか否かを判定することができる。連続する複数の画像フレーム間で被写体の背景に変化がなければこれらの評価値の変化は小さい。一方、連続する複数の画像フレーム間で被写体の背景が変化していれば、これらの評価値が大きく変化する。したがって、背景変化判定部108は、連続する複数の画像フレーム間でこれらの評価値が予め定めた閾値以上変化している場合に、被写体の背景が変化していると判定することができる。   Various methods are conceivable for the background change determination unit 108 to determine whether or not the background of the subject has changed between a plurality of consecutive image frames. For example, it is possible to determine whether or not the background has changed by comparing the AE evaluation value, the WB evaluation value, and the AF evaluation value at the top, bottom, left and right edges of the image frame between successive image frames. If there is no change in the background of the subject between a plurality of consecutive image frames, the change in these evaluation values is small. On the other hand, if the background of the subject changes between a plurality of successive image frames, these evaluation values change greatly. Therefore, the background change determination unit 108 can determine that the background of the subject has changed when these evaluation values change by a predetermined threshold or more between a plurality of consecutive image frames.

図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 CPU 61 ″ when the subject tracking function is on in the digital camera according to the present embodiment. The series of processing shown in the flowchart of FIG. 15 is repeatedly performed every time an image frame is input from the CMOS sensor 30 to the signal processing IC 60 via the AFE 40 as an example. In the flowchart of FIG. 15, the processing of steps S401 to S406 is the same as the processing of steps S101 to S106 shown in the flowchart of FIG. 9, and the processing of steps S408 to S412 is the flowchart of FIG. 9. Since this is the same as the processing in steps S107 to S111 shown, description of these processing is omitted.

本実施の形態におけるホワイトバランス制御では、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 CPU 61 ″ before the white balance control unit 104 ′ ″ of the CPU 61 ′ ″ determines whether or not a white block is detected from within the subject area in step S408. The background change determination unit 108 determines whether or not the background of the subject to be tracked has changed (step S407). If it is determined that there is no change in the background of the subject to be tracked (step S407: NO), the white balance control unit 104 ″ ′ performs the same processing as in the first embodiment (steps S408 to S412). Process). On the other hand, when it is determined that the background of the subject to be tracked has changed (step S407: YES), the white balance control unit 104 ′ ″ performs WB control corresponding to the current image frame to be processed. The process ends without calculating the value.

以上のように、本実施の形態に係るデジタルカメラでは、CPU61’’’の背景変化判定部108が連続する複数の画像フレーム間で追尾対象の被写体の背景が変化しているか否かを判定し、背景が変化していると判定された場合には、ホワイトバランス制御部104’’’が、処理対象となる現在の画像フレームに対するホワイトバランス制御を行わないようにしている。したがって、上述した第1の実施の形態と同様にオートホワイトバランスの精度を向上させて、カラーフェイリアの発生をより有効に抑制することができるとともに、光源が大きく変化することに起因してオートホワイトバランスが不安定になることを有効に防止することができる。   As described above, in the digital camera according to the present embodiment, the background change determination unit 108 of the CPU 61 ′ ″ determines whether the background of the subject to be tracked has changed between a plurality of consecutive image frames. When it is determined that the background has changed, the white balance control unit 104 ′ ″ does not perform white balance control for the current image frame to be processed. Therefore, as in the first embodiment described above, the accuracy of auto white balance can be improved, the occurrence of color failure can be more effectively suppressed, and auto light emission can be caused by a significant change in the light source. It is possible to effectively prevent the white balance from becoming unstable.

以上、本発明の具体的な実施の形態として第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 SYMBOLS 101 Feature-value calculation part 102 White block detection part 103 Subject area detection part 104 (104 ', 104'',104''') White balance control part 105 Face determination part 106 Correction | amendment part 107 Subject area determination part 108 Background change determination part

特開2007−104200号公報JP 2007-104200 A 特開2009−65381号公報JP 2009-65381 A

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.
前記被写体が人物の顔であると判定された場合に、前記被写体エリアに含まれるブロックの前記特徴量を用いて、前記ホワイトバランス制御手段が算出した制御値を補正する補正手段をさらに備えることを特徴とする請求項2に記載の撮像装置。   And a correction unit that corrects the control value calculated by the white balance control unit using the feature amount of the block included in the subject area when the subject is determined to be a human face. The imaging apparatus according to claim 2, characterized in that: 前記被写体エリアの大きさを判定する被写体エリア判定手段をさらに備え、
前記ホワイトバランス制御手段は、前記被写体エリアの大きさが基準値よりも小さいと判定された場合は、前記先行フレームにおいて前記被写体エリア内から前記白ブロックが検出されたか否かに関わらず、前記画像フレームにおいて前記被写体エリア内から検出された白ブロック以外の前記白ブロックの前記特徴量に基づいて、前記制御値を算出することを特徴とする請求項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.
JP2010265155A 2010-11-29 2010-11-29 Imaging apparatus and white balance control method Active JP5569361B2 (en)

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 true JP2012119756A (en) 2012-06-21
JP5569361B2 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)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2527674A (en) * 2014-05-30 2015-12-30 Canon Kk Image pickup apparatus that performs white balance control and method of controlling the same
CN105981379A (en) * 2014-09-17 2016-09-28 深圳市大疆创新科技有限公司 Automatic white balancing system and method
CN107959840A (en) * 2017-12-07 2018-04-24 广东欧珀移动通信有限公司 Image processing method, device, computer-readable recording medium and computer equipment
JP2020195017A (en) * 2019-05-27 2020-12-03 三菱電機株式会社 Imaging apparatus and imaging method

Citations (4)

* Cited by examiner, † Cited by third party
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
JP2009010813A (en) * 2007-06-29 2009-01-15 Fujifilm Corp Image processing device and method, and program
JP2010034955A (en) * 2008-07-30 2010-02-12 Olympus Corp White balance correction apparatus and signal processing program

Patent Citations (4)

* Cited by examiner, † Cited by third party
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
JP2009010813A (en) * 2007-06-29 2009-01-15 Fujifilm Corp Image processing device and method, and program
JP2010034955A (en) * 2008-07-30 2010-02-12 Olympus Corp White balance correction apparatus and signal processing program

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2527674A (en) * 2014-05-30 2015-12-30 Canon Kk Image pickup apparatus that performs white balance control and method of controlling the same
US9402063B2 (en) 2014-05-30 2016-07-26 Canon Kabushiki Kaisha Image pickup apparatus that performs white balance control and method of controlling the same
GB2527674B (en) * 2014-05-30 2018-07-04 Canon Kk Image pickup apparatus that performs white balance control and method of controlling the same
CN105981379A (en) * 2014-09-17 2016-09-28 深圳市大疆创新科技有限公司 Automatic white balancing system and method
JP2017502596A (en) * 2014-09-17 2017-01-19 エスゼット ディージェイアイ テクノロジー カンパニー リミテッドSz Dji Technology Co.,Ltd White balance adjustment method and imaging system
US9743058B2 (en) 2014-09-17 2017-08-22 SZ DJI Technology Co., Ltd. Automatic white balancing system and method
US9743059B2 (en) 2014-09-17 2017-08-22 SZ DJI Technology Co., Ltd. Automatic white balancing system and method
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
JP2020195017A (en) * 2019-05-27 2020-12-03 三菱電機株式会社 Imaging apparatus and imaging method
JP7205380B2 (en) 2019-05-27 2023-01-17 三菱電機株式会社 Imaging device and imaging method

Also Published As

Publication number Publication date
JP5569361B2 (en) 2014-08-13

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
JP2014120844A (en) Image processing apparatus and imaging apparatus
JP5782813B2 (en) Imaging apparatus and image display method
JP2017022610A (en) Image processing apparatus 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
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
JP5316923B2 (en) Imaging apparatus and program thereof
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
JP4761039B2 (en) Imaging device
JP2005122016A (en) Automatic focusing camera
JP6046952B2 (en) Imaging apparatus and control method thereof
JP2009139423A (en) Imaging apparatus and subject distance calculating method
JP2009210832A (en) Imaging device

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