JP4239219B2 - Auto white balance adjustment method and apparatus - Google Patents

Auto white balance adjustment method and apparatus Download PDF

Info

Publication number
JP4239219B2
JP4239219B2 JP2004241951A JP2004241951A JP4239219B2 JP 4239219 B2 JP4239219 B2 JP 4239219B2 JP 2004241951 A JP2004241951 A JP 2004241951A JP 2004241951 A JP2004241951 A JP 2004241951A JP 4239219 B2 JP4239219 B2 JP 4239219B2
Authority
JP
Japan
Prior art keywords
color
color information
white balance
adaptation
target 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.)
Expired - Fee Related
Application number
JP2004241951A
Other languages
Japanese (ja)
Other versions
JP2006060650A (en
Inventor
玄太 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2004241951A priority Critical patent/JP4239219B2/en
Publication of JP2006060650A publication Critical patent/JP2006060650A/en
Application granted granted Critical
Publication of JP4239219B2 publication Critical patent/JP4239219B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はオートホワイトバランス調整方法及び装置に係り、特に撮影状況下の光源による色味の雰囲気を残しつつ、適正なホワイトバランス調整を行うオートホワイトバランス調整技術に関する。   The present invention relates to an auto white balance adjustment method and apparatus, and more particularly to an auto white balance adjustment technique for performing an appropriate white balance adjustment while leaving a tint atmosphere by a light source under shooting conditions.

従来のこの種のオートホワイトバランス調整方法として、特許文献1に記載の方法がある。   As a conventional automatic white balance adjustment method of this type, there is a method described in Patent Document 1.

このオートホワイトバランス調整方法は、被写体の輝度レベルと、1画面を複数のエリアに分割した各分割エリアごとの色情報(分割エリア内のR,G,B信号を色別に積算した積算値の比R/G及びB/G)とを求める。   This auto white balance adjustment method is based on the luminance level of a subject and the color information for each divided area obtained by dividing one screen into a plurality of areas (the ratio of integrated values obtained by integrating the R, G, and B signals in each divided area by color). R / G and B / G).

一方、R/G、B/Gの色空間上に、日陰、青空、蛍光灯、タングステン電球等の光源種に対応する色分布の範囲を示す検出枠を設定し、前記求めた各分割エリアごとの色情報に基づいて各検出枠に色情報が入る分割エリアの個数を求める。そして、前記検出した被写体の輝度レベル及び検出枠に入る分割エリアの個数に基づいて光源種を判別し、その判別した光源種に適したホワイトバランス補正値に基づいてホワイトバランス調整を行うようにしている。   On the other hand, on the color space of R / G, B / G, a detection frame indicating a color distribution range corresponding to a light source type such as a shade, a blue sky, a fluorescent lamp, and a tungsten light bulb is set, and each of the obtained divided areas is set. The number of divided areas in which color information enters each detection frame is obtained based on the color information. Then, a light source type is determined based on the detected luminance level of the subject and the number of divided areas included in the detection frame, and white balance adjustment is performed based on a white balance correction value suitable for the determined light source type. Yes.

また、特許文献2には、撮影時の照明光の色度と、画像における照明光とする光(参照光)の色度とから色順応に基づく変換を原画像の各画素に対して行い、色合いを補正する技術が開示されている。
特開2000−224608号公報 特開2001−16607号公報
Further, Patent Document 2 performs conversion based on chromatic adaptation on each pixel of an original image from the chromaticity of illumination light at the time of shooting and the chromaticity of light (reference light) as illumination light in an image, A technique for correcting hue is disclosed.
JP 2000-224608 A JP 2001-16607 A

本来カメラで撮影された色そのものは、人の色覚特性(色順応度)に沿って色補正されることが望ましい。人の視覚特性は、照明光の変化に影響されないないように、見えている画像に照射されている光の色を視覚系が推定し、元の色になるように補正して知覚していると考えられている(色覚恒常)。   The color itself originally taken by the camera is desirably color-corrected in accordance with human color vision characteristics (chromatic adaptation). The human visual characteristics are perceived by the visual system estimating the color of the light irradiating the visible image and correcting it to the original color so that it is not affected by changes in the illumination light. (Constant color vision).

例えば、A光源と白熱電球の下で照明されたグレーと同じグレーを太陽光或いは蛍光灯の下で照明されたグレーとを同時に見くらべた場合は、明らかに全ての人がその違い(色みの違い)を認識することができる。物理的に考えて同じ物体(この場合、グレーの紙)に分光分布の違う照明が照射されているので、照射された後に物体から反射して人間の目に入る物理的な色は違っている。しかし、数分後には見た瞬間は少し黄みがかって見えたり、あるいは青みがかって見えたりするグレーの紙が同じようなグレーの色として感じられる。これが人の視覚機能の働きによる色順応というものである。これは、人間の網膜の3種類の光受容器(錐体)のそれぞれが、照明光に対して逆比例の反応をしてバランスを一定に近い状態に保っていると考えられている。   For example, if you look at the same gray as the light source A and the gray light illuminated under the incandescent light bulb at the same time, the gray light illuminated under sunlight or fluorescent light is clearly different for all people. Difference). Physically, the same object (in this case, gray paper) is irradiated with illumination with a different spectral distribution, so the physical color that reflects from the object and enters the human eye after irradiation is different . However, after a few minutes, the gray paper that appears a little yellowish or bluish when you see it appears as a similar gray color. This is chromatic adaptation based on human visual function. It is considered that each of the three types of photoreceptors (cones) in the human retina maintains an almost constant balance by reacting in inverse proportion to the illumination light.

一般に体験しているように人間の視覚機能は単純なものではなく、条件によって色々な見え方をする。“色”の見え方は大変個人的に差があるものである。照明光への色順応は照明光の変化をキャンセルするように作用することが知られているが、実際には「色順応」は照明光の変化を100%キャンセルするメカニズムではないことは明らかである。この不完全順応は、照明光に十分に順応しても必ずしも全ての物が昼白色の照明で照らされた時と同じに見えないことを意味する。つまり、一般に感じているように色順応だけでは、わずかながら色の見えに違いが残るということを意味している。   As is generally experienced, human visual functions are not simple, and they look different depending on conditions. The appearance of “color” is very different. Although it is known that chromatic adaptation to illumination light acts to cancel the change in illumination light, it is clear that in fact, “chromatic adaptation” is not a mechanism for canceling the change in illumination light 100%. is there. This incomplete adaptation means that even if it fully adapts to the illumination light, not everything will look the same as when illuminated with daylight white illumination. In other words, as it is generally felt, just by chromatic adaptation, there is a slight difference in color appearance.

このように人の視覚機能による色順応の度合いに応じたホワイトバランス調整を行なえば、見た目と同じ色の写真をとることができる。   If the white balance is adjusted according to the degree of color adaptation by the human visual function in this way, a photograph having the same color as the appearance can be taken.

従来のカメラは、照明光の色にかかわらず、グレーの物はグレーに補正する完全順応であったり、色みを残した補正量に設定する場合でもCCD等の撮像素子の色の感度比に影響を受けた色みを残すことが多く、本来の視覚特性に合わせた順応度を表現するものはなかった。   In conventional cameras, regardless of the color of illumination light, gray objects are perfectly adapted to be corrected to gray, or even when setting a correction amount that leaves color, the color sensitivity ratio of an image sensor such as a CCD is set. In many cases, the affected colors were left behind, and none of them expressed the degree of adaptation to the original visual characteristics.

特許文献1に記載のオートホワイトバランス調整方法は、予め光源種別に経験的に設定された補正量を使用するもので、本来の視覚特性に合わせた色順応度での補正ではない。また、特許文献2に記載の色の補正では、色順応を予測して補正を行なうようにしているが、画像における照明光とする光(参照光)は、ユーザが設定するもので、撮影状況下の光源種に対応したものではない。更に、特許文献1、2には、順応度合いを自由に設定できる記載がない。   The auto white balance adjustment method described in Patent Document 1 uses a correction amount that is empirically set in advance for each light source type, and is not correction with chromatic adaptability that matches the original visual characteristics. Further, in the color correction described in Patent Document 2, the color adaptation is predicted and corrected. However, the light (reference light) used as the illumination light in the image is set by the user, and the shooting situation It does not correspond to the following light source types. Furthermore, Patent Documents 1 and 2 do not have a description that allows the degree of adaptation to be set freely.

本発明はこのような事情に鑑みてなされたもので、本来の光源種別の色の見えや色順応後の色の見えに合わせた人の視覚特性に合わせたホワイトバランス調整を行なうことができ、また、撮像素子、レンズの違いによらず常に同じ色みを残すようにホワイトバランス調整を行なうことができるオートホワイトバランス調整方法及び装置を提供することを目的とする。   The present invention has been made in view of such circumstances, and can perform white balance adjustment in accordance with the visual characteristics of a person according to the color appearance of the original light source type and the color appearance after color adaptation, It is another object of the present invention to provide an automatic white balance adjustment method and apparatus capable of performing white balance adjustment so as to always leave the same color regardless of the difference between an image sensor and a lens.

前記目的を達成するために請求項1に係る発明は、撮像素子を介して取得されるR,G,B信号のホワイトバランス調整を行なうオートホワイトバランス調整方法において、前記R,G,B信号に基づいて撮影状況下の光源種に関わる色情報を求めるとともに、該色情報に対応する色温度を求めるステップと、前記求めた色温度に対応する黒体軌跡上の色情報と完全順応後の色情報との間の色順応度に応じた色情報を目標値として設定するステップと、前記求めた色情報と前記設定された目標値とに基づいてR,G,B信号に対するホワイトバランス補正値を決定するステップと、前記決定されたホワイトバランス補正値に基づいて前記R,G,B信号のホワイトバランス調整を行うステップと、を含み、前記色温度を求めるステップは、1画面を複数のエリアに分割してなる複数の分割エリアの色情報を各分割エリア内のR,G,B信号に基づいて求めるステップと、前記複数の分割エリアの色情報のうちの色空間上で相互に近似している色情報の集合の色空間における重心位置の色情報を算出するステップと、前記算出した重心位置の色情報と最も近似する色情報を有する光源種から前記光源種に関わる色情報を求めるステップとからなることを特徴としている。 In order to achieve the above object, the invention according to claim 1 is directed to an automatic white balance adjustment method for adjusting white balance of R, G, B signals acquired via an image sensor, and to the R, G, B signals. Obtaining color information related to the type of light source under shooting conditions based on the color information corresponding to the color information, color information on the black body locus corresponding to the obtained color temperature, and color after complete adaptation A step of setting color information according to the degree of color adaptation between the information as a target value, and a white balance correction value for the R, G, B signals based on the obtained color information and the set target value a step of determining, on the basis of the white balance correction value the determined R, viewed contains G, and performing white balance adjustment of the B signal, the step of determining the color temperature, 1 Obtaining color information of a plurality of divided areas obtained by dividing a surface into a plurality of areas based on R, G, and B signals in each divided area; and on a color space of the color information of the plurality of divided areas And calculating the color information of the barycentric position in the color space of the set of color information that are mutually approximated by, and relating to the light source type from the light source type having the color information closest to the color information of the calculated barycentric position It is characterized by comprising the step of obtaining color information .

即ち、撮像素子を介して取得されるR,G,B信号に基づいて実際の撮影状況下の光源種に関わる色情報を求め、この色情報から対応する色温度を求める。そして、前記求めた色温度に対応する黒体軌跡上の色情報と完全順応後の色情報との間の色順応度に応じた色情報を目標値として設定する。尚、この色順応度としては、人の視覚特性に合わせた色順応度にすることが好ましい。前記求めた色情報と前記設定された目標値とに基づいてR,G,B信号に対するホワイトバランス補正値を決定し、この決定されたホワイトバランス補正値に基づいて前記R,G,B信号のホワイトバランス調整を行うようにしている。   That is, color information related to the light source type under actual shooting conditions is obtained based on the R, G, and B signals acquired via the image sensor, and the corresponding color temperature is obtained from this color information. Then, color information corresponding to the degree of color adaptation between the color information on the black body locus corresponding to the obtained color temperature and the color information after complete adaptation is set as a target value. The chromatic adaptation is preferably a chromatic adaptation adapted to human visual characteristics. A white balance correction value for the R, G, B signal is determined based on the obtained color information and the set target value, and the R, G, B signal of the R, G, B signal is determined based on the determined white balance correction value. The white balance is adjusted.

このように実際の撮影状況下の光源種に関わる色温度を求め、この色温度に対応する黒体軌跡上の色情報(本来の光源の色の見え)から完全順応時の色情報(完全グレーの色情報)までの間の適宜の色順応度に応じた色情報を目標値として設定するようにしたため、人の視覚特性に合わせたホワイトバランス調整を行なうことができ、また、色みを残す設定においても目標値が前記求められた色温度に応じて固定されるため、撮像素子、レンズの違いによらず常に同じ色みを残すようにホワイトバランス調整を行なうことができる。   In this way, the color temperature related to the light source type under actual shooting conditions is obtained, and the color information on the black body locus corresponding to this color temperature (appearance of the color of the original light source) from the color information (complete gray) Color information according to the appropriate color adaptability until the color information) is set as a target value, so that white balance adjustment can be performed in accordance with human visual characteristics, and color remains. Also in the setting, the target value is fixed according to the obtained color temperature, so that the white balance can be adjusted so as to always leave the same tint regardless of the difference between the imaging element and the lens.

請求項2に示すように請求項1に記載のオートホワイトバランス調整方法において、前記黒体軌跡上の各色温度別の色情報を目標値として設定する場合を色順応度0%とし、完全グレーを目標値として設定する場合を色順応度100%とし、0〜100%の任意の色順応度を手動で設定するステップを含み、前記目標値を設定するステップは、前記手動で設定された色順応度に応じて前記目標値を変更することを特徴としている。   In the automatic white balance adjustment method according to claim 1, when the color information for each color temperature on the black body locus is set as a target value, the color adaptation is set to 0%, and the complete gray is set. The step of setting the target value includes setting the target value to 100%, and manually setting an arbitrary color adaptability of 0 to 100%. The step of setting the target value includes the step of setting the manually set color adaptability. The target value is changed according to the degree.

色順応度を任意に設定できるようにしたため、色順応度に個人差があったり、画像に光源の色みを強く残したい場合等に応じたホワイトバランス調整を行なうことができる。   Since the chromatic adaptation can be arbitrarily set, it is possible to perform white balance adjustment according to a case where there is an individual difference in the chromatic adaptation or when it is desired to leave the color of the light source strongly in the image.

請求項に係る発明は、撮像素子を介して取得されるR,G,B信号のホワイトバランス調整を行なうオートホワイトバランス調整装置において、前記R,G,B信号に基づいて撮影状況下の光源種に関わる色情報を取得する色情報取得手段と、前記取得した色情報に対応する色温度を求める手段と、前記取得した色温度に対応する黒体軌跡上の色情報と完全順応後の色情報との間の色順応度に応じた色情報を目標値として設定する目標値設定手段と、前記取得した色情報と前記設定された目標値とに基づいてR,G,B信号に対するホワイトバランス補正値を決定する手段と、前記決定されたホワイトバランス補正値に基づいて前記R,G,B信号のホワイトバランス調整を行う手段と、を備え、前記色温度取得手段は、1画面を複数のエリアに分割してなる複数の分割エリアの色情報を各分割エリア内のR,G,B信号に基づいて求める手段と、前記複数の分割エリアの色情報のうちの色空間上で相互に近似している色情報の集合の色空間における重心位置の色情報を算出する手段と、前記算出した重心位置の色情報と最も近似する色情報を有する光源種から前記光源種に関わる色情報を求める手段とからなることを特徴としている。 According to a third aspect of the present invention, there is provided an automatic white balance adjustment device for adjusting white balance of R, G, B signals acquired via an image sensor, and a light source under photographing conditions based on the R, G, B signals. Color information acquisition means for acquiring color information relating to the seed, means for obtaining a color temperature corresponding to the acquired color information, color information on a black body locus corresponding to the acquired color temperature, and color after complete adaptation Target value setting means for setting color information according to the degree of color adaptation between information as a target value, and white balance for R, G, B signals based on the acquired color information and the set target value Means for determining a correction value, and means for adjusting white balance of the R, G, B signals based on the determined white balance correction value, and the color temperature acquisition means comprises a plurality of screens for a plurality of screens. D Means for obtaining color information of a plurality of divided areas divided into a based on R, G, B signals in each divided area, and mutually approximating on a color space of the color information of the plurality of divided areas Color information relating to the light source type is obtained from means for calculating color information of the barycentric position in the color space of the set of color information and the light source type having the color information closest to the color information of the calculated barycentric position It is characterized by comprising means .

請求項に示すように請求項に記載のオートホワイトバランス調整装置において、前記黒体軌跡上の各色温度別の色情報を記憶する記憶手段と、色順応度を手動で設定する色順応度設定手段とを備え、前記目標値設定手段は、前記取得した色温度に基づいて前記記憶手段から対応する黒体軌跡上の色情報を読み出し、この読み出した色情報と完全順応後の色情報との間を前記設定した色順応度に応じて補間して得た色情報を目標値として設定することを特徴としている。 4. The automatic white balance adjustment apparatus according to claim 3 , wherein the storage unit stores color information for each color temperature on the black body locus, and the color adaptation degree for manually setting the color adaptation degree. Setting means, and the target value setting means reads color information on the corresponding black body locus from the storage means based on the acquired color temperature, and the read color information and the color information after complete adaptation, The color information obtained by interpolating between the two in accordance with the set color adaptation degree is set as a target value.

請求項に示すように請求項に記載のオートホワイトバランス調整装置において、前記黒体軌跡上の各色温度別の色情報に対応する色順応予測式で予測した色順応後の色情報を各色温度別に記憶する記憶手段を備え、前記目標値設定手段は、前記取得した色温度に基づいて前記記憶手段から対応する色順応後の色情報を読み出し、この読み出した色情報を目標値として設定することを特徴としている。 5. The automatic white balance adjustment apparatus according to claim 3 , wherein color information after color adaptation predicted by a color adaptation prediction formula corresponding to color information for each color temperature on the black body locus is set for each color. Storage means for storing each temperature is provided, and the target value setting means reads out color information after color adaptation from the storage means based on the acquired color temperature, and sets the read color information as a target value. It is characterized by that.

本発明によれば、実際の撮影状況下の光源種に関わる色温度に対応する黒体軌跡上の色情報(本来の光源の色の見え)から完全順応時の色情報(完全グレーの色情報)までの間の適宜の色順応度に応じた色情報を目標値として設定し、前記実際の撮影状況下の光源種に関わる色情報と前記設定した目標値とに基づいてホワイトバランス調整を行なうようにしたため、人の視覚特性(色順応度)に合わせたホワイトバランス調整を行なうことができ、また、実際の撮影状況下の光源種に関わる色温度ごとに一つの目標値が設定されるため、撮像素子、レンズの違いによらず常に同じ色みを残すようにホワイトバランス調整を行なうことができる。   According to the present invention, color information at the time of perfect adaptation (color information of complete gray) from color information on the black body locus (appearance of the color of the original light source) corresponding to the color temperature related to the light source type under actual shooting conditions. ) Is set as a target value according to an appropriate degree of color adaptation until the white balance adjustment is performed based on the color information related to the light source type under the actual photographing condition and the set target value. As a result, white balance can be adjusted according to human visual characteristics (color adaptation), and one target value is set for each color temperature related to the light source type under actual shooting conditions. The white balance can be adjusted so that the same color is always maintained regardless of the difference between the image sensor and the lens.

以下添付図面に従って本発明に係るオートホワイトバランス調整方法及び装置の好ましい実施の形態について詳説する。   Hereinafter, preferred embodiments of an auto white balance adjusting method and apparatus according to the present invention will be described in detail with reference to the accompanying drawings.

図1は本発明が適用されたデジタルカメラの実施の形態を示すブロック図である。   FIG. 1 is a block diagram showing an embodiment of a digital camera to which the present invention is applied.

このカメラ10は、静止画や動画の記録及び再生機能を備えたデジタルカメラであり、カメラ10全体の動作は中央処理装置(CPU)12によって統括制御される。 CPU12は、所定のプログラムに従って本カメラシステムを制御する制御手段として機能するとともに、自動露出(AE)演算、自動焦点調節(AF)演算、ホワイトバランス(WB)調整演算など、各種演算を実施する演算手段として機能する。   The camera 10 is a digital camera having functions for recording and reproducing still images and moving images, and the overall operation of the camera 10 is centrally controlled by a central processing unit (CPU) 12. The CPU 12 functions as a control means for controlling the camera system according to a predetermined program, and performs various calculations such as automatic exposure (AE) calculation, automatic focus adjustment (AF) calculation, white balance (WB) adjustment calculation, etc. Functions as a means.

バス14を介してCPU12と接続されたROM16には、CPU12が実行するプログラム及び制御に必要な各種データ等が格納され、EEPROM17には、CCD画素欠陥情報、カメラ動作に関する各種定数/情報等が格納されている。   A ROM 16 connected to the CPU 12 via the bus 14 stores programs executed by the CPU 12, various data necessary for control, and the like, and an EEPROM 17 stores CCD pixel defect information, various constants / information related to camera operation, and the like. Has been.

また、メモリ(SDRAM)18は、プログラムの展開領域及びCPU12の演算作業用領域として利用されるとともに、画像データや音声データの一時記憶領域として利用される。VRAM20は画像データ専用の一時記憶メモリであり、A領域20AとB領域20Bが含まれている。メモリ18とVRAM20は共用することが可能である。   The memory (SDRAM) 18 is used as a program development area and a calculation work area for the CPU 12, and is also used as a temporary storage area for image data and audio data. The VRAM 20 is a temporary storage memory dedicated to image data, and includes an A area 20A and a B area 20B. The memory 18 and the VRAM 20 can be shared.

カメラ10にはモード選択スイッチ22、撮影ボタン24、その他、メニュー/OKキー、十字キー、キャンセルキーなどの操作手段26が設けられている。これら各種の操作部(22〜26)からの信号はCPU12に入力され、CPU12は入力信号に基づいてカメラ10の各回路を制御し、例えば、レンズ駆動制御、撮影動作制御、画像処理制御、画像データの記録/再生制御、画像表示装置28の表示制御などを行う。   The camera 10 is provided with a mode selection switch 22, a shooting button 24, and other operation means 26 such as a menu / OK key, a cross key, and a cancel key. Signals from these various operation units (22 to 26) are input to the CPU 12, and the CPU 12 controls each circuit of the camera 10 based on the input signals. For example, lens driving control, photographing operation control, image processing control, image Data recording / reproduction control, display control of the image display device 28, and the like are performed.

モード選択スイッチ22は、撮影モードと再生モードとを切り換えるための操作手段である。モード選択スイッチ22を操作して可動接片22Aを接点aに接続させると、その信号がCPU12に入力され、カメラ10は撮影モードに設定され、可動接片22Aを接点bに接続させると、カメラ10は記録済みの画像を再生する再生モードに設定される。   The mode selection switch 22 is an operation means for switching between the photographing mode and the reproduction mode. When the mode selection switch 22 is operated to connect the movable contact piece 22A to the contact point a, the signal is input to the CPU 12, the camera 10 is set to the photographing mode, and the movable contact piece 22A is connected to the contact point b, the camera 10 is set to a reproduction mode for reproducing recorded images.

撮影ボタン24は、撮影開始の指示を入力する操作ボタンであり、半押し時にONするS1スイッチと、全押し時にONするS2スイッチとを有する二段ストローク式のスイッチで構成されている。   The shooting button 24 is an operation button for inputting an instruction to start shooting, and includes a two-stroke switch having an S1 switch that is turned on when half-pressed and an S2 switch that is turned on when fully pressed.

メニュー/OKキーは、画像表示装置28の画面上にメニューを表示させる指令を行うためのメニューボタンとしての機能と、選択内容の確定及び実行などを指令するOKボタンとしての機能とを兼備した操作キーである。十字キーは、上下左右の4方向の指示を入力する操作部であり、メニュー画面から項目を選択したり、各メニューから各種設定項目の選択を指示したりするボタン(カーソル移動操作手段)として機能する。また、十字キーの上/下キーは撮影時のズームスイッチあるいは再生時の再生ズームスイッチとして機能し、左/右キーは再生モード時のコマ送り(順方向/逆方向送り)ボタンとして機能する。キャンセルキーは、選択項目など所望の対象の消去や指示内容の取消し、あるいは1つ前の操作状態に戻らせる時などに使用される。   The menu / OK key is an operation having both a function as a menu button for instructing to display a menu on the screen of the image display device 28 and a function as an OK button for instructing confirmation and execution of selection contents. Key. The cross key is an operation unit for inputting instructions in four directions, up, down, left, and right, and functions as a button (cursor moving operation means) for selecting an item from the menu screen or instructing selection of various setting items from each menu. To do. The up / down key of the cross key functions as a zoom switch at the time of shooting or a playback zoom switch at the time of playback, and the left / right key functions as a frame advance (forward / reverse feed) button in the playback mode. The cancel key is used when deleting a desired item such as a selection item, canceling an instruction content, or returning to the previous operation state.

画像表示装置28は、カラー表示可能な液晶ディスプレイで構成されている。画像表示装置28は、撮影時に画角確認用の電子ファインダとして使用できるとともに、記録済み画像を再生表示する手段として利用される。また、画像表示装置28は、ユーザインターフェース用表示画面としても利用され、必要に応じてメニュー情報や選択項目、設定内容などの情報が表示される。液晶ディスプレイに代えて、有機ELなど他の方式の表示装置(表示手段)を用いることも可能である。   The image display device 28 is composed of a liquid crystal display capable of color display. The image display device 28 can be used as an electronic viewfinder for checking the angle of view at the time of shooting, and is used as a means for reproducing and displaying a recorded image. The image display device 28 is also used as a user interface display screen, and displays information such as menu information, selection items, and setting contents as necessary. Instead of the liquid crystal display, other types of display devices (display means) such as an organic EL can be used.

カメラ10は、メディアソケット(メディア装着部)30を有し、メディアソケット30には記録メディア32を装着することができる。記録メディアの形態は特に限定されず、xD-PictureCard(商標)、スマートメディア(商標)に代表される半導体メモリカード、可搬型小型ハードディスク、磁気ディスク、光ディスク、光磁気ディスクなど、種々の媒体を用いることができる。   The camera 10 has a media socket (media mounting portion) 30, and a recording medium 32 can be mounted on the media socket 30. The form of the recording medium is not particularly limited, and various media such as a semiconductor memory card represented by xD-PictureCard (trademark) and smart media (trademark), a portable small hard disk, a magnetic disk, an optical disk, and a magneto-optical disk are used. be able to.

メディアコントローラ34は、メディアソケット30に装着される記録メディア32に適した入出力信号の受渡しを行うために所要の信号変換を行う。   The media controller 34 performs necessary signal conversion in order to deliver an input / output signal suitable for the recording medium 32 attached to the media socket 30.

また、カメラ10はパソコンその他の外部機器と接続するための通信手段としてUSBインターフェース部36を備えている。図示せぬUSBケーブルを用いてカメラ10と外部機器を接続することにより、外部機器との間でデータの受渡しが可能となる。もちろん、通信方式はUSBに限らず、IEEE1394やBluetooth その他の通信方式を適用してもよい。   The camera 10 also includes a USB interface unit 36 as a communication means for connecting to a personal computer or other external device. By connecting the camera 10 and an external device using a USB cable (not shown), it is possible to exchange data with the external device. Of course, the communication method is not limited to USB, and IEEE1394, Bluetooth, or other communication methods may be applied.

次に、カメラ10の撮影機能について説明する。   Next, the shooting function of the camera 10 will be described.

モード選択スイッチ22によって撮影モードが選択されると、カラーCCD固体撮像素子(以下CCDと記載)38を含む撮像部に電源が供給され、撮影可能な状態になる。   When the shooting mode is selected by the mode selection switch 22, power is supplied to an image pickup unit including a color CCD solid-state image pickup element (hereinafter referred to as CCD) 38, and the camera is ready for shooting.

レンズユニット40は、フォーカスレンズを含む撮影レンズ42と絞り兼用メカシャッター44とを含む光学ユニットである。レンズユニット40は、CPU12によって制御されるレンズ駆動部46、絞り駆動部48によって電動駆動され、ズーム制御、フォーカス制御及びアイリス制御が行われる。   The lens unit 40 is an optical unit that includes a photographic lens 42 including a focus lens and an aperture / mechanical shutter 44. The lens unit 40 is electrically driven by a lens driving unit 46 and a diaphragm driving unit 48 controlled by the CPU 12 to perform zoom control, focus control, and iris control.

レンズユニット40を通過した光は、CCD38の受光面に結像される。CCD38の受光面には多数のフォトダイオード(受光素子)が二次元的に配列されており、各フォトダイオードに対応して赤(R)、緑(G)、青(B)の原色カラーフィルタが所定の配列構造(ベイヤー、Gストライプなど)で配置されている。また、CCD38は、各フォトダイオードの電荷蓄積時間(シャッタースピード)を制御する電子シャッター機能を有している。CPU12は、タイミングジェネレータ50を介してCCD38での電荷蓄積時間を制御する。尚、CCD38に代えてMOS型など他の方式の撮像素子を用いてもよい。   The light that has passed through the lens unit 40 is imaged on the light receiving surface of the CCD 38. A large number of photodiodes (light receiving elements) are two-dimensionally arranged on the light receiving surface of the CCD 38, and red (R), green (G), and blue (B) primary color filters corresponding to the respective photodiodes. They are arranged in a predetermined arrangement structure (Bayer, G stripe, etc.). The CCD 38 has an electronic shutter function for controlling the charge accumulation time (shutter speed) of each photodiode. The CPU 12 controls the charge accumulation time in the CCD 38 via the timing generator 50. Instead of the CCD 38, another type of image sensor such as a MOS type may be used.

CCD38の受光面に結像された被写体像は、各フォトダイオードによって入射光量に応じた量の信号電荷に変換される。各フォトダイオードに蓄積された信号電荷は、CPU12の指令に従いタイミングジェネレータ50から与えられる駆動パルスに基づいて信号電荷に応じた電圧信号(画像信号)として順次読み出される。   The subject image formed on the light receiving surface of the CCD 38 is converted into a signal charge of an amount corresponding to the amount of incident light by each photodiode. The signal charge accumulated in each photodiode is sequentially read out as a voltage signal (image signal) corresponding to the signal charge based on a drive pulse given from the timing generator 50 in accordance with a command from the CPU 12.

CCD38から出力された信号はアナログ処理部(CDS/AMP)52に送られ、ここで画素ごとのR,G,B信号がサンプリングホールド(相関二重サンプリング処理)され、増幅された後、A/D変換器54に加えられる。A/D変換器54によってデジタル信号に変換された点順次のR,G,B信号は、画像入力コントローラ56を介してメモリ18に記憶される。   The signal output from the CCD 38 is sent to an analog processing unit (CDS / AMP) 52, where the R, G, B signals for each pixel are sampled and held (correlated double sampling processing), amplified, and then A / Applied to the D converter 54. The dot-sequential R, G, B signals converted into digital signals by the A / D converter 54 are stored in the memory 18 via the image input controller 56.

画像信号処理回路58は、メモリ18に記憶されたR,G,B信号をCPU12の指令に従って処理する。即ち、画像信号処理回路58は、同時化回路(単板CCDのカラーフィルタ配列に伴う色信号の空間的なズレを補間して色信号を同時式に変換する処理回路)、ホワイトバランス補正回路、ガンマ補正回路、輪郭補正回路、輝度・色差信号生成回路等を含む画像処理手段として機能し、CPU12からのコマンドに従ってメモリ18を活用しながら所定の信号処理を行う。   The image signal processing circuit 58 processes the R, G, B signals stored in the memory 18 in accordance with a command from the CPU 12. That is, the image signal processing circuit 58 includes a synchronization circuit (a processing circuit that converts a color signal into a simultaneous expression by interpolating a spatial shift of the color signal associated with the color filter array of the single CCD), a white balance correction circuit, It functions as an image processing means including a gamma correction circuit, a contour correction circuit, a luminance / color difference signal generation circuit, etc., and performs predetermined signal processing using the memory 18 in accordance with commands from the CPU 12.

画像信号処理回路58に入力されたRGBの画像データは、画像信号処理回路58において輝度信号(Y信号)及び色差信号(Cr,Cb 信号)に変換されるとともに、ガンマ補正等の所定の処理が施される。画像信号処理回路58で処理された画像データはVRAM20に格納される。   The RGB image data input to the image signal processing circuit 58 is converted into a luminance signal (Y signal) and a color difference signal (Cr, Cb signal) by the image signal processing circuit 58, and predetermined processing such as gamma correction is performed. Applied. The image data processed by the image signal processing circuit 58 is stored in the VRAM 20.

撮影画像を画像表示装置28にモニタ出力する場合、VRAM20から画像データが読み出され、バス14を介してビデオエンコーダ60に送られる。ビデオエンコーダ60は、入力された画像データを表示用の所定方式の信号(例えば、NTSC方式のカラー複合映像信号)に変換して画像表示装置28に出力する。   When the captured image is output to the image display device 28 on the monitor, the image data is read from the VRAM 20 and sent to the video encoder 60 via the bus 14. The video encoder 60 converts the input image data into a predetermined signal for display (for example, an NTSC color composite video signal) and outputs the signal to the image display device 28.

CCD38から出力される画像信号によって、1コマ分の画像を表す画像データがA領域20AとB領域20Bとで交互に書き換えられる。VRAM20のA領域20A及びB領域20Bのうち、画像データが書き換えられている方の領域以外の領域から、書き込まれている画像データが読み出される。このようにしてVRAM20内の画像データが定期的に書き換えられ、その画像データから生成される映像信号が画像表示装置28に供給されることにより、撮像中の映像がリアルタイムに画像表示装置28に表示される。撮影者は、画像表示装置28に表示される映像(スルームービー画)によって撮影画角を確認できる。   Image data representing an image for one frame is rewritten alternately in the A region 20A and the B region 20B by the image signal output from the CCD 38. Of the A area 20A and B area 20B of the VRAM 20, the written image data is read from an area other than the area where the image data is rewritten. In this manner, the image data in the VRAM 20 is periodically rewritten, and a video signal generated from the image data is supplied to the image display device 28, whereby the image being captured is displayed on the image display device 28 in real time. Is done. The photographer can check the shooting angle of view from the video (through movie image) displayed on the image display device 28.

撮影ボタン24が半押しされ、S1がオンすると、カメラ10はAE及びAF処理を開始する。即ち、CCD38から出力された画像信号はA/D変換後に画像入力コントローラ56を介してAF検出回路62並びにAE/AWB検出回路64に入力される。   When the shooting button 24 is pressed halfway and S1 is turned on, the camera 10 starts AE and AF processing. That is, the image signal output from the CCD 38 is input to the AF detection circuit 62 and the AE / AWB detection circuit 64 via the image input controller 56 after A / D conversion.

AE/AWB検出回路64は、1画面を複数のエリア(例えば、16×16)に分割し、分割エリアごとにRGB信号を積算する回路を含み、その積算値をCPU12に提供する。CPU12は、AE/AWB検出回路64から得た積算値に基づいて被写体の明るさ(被写体輝度)を検出し、撮影に適した露出値(撮影EV値)を算出する。求めた露出値と所定のプログラム線図に従い、絞り値とシャッタースピードが決定され、これに従いCPU12はCCD38の電子シャッター及びアイリスを制御して適正な露光量を得る。   The AE / AWB detection circuit 64 includes a circuit that divides one screen into a plurality of areas (for example, 16 × 16) and accumulates RGB signals for each divided area, and provides the accumulated value to the CPU 12. The CPU 12 detects the brightness of the subject (subject brightness) based on the integrated value obtained from the AE / AWB detection circuit 64, and calculates an exposure value (shooting EV value) suitable for shooting. According to the obtained exposure value and a predetermined program diagram, the aperture value and the shutter speed are determined, and the CPU 12 controls the electronic shutter and iris of the CCD 38 according to this to obtain an appropriate exposure amount.

また、AE/AWB検出回路64は、自動ホワイトバランス調整時には、分割エリアごとにRGB信号の色別の平均積算値を算出し、その算出結果をCPU12に提供する。CPU12は、Rの積算値、Bの積算値、Gの積算値を得て、各分割エリアごとにR/G及びB/Gの比を求め、これらR/G、B/Gの値のR/G、B/G軸座標の色空間における分布等に基づいて光源種判別を行い、判別された光源種に応じてホワイトバランス調整回路のR,G,B信号に対するゲイン値(ホワイトバランス補正値)を制御し、各色チャンネルの信号に補正をかける。尚、ホワイトバランス調整の詳細は後述する。   Further, the AE / AWB detection circuit 64 calculates an average integrated value for each color of the RGB signals for each divided area during automatic white balance adjustment, and provides the calculation result to the CPU 12. The CPU 12 obtains the integrated value of R, the integrated value of B, and the integrated value of G, obtains the ratio of R / G and B / G for each divided area, and R of these R / G and B / G values. The light source type is discriminated based on the distribution in the color space of the / G, B / G axis coordinates, etc., and the gain value (white balance correction value) for the R, G, B signals of the white balance adjustment circuit according to the discriminated light source type ) To correct the signal of each color channel. Details of the white balance adjustment will be described later.

本カメラ10におけるAF制御は、例えば映像信号のG信号の高周波成分が極大になるようにフォーカシングレンズ(撮影レンズ42を構成するレンズ光学系のうちフォーカス調整に寄与する移動レンズ)を移動させるコントラストAFが適用される。即ち、AF検出回路62は、G信号の高周波成分のみを通過させるハイパスフィルタ、絶対値化処理部、画面内(例えば、画面中央部)に予め設定されているフォーカス対象エリア内の信号を切り出すAFエリア抽出部、及びAFエリア内の絶対値データを積算する積算部から構成される。   The AF control in the camera 10 is, for example, a contrast AF that moves a focusing lens (a moving lens that contributes to focus adjustment among the lens optical systems constituting the photographing lens 42) so that the high-frequency component of the G signal of the video signal is maximized. Applies. That is, the AF detection circuit 62 cuts out a signal in a focus target area set in advance in a high-pass filter that passes only a high-frequency component of the G signal, an absolute value processing unit, and a screen (for example, the center of the screen). An area extraction unit and an integration unit that integrates absolute value data in the AF area are configured.

AF検出回路62で求めた積算値のデータはCPU12に通知される。CPU12は、レンズ駆動部46を制御してフォーカシングレンズを移動させながら、複数のAF検出ポイントで焦点評価値(AF評価値)を演算し、評価値が極大となるレンズ位置を合焦位置として決定する。そして、求めた合焦位置にフォーカシングレンズを移動させるようにレンズ駆動部46を制御する。尚、AF評価値の演算はG信号を利用する態様に限らず、輝度信号(Y信号)を利用してもよい。   The integrated value data obtained by the AF detection circuit 62 is notified to the CPU 12. The CPU 12 calculates a focus evaluation value (AF evaluation value) at a plurality of AF detection points while moving the focusing lens by controlling the lens driving unit 46, and determines a lens position where the evaluation value is a maximum as a focus position. To do. Then, the lens driving unit 46 is controlled so as to move the focusing lens to the obtained in-focus position. The calculation of the AF evaluation value is not limited to a mode using the G signal, and a luminance signal (Y signal) may be used.

撮影ボタン24が半押しされ、S1オンによってAE/AF処理が行われ、撮影ボタン24が全押しされ、S2オンによって記録用の撮影動作がスタートする。S2オンに応動して取得された画像データは画像信号処理回路58において輝度/色差信号(Y/C信号)に変換され、ガンマ補正等の所定の処理が施された後、メモリ18に格納される。   The shooting button 24 is half-pressed, AE / AF processing is performed when S1 is turned on, the shooting button 24 is fully pressed, and the shooting operation for recording starts when S2 is turned on. The image data acquired in response to S2 ON is converted into a luminance / color difference signal (Y / C signal) by the image signal processing circuit 58, subjected to predetermined processing such as gamma correction, and then stored in the memory 18. The

メモリ18に格納されたY/C信号は、圧縮伸張回路66によって所定のフォーマットに従って圧縮された後、メディアコントローラ34を介して記録メディア32に記録される。例えば、静止画についてはJPEG(Joint Photographic Experts Group)形式で記録される。   The Y / C signal stored in the memory 18 is compressed according to a predetermined format by the compression / decompression circuit 66 and then recorded on the recording medium 32 via the media controller 34. For example, a still image is recorded in JPEG (Joint Photographic Experts Group) format.

モード選択スイッチ22により再生モードが選択されると、記録メディア32に記録されている最終の画像ファイル(最後に記録されたファイル)の圧縮データが読み出される。最後の記録に係るファイルが静止画ファイルの場合、この読み出された画像圧縮データは、圧縮伸張回路66を介して非圧縮のYC信号に伸張され、画像信号処理回路58及びビデオエンコーダ60を介して表示用の信号に変換された後、画像表示装置28に出力される。これにより、当該ファイルの画像内容が画像表示装置28の画面上に表示される。   When the playback mode is selected by the mode selection switch 22, the compressed data of the last image file (last recorded file) recorded on the recording medium 32 is read. When the file related to the last recording is a still image file, the read image compression data is expanded to an uncompressed YC signal via the compression / decompression circuit 66, and the image signal processing circuit 58 and the video encoder 60 are used. After being converted into a display signal, it is output to the image display device 28. Thereby, the image content of the file is displayed on the screen of the image display device 28.

静止画の一コマ再生中(動画の先頭フレーム再生中も含む)に、十字キーの右キー又は左キーを操作することによって、再生対象のファイルを切り換えること(順コマ送り/逆コマ送り)ができる。コマ送りされた位置の画像ファイルが記録メディア32から読み出され、上記と同様にして静止画像や動画が画像表示装置28に再生表示される。   During single-frame playback of still images (including playback of the first frame of a movie), the file to be played can be switched (forward / reverse frame advance) by operating the right or left key of the four-way controller. it can. The image file at the frame-advanced position is read from the recording medium 32, and still images and moving images are reproduced and displayed on the image display device 28 in the same manner as described above.

次に、本発明に係るオートホワイトバランス調整方法について説明する。   Next, an auto white balance adjustment method according to the present invention will be described.

図2は本発明に係るホワイトバランス調整方法を説明するために用いたフローチャートである。   FIG. 2 is a flowchart used for explaining the white balance adjustment method according to the present invention.

まず、撮影ボタン24が押されると、被写体の撮影が行われる。この撮影時にCCD38から得られたR,G,B信号は一旦メモリ18に格納される。メモリ18に格納されているR,G,B信号を用いて、1画面が16×16に分割された256個の分割エリアごとにRGB信号の色別の平均積算値を算出し、各分割エリアごとにR,G,Bの平均積算値の比(即ち、R/G及びB/Gの比)を算出する。   First, when the photographing button 24 is pressed, the subject is photographed. The R, G, B signals obtained from the CCD 38 at the time of photographing are temporarily stored in the memory 18. Using the R, G, and B signals stored in the memory 18, an average integrated value for each color of the RGB signals is calculated for each of 256 divided areas in which one screen is divided into 16 × 16, and each divided area is calculated. The ratio of the average integrated values of R, G, and B (that is, the ratio of R / G and B / G) is calculated for each.

このようにして算出された256個の分割エリアごとの色情報は、前記R/G、B/Gの値に基づいて図3に示すR/G、B/G軸座標の色空間上で分布する256個の点として表すことができる。   The color information for each of the 256 divided areas thus calculated is distributed on the color space of the R / G and B / G axis coordinates shown in FIG. 3 based on the values of R / G and B / G. Can be represented as 256 points.

そして、R/G、B/G軸座標の色空間上で分布する256個の色情報のうちの相互に近似している色情報の集合(以下、「カタマリ」という)の重心位置を算出する(ステップS10)。   Then, the barycentric position of a set of color information (hereinafter referred to as “catalyst”) that is close to each other out of 256 pieces of color information distributed in the color space of the R / G and B / G axis coordinates is calculated. (Step S10).

前記カタマリの重心位置が示す色情報の色温度を検出する(ステップS12)。尚、上記色情報のカタマリが生じる理由は、被写体が或る色温度の光源によって照明されているからである。従って、カタマリの重心位置の色情報と最も近似する色情報を有する光源種(例えば、図5に示す青空、日陰1〜4、昼光色1〜4、晴れ、昼白色1、2、白色1、2、温白色1〜4、タングステン1〜4、低タングステン等)を求めることで撮影時の光源種を自動判別することもできる。   The color temperature of the color information indicated by the center of gravity position of the catamari is detected (step S12). The reason why the color information is catalyzed is that the subject is illuminated by a light source having a certain color temperature. Accordingly, a light source type having color information that most closely approximates the color information of the center of gravity position of the catamaria (for example, blue sky, shade 1 to 4, daylight colors 1 to 4, shown in FIG. 5, sunny, day white 1, 2, white 1, 2 , Warm white 1-4, tungsten 1-4, low tungsten, etc.) can be automatically determined.

次に、カメラ10において設定されたホワイトバランス(WB)モードが、オートWBモードかマニュアルWBモードかを判別する(ステップS14)。マニュアルWBモードが設定されている場合には、ステップS12で検出した色温度に対応する黒体軌跡上の色情報を取得する(ステップS16)。   Next, it is determined whether the white balance (WB) mode set in the camera 10 is the auto WB mode or the manual WB mode (step S14). If the manual WB mode is set, the color information on the black body locus corresponding to the color temperature detected in step S12 is acquired (step S16).

ここで、黒体軌跡上の色情報について説明する。   Here, the color information on the black body locus will be described.

色温度の変化によって“人間の本来の色の見え”が変わってくる。“人間の本来の色の見え”は原理上からはどのような光源下であっても色覚恒常が成立し、例えば、グレーの物体はグレーに順応する。しかし、実際にはどのように目が順応しようとも光源の色みが残って見えてしまう。その光源の色みの残り方も色温度によって変化する。本発明はこの“人間の本来の色の見え”を考慮してホワイトバランス調整を行なう。   The change of color temperature changes the “human original color appearance”. In principle, “visual appearance of human beings” is a constant color vision under any light source. For example, a gray object adapts to gray. However, in practice, the color of the light source remains and looks no matter how the eyes adapt. The remaining color of the light source also changes depending on the color temperature. In the present invention, white balance adjustment is performed in consideration of this “human original color appearance”.

図4は黒体放射の分光分布を色温度別にグラフで表したものであり、同図に示す黒体放射の分光を基準光源とする。   FIG. 4 is a graph showing the spectral distribution of black body radiation for each color temperature. The black body radiation spectrum shown in FIG. 4 is used as a reference light source.

黒体放射分光にグレー板(Nグレー)をあてたときの光源本来の色は、等色関数x(λ)、y(λ)、z(λ)を用いて、次式で表すことができる。
[数1]
X=k∫R(λ)P(λ)x(λ)dλ
Y=k∫G(λ)P(λ)y(λ)dλ
Z=k∫B(λ)P(λ)z(λ)dλ
k=100/∫P(λ)y(λ)dλ
上記[数1]に示したCIE(国際照明委員会)のXYZ表色系の三刺激値XYZをRGB系に変換した値を“もともとの光源の見え”とする。つまり、光源そのものの色みのことである。
The original color of the light source when a gray plate (N gray) is applied to black body radiation spectroscopy can be expressed by the following equation using color matching functions x (λ), y (λ), and z (λ). .
[Equation 1]
X = k∫R (λ) P (λ) x (λ) dλ
Y = k∫G (λ) P (λ) y (λ) dλ
Z = k∫B (λ) P (λ) z (λ) dλ
k = 100 / ∫P (λ) y (λ) dλ
The value obtained by converting the tristimulus values XYZ of the XYZ color system of the CIE (International Lighting Commission) shown in [Equation 1] into an RGB system is defined as “original light source appearance”. That is, the color of the light source itself.

図5は色温度による黒体の色変化の軌跡(黒体軌跡)をR/G,B/G軸座標上に表したグラフである。   FIG. 5 is a graph showing the locus of black body color change due to color temperature (black body locus) on R / G and B / G axis coordinates.

図2に戻って、ステップS16では、図5に示した黒体軌跡上の色情報であって、ステップS12で検出した色温度に対応する色情報(図5のR/G,B/Gの色空間上の座標値)を取得する。尚、図5に示した色温度に対応する黒体軌跡は、予めEEPROM17に記憶されている。   Returning to FIG. 2, in step S16, the color information on the black body locus shown in FIG. 5 and corresponding to the color temperature detected in step S12 (R / G, B / G in FIG. 5). Get coordinate values in color space. Note that the black body locus corresponding to the color temperature shown in FIG. 5 is stored in the EEPROM 17 in advance.

続いて、前記取得した色情報と、ステップS20でユーザにより入力される色順応度(0〜100%)とに基づいてホワイトバランス調整を行なうための目標値を算出する(ステップS18)。即ち、黒体軌跡上の各色温度別の色情報を目標値として設定する場合を色順応度0%とし、完全グレーを目標値(R/G,B/Gの色空間上の座標(1,1))として設定する場合を色順応度100%とし、黒体軌跡上の各色温度別の色情報(本来の光源の見え)と完全グレーとの間をユーザにより入力される色順応度に応じて補間した値を目標値とする。従って、ステップS18で算出される目標値は、入力される色順応度(0〜100%)に応じて黒体軌跡上の色温度の色情報と完全グレーとの間の直線上を動くことになる。   Subsequently, a target value for white balance adjustment is calculated based on the acquired color information and the color adaptation degree (0 to 100%) input by the user in step S20 (step S18). That is, when color information for each color temperature on the black body locus is set as a target value, the chromatic adaptation is set to 0%, and the complete gray is set to the target value (R / G, B / G coordinates (1, 1)) is set to 100% color adaptation, and the color information for each color temperature on the black body locus (appearance of the original light source) and complete gray according to the color adaptation input by the user The interpolated value is set as the target value. Therefore, the target value calculated in step S18 moves on a straight line between the color information of the color temperature on the black body locus and the complete gray according to the input color adaptation (0 to 100%). Become.

一方、ステップS14において、オートWBモードが設定されていると判別されると、ステップS12で検出した色温度に対応する黒体軌跡上の色情報の所定の色順応後の色情報を目標値として設定する(ステップS22)。即ち、検出した色温度に対応する黒体軌跡上の色情報そのものではなく、色順応による“人間の本来の見え”とするために、色順応後の色情報を目標値として設定する。このときの色順応後の色情報は、例えばCIEの色順応予測式によって予測される値とすることができる。尚、図6に示した色順応後の位置は、予めEEPROM17に色温度別に記憶されている。   On the other hand, if it is determined in step S14 that the auto WB mode is set, the color information after the predetermined color adaptation of the color information on the black body locus corresponding to the color temperature detected in step S12 is used as the target value. Set (step S22). That is, the color information after the color adaptation is set as a target value in order to obtain “original appearance of human being” by chromatic adaptation, not the color information itself on the black body locus corresponding to the detected color temperature. The color information after color adaptation at this time can be a value predicted by, for example, a CIE color adaptation prediction formula. The position after the color adaptation shown in FIG. 6 is stored in advance in the EEPROM 17 for each color temperature.

図5に示した黒体軌跡上の各色温度に対応する色情報は、色順応予測式を適応させることにより、色順応後は、図6に示す位置となる。この色順応後の各色情報の座標は、“光源そのものの見え”と完全順応との間にある。   The color information corresponding to each color temperature on the black body locus shown in FIG. 5 becomes the position shown in FIG. 6 after the chromatic adaptation by applying the chromatic adaptation prediction formula. The coordinates of each color information after this chromatic adaptation are between “appearance of the light source itself” and complete adaptation.

図2に戻って、ステップS18又はステップS22により目標値が設定されると、その後、ステップS10で算出した色情報のカタマリ重心位置と前記設定された目標値とに基づいてR,G,B信号に対するホワイトバランス補正値を算出する(ステップS24)。   Referring back to FIG. 2, when the target value is set in step S18 or step S22, the R, G, B signals are then based on the position of the center of gravity of the color information calculated in step S10 and the set target value. A white balance correction value for is calculated (step S24).

即ち、図7に示すようにR/G,B/G座標系のカタマリ重心位置の座標を(Xi,Yi)とし、目標値の座標を(Xj,Yj)とすると、座標(Xi,Yi)が座標(Xj,Yj)にくるようにホワイトバランスゲイン(WBゲイン)を求める。いま、求めるWBゲインをgri 、gbi とすると、gri 、gbi は、次式、
[数2]
ri =Xj/Xi
bi =Yj/Yi
で表すことができる。
That is, as shown in FIG. 7, assuming that the coordinates of the center of gravity position of the R / G, B / G coordinate system are (Xi, Yi) and the coordinates of the target value are (Xj, Yj), the coordinates (Xi, Yi) The white balance gain (WB gain) is obtained so that is at the coordinates (Xj, Yj). Assuming that the WB gain to be obtained is g r i and g b i, g r i and g b i are as follows:
[Equation 2]
g r i = Xj / Xi
g b i = Yj / Yi
Can be expressed as

以上のようにして求めたWBゲインgri 、gbi から、図1のメモリ18に保存したR,G,B信号に対するR,G,Bゲイン値(WB補正値)を求める。尚、G信号に付与する所要のゲイン値を、前記WBゲインgri 、gbi に乗算することによりR、B信号に付与するR、Bゲイン値を求めることができる。また、G信号に付与する所要のゲイン値を1とした場合には、前記WBゲインgri 、gbi がそのままR、B信号に付与するR、Bゲイン値となる。 From the WB gains g r i and g b i obtained as described above, R, G, and B gain values (WB correction values) for the R, G, and B signals stored in the memory 18 of FIG. 1 are obtained. The R and B gain values to be applied to the R and B signals can be obtained by multiplying the WB gains g r i and g b i by a required gain value to be applied to the G signal. Further, when the required gain value to be added to the G signal is 1, the WB gains g r i and g b i are directly used as the R and B gain values to be added to the R and B signals.

そして、上記R,G,Bゲイン値(WB補正値)によりメモリ18に保存したR,G,B信号を補正する。これによりホワイトバランス調整が行われる(ステップS26)。   Then, the R, G, B signals stored in the memory 18 are corrected by the R, G, B gain values (WB correction values). Thereby, white balance adjustment is performed (step S26).

このように“光源の見え”から完全順応までの間の色を目標値に設定してホワイトバランス調整を行なうことにより、例えばタングステン光源では少し赤みを抜くようなホワイトバランス調整が行なわれ、すっきりとした自然な色合いとなる。   In this way, by adjusting the white balance by setting the color from the “light source appearance” to the full adaptation as the target value, for example, a white balance adjustment that removes redness a little with a tungsten light source is performed. Natural color.

尚、この実施の形態では、複数の分割エリアの色情報が分布する色空間上のカタマリの重心位置により光源種に関わる色情報を求めるようにしたが、これに限らず、特許文献1と同様にしてR/G、B/Gの色空間上に、図5に示したような青空、日陰1〜4、昼光色1〜4、晴れ、昼白色1、2、白色1、2、温白色1〜4、タングステン1〜4、低タングステン等の光源種に対応する色分布の範囲を示す検出枠を設定し、各分割エリアごとの色情報に基づいて各検出枠に色情報が入る分割エリアの個数を求め、被写体の輝度レベル及び検出枠に入る分割エリアの個数に基づいて光源種を判別し、その光源種に対応する検出枠の中心座標を撮影状況下の光源種に関わる色情報として求めるようにしてもよい。   In this embodiment, the color information related to the light source type is obtained from the barycentric position of the catamari in the color space in which the color information of the plurality of divided areas is distributed. In the R / G and B / G color spaces, the blue sky, shade 1 to 4, daylight colors 1 to 4, clear, day white 1, 2, white 1, 2, warm white 1 as shown in FIG. -4, tungsten 1-4, low detection tungsten and other detection frames indicating the range of color distribution corresponding to the light source type, and based on the color information for each divided area, the color information in each detection frame The number of light sources is determined, the light source type is determined based on the luminance level of the subject and the number of divided areas included in the detection frame, and the center coordinates of the detection frame corresponding to the light source type are obtained as color information related to the light source type in the shooting state You may do it.

図1は本発明が適用されたデジタルカメラの実施の形態を示すブロック図である。FIG. 1 is a block diagram showing an embodiment of a digital camera to which the present invention is applied. 図2は本発明に係るオートホワイトバランス調整方法を説明するために用いたフローチャートである。FIG. 2 is a flowchart used to explain the auto white balance adjustment method according to the present invention. 図5は複数の分割エリアの色情報のR/G、B/Gの色空間上での分布の一例を示すグラフである。FIG. 5 is a graph showing an example of the distribution of color information of a plurality of divided areas in the R / G and B / G color spaces. 図4は黒体放射の分光分布を色温度別に表したグラフである。FIG. 4 is a graph showing the spectral distribution of black body radiation for each color temperature. 図5は色温度による黒体の色変化の軌跡(黒体軌跡)をR/G,B/G軸座標上に表したグラフである。FIG. 5 is a graph showing the locus of black body color change due to color temperature (black body locus) on R / G and B / G axis coordinates. 図6は黒体軌跡上の各色温度の色順応後の位置を示すグラフである。FIG. 6 is a graph showing the position after color adaptation of each color temperature on the black body locus. 図7はホワイトバランスゲインの求め方を説明するために用いた図である。FIG. 7 is a diagram used to explain how to obtain the white balance gain.

符号の説明Explanation of symbols

10…カメラ、12…CPU、16…ROM、17…EEPROM、18…メモリ、26…操作手段、32…記録メディア、38…カラーCCD固体撮像素子(CCD)、40…レンズユニット、42…撮影レンズ、58…画像信号処理回路   DESCRIPTION OF SYMBOLS 10 ... Camera, 12 ... CPU, 16 ... ROM, 17 ... EEPROM, 18 ... Memory, 26 ... Operation means, 32 ... Recording medium, 38 ... Color CCD solid-state image sensor (CCD), 40 ... Lens unit, 42 ... Shooting lens 58 ... Image signal processing circuit

Claims (5)

撮像素子を介して取得されるR,G,B信号のホワイトバランス調整を行なうオートホワイトバランス調整方法において、
前記R,G,B信号に基づいて撮影状況下の光源種に関わる色情報を求めるとともに、該色情報に対応する色温度を求めるステップと、
前記求めた色温度に対応する黒体軌跡上の色情報と完全順応後の色情報との間の色順応度に応じた色情報を目標値として設定するステップと、
前記求めた色情報と前記設定された目標値とに基づいてR,G,B信号に対するホワイトバランス補正値を決定するステップと、
前記決定されたホワイトバランス補正値に基づいて前記R,G,B信号のホワイトバランス調整を行うステップと、を含み、
前記色温度を求めるステップは、1画面を複数のエリアに分割してなる複数の分割エリアの色情報を各分割エリア内のR,G,B信号に基づいて求めるステップと、前記複数の分割エリアの色情報のうちの色空間上で相互に近似している色情報の集合の色空間における重心位置の色情報を算出するステップと、前記算出した重心位置の色情報と最も近似する色情報を有する光源種から前記光源種に関わる色情報を求めるステップとからなることを特徴とするオートホワイトバランス調整方法。
In an automatic white balance adjustment method for adjusting white balance of R, G, B signals acquired via an image sensor,
Obtaining color information related to a light source type under photographing conditions based on the R, G, B signals, and obtaining a color temperature corresponding to the color information;
Setting, as a target value, color information corresponding to the degree of color adaptation between the color information on the black body locus corresponding to the obtained color temperature and the color information after full adaptation;
Determining a white balance correction value for R, G, B signals based on the obtained color information and the set target value;
Look including the steps of: performing a white balance adjustment of the R, G, B signals based on the white balance correction value the determined,
The step of obtaining the color temperature comprises obtaining color information of a plurality of divided areas obtained by dividing one screen into a plurality of areas based on R, G, and B signals in each divided area, and the plurality of divided areas. Calculating the color information of the barycentric position in the color space of the set of color information that is mutually approximate on the color space, and the color information that most closely approximates the color information of the calculated barycentric position. And obtaining color information relating to the light source type from the light source type .
前記黒体軌跡上の各色温度別の色情報を目標値として設定する場合を色順応度0%とし、完全グレーを目標値として設定する場合を色順応度100%とし、0〜100%の任意の色順応度を手動で設定するステップを含み、前記目標値を設定するステップは、前記手動で設定された色順応度に応じて前記目標値を変更することを特徴とする請求項1に記載のオートホワイトバランス調整方法。   When the color information for each color temperature on the black body locus is set as a target value, the chromatic adaptation is set to 0%, and when the complete gray is set as the target value, the chromatic adaptation is set to 100%, and an arbitrary value of 0 to 100% is set. The step of setting the target value includes changing the target value according to the manually set color adaptability. Auto white balance adjustment method. 撮像素子を介して取得されるR,G,B信号のホワイトバランス調整を行なうオートホワイトバランス調整装置において、
前記R,G,B信号に基づいて撮影状況下の光源種に関わる色情報を取得する色情報取得手段と、
前記取得した色情報に対応する色温度を求める手段と、
前記取得した色温度に対応する黒体軌跡上の色情報と完全順応後の色情報との間の色順応度に応じた色情報を目標値として設定する目標値設定手段と、
前記取得した色情報と前記設定された目標値とに基づいてR,G,B信号に対するホワイトバランス補正値を決定する手段と、
前記決定されたホワイトバランス補正値に基づいて前記R,G,B信号のホワイトバランス調整を行う手段と、を備え
前記色温度取得手段は、1画面を複数のエリアに分割してなる複数の分割エリアの色情報を各分割エリア内のR,G,B信号に基づいて求める手段と、前記複数の分割エリアの色情報のうちの色空間上で相互に近似している色情報の集合の色空間における重心位置の色情報を算出する手段と、前記算出した重心位置の色情報と最も近似する色情報を有する光源種から前記光源種に関わる色情報を求める手段とからなることを特徴とするオートホワイトバランス調整装置。
In an automatic white balance adjustment device that performs white balance adjustment of R, G, and B signals acquired via an image sensor,
Color information acquisition means for acquiring color information related to a light source type under shooting conditions based on the R, G, B signals;
Means for obtaining a color temperature corresponding to the acquired color information;
Target value setting means for setting, as a target value, color information corresponding to the degree of color adaptation between the color information on the black body locus corresponding to the acquired color temperature and the color information after full adaptation;
Means for determining a white balance correction value for R, G, B signals based on the acquired color information and the set target value;
Means for adjusting white balance of the R, G, B signals based on the determined white balance correction value ;
The color temperature acquisition means includes means for obtaining color information of a plurality of divided areas obtained by dividing one screen into a plurality of areas based on R, G, and B signals in each divided area; Means for calculating color information of the barycentric position in the color space of a set of color information that are mutually approximated on the color space of the color information, and color information that most closely approximates the color information of the calculated barycentric position An automatic white balance adjusting device comprising means for obtaining color information related to the light source type from the light source type .
前記黒体軌跡上の各色温度別の色情報を記憶する記憶手段と、色順応度を手動で設定する色順応度設定手段とを備え、前記目標値設定手段は、前記取得した色温度に基づいて前記記憶手段から対応する黒体軌跡上の色情報を読み出し、この読み出した色情報と完全順応後の色情報との間を前記設定した色順応度に応じて補間して得た色情報を目標値として設定することを特徴とする請求項に記載のオートホワイトバランス調整装置。 A storage unit that stores color information for each color temperature on the black body locus; and a color adaptation setting unit that manually sets a color adaptation. The target value setting unit is based on the acquired color temperature. The color information on the corresponding black body locus is read from the storage means, and the color information obtained by interpolating between the read color information and the color information after complete adaptation according to the set color adaptation degree is obtained. 4. The automatic white balance adjusting device according to claim 3 , wherein the automatic white balance adjusting device is set as a target value. 前記黒体軌跡上の各色温度別の色情報に対応する色順応予測式で予測した色順応後の色情報を各色温度別に記憶する記憶手段を備え、前記目標値設定手段は、前記取得した色温度に基づいて前記記憶手段から対応する色順応後の色情報を読み出し、この読み出した色情報を目標値として設定することを特徴とする請求項に記載のオートホワイトバランス調整装置。 Storage means for storing color information after color adaptation predicted by a color adaptation prediction formula corresponding to color information for each color temperature on the black body locus for each color temperature, and the target value setting means, the target value setting means 4. The automatic white balance adjustment apparatus according to claim 3 , wherein the color information after color adaptation corresponding to the storage unit is read from the storage unit, and the read color information is set as a target value.
JP2004241951A 2004-08-23 2004-08-23 Auto white balance adjustment method and apparatus Expired - Fee Related JP4239219B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004241951A JP4239219B2 (en) 2004-08-23 2004-08-23 Auto white balance adjustment method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004241951A JP4239219B2 (en) 2004-08-23 2004-08-23 Auto white balance adjustment method and apparatus

Publications (2)

Publication Number Publication Date
JP2006060650A JP2006060650A (en) 2006-03-02
JP4239219B2 true JP4239219B2 (en) 2009-03-18

Family

ID=36107745

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004241951A Expired - Fee Related JP4239219B2 (en) 2004-08-23 2004-08-23 Auto white balance adjustment method and apparatus

Country Status (1)

Country Link
JP (1) JP4239219B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783135B (en) * 2010-03-11 2012-01-04 冠捷显示科技(武汉)有限公司 Method of 336 white balance adjustment
JP5338762B2 (en) * 2010-07-14 2013-11-13 株式会社豊田中央研究所 White balance coefficient calculation device and program
JP6009046B2 (en) * 2015-07-14 2016-10-19 キヤノン株式会社 Imaging apparatus and control method thereof

Also Published As

Publication number Publication date
JP2006060650A (en) 2006-03-02

Similar Documents

Publication Publication Date Title
JP4284448B2 (en) Image processing apparatus and method
JP4158592B2 (en) Auto white balance adjustment method and camera to which this method is applied
JP4329125B2 (en) White balance control method, white balance control device, and imaging device
US8803994B2 (en) Adaptive spatial sampling using an imaging assembly having a tunable spectral response
JP4791331B2 (en) Imaging apparatus and exposure control method
US8629919B2 (en) Image capture with identification of illuminant
US20050128316A1 (en) Image processing system
JP5253000B2 (en) Imaging device
JP2007053499A (en) White balance control unit and imaging apparatus
JP2008236101A (en) Imaging device and imaging method
EP2362662B1 (en) Imaging device, imaging method and computer readable recording medium storing program for performing the imaging method
JP4200428B2 (en) Face area extraction method and apparatus
JP2017022610A (en) Image processing apparatus and image processing method
JP4796007B2 (en) Imaging device
JP4067033B2 (en) Image processing apparatus and method
JP2012142823A (en) Display controller, imaging apparatus and display control program
US7570294B2 (en) Digital camera
JP2008017198A (en) Device and method for calculating light source color, and photographing device
JP4210920B2 (en) White balance adjustment method and camera
JP4239219B2 (en) Auto white balance adjustment method and apparatus
JP5247900B2 (en) Image sensor compensation
JP4026516B2 (en) Image processing apparatus and method
JP2006238369A (en) Digital camera, custom white balance setting method, and imaging control method and program
JP2004304695A (en) White balance adjustment method
US11470258B2 (en) Image processing apparatus and image processing method to perform image processing on divided areas

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061226

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080430

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080707

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080905

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081214

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4239219

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120109

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20130109

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140109

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees