JP2001045515A - Electronic image pickup device and white balance adjustment method - Google Patents

Electronic image pickup device and white balance adjustment method

Info

Publication number
JP2001045515A
JP2001045515A JP11217378A JP21737899A JP2001045515A JP 2001045515 A JP2001045515 A JP 2001045515A JP 11217378 A JP11217378 A JP 11217378A JP 21737899 A JP21737899 A JP 21737899A JP 2001045515 A JP2001045515 A JP 2001045515A
Authority
JP
Japan
Prior art keywords
white balance
image information
color component
value
average value
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.)
Abandoned
Application number
JP11217378A
Other languages
Japanese (ja)
Other versions
JP2001045515A5 (en
Inventor
Junichi Sakurai
純一 桜井
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP11217378A priority Critical patent/JP2001045515A/en
Publication of JP2001045515A publication Critical patent/JP2001045515A/en
Publication of JP2001045515A5 publication Critical patent/JP2001045515A5/ja
Abandoned legal-status Critical Current

Links

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain a natural picture even in the case of photographing a moving picture by an electronic image pickup device that does not quickly responds to a change in the white balance after the white balance is once adjusted while quickly tracing a large change caused in the white balance. SOLUTION: The white balance adjustment method employs a CCD 12 that applies photoelectric conversion to an optical image being a photographing object into image information by each color component via at least 3-color filters and stores the image information to a DRAM 20, a sample-hold circuit 15, an A/D converter 16, a color process circuit 17, a DMA controller 18, a DRAM interface 19 and a CPU 21 that obtains a mean value of the image information by each color component stored in the DRAM 20, obtains a coefficient of the image information by each color component with respect to the obtained mean value of the image information by each of other color components through the use of the obtained mean value of the image information by each color component on the basis of the mean value of the image information of the color component closest to the luminance signal and calculates an adjustment value of the white balance on the basis of the obtained coefficients.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、CCD等の撮像素
子を用いたデジタルカメラなどの電子撮像装置及びこの
装置に適用されるホワイトバランス調整方法に関する。
[0001] 1. Field of the Invention [0002] The present invention relates to an electronic image pickup apparatus such as a digital camera using an image pickup device such as a CCD, and a white balance adjusting method applied to this apparatus.

【0002】[0002]

【従来の技術】一般に、CCD等の撮像素子を用いたビ
デオカメラやデジタルカメラなどではホワイトバランス
調整を自動で行なっている。この自動ホワイトバランス
調整は、基本的に1画面分の画像データについて、全て
の画像データあるいは白と見做す範囲の画像データのR
GB各色成分毎の全画素の総和値、あるいは1画素当た
りの平均値を求め、各色成分毎の該値が等しいものとな
るように、G成分の値を基準として固定化し、他のR成
分及びB成分の画素信号に対する増幅器での各ゲインを
調整するものである。
2. Description of the Related Art Generally, in a video camera, a digital camera and the like using an image pickup device such as a CCD, a white balance is automatically adjusted. This automatic white balance adjustment is basically performed for all image data or image data in a range regarded as white for image data for one screen.
The sum of all the pixels for each of the GB components or the average value for each pixel is obtained, and the values of the G component are fixed so that the values for each of the color components are equal. It adjusts each gain of the amplifier for the B component pixel signal.

【0003】図5はこの自動ホワイトバランス調整に係
る一連の処理工程を例示するもので、その当初には、対
象となる1枚分の画像データを、データ圧縮を行なう前
のビットマップファイルの状態で記憶しているバッファ
メモリとしてのDRAMから読出し(ステップA0
1)、RGBの各色成分毎に全画素データの総和から1
画素当たりの平均値(図及び以下文中では「ΣR(av
e)」「ΣG(ave)」「ΣB(ave)」と示す)
を算出する(ステップA02)。
FIG. 5 shows an example of a series of processing steps relating to the automatic white balance adjustment. Initially, one target image data is converted into a state of a bitmap file before data compression. Is read from the DRAM as the buffer memory stored at step A0 (step A0).
1) from the sum of all pixel data for each of the RGB color components
The average value per pixel (in the figures and in the following text, "@R (av
e), "@G (ave)", "@B (ave)")
Is calculated (step A02).

【0004】次いで、R成分の上記平均値「ΣR(av
e)」がG成分の同値「ΣG(ave)」と等しいか否
かにより、R成分のホワイトバランス調整が必要である
か否かを判断する(ステップA03)。
Next, the above-mentioned average value of the R component “ΣR (av
"e)" is equal to the G component equivalent value "$ G (ave)" to determine whether or not white balance adjustment of the R component is necessary (step A03).

【0005】ここで、両値が等しくなく、調整が必要で
あると判断した場合にのみ、G成分の同値に対する大小
に応じて、撮像素子であるCCDの出力するアナログ値
の画像データを増幅する増幅器のための特にR成分のゲ
インを予め設定されている定数分だけ加減調整する(ス
テップA04)。
Here, only when it is determined that the two values are not equal and adjustment is necessary, the image data of the analog value output from the CCD, which is the image sensor, is amplified according to the magnitude of the same value of the G component. In particular, the gain of the R component for the amplifier is adjusted by a preset constant (step A04).

【0006】次いで、同様にB成分の上記平均値「ΣB
(ave)」がG成分の同値「ΣG(ave)」と等し
いか否かにより、B成分のホワイトバランス調整が必要
であるか否かを判断する(ステップA05)。
Next, similarly, the average value of the B component “ΣB
(Ave) ”is equal to the G component equivalent value“ ΣG (ave) ”to determine whether or not white balance adjustment of the B component is necessary (step A05).

【0007】ここで、両値が等しくなく、調整が必要で
あると判断した場合にのみ、G成分の同値に対する大小
に応じて、撮像素子であるCCDの出力するアナログ値
の画像データを増幅する増幅器のための特にB成分のゲ
インを予め設定されている定数分だけ加減調整する(ス
テップA06)。
Here, only when it is determined that the two values are not equal and adjustment is necessary, the image data of the analog value output from the CCD as the image pickup element is amplified according to the magnitude of the same value of the G component. In particular, the gain of the B component for the amplifier is adjusted by a preset constant (step A06).

【0008】その後、上記R,Bの各色成分のゲインを
調整することで全体のホワイトバランス調整のための処
理を終えたか否かを判断し(ステップA07)、終えて
いないと判断した場合には再び上記ステップA01から
の処理に戻る一方、終えたと判断すると、以上でこの一
連の処理を終了するものである。
Thereafter, it is determined whether or not the processing for adjusting the overall white balance has been completed by adjusting the gain of each of the R and B color components (step A07). While returning to the processing from step A01 again, when it is determined that the processing has been completed, this series of processing is completed.

【0009】上記処理において、G成分を基準とするの
は、G成分が輝度信号により近く、R成分、B成分に対
して相対的なレベルが高いために、調整により飽和して
しまう可能性が高いからである。
In the above processing, the G component is used as a reference because the G component is closer to the luminance signal and has a higher level relative to the R component and the B component. Because it is expensive.

【0010】[0010]

【発明が解決しようとする課題】しかしながら、上記の
ような処理工程を実施するデジタルカメラにあっては、
記録モード時に取込む被写体の画像が激しく変化する場
合が少なくない。そのため、被写体の変化に対してホワ
イトバランスを迅速に追従させないと、撮影者の望むシ
ャッタタイミングでホワイトバランス調整が間に合わ
ず、カメラの反応が遅いという印象を撮影者に与えてし
まうことになる。
However, in a digital camera that performs the above-described processing steps,
In many cases, the image of the subject captured in the recording mode changes drastically. Therefore, if the white balance is not made to quickly follow the change in the subject, the white balance adjustment cannot be made in time at the shutter timing desired by the photographer, giving an impression to the photographer that the response of the camera is slow.

【0011】一方で、一旦ホワイトバランスが適度に調
整された後に、被写体の変化に対して液晶ファインダに
表示される画像の色合いが大きく変わると、撮影者のシ
ャッタ操作の妨げになったり、同一の光源下で撮影され
た画像の色合いが被写体によって大きく異なってしまう
という不具合を生じる。
On the other hand, once the white balance is appropriately adjusted and the color of the image displayed on the liquid crystal finder greatly changes in response to a change in the subject, it hinders the photographer from operating the shutter or causes the same. A problem arises in that the color of an image captured under a light source varies greatly depending on the subject.

【0012】これに加えて、デジタルカメラの多機能化
が進み、動画撮影機能を搭載することを考えた場合、ホ
ワイトバランスを被写体の変化に対して敏感に追従させ
ると、得られる動画像は不自然なものとなる。
[0012] In addition, when digital cameras have become more multifunctional and a moving image shooting function is considered, if the white balance is sensitive to changes in the subject, the resulting moving image will not be obtained. It becomes natural.

【0013】本発明は上記のような実情に鑑みてなされ
たもので、その目的とするところは、ホワイトバランス
が大きく変化した場合にはこれに迅速に追従する反面、
一旦ホワイトバランスが調整された後はホワイトバラン
スの変化に対しても過敏に反応せず、動画撮影時にも自
然な画像を得ることが可能な電子撮像装置及びこの装置
に適用するホワイトバランス調整方法を提供することに
ある。
The present invention has been made in view of the above-mentioned circumstances, and an object of the present invention is to quickly follow a large change in white balance.
Once the white balance is adjusted, an electronic imaging device that does not react sensitively to changes in the white balance and can obtain a natural image even when shooting a moving image, and a white balance adjustment method applied to this device. To provide.

【0014】[0014]

【課題を解決するための手段】請求項1記載の発明は、
撮像対象となる光像を少なくとも3色の色フィルタを介
して各色成分毎の画像情報に光電変換する撮像素子と、
この撮像素子で得た各色成分毎の画像情報の平均値を求
める第1の演算手段と、この第1の演算手段で求めた各
色成分毎の画像情報の平均値を用い、最も輝度信号に近
い色成分の画像情報の平均値を基準として他の各色成分
毎の画像情報の平均値に対する係数を求める第2の演算
手段と、この第2の演算手段で求めた各係数によりホワ
イトバランスの調整値を算出する第3の演算手段とを具
備したことを特徴とする。
According to the first aspect of the present invention,
An image sensor that photoelectrically converts an optical image to be imaged into image information for each color component through at least three color filters;
The first arithmetic means for obtaining the average value of the image information for each color component obtained by the image sensor, and the average value of the image information for each color component obtained by the first arithmetic means are used, and are closest to the luminance signal. A second calculating means for obtaining a coefficient for the average value of the image information for each of the other color components based on the average value of the image information of the color components; and a white balance adjustment value obtained by the respective coefficients obtained by the second calculating means. And a third calculating means for calculating

【0015】このような構成とすれば、予め設定された
ステップ幅毎にホワイトバランスを調整して行くのでは
なく、最も輝度信号に近い色成分の画像情報の平均値に
対する他の色成分の画像情報の平均値の係数からホワイ
トバランスの調整値を算出することで一括してホワイト
バランスを調整することができるため、より短時間のう
ちに被写体の変化に対してホワイトバランスを追従させ
ることができる。
With such a configuration, the white balance is not adjusted for each preset step width, but the image of the other color component is compared with the average value of the image information of the color component closest to the luminance signal. By calculating the white balance adjustment value from the coefficient of the average value of the information, the white balance can be adjusted collectively, so that the white balance can follow the change of the subject in a shorter time. .

【0016】請求項2記載の発明は、上記請求項1記載
の発明において、上記第3の演算手段で算出したホワイ
トバランスの調整値に対して所定値を加減して微調整す
る第4の演算手段をさらに具備したことを特徴とする。
According to a second aspect of the present invention, in the first aspect of the present invention, a fourth operation for finely adjusting the white balance adjustment value calculated by the third arithmetic means by adding or subtracting a predetermined value. It is characterized by further comprising means.

【0017】このような構成とすれば、上記請求項1記
載の発明の作用に加えて、より正確なホワイトバランス
調整を行なうことができる。
According to such a configuration, more accurate white balance adjustment can be performed in addition to the operation of the first aspect of the present invention.

【0018】請求項3記載の発明は、上記請求項1記載
の発明において、上記第1の演算手段で求めた各色成分
毎の画像情報の平均値を用い、最も輝度信号に近い色成
分の画像情報の平均値を基準として他の各色成分毎の画
像情報の平均値に対する、上記第1の係数より調整幅の
小さい第2の係数を求める第5の演算手段と、この第5
の演算手段で求めた各第2の係数により第2のホワイト
バランスの調整値を算出する第6の演算手段とをさらに
具備したことを特徴とする。
According to a third aspect of the present invention, in the first aspect of the present invention, an image of a color component closest to a luminance signal is used by using an average value of image information for each color component obtained by the first arithmetic means. A fifth calculating means for obtaining a second coefficient having a smaller adjustment width than the first coefficient with respect to the average value of the image information for each of the other color components based on the average value of the information;
And a sixth calculating means for calculating a second white balance adjustment value using each second coefficient obtained by the calculating means.

【0019】このような構成とすれば、上記請求項1記
載の発明の作用に加えて、ホワイトバランスの粗調整後
に正確な調整値に収束するまでの画像での色合いの変化
を自然なものとすることができる。
With such a configuration, in addition to the operation of the first aspect of the present invention, a change in the color tone of the image until the convergence to an accurate adjustment value after the coarse adjustment of the white balance is made natural. can do.

【0020】請求項4記載の発明は、上記請求項1また
は2記載の発明において、上記撮像装置は自動露出機能
を有し、該自動露出機能により絞り値が変化した場合に
上記第2の演算手段で求めた各第1の係数により上記第
3の演算手段でホワイトバランスの調整値を算出するこ
とを特徴とする。
According to a fourth aspect of the present invention, in the first or second aspect of the present invention, the image pickup apparatus has an automatic exposure function, and the second operation is performed when an aperture value is changed by the automatic exposure function. The white balance adjustment value is calculated by the third calculating means using each of the first coefficients obtained by the means.

【0021】このような構成とすれば、上記請求項1ま
たは2記載の発明の作用に加えて、絞り値に変化が生じ
た際にのみ、上記第1の係数を用いたホワイトバランス
調整の基底となる値の演算をし直すこととなるので、絞
り値が変化しない状態では表示される被写体の画像の色
合いが変化してしまうことがなく、モニタ表示される画
像が極めて自然な違和感のないものとなる。
With such a configuration, in addition to the effect of the first or second aspect of the present invention, the basis of the white balance adjustment using the first coefficient only when the aperture value changes. Is calculated again, so that the hue of the displayed image of the subject does not change in the state where the aperture value does not change, and the image displayed on the monitor does not have an extremely natural feeling of strangeness Becomes

【0022】請求項5記載の発明は、撮像対象となる光
像を少なくとも3色の色フィルタを介して各色成分毎の
画像情報に光電変換する撮像素子で得た、各色成分毎の
画像情報の平均値を求める第1の演算工程と、この第1
の演算工程で求めた各色成分毎の画像情報の平均値を用
い、最も輝度信号に近い色成分の画像情報の平均値を基
準として他の各色成分毎の画像情報の平均値に対する第
1の係数を求める第2の演算工程と、この第2の演算工
程で求めた各第1の係数によりホワイトバランスの調整
値を算出する第3の演算工程とを有したことを特徴とす
る。
According to a fifth aspect of the present invention, the image information of each color component obtained by an image sensor that photoelectrically converts an optical image to be imaged into image information of each color component through at least three color filters. A first calculating step for obtaining an average value;
Using the average value of the image information for each color component obtained in the calculation step, and using the average value of the image information of the color component closest to the luminance signal as a reference, the first coefficient for the average value of the image information for each of the other color components And a third calculation step of calculating a white balance adjustment value using each of the first coefficients obtained in the second calculation step.

【0023】このような方法とすれば、予め設定された
ステップ幅毎にホワイトバランスを調整していくのでは
なく、最も輝度信号に近い色成分の画像情報の平均値に
対する他の色成分の画像情報の平均値の係数からホワイ
トバランスの調整値を算出することで一括してホワイト
バランスを調整することができるため、より短時間のう
ちに被写体の変化に対してホワイトバランスを追従させ
ることができる。
With this method, the white balance is not adjusted for each preset step width, but the image of the other color component is compared with the average value of the image information of the color component closest to the luminance signal. By calculating the white balance adjustment value from the coefficient of the average value of the information, the white balance can be adjusted collectively, so that the white balance can follow the change of the subject in a shorter time. .

【0024】請求項6記載の発明は、上記請求項5記載
の発明において、上記第3の演算工程で算出したホワイ
トバランスの調整値に対して所定値を加減して微調整す
る第4の演算工程をさらに具備したことを特徴とする。
According to a sixth aspect of the present invention, in the fourth aspect of the present invention, a fourth operation of finely adjusting the white balance adjustment value calculated in the third operation step by adding or subtracting a predetermined value to or from the white balance adjustment value. The method further comprises a step.

【0025】このような方法とすれば、上記請求項5記
載の発明の作用に加えて、より正確なホワイトバランス
調整を行なわせることができる。
According to such a method, in addition to the effect of the fifth aspect of the invention, more accurate white balance adjustment can be performed.

【0026】請求項7記載の発明は、上記請求項5記載
の発明において、上記第1の演算工程で求めた各色成分
毎の画像情報の平均値を用い、最も輝度信号に近い色成
分の画像情報の平均値を基準として他の各色成分毎の画
像情報の平均値に対する、上記第1の係数より調整幅の
小さい第2の係数を求める第5の演算工程と、この第5
の演算工程で求めた各第2の係数により第2のホワイト
バランスの調整値を算出する第6の演算工程とをさらに
具備したことを特徴とする。
According to a seventh aspect of the present invention, in the fifth aspect of the present invention, an image of a color component closest to a luminance signal is used by using an average value of image information for each color component obtained in the first calculation step. A fifth calculation step of obtaining a second coefficient having a smaller adjustment width than the first coefficient with respect to the average value of the image information for each of the other color components based on the average value of the information;
And a sixth calculating step of calculating a second white balance adjustment value using each of the second coefficients obtained in the calculating step.

【0027】このような方法とすれば、上記請求項5記
載の発明の作用に加えて、ホワイトバランスの粗調整後
に正確な調整値に収束するまでの画像での色合いの変化
を自然なものとさせることができる。
According to this method, in addition to the effect of the fifth aspect of the present invention, the change in the color tone of the image until the convergence to the accurate adjustment value after the coarse adjustment of the white balance is made natural. Can be done.

【0028】[0028]

【発明の実施の形態】(第1の実施の形態)以下本発明
をデジタルカメラに適用した場合の第1の実施の形態に
ついて図面を参照して説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS (First Embodiment) A first embodiment in which the present invention is applied to a digital camera will be described with reference to the drawings.

【0029】図1はその回路構成を示すもので、10が
デジタルカメラである。このデジタルカメラ10は、記
録モードと再生モードとを設定可能であり、記録モード
の状態においては、レンズ11の後方に配置された、原
色系(RGB)のカラーフィルタを有するCCD12
は、タイミング発生器(TG)13、垂直ドライバ14
によって走査駆動され、一定周期毎に光電変換出力を1
画面分出力する。
FIG. 1 shows the circuit configuration, and reference numeral 10 denotes a digital camera. The digital camera 10 can set a recording mode and a reproduction mode. In the recording mode, a CCD 12 having a primary color (RGB) color filter disposed behind the lens 11 is provided in the recording mode.
Is a timing generator (TG) 13 and a vertical driver 14
Scanning drive, and the photoelectric conversion output is
Output for the screen.

【0030】この光電変換出力は、アナログ値の信号の
状態で図示しない増幅器でRGBの各色成分毎に適宜ゲ
イン調整された後に、サンプルホールド回路(S/H)
15でサンプルホールドされ、A/D変換器(A/D)
16でデジタルデータに変換され、カラープロセス回路
17でカラープロセス処理が行なわれて、デジタル値の
輝度・色差マルチプレクス信号(YUVデータ)がDM
A(Direct Memory Access)コン
トローラ18に出力される。
This photoelectric conversion output is appropriately adjusted in gain for each of the R, G, and B color components by an amplifier (not shown) in a state of an analog value signal, and then output to a sample / hold circuit (S / H).
A / D converter (A / D) sampled and held at 15
The digital data is converted into digital data by a color processing circuit 17 and color processing is performed by a color processing circuit 17, and a luminance / color difference multiplex signal (YUV data) of a digital value is converted into a DM signal.
A (Direct Memory Access) A is output to the controller 18.

【0031】DMAコントローラ18は、カラープロセ
ス回路17のYUVデータ出力を、同じくカラープロセ
ス回路17の同期信号、メモリ書込みイネーブル、クロ
ック出力を用いて一度DMAコントローラ18内部のバ
ッファに書込み、DRAMインタフェース(I/F)1
9を介してDRAM20にDMA転送を行なう。
The DMA controller 18 once writes the YUV data output of the color process circuit 17 to a buffer inside the DMA controller 18 using the synchronization signal, memory write enable, and clock output of the color process circuit 17 as well, and the DRAM interface (I / F) 1
9 to the DRAM 20 via the DMA transfer.

【0032】CPU21は、上記YUVデータのDRA
M20へのDMA転送終了後に、このYUVデータをD
RAMインタフェース19を介してDRAM20より読
出し、VRAMコントローラ22を介してVRAM23
に書込む。
The CPU 21 performs DRA of the YUV data.
After the DMA transfer to M20 is completed, this YUV data is
The data is read from the DRAM 20 via the RAM interface 19 and the VRAM 23 is read via the VRAM controller 22.
Write to.

【0033】デジタルビデオエンコーダ(以下「ビデオ
エンコーダ」と略称する)24は、上記YUVデータを
VRAMコントローラ22を介してVRAM23より定
期的に読出し、これらのデータを元にビデオ信号を発生
して表示部25に出力する。
A digital video encoder (hereinafter abbreviated as "video encoder") 24 periodically reads the YUV data from the VRAM 23 through the VRAM controller 22, generates a video signal based on the data, and displays the video signal. 25.

【0034】この表示部25は、例えばバックライト付
のカラー液晶表示パネルとその駆動回路とで構成され、
カメラの背面側に配設されて、記録モード時にはEVF
(Electronic View Finder:電
子ビューファインダ)として機能するもので、ビデオエ
ンコーダ24からのビデオ信号に基づいた表示を行なう
ことで、その時点でCCD12から取込んでいる画像情
報に基づく画像を表示することとなる。
The display section 25 is composed of, for example, a color liquid crystal display panel with a backlight and its driving circuit.
Located on the back side of the camera, EVF in recording mode
(Electronic View Finder), which displays an image based on the image information captured from the CCD 12 at that time by performing display based on the video signal from the video encoder 24. Become.

【0035】そして、このように表示部25にその時点
での画像がリアルタイムに表示されている状態で、記録
保存を行ないたいタイミングでキー入力部26を構成す
るシャッタキーを操作すると、トリガ信号を発生する。
CPU21は、このトリガ信号に応じてその時点でCC
D12から取込んでいる1画面分のYUVデータのDR
AM20へのDMA転送の終了後、直ちにCCD12か
らのDRAM20への経路を停止し、記録保存の状態に
遷移する。
When the shutter key constituting the key input unit 26 is operated at a timing when the user wants to perform recording and saving while the image at that time is displayed on the display unit 25 in real time, a trigger signal is generated. appear.
In response to the trigger signal, the CPU 21
DR of one screen of YUV data taken from D12
Immediately after the end of the DMA transfer to the AM 20, the path from the CCD 12 to the DRAM 20 is stopped, and the state transits to the state of recording and saving.

【0036】この記録保存の状態では、CPU21がD
RAM20に書込まれている1フレーム分のYUVデー
タをDRAMインタフェース19を介してY,Cb,C
rの各コンポーネント毎に縦8画素×横8画素の基本ブ
ロックと呼称される単位で読出してJPEG回路27に
書込み、このJPEG回路27でADCT(Adapt
ive Discrete Cosine Trans
form:適応離散コサイン変換)、エントロピ符号化
方式であるハフマン符号化等の処理により圧縮した符号
データを該JPEG回路27から読出して、このデジタ
ルカメラ10の記録媒体となる、不揮発性メモリである
フラッシュメモリ28に書込む。
In this recording and storage state, the CPU 21
The YUV data for one frame written in the RAM 20 is transferred to the Y, Cb, C
r is read out in units called a basic block of 8 pixels by 8 pixels for each component and written to the JPEG circuit 27, and the ADCC (Adapt
live Discrete Cosine Trans
form: Adaptive Discrete Cosine Transform), code data compressed by a process such as Huffman coding which is an entropy coding method is read out from the JPEG circuit 27, and a flash as a non-volatile memory serving as a recording medium of the digital camera 10. Write to memory 28.

【0037】そして、1フレーム分のYUVデータの圧
縮処理及びフラッシュメモリ28への全圧縮データの書
込み終了に伴なって、CPU21は再度CCD12から
DRAM20への経路を起動する。
When the compression processing of one frame of YUV data and the writing of all the compressed data to the flash memory 28 are completed, the CPU 21 activates the path from the CCD 12 to the DRAM 20 again.

【0038】なお、上記キー入力部26は、上述したシ
ャッタキーの他に、記録(REC)モードと再生(PL
AY)モードとを切換える録/再モード切換えキー、画
像選択キー等から構成され、キー操作に伴なう信号は直
接CPU21へ送出される。
The key input section 26 has a recording (REC) mode and a reproduction (PL) mode in addition to the shutter key.
An AY) mode is composed of a recording / reproducing mode switching key, an image selection key, and the like, and a signal accompanying the key operation is directly transmitted to the CPU 21.

【0039】シャッタキーは、2段階の押圧操作を行な
うものとし、一般の撮影においては1段階目の半押し状
態で、AF(オートフォーカス)、AE(自動露光)、
及びAWB(自動ホワイトバランス調整)の各実行値を
ロックして撮影に備え、2段階目の全押し状態で、上述
したトリガ信号を出力しての撮影動作に随時移行するも
のである。
The shutter key performs a two-stage pressing operation. In general photographing, AF (autofocus), AE (automatic exposure),
In addition, the execution values of AWB (automatic white balance adjustment) are locked to prepare for shooting, and in the second-step full-press state, the above-described trigger signal is output to shift to the shooting operation at any time.

【0040】また、再生モードでは、CPU21はCC
D12からDRAM20への経路を停止し、キー入力部
26の画像選択キー等の操作に応じてCPU21がフラ
ッシュメモリ28から特定の1フレーム分の符号データ
を読出してJPEG回路27に書込み、JPEG回路2
7で伸長処理を行なって得られた縦8画素×横8画素の
基本ブロック単位に、VRAMコントローラ22を介し
てVRAM23へ1フレーム分のYUVデータを展開記
憶させる。すると、ビデオエンコーダ24は、VRAM
23に展開記憶されている1フレーム分のYUVデータ
を元にビデオ信号を発生し、表示部25で表示させる。
In the reproduction mode, the CPU 21
The path from D12 to the DRAM 20 is stopped, and in response to an operation of an image selection key or the like of the key input unit 26, the CPU 21 reads out a specific one frame of code data from the flash memory 28 and writes it into the JPEG circuit 27, and the JPEG circuit 2
In step S7, one frame of YUV data is developed and stored in the VRAM 23 via the VRAM controller 22 in units of 8 × 8 basic blocks obtained by performing the expansion process. Then, the video encoder 24 converts the VRAM
A video signal is generated based on one frame of YUV data expanded and stored in the storage unit 23 and displayed on the display unit 25.

【0041】次に、本実施の形態に係る記録モード時の
自動ホワイトバランス調整の動作について説明する。
Next, the operation of the automatic white balance adjustment in the recording mode according to the present embodiment will be described.

【0042】図2は主としてCPU21の制御の下に実
行される自動ホワイトバランス調整の一連の処理工程を
例示するもので、その当初には、対象となる1枚分の画
像データを、データ圧縮を行なう前のビットマップファ
イルの状態で記憶しているバッファメモリとしてのDR
AM20から読出し(ステップB01)、RGBの各色
成分毎に全画素データの総和から1画素当たりの平均値
(図及び以下文中では「ΣR(ave)」「ΣG(av
e)」「ΣB(ave)」と示す)を算出する(ステッ
プB02)。
FIG. 2 exemplifies a series of processing steps of automatic white balance adjustment mainly executed under the control of the CPU 21. Initially, one image data to be processed is subjected to data compression. DR as buffer memory stored in the state of bitmap file before performing
The data is read out from the AM 20 (step B01), and for each of the RGB color components, the average value per pixel is calculated from the sum total of all the pixel data (in the figures and in the following text, "@R (ave)", "@G (av
e) ”(shown as“ ΣB (ave) ”) (step B02).

【0043】次いで、後述するホワイトバランスの仮ロ
ック状態ではないことを確認した上で(ステップB0
3)、次の演算 (その時点でのRゲイン)×(「ΣG(ave)」/「ΣR(ave)」) ‥‥(1) を実行し、得た値を新たなRゲインとして設定する(ス
テップB04)。
Next, after confirming that the white balance is not in the temporarily locked state described later (step B0).
3) Then, the following calculation (R gain at that time) × (“ΣG (ave)” / “ΣR (ave)”) ‥‥ (1) is executed, and the obtained value is set as a new R gain. (Step B04).

【0044】同様にして、次の演算 (その時点でのBゲイン)×(「ΣG(ave)」/「ΣB(ave)」) ‥‥(2) を実行し、得た値を新たなBゲインとして設定する(ス
テップB05)。
Similarly, the following calculation (B gain at that time) × (“ΣG (ave)” / “ΣB (ave)”) ‥‥ (2) is executed, and the obtained value is replaced with a new B value. The gain is set (step B05).

【0045】次いで、上記式(1)中で用いた値 「ΣG(ave)」/「ΣR(ave)」 が概ね「1」であるか否かを判断し(ステップB0
6)、概ね「1」である場合には、さらに、上記式
(2)中で用いた値 「ΣG(ave)」/「ΣB(ave)」 も概ね「1」であるか否かを判断する(ステップB0
7)。
Next, it is determined whether or not the value "$ G (ave)" / "$ R (ave)" used in the above equation (1) is approximately "1" (step B0).
6) If the value is approximately “1”, it is further determined whether the value “ΔG (ave)” / “ΔB (ave)” used in the above equation (2) is also approximately “1”. (Step B0
7).

【0046】ここでも、概ね「1」であると判断する
と、上記「ΣR(ave)」「ΣG(ave)」「ΣB
(ave)」の3値はそれぞれ略等しい状態となるの
で、概ねホワイトバランスがとれたものとして、ホワイ
トバランスの仮ロック状態とする(ステップB08)。
Here, if it is determined that the value is approximately “1”, the above-mentioned “$ R (ave)”, “$ G (ave)”, “$ B
Since the three values of “(ave)” are substantially equal, it is assumed that the white balance has been substantially obtained and the white balance is temporarily locked (step B08).

【0047】また、上記ステップB06あるいはB07
でいずれかの値が「1」を大きく外れていると判断した
場合には、再び上記ステップB01からの処理に戻る。
そして、ステップB01〜B07の処理を繰返し実行
し、Rゲイン及びBゲインを順次可変設定していくこと
で、上記「ΣR(ave)」「ΣG(ave)」「ΣB
(ave)」の3値がそれぞれ略等しい状態となったと
ステップB07で判断すると、ステップB08でホワイ
トバランスの仮ロック状態とする。
Further, step B06 or B07
If it is determined that any of the values deviates greatly from "1", the process returns to the process from step B01 again.
Then, the processes of steps B01 to B07 are repeatedly executed, and the R gain and the B gain are sequentially and variably set, so that the above-mentioned “ΣR (ave)”, “ΣG (ave)”, “ΣB”
If it is determined in step B07 that the three values of “(ave)” have become substantially equal to each other, a temporary lock state of the white balance is set in step B08.

【0048】その後、上記「ΣR(ave)」と「ΣG
(ave)」とが正確に等しいか否かにより、R成分の
微調整が必要であるか否かを判断する(ステップB0
9)。
Thereafter, the "@R (ave)" and "@G
(Ave) ”is determined to be exactly equal or not to determine whether fine adjustment of the R component is necessary (step B0).
9).

【0049】ここで、両値が正確には等しくなく、微調
整が必要であると判断した場合にのみ、G成分の同値に
対する大小に応じて、Rゲインを予め設定されている定
数分だけ加減調整する(ステップB10)。
Here, only when it is determined that the two values are not exactly equal and fine adjustment is required, the R gain is adjusted by a predetermined constant according to the magnitude of the G component with respect to the same value. Adjustment is performed (step B10).

【0050】この時に用いる定数は、すでに概ねの調整
はなされており、微調整のために用いるものであるた
め、上記図5での説明で述べた定数に比してごく小さな
値となる。
Since the constant used at this time has already been roughly adjusted and is used for fine adjustment, it has a very small value as compared with the constant described in FIG.

【0051】その後、今度は上記「ΣB(ave)」と
「ΣG(ave)」とが正確に等しいか否かにより、B
成分の微調整も必要であるか否かを判断する(ステップ
B11)。
Then, this time, whether or not “$ B (ave)” and “$ G (ave)” are exactly equal,
It is determined whether or not fine adjustment of the components is also necessary (step B11).

【0052】ここで、両値が正確には等しくなく、微調
整が必要であると判断した場合にのみ、G成分の同値に
対する大小に応じて、Bゲインを予め設定されている定
数分だけ加減調整する(ステップB12)。この時に用
いる定数も、微調整のためのごく小さな値となる。
Here, only when it is determined that the two values are not exactly equal and fine adjustment is necessary, the B gain is adjusted by a predetermined constant according to the magnitude of the same value of the G component. Adjustment is performed (step B12). The constant used at this time also becomes a very small value for fine adjustment.

【0053】その後、上記R,Bの各ゲインを微調整す
ることで全体のホワイトバランス調整のための処理を終
えたか否かを判断し(ステップB13)、終えていない
と判断した場合には再び上記ステップB01からの処理
に戻る。
Thereafter, it is determined whether or not the process for adjusting the overall white balance has been completed by finely adjusting the R and B gains (step B13). The process returns to the process from step B01.

【0054】このとき、ホワイトバランスの仮ロック状
態を設定しているために、ステップB03でこれを判断
してステップB04〜B08の処理は省略する。
At this time, since the temporary lock state of the white balance has been set, this is determined in step B03, and the processing in steps B04 to B08 is omitted.

【0055】したがって、ステップB01〜B03,B
09〜B13の処理を繰返し実行することで、「ΣR
(ave)」「ΣG(ave)」「ΣB(ave)」の
3値が全て正確に等しい状態となると、ステップB13
でこれを判断し、以上でこの図2の一連の処理を終了す
る。
Therefore, steps B01 to B03, B
By repeatedly executing the processing from 09 to B13, “ΣR
When all three values of (ave), “$ G (ave)”, and “$ B (ave)” are exactly the same, step B13
Then, the series of processes in FIG. 2 is completed.

【0056】このように、始めから予め設定されたステ
ップ幅毎にホワイトバランスを調整していくのではな
く、最も輝度信号に近い色成分であるG成分の1画素当
たりの平均値に対する他の色成分の画像情報の平均値の
係数からホワイトバランスの調整値を算出することで一
括してホワイトバランスを調整し、その後に微小な定数
で微調整するため、より短時間のうちに被写体の変化に
対してホワイトバランスを極めて正確に追従させること
ができる。
As described above, instead of adjusting the white balance for each step width set in advance from the beginning, other colors for the average value per pixel of the G component which is the color component closest to the luminance signal are obtained. By calculating the white balance adjustment value from the coefficient of the average value of the component image information, the white balance is adjusted collectively, and then finely adjusted with a small constant. On the other hand, the white balance can be made to follow very accurately.

【0057】また、「ΣG(ave)」/「ΣR(av
e)」及び「ΣG(ave)」/「ΣB(ave)」が
概ね「1」になった場合に、ホワイトバランスが概ねと
れたものとして仮ロックすることとしたが、「ΣR(a
ve)」/「ΣG(ave)」あるいは「ΣB(av
e)」/「ΣG(ave)」が「1」を中心とする、あ
る値の範囲内に入った時点でホワイトバランスが概ねと
れたものしてもよいし、「ΣR(ave)」−「ΣG
(ave)」あるいは「ΣB(ave)」−「ΣG(a
ve)」が「0」を中心するある値の範囲内に入った時
点でホワイトバランスが概ねとれたものしてもよい。
Also, "@G (ave)" / "@ R (av
e) "and" $ G (ave) "/" $ B (ave) "become substantially" 1 ", and the white balance is assumed to be substantially obtained, and temporary locking is performed.
ve) ”/“ $ G (ave) ”or“ $ B (av
e) "/" $ G (ave) "may be approximately white when the value falls within a certain value range around" 1 ", or" $ R (ave) "-" ΣG
(Ave) ”or“ $ B (ave) ”-“ $ G (a
ve) may be approximately white balance when the value falls within a certain value range centered on “0”.

【0058】さらに「ΣR(ave)」−「ΣG(av
e)」あるいは「ΣB(ave)」−「ΣG(av
e)」のとりうる値をいくつかのゾーンに分割し、各ゾ
ーンに対して微調整の定数をそれぞれ設定するようにし
てもよい。
Further, "@R (ave)"-"@ G (av
e) ”or“ ΣB (ave) ”−“ ΣG (av
e)) may be divided into several zones, and a fine adjustment constant may be set for each zone.

【0059】(第2の実施の形態)以下本発明をデジタ
ルカメラに適用した場合の第2の実施の形態について図
面を参照して説明する。
(Second Embodiment) Hereinafter, a second embodiment in which the present invention is applied to a digital camera will be described with reference to the drawings.

【0060】なお、その回路構成については上記図1と
同様であるので、同一部分は同一符号を用いるものとし
てその図示及び説明は省略する。
Since the circuit configuration is the same as that of FIG. 1, the same parts are denoted by the same reference numerals and their illustration and description are omitted.

【0061】次に、本実施の形態に係る記録モード時の
自動ホワイトバランス調整の動作について説明する。
Next, the operation of the automatic white balance adjustment in the recording mode according to the present embodiment will be described.

【0062】図3は主としてCPU21の制御の下に実
行される自動ホワイトバランス調整の一連の処理工程を
例示するもので、その当初には、対象となる1枚分の画
像データを、データ圧縮を行なう前のビットマップファ
イルの状態で記憶しているバッファメモリとしてのDR
AM20から読出し(ステップC01)、RGBの各色
成分毎に全画素データの総和から1画素当たりの平均値
「ΣR(ave)」「ΣG(ave)」「ΣB(av
e)」を算出する(ステップC02)。
FIG. 3 exemplifies a series of processing steps of automatic white balance adjustment mainly executed under the control of the CPU 21. Initially, one image data to be processed is subjected to data compression. DR as buffer memory stored in the state of bitmap file before performing
The data is read out from the AM 20 (step C01), and the average value per pixel “ΣR (ave)”, “ΣG (ave)”, “ΣB (av) is calculated from the sum of all pixel data for each of the RGB color components.
e) is calculated (step C02).

【0063】次いで、ホワイトバランスの仮ロック状態
ではないことを確認した上で(ステップC03)、上記
式(1)を実行し、得た値を新たなRゲインとして設定
する(ステップC04)。
Next, after confirming that the white balance is not in the temporary locked state (step C03), the above equation (1) is executed, and the obtained value is set as a new R gain (step C04).

【0064】同様にして、上記式(2)を実行し、得た
値を新たなBゲインとして設定する(ステップC0
5)。
Similarly, the above equation (2) is executed, and the obtained value is set as a new B gain (step C0).
5).

【0065】次いで、上記式(1)中で用いた値 「ΣG(ave)」/「ΣR(ave)」 が概ね「1」であるか否かを判断し(ステップC0
6)、概ね「1」である場合には、さらに、上記式
(2)中で用いた値 「ΣG(ave)」/「ΣB(ave)」 も概ね「1」であるか否かを判断する(ステップC0
7)。
Next, it is determined whether or not the value "$ G (ave)" / "$ R (ave)" used in the above equation (1) is approximately "1" (step C0).
6) If the value is approximately “1”, it is further determined whether the value “ΔG (ave)” / “ΔB (ave)” used in the above equation (2) is also approximately “1”. (Step C0
7).

【0066】ここでも、概ね「1」であると判断する
と、上記「ΣR(ave)」「ΣG(ave)」「ΣB
(ave)」の3値はそれぞれ略等しい状態となるの
で、概ねホワイトバランスがとれたものとして、ホワイ
トバランスの仮ロック状態とする(ステップC08)。
Also here, when it is determined that the value is approximately “1”, the above “$ R (ave)”, “$ G (ave)”, “$ B
Since the three values of “(ave)” are substantially equal to each other, it is assumed that the white balance has been substantially obtained and the white balance is temporarily locked (step C08).

【0067】また、上記ステップC06あるいはC07
でいずれかの値が「1」を大きく外れていると判断した
場合には、再び上記ステップC01からの処理に戻る。
そして、ステップC01〜C07の処理を繰返し実行
し、Rゲイン及びBゲインを順次可変設定していくこと
で、上記「ΣR(ave)」「ΣG(ave)」「ΣB
(ave)」の3値がそれぞれ略等しい状態となったと
ステップC07で判断すると、ステップC08でホワイ
トバランスの仮ロック状態とする。
Further, the above-mentioned Step C06 or C07
If it is determined that any of the values deviates significantly from "1", the process returns to the process from step C01.
Then, the processes of steps C01 to C07 are repeatedly executed to sequentially and variably set the R gain and the B gain, whereby the above-mentioned “ΔR (ave)”, “ΔG (ave)”, “ΔB
If it is determined in step C07 that the three values of “(ave)” have become substantially equal to each other, a temporary lock state of the white balance is set in step C08.

【0068】その後、次の演算 (その時点でのRゲイン)×((「ΣG(ave)」/「ΣR(ave)」)+1)/2 ‥‥(3) を実行し、その時点でのRゲインに目的とするRゲイン
(「1」)との中間値を乗じ、得た値を新たなRゲイン
として設定する(ステップC09)。
Then, the following calculation (R gain at that time) × ((“ΣG (ave)” / “ΣR (ave)”) + 1) / 2 ‥‥ (3) is executed, and The R gain is multiplied by an intermediate value with the target R gain (“1”), and the obtained value is set as a new R gain (step C09).

【0069】同様にして、次の演算 (その時点でのBゲイン)×((「ΣG(ave)」/「ΣB(ave)」)+1)/2 ‥‥(4) を実行し、その時点でのBゲインに目的とするBゲイン
(「1」)との中間値を乗じ、得た値を新たなBゲイン
として設定する(ステップC10)。
Similarly, the following calculation (B gain at that time) × ((“ΣG (ave)” / “ΣB (ave)”) + 1) / 2 ‥‥ (4) is executed. Is multiplied by an intermediate value with the target B gain (“1”), and the obtained value is set as a new B gain (step C10).

【0070】その後、除算「「ΣG(ave)」/「Σ
R(ave)」」の商が「1」であるか否かにより「Σ
G(ave)」と「ΣR(ave)」とが正確に等し
く、上記ステップC09での中間値の設定が目的とする
Rゲインに収束したか否かを判断する(ステップC1
1)。
Thereafter, the division “「 G (ave) ”/“ Σ
R (ave) ”is“ 1 ”depending on whether the quotient is“ 1 ”or not.
It is determined whether or not “G (ave)” is exactly equal to “aR (ave)”, and whether the setting of the intermediate value in step C09 has converged to the target R gain (step C1).
1).

【0071】ここで、両値が正確に等しく、上記商が
「1」であると判断すると、同様にして除算「「ΣG
(ave)」/「ΣB(ave)」」の商が「1」であ
るか否かにより「ΣG(ave)」と「ΣB(av
e)」とが正確に等しく、上記ステップC10での中間
値の設定が目的とするBゲインに収束したか否かを判断
する(ステップC12)。
Here, when it is determined that both values are exactly equal and the quotient is “1”, the division “「 G
(@Ave) / "@ B (ave)" and "@G (ave)" and "@B (av)" depending on whether the quotient is "1" or not.
e) is exactly equal, and it is determined whether or not the setting of the intermediate value in step C10 has converged to the target B gain (step C12).

【0072】上記ステップC11あるいはステップC1
2で除算の商が「1」ではないと判断した場合には、ま
だゲイン設定された中間値が目的とする値に収束してい
ないことになるので、再び上記ステップC01からの処
理を繰返す。
The above step C11 or step C1
If it is determined in step 2 that the quotient of the division is not "1", the intermediate value for which the gain has been set has not yet converged to the target value, and the processing from step C01 is repeated again.

【0073】このとき、ホワイトバランスの仮ロック状
態を設定しているために、ステップC03でこれを判断
してステップC04〜C08の処理は省略する。
At this time, since the temporary lock state of the white balance has been set, this is determined in step C03, and the processing in steps C04 to C08 is omitted.

【0074】そして、ステップC11とステップC12
の双方で各商が「1」であると判断すると、これで全体
のホワイトバランス調整のための処理を終えたものとし
て、以上でこの図2の一連の処理を終了する。
Then, Step C11 and Step C12
When it is determined that each quotient is "1", it is determined that the process for adjusting the overall white balance has been completed, and the series of processes in FIG. 2 is completed.

【0075】このように、始めから予め設定されたステ
ップ幅毎にホワイトバランスを調整していくのではな
く、最も輝度信号に近い色成分であるG成分の1画素当
たりの平均値に対する他の色成分の画像情報の平均値の
係数からホワイトバランスの調整値を算出することで一
括してホワイトバランスを粗調整し、その後にその時点
でのホワイトバランスに目的とするホワイトバランスと
の中間値を乗ずることにより順次調整していくことで、
最終的に正確なホワイトバランスに収束させるようにし
たため、粗調整後に徐々にホワイトバランスが正確に調
整されることとなり、表示部25でモニタ表示される被
写体の色合いの変化を自然なものとすることができる。
As described above, instead of adjusting the white balance for each of the preset step widths from the beginning, other colors for the average value per pixel of the G component, which is the color component closest to the luminance signal, are compared. The white balance is roughly adjusted by calculating the white balance adjustment value from the coefficient of the average value of the component image information, and then the white balance at that point is multiplied by the intermediate value of the target white balance. By adjusting sequentially,
In order to finally converge to an accurate white balance, the white balance is gradually and accurately adjusted after the coarse adjustment, and the change in the color of the subject displayed on the display unit 25 is natural. Can be.

【0076】また、乗ずる係数は目的とするR及びBゲ
イン(「1」)と「ΣG(ave)」/「ΣR(av
e)」及び「ΣG(ave)」/「ΣB(ave)」と
の間の値であればよいので、上記式(3)、(4)の演
算を(その時点でのRゲイン)×((「ΣG(ave)」/
「ΣR(ave)」)+2)/3、(その時点でのBゲイン)
×((「ΣG(ave)」/「ΣB(ave)」)+2)/3と
いうようにGとR、GとBのブレンド量を変えることで
ゲインの変化のスピードを調整してもよい。
The coefficients to be multiplied are the desired R and B gains (“1”) and “ΔG (ave)” / “ΔR (av
e) ”and“ ΔG (ave) ”/“ ΔB (ave) ”. Therefore, the calculation of the above equations (3) and (4) is performed by (R gain at that time) × ( ("@G (ave)" /
“ΣR (ave)”) + 2) / 3 (B gain at that time)
The speed of the gain change may be adjusted by changing the blend amount of G and R, or G and B, such as × ((“(G (ave)” / “ΣB (ave)”) + 2) / 3.

【0077】さらに「ΣG(ave)」/「ΣR(av
e)」あるいは「ΣG(ave)」/「ΣB(av
e)」のとりうる値をいくつかのゾーンに分割し、各ゾ
ーンに対して上記の方法でホワイトバランスの追従速度
をそれぞれ設定するようにしてもよい。
Further, "@G (ave)" / "@ R (av
e) ”or“ $ G (ave) ”/“ $ B (av
e)) may be divided into several zones, and the white balance following speed may be set for each zone by the above-described method.

【0078】(第3の実施の形態)以下本発明をデジタ
ルカメラに適用した場合の第3の実施の形態について図
面を参照して説明する。
(Third Embodiment) Hereinafter, a third embodiment in which the present invention is applied to a digital camera will be described with reference to the drawings.

【0079】なお、その回路構成については上記図1と
同様であるので、同一部分は同一符号を用いるものとし
てその図示及び説明は省略する。
Since the circuit configuration is the same as that of FIG. 1, the same parts are denoted by the same reference numerals and their illustration and description are omitted.

【0080】また、このデジタルカメラ10ではAE
(自動露出)機能を有し、記録モード時にあってはAE
機能によりCCD12に入射する光量を絞り値を可変す
ることで制御するものとする。
In this digital camera 10, the AE
(Automatic exposure) function and AE when in recording mode
The function controls the amount of light incident on the CCD 12 by varying the aperture value.

【0081】次に、本実施の形態に係る記録モード時の
自動ホワイトバランス調整の動作について説明する。
Next, the operation of the automatic white balance adjustment in the recording mode according to the present embodiment will be described.

【0082】図4は主としてCPU21の制御の下に実
行される自動ホワイトバランス調整の一連の処理工程を
例示するもので、その当初には、対象となる1枚分の画
像データを、データ圧縮を行なう前のビットマップファ
イルの状態で記憶しているバッファメモリとしてのDR
AM20から読出し(ステップD01)、RGBの各色
成分毎に全画素データの総和から1画素当たりの平均値
「ΣR(ave)」「ΣG(ave)」「ΣB(av
e)」を算出する(ステップD02)。
FIG. 4 exemplifies a series of processing steps of automatic white balance adjustment mainly executed under the control of the CPU 21. At first, one image data to be processed is subjected to data compression. DR as buffer memory stored in the state of bitmap file before performing
The data is read from the AM 20 (step D01), and the average value per pixel “ΔR (ave)”, “ΔG (ave)”, “ΔB (av) is calculated from the sum of all pixel data for each of the RGB color components.
e) ”(step D02).

【0083】次いで、ホワイトバランスがロック状態で
はないことを確認した上で(ステップD03)、上記式
(1)を実行し、得た値を新たなRゲインとして設定す
る(ステップD04)。
Next, after confirming that the white balance is not in the locked state (step D03), the above equation (1) is executed, and the obtained value is set as a new R gain (step D04).

【0084】同様にして、上記式(2)を実行し、得た
値を新たなBゲインとして設定する(ステップD0
5)。
Similarly, the above equation (2) is executed, and the obtained value is set as a new B gain (step D0).
5).

【0085】次いで、上記式(1)中で用いた値 「ΣG(ave)」/「ΣR(ave)」 が概ね「1」であるか否かを判断し(ステップD0
6)、概ね「1」である場合には、さらに、上記式
(2)中で用いた値 「ΣG(ave)」/「ΣB(ave)」 も概ね「1」であるか否かを判断する(ステップD0
7)。
Next, it is determined whether or not the value “ΣG (ave)” / “ΣR (ave)” used in the above equation (1) is approximately “1” (step D0).
6) If the value is approximately “1”, it is further determined whether the value “ΔG (ave)” / “ΔB (ave)” used in the above equation (2) is also approximately “1”. (Step D0
7).

【0086】ここでも、概ね「1」であると判断する
と、上記「ΣR(ave)」「ΣG(ave)」「ΣB
(ave)」の3値はそれぞれ略等しい状態となるの
で、概ねホワイトバランスがとれたものとして、ホワイ
トバランスのロック状態とする(ステップD08)。
Here, when it is determined that the value is approximately “1”, the above “ΣR (ave)”, “ΣG (ave)”, “ΣB”
Since the three values of “(ave)” are substantially equal to each other, it is assumed that the white balance has been substantially achieved and the white balance is locked (step D08).

【0087】また、上記ステップD06あるいはD07
でいずれかの値が「1」を大きく外れていると判断した
場合には、再び上記ステップD01からの処理に戻る。
そして、ステップD01〜D07の処理を繰返し実行
し、Rゲイン及びBゲインを順次可変設定していくこと
で、上記「ΣR(ave)」「ΣG(ave)」「ΣB
(ave)」の3値がそれぞれ略等しい状態となったと
ステップD07で判断すると、ステップD08でホワイ
トバランスのロック状態とする。
Further, the above-mentioned step D06 or D07
If it is determined that any of the values deviates greatly from "1", the process returns to the process from step D01 again.
Then, the processing of steps D01 to D07 is repeatedly executed, and the R gain and the B gain are sequentially and variably set, so that the above-mentioned “ΔR (ave)”, “ΔG (ave)”, “ΔB
If it is determined in step D07 that the three values of “(ave)” have become substantially equal to each other, a locked state of the white balance is set in step D08.

【0088】その後、上記AE機能により選択している
その時点での絞り値を取得してCPU21の内部レジス
タに保持し(ステップD09)、前回の同処理で取得し
ていた絞り値との差が1[EV]以上であるか否か、す
なわち前回から絞り値がある程度変化したか否かを判断
する(ステップD10)。
After that, the aperture value at that time selected by the AE function is acquired and held in the internal register of the CPU 21 (step D09), and the difference from the aperture value acquired in the previous same process is obtained. It is determined whether or not it is 1 [EV] or more, that is, whether or not the aperture value has changed to some extent from the previous time (step D10).

【0089】ここで、前回の絞り値との差が1[EV]
以上であると判断した場合にのみ、上記ステップD08
で設定したホワイトバランスのロック状態を解除し(ス
テップD11)、その後に全体のホワイトバランス調整
のための処理を終えたか否かを判断し(ステップD1
2)、終えていないと判断した場合には再び上記ステッ
プD01からの処理に戻る。
Here, the difference from the previous aperture value is 1 [EV].
Only when it is determined that the above is the case, step D08
The locked state of the white balance set in step (1) is released (step D11), and thereafter, it is determined whether or not the processing for adjusting the entire white balance has been completed (step D1).
2) If it is determined that the processing has not been completed, the process returns to the processing from step D01.

【0090】このとき、ホワイトバランスのロック状態
を設定している場合には、ステップD03でこれを判断
してステップD04〜D08の処理を省略する反面、絞
り値の変化が大きいためにロック状態を解除している場
合には、ステップD03でこれを判断して、ステップD
04,D05での処理により新たなRゲイン,Bゲイン
を設定し直す。
At this time, if the locked state of the white balance is set, it is determined in step D03 and the processing of steps D04 to D08 is omitted, but the locked state is changed because the change in the aperture value is large. If it has been released, this is determined in step D03,
New R gains and B gains are reset by the processing in steps 04 and D05.

【0091】これにより、絞り値が一定である限り、表
示部25でモニタ表示される被写体の状態が変化したと
しても、常に同じ色合いを保ったまま撮影を行なうこと
ができ、例えばズーム機能により被写体としての人物の
顔が徐々に画面中で大きくなるような表示を行なう場合
でも、絞り値が変わらない限り、表示される肌の色合い
が急激に変化してしまうようなことがなく、表示部25
での表示がきわめて自然なものとなる。
As a result, as long as the aperture value is constant, even if the state of the subject displayed on the monitor on the display unit 25 changes, the photographing can be performed while always maintaining the same color. Even when the display is performed such that the face of the person gradually increases in the screen, the displayed skin tone does not suddenly change as long as the aperture value does not change.
Display becomes very natural.

【0092】なお、上記第1乃至第3の実施の形態で
は、CCD12が原色系のカラーフィルタを有するもの
として、RGBの各色成分を出力し、ホワイトバランス
調整として図示しない増幅器でG成分を基準とし、R,
Bの各色成分のゲイン調整を行なった後にサンプルホー
ルド回路15へ送られるものとして説明したが、これに
限るものではなく、例えばCCD12が補色系のカラー
フィルタを有する場合には、ホワイトバランス調整とし
て輝度信号に最も近いY(イエロー)成分を基準とし
て、Mg(マゼンタ),Cy(シアン)の各色成分のゲ
イン調整を図示しない増幅器で行なうこととなる。
In the first to third embodiments, assuming that the CCD 12 has a color filter of primary color system, each color component of RGB is output, and an amplifier (not shown) uses the G component as a reference for white balance adjustment. , R,
Although the description has been made assuming that the gain of each color component B is sent to the sample and hold circuit 15 after the gain adjustment, the present invention is not limited to this. For example, when the CCD 12 has a complementary color filter, the With the Y (yellow) component closest to the signal as a reference, the gain of each color component of Mg (magenta) and Cy (cyan) is adjusted by an amplifier (not shown).

【0093】また、上記ホワイトバランスの調整方法
も、CCD12の出力する信号を増幅する増幅器でのゲ
インを可変するのではなく、例えばカラープロセス回路
17またはDMAコントローラ18により、デジタル値
の画像データの各画素に対して各色成分毎に異なる乗数
を乗じるものとしてもよい。
Also, the above-mentioned white balance adjustment method does not vary the gain of the amplifier for amplifying the signal output from the CCD 12, but uses, for example, the color process circuit 17 or the DMA controller 18 to output each digital image data. The pixel may be multiplied by a different multiplier for each color component.

【0094】その他、本発明は実施の形態に限定するも
のではなく、その要旨を逸脱しない範囲内で種々変形し
て実施することが可能であるものとする。
In addition, the present invention is not limited to the embodiment, and can be variously modified and implemented without departing from the gist thereof.

【0095】[0095]

【発明の効果】請求項1記載の発明によれば、予め設定
されたステップ幅毎にホワイトバランスを調整して行く
のではなく、最も輝度信号に近い色成分の画像情報の平
均値に対する他の色成分の画像情報の平均値の係数から
ホワイトバランスの調整値を算出することで一括してホ
ワイトバランスを調整することができるため、より短時
間のうちに被写体の変化に対してホワイトバランスを追
従させることができる。
According to the first aspect of the present invention, the white balance is not adjusted for each preset step width, but the white balance is adjusted with respect to the average value of the image information of the color component closest to the luminance signal. By calculating the white balance adjustment value from the coefficient of the average value of the color component image information, the white balance can be adjusted collectively, so that the white balance can follow the subject change in a shorter time. Can be done.

【0096】請求項2記載の発明によれば、上記請求項
1記載の発明の効果に加えて、より正確なホワイトバラ
ンス調整を行なうことができる。
According to the second aspect of the invention, more accurate white balance adjustment can be performed in addition to the effects of the first aspect of the invention.

【0097】請求項3記載の発明によれば、上記請求項
1記載の発明の効果に加えて、ホワイトバランスの粗調
整後に正確な調整値に収束するまでの画像での色合いの
変化を自然なものとすることができる。
According to the third aspect of the present invention, in addition to the effects of the first aspect of the present invention, a change in color tone in an image until the convergence to an accurate adjustment value after coarse adjustment of the white balance is natural. Things.

【0098】請求項4記載の発明によれば、上記請求項
1または2記載の発明の効果に加えて、絞り値に変化が
生じた際にのみ、上記第1の係数を用いたホワイトバラ
ンス調整の基底となる値の演算をし直すこととなるの
で、絞り値が変化しない状態では表示される被写体の画
像の色合いが急激に変化してしまうことがなく、モニタ
表示される画像が極めて自然な違和感のないものとな
る。
According to the fourth aspect of the present invention, in addition to the effects of the first or second aspect of the present invention, the white balance adjustment using the first coefficient is performed only when the aperture value changes. Is calculated again, so that the hue of the image of the displayed subject does not suddenly change when the aperture value does not change, and the image displayed on the monitor is extremely natural. There is no discomfort.

【0099】請求項5記載の発明によれば、予め設定さ
れたステップ幅毎にホワイトバランスを調整していくの
ではなく、最も輝度信号に近い色成分の画像情報の平均
値に対する他の色成分の画像情報の平均値の係数からホ
ワイトバランスの調整値を算出することで一括してホワ
イトバランスを調整することができるため、より短時間
のうちに被写体の変化に対してホワイトバランスを追従
させることができる。
According to the fifth aspect of the present invention, instead of adjusting the white balance for each preset step width, the other color components are compared with the average value of the image information of the color component closest to the luminance signal. Since the white balance can be adjusted collectively by calculating the white balance adjustment value from the coefficient of the average value of the image information of the image information, the white balance can follow the change of the subject in a shorter time. Can be.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施の形態に係るデジタルカメ
ラの回路構成を示すブロック図。
FIG. 1 is a block diagram showing a circuit configuration of a digital camera according to a first embodiment of the present invention.

【図2】同実施の形態に係るホワイトバランス調整の処
理内容を示すフローチャート。
FIG. 2 is a flowchart showing processing content of white balance adjustment according to the embodiment.

【図3】本発明の第2の実施の形態に係るホワイトバラ
ンス調整の処理内容を示すフローチャート。
FIG. 3 is a flowchart showing processing content of white balance adjustment according to a second embodiment of the present invention.

【図4】本発明の第3の実施の形態に係るホワイトバラ
ンス調整の処理内容を示すフローチャート。
FIG. 4 is a flowchart showing processing content of white balance adjustment according to a third embodiment of the present invention.

【図5】従来の一般的なホワイトバランス調整の処理内
容を示すフローチャート。
FIG. 5 is a flowchart showing processing content of a conventional general white balance adjustment.

【符号の説明】[Explanation of symbols]

10…デジタルカメラ 11…レンズ 12…CCD 13…タイミング発生器(TG) 14…垂直ドライバ 15…サンプルホールド回路(S/H) 16…A/D変換器 17…カラープロセス回路 18…DMAコントローラ 19…DRAMインタフェース 20…DRAM 21…CPU 22…VRAMコントローラ 23…VRAM 24…デジタルビデオエンコーダ 25…表示部 26…キー入力部 27…JPEG回路 28…フラッシュメモリ DESCRIPTION OF SYMBOLS 10 ... Digital camera 11 ... Lens 12 ... CCD 13 ... Timing generator (TG) 14 ... Vertical driver 15 ... Sampling and holding circuit (S / H) 16 ... A / D converter 17 ... Color process circuit 18 ... DMA controller 19 ... DRAM interface 20 DRAM 21 CPU 22 VRAM controller 23 VRAM 24 Digital video encoder 25 Display unit 26 Key input unit 27 JPEG circuit 28 Flash memory

───────────────────────────────────────────────────── フロントページの続き Fターム(参考) 5C065 AA03 BB02 BB04 CC01 CC08 CC09 DD02 EE12 FF03 GG18 GG23 GG29 GG30 GG32 GG44 5C066 AA01 BA13 CA08 CA17 CA23 DA01 DB01 DD06 EA03 EA17 EC01 GA01 GA32 GA33 GB01 HA02 KA12 KD02 KD06 KE03 KE09 KE11 KE17 KE19 KF01 KM02 KM11 KP02  ──────────────────────────────────────────────────続 き Continued on the front page F term (reference) 5C065 AA03 BB02 BB04 CC01 CC08 CC09 DD02 EE12 FF03 GG18 GG23 GG29 GG30 GG32 GG44 5C066 AA01 BA13 CA08 CA17 CA23 DA01 DB01 DD06 EA03 EA17 EC01 GA01 GA32 GA12 GB01 KE03 KA03 KE11 KE17 KE19 KF01 KM02 KM11 KP02

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】撮像対象となる光像を少なくとも3色の色
フィルタを介して各色成分毎の画像情報に光電変換する
撮像素子と、 この撮像素子で得た各色成分毎の画像情報の平均値を求
める第1の演算手段と、 この第1の演算手段で求めた各色成分毎の画像情報の平
均値を用い、最も輝度信号に近い色成分の画像情報の平
均値を基準として他の各色成分毎の画像情報の平均値に
対する第1の係数を求める第2の演算手段と、 この第2の演算手段で求めた各第1の係数によりホワイ
トバランスの調整値を算出する第3の演算手段とを具備
したことを特徴とする電子撮像装置。
An image sensor for photoelectrically converting a light image to be imaged into image information for each color component through at least three color filters, and an average value of image information for each color component obtained by the image sensor. Using the average value of the image information of each color component obtained by the first arithmetic means, and using the average value of the image information of the color component closest to the luminance signal as a reference, A second calculating means for calculating a first coefficient with respect to an average value of image information for each image; a third calculating means for calculating a white balance adjustment value based on each first coefficient obtained by the second calculating means; An electronic imaging device comprising:
【請求項2】上記第3の演算手段で算出したホワイトバ
ランスの調整値に対して所定値を加減して微調整する第
4の演算手段をさらに具備したことを特徴とする請求項
1記載の電子撮像装置。
2. The apparatus according to claim 1, further comprising a fourth calculating means for finely adjusting the white balance adjustment value calculated by said third calculating means by adding or subtracting a predetermined value. Electronic imaging device.
【請求項3】上記第1の演算手段で求めた各色成分毎の
画像情報の平均値を用い、最も輝度信号に近い色成分の
画像情報の平均値を基準として他の各色成分毎の画像情
報の平均値に対する、上記第1の係数より調整幅の小さ
い第2の係数を求める第5の演算手段と、 この第5の演算手段で求めた各第2の係数により第2の
ホワイトバランスの調整値を算出する第6の演算手段と
をさらに具備したことを特徴とする請求項1記載の電子
撮像装置。
3. An image information for each color component based on an average value of image information of a color component closest to a luminance signal using an average value of image information for each color component obtained by the first arithmetic means. A fifth calculating means for obtaining a second coefficient having a smaller adjustment width than the first coefficient with respect to an average value of the second coefficient; and adjusting a second white balance with each second coefficient obtained by the fifth calculating means. 2. The electronic imaging apparatus according to claim 1, further comprising: a sixth calculating means for calculating a value.
【請求項4】上記電子撮像装置は自動露出機能を有し、 該自動露出機能により絞り値が変化した場合に上記第2
の演算手段で求めた各第1の係数により上記第3の演算
手段でホワイトバランスの調整値を算出することを特徴
とする請求項1または2記載の電子撮像装置。
4. The electronic image pickup apparatus has an automatic exposure function, and when the aperture value is changed by the automatic exposure function, the second image pickup apparatus is set to the second position.
3. The electronic imaging apparatus according to claim 1, wherein the third calculating means calculates a white balance adjustment value using each of the first coefficients obtained by the calculating means.
【請求項5】撮像対象となる光像を少なくとも3色の色
フィルタを介して各色成分毎の画像情報に光電変換する
撮像素子で得た、各色成分毎の画像情報の平均値を求め
る第1の演算工程と、 この第1の演算工程で求めた各色成分毎の画像情報の平
均値を用い、最も輝度信号に近い色成分の画像情報の平
均値を基準として他の各色成分毎の画像情報の平均値に
対する第1の係数を求める第2の演算工程と、 この第2の演算工程で求めた各第1の係数によりホワイ
トバランスの調整値を算出する第3の演算工程とを有し
たことを特徴とするホワイトバランス調整方法。
5. A first method for obtaining an average value of image information for each color component obtained by an image sensor for photoelectrically converting a light image to be imaged into image information for each color component through at least three color filters. Using the average value of the image information for each color component obtained in the first calculation step, and using the average value of the image information of the color component closest to the luminance signal as a reference, the image information for each other color component And a third calculation step of calculating a white balance adjustment value using each of the first coefficients obtained in the second calculation step. A white balance adjustment method characterized by the following.
【請求項6】上記第3の演算工程で算出したホワイトバ
ランスの調整値に対して所定値を加減して微調整する第
4の演算工程をさらに具備したことを特徴とする請求項
5記載のホワイトバランス調整方法。
6. The apparatus according to claim 5, further comprising a fourth operation step of finely adjusting a white balance adjustment value calculated in said third operation step by adding or subtracting a predetermined value. White balance adjustment method.
【請求項7】上記第1の演算工程で求めた各色成分毎の
画像情報の平均値を用い、最も輝度信号に近い色成分の
画像情報の平均値を基準として他の各色成分毎の画像情
報の平均値に対する、上記第1の係数より調整幅の小さ
い第2の係数を求める第5の演算工程と、 この第5の演算工程で求めた各第2の係数により第2の
ホワイトバランスの調整値を算出する第6の演算工程と
をさらに具備したことを特徴とする請求項5記載のホワ
イトバランス調整方法。
7. An image information for each color component based on an average value of image information of a color component closest to a luminance signal using an average value of image information for each color component obtained in the first calculation step. A fifth calculation step for obtaining a second coefficient having a smaller adjustment width than the first coefficient with respect to the average value of the second coefficient; and adjusting the second white balance with each second coefficient obtained in the fifth calculation step. 6. The white balance adjustment method according to claim 5, further comprising a sixth calculation step of calculating a value.
JP11217378A 1999-07-30 1999-07-30 Electronic image pickup device and white balance adjustment method Abandoned JP2001045515A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11217378A JP2001045515A (en) 1999-07-30 1999-07-30 Electronic image pickup device and white balance adjustment method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11217378A JP2001045515A (en) 1999-07-30 1999-07-30 Electronic image pickup device and white balance adjustment method

Publications (2)

Publication Number Publication Date
JP2001045515A true JP2001045515A (en) 2001-02-16
JP2001045515A5 JP2001045515A5 (en) 2005-04-07

Family

ID=16703246

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11217378A Abandoned JP2001045515A (en) 1999-07-30 1999-07-30 Electronic image pickup device and white balance adjustment method

Country Status (1)

Country Link
JP (1) JP2001045515A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02194792A (en) * 1989-01-24 1990-08-01 Sony Corp Auto-white-balance circuit
JPH03148989A (en) * 1989-11-02 1991-06-25 Minolta Camera Co Ltd White balance adjusting device
JPH0698335A (en) * 1992-09-11 1994-04-08 Canon Inc Image pickup device
JPH07154815A (en) * 1993-11-30 1995-06-16 Sony Corp Video camera system
JPH07307953A (en) * 1994-05-16 1995-11-21 Hitachi Ltd White balance device
JPH0898200A (en) * 1994-09-29 1996-04-12 Sanyo Electric Co Ltd Video camera
JPH1118102A (en) * 1997-06-20 1999-01-22 Sanyo Electric Co Ltd Signal-processing circuit

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02194792A (en) * 1989-01-24 1990-08-01 Sony Corp Auto-white-balance circuit
JPH03148989A (en) * 1989-11-02 1991-06-25 Minolta Camera Co Ltd White balance adjusting device
JPH0698335A (en) * 1992-09-11 1994-04-08 Canon Inc Image pickup device
JPH07154815A (en) * 1993-11-30 1995-06-16 Sony Corp Video camera system
JPH07307953A (en) * 1994-05-16 1995-11-21 Hitachi Ltd White balance device
JPH0898200A (en) * 1994-09-29 1996-04-12 Sanyo Electric Co Ltd Video camera
JPH1118102A (en) * 1997-06-20 1999-01-22 Sanyo Electric Co Ltd Signal-processing circuit

Similar Documents

Publication Publication Date Title
EP1246453A2 (en) Signal processing apparatus and method, and image sensing apparatus
US9083936B2 (en) Wide dynamic range electronic image recording and reproducing system
JP5457845B2 (en) Color characteristic correction apparatus and camera
JP4882823B2 (en) Print data generation apparatus and program
JP2004328117A (en) Digital camera and photographing control method
US7327876B2 (en) Image processing device
JP2002305684A (en) Imaging system and program
JPH1141556A (en) Digital photograph image pickup device provided with image processing unit
JP3812264B2 (en) Imaging device
US20030218687A1 (en) Image sensing apparatus and image sensing method
JP2006253970A (en) Imaging apparatus, shading correction data generating method, and program
JPH07135599A (en) Image pickup device and its picture processing method
JP3327614B2 (en) Imaging device
JP2009164723A (en) Imaging apparatus and imaging control method
JP2005269339A (en) Color shading correction method for wide dynamic range solid-state imaging element and solid-state imaging apparatus
JP3115912B2 (en) Image recording device
JP2001045515A (en) Electronic image pickup device and white balance adjustment method
JP2004222160A (en) Digital camera
JP3368012B2 (en) Image data processing device
US20060170697A1 (en) Imaging apparatus, imaging method, program and recording medium
JP4526746B2 (en) Color imaging device
JP2002199409A (en) Imaging device and its white balance adjustment method
JP2004048563A (en) Imaging device and image processing method
JP4978669B2 (en) Image processing apparatus, electronic camera, and image processing program
JP2006109046A (en) Imaging device

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040518

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040518

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060912

A762 Written abandonment of application

Free format text: JAPANESE INTERMEDIATE CODE: A762

Effective date: 20061101