JP4239218B2 - White balance adjustment method and electronic camera - Google Patents

White balance adjustment method and electronic camera Download PDF

Info

Publication number
JP4239218B2
JP4239218B2 JP2003311440A JP2003311440A JP4239218B2 JP 4239218 B2 JP4239218 B2 JP 4239218B2 JP 2003311440 A JP2003311440 A JP 2003311440A JP 2003311440 A JP2003311440 A JP 2003311440A JP 4239218 B2 JP4239218 B2 JP 4239218B2
Authority
JP
Japan
Prior art keywords
white balance
sensitivity
pixel
color signal
color
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
JP2003311440A
Other languages
Japanese (ja)
Other versions
JP2005080190A5 (en
JP2005080190A (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 JP2003311440A priority Critical patent/JP4239218B2/en
Publication of JP2005080190A publication Critical patent/JP2005080190A/en
Publication of JP2005080190A5 publication Critical patent/JP2005080190A5/ja
Application granted granted Critical
Publication of JP4239218B2 publication Critical patent/JP4239218B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Transforming Light Signals Into Electric Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Description

本発明はホワイトバランス調整方法及び電子カメラに係り、特に、感度が異なる高感度の色信号と低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する際のホワイトバランス調整方法及び電子カメラに関する。   The present invention relates to a white balance adjustment method and an electronic camera, and more particularly to a white balance adjustment method and an electronic device for generating a wide dynamic range color signal based on a high sensitivity color signal and a low sensitivity color signal having different sensitivities. Regarding the camera.

感度の高い主画素と主画素よりも感度の低い副画素とを多数配置したカラー撮像手段によって被写体を撮像し、主画素で光電変換して得られた色信号と副画素で光電変換して得られた色信号とを合成することにより広ダイナミックレンジの色信号が得られるようにした電子カメラが提案されている。この電子カメラによれば、被写体の中間輝度領域の再現を適切に保ったまま、ハイライト領域を白飛びさせることなく再現させることができる。   The subject is imaged by color imaging means with a large number of high-sensitivity main pixels and sub-pixels with lower sensitivity than the main pixels, and the color signal obtained by photoelectric conversion at the main pixel and the sub-pixel are used for photoelectric conversion. An electronic camera has been proposed in which a color signal with a wide dynamic range can be obtained by combining the obtained color signal. According to this electronic camera, the highlight area can be reproduced without overexposure while appropriately reproducing the intermediate luminance area of the subject.

一方で、光源種を判別し、その判別した光源種に適したホワイトバランス調整を行うようにしたホワイトバランス調整方法が提案されている(例えば特許文献1参照)。   On the other hand, a white balance adjustment method has been proposed in which a light source type is determined and white balance adjustment suitable for the determined light source type is performed (see, for example, Patent Document 1).

静止画と動画とでホワイトバランス補正値を切り替えるようにした電子カメラも提案されている(特許文献2参照)。具体的には、静止画撮影時には目標の補正が瞬時に完了するホワイトバランス補正値を用い、動画撮影時には高速性よりも時系列での円滑性を重視したホワイトバランス補正値を用いるようになっている。
特開2000−224608号公報 特開平5−130635号公報
There has also been proposed an electronic camera in which white balance correction values are switched between a still image and a moving image (see Patent Document 2). Specifically, the white balance correction value that completes the target correction instantly when shooting still images is used, and the white balance correction value that emphasizes smoothness in time series rather than high speed is used when shooting movies. Yes.
JP 2000-224608 A JP-A-5-130635

主画素と副画素とを多数配置したカラー撮像素子の色信号に対してホワイトバランス調整をする場合、主画素の色信号のみ的確に色再現されても、副画素の色信号での色再現がくずれていれば、主画素の色信号と副画素の色信号とを合成して得た広ダイナミックレンジの色信号も色再現が十分でないことになり、結果として、利用者が画像を視認した際に違和感を抱きかねない。即ち、従来の単一種類の画素を多数配置した電子カメラでのホワイトバランス調整方法を、主画素の色信号と副画素の色信号とに対してそれぞれ独立に適用しただけでは、十分な色再現は困難であろう。   When white balance adjustment is performed on the color signal of a color image sensor with a large number of main pixels and sub-pixels, even if only the color signal of the main pixel is accurately reproduced, color reproduction with the color signal of the sub-pixel is possible. If the color signal is not correct, the color signal of the wide dynamic range obtained by combining the color signal of the main pixel and the color signal of the sub-pixel will not be adequately reproduced. As a result, when the user visually recognizes the image You may feel uncomfortable. In other words, sufficient color reproduction is achieved by simply applying the white balance adjustment method for a conventional electronic camera with a large number of single-type pixels to the color signal of the main pixel and the color signal of the sub-pixel. Will be difficult.

特許文献2には、2種類の色信号(静止画及び動画)に対するホワイトバランス調整方法が開示されてはいるが、このような公知の方法を主画素の色信号及び副画素の色信号のホワイトバランス調整に仮に適用したとしても、やはり的確な色再現をすることができない。この特許文献2に開示されたものでは、せっかく一方の色信号(静止画)に対して色再現可能な適切なホワイトバランス補正値を決めても、他方の色信号(動画)では円滑性を重視したホワイトバランス補正値を用いるため、シーンによっては色再現が異なってしまう。   Patent Document 2 discloses a white balance adjustment method for two types of color signals (still image and moving image). However, such a known method is applied to the white color signal of the main pixel and the white color signal of the sub-pixel. Even if it is applied to balance adjustment, accurate color reproduction cannot be achieved. In the one disclosed in Patent Document 2, even if an appropriate white balance correction value capable of color reproduction is determined for one color signal (still image), smoothness is emphasized in the other color signal (moving image). Since the white balance correction value is used, color reproduction varies depending on the scene.

本発明はこのような事情に鑑みてなされたもので、低感度の色信号についても高感度の色信号と同様に的確な色再現をすることができ、これらの高感度の色信号と低感度の色信号とに基づいて生成した広ダイナミックレンジの色信号でも的確な色再現を可能とするホワイトバランス調整方法及び電子カメラを提供することを目的とする。   The present invention has been made in view of such circumstances, and it is possible to accurately reproduce a low-sensitivity color signal as well as a high-sensitivity color signal. It is an object of the present invention to provide a white balance adjustment method and an electronic camera that enable accurate color reproduction even with a wide dynamic range color signal generated based on the color signal.

前記目的を達成するために、請求項1に記載の発明は、高感度の色信号と低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する際のホワイトバランス調整方法において、高感度の色信号に基づいて第1のホワイトバランス補正値を求めるステップと、前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正するステップと、前記高感度の色信号の色間の出力差と前記低感度の色信号の色間の比である感度比を、前記第1のホワイトバランス補正値に乗算して第2のホワイトバランス補正値を求めるステップと、前記第2のホワイトバランス補正値に従って前記低感度の色信号を補正するステップと含む構成となっている。 To achieve the above object, a first aspect of the present invention, in the white balance adjustment method when generating a color signal of wide dynamic range on the basis of the color signal of the color signal and the low-sensitivity high-sensitivity, high A step of obtaining a first white balance correction value based on a color signal of sensitivity; a step of correcting the color signal of high sensitivity according to the first white balance correction value; and between colors of the color signal of high sensitivity . Multiplying the first white balance correction value by a sensitivity ratio, which is a ratio between an output difference and a color of the low-sensitivity color signal, to obtain a second white balance correction value; and the second white balance And a step of correcting the low-sensitivity color signal according to a correction value.

この構成によって、低感度の色信号に対するホワイトバランス補正値が、前記高感度の色信号の色間の出力差と前記低感度の色信号の色間の比である感度比を高感度の色信号に対するホワイトバランス補正値に乗算して求められ、このようにして求められたホワイトバランス補正値に従って低感度の色信号のホワイトバランスが調整されるので、低感度の色信号についても高感度の色信号と同様に的確な色再現がされることになる。 This configuration, low white balance correction value for the color signal of the sensitivity, the high sensitivity output difference between the low-sensitivity color signals sensitive sensitivity ratio is the ratio of the colors of the color signal between the color of the color signals White is determined by multiplying the balance correction value, the white balance of the color signal of the low sensitivity is adjusted in accordance with the white balance correction value determined in this way, the high sensitivity for the low-sensitivity color signal the color signal for the As with, accurate color reproduction will be performed.

また、請求項2に記載の発明は、高感度の色信号と該低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する際のホワイトバランス調整方法において、前記色信号に基づいてR,G,Bの各色信号の積算値の第1の比R/G,B/Gを求めるステップと、前記第1の比R/G,B/Gに基づいて第1のホワイトバランス補正値を求めるステップと、前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正するステップと、前記低感度の色信号に基づいてR,G,Bの各色信号の積算値の第2の比R/G,B/Gを求めるステップと、前記高感度の色信号と前記低感度の色信号との比である感度比を前記第2の比R/G,B/Gに乗算して前記第1の比R/G,B/Gに相当する第3の比R/G,B/Gを求めるステップと、前記第3の比R/G,B/Gに基づいて前記第1のホワイトバランス補正値に相当する第2のホワイトバランス補正値を求めるステップと、前記感度比を前記第2のホワイトバランス補正値に乗算して第3のホワイトバランス補正値を求めるステップと、前記第3のホワイトバランス補正値に従って前記低感度の色信号を補正するステップと、を含む構成となっている。 The invention according to claim 2, in the white balance adjustment method when generating a color signal of wide dynamic range on the basis of the color signal of the color signal and the low sensitivity of the high sensitivity, based on the previous SL color signals Calculating a first ratio R / G, B / G of the integrated values of the R, G, B color signals, and a first white balance correction based on the first ratio R / G, B / G. A step of obtaining a value, a step of correcting the high-sensitivity color signal according to the first white balance correction value, and a second integrated value of the R, G, B color signals based on the low-sensitivity color signal. the ratio R / G of the steps of obtaining a B / G, the high sensitivity the sensitivity ratio is the ratio of the No. Iroshin and No. Iroshin of the low sensitivity of the second ratio R / G, the B / G Multiplication is performed to obtain third ratios R / G and B / G corresponding to the first ratios R / G and B / G. A step of obtaining a second white balance correction value corresponding to the first white balance correction value based on the third ratio R / G, B / G, and the sensitivity ratio of the second white balance correction value. The method includes a step of multiplying the balance correction value to obtain a third white balance correction value, and a step of correcting the low-sensitivity color signal in accordance with the third white balance correction value.

この構成によって、低感度の色信号のR/G及びB/Gが高感度の色信号のR/G及びB/Gに相当するように補正されて、これらの補正された低感度の色信号のR/G及びB/Gに基づいて高感度の色信号に対するホワイトバランス補正値に相当する低感度の色信号のホワイトバランス補正値が求められるとともに、この低感度の色信号のホワイトバランス補正値に、前記高感度の色信号と前記低感度の色信号との比である感度比が乗算されて、この補正されたホワイトバランス補正値に従って低感度の色信号のホワイトバランスが調整されるので、低感度の色信号についても高感度の色信号と同様に的確な色再現がされることになる。 This configuration is corrected as the low-sensitivity color signals R / G and B / G corresponds to R / G and B / G sensitive color signals, these corrected low-sensitivity color signals based on the R / G and B / G with white balance correction value of the low sensitivity of the color signal is obtained corresponding to the white balance correction value for the sensitivity of the color signal, white balance correction value of the color signal of the low-sensitivity to, the high sensitivity is the ratio at which the sensitivity ratio is multiplied by the No. Iroshin and No. Iroshin of the low sensitivity, white balance of the color signal of low sensitivity is adjusted according to the corrected white balance correction value Therefore, an accurate color reproduction is performed for a low-sensitivity color signal as well as a high-sensitivity color signal.

また、請求項3に記載の発明は、請求項1又は2に記載の発明において、前記感度比を予め記憶した記憶手段から該感度比を読み出すステップを更に含む構成となっている。   The invention according to claim 3 is the structure according to claim 1 or 2, further comprising a step of reading out the sensitivity ratio from storage means that stores the sensitivity ratio in advance.

この構成によって、シミュレーションの結果や実際の回路での試験結果等に基づく適当な感度比を記憶手段に予め記憶させておき、この予め記憶させた感度比に基づいて的確な色再現をさせることが可能になる。   With this configuration, an appropriate sensitivity ratio based on a simulation result, a test result on an actual circuit, or the like is stored in advance in a storage unit, and accurate color reproduction can be performed based on the previously stored sensitivity ratio. It becomes possible.

また、請求項4に記載の発明は、請求項1又は2に記載の発明において、前記感度比を前記高感度の色信号及び前記低感度の色信号に基づいて算出するステップを更に含む構成となっている。 The invention according to claim 4 further includes a step of calculating the sensitivity ratio based on the high-sensitivity color signal and the low-sensitivity color signal in the invention according to claim 1 or 2. It has become.

この構成によって、実際に個々の電子カメラで感度比を算出して各電子カメラに適した色再現をさせることも可能になる。   With this configuration, the sensitivity ratio can be actually calculated by each electronic camera and color reproduction suitable for each electronic camera can be performed.

また、請求項5に記載の発明は、高感度の色信号と低感度の色信号とをもち、高感度の色信号に基づいて第1のホワイトバランス補正値を求める手段と、前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正する手段と、前記高感度の色信号と前記低感度の色信号との比である感度比を前記第1のホワイトバランス補正値に乗算して第2のホワイトバランス補正値を求める手段と、前記第2のホワイトバランス補正値に従って前記低感度の色信号を補正する手段と、前記補正された高感度の色信号と該高感度に対応する位置の補正された低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する手段とを備えた構成となっている。 According to a fifth aspect of the present invention, there is provided means for obtaining a first white balance correction value based on a high-sensitivity color signal having a high-sensitivity color signal and a low-sensitivity color signal ; means for correcting the color signal of the high sensitivity in accordance with the white balance correction value, multiplied by the ratio a is the sensitivity ratio between the No. Iroshin of the low sensitivity and No. Iroshin of the high sensitivity to the first white balance correction value It means for obtaining a second white balance correction value, and means for correcting the color signal of the low-sensitivity in accordance with the second white balance correction value, corresponding to the color signals and the high sensitivity of the corrected sensitivity And a means for generating a color signal with a wide dynamic range based on the corrected low-sensitivity color signal.

また、請求項6に記載の発明は、高感度の色信号と低感度の色信号とをもち、
高感度の色信号に基づいてR,G,Bの各色信号の積算値の第1の比R/G,B/Gを求める手段と、該第1の比R/G,B/Gに基づいて第1のホワイトバランス補正値を求める手段と、前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正する手段と、低感度の色信号に基づいてR,G,Bの各色信号の積算値の第2の比R/G,B/Gを求める手段と、前記高感度の色信号と前記低感度の色信号との比である感度比を前記第2の比R/G,B/Gに乗算して前記第1の比R/G,B/Gに相当する第3の比R/G,B/Gを求める手段と、前記第3の比R/G,B/Gに基づいて前記第1のホワイトバランス補正値に相当する第2のホワイトバランス補正値を求める手段と、前記感度比を前記第2のホワイトバランス補正値に乗算して第3のホワイトバランス補正値を求める手段と、前記第3のホワイトバランス補正値に従って前記低感度の色信号を補正する手段と、前記補正された高感度の色信号と該高感度に対応する低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する手段とを備えた構成となっている。
The invention according to claim 6 has a high-sensitivity color signal and a low-sensitivity color signal,
Means for obtaining a first ratio R / G, B / G of integrated values of the R, G, B color signals based on the high-sensitivity color signal, and based on the first ratios R / G, B / G Means for determining a first white balance correction value; means for correcting the high-sensitivity color signal in accordance with the first white balance correction value; and R, G, B color signals based on the low-sensitivity color signal. the second ratio R / G integrated value, B / means for determining G, the high ratio the sensitivity ratio of the second is the ratio of the No. Iroshin of the low sensitivity and No. Iroshin sensitivity R / Means for multiplying G, B / G to obtain a third ratio R / G, B / G corresponding to the first ratio R / G, B / G, and the third ratio R / G, B Means for obtaining a second white balance correction value corresponding to the first white balance correction value based on / G, and the sensitivity ratio as the second white balance Means for obtaining a third white balance correction value by multiplying a positive value, the third means for correcting the color signal of the low-sensitivity according to the white balance correction value, the corrected sensitivity of the color signal and the And a means for generating a color signal with a wide dynamic range based on a low-sensitivity color signal corresponding to high sensitivity .

本発明によれば、低感度の色信号についても高感度の色信号と同様に的確な色再現がされ、これらの高感度の色信号と低感度の色信号とに基づいて生成した広ダイナミックレンジの色信号でも的確な色再現がされる。   According to the present invention, accurate color reproduction is performed for low-sensitivity color signals as well as high-sensitivity color signals, and a wide dynamic range generated based on these high-sensitivity color signals and low-sensitivity color signals. Accurate color reproduction is possible even with this color signal.

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

(第1の実施の形態) 図1は本発明を適用した電子カメラのブロック図である。   First Embodiment FIG. 1 is a block diagram of an electronic camera to which the present invention is applied.

この電子カメラは、静止画や動画の記録及び再生の機能を備えたデジタルカメラであり、電子カメラ全体の動作は中央処理装置(CPU)60によって統括制御される。CPU60は、所定のプログラムに従って本電子カメラの各部を制御する制御手段として機能する。また、自動露出(AE)、自動焦点調節(AF)、及び、自動ホワイトバランス調整(AWB)などの制御を行う際には、これらの制御に必要な各種の演算もCPU60で実施するようになっている。   This electronic camera is a digital camera having functions for recording and reproducing still images and moving images, and the overall operation of the electronic camera is centrally controlled by a central processing unit (CPU) 60. The CPU 60 functions as a control unit that controls each part of the electronic camera according to a predetermined program. In addition, when performing control such as automatic exposure (AE), automatic focus adjustment (AF), and automatic white balance adjustment (AWB), the CPU 60 also performs various calculations necessary for these controls. ing.

カラー撮像素子(CCD)14には、撮影レンズ10及び絞り12を透過した光が入射される。このCCD14は、複数のフォトダイオード(後述の受光セルを構成する)が二次元配列されており、これらのフォトダイオードによって被写体像が入射光量に応じた信号電荷に変換される。図2は、ハニカム配列と呼ばれる配列形態のカラー撮像素子を示す平面模式図であり、互いに隣接する受光セル1420の行同士(又は列同士)において、一方の行(又は列)のセル配列が、他方の行(又は列)のセル配列に対して行方向(又は列方向)の配列間隔の略1/2だけ相対的にずれて配列されている。   Light that has passed through the photographing lens 10 and the diaphragm 12 enters the color imaging device (CCD) 14. The CCD 14 has a plurality of photodiodes (which constitute a light receiving cell described later) arranged two-dimensionally, and the subject image is converted into signal charges corresponding to the amount of incident light by these photodiodes. FIG. 2 is a schematic plan view showing a color image pickup device called an array form called a honeycomb array. In the rows (or columns) of light receiving cells 1420 adjacent to each other, the cell array in one row (or column) is The cells are arranged so as to be relatively shifted from the cell arrangement of the other row (or column) by about ½ of the arrangement interval in the row direction (or column direction).

各受光セル1420は、感度の異なる二つの受光領域1421、1422を含む。第1の受光領域1421は、第2の受光領域1422よりも相対的に広い面積を有する感光部(以下「主画素」と称する)を構成する。第2の受光領域1422は、第1の受光領域1421よりも相対的に狭い面積を有する従たる感光部(以下「副画素」と称する)を構成する。ここで、副画素1422は主画素1421よりも感度が低い。各受光セル1420を構成する一対の主画素1421と副画素1422には同色のカラーフィルタが配置されている。すなわち、各受光セル1420に対応してそれぞれR(赤)、G(緑)、B(青)の何れか一色の原色カラーフィルタが割り当てられている。尚、図2では受光セル1420の開口形状が四角形であるが、開口形状はこのような四角形に限定されず、六角形や八角形等の多角形、或いは円形であってもよい。また、受光セル1420の分割形態についても、図2に示した形状に限定されず、面積の大小関係など適宜設計される。   Each light receiving cell 1420 includes two light receiving regions 1421 and 1422 having different sensitivities. The first light receiving region 1421 constitutes a photosensitive portion (hereinafter referred to as “main pixel”) having a relatively larger area than the second light receiving region 1422. The second light receiving region 1422 forms a secondary photosensitive portion (hereinafter referred to as “sub-pixel”) having an area relatively smaller than that of the first light receiving region 1421. Here, the sub-pixel 1422 is less sensitive than the main pixel 1421. A pair of main pixels 1421 and sub-pixels 1422 constituting each light receiving cell 1420 are provided with color filters of the same color. That is, one primary color filter of R (red), G (green), and B (blue) is assigned to each light receiving cell 1420. In FIG. 2, the opening shape of the light receiving cell 1420 is a square, but the opening shape is not limited to such a square, and may be a polygon such as a hexagon or an octagon, or a circle. Further, the division form of the light receiving cell 1420 is not limited to the shape shown in FIG.

受光セル1420に近接して垂直転送路(VCCD)1430が設けられている。垂直転送路1430上には4相駆動(φ1、φ2、φ3、φ4)に必要な転送電極1431、1432、1433、1434が配置されている。また、受光セル1420が並んだ撮像エリア1440に近接して、転送電極1431乃至1434にパルス電圧を印加するVCCD駆動回路1442と、垂直転送路1430から移された信号電荷を水平方向に転送する水平転送路(HCCD)1444が設けられている。水平転送路1444は、2相駆動であり、水平転送路1444の最終段は出力部1446に接続されている。出力部1446は出力アンプを含み、入力された信号電荷の電荷検出を行って、信号電圧として出力端子1448に色信号を出力する。こうして、各受光セル1420で光電変換した色信号(R,G,B信号)が、点順次の信号列として出力される。   A vertical transfer path (VCCD) 1430 is provided adjacent to the light receiving cell 1420. On the vertical transfer path 1430, transfer electrodes 1431, 1432, 1433, and 1434 necessary for four-phase driving (φ1, φ2, φ3, and φ4) are arranged. Further, in the vicinity of the imaging area 1440 where the light receiving cells 1420 are arranged, a VCCD driving circuit 1442 for applying a pulse voltage to the transfer electrodes 1431 to 1434 and a horizontal transfer for transferring the signal charges transferred from the vertical transfer path 1430 in the horizontal direction. A transfer path (HCCD) 1444 is provided. The horizontal transfer path 1444 is a two-phase drive, and the final stage of the horizontal transfer path 1444 is connected to the output unit 1446. The output unit 1446 includes an output amplifier, performs charge detection of the input signal charge, and outputs a color signal to the output terminal 1448 as a signal voltage. Thus, the color signals (R, G, B signals) photoelectrically converted by each light receiving cell 1420 are output as a dot-sequential signal sequence.

このようなCCD14において、一度の露光により主画素1421及び副画素1422で蓄積された信号電荷は、それぞれ独立に読み出される。具体的には、主画素1421及び副画素1422でそれぞれ生成された信号電荷は、受光セル1420に近接した垂直転送路1430に別々に読み出され、混ざり合うことなく転送される。すなわち、ひとつの受光セル1420から感度の異なる2種類の色信号(即ち、主画素のR,G,B信号と副画素のR,G,B信号)が別々に取り出される。   In such a CCD 14, the signal charges accumulated in the main pixel 1421 and the sub-pixel 1422 by one exposure are read out independently. Specifically, the signal charges respectively generated by the main pixel 1421 and the sub-pixel 1422 are separately read out to the vertical transfer path 1430 adjacent to the light receiving cell 1420 and transferred without being mixed. That is, two types of color signals having different sensitivities (that is, R, G, B signals of the main pixel and R, G, B signals of the sub-pixels) having different sensitivities are taken out from one light receiving cell 1420 separately.

主画素1421の出力は、入射光量(被写体反射率)に比例して次第に増加し、入射光量が所定値(c)のときに飽和値(以下「飽和光量」と称する)に達する。以後、入射光量が増加しても主画素1421の出力は一定となる。一方で、副画素1422の出力は、入射光量が主画素1421の飽和光量cを超えても飽和しないようになっている。   The output of the main pixel 1421 gradually increases in proportion to the incident light amount (subject reflectance), and reaches a saturation value (hereinafter referred to as “saturated light amount”) when the incident light amount is a predetermined value (c). Thereafter, the output of the main pixel 1421 remains constant even when the amount of incident light increases. On the other hand, the output of the sub-pixel 1422 is not saturated even if the incident light quantity exceeds the saturation light quantity c of the main pixel 1421.

CCD14は、電荷蓄積時間(シャッタスピード)を制御する、いわゆる電子シャッタ機能を有している。CCD14に蓄積された電荷は、CPU60の指令に従いCCD駆動回路16から与えられる駆動パルスによって信号電荷に応じた電圧信号(R,G,B信号)として順次読み出される。以下、主画素から取り出されたR,G,B信号を「主画素の色信号」、副画素から取り出されたR,G,B信号を「副画素の色信号」ともいう。   The CCD 14 has a so-called electronic shutter function for controlling the charge accumulation time (shutter speed). The charge accumulated in the CCD 14 is sequentially read out as a voltage signal (R, G, B signal) corresponding to the signal charge by a drive pulse given from the CCD drive circuit 16 in accordance with a command from the CPU 60. Hereinafter, the R, G, B signals extracted from the main pixel are also referred to as “main pixel color signals”, and the R, G, B signals extracted from the sub pixels are also referred to as “sub pixel color signals”.

CCD14から順次取り出された主画素及び副画素の色信号は、相関二重サンプリング回路(CDS回路)18に与えられ、サンプリングホールド(相関二重サンプリング処理)された後、A/D変換器20に与えられ、アナログからデジタルに変換される。これらのCCD駆動回路16、CDS回路18、及びA/D変換器20は、タイミング発生器22から与えられるタイミング信号によって同期して動作するようになっている。   The main pixel and sub-pixel color signals sequentially taken out from the CCD 14 are supplied to a correlated double sampling circuit (CDS circuit) 18, sampled and held (correlated double sampling processing), and then sent to an A / D converter 20. Given, converted from analog to digital. The CCD driving circuit 16, the CDS circuit 18, and the A / D converter 20 operate in synchronization with a timing signal supplied from a timing generator 22.

A/D変換器20から出力された主画素及び副画素の色信号は、一旦メモリ24に格納され、その後、デジタル信号処理回路26に加えられる。デジタル信号処理回路26は、同時化回路28、ホワイトバランス補正回路30、ガンマ処理回路32、合成回路33、YC信号生成回路34及びメモリ36から構成されている。同時化回路28は、A/D変換器20でデジタルに変換された点順次の主画素及び副画素の色信号を同時式に変換し、ホワイトバランス補正回路30は、同時化回路28から出力された主画素及び副画素の色信号のホワイトバランスを補正し、ガンマ処理回路32は、ホワイトバランス補正回路30から出力された主画素及び副画素の色信号が所望のガンマ特性となるように入出力特性を変更し、合成回路33は主画素の色信号と副画素の色信号とを合成して広ダイナミックレンジの色信号を生成する。   The main pixel and sub-pixel color signals output from the A / D converter 20 are temporarily stored in the memory 24 and then added to the digital signal processing circuit 26. The digital signal processing circuit 26 includes a synchronization circuit 28, a white balance correction circuit 30, a gamma processing circuit 32, a synthesis circuit 33, a YC signal generation circuit 34, and a memory 36. The synchronization circuit 28 converts the dot sequential color signals of the main pixel and the sub-pixel converted into digital by the A / D converter 20 into a simultaneous expression, and the white balance correction circuit 30 is output from the synchronization circuit 28. The gamma processing circuit 32 corrects the white balance of the color signals of the main pixel and the sub-pixel, and inputs / outputs the color signals of the main pixel and the sub-pixel output from the white balance correction circuit 30 so as to have a desired gamma characteristic. The characteristics are changed, and the synthesis circuit 33 synthesizes the color signal of the main pixel and the color signal of the sub-pixel to generate a color signal with a wide dynamic range.

図3は、ガンマ処理回路32から出力された主画素の色信号320P及び副画素の色信号320Sと、合成回路33から出力された広ダイナミックレンジの色信号330の例を示す。図3において、横軸は被写体反射率、縦軸は各色信号のレベルにしてある。このように主画素の色信号と副画素の色信号とを合成して広ダイナミックレンジの色信号を生成することにより、被写体の中間輝度領域の再現を適切に保ったまま、ハイライト領域を白飛びさせることなく再現させることができる。   FIG. 3 shows examples of the main pixel color signal 320P and the sub-pixel color signal 320S output from the gamma processing circuit 32 and the wide dynamic range color signal 330 output from the synthesis circuit 33. In FIG. 3, the horizontal axis represents the subject reflectance, and the vertical axis represents the level of each color signal. In this way, the color signal of the main pixel and the color signal of the sub-pixel are combined to generate a color signal with a wide dynamic range, so that the highlight area is whitened while appropriately reproducing the intermediate luminance area of the subject. It can be reproduced without flying.

YC信号生成回路34は、合成回路33から出力された広ダイナミックレンジの色信号(R,G,B信号である)から輝度信号Yと色差信号Cr、Cbを生成し、メモリ36はYC信号生成回路34から出力されたYC信号を一時記憶する。   The YC signal generation circuit 34 generates the luminance signal Y and the color difference signals Cr and Cb from the wide dynamic range color signals (the R, G, and B signals) output from the synthesis circuit 33, and the memory 36 generates the YC signal. The YC signal output from the circuit 34 is temporarily stored.

メモリ36内に一時記憶されたYC信号は、液晶モニタ52に表示させることができる。また、圧縮/伸長回路54は、JPEGなどの所定のフォーマットでYC信号を圧縮し、記録部56は、メモリカードその他の所定の記録媒体に画像データとして記録する。また、記録部56によって記録媒体から読み出された画像データは、圧縮/伸長回路54によって伸長処理された後、液晶モニタ52に出力されるようになっている。   The YC signal temporarily stored in the memory 36 can be displayed on the liquid crystal monitor 52. The compression / decompression circuit 54 compresses the YC signal in a predetermined format such as JPEG, and the recording unit 56 records it as image data on a memory card or other predetermined recording medium. The image data read from the recording medium by the recording unit 56 is decompressed by the compression / decompression circuit 54 and then output to the liquid crystal monitor 52.

操作部40には、モード選択スイッチ、撮影ボタン、メニューキー、OKキー、十字キー、キャンセルキーなどが設けられている。モードスイッチは、被写体を撮影して画像データを記録するための撮影モードと、記録した画像データを再生する再生モードとを切り替えるための操作手段である。撮影ボタンは、撮影開始の指示を入力するための操作手段であり、半押し時にオンするS1スイッチと、全押し時にオンするS2スイッチとを有する二段ストローク式のスイッチで構成されている。メニューキーは、液晶モニタ52の画面上にメニューを表示させる指示を入力するための操作手段である。OKキーは、選択内容の確定及び実行などの指示を入力するための操作手段である。十字キーは、メニュー上の項目の選択などのために上下左右4方向の指示を入力する操作手段である。キャンセルキーは、選択項目や指示内容などの取消の指示を入力する操作手段である。   The operation unit 40 is provided with a mode selection switch, a shooting button, a menu key, an OK key, a cross key, a cancel key, and the like. The mode switch is an operation means for switching between a photographing mode for photographing a subject and recording image data and a reproduction mode for reproducing the recorded image data. The shooting button is an operation means for inputting an instruction to start shooting, and is composed of 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. The menu key is an operation means for inputting an instruction to display a menu on the screen of the liquid crystal monitor 52. The OK key is an operation means for inputting instructions such as confirmation and execution of selection contents. The cross key is an operation means for inputting instructions in four directions, up, down, left, and right for selecting items on the menu. The cancel key is an operation means for inputting a cancellation instruction such as a selection item or instruction content.

図4は、第1の実施の形態の電子カメラにおけるホワイトバランス補正値の算出に関連する部分を示すブロック図である。   FIG. 4 is a block diagram illustrating a portion related to the calculation of the white balance correction value in the electronic camera according to the first embodiment.

主画素積算値算出回路50Pは、CCD14の有効な受光面全体に相当する1画面を複数のエリア(例えば8×8個)に分割し、これらの分割エリアごとに主画素のR,G,B信号をそれぞれ積算し、R,G,B信号別の積算値(「主画素積算値」と称する)を出力する。副画素積算値算出回路50Sは、CCD14の有効な受光面全体に相当する1画面を複数のエリア(例えば8×8個)に分割し、これらの分割エリアごとに副画素のR,G,B信号をそれぞれ積算し、R,G,B信号別の積算値(「副画素積算値」と称する)を出力する。これらの主画素積算値算出回路50P及び副画素積算値算出回路50Sは、図1の積算値算出回路50を構成する。   The main pixel integrated value calculation circuit 50P divides one screen corresponding to the entire effective light receiving surface of the CCD 14 into a plurality of areas (for example, 8 × 8), and R, G, B of the main pixels for each of these divided areas. Each of the signals is integrated, and an integrated value for each R, G, B signal (referred to as “main pixel integrated value”) is output. The sub-pixel integrated value calculation circuit 50S divides one screen corresponding to the entire effective light receiving surface of the CCD 14 into a plurality of areas (for example, 8 × 8), and R, G, B of the sub-pixels for each of these divided areas. Each of the signals is integrated, and an integrated value (referred to as “sub-pixel integrated value”) for each of the R, G, and B signals is output. The main pixel integrated value calculation circuit 50P and the subpixel integrated value calculation circuit 50S constitute the integrated value calculation circuit 50 of FIG.

主画素積算値算出回路50P及び副画素積算値算出回路50Sは、それぞれ、CCD14に発生する暗電流に起因する黒レベルのオフセットを調整するための所定の黒レベル調整値を出力する黒レベル調整値回路(OB回路)502P、502Sと、入力されたR,G,B信号から黒レベル調整値を減算する減算器503P、503Sと、カメラ間のバラツキを調整するための所定の微補正マトリクスゲインを出力する微補正マトリクスゲイン回路504P、504Sと、黒レベル調整後のR,G,B信号に微補正マトリクスゲインを乗算する乗算器505P、505Sと、カメラ間のバラツキが補正されたR,G,B信号について、分割エリアごとにR,G,B信号をそれぞれ積算して、R,G,B信号別の積算値を出力する積算器506P、506Sとを有する。   The main pixel integrated value calculation circuit 50P and the subpixel integrated value calculation circuit 50S each output a black level adjustment value for outputting a predetermined black level adjustment value for adjusting the black level offset caused by the dark current generated in the CCD 14. Circuits (OB circuits) 502P and 502S, subtracters 503P and 503S for subtracting the black level adjustment value from the input R, G and B signals, and a predetermined fine correction matrix gain for adjusting the variation between the cameras. Fine correction matrix gain circuits 504P and 504S to be output, multipliers 505P and 505S for multiplying the R, G and B signals after black level adjustment by the fine correction matrix gain, and R, G, An integrator 506 that integrates the R, G, and B signals for each divided area and outputs an integrated value for each of the R, G, and B signals. , And a 506S.

主画素R/G,B/G算出手段602Pは、分割エリアごとに、主画素のR信号の積算値と主画素のG信号の積算値との比(「主画素R/G」と称する)、及び、主画素のB信号の積算値と主画素のG信号の積算値との比(「主画素B/G」と称する)を算出する。言い換えれば、主画素積算値を、(R,G,B)座標から、(R/G,B/G)座標(「表色座標」ともいう)に変換する。   The main pixel R / G and B / G calculation means 602P has a ratio between the integrated value of the R signal of the main pixel and the integrated value of the G signal of the main pixel (referred to as “main pixel R / G”) for each divided area. And a ratio (referred to as “main pixel B / G”) between the integrated value of the B signal of the main pixel and the integrated value of the G signal of the main pixel. In other words, the main pixel integrated value is converted from (R, G, B) coordinates to (R / G, B / G) coordinates (also referred to as “color coordinates”).

副画素R/G,B/G算出手段602Sは、分割エリアごとに、副画素のR信号の積算値と副画素のG信号の積算値との比(「副画素R/G」と称する)、及び、副画素のB信号の積算値と副画素のG信号の積算値との比(「副画素B/G」と称する)を算出する。言い換えれば、副画素積算値を、(R,G,B)座標から、(R/G,B/G)座標(「表色座標」ともいう)に変換する。   The subpixel R / G and B / G calculation means 602S has a ratio between the integrated value of the R signal of the subpixel and the integrated value of the G signal of the subpixel (referred to as “subpixel R / G”) for each divided area. And the ratio (referred to as “subpixel B / G”) of the integrated value of the B signal of the subpixel and the integrated value of the G signal of the subpixel. In other words, the sub-pixel integrated value is converted from (R, G, B) coordinates to (R / G, B / G) coordinates (also referred to as “color coordinates”).

補正係数算出手段604は、数1に示すように、副画素R/Gを主画素R/Gで除算して第1の感度比aを算出するとともに、副画素B/Gを主画素B/Gで除算して第2の感度比bを算出し、これらの感度比a,bのそれぞれ逆数を第1の補正係数1/a及び第2の補正係数1/bとする。
[数1]
a=(副画素R/G)/(主画素R/G)
b=(副画素B/G)/(主画素B/G)
第1の補正係数1/aは、具体的には、主画素のR信号の出力レベル及び主画素のG信号の出力レベルの差と、副画素のR信号の出力レベル及び副画素のG信号の出力レベルの差との比を示す。また、第2の補正係数1/bは、具体的には、主画素のB信号の出力レベル及び主画素のG信号の出力レベルの差と、副画素のB信号の出力レベル及び副画素のG信号の出力レベルの差との比を示す。
The correction coefficient calculating means 604 calculates the first sensitivity ratio a by dividing the sub-pixel R / G by the main pixel R / G, as shown in Equation 1, and converts the sub-pixel B / G into the main pixel B / G. The second sensitivity ratio b is calculated by dividing by G, and the reciprocals of these sensitivity ratios a and b are set as the first correction coefficient 1 / a and the second correction coefficient 1 / b, respectively.
[Equation 1]
a = (subpixel R / G) / (main pixel R / G)
b = (subpixel B / G) / (main pixel B / G)
Specifically, the first correction coefficient 1 / a is the difference between the output level of the R signal of the main pixel and the output level of the G signal of the main pixel, the output level of the R signal of the sub pixel, and the G signal of the sub pixel. The ratio with the difference in output level. In addition, the second correction coefficient 1 / b is specifically the difference between the output level of the B signal of the main pixel and the output level of the G signal of the main pixel, the output level of the B signal of the sub pixel, and the sub pixel. The ratio with the difference of the output level of G signal is shown.

これらの補正係数1/a及び1/bは、感度比a及びbのそれぞれ逆数であるから、補正係数1/a及び1/bも、主画素の色信号の色間の出力差と副画素の色信号の色間の出力差との比である感度比(ただし主画素/副画素である)を示す。   Since these correction coefficients 1 / a and 1 / b are reciprocals of the sensitivity ratios a and b, the correction coefficients 1 / a and 1 / b are also output differences between the color signals of the main pixel and the sub-pixels. A sensitivity ratio (however, it is a main pixel / sub-pixel) which is a ratio to an output difference between colors of the color signal of FIG.

尚、感度比a、bを算出する際に用いる副画素R/G、主画素R/G、及び、副画素B/G、主画素B/Gは、特定の分割エリア(例えば光源種を示す分割エリア)のものを用いる方法、複数の分割エリア(検出個数が最も多かった検出枠内の複数の分割エリア)のものを積算して用いる方法、1画面内の積算値を用いる方法等がある。   The subpixel R / G, the main pixel R / G, the subpixel B / G, and the main pixel B / G used when calculating the sensitivity ratios a and b are specific division areas (for example, light source types). A method using a plurality of divided areas (a method using a plurality of divided areas (a plurality of divided areas in a detection frame having the largest number of detections)), a method using one integrated value in one screen, and the like. .

主画素ゲイン算出手段606は、主画素R/G,B/G算出手段602Pで算出された主画素R/G及び主画素B/Gに基づいて、主画素のR,G,B信号のホワイトバランスを調整するためのホワイトバランスゲイン(「主画素ゲイン」と称する)を算出する。   The main pixel gain calculation means 606 is a white signal for the R, G, B signals of the main pixel based on the main pixel R / G and the main pixel B / G calculated by the main pixel R / G, B / G calculation means 602P. A white balance gain (referred to as “main pixel gain”) for adjusting the balance is calculated.

この主画素ゲイン算出手段606は、検出枠判別手段6062、重み付け演算手段6064及び光源色補正手段6066を有している。   The main pixel gain calculating unit 606 includes a detection frame determining unit 6062, a weighting calculating unit 6064, and a light source color correcting unit 6066.

検出枠判別手段6062は、横軸をR/G、縦軸をB/Gとした表色座標上で、各分割エリアの積算値に対応する点(R/G,B/G)が、予め決められた複数の検出枠のうち、何れの検出枠内に入るかを判別する。   The detection frame discriminating means 6062 has a point (R / G, B / G) corresponding to the integrated value of each divided area in advance on the color coordinate where the horizontal axis is R / G and the vertical axis is B / G. It is determined which of the plurality of determined detection frames is included in the detection frame.

検出枠の例を図5に示す。図5において、表色座標200における青空検出枠202、日陰検出枠204、曇り検出枠206、昼光色検出枠208、昼白色−白色検出枠210、肌色検出枠212、温白色検出枠214、タングステン灯検出枠216は、光源種ごとに範囲を規定したものである。尚、検出枠の種類や数、範囲等については本例に限定されず、多様な設計が可能である。   An example of the detection frame is shown in FIG. In FIG. 5, the blue sky detection frame 202, the shade detection frame 204, the cloudiness detection frame 206, the daylight color detection frame 208, the daylight white-white detection frame 210, the skin color detection frame 212, the warm white detection frame 214, the tungsten lamp at the color coordinate 200. The detection frame 216 defines a range for each light source type. Note that the type, number, and range of detection frames are not limited to this example, and various designs are possible.

重み付け演算手段6064は、表色座標上の検出枠を用い、撮影画面の各分割エリアにおける各点(例えば8×8個の点)の分布状態を得るとともに、この分布状態と検出枠ごとの重み付けとに基づいて、色味をグレーに合わせるようなゲイン(基本ゲイン)を算出する。   The weighting calculation means 6064 obtains the distribution state of each point (for example, 8 × 8 points) in each divided area of the photographing screen using the detection frame on the color coordinate, and weights each distribution state and the detection frame. Based on the above, a gain (basic gain) that matches the color to gray is calculated.

光源色補正手段6066は、重み付け演算手段6064の演算で求められた基本ゲインに対して光源色の後味を残すための補正を施す。   The light source color correction unit 6066 corrects the basic gain obtained by the calculation of the weighting calculation unit 6064 so as to leave the aftertaste of the light source color.

副画素ゲイン算出手段607は、主画素ゲイン算出手段606で算出された主画素ゲインと補正係数算出手段604で算出された補正係数(1/a、1/b)とに基づいて、副画素の色信号のホワイトバランスを調整するためのホワイトバランスゲイン(「副画素ゲイン」と称する)を算出する。   The sub-pixel gain calculating unit 607 is configured to determine the sub-pixel gain based on the main pixel gain calculated by the main pixel gain calculating unit 606 and the correction coefficients (1 / a, 1 / b) calculated by the correction coefficient calculating unit 604. A white balance gain (referred to as “sub-pixel gain”) for adjusting the white balance of the color signal is calculated.

R,G,B信号別の主画素ゲインをそれぞれ主画素Rg、主画素Gg、主画素Bgとし、R,G,B信号別の副画素ゲインをそれぞれ副画素Rg、副画素Gg、副画素Bgとすると、数式2に示すようにして副画素ゲインが算出される。
[数2]
副画素Rg=主画素Rg×1/a
副画素Gg=主画素Gg
副画素Bg=主画素Bg×1/b
主画素ゲイン算出手段606から出力されたR,G,B信号別の主画素ゲインは、主画素ホワイトバランス補正回路30Pにおいて、主画素のR,G,B信号にそれぞれ乗算される。また、副画素ゲイン算出手段607から出力されたR,G,B信号別の副画素ゲインは、副画素ホワイトバランス補正回路30Sにおいて、副画素のR,G,B信号にそれぞれ乗算される。これらの乗算により主画素のR,G,B信号及び副画素のR,G,B信号のホワイトバランスがそれぞれ調整されるようになっている。
The main pixel gains for the R, G, and B signals are the main pixel Rg, the main pixel Gg, and the main pixel Bg, respectively, and the sub-pixel gains for the R, G, and B signals are the sub-pixel Rg, the sub-pixel Gg, and the sub-pixel Bg, respectively. Then, the subpixel gain is calculated as shown in Equation 2.
[Equation 2]
Subpixel Rg = Main pixel Rg × 1 / a
Sub-pixel Gg = main pixel Gg
Subpixel Bg = Main pixel Bg × 1 / b
The main pixel gain for each of the R, G, and B signals output from the main pixel gain calculation unit 606 is multiplied by the R, G, and B signals of the main pixel in the main pixel white balance correction circuit 30P. Further, the subpixel gain for each R, G, and B signal output from the subpixel gain calculating means 607 is multiplied by the R, G, and B signals of the subpixel in the subpixel white balance correction circuit 30S. By these multiplications, the white balance of the R, G, and B signals of the main pixel and the R, G, and B signals of the sub-pixel are adjusted.

ホワイトバランス補正前の主画素の色信号を主画素R,主画素G,主画素Bとし、ホワイトバランス補正後の主画素の色信号を主画素R'、主画素G'、主画素B'とすると、数3に示すようになる。
[数3]
主画素R'=主画素Rg×主画素R
主画素G'=主画素Gg×主画素G
主画素B'=主画素Bg×主画素B
同様に、ホワイトバランス補正前の副画素の色信号を副画素R,副画素G,副画素Bとし、ホワイトバランス補正後の副画素の色信号を副画素R'、副画素G'、副画素B'とすると、数4に示すようになる。
「数4」
副画素R'=副画素Rg×副画素R
副画素G'=副画素Gg×副画素G
副画素B'=副画素Bg×副画素B
尚、図4において、主画素R/G,B/G算出手段602P、副画素R/G,B/G算出手段602S、補正係数算出手段604、主画素ゲイン算出手段606、及び、副画素ゲイン算出手段607は、CPU60によって構成している。
The main pixel color signals before white balance correction are the main pixel R, main pixel G, and main pixel B, and the main pixel color signals after white balance correction are the main pixel R ′, main pixel G ′, and main pixel B ′. Then, it becomes as shown in Equation 3.
[Equation 3]
Main pixel R ′ = main pixel Rg × main pixel R
Main pixel G ′ = main pixel Gg × main pixel G
Main pixel B ′ = main pixel Bg × main pixel B
Similarly, subpixel R, subpixel G, and subpixel B are color signals of subpixels before white balance correction, and subpixel R ′, subpixel G ′, and subpixel are subpixel color signals after white balance correction. Assuming B ′, the following formula is obtained.
"Equation 4"
Subpixel R ′ = Subpixel Rg × Subpixel R
Subpixel G ′ = Subpixel Gg × Subpixel G
Subpixel B ′ = Subpixel Bg × Subpixel B
In FIG. 4, main pixel R / G, B / G calculation means 602P, sub pixel R / G, B / G calculation means 602S, correction coefficient calculation means 604, main pixel gain calculation means 606, and sub pixel gain. The calculation unit 607 is configured by the CPU 60.

図6は、本実施の形態におけるホワイトバランス調整及び広ダイナミックレンジの色信号生成に関する処理の流れを示すフローチャートである。   FIG. 6 is a flowchart showing the flow of processing relating to white balance adjustment and wide dynamic range color signal generation in the present embodiment.

撮影ボタンが全押しされて撮影が開始されると、主画素1421で光電変換して得られた色信号(主画素R,G,B信号)のホワイトバランス調整処理と、副画素1422で光電変換して得られた色信号(副画素R,G,B信号)のホワイトバランス調整処理とが並行して行われる。   When shooting is started by fully pressing the shooting button, white balance adjustment processing of color signals (main pixel R, G, B signals) obtained by photoelectric conversion in the main pixel 1421 and photoelectric conversion in the sub-pixel 1422 The white balance adjustment processing of the color signals (subpixel R, G, B signals) obtained in this way is performed in parallel.

主画素のホワイトバランス調整では、まず、主画素積算値算出回路50Pによって、分割エリアごとに主画素R,G,B信号がそれぞれ積算され、R,G,B信号別の積算値(主画素積算値)が得られる(S10)。この分割エリアごとの主画素積算値は、(R,G,B)座標から(R/G,B/G)座標(表色座標)に変換される。具体的には、主画素のR信号の積算値と主画素のG信号の積算値との比(主画素R/G)、及び、主画素のB信号の積算値と主画素のG信号の積算値との比(主画素B/G)が算出される(S11)。そして、これらの主画素R/G及び主画素B/Gに基づいて、主画素のR,G,B信号にそれぞれ乗算するR,G,B信号別のホワイトバランスゲイン(主画素ゲイン)が算出される(S16)。算出されたR,G,B信号別の主画素ゲインは、主画素ホワイトバランス補正回路30Pによって、主画素のR,G,B信号に乗算される(S18)。ホワイトバランス補正が施された主画素のR,G,B信号は、ガンマ処理回路32によって、所望のガンマ特性となるように処理が施される(S19)。   In the white balance adjustment of the main pixel, first, the main pixel integrated value calculation circuit 50P integrates the main pixel R, G, B signals for each divided area, and the integrated value for each R, G, B signal (main pixel integrated) Value) is obtained (S10). The main pixel integrated value for each divided area is converted from (R, G, B) coordinates to (R / G, B / G) coordinates (color coordinate). Specifically, the ratio (main pixel R / G) of the integrated value of the R signal of the main pixel and the integrated value of the G signal of the main pixel, and the integrated value of the B signal of the main pixel and the G signal of the main pixel A ratio (main pixel B / G) with the integrated value is calculated (S11). Based on the main pixel R / G and the main pixel B / G, white balance gain (main pixel gain) for each R, G, and B signal to be multiplied by the R, G, and B signals of the main pixel is calculated. (S16). The calculated main pixel gain for each R, G, B signal is multiplied by the R, G, B signal of the main pixel by the main pixel white balance correction circuit 30P (S18). The R, G, B signals of the main pixel subjected to the white balance correction are processed by the gamma processing circuit 32 so as to have a desired gamma characteristic (S19).

副画素のホワイトバランス調整では、まず、副画素積算値算出回路50Sによって、分割エリアごとに副画素R,G,B信号がそれぞれ積算され、R,G,B信号別の積算値(副画素積算値)が得られる(S20)。この分割エリアごとの副画素積算値は、R,G,B座標からR/G,B/G座標(表色座標)に変換される。具体的には、副画素のR信号の積算値と副画素のG信号の積算値との比(副画素R/G)、及び、副画素のB信号の積算値と副画素のG信号の積算値との比(副画素B/G)が算出される(S21)。また、副画素R/Gを主画素R/Gで除算して第1の感度比aが算出されるとともに、副画素B/Gを主画素B/Gで除算して第2の感度比bが算出され、これらの感度比a,bのそれぞれ逆数を第1の補正係数1/a及び第2の補正係数1/bとする(S22)。そして、主画素ゲインに補正係数(1/a及び1/b)を乗算して、副画素ゲインが算出される(S26)。算出された副画素ゲインは、副画素ホワイトバランス補正回路30Sによって、副画素のR,G,B信号に乗算される(S28)。ホワイトバランス補正が施された副画素のR,G,B信号は、ガンマ処理回路32によって、所望のガンマ特性となるように処理が施される(S29)。   In the sub-pixel white balance adjustment, first, the sub-pixel integrated value calculation circuit 50S integrates the sub-pixel R, G, B signals for each divided area, and the integrated value for each R, G, B signal (sub-pixel integrated). Value) is obtained (S20). The sub-pixel integrated value for each divided area is converted from R, G, B coordinates to R / G, B / G coordinates (color coordinate). Specifically, the ratio (subpixel R / G) of the integrated value of the R signal of the subpixel and the integrated value of the G signal of the subpixel, and the integrated value of the B signal of the subpixel and the G signal of the subpixel A ratio (subpixel B / G) to the integrated value is calculated (S21). Further, the first sensitivity ratio a is calculated by dividing the sub-pixel R / G by the main pixel R / G, and the second sensitivity ratio b is obtained by dividing the sub-pixel B / G by the main pixel B / G. The reciprocals of these sensitivity ratios a and b are set as a first correction coefficient 1 / a and a second correction coefficient 1 / b (S22). Then, the main pixel gain is multiplied by the correction coefficient (1 / a and 1 / b) to calculate the sub-pixel gain (S26). The calculated subpixel gain is multiplied by the R, G, and B signals of the subpixel by the subpixel white balance correction circuit 30S (S28). The R, G, B signals of the sub-pixels that have undergone white balance correction are processed by the gamma processing circuit 32 so as to have a desired gamma characteristic (S29).

ホワイトバランス補正及びガンマ処理がそれぞれ施された主画素R,G,B信号と副画素R,G,B信号とは、合成回路33によって合成されて広ダイナミックレンジのR,G,B信号が生成される(S40)。生成された広ダイナミックレンジのR,G,B信号は、YC信号生成回路34によってY,C信号に変換され(S42)、所定の記録媒体に記録される(S44)。   The main pixel R, G, and B signals and the sub-pixel R, G, and B signals that have been subjected to white balance correction and gamma processing are combined by the combining circuit 33 to generate a wide dynamic range R, G, and B signal. (S40). The generated wide dynamic range R, G, B signals are converted into Y, C signals by the YC signal generation circuit 34 (S42) and recorded on a predetermined recording medium (S44).

ここで、主画素ゲイン算出手段606でのホワイトバランスゲイン算出の一例について詳細に説明する。   Here, an example of white balance gain calculation in the main pixel gain calculation unit 606 will be described in detail.

まず、横軸をR/G、縦軸をB/Gとした表色座標上で、各分割エリアが、図5に示すような複数の検出枠のうち、何れの検出枠内に入るかを判別する。具体的には、(R/G,B/G)座標に変換された、分割エリアごとの色信号の積算値が、何れの検出枠内に入るかを判別する。   First, on the color coordinate where the horizontal axis is R / G and the vertical axis is B / G, it is determined in which detection frame each divided area falls within a plurality of detection frames as shown in FIG. Determine. Specifically, it is determined in which detection frame the integrated value of the color signal for each divided area converted into (R / G, B / G) coordinates falls.

次に、数5に示すように、各検出枠(i)について、積算値の平均座標(Σ{(Ri/Gi)/n})を求めるとともに、この平均座標を原点O(1,1)に合わせるための基本ゲイン、即ち色味をグレーに合わせるためのホワイトバランスゲイン(gri及びgbi)を算出する。
[数5]
gri=1/Σ{(Ri/Gi)/n}
gbi=1/Σ{(Bi/Gi)/n}
ここで、nは各検出枠(i)内に入った点の個数(検出個数)である。尚、何れの検出枠にも入らなかった点(積算値)は除外され、検出枠内に入った点の座標(Ri/Gi,Bi/Gi)及び検出個数に基づいて基本ゲインgri,gbiが算出される。
Next, as shown in Equation 5, for each detection frame (i), the average coordinate (Σ {(Ri / Gi) / n}) of the integrated value is obtained, and this average coordinate is set to the origin O (1, 1). The basic gain for matching the color tone, that is, the white balance gain (gri and gbi) for matching the color tone to gray is calculated.
[Equation 5]
gri = 1 / Σ {(Ri / Gi) / n}
gbi = 1 / Σ {(Bi / Gi) / n}
Here, n is the number of points (detected number) that have entered each detection frame (i). Note that points (integrated values) that did not enter any detection frame are excluded, and the basic gains gri and gbi are determined based on the coordinates (Ri / Gi, Bi / Gi) of the points that have entered the detection frame and the number of detections. Calculated.

また、各検出枠内に入った検出個数と予め検出枠ごとに決められた重み付けのための係数とに基づいて、評価値Hiが算出される。具体的には、数6に示すように、検出枠(i)ごとに、明るさ依存係数(0〜1)を検出個数に乗じて、評価値Hiが得られる。
[数6]
Hi=検出個数×明るさ依存係数
そして、数7に示すように、主画素ゲイン(主画素Rg,Gg,Bg)が算出される。
[数7]
主画素Rg=Σ(Txi×gri×Hi)/ΣHi×Σ(Gi×Hi)/ΣHi
主画素Bg=Σ(Tyi×gbi×Hi)/ΣHi×Σ(Gi×Hi)/ΣHi
主画素Gg=Σ(Gi×Hi)/ΣHi
ここで、TxiはR/G軸上での目標値、TyiはB/G軸上での目標値、である。
Further, the evaluation value Hi is calculated based on the number of detections included in each detection frame and a weighting coefficient determined in advance for each detection frame. Specifically, as shown in Equation 6, the evaluation value Hi is obtained by multiplying the number of detections by the brightness dependence coefficient (0 to 1) for each detection frame (i).
[Equation 6]
Hi = detected number × brightness-dependent coefficient Then, as shown in Equation 7, main pixel gains (main pixels Rg, Gg, Bg) are calculated.
[Equation 7]
Main pixel Rg = Σ (Txi × gri × Hi) / ΣHi × Σ (Gi × Hi) / ΣHi
Main pixel Bg = Σ (Tyi × gbi × Hi) / ΣHi × Σ (Gi × Hi) / ΣHi
Main pixel Gg = Σ (Gi × Hi) / ΣHi
Here, Txi is a target value on the R / G axis, and Tyi is a target value on the B / G axis.

さらに光源色の色味を残すための補正(光源色補正)を施す。具体的には、R,G,B信号別のホワイトバランスゲインRg,Bg,Ggのそれぞれに、0から100%までの順応率を乗じて、実際に色信号に乗じる最終のホワイトバランスゲイン(最終ゲイン)が求められる。   Further, correction (light source color correction) for leaving the color of the light source color is performed. Specifically, the white balance gains Rg, Bg, and Gg for each of the R, G, and B signals are multiplied by an adaptation rate from 0 to 100%, and the final white balance gain that is actually multiplied by the color signal (final) Gain).

ここで、図13の表色座標を用いて、本実施の形態におけるホワイトバランス調整の作用について説明する。   Here, the operation of the white balance adjustment in the present embodiment will be described using the color coordinate of FIG.

本来、一対の主画素及び副画素はCCD14の受光面上で略同一位置に配置されているので、同一の分割エリア内での主画素積算値(P点)と副画素積算値(S点)とは、表色座標上で同一の座標となるのが理想である。しかしながら、実際には、一対の主画素及び副画素であっても、光電変換された色信号(R,G,B信号)の色間(RG間、BG間)の出力差が、主画素の色信号と副画素の色信号とで異なっている(即ち感度比が「1」でない)。例えば、主画素及び副画素自体の形態等の相違による違いや、黒レベル調整で生じる違いがある。したがって、図13の表色座標上に示されるように、主画素積算値(P点)と副画素積算値(S点)とはどうしても異なった座標となってしまう。   Originally, since the pair of main pixels and sub-pixels are arranged at substantially the same position on the light receiving surface of the CCD 14, the main pixel integrated value (P point) and sub-pixel integrated value (S point) in the same divided area. Is ideally the same coordinate on the color coordinate. However, in practice, even in the case of a pair of main pixels and sub-pixels, the output difference between colors (between RG and BG) of the color signals (R, G, B signals) subjected to photoelectric conversion is The color signal is different from the color signal of the sub-pixel (that is, the sensitivity ratio is not “1”). For example, there are differences due to differences in the form of the main pixel and sub-pixels themselves, and differences caused by black level adjustment. Therefore, as shown on the color coordinate in FIG. 13, the main pixel integrated value (P point) and the sub pixel integrated value (S point) are inevitably different coordinates.

仮に、原点O(1,1)、即ちグレーに色味を合わせるためのホワイトバランスゲイン(基本ゲイン)を、主画素と副画素とでそれぞれ独立に積算値から求めたとすると、主画素の基本ゲインが直線P−O、副画素の基本ゲインが直線S−Oでそれぞれ表されるから、これらの基本ゲインに光源色の色味を残すための順応率を乗じて求めた最終ゲインで色信号のホワイトバランス補正を行うと、ホワイトバランス補正後の主画素積算値が点P’、副画素積算値が点S’でそれぞれ表されることになる(ただし、ホワイトバランス補正後の主画素積算値及び副画素積算値は実際には算出しない)。これは、光源色の色味を残そうとした場合、主画素の色信号と副画素の色信号とでは、互いに異なる色再現性を持ってしまうことを示している。   If the white balance gain (basic gain) for matching the tone to the origin O (1, 1), that is, gray, is determined from the integrated value independently for the main pixel and the sub-pixel, the basic gain of the main pixel is assumed. Is represented by a straight line PO, and the basic gain of the sub-pixel is represented by a straight line SO, respectively. Therefore, the final gain obtained by multiplying these basic gains by the adaptation rate for leaving the color of the light source color is used. When white balance correction is performed, the main pixel integrated value after white balance correction is represented by point P ′, and the sub-pixel integrated value is represented by point S ′ (however, the main pixel integrated value after white balance correction and The sub-pixel integrated value is not actually calculated). This indicates that when trying to leave the color of the light source color, the color signal of the main pixel and the color signal of the sub-pixel have different color reproducibility.

本実施の形態において、副画素ゲイン(副画素Rg、Gg、Bg)は、主画素ゲイン(主画素Rg、Gg、Bg)に、主画素の色信号(R,G,B信号)の色間(RG間、BG間)の出力差と副画素の色信号(R,G,B信号)の色間(RG間、BG間)の出力差との比である感度比を乗算して求められ、このようにして求められたホワイトバランスゲイン(副画素Rg、Gg、Bg)に従って副画素の色信号のホワイトバランスが調整されるので、副画素の色信号についても主画素の色信号と同様に的確な色再現がされることになる。   In the present embodiment, the sub-pixel gain (sub-pixel Rg, Gg, Bg) is the main pixel gain (main pixel Rg, Gg, Bg) and the color signal between the main pixel color signals (R, G, B signals). It is obtained by multiplying the sensitivity ratio, which is the ratio of the output difference between RG and BG, and the output difference between the color signals (R, G, B signals) of the sub-pixel (between RG and BG). Since the white balance of the color signal of the sub-pixel is adjusted according to the white balance gain (sub-pixels Rg, Gg, Bg) thus obtained, the color signal of the sub-pixel is also the same as the color signal of the main pixel. Accurate color reproduction will be achieved.

(第2の実施の形態) 図7は、第2の実施の形態の電子カメラにおけるホワイトバランス補正値の算出に関連する部分を示すブロック図である。尚、図4に示した第1の実施の形態と同じ部分には同じ符号を付してあり、詳細な説明を省略する。   Second Embodiment FIG. 7 is a block diagram illustrating a portion related to calculation of a white balance correction value in an electronic camera according to a second embodiment. The same parts as those in the first embodiment shown in FIG. 4 are denoted by the same reference numerals, and detailed description thereof is omitted.

図7において、補正係数記憶手段614は、不揮発性メモリによって構成されており、第1の補正係数1/a及び第2の補正係数1/bを予め記憶するものである。これらの補正係数1/a及び1/bは、主画素の色信号(主画素R,G,B信号)の色間(RG間,BG間)の出力差と副画素の色信号(副画素R,G,B)の色間(RG間,BG間)の出力差との比を示す。本実施の形態において、第1の補正係数1/aは、具体的には、主画素のR信号の出力レベル及び主画素のG信号の出力レベルの差と、副画素のR信号の出力レベル及び副画素のG信号の出力レベルの差との比(主画素/副画素である)を示す。また、第2の補正係数1/bは、具体的には、主画素のB信号の出力レベル及び主画素のG信号の出力レベルの差と、副画素のB信号の出力レベル及び副画素のG信号の出力レベルの差との比(主画素/副画素である)を示す。これらの補正係数1/a、1/bは、一般に、シミュレーションの結果や実際の回路での試験結果等に基づいて予め求められて、補正係数記憶手段614に記憶されるようになっている。   In FIG. 7, the correction coefficient storage means 614 is composed of a non-volatile memory, and stores in advance a first correction coefficient 1 / a and a second correction coefficient 1 / b. These correction factors 1 / a and 1 / b are the output difference between colors (between RG and BG) of the color signals of the main pixel (main pixels R, G, B signals) and the color signal of the subpixel (subpixel). R, G, B) is a ratio with the output difference between colors (between RG and BG). In the present embodiment, the first correction coefficient 1 / a is specifically the difference between the output level of the R signal of the main pixel and the output level of the G signal of the main pixel, and the output level of the R signal of the subpixel. And the ratio of the output level difference of the G signal of the sub-pixel (main pixel / sub-pixel). In addition, the second correction coefficient 1 / b is specifically the difference between the output level of the B signal of the main pixel and the output level of the G signal of the main pixel, the output level of the B signal of the sub pixel, and the sub pixel. A ratio (main pixel / sub-pixel) with a difference in output level of the G signal is shown. These correction coefficients 1 / a and 1 / b are generally obtained in advance based on simulation results, test results in an actual circuit, and the like, and are stored in the correction coefficient storage means 614.

第2の実施の形態では、副画素ゲイン算出手段607が、補正係数記憶手段614に記憶された補正係数(1/a、1/b)と、主画素ゲイン算出手段606で算出された主画素の色信号のホワイトバランスを調整するためのホワイトバランスゲイン(主画素ゲイン)とに基づいて、副画素の色信号のホワイトバランスを調整するためのホワイトバランスゲイン(副画素ゲイン)を算出するようになっている。   In the second embodiment, the sub-pixel gain calculation unit 607 has the correction coefficient (1 / a, 1 / b) stored in the correction coefficient storage unit 614 and the main pixel calculated by the main pixel gain calculation unit 606. A white balance gain (sub-pixel gain) for adjusting the white balance of the color signal of the sub-pixel is calculated based on a white balance gain (main pixel gain) for adjusting the white balance of the color signal of the sub-pixel. It has become.

尚、図7において、主画素R/G,B/G算出手段602P、主画素ゲイン算出手段606、及び、副画素ゲイン算出手段607は、CPU60によって構成している。   In FIG. 7, the main pixel R / G and B / G calculation means 602P, the main pixel gain calculation means 606, and the sub-pixel gain calculation means 607 are configured by the CPU 60.

図8は、本実施の形態におけるホワイトバランス調整処理及び広ダイナミックレンジの色信号生成に関する処理の流れを示すフローチャートである。尚、主画素のホワイトバランス調整処理(S10からS19まで)の各ステップは、図6に示す第1の実施の形態における同符号の各ステップと同じであり、詳細な説明を省略する。   FIG. 8 is a flowchart showing the flow of processing relating to white balance adjustment processing and wide dynamic range color signal generation in the present embodiment. Each step of the white balance adjustment process (S10 to S19) of the main pixel is the same as each step of the same sign in the first embodiment shown in FIG. 6, and detailed description thereof is omitted.

副画素のホワイトバランス調整では、補正係数記憶手段614から第1の補正係数1/a及び第2の補正係数1/bが読み出され(S23)、主画素ゲイン算出手段606で算出された主画素ゲインに補正係数を乗算して、副画素ゲインが算出される(S26)。算出された副画素ゲインは、副画素ホワイトバランス補正回路30Sによって、副画素の色信号に乗算される(S28)。   In the white balance adjustment of the sub-pixel, the first correction coefficient 1 / a and the second correction coefficient 1 / b are read from the correction coefficient storage unit 614 (S23), and the main pixel gain calculation unit 606 calculates the main correction factor. The sub-pixel gain is calculated by multiplying the pixel gain by the correction coefficient (S26). The calculated subpixel gain is multiplied by the subpixel color signal by the subpixel white balance correction circuit 30S (S28).

ホワイトバランス補正が施された副画素の色信号は、ガンマ処理回路32によって、所望のガンマ特性となるように処理が施される(S29)。   The color signal of the sub-pixel subjected to the white balance correction is processed by the gamma processing circuit 32 so as to have a desired gamma characteristic (S29).

そして、ホワイトバランス補正及びガンマ処理がそれぞれ施された主画素の色信号と副画素の色信号とは、合成回路33によって合成されて、広ダイナミックレンジの色信号が生成される(S40)。広ダイナミックレンジの色信号は、YC信号生成回路34によって輝度信号(Y信号)及び色差信号(Cr,Cb信号)に変換され(S42)、所定の記録媒体に記録される(S44)。   Then, the color signal of the main pixel and the color signal of the sub-pixel that have been subjected to white balance correction and gamma processing are combined by the combining circuit 33 to generate a wide dynamic range color signal (S40). The wide dynamic range color signal is converted into a luminance signal (Y signal) and a color difference signal (Cr, Cb signal) by the YC signal generation circuit 34 (S42), and recorded on a predetermined recording medium (S44).

(第3の実施の形態) 図9は、第3の実施の形態の電子カメラにおけるホワイトバランスゲイン算出に関連する部分を示すブロック図である。尚、図4に示した第1の実施の形態と同じ部分には同じ符号を付してあり、詳細な説明を省略する。   Third Embodiment FIG. 9 is a block diagram illustrating a portion related to white balance gain calculation in an electronic camera according to a third embodiment. The same parts as those in the first embodiment shown in FIG. 4 are denoted by the same reference numerals, and detailed description thereof is omitted.

図9において、補正係数記憶手段614は、不揮発性メモリによって構成されており、第1の補正係数1/a及び第2の補正係数1/bを予め記憶するものである。これらの補正係数1/a及び1/bは、主画素の色信号(主画素R,G,B)の色間(RG間,BG間)の出力差と副画素の色信号(副画素R,G,B)の色間(RG間,BG間)の出力差との比を示す。本実施の形態において、第1の補正係数1/aは、具体的には、主画素のR信号の出力レベル及び主画素のG信号の出力レベルの差と、副画素のR信号の出力レベル及び副画素のG信号の出力レベルの差との比(ただし主画素/副画素である)を示す。また、第2の補正係数1/bは、具体的には、主画素のB信号の出力レベル及び主画素のG信号の出力レベルの差と、副画素のB信号の出力レベル及び副画素のG信号の出力レベルの差との比(ただし主画素/副画素である)を示す。これらの補正係数1/a、1/bは、一般に、シミュレーションの結果や実際の回路での試験結果等に基づいて予め求められて、補正係数記憶手段614に記憶されるようになっている。   In FIG. 9, the correction coefficient storage means 614 is composed of a non-volatile memory, and stores in advance a first correction coefficient 1 / a and a second correction coefficient 1 / b. These correction factors 1 / a and 1 / b are the output difference between colors (between RG and BG) of the color signals of the main pixel (main pixels R, G, B) and the color signal of the subpixel (subpixel R). , G, B) is a ratio with the output difference between colors (between RG and BG). In the present embodiment, the first correction coefficient 1 / a is specifically the difference between the output level of the R signal of the main pixel and the output level of the G signal of the main pixel, and the output level of the R signal of the subpixel. And the ratio of the output level difference of the G signal of the sub-pixel (however, it is the main pixel / sub-pixel). In addition, the second correction coefficient 1 / b is specifically the difference between the output level of the B signal of the main pixel and the output level of the G signal of the main pixel, the output level of the B signal of the sub pixel, and the sub pixel. A ratio with a difference in output level of the G signal (however, it is a main pixel / sub pixel) is shown. These correction coefficients 1 / a and 1 / b are generally obtained in advance based on simulation results, test results in an actual circuit, and the like, and are stored in the correction coefficient storage means 614.

副画素R/G,B/G補正手段615は、副画素R/G,B/G算出手段602Sによって(R,G,B)座標から(R/G,B/G)座標(表色座標)に変換された副画素積算値(副画素R/G,副画素B/G)を、第1の補正係数1/a及び第2の補正係数1/bに基づいて補正し、主画素積算値(主画素R/G,主画素B/G)に相当する副画素積算値(副画素R/G',副画素B/G')を求めるものである。具体的には、乗算器によって構成されており、数8に示すように、副画素R/G(分割エリアごとの副画素のR信号の積算値と副画素のG信号の積算値との比)に第1の補正係数1/aを乗算して副画素R/G'を求めるとともに、副画素B/G(分割エリアごとの副画素のB信号の積算値と副画素のG信号の積算値との比)に第2の補正係数1/bを乗算して副画素B/G'を求めるようになっている。
[数8]
副画素R/G'=(副画素R/G)×1/a
副画素B/G'=(副画素B/G)×1/b
ホワイトバランスゲイン算出手段616は、第1の実施の形態で説明した検出枠判別手段6062と、重み付け演算手段6064と、光源色補正手段6066とを有する。このホワイトバランスゲイン算出手段616は、主画素R/G(分割エリアごとの主画素のR信号の積算値と主画素のG信号の積算値との比)及び主画素B/G(分割エリアごとの主画素のB信号の積算値と主画素のG信号の積算値との比)に基づいて主画素の色信号(主画素R,G,B)に乗算する主画素ゲイン(主画素Rg,Gg,Bg)を算出するようになっている。また、副画素R/G,B/G補正手段615から出力された副画素R/G'及び副画素B/G'に基づいて副画素ゲイン(副画素Rg,Gg,Bg)を算出するようになっている。ここでの主画素ゲイン(主画素Rg,Gg,Bg)の算出方法は、第1の実施の形態における主画素ゲインの算出方法と同一である。また、副画素ゲイン(副画素Rg,Gg,Bg)の算出方法は、副画素R/G及び副画素B/Gに基づいて算出する点で主画素ゲインの算出方法と異なり、その他は主画素ゲインの算出方法と略同一である。
The subpixel R / G, B / G correction means 615 is operated by the subpixel R / G, B / G calculation means 602S from the (R, G, B) coordinates to the (R / G, B / G) coordinates (color coordinates). ) Converted into a subpixel integrated value (subpixel R / G, subpixel B / G) based on the first correction coefficient 1 / a and the second correction coefficient 1 / b, and the main pixel integration Sub-pixel integrated values (sub-pixel R / G ′, sub-pixel B / G ′) corresponding to the values (main pixel R / G, main pixel B / G) are obtained. Specifically, the subpixel R / G (the ratio of the integrated value of the R signal of the subpixel and the integrated value of the G signal of the subpixel for each divided area is configured by a multiplier. ) Is multiplied by the first correction coefficient 1 / a to obtain the subpixel R / G ′, and the subpixel B / G (the integration value of the B signal of the subpixel and the integration of the G signal of the subpixel for each divided area) The sub-pixel B / G ′ is obtained by multiplying the value by a second correction coefficient 1 / b.
[Equation 8]
Subpixel R / G ′ = (Subpixel R / G) × 1 / a
Subpixel B / G ′ = (Subpixel B / G) × 1 / b
The white balance gain calculation unit 616 includes the detection frame determination unit 6062 described in the first embodiment, a weighting calculation unit 6064, and a light source color correction unit 6066. The white balance gain calculating means 616 includes a main pixel R / G (ratio of an integrated value of the R signal of the main pixel and an integrated value of the G signal of the main pixel for each divided area) and a main pixel B / G (for each divided area). Main pixel gains (main pixels Rg, R), which are multiplied by the color signals (main pixels R, G, B) of the main pixel based on the ratio of the integrated value of the B signal of the main pixel and the integrated value of the G signal of the main pixel Gg, Bg) is calculated. Further, the subpixel gain (subpixels Rg, Gg, Bg) is calculated based on the subpixel R / G ′ and the subpixel B / G ′ output from the subpixel R / G, B / G correction means 615. It has become. The calculation method of the main pixel gain (main pixels Rg, Gg, Bg) here is the same as the calculation method of the main pixel gain in the first embodiment. The sub-pixel gain (sub-pixel Rg, Gg, Bg) calculation method is different from the main pixel gain calculation method in that the sub-pixel gain (sub-pixel Rg, Gg, Bg) is calculated based on the sub-pixel R / G and the sub-pixel B / G. This is substantially the same as the gain calculation method.

副画素ゲイン補正手段618は、ホワイトバランスゲイン算出手段616で算出された副画素ゲイン(副画素Rg,Gg,Bg)を、第1の補正係数1/a及び第2の補正係数1/bに基づいて補正して、主画素と同様な色再現を可能とする副画素ゲイン(副画素Rg',Gg',Bg')を求めるものである。具体的には、乗算器によって構成されており、数9に示すように、副画素Rgに第1の補正係数1/aを乗算して副画素Rg'を求めるとともに、副画素Bgに第2の補正係数1/bを乗算して副画素Bg'を求めるようになっている。尚、副画素Ggには「1」を乗算して(或いは乗算を行わず)副画素Gg'とする。
[数9]
副画素Rg'=副画素Rg×1/a
副画素Gg'=副画素Gg
副画素Bg'=副画素Bg×1/b
ホワイトバランス補正前の主画素の色信号を主画素R,主画素G,主画素Bとし、ホワイトバランス補正回路30によるホワイトバランス補正後の主画素の色信号を主画素R'、主画素G'、主画素B'とすると、数10に示すようになる。
[数10]
主画素R'=主画素Rg×主画素R
主画素G'=主画素Gg×主画素G
主画素B'=主画素Bg×主画素B
また、ホワイトバランス補正前の副画素の色信号を副画素R,副画素G,副画素Bとし、ホワイトバランス補正回路30によるホワイトバランス補正後の副画素の色信号を副画素R'、副画素G'、副画素B'とすると、数11に示すようになる。
[数11]
副画素R'=副画素Rg'×副画素R
副画素G'=副画素Gg'×副画素G
副画素B'=副画素Bg'×副画素B
尚、図9において、主画素R/G,B/G算出手段602P、副画素R/G,B/G算出手段602S、副画素R/G,B/G補正手段615、ホワイトバランスゲイン算出手段616、及び、副画素ゲイン補正手段618は、CPU60によって構成している。
The sub-pixel gain correcting unit 618 converts the sub-pixel gain (sub-pixels Rg, Gg, Bg) calculated by the white balance gain calculating unit 616 into the first correction coefficient 1 / a and the second correction coefficient 1 / b. Based on this correction, sub-pixel gains (sub-pixels Rg ′, Gg ′, Bg ′) that enable color reproduction similar to that of the main pixel are obtained. Specifically, the subpixel Rg is multiplied by the first correction coefficient 1 / a to obtain the subpixel Rg ′ and the subpixel Bg is set to the second as shown in Equation 9. The subpixel Bg ′ is obtained by multiplying the correction coefficient 1 / b. The subpixel Gg is multiplied by “1” (or not multiplied) to obtain a subpixel Gg ′.
[Equation 9]
Subpixel Rg ′ = Subpixel Rg × 1 / a
Subpixel Gg ′ = Subpixel Gg
Subpixel Bg ′ = Subpixel Bg × 1 / b
The main pixel color signals before white balance correction are the main pixel R, main pixel G, and main pixel B, and the main pixel color signals after white balance correction by the white balance correction circuit 30 are the main pixel R ′ and main pixel G ′. Assuming that the main pixel B ′, the following formula 10 is obtained.
[Equation 10]
Main pixel R ′ = main pixel Rg × main pixel R
Main pixel G ′ = main pixel Gg × main pixel G
Main pixel B ′ = main pixel Bg × main pixel B
Also, the sub-pixel color signals before white balance correction are sub-pixel R, sub-pixel G, and sub-pixel B, and the sub-pixel color signals after white balance correction by the white balance correction circuit 30 are sub-pixel R ′ and sub-pixel. Assuming that G ′ and sub-pixel B ′, Equation 11 is obtained.
[Equation 11]
Subpixel R ′ = Subpixel Rg ′ × Subpixel R
Subpixel G ′ = Subpixel Gg ′ × Subpixel G
Subpixel B ′ = Subpixel Bg ′ × Subpixel B
In FIG. 9, main pixel R / G, B / G calculating means 602P, sub pixel R / G, B / G calculating means 602S, sub pixel R / G, B / G correcting means 615, white balance gain calculating means. 616 and the sub-pixel gain correcting unit 618 are configured by the CPU 60.

図10は、本実施の形態におけるホワイトバランス調整処理及び広ダイナミックレンジの色信号生成に関する処理の流れを示すフローチャートである。   FIG. 10 is a flowchart showing the flow of processing relating to white balance adjustment processing and wide dynamic range color signal generation in the present embodiment.

撮影ボタンが全押しされて撮影が開始されると、主画素1421で光電変換して得られた色信号(主画素R,G,B)のホワイトバランス調整処理(S10からS19まで)と、副画素1422で光電変換して得られた色信号(副画素R,G,B)のホワイトバランス調整処理(S20からS29まで)とが並行して行われる。尚、主画素のホワイトバランス調整処理(S10からS19まで)の各ステップは、図6に示す第1の実施の形態における同符号の各ステップと同じであり、詳細な説明を省略する。   When shooting is started by fully pressing the shooting button, white balance adjustment processing (from S10 to S19) of color signals (main pixels R, G, B) obtained by photoelectric conversion in the main pixel 1421, and sub A white balance adjustment process (from S20 to S29) of color signals (subpixels R, G, B) obtained by photoelectric conversion at the pixel 1422 is performed in parallel. Each step of the white balance adjustment process (S10 to S19) of the main pixel is the same as each step of the same sign in the first embodiment shown in FIG. 6, and detailed description thereof is omitted.

副画素のホワイトバランス調整では、まず、副画素積算値算出回路50Sによって、分割エリアごとに、副画素のR,G,B信号別の積算値(副画素積算値)が算出される(S20)。   In the white balance adjustment of the sub-pixel, first, the sub-pixel integrated value calculation circuit 50S calculates an integrated value (sub-pixel integrated value) for each R, G, B signal of the sub-pixel for each divided area (S20). .

次に、分割エリアごとに、副画素のR信号の積算値と副画素のG信号の積算値との比(副画素R/G)、及び、副画素のB信号の積算値と副画素のG信号の積算値との比(副画素B/G)が算出される(S21)。   Next, for each divided area, the ratio (subpixel R / G) of the integrated value of the R signal of the subpixel and the integrated value of the G signal of the subpixel, and the integrated value of the B signal of the subpixel and the subpixel A ratio (subpixel B / G) with the integrated value of the G signal is calculated (S21).

ここで、補正係数記憶手段614から第1の補正係数1/a及び第2の補正係数1/bが読み出され(S23)、前記数8に示されるように、副画素R/Gに第1の補正係数1/aを乗算して副画素R/G'を求めるとともに、副画素B/Gに第2の補正係数1/bを乗算して副画素B/G'を求める(S24)。   Here, the first correction coefficient 1 / a and the second correction coefficient 1 / b are read out from the correction coefficient storage means 614 (S23), and as shown in the equation 8, the first correction coefficient 1 / a and the second correction coefficient 1 / b are stored in the subpixel R / G. The sub-pixel R / G ′ is obtained by multiplying the correction coefficient 1 / a by 1, and the sub-pixel B / G ′ is obtained by multiplying the sub-pixel B / G by the second correction coefficient 1 / b (S24). .

このような乗算により得られた副画素R/G',B/G'に基づいて、副画素ゲイン(副画素Rg、Gg、 Bg)が算出される(S26)。   Based on the sub-pixels R / G ′ and B / G ′ obtained by such multiplication, sub-pixel gains (sub-pixels Rg, Gg, Bg) are calculated (S26).

ここで、前記数9に示されるように、副画素Rgに第1の補正係数1/aを乗算して副画素Rg'を求めるとともに、副画素Bgに第2の補正係数1/bを乗算して副画素Bg'を求める(S27)。尚、副画素Ggには「1」を乗算して(或いは乗算を行わず)副画素Gg'とする。   Here, as shown in Equation 9, the sub-pixel Rg is multiplied by the first correction coefficient 1 / a to obtain the sub-pixel Rg ′, and the sub-pixel Bg is multiplied by the second correction coefficient 1 / b. Then, the sub-pixel Bg ′ is obtained (S27). The subpixel Gg is multiplied by “1” (or not multiplied) to obtain a subpixel Gg ′.

このような乗算により得られた副画素ゲイン(副画素Rg'、Gg'、 Bg')は、副画素ホワイトバランス補正回路30Sによって、前記数11に示されるように副画素の色信号(副画素R、G、B)に乗算される(S28)。   Sub-pixel gains (sub-pixels Rg ′, Gg ′, Bg ′) obtained by such multiplication are sub-pixel color signals (sub-pixels) by the sub-pixel white balance correction circuit 30S as shown in Equation 11 above. R, G, B) is multiplied (S28).

ホワイトバランス補正が施された副画素の色信号(副画素R',G',B')は、ガンマ処理回路32によって、所望のガンマ特性となるように処理が施される(S29)。   The sub-pixel color signals (sub-pixels R ′, G ′, B ′) subjected to the white balance correction are processed by the gamma processing circuit 32 so as to have a desired gamma characteristic (S29).

そして、ホワイトバランス補正及びガンマ処理がそれぞれ施された主画素の色信号と副画素の色信号とは、合成回路33によって合成されて、広ダイナミックレンジの色信号が生成される(S40)。広ダイナミックレンジの色信号は、YC信号生成回路34によって輝度信号(Y信号)及び色差信号(Cr,Cb信号)に変換され(S42)、所定の記録媒体に記録される(S44)。   Then, the color signal of the main pixel and the color signal of the sub-pixel that have been subjected to white balance correction and gamma processing are combined by the combining circuit 33 to generate a wide dynamic range color signal (S40). The wide dynamic range color signal is converted into a luminance signal (Y signal) and a color difference signal (Cr, Cb signal) by the YC signal generation circuit 34 (S42), and recorded on a predetermined recording medium (S44).

ここで、図13の表色座標を用いて、本実施の形態におけるホワイトバランス調整の作用について説明する。   Here, the operation of the white balance adjustment in the present embodiment will be described using the color coordinate of FIG.

本来、一対の主画素及び副画素はCCD14の受光面上で略同一位置に配置されているので、同一の分割エリア内での主画素積算値(P点)と副画素積算値(S点)とは、表色座標上で同一の座標となるのが理想である。しかしながら、実際には、一対の主画素及び副画素であっても、光電変換された色信号(R,G,B信号)の色間(RG間、BG間)の出力差が、主画素の色信号と副画素の色信号とで異なっている(即ち感度比が「1」でない)。例えば、主画素及び副画素自体の形態等の相違による違いや、黒レベル調整で生じる違いがある。したがって、図13の表色座標上に示されるように、主画素積算値(P点)と副画素積算値(S点)とはどうしても異なった座標となってしまう。   Originally, since the pair of main pixels and sub-pixels are arranged at substantially the same position on the light receiving surface of the CCD 14, the main pixel integrated value (P point) and sub-pixel integrated value (S point) in the same divided area. Is ideally the same coordinate on the color coordinate. However, in practice, even in the case of a pair of main pixels and sub-pixels, the output difference between colors (between RG and BG) of the color signals (R, G, B signals) subjected to photoelectric conversion is The color signal is different from the color signal of the sub-pixel (that is, the sensitivity ratio is not “1”). For example, there are differences due to differences in the form of the main pixel and sub-pixels themselves, and differences caused by black level adjustment. Therefore, as shown on the color coordinate in FIG. 13, the main pixel integrated value (P point) and the sub pixel integrated value (S point) are inevitably different coordinates.

仮に、原点O(1,1)、即ちグレーに色味を合わせるためのホワイトバランスゲイン(基本ゲイン)を、主画素と副画素とでそれぞれ独立に積算値から求めたとすると、主画素の基本ゲインが直線P−O、副画素の基本ゲインが直線S−Oでそれぞれ表されるから、これらの基本ゲインに光源色の色味を残すための順応率を乗じて求めた最終ゲインで色信号のホワイトバランス補正を行うと、ホワイトバランス補正後の主画素積算値が点P’、副画素積算値が点S’でそれぞれ表されることになる。これは、光源色の色味を残そうとした場合、主画素の色信号と副画素の色信号とでは、互いに異なる色再現性を持ってしまうことを示している。   If the white balance gain (basic gain) for matching the tone to the origin O (1, 1), that is, gray, is determined from the integrated value independently for the main pixel and the sub-pixel, the basic gain of the main pixel is assumed. Is represented by a straight line PO, and the basic gain of the sub-pixel is represented by a straight line SO, respectively. Therefore, the final gain obtained by multiplying these basic gains by the adaptation rate for leaving the color of the light source color is used. When white balance correction is performed, the main pixel integrated value after white balance correction is represented by a point P ′, and the sub-pixel integrated value is represented by a point S ′. This indicates that when trying to leave the color of the light source color, the color signal of the main pixel and the color signal of the sub-pixel have different color reproducibility.

そこで、本実施の形態においては、主画素の色信号(R,G,B信号)の色間(RG間、BG間)の出力差と副画素の色信号(R,G,B信号)の色間(RG間、BG間)の出力差との比である感度比を、副画素積算値(S点)に乗算して副画素積算値を補正することにより、主画素積算値(P点)に相当する副画素積算値が得られる。この副画素積算値の補正は、図13では第1の矢印305に相当する。   Therefore, in the present embodiment, the output difference between the color signals (R, G, B signals) of the main pixel (between RG and BG) and the color signal (R, G, B signal) of the subpixels. The main pixel integrated value (P point) is obtained by correcting the sub pixel integrated value by multiplying the sub pixel integrated value (S point) by the sensitivity ratio, which is the ratio of the output difference between colors (between RG and BG). ) Is obtained. This correction of the subpixel integrated value corresponds to the first arrow 305 in FIG.

ここで、仮に、この補正された副画素積算値を用いて副画素ゲインを算出し、この副画素ゲインそのままで副画素の色信号を補正したとすると、過補正となってしまうことになる。即ち、副画素の基本ゲインが直線S−O’で表されるから、光源色の色味を残すための順応率を乗じて求めた最終ゲインで副画素の色信号のホワイトバランス補正を行うと、ホワイトバランス補正後の副画素積算値が点S”で表されることになり、ホワイトバランス補正後の主画素積算値の点P’と異なってしまう。   Here, if the sub-pixel gain is calculated using the corrected sub-pixel integrated value and the color signal of the sub-pixel is corrected with the sub-pixel gain as it is, overcorrection will occur. That is, since the basic gain of the sub-pixel is represented by the straight line SO ′, when the white balance correction of the color signal of the sub-pixel is performed with the final gain obtained by multiplying the adaptation rate for leaving the color of the light source color. Thus, the subpixel integrated value after white balance correction is represented by a point S ″, which is different from the point P ′ of the main pixel integrated value after white balance correction.

そこで、本実施の形態においては、主画素の色信号(R,G,B信号)の色間(RG間、BG間)の出力差と副画素の色信号(R,G,B信号)の色間(RG間、BG間)の出力差との比である感度比を、補正後の副画素積算値に基づいて求めた副画素の最終ゲインに乗じる。これにより、ホワイトバランス補正後、副画素積算値が表色座標上で主画素積算値(点P’)に相当する座標に移動することになる(ただし、ホワイトバランス補正後の主画素積算値及び副画素積算値は実際には算出されない)。この副画素ゲインの補正は、図13では第2の矢印308に相当する。これは、光源色の色味を残すようなホワイトバランス補正を行った場合であっても、主画素の色信号と副画素の色信号とで、同じ色再現性になることを示している。   Therefore, in the present embodiment, the output difference between colors (between RG and BG) of the color signals (R, G, B signals) of the main pixel and the color signals (R, G, B signals) of the sub-pixels. The sensitivity ratio, which is the ratio of the output difference between colors (between RG and BG), is multiplied by the final gain of the subpixel determined based on the corrected subpixel integrated value. Thereby, after the white balance correction, the sub-pixel integrated value moves to the coordinate corresponding to the main pixel integrated value (point P ′) on the color coordinate (however, the main pixel integrated value after white balance correction and The sub-pixel integrated value is not actually calculated). This correction of the sub-pixel gain corresponds to the second arrow 308 in FIG. This indicates that the same color reproducibility is obtained for the color signal of the main pixel and the color signal of the sub-pixel even when white balance correction is performed so as to leave the color of the light source color.

(第4の実施の形態) 図11は、第4の実施の形態の電子カメラにおけるホワイトバランスゲイン算出に関連する部分を示すブロック図である。尚、図9に示した第3の実施の形態と同じ部分には同じ符号を付してあり、詳細な説明を省略する。   Fourth Embodiment FIG. 11 is a block diagram illustrating a portion related to white balance gain calculation in an electronic camera according to a fourth embodiment. The same parts as those in the third embodiment shown in FIG. 9 are denoted by the same reference numerals, and detailed description thereof is omitted.

図11において、補正係数算出手段604は、主画素R/G及びB/Gと副画素R/G及びB/Gとに基づいて補正係数1/a及び1/bを算出する。この補正係数算出手段604は、第1の実施の形態における補正係数算出手段604と同様である。   In FIG. 11, the correction coefficient calculation means 604 calculates correction coefficients 1 / a and 1 / b based on main pixels R / G and B / G and subpixels R / G and B / G. This correction coefficient calculation means 604 is the same as the correction coefficient calculation means 604 in the first embodiment.

尚、図11において、主画素R/G,B/G算出手段602P、副画素R/G,B/G算出手段602S、補正係数算出手段604、ホワイトバランスゲイン算出手段616、及び、副画素ゲイン補正手段618は、CPU60によって構成している。   In FIG. 11, main pixel R / G, B / G calculation means 602P, subpixel R / G, B / G calculation means 602S, correction coefficient calculation means 604, white balance gain calculation means 616, and subpixel gain. The correcting unit 618 is configured by the CPU 60.

図12は、本実施の形態におけるホワイトバランス調整処理及び広ダイナミックレンジの色信号生成に関する処理の流れを示すフローチャートである。尚、主画素のホワイトバランス調整処理(S10からS19まで)の各ステップは、図10に示す第3の実施の形態における同符号の各ステップと同じであり、詳細な説明を省略する。   FIG. 12 is a flowchart showing a flow of processing relating to white balance adjustment processing and wide dynamic range color signal generation according to the present embodiment. Each step of the main pixel white balance adjustment processing (S10 to S19) is the same as each step of the same reference numeral in the third embodiment shown in FIG. 10, and detailed description thereof is omitted.

副画素のホワイトバランス調整では、まず、副画素積算値算出回路50Sによって、分割エリアごとに、副画素のR,G,B信号別の積算値(副画素積算値)が算出され(S20)、副画素のR信号の積算値と副画素のG信号の積算値との比(副画素R/G)、及び、副画素のB信号の積算値と副画素のG信号の積算値との比(副画素B/G)が算出される(S21)。   In the white balance adjustment of the sub-pixel, first, the sub-pixel integrated value calculation circuit 50S calculates the integrated value (sub-pixel integrated value) for each R, G, B signal of the sub-pixel for each divided area (S20). The ratio between the integrated value of the R signal of the subpixel and the integrated value of the G signal of the subpixel (subpixel R / G), and the ratio of the integrated value of the B signal of the subpixel and the integrated value of the G signal of the subpixel (Subpixel B / G) is calculated (S21).

ここで、副画素R/Gを主画素R/G(主画素のR信号の積算値と主画素のG信号の積算値との比)で除算して感度比aが算出されるとともに、副画素B/Gを主画素B/G(主画素のB信号の積算値と主画素のG信号の積算値との比)で除算して感度比bが算出され、これらの感度比a,bのそれぞれ逆数を第1の補正係数1/a及び第2の補正係数1/bとする(S22)。   Here, the sub-pixel R / G is divided by the main pixel R / G (ratio of the integrated value of the R signal of the main pixel and the integrated value of the G signal of the main pixel) to calculate the sensitivity ratio a, and The sensitivity ratio b is calculated by dividing the pixel B / G by the main pixel B / G (the ratio between the integrated value of the B signal of the main pixel and the integrated value of the G signal of the main pixel), and the sensitivity ratios a, b Are the first correction coefficient 1 / a and the second correction coefficient 1 / b (S22).

そして、副画素R/Gに第1の補正係数1/aを乗算して副画素R/G'を求めるとともに、副画素B/Gに第2の補正係数1/bを乗算して副画素B/G'を求める(S24)。   Then, the sub-pixel R / G is multiplied by the first correction coefficient 1 / a to obtain the sub-pixel R / G ′, and the sub-pixel B / G is multiplied by the second correction coefficient 1 / b to obtain the sub-pixel. B / G ′ is obtained (S24).

このような乗算により得られた副画素R/G',B/G'に基づいて、副画素ゲイン(副画素Rg、Gg、 Bg)が算出される(S26)。   Based on the sub-pixels R / G ′ and B / G ′ obtained by such multiplication, sub-pixel gains (sub-pixels Rg, Gg, Bg) are calculated (S26).

ここで、副画素Rgに第1の補正係数1/aを乗算して副画素Rg'を求めるとともに、副画素Bgに第2の補正係数1/bを乗算して副画素Bg'を求める(S27)。尚、副画素Ggには「1」を乗算し(或いは乗算を行わず)副画素Gg'とする。   Here, the subpixel Rg ′ is obtained by multiplying the subpixel Rg by the first correction coefficient 1 / a, and the subpixel Bg ′ is obtained by multiplying the subpixel Bg by the second correction coefficient 1 / b ( S27). The subpixel Gg is multiplied by “1” (or not multiplied) to obtain a subpixel Gg ′.

このような乗算により得られた副画素ゲイン(副画素Rg'、Gg'、 Bg')は、副画素ホワイトバランス補正回路30Sによって副画素の色信号(副画素R、G、B)に乗算される(S28)。   The subpixel gains (subpixels Rg ′, Gg ′, Bg ′) obtained by such multiplication are multiplied by the subpixel color signals (subpixels R, G, B) by the subpixel white balance correction circuit 30S. (S28).

ホワイトバランス補正が施された副画素のR,G,B信号は、ガンマ処理回路32によって、所望のガンマ特性となるように処理が施される(S29)。   The R, G, B signals of the sub-pixels that have undergone white balance correction are processed by the gamma processing circuit 32 so as to have a desired gamma characteristic (S29).

そして、ホワイトバランス補正及びガンマ処理がそれぞれ施された主画素の色信号と副画素の色信号とは、合成回路33によって合成されて、広ダイナミックレンジの色信号が生成される(S40)。広ダイナミックレンジの色信号は、YC信号生成回路34によって輝度信号(Y信号)及び色差信号(Cr,Cb信号)に変換され(S42)、所定の記録媒体に記録される(S44)。   Then, the color signal of the main pixel and the color signal of the sub-pixel that have been subjected to white balance correction and gamma processing are combined by the combining circuit 33 to generate a wide dynamic range color signal (S40). The wide dynamic range color signal is converted into a luminance signal (Y signal) and a color difference signal (Cr, Cb signal) by the YC signal generation circuit 34 (S42), and recorded on a predetermined recording medium (S44).

尚、前述の第1から第4の実施の形態では、1画面を複数の分割エリアに分割して色信号の積算値を算出し、これらの積算値に基づいてホワイトバランス補正値を算出する例について説明したが、本発明はこれに限るものではない。また、例えば1画面全体の積算値を算出し、この1画面の積算値に基づいてホワイトバランス補正値を算出するような態様にも適用可能である。また、例えば、画素ごとの色信号に基づいて、直接、ホワイトバランス補正値を算出するような態様にも適用可能である。   In the above-described first to fourth embodiments, an example in which one screen is divided into a plurality of divided areas to calculate an integrated value of color signals and a white balance correction value is calculated based on these integrated values. However, the present invention is not limited to this. Further, for example, the present invention can also be applied to a mode in which an integrated value of one entire screen is calculated and a white balance correction value is calculated based on the integrated value of this one screen. Further, for example, the present invention can be applied to a mode in which the white balance correction value is directly calculated based on the color signal for each pixel.

また、積算値をそのまま用いるのではなく、積算値を分割エリア内の画素数で除算して得た画素あたりの値(平均値)を用いるようにしてもよい。即ち、本発明の積算値は積算値から求めた平均値を含む。   Further, instead of using the integrated value as it is, a value (average value) per pixel obtained by dividing the integrated value by the number of pixels in the divided area may be used. That is, the integrated value of the present invention includes an average value obtained from the integrated value.

また、表色座標が(R/G,B/G)座標である場合を例に説明したが、これと異なる座標系を用いてホワイトバランス補正値を算出してもよい。   Further, although the case where the color coordinate is an (R / G, B / G) coordinate has been described as an example, the white balance correction value may be calculated using a different coordinate system.

また、色信号に最終的に乗算する最終ゲインを光源色に応じて求める場合を例に説明したが、本発明はこれに限るものではない。例えば、操作手段で順応率をマニュアルで入力し、この入力された順応率に応じて最終ゲインを求めるようにしてもよい。   Further, the case where the final gain to be finally multiplied by the color signal is obtained according to the light source color has been described as an example, but the present invention is not limited to this. For example, the adaptation rate may be manually input by the operating means, and the final gain may be obtained according to the input adaptation rate.

また、本発明のホワイトバランス調整方法は、オートホワイトバランス調整に限らず、マニュアルのホワイトバランス調整に適用してもよい。   The white balance adjustment method of the present invention is not limited to automatic white balance adjustment, and may be applied to manual white balance adjustment.

また、本発明において、ホワイトバランス算出の際に感度比を「乗算する」とは、実質的に乗算することを示し、感度比の分母と分子の関係によっては、「除算する」場合も含むことは言うまでもない。また、対数表現であれば「加算(或いは減算)する」場合を含むことも言うまでもない。   In the present invention, “multiplying” the sensitivity ratio when calculating the white balance means substantially multiplying, and includes the case of “dividing” depending on the relationship between the denominator and the numerator of the sensitivity ratio. Needless to say. Needless to say, logarithmic expression includes a case of “adding (or subtracting)”.

また、本発明のホワイトバランス調整方法は、プログラムによって全てCPUに各ステップを実行させるようにしてもよい。   In the white balance adjustment method of the present invention, all steps may be executed by the CPU by a program.

本発明を適用した電子カメラの内部構成を示すブロック図The block diagram which shows the internal structure of the electronic camera to which this invention is applied 主画素及び副画素を有したカラー撮像素子の例を示す構成図The block diagram which shows the example of the color image pick-up element which has the main pixel and the subpixel 主画素の色信号と副画素の色信号との合成の説明に用いる図The figure used for explanation of composition of the color signal of the main pixel and the color signal of the sub-pixel 第1の実施の形態におけるホワイトバランス補正値算出に関する構成の例を示すブロック図The block diagram which shows the example of the structure regarding the white balance correction value calculation in 1st Embodiment 検出枠の説明に用いる表色座標図Color coordinate diagram used to describe the detection frame 第1の実施の形態におけるホワイトバランス調整処理の説明に用いるフローチャートFlowchart used to explain white balance adjustment processing in the first embodiment 第2の実施の形態におけるホワイトバランス補正値算出に関する構成の例を示すブロック図The block diagram which shows the example of the structure regarding the white balance correction value calculation in 2nd Embodiment 第2の実施の形態におけるホワイトバランス調整処理の説明に用いるフローチャートFlowchart used to explain white balance adjustment processing in the second embodiment 第3の実施の形態におけるホワイトバランス補正値算出に関する構成の例を示すブロック図The block diagram which shows the example of the structure regarding the white balance correction value calculation in 3rd Embodiment 第3の実施の形態におけるホワイトバランス調整処理の説明に用いるフローチャートFlowchart used to explain white balance adjustment processing in the third embodiment 第4の実施の形態におけるホワイトバランス補正値算出に関する構成の例を示すブロック図The block diagram which shows the example of the structure regarding the white balance correction value calculation in 4th Embodiment 第4の実施の形態におけるホワイトバランス調整処理の説明に用いるフローチャートFlowchart used to explain white balance adjustment processing in the fourth embodiment ホワイトバランス調整処理の説明に用いる表色座標Color coordinates used to explain white balance adjustment processing

符号の説明Explanation of symbols

10…撮影レンズ、12…絞り、14…CCD(カラー撮像素子)、18…相関二重サンプリング回路、20…A/D変換器、28…同時化回路、30P…主画素ホワイトバランス補正回路、30S…副画素ホワイトバランス補正回路、32…ガンマ処理回路、33…合成回路、34…YC信号生成回路、40…操作部、50P…主画素積算値算出回路、50S…副画素積算値算出回路、54…圧縮/伸長回路、56…記録部、60…CPU、602P…主画素R/G,B/G算出手段、602S…副画素R/G,B/G算出手段、604…補正係数算出手段、606…主画素ゲイン算出手段、607…副画素ゲイン算出手段、614…補正係数記憶手段、615…副画素R/G,B/G補正手段、618…副画素ゲイン補正手段   DESCRIPTION OF SYMBOLS 10 ... Shooting lens, 12 ... Aperture, 14 ... CCD (color image sensor), 18 ... Correlated double sampling circuit, 20 ... A / D converter, 28 ... Synchronization circuit, 30P ... Main pixel white balance correction circuit, 30S ... subpixel white balance correction circuit, 32 ... gamma processing circuit, 33 ... composition circuit, 34 ... YC signal generation circuit, 40 ... operation unit, 50P ... main pixel integrated value calculation circuit, 50S ... subpixel integrated value calculation circuit, 54 ... compression / decompression circuit, 56 ... recording unit, 60 ... CPU, 602P ... main pixel R / G, B / G calculation means, 602S ... sub-pixel R / G, B / G calculation means, 604 ... correction coefficient calculation means, 606 ... main pixel gain calculating means, 607 ... subpixel gain calculating means, 614 ... correction coefficient storage means, 615 ... subpixel R / G, B / G correcting means, 618 ... subpixel gain correcting means

Claims (6)

高感度の色信号と低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する際のホワイトバランス調整方法において、
高感度の色信号に基づいて第1のホワイトバランス補正値を求めるステップと、
前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正するステップと、
前記高感度の色信号の色間の出力差と前記低感度の色信号の色間の比である感度比を、前記第1のホワイトバランス補正値に乗算して第2のホワイトバランス補正値を求めるステップと、
前記第2のホワイトバランス補正値に従って前記低感度の色信号を補正するステップと、
を含むホワイトバランス調整方法。
In the white balance adjustment method when generating a wide dynamic range color signal based on the high sensitivity color signal and the low sensitivity color signal,
Obtaining a first white balance correction value based on a highly sensitive color signal;
Correcting the high-sensitivity color signal according to the first white balance correction value;
The second white balance correction value is obtained by multiplying the first white balance correction value by a sensitivity ratio which is a ratio between the output difference between the colors of the high sensitivity color signal and the color of the low sensitivity color signal. Seeking steps,
Correcting the low-sensitivity color signal according to the second white balance correction value;
White balance adjustment method including
高感度の色信号と該低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する際のホワイトバランス調整方法において、
記色信号に基づいてR,G,Bの各色信号の積算値の第1の比R/G,B/Gを求めるステップと、
前記第1の比R/G,B/Gに基づいて第1のホワイトバランス補正値を求めるステップと、
前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正するステップと、
前記低感度の色信号に基づいてR,G,Bの各色信号の積算値の第2の比R/G,B/Gを求めるステップと、
前記高感度の色信号と前記低感度の色信号との比である感度比を前記第2の比R/G,B/Gに乗算して前記第1の比R/G,B/Gに相当する第3の比R/G,B/Gを求めるステップと、
前記第3の比R/G,B/Gに基づいて前記第1のホワイトバランス補正値に相当する第2のホワイトバランス補正値を求めるステップと、
前記感度比を前記第2のホワイトバランス補正値に乗算して第3のホワイトバランス補正値を求めるステップと、
前記第3のホワイトバランス補正値に従って前記低感度の色信号を補正するステップと、
を含むホワイトバランス調整方法。
In a white balance adjustment method when generating a wide dynamic range color signal based on a high-sensitivity color signal and the low-sensitivity color signal,
A step of obtaining R, G, the first ratio R / G of the integrated values of the color signals of B, and B / G based on the previous SL color signals,
Obtaining a first white balance correction value based on the first ratios R / G, B / G;
Correcting the high-sensitivity color signal according to the first white balance correction value;
Obtaining a second ratio R / G, B / G of integrated values of the R, G, B color signals based on the low sensitivity color signal;
The high sensitivity of the a No. Iroshin the sensitivity ratio is the ratio of the No. Iroshin the low sensitivity second ratio R / G, B / the by multiplying G first ratio R / G, B / Obtaining a third ratio R / G, B / G corresponding to G;
Obtaining a second white balance correction value corresponding to the first white balance correction value based on the third ratio R / G, B / G;
Multiplying the second white balance correction value by the sensitivity ratio to obtain a third white balance correction value;
Correcting the low-sensitivity color signal according to the third white balance correction value;
White balance adjustment method including
前記感度比を予め記憶した記憶手段から該感度比を読み出すステップを更に含む請求項1又は2に記載のホワイトバランス調整方法。   The white balance adjustment method according to claim 1, further comprising a step of reading the sensitivity ratio from a storage unit that stores the sensitivity ratio in advance. 前記感度比を前記高感度の色信号及び前記低感度の色信号に基づいて算出するステップを更に含む請求項1又は2に記載のホワイトバランス調整方法。 The white balance adjustment method according to claim 1, further comprising a step of calculating the sensitivity ratio based on the high-sensitivity color signal and the low-sensitivity color signal. 高感度の色信号と低感度の色信号とをもち、
高感度の色信号に基づいて第1のホワイトバランス補正値を求める手段と、
前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正する手段と、
前記高感度の色信号と前記低感度の色信号との比である感度比を前記第1のホワイトバランス補正値に乗算して第2のホワイトバランス補正値を求める手段と、
前記第2のホワイトバランス補正値に従って前記低感度の色信号を補正する手段と、
前記補正された高感度の色信号と該高感度に対応する位置の補正された低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する手段と、
を備えたことを特徴とするカメラ。
It has a high-sensitivity color signal and a low-sensitivity color signal,
Means for obtaining a first white balance correction value based on a high-sensitivity color signal;
Means for correcting the high-sensitivity color signal in accordance with the first white balance correction value;
It means for obtaining a second white balance correction value the sensitivity ratio is the ratio of the No. Iroshin of the low sensitivity and No. Iroshin by multiplying the first white balance correction value of the high sensitivity,
Means for correcting the low-sensitivity color signal according to the second white balance correction value;
It means for generating a color signal of wide dynamic range on the basis of the color signal corrected low-sensitivity position corresponding to the color signals and the high sensitivity of the corrected sensitivity,
A camera characterized by comprising
高感度の色信号と低感度の色信号とをもち、
高感度の色信号に基づいてR,G,Bの各色信号の積算値の第1の比R/G,B/Gを求める手段と、
該第1の比R/G,B/Gに基づいて第1のホワイトバランス補正値を求める手段と、
前記第1のホワイトバランス補正値に従って前記高感度の色信号を補正する手段と、
低感度の色信号に基づいてR,G,Bの各色信号の積算値の第2の比R/G,B/Gを求める手段と、
前記高感度の色信号と前記低感度の色信号との比である感度比を前記第2の比R/G,B/Gに乗算して前記第1の比R/G,B/Gに相当する第3の比R/G,B/Gを求める手段と、
前記第3の比R/G,B/Gに基づいて前記第1のホワイトバランス補正値に相当する第2のホワイトバランス補正値を求める手段と、
前記感度比を前記第2のホワイトバランス補正値に乗算して第3のホワイトバランス補正値を求める手段と、
前記第3のホワイトバランス補正値に従って前記低感度の色信号を補正する手段と、
前記補正された高感度の色信号と該高感度に対応する低感度の色信号とに基づいて広ダイナミックレンジの色信号を生成する手段と、
を備えたことを特徴とするカメラ。
It has a high-sensitivity color signal and a low-sensitivity color signal,
Means for obtaining a first ratio R / G, B / G of integrated values of the R, G, B color signals based on the highly sensitive color signal;
Means for obtaining a first white balance correction value based on the first ratios R / G and B / G;
Means for correcting the high-sensitivity color signal in accordance with the first white balance correction value;
Means for obtaining a second ratio R / G, B / G of integrated values of the R, G, B color signals based on the low sensitivity color signal;
The high sensitivity of the a No. Iroshin the sensitivity ratio is the ratio of the No. Iroshin the low sensitivity second ratio R / G, B / the by multiplying G first ratio R / G, B / Means for obtaining a third ratio R / G, B / G corresponding to G;
Means for obtaining a second white balance correction value corresponding to the first white balance correction value based on the third ratios R / G and B / G;
Means for multiplying the second white balance correction value by the sensitivity ratio to obtain a third white balance correction value;
Means for correcting the low-sensitivity color signal according to the third white balance correction value;
It means for generating a color signal of wide dynamic range on the basis of the color signal of the low sensitivity corresponding to the color signals and the high sensitivity of the corrected sensitivity,
A camera characterized by comprising
JP2003311440A 2003-09-03 2003-09-03 White balance adjustment method and electronic camera Expired - Fee Related JP4239218B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003311440A JP4239218B2 (en) 2003-09-03 2003-09-03 White balance adjustment method and electronic camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003311440A JP4239218B2 (en) 2003-09-03 2003-09-03 White balance adjustment method and electronic camera

Publications (3)

Publication Number Publication Date
JP2005080190A JP2005080190A (en) 2005-03-24
JP2005080190A5 JP2005080190A5 (en) 2006-10-19
JP4239218B2 true JP4239218B2 (en) 2009-03-18

Family

ID=34413005

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003311440A Expired - Fee Related JP4239218B2 (en) 2003-09-03 2003-09-03 White balance adjustment method and electronic camera

Country Status (1)

Country Link
JP (1) JP4239218B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020135022A1 (en) * 2018-12-24 2020-07-02 惠科股份有限公司 Display panel image optimization method and device and computer readable storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5375457B2 (en) * 2008-09-03 2013-12-25 株式会社リコー Imaging apparatus and imaging method
CN102918845B (en) * 2010-05-28 2015-09-02 富士胶片株式会社 The method of imaging device and calculating white balance gains
WO2011162041A1 (en) 2010-06-22 2011-12-29 富士フイルム株式会社 Imaging device and imaging method
JP5693271B2 (en) * 2011-02-03 2015-04-01 キヤノン株式会社 Image processing apparatus and method
JP6148497B2 (en) * 2013-02-27 2017-06-14 キヤノン株式会社 Image processing apparatus, image processing method, program, and storage medium
JP2014175832A (en) 2013-03-08 2014-09-22 Toshiba Corp Solid state image pickup device
CN113784104A (en) * 2021-08-18 2021-12-10 杭州涂鸦信息技术有限公司 White balance processing method and related device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020135022A1 (en) * 2018-12-24 2020-07-02 惠科股份有限公司 Display panel image optimization method and device and computer readable storage medium

Also Published As

Publication number Publication date
JP2005080190A (en) 2005-03-24

Similar Documents

Publication Publication Date Title
JP4293174B2 (en) Imaging apparatus and image processing apparatus
JP4051674B2 (en) Imaging device
US8723958B2 (en) Image pickup apparatus and image pickup element
US7602438B2 (en) Method and apparatus for capturing high quality long exposure images with a digital camera
US20090051781A1 (en) Image processing apparatus, method, and program
JP5663564B2 (en) Imaging apparatus, captured image processing method, and captured image processing program
JP2008271123A (en) Imaging device
JP4544319B2 (en) Image processing apparatus, method, and program
JP4239218B2 (en) White balance adjustment method and electronic camera
JP4158029B2 (en) White balance adjustment method and electronic camera
US20050219404A1 (en) Apparatus for compensating for color shading on a picture picked up by a solid-state image sensor over a broad dynamic range
JP4306306B2 (en) White balance control method and imaging apparatus
JP4114707B2 (en) Imaging device
JP4544318B2 (en) Image processing apparatus, method, and program
JP2006333113A (en) Imaging device
JP4051701B2 (en) Defective pixel correction method and imaging apparatus for solid-state imaging device
JP4028395B2 (en) Digital camera
JP2004222134A (en) Image pickup device
JP4735820B2 (en) Signal processing method for imaging apparatus and imaging apparatus
JP4307862B2 (en) Signal processing method, signal processing circuit, and imaging apparatus
JP4276847B2 (en) Imaging device
JP4538742B2 (en) Signal processing method for imaging apparatus and imaging apparatus
JP2005006047A (en) Exposure control device of electronic camera
JP2005086630A (en) Imaging apparatus
JP3958219B2 (en) Imaging apparatus and contour correction method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060901

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060901

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20061212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081023

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

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