JP2005347811A - White balance correction apparatus and white balance correction method, program and electronic camera apparatus - Google Patents

White balance correction apparatus and white balance correction method, program and electronic camera apparatus Download PDF

Info

Publication number
JP2005347811A
JP2005347811A JP2004161705A JP2004161705A JP2005347811A JP 2005347811 A JP2005347811 A JP 2005347811A JP 2004161705 A JP2004161705 A JP 2004161705A JP 2004161705 A JP2004161705 A JP 2004161705A JP 2005347811 A JP2005347811 A JP 2005347811A
Authority
JP
Japan
Prior art keywords
white balance
coefficient
correction
image
acquired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004161705A
Other languages
Japanese (ja)
Other versions
JP4433883B2 (en
Inventor
Shohei Sakamoto
昇平 坂本
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2004161705A priority Critical patent/JP4433883B2/en
Publication of JP2005347811A publication Critical patent/JP2005347811A/en
Application granted granted Critical
Publication of JP4433883B2 publication Critical patent/JP4433883B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a white balance correction apparatus or the like capable of applying excellent white balance correction to an imaged image or the like in a way of not causing color deviation over the entire region of the image or the like. <P>SOLUTION: An image 101 is divided into a plurality of coefficient blocks 111, R, G, B values of each pixel are individually integrated by each coefficient block 111, and a correction coefficient with respect to a center pixel 112 of each coefficient block 111 is calculated on the basis of the result above. Correction coefficients of a plurality of non-center pixels 122 except the center pixel 121 are individually calculated from the correction coefficients of a plurality of the center pixels 121 existing around the non-center pixels 122 through linear interpolation on the basis of the distance (x, 1-x, y, 1-y) with respect to each center pixel 121. The white balance of each pixel is adjusted by multiplying the correction coefficient acquired by each pixel with all pixels comprising the center pixels 121 and the non-center pixels 122. Even when emission areas of different kinds of light sources exist in the image, the white balance suitable for the entire region of the image can be ensured without causing color deviation. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、例えばデジタルカメラに用いて好適なホワイトバランス補正装置及びホワイトバランス補正方法、プログラム、電子カメラ装置に関するものである。   The present invention relates to a white balance correction device, a white balance correction method, a program, and an electronic camera device suitable for use in, for example, a digital camera.

従来、デジタルカメラ等における撮像した画像に対するホワイトバランス補正においては、画面全体に同一のホワイトバランス補正量を設定する方法が一般的である。しかし、画面内の被写体に複数の光源照射があり、その照射エリアがある程度分離されているような場合、例えば蛍光灯下の被写体に局所的に電球光源照射があったり、蛍光灯下でストロボ撮影時に、主たる被写体にはストロボ光が十分照射されているが、距離が離れていてストロボ光の届かない領域や、ストロボ光量が少なくなる周辺部分が存在するとき等のように、画面内に2種類、あるいはそれ以上の光源に支配される分離領域がある場合には、画面全域に適した補正をかけることが難しい。   Conventionally, in white balance correction for an image captured by a digital camera or the like, a method of setting the same white balance correction amount for the entire screen is generally used. However, if the subject in the screen has multiple light source irradiations and the irradiation areas are separated to some extent, for example, the subject under the fluorescent lamp is locally exposed to the light source of the bulb, or the flash photography is performed under the fluorescent lamp. Sometimes, the main subject is sufficiently exposed to strobe light, but there are two types in the screen, such as when there is an area where the strobe light is far away and the strobe light does not reach, or there is a peripheral part where the amount of strobe light decreases. If there is a separation region that is dominated by light sources of more than that, it is difficult to apply correction suitable for the entire screen.

これを解消するものとして、例えば下記特許文献1には、入力した画像を複数のブロック領域に分割し、ブロック毎に異なるホワイトバランス補正量を設定して、ホワイトバランス補正を施す方法が記載されている。
特開2002−271638号公報
In order to solve this problem, for example, Patent Document 1 listed below describes a method of performing white balance correction by dividing an input image into a plurality of block areas and setting different white balance correction amounts for each block. Yes.
JP 2002-271638 A

しかしながら、上記のようにブロック毎に異なる補正量によるホワイトバランスを施す方法においては、互いに隣接するブロック同士の境界部分に色調の違い(色ずれ)が不可避的に生じ、結果的に画質が低下するという問題があった。   However, in the method of performing white balance with different correction amounts for each block as described above, a difference in color tone (color shift) inevitably occurs at the boundary between adjacent blocks, resulting in a reduction in image quality. There was a problem.

本発明は、かかる従来の課題に鑑みてなされたものであり、撮像した画像等の全域に亙って色ずれが生じない良好なホワイトバランス補正を施すことができるホワイトバランス補正装置及びホワイトバランス補正方法、プログラム、電子カメラ装置を提供することを目的とする。   The present invention has been made in view of such conventional problems, and a white balance correction apparatus and a white balance correction capable of performing a good white balance correction that does not cause a color shift over the entire area of a captured image or the like. It is an object to provide a method, a program, and an electronic camera device.

前記課題を解決するため請求項1の発明にあっては、画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の係数取得手段と、前記複数の注目画素の間に位置する前記画像における非注目画素のホワイトバランスの補正係数を、前記第1の係数取得手段により取得された、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の係数取得手段と、前記画像の各画素のうち、前記注目画素に対しては前記第1の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施す補正手段とを備えたものとした。   In order to solve the above problem, in the invention of claim 1, a first coefficient acquisition unit that individually acquires white balance correction coefficients of a plurality of target pixels that are separated from each other in an image; The white balance correction coefficient of the non-target pixel in the image located between them is acquired by interpolation from the correction coefficients of the plurality of target pixels existing around the non-target pixel acquired by the first coefficient acquisition unit. Second coefficient acquisition means that performs white balance correction on the target pixel among the pixels of the image based on the correction coefficient acquired by the first coefficient acquisition means, On the other hand, a correction means for performing white balance correction based on the correction coefficient acquired by the second coefficient acquisition means is provided.

かかる構成においては、画像が、画素毎に取得された補正係数に基づき画素毎にホワイトバランスを調整されることにより、画像内に異なる種類の光源の照射エリアが存在する場合においても、画像の全域に適したホワイトバランス補正を行うことができる。しかも、複数の注目画素の間に位置する非注目画素の補正係数が、非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得されるため、隣接する注目画素と非注目画素、又は隣接する非注目画素同士の間における画素毎の補正係数を滑らかに変化させることができる。同時に、非注目画素の補正係数を画像に基づき直接取得する場合に比べ、ホワイトバランス補正に要するデータ処理量を削減することができる。   In such a configuration, the white balance is adjusted for each pixel based on the correction coefficient acquired for each pixel, so that the entire area of the image can be obtained even when there are irradiation areas of different types of light sources in the image. White balance correction suitable for In addition, since the correction coefficient of the non-target pixel located between the plurality of target pixels is obtained by interpolation from the correction coefficients of the plurality of target pixels existing around the non-target pixel, the adjacent target pixel and the non-target pixel Alternatively, the correction coefficient for each pixel between adjacent non-target pixels can be changed smoothly. At the same time, it is possible to reduce the amount of data processing required for white balance correction compared to the case of directly acquiring the correction coefficient of the non-target pixel based on the image.

また、請求項2の発明にあっては、前記複数の注目画素は、前記画像が分割された複数の係数ブロック毎に設定され、前記第1の係数取得手段は、複数の注目画素の各々の補正係数を、同一の係数ブロック内の全画素の色成分に基づき個別に取得するものとした。   In the invention of claim 2, the plurality of target pixels are set for each of a plurality of coefficient blocks into which the image is divided, and the first coefficient acquisition unit is configured to set each of the plurality of target pixels. The correction coefficients are acquired individually based on the color components of all the pixels in the same coefficient block.

また、請求項3の発明にあっては、前記第1の係数取得手段は、画像内での位置によって異なる色情報を有する画素により構成される画像から前記複数の注目画素の補正係数を取得するものとした。   According to a third aspect of the present invention, the first coefficient acquisition unit acquires correction coefficients of the plurality of target pixels from an image including pixels having different color information depending on positions in the image. It was supposed to be.

かかる構成においては、複数の注目画素の補正係数を取得する際に扱うデータ処理量を削減することができる。   In such a configuration, it is possible to reduce the amount of data processing handled when acquiring correction coefficients for a plurality of target pixels.

また、請求項4の発明にあっては、前記第2の係数取得手段は、前記画像における非注目画素のホワイトバランスの補正係数を、前記第1の係数取得手段により取得された、当該非注目画素の周囲に存在する複数の注目画素からの距離に基づく直線補間によって取得するものとした。   In the invention of claim 4, the second coefficient acquisition unit acquires the white balance correction coefficient of the non-target pixel in the image by the first coefficient acquisition unit. The pixel is acquired by linear interpolation based on the distance from a plurality of target pixels existing around the pixel.

また、請求項5の発明にあっては、画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の工程と、前記複数の注目画素の間に位置する非注目画素におけるホワイトバランスの補正係数を、第1の工程で取得した、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の工程と、前記注目画素に対しては前記第1の工程によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の工程によって取得された補正係数に基づきホワイトバランス補正を施す第3の工程とを含む方法とした。   In the invention of claim 5, a first step of individually obtaining white balance correction coefficients of a plurality of target pixels spaced apart from each other in the image, and a non-attention located between the plurality of target pixels A second step of acquiring a white balance correction coefficient in a pixel by interpolation from correction coefficients of a plurality of target pixels existing around the non-target pixel acquired in the first step; Performs white balance correction based on the correction coefficient acquired in the first step, and third step performs white balance correction on the non-target pixel based on the correction coefficient acquired in the second step. And a method including

かかる方法によれば、画像が、画素毎に取得された補正係数に基づき画素毎にホワイトバランスを調整されることにより、画像内に異なる種類の光源の照射エリアが存在する場合においても、画像の全域に適したホワイトバランス補正を行うことができる。しかも、複数の注目画素の間に位置する非注目画素の補正係数が、非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得されるため、隣接する注目画素と非注目画素、又は隣接する非注目画素同士の間における画素毎の補正係数を滑らかに変化させることができる。同時に、非注目画素の補正係数を画像に基づき直接取得する場合に比べ、ホワイトバランス補正に要するデータ処理量を削減することができる。   According to such a method, the white balance is adjusted for each pixel based on the correction coefficient acquired for each pixel, so that even when there are irradiation areas of different types of light sources in the image, White balance correction suitable for the entire area can be performed. In addition, since the correction coefficient of the non-target pixel located between the plurality of target pixels is obtained by interpolation from the correction coefficients of the plurality of target pixels existing around the non-target pixel, the adjacent target pixel and the non-target pixel Alternatively, the correction coefficient for each pixel between adjacent non-target pixels can be changed smoothly. At the same time, it is possible to reduce the amount of data processing required for white balance correction compared to the case of directly acquiring the correction coefficient of the non-target pixel based on the image.

また、請求項6の発明にあっては、画像処理機能を有する装置が有するコンピュータに、画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の処理と、前記複数の注目画素の間に位置する非注目画素におけるホワイトバランスの補正係数を、前記第1の処理で取得した、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の処理と、前記注目画素に対しては前記第1の処理によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の処理によって取得された補正係数に基づきホワイトバランス補正を施す第3の処理とを実行させるためのプログラムとした。   In the invention of claim 6, a first process for individually acquiring white balance correction coefficients of a plurality of pixels of interest separated from each other in an image in a computer included in an apparatus having an image processing function; A white balance correction coefficient in a non-target pixel located between a plurality of target pixels is acquired by interpolation from a plurality of target pixel correction coefficients existing around the non-target pixel acquired in the first process. The second process and the target pixel are subjected to white balance correction based on the correction coefficient acquired by the first process, and the non-target pixel is corrected by the second process. A program for executing the third process for performing white balance correction based on the coefficient is provided.

また、請求項7の発明にあっては、撮像手段により撮像した被写体画像を画像データとして記録媒体に記録する電子カメラにおいて、被写体画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の係数取得手段と、前記複数の注目画素の間に位置する被写体画像における非注目画素のホワイトバランスの補正係数を、前記第1の係数取得手段により取得された、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の係数取得手段と、被写体画像の各画素のうち、前記注目画素に対しては前記第1の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施す補正手段とを備えたものとした。   According to the seventh aspect of the present invention, in the electronic camera that records the subject image picked up by the image pickup means on the recording medium as image data, the white balance correction coefficients of a plurality of target pixels spaced apart from each other in the subject image are individually set. A first coefficient acquisition unit that acquires the white balance correction coefficient of the non-target pixel in the subject image located between the plurality of target pixels. A second coefficient acquisition unit that acquires by interpolation from correction coefficients of a plurality of target pixels existing around the pixel, and of the pixels of the subject image, the target pixel is acquired by the first coefficient acquisition unit; The white balance correction is performed based on the corrected correction coefficient, and the correction coefficient acquired by the second coefficient acquisition unit is applied to the non-target pixel. Was that a correcting means for performing white balance correction based on.

かかる構成においては、撮像手段により撮像された被写体画像の全画素が、画素毎に取得された補正係数に基づき画素毎にホワイトバランスを調整されることにより、被写体画像内に異なる種類の光源の照射エリアが存在する場合においても、被写体画像の全域に適したホワイトバランス補正を行うことができる。しかも、複数の注目画素の間に位置する非注目画素の補正係数が、非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得されるため、隣接する注目画素と非注目画素、又は隣接する非注目画素同士の間における画素毎の補正係数を滑らかに変化させることができる。同時に、非注目画素の補正係数を被写体画像に基づき直接取得する場合に比べ、ホワイトバランス補正に要するデータ処理量を削減することができる。   In such a configuration, all the pixels of the subject image picked up by the image pickup means are adjusted in white balance for each pixel based on the correction coefficient acquired for each pixel, thereby irradiating different types of light sources in the subject image. Even when there is an area, white balance correction suitable for the entire area of the subject image can be performed. In addition, since the correction coefficient of the non-target pixel located between the plurality of target pixels is obtained by interpolation from the correction coefficients of the plurality of target pixels existing around the non-target pixel, the adjacent target pixel and the non-target pixel Alternatively, the correction coefficient for each pixel between adjacent non-target pixels can be changed smoothly. At the same time, it is possible to reduce the amount of data processing required for white balance correction compared to the case of directly acquiring the correction coefficient of the non-target pixel based on the subject image.

以上のように本発明のホワイトバランス補正装置及びホワイトバランス補正方法においては、画像内に異なる種類の光源の照射エリアが存在する場合においても、画像の全域に適したホワイトバランス補正を行うことができる。しかも、隣接する注目画素と非注目画素、又は隣接する非注目画素同士の間における画素毎の補正係数を滑らかに変化させることができるようにした。よって、撮像した画像等の全域に亙って色ずれが生じない良好なホワイトバランス補正を施すことが可能となる。同時に、非注目画素の補正係数を画像に基づき直接取得する場合に比べ、ホワイトバランス補正に要するデータ処理量を削減することができるため、ホワイトバランス補正を高速に行うことができる。   As described above, in the white balance correction apparatus and the white balance correction method of the present invention, it is possible to perform white balance correction suitable for the entire area of the image even when there are irradiation areas of different types of light sources in the image. . In addition, the correction coefficient for each pixel between the adjacent target pixel and the non-target pixel or between the adjacent non-target pixels can be changed smoothly. Therefore, it is possible to perform good white balance correction that does not cause a color shift over the entire area of the captured image or the like. At the same time, the amount of data processing required for white balance correction can be reduced compared to the case where the correction coefficient of the non-target pixel is directly acquired based on the image, so that white balance correction can be performed at high speed.

特に、請求項3の発明においては、複数の注目画素の補正係数を取得する際に扱うデータ処理量を削減することができるようにした。よって、複数の注目画素の補正係数の取得に要する処理の全てをプログラム処理によって行う構成においては、複数の注目画素の補正係数を効率的に取得することができる。   In particular, in the invention of claim 3, it is possible to reduce the amount of data processing to be handled when acquiring correction coefficients for a plurality of target pixels. Therefore, in the configuration in which all the processes required for acquiring the correction coefficients for a plurality of pixels of interest are performed by program processing, the correction coefficients for the plurality of pixels of interest can be acquired efficiently.

また、本発明電子カメラ装置によれば、撮像した被写体画像の全域に亙って色ずれが生じない良好なホワイトバランス補正を施すことが可能となり、また、それを高速に行うことができる。   Also, according to the electronic camera device of the present invention, it is possible to perform a good white balance correction that does not cause a color shift over the entire area of the captured subject image, and it can be performed at high speed.

以下、本発明の実施の形態を図にしたがって説明する。
(実施形態1)
図1は、本発明の第1の実施の形態に係るデジタルカメラ1の概略構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
(Embodiment 1)
FIG. 1 is a block diagram showing a schematic configuration of a digital camera 1 according to the first embodiment of the present invention.

このデジタルカメラ1は、撮像素子であるCCD2により被写体を撮像し、撮像により取得した被写体画像をLCD(液晶表示装置)4に表示させるとともに、撮影操作に応じて、撮像した被写体画像を画像データに変換し画像メモリ5に記録する構成であるとともに、AE(自動露出制御)、AF(オートフォーカス)、AWB(オートホワイトバランス)の各機能を有している。なお、画像メモリ5は、カメラ本体に内蔵又は着脱自在なフラッシュメモリ等の不揮発性メモリである。   The digital camera 1 captures a subject with a CCD 2 that is an image sensor, displays a subject image acquired by the imaging on an LCD (liquid crystal display device) 4, and converts the captured subject image into image data according to a photographing operation. In addition to being configured to convert and record in the image memory 5, it has functions of AE (automatic exposure control), AF (autofocus), and AWB (auto white balance). The image memory 5 is a non-volatile memory such as a flash memory that is built in or detachable from the camera body.

CCD2は、感光部にベイヤー配列の原色フィルターが設けられたものであり、CCD2から出力されたアナログの撮像信号は、信号処理部3において各種の信号処理を施されて、最終的には輝度信号(Y信号)と色差信号(Cb信号、Cr信号)を含んだYUVデータ、すなわちデジタルの画像信号として出力される。   The CCD 2 is provided with a Bayer array primary color filter in the photosensitive portion, and the analog imaging signal output from the CCD 2 is subjected to various signal processing in the signal processing portion 3 and finally a luminance signal. YUV data including (Y signal) and color difference signals (Cb signal, Cr signal), that is, output as a digital image signal.

信号処理部3から出力された画像信号は、撮影待機状態にあるときLCD4に送られて被写体画像として表示される。また、撮影操作時には、CPU6によりJPEG等の所定フォーマットに従い圧縮され画像メモリ5に記録される。画像メモリ5に記録された圧縮後の画像データは、必要に応じCPU6により読み出され、いったん伸張された後LCD4において静止画像、或いは動画像として再生表示される。   The image signal output from the signal processing unit 3 is sent to the LCD 4 and displayed as a subject image when in the shooting standby state. At the time of shooting operation, the CPU 6 compresses the image according to a predetermined format such as JPEG and records it in the image memory 5. The compressed image data recorded in the image memory 5 is read out by the CPU 6 as needed, and once decompressed, it is reproduced and displayed on the LCD 4 as a still image or a moving image.

また、デジタルカメラ1は、CPU6が上記画像データの圧縮・伸張、及び装置全体の制御に必要とする各種の制御プログラムが記録されたROM7と、CPU6の作業用メモリであるRAM8、キー入力部9、レンズ駆動部10を有している。ROM7には、CPU6に後述するホワイトバランスの補正係数取得処理を行わせることにより、CPU6を本発明の第1の係数取得手段、第2の係数取得手段として機能させるためのプログラムが格納されている。   The digital camera 1 also includes a ROM 7 in which various control programs necessary for the CPU 6 to compress and expand the image data and control the entire apparatus, a RAM 8 that is a working memory of the CPU 6, and a key input unit 9. The lens driving unit 10 is provided. The ROM 7 stores a program for causing the CPU 6 to function as first coefficient acquisition means and second coefficient acquisition means of the present invention by causing the CPU 6 to perform white balance correction coefficient acquisition processing, which will be described later. .

キー入力部9は、シャッターキーや、動作モードの切り替えに使用されるモード切替キー等からなり、キー操作に応じた操作信号をCPU6へ出力する。レンズ駆動部10は、CCD2の前面に配置されたフォーカスレンズを含む光学系を光軸方向に駆動するモーターや、それを制御するためのドライバー等から構成され、AF制御時におけるCPU6からの指令に基づきレンズ位置を変化させる。   The key input unit 9 includes a shutter key and a mode switching key used for switching the operation mode, and outputs an operation signal corresponding to the key operation to the CPU 6. The lens driving unit 10 includes a motor for driving an optical system including a focus lens disposed in front of the CCD 2 in the optical axis direction, a driver for controlling the motor, and the like. Based on this, the lens position is changed.

図2は、前述した信号処理部3の詳細を示すブロック図である。信号処理部3は、CCD2から出力されるアナログの撮像信号が入力するアナログ処理部11と、黒レベル調整部12、色補間部13、計測部14、ホワイトバランス調整部15、ガンマ補正部19、フィルタ処理部20、YUV変換処理部21の各部から構成されている。   FIG. 2 is a block diagram showing details of the signal processing unit 3 described above. The signal processing unit 3 includes an analog processing unit 11 to which an analog imaging signal output from the CCD 2 is input, a black level adjustment unit 12, a color interpolation unit 13, a measurement unit 14, a white balance adjustment unit 15, a gamma correction unit 19, The filter processing unit 20 and the YUV conversion processing unit 21 are included.

アナログ処理部11は、CCD2から出力された撮像信号に含まれるCCD2の駆動ノイズを減少させる相関二重サンプリング回路(CDS回路)と、ノイズ低減後における信号のゲインを調整する自動利得制御回路(AGC回路)、ゲイン調整後の信号をデジタル信号に変換するA/D変換器を含み、CCD2から入力したアナログの撮像信号をデジタルの画像信号、すなわちベイヤーデータに変換する。黒レベル調整部12は、デジタル化された画像信号を所定の黒レベルにクランプする。   The analog processing unit 11 includes a correlated double sampling circuit (CDS circuit) that reduces drive noise of the CCD 2 included in the imaging signal output from the CCD 2, and an automatic gain control circuit (AGC) that adjusts the gain of the signal after noise reduction. Circuit) and an A / D converter that converts the gain-adjusted signal into a digital signal, and converts an analog imaging signal input from the CCD 2 into a digital image signal, that is, Bayer data. The black level adjustment unit 12 clamps the digitized image signal to a predetermined black level.

色補間部13は、黒レベル調整部12から入力したベイヤーデータからR,G,Bの色成分について色補間を行い画素毎のR,G,Bの色成分データを生成する。計測部14は、黒レベル調整部12から入力した1画面分のベイヤーデータ(以下、ベイヤー画像という。)101について、図3(a)に示したように、1画面を縦16×横16に分割した計256の係数ブロック111を単位として、係数ブロック111毎にベイヤーデータのR,G,B値を個別に積分し、その結果をCPU6へ出力する。   The color interpolation unit 13 performs color interpolation on the R, G, and B color components from the Bayer data input from the black level adjustment unit 12, and generates R, G, and B color component data for each pixel. As shown in FIG. 3A, the measurement unit 14, with respect to Bayer data (hereinafter referred to as a Bayer image) 101 for one screen input from the black level adjustment unit 12, makes one screen 16 × 16 horizontally. Using the divided 256 coefficient blocks 111 as a unit, the R, G, B values of the Bayer data are individually integrated for each coefficient block 111, and the result is output to the CPU 6.

ホワイトバランス調整部15は本発明の補正手段であって、色補間部13で生成されたRGBデータをストアするメモリ16と、メモリ16上のRGBデータを読み出し、画素毎にホワイトバランス補正係数(以下、単に補正係数という。)をかけて、前記ガンマ補正部19へ出力するゲイン乗算回路17と、その補正係数が設定される係数レジスタ18とから構成されている。係数レジスタ18に設定される補正係数は、後述する処理によってCPU6から送られる各画素に対するR画素用のゲイン(Rゲイン係数)とB画素用のゲイン(Bゲイン係数)である。   The white balance adjustment unit 15 is a correction unit of the present invention, and reads out the RGB data on the memory 16 storing the RGB data generated by the color interpolation unit 13 and the white balance correction coefficient (hereinafter referred to as “white balance correction coefficient”) for each pixel. , Simply referred to as a correction coefficient), and a gain multiplication circuit 17 that outputs to the gamma correction unit 19 and a coefficient register 18 in which the correction coefficient is set. The correction coefficients set in the coefficient register 18 are an R pixel gain (R gain coefficient) and a B pixel gain (B gain coefficient) for each pixel sent from the CPU 6 by processing to be described later.

ガンマ補正部19は、ホワイトバランス調整後のRGBデータに対するガンマ特性(階調特性)の補正を行い、フィルタ処理部20は、ガンマ補正後のRGBデータに種々のフィルタ処理を施し、YUV変換処理部21は、RGBデータから輝度信号(Y)と色差信号(U、V)からなるYUVデータを画素毎に生成し、CPU6やLCD4へ出力する。   The gamma correction unit 19 corrects gamma characteristics (gradation characteristics) for the RGB data after white balance adjustment, and the filter processing unit 20 performs various filter processes on the RGB data after gamma correction, and a YUV conversion processing unit. 21 generates YUV data composed of luminance signals (Y) and color difference signals (U, V) from the RGB data for each pixel, and outputs them to the CPU 6 and the LCD 4.

次に、以上の構成において、CCD2が駆動されている間にCPU6が実施するホワイトバランスの補正係数取得処理に関する手順を図4のフローチャートに従って説明する。   Next, a procedure related to the white balance correction coefficient acquisition process performed by the CPU 6 while the CCD 2 is driven in the above configuration will be described with reference to the flowchart of FIG.

CPU6は、前記計測部14から入力したベイヤー画像101(図3(a))における係数ブロック111毎のRGB積分結果に基づき、係数ブロック111毎にR,Bゲイン係数を演算し(ステップSA1)、演算した各々のR、Bゲイン係数(Rgain,Bgai)を、各々の係数ブロック111の中心画素(注目画素)121の補正係数としてホワイトバランス調整部15の係数レジスタ18に設定する(ステップSA2)。引き続き、中心画素以外の非中心画素(非注目画素)のR,Bゲイン係数を、その画素の周囲の複数の中心画素121のR、Bゲイン係数に基づき線形補間より算出する(ステップSA3)。   The CPU 6 calculates R and B gain coefficients for each coefficient block 111 based on the RGB integration results for each coefficient block 111 in the Bayer image 101 (FIG. 3A) input from the measurement unit 14 (step SA1). The calculated R and B gain coefficients (Rgain, Bgai) are set in the coefficient register 18 of the white balance adjustment unit 15 as the correction coefficient of the center pixel (target pixel) 121 of each coefficient block 111 (step SA2). Subsequently, R and B gain coefficients of non-center pixels (non-target pixels) other than the center pixel are calculated by linear interpolation based on the R and B gain coefficients of a plurality of center pixels 121 around the pixel (step SA3).

例えば図3(b)に示したように、非中心画素122のR,Bゲイン係数をR4,B4、周辺の係数ブロック111の4つの中心画素121のRゲイン係数をR0〜R3、Bゲイン係数をB0〜B3、非中心画素122の左上の中心画素121からの距離をx,y(ただし、各々の中心画素121間の距離を1に正規化した値)として以下の式によりR,Bゲイン係数を求める。
R4=(1−x)(1−y)R0+x(1−y)R1+(1−x)yR2+xyR3
B4=(1−x)(1−y)B0+x(1−y)B1+(1−x)yB2+xyB3
For example, as shown in FIG. 3B, the R and B gain coefficients of the non-center pixel 122 are R4 and B4, the R gain coefficients of the four center pixels 121 of the peripheral coefficient block 111 are R0 to R3, and the B gain coefficient. Are R0 and B3, and the distance from the center pixel 121 at the upper left of the non-center pixel 122 is x, y (however, the distance between each center pixel 121 is normalized to 1) by the following formula: Find the coefficient.
R4 = (1-x) (1-y) R0 + x (1-y) R1 + (1-x) yR2 + xyR3
B4 = (1-x) (1-y) B0 + x (1-y) B1 + (1-x) yB2 + xyB3

また、画像内の最外周に位置する係数ブロック111内の他の非中心画素122については、自己のブロックの中心画素121と隣接するブロックの中心画素121のR,Bゲイン係数からの距離に基づく補間によって算出する。   The other non-center pixels 122 in the coefficient block 111 located on the outermost periphery in the image are based on the distance from the R and B gain coefficients of the center pixel 121 of the block adjacent to the center pixel 121 of the own block. Calculate by interpolation.

そして、算出した全ての非中心画素122のR,Bゲイン係数をホワイトバランス調整部15の係数レジスタ18に設定する(ステップSA4)。なお、ステップSA3において前述した補間ができない非中心画素122、すなわちベイヤー画像101の四隅に位置する各係数ブロック111における、中心画素121と、ベイヤー画像101の隅と、ベイヤー画像101の縦及び横の辺を構成する2点の計4点を頂点とする正方形領域内の非中心画素122については、中心画素121と同一のR,Bゲイン係数を設定する。   Then, the calculated R and B gain coefficients of all the non-center pixels 122 are set in the coefficient register 18 of the white balance adjustment unit 15 (step SA4). In step SA3, the non-center pixel 122 that cannot be interpolated, that is, the center pixel 121 in each coefficient block 111 located at the four corners of the Bayer image 101, the corner of the Bayer image 101, and the vertical and horizontal of the Bayer image 101 are displayed. The same R and B gain coefficients as those of the central pixel 121 are set for the non-central pixel 122 in the square area having the vertex of the total of two points constituting the side.

これにより、画像内の全ての画素に対するR,Bゲイン係数がホワイトバランス調整部15の係数レジスタ18に設定され、ホワイトバランス調整部15においては、前述したようにゲイン乗算回路17によって、各々に設定されたR,Bゲイン係数が画素毎にかけられることによりホワイトバランス調整が行われる。   As a result, the R and B gain coefficients for all the pixels in the image are set in the coefficient register 18 of the white balance adjustment unit 15, and the white balance adjustment unit 15 sets them by the gain multiplication circuit 17 as described above. White balance adjustment is performed by applying the obtained R and B gain coefficients to each pixel.

以上のように本実施の形態においては、画素毎に取得した補正係数(R,Bゲイン係数)に基づき画素毎にホワイトバランス調整を行うことから、画面内の被写体に複数の光源照射があり、その照射エリアがある程度分離されているような場合であっても、照射エリア毎に適したホワイトバランスを確保することができる。同時に、各係数ブロック111の中心画素121の補正係数を係数ブロック111毎のRGB積分結果に基づき取得し、かつ非中心画素122の補正係数を周囲の複数の中心画素121のR,Bゲイン係数から補間により取得することから、隣接する係数ブロック111同士の境界部分、及び隣接する中心画素121と非中心画素122、又は隣接する非中心画素122同士の間における画素毎のR,Bゲイン係数が滑らかに変化することとなり、上記境界部分に色ずれが生じることがない。したがって、画面全域に極めて良好なホワイトバランス補正を施すことができる。   As described above, in the present embodiment, since white balance adjustment is performed for each pixel based on the correction coefficient (R, B gain coefficient) acquired for each pixel, there is a plurality of light source irradiations on the subject in the screen, Even when the irradiation areas are separated to some extent, it is possible to ensure a white balance suitable for each irradiation area. At the same time, the correction coefficient of the center pixel 121 of each coefficient block 111 is acquired based on the RGB integration result for each coefficient block 111, and the correction coefficient of the non-center pixel 122 is obtained from the R and B gain coefficients of the plurality of surrounding center pixels 121. Since it is acquired by interpolation, the R and B gain coefficients for each pixel between the boundary portions between adjacent coefficient blocks 111 and between adjacent central pixels 121 and non-central pixels 122 or between adjacent non-central pixels 122 are smooth. Therefore, no color shift occurs at the boundary portion. Therefore, very good white balance correction can be performed on the entire screen.

しかも、非中心画素122の補正係数を複数の中心画素121のR,Bゲイン係数から補間により取得することから、例えば全画素の補正係数をベイヤー画像101等から直接取得するような場合に比べて、ホワイトバランス補正に要するデータ処理量が少ないため、画素毎にホワイトバランス調整を行っても、ホワイトバランス補正を高速に行うことができる。また、CPU6にかかる処理負担を抑えることができる。   In addition, since the correction coefficients of the non-center pixels 122 are acquired by interpolation from the R and B gain coefficients of the plurality of center pixels 121, for example, as compared with the case where the correction coefficients of all the pixels are directly acquired from the Bayer image 101 or the like. Since the amount of data processing required for white balance correction is small, white balance correction can be performed at high speed even if white balance adjustment is performed for each pixel. Further, the processing load on the CPU 6 can be suppressed.

なお、本実施の形態においては、各係数ブロック111における中心画素121のR,Bゲイン係数を、色補間前のベイヤー画像101を構成する画素のR,G,B毎の積分値に基づき取得したが、それを色補間後の各画素におけるR,G,Bの色成分毎の積分値に基づき取得してもよい。ただし、ベイヤー画像101の段階で取得した方が、係数ブロック111毎のR,G,B毎の積分値の取得時におけるデータ処理量が少なくなる(1/3となる)。   In the present embodiment, the R and B gain coefficients of the central pixel 121 in each coefficient block 111 are acquired based on the integration values for R, G, and B of the pixels constituting the Bayer image 101 before color interpolation. However, it may be obtained on the basis of the integral value for each color component of R, G, B in each pixel after color interpolation. However, the amount acquired at the stage of the Bayer image 101 reduces the data processing amount when acquiring the integral values for each of R, G, and B for each coefficient block 111 (1/3).

また、本実施の形態とは異なり、計測部14の係数ブロック111毎のR,G,B値の積分処理を含めた中心画素121のR,Bゲイン係数の取得に要する全ての処理をCPU6によりプログラム処理で行う場合においては、複数の注目画素の補正係数を効率的に取得することができる。つまりCPU6のデータ処理負担を必要最小限に止めることができる。   Further, unlike the present embodiment, the CPU 6 performs all the processes required for acquiring the R and B gain coefficients of the center pixel 121 including the integration process of the R, G, and B values for each coefficient block 111 of the measurement unit 14. In the case of performing the program processing, it is possible to efficiently obtain correction coefficients for a plurality of target pixels. That is, the data processing burden on the CPU 6 can be minimized.

また、本実施の形態においては、ベイヤー画像101を均等に256分割した係数ブロック111毎に、中心画素121のR,Bゲイン係数を取得するものを示したが、係数ブロック111の分割数や、係数ブロック111の個々の形状については適宜変更することができる。   Further, in the present embodiment, the acquisition of the R and B gain coefficients of the center pixel 121 is shown for each coefficient block 111 obtained by equally dividing the Bayer image 101 into 256, but the number of divisions of the coefficient block 111, Each shape of the coefficient block 111 can be changed as appropriate.

また、非中心画素122の補正係数を、その周囲に存在する複数の中心画素121からの距離に基づく線形補間によって求めるものについて説明したが、非中心画素122の補正係数をこれ以外の補間方法、例えばスプライン補間などの他の補間方法を用いて求めるようにしてもよい。   In addition, although the correction coefficient of the non-center pixel 122 has been described as being obtained by linear interpolation based on the distance from the plurality of center pixels 121 existing around the non-center pixel 122, the correction coefficient of the non-center pixel 122 is calculated by other interpolation methods. For example, another interpolation method such as spline interpolation may be used.

また、本実施の形態においては、ベイヤー画像101の係数ブロック111毎のR,G,B値の積分作業を計測部14において行い、かつその積分結果に基づき、デジタルカメラ1の全体を制御するCPU6が中心画素121のR,Bゲイン係数を取得する構成について説明したが、例えばCCD2から出力された画像信号に対する、ホワイトバランス補正を含めた種々の処理を一括して行うASIC(Application Specific Integrated Circuit)を備えた構成では、計測部14及びCPU6の上記機能等をASICにより実現しても構わない。   Further, in the present embodiment, the CPU 6 that integrates the R, G, B values for each coefficient block 111 of the Bayer image 101 in the measurement unit 14 and controls the entire digital camera 1 based on the integration result. Has described the configuration for acquiring the R and B gain coefficients of the center pixel 121. For example, an ASIC (Application Specific Integrated Circuit) that collectively performs various processes including white balance correction on the image signal output from the CCD 2 In the configuration including the above, the above-described functions and the like of the measurement unit 14 and the CPU 6 may be realized by an ASIC.

また、本実施の形態においては、CCDを備えたデジタルカメラに本発明を採用した場合について説明したが、これに限らず本発明は、CMOSセンサを備えたデジタルカメラや、CCDやCMOSセンサ等の撮像素子を備えた他の撮像装置、例えばデジタルビデオカメラ、カメラ付き携帯電話機、カメラ付きPDA、カメラ付きパソコン等の種々の電子カメラ装置にも採用することができる。その場合においても、前述した効果を得ることができる。   In this embodiment, the case where the present invention is adopted in a digital camera equipped with a CCD has been described. However, the present invention is not limited to this, and the present invention is not limited to a digital camera equipped with a CMOS sensor, a CCD, a CMOS sensor, The present invention can also be employed in other imaging devices including an imaging device, for example, various electronic camera devices such as a digital video camera, a mobile phone with a camera, a PDA with a camera, and a personal computer with a camera. Even in that case, the above-described effects can be obtained.

(実施形態2)
図5は、本発明の第2の実施の形態に係るパーソナルコンピュータ(以下、パソコン)51を示すブロック図である。
(Embodiment 2)
FIG. 5 is a block diagram showing a personal computer (hereinafter, personal computer) 51 according to the second embodiment of the present invention.

このパソコン51はCPU52と、CPU52に接続されたROM53、RAM54、内蔵時計55、CRTやLCD等からなる表示装置56へ送る表示信号を生成する表示回路57を備えている。CPU52には、インターフェース58を介して入力手段であるマウス59及びキーボード60と、ハードディスク61、CD−ROMドライブ62、各種のメモリカードが直接、または所定のアダプタを介して着脱自在に装着可能なスロットを有する内蔵又は外付けのカードドライブ63が接続されている。ハードディスク61には、パソコン51の動作に不可欠な各種OS、及び必要に応じてCPU52に後述するホワイトバランス補正処理を実行させることにより、CPU52を本発明の第1の係数取得手段、第2の係数取得手段、補正手段として機能させるためのプログラムを含む画像処理プログラム等の各種アプリケーションプログラムがインストールされている。   The personal computer 51 includes a CPU 52 and a display circuit 57 for generating a display signal to be sent to a display device 56 such as a ROM 53, a RAM 54, a built-in clock 55, and a CRT or LCD connected to the CPU 52. In the CPU 52, a slot in which a mouse 59 and a keyboard 60 as input means via an interface 58, a hard disk 61, a CD-ROM drive 62, and various memory cards can be detachably mounted directly or via a predetermined adapter. A built-in or external card drive 63 is connected. The hard disk 61 causes the CPU 52 to execute various white balance correction processes, which will be described later, according to various OSs that are indispensable for the operation of the personal computer 51, and the second coefficient, Various application programs such as an image processing program including a program for functioning as an acquisition unit and a correction unit are installed.

次に、以上の構成からなるパソコン51において、画像処理プログラムが起動しているときCPU52が必要に応じて実行する画像に対するホワイトバランス補正処理の内容を図6のフローチャートにしたがって説明する。なお、ここでは、処理対象となる画像が、第1の実施の形態で説明したデジタルカメラのCCD2と同様に感光部にベイヤー配列の原色フィルターを有した撮像素子を備えた任意のデジタルカメラで撮影され記録された撮影画像であり、例えばメモリカードを介してカードドライブ63からハードディスク61に読み込まれているものとする。また、上記撮影画像のデータが、一般にRAWデータと呼ばれる撮像素子の生出力データ、つまり撮像素子における画素毎のデータ(ここでは、ベイヤーデータ)であるものとする。   Next, in the personal computer 51 having the above-described configuration, the content of the white balance correction processing for the image that the CPU 52 executes as necessary when the image processing program is activated will be described with reference to the flowchart of FIG. Here, the image to be processed is taken by an arbitrary digital camera provided with an image sensor having a primary color filter with a Bayer array in the photosensitive portion, like the CCD 2 of the digital camera described in the first embodiment. It is assumed that the captured image is recorded and read from the card drive 63 to the hard disk 61 via, for example, a memory card. Further, it is assumed that the data of the captured image is raw output data of the image sensor generally called RAW data, that is, data for each pixel in the image sensor (here, Bayer data).

以下、説明するとCPU52は、ハードディスク61から上記画像データ、つまりベイヤーデータを読み出した後(ステップSB1)、その1画面を16×16の係数ブロック111に分割し(図3(a)参照)、ブロック毎にR,G,B値を個別に積分する(ステップSB2)。そして、係数ブロック毎のRGBの各積分結果に基づき、係数ブロック毎にR,Bゲイン係数を演算し(ステップSB3)、その結果を各係数ブロックにおける中心画素121の補正係数としてRAM54等に記憶する(ステップSB4)。次に、1画面内における前記中心画素121を除く非中心画素122(図3(b)参照)のR,Bゲイン係数を、各々の周囲の複数の中心画素121からの距離に基づき、複数の中心画素121のR、Bゲイン係数から線形補間よって画素毎に算出し、その結果をRAM54等に記憶する(ステップSB5)。なお、この線形補間よる非中心画素122のR,Bゲイン係数の具体的に算出方法については、第1の実施の形態と同様であるため説明を省略する。   In the following, the CPU 52 reads the image data, that is, Bayer data from the hard disk 61 (step SB1), and then divides one screen into 16 × 16 coefficient blocks 111 (see FIG. 3A). The R, G, and B values are individually integrated every time (step SB2). Then, based on each RGB integration result for each coefficient block, R and B gain coefficients are calculated for each coefficient block (step SB3), and the result is stored in the RAM 54 or the like as a correction coefficient for the center pixel 121 in each coefficient block. (Step SB4). Next, the R and B gain coefficients of the non-center pixels 122 (see FIG. 3B) excluding the center pixel 121 in one screen are determined based on the distance from the plurality of center pixels 121 around each of the plurality of center pixels 121. The R and B gain coefficients of the center pixel 121 are calculated for each pixel by linear interpolation, and the result is stored in the RAM 54 or the like (step SB5). Note that the specific calculation method of the R and B gain coefficients of the non-center pixel 122 by this linear interpolation is the same as that in the first embodiment, and thus the description thereof is omitted.

引き続き、処理対象の画像データに色補間処理を施して、画素毎にRGBデータを生成し(ステップSB6)、生成した画素毎のR,Bデータに、ステップSB3,SB5で予め記憶しておいた画素毎のR,Bゲイン係数をかけることによって、画素毎にホワイトバランスを調整する(ステップSB7)。しかる後、ホワイトバランス調整後の画素データ(画素毎のRGBデータ)からなるカラー画像を、JPEG等の所定の画像フォーマットでハードディスク61に記憶する(ステップSB8)。   Subsequently, color interpolation processing is performed on the image data to be processed to generate RGB data for each pixel (step SB6), and the generated R and B data for each pixel are stored in advance in steps SB3 and SB5. By applying the R and B gain coefficients for each pixel, the white balance is adjusted for each pixel (step SB7). Thereafter, a color image composed of pixel data (RGB data for each pixel) after white balance adjustment is stored in the hard disk 61 in a predetermined image format such as JPEG (step SB8).

したがって、本実施の形態のパソコン51においても、第1の実施の形態に示したデジタルカメラ1と同様、画面内の被写体に複数の光源照射があり、その照射エリアがある程度分離されているような場合であっても、照射エリア毎に適したホワイトバランスを確保することができる。同時に、隣接する係数ブロック111同士の境界部分に色ずれが生じることがない。したがって、画面全域に極めて良好なホワイトバランス補正を施すことができる。しかも、画素毎にホワイトバランス調整を行っても、ホワイトバランス補正を高速に行うことができるとともに、CPU52にかかる処理負担を抑えることができる。   Therefore, also in the personal computer 51 of the present embodiment, as in the digital camera 1 shown in the first embodiment, the subject in the screen has a plurality of light source irradiations, and the irradiation areas are separated to some extent. Even in this case, it is possible to ensure a white balance suitable for each irradiation area. At the same time, color shift does not occur at the boundary between adjacent coefficient blocks 111. Therefore, very good white balance correction can be performed on the entire screen. In addition, even if white balance adjustment is performed for each pixel, white balance correction can be performed at high speed, and the processing burden on the CPU 52 can be suppressed.

また、各係数ブロック111における中心画素121のR,Bゲイン係数を、色補間前のベイヤー画像101を構成する画素のR,G,B毎の積分値に基づき取得するため、複数の注目画素の補正係数を効率的に取得することができる。つまりCPU52のデータ処理負担を必要最小限に止めることができる。   In addition, since the R and B gain coefficients of the center pixel 121 in each coefficient block 111 are acquired based on the integral values for R, G, and B of the pixels that constitute the Bayer image 101 before color interpolation, The correction coefficient can be acquired efficiently. That is, the data processing burden on the CPU 52 can be minimized.

なお、本実施の形態においては、処理対象の撮影画像のデータがRAWデータである場合について説明したが、本発明は、RAWデータ以外の画像データを対象とする場合であっても有効であり、処理対象はJPEG形式等の他のデータ形式で記録されている画像であってもよい。例えばJPEG形式の画像を対象とする場合には、記録されている画像をいったん画素毎のY,Cb,Crデータに伸張し、さらにそれを画素毎のRGBデータに変換した後、変換後の各画素におけるR,G,Bの色成分毎の積分値に基づき各係数ブロック111における中心画素121のR,Bゲイン係数を取得すればよい。さらに、その場合には、各係数ブロック111における中心画素121のR,Bゲイン係数を画素毎のCb,Crデータに基づき取得するようにしてもよい。   In the present embodiment, the case where the captured image data to be processed is RAW data has been described. However, the present invention is effective even when image data other than RAW data is targeted. The processing target may be an image recorded in another data format such as JPEG format. For example, when an image in JPEG format is targeted, the recorded image is once expanded into Y, Cb, Cr data for each pixel, further converted into RGB data for each pixel, The R and B gain coefficients of the center pixel 121 in each coefficient block 111 may be acquired based on the integration values for the R, G, and B color components in the pixel. Further, in that case, the R and B gain coefficients of the central pixel 121 in each coefficient block 111 may be acquired based on Cb and Cr data for each pixel.

また、本実施の形態においても、係数ブロック111の分割数や、係数ブロック111の個々の形状については適宜変更することができ、また、非中心画素122の補正係数を、その周囲に存在する複数の中心画素121の補正係数から、線形補間以外のスプライン補間などの他の補間方法を用いて求めるようにしてもよい。   Also in the present embodiment, the number of divisions of the coefficient block 111 and the individual shapes of the coefficient block 111 can be changed as appropriate, and the correction coefficient of the non-center pixel 122 can be changed to a plurality of correction coefficients existing around it. Alternatively, the correction coefficient of the center pixel 121 may be obtained using another interpolation method such as spline interpolation other than linear interpolation.

また、本実施の形態においては、前述したように汎用的な構成を備えたパソコン51に所定の画像処理プログラムをインストールすることによって本発明のホワイトバランス補正装置を実現したものを示したが、これ以外にも、本発明は、画像処理機能、特に撮影画像に対する画像処理機能を有するものであれば、例えばデジタルカメラ等によって画像データとして記録された画像を印刷する各種方式のプリンタにも採用することができる。その場合においても、前述した効果を得ることができる。   In the present embodiment, the white balance correction apparatus according to the present invention is realized by installing a predetermined image processing program in the personal computer 51 having a general-purpose configuration as described above. In addition, the present invention may be applied to various types of printers that print an image recorded as image data by a digital camera or the like as long as it has an image processing function, particularly an image processing function for a captured image. Can do. Even in that case, the above-described effects can be obtained.

本発明の第1の実施の形態を示すデジタルカメラのブロック図である。1 is a block diagram of a digital camera showing a first embodiment of the present invention. 同デジタルカメラの信号処理部の詳細を示すブロック図である。It is a block diagram which shows the detail of the signal processing part of the digital camera. ベイヤー画像における係数ブロックと、中心画素及び非中心画素とを示す説明図である。It is explanatory drawing which shows the coefficient block in a Bayer image, a center pixel, and a non-center pixel. CPUによるホワイトバランスの補正係数取得処理の内容を示すフローチャートである。It is a flowchart which shows the content of the correction coefficient acquisition process of the white balance by CPU. 本発明の第2の実施の形態を示すパーソナルコンピュータのブロック図である。It is a block diagram of the personal computer which shows the 2nd Embodiment of this invention. CPUによるホワイトバランス補正処理の内容を示すフローチャートである。It is a flowchart which shows the content of the white balance correction process by CPU.

符号の説明Explanation of symbols

1 デジタルカメラ
2 CCD
3 信号処理部
5 画像メモリ
6 CPU
7 ROM
8 RAM
13 色補間部
14 計測部
15 ホワイトバランス調整部
16 メモリ
17 ゲイン乗算回路
18 係数レジスタ
51 パーソナルコンピュータ
52 CPU
53 ROM
54 RAM
56 表示装置
61 ハードディスク
63 カードドライブ
101 ベイヤー画像
111 係数ブロック
121 中心画素
122 非中心画素
1 Digital camera 2 CCD
3 Signal Processing Unit 5 Image Memory 6 CPU
7 ROM
8 RAM
13 color interpolation unit 14 measurement unit 15 white balance adjustment unit 16 memory 17 gain multiplication circuit 18 coefficient register 51 personal computer 52 CPU
53 ROM
54 RAM
56 display device 61 hard disk 63 card drive 101 Bayer image 111 coefficient block 121 central pixel 122 non-central pixel

Claims (7)

画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の係数取得手段と、
前記複数の注目画素の間に位置する前記画像における非注目画素のホワイトバランスの補正係数を、前記第1の係数取得手段により取得された、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の係数取得手段と、
前記画像の各画素のうち、前記注目画素に対しては前記第1の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施す補正手段と
を備えたことを特徴とするホワイトバランス補正装置。
First coefficient acquisition means for individually acquiring white balance correction coefficients of a plurality of target pixels spaced apart from each other in an image;
The white balance correction coefficient of the non-target pixel in the image located between the plurality of target pixels is acquired by the first coefficient acquisition unit, and the plurality of target pixels existing around the non-target pixel is acquired. Second coefficient acquisition means for acquiring the correction coefficient by interpolation;
Of each pixel of the image, the target pixel is subjected to white balance correction based on the correction coefficient acquired by the first coefficient acquisition means, and the second coefficient is acquired for the non-target pixel. A white balance correction apparatus comprising: correction means for performing white balance correction based on a correction coefficient acquired by the means.
前記複数の注目画素は、前記画像が分割された複数の係数ブロック毎に設定され、前記第1の係数取得手段は、複数の注目画素の各々の補正係数を、同一の係数ブロック内の全画素の色成分に基づき個別に取得することを特徴とする請求項1記載のホワイトバランス補正装置。   The plurality of pixels of interest are set for each of a plurality of coefficient blocks into which the image has been divided, and the first coefficient acquisition unit calculates the correction coefficients of the plurality of pixels of interest for all pixels in the same coefficient block. The white balance correction device according to claim 1, wherein the white balance correction device is acquired individually based on the color components of the white balance. 前記第1の係数取得手段は、画像内での位置によって異なる色情報を有する画素により構成される画像から前記複数の注目画素の補正係数を取得することを特徴とする請求項1又は2記載のホワイトバランス補正装置。   The first coefficient acquisition unit acquires the correction coefficients of the plurality of pixels of interest from an image composed of pixels having different color information depending on a position in the image. White balance correction device. 前記第2の係数取得手段は、前記画像における非注目画素のホワイトバランスの補正係数を、前記第1の係数取得手段により取得された、当該非注目画素の周囲に存在する複数の注目画素からの距離に基づく直線補間によって取得することを特徴とする請求項1,2又は3記載のホワイトバランス補正装置。   The second coefficient acquisition unit calculates a white balance correction coefficient of a non-target pixel in the image from a plurality of target pixels existing around the non-target pixel acquired by the first coefficient acquisition unit. The white balance correction apparatus according to claim 1, wherein the white balance correction apparatus is obtained by linear interpolation based on a distance. 画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の工程と、
前記複数の注目画素の間に位置する非注目画素におけるホワイトバランスの補正係数を、第1の工程で取得した、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の工程と、
前記注目画素に対しては前記第1の工程によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の工程によって取得された補正係数に基づきホワイトバランス補正を施す第3の工程と
を含むことを特徴とするホワイトバランス補正方法。
A first step of individually acquiring white balance correction coefficients of a plurality of target pixels spaced apart from each other in an image;
A white balance correction coefficient for a non-target pixel located between the plurality of target pixels is acquired by interpolation from a plurality of target pixel correction coefficients existing in the periphery of the non-target pixel acquired in the first step. A second step;
White balance correction is performed on the target pixel based on the correction coefficient acquired in the first step, and white balance correction is performed on the non-target pixel based on the correction coefficient acquired in the second step. And a third step of applying white balance.
画像処理機能を有する装置が有するコンピュータに、
画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の処理と、
前記複数の注目画素の間に位置する非注目画素におけるホワイトバランスの補正係数を、前記第1の処理で取得した、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の処理と、
前記注目画素に対しては前記第1の処理によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の処理によって取得された補正係数に基づきホワイトバランス補正を施す第3の処理と
を実行させるためのプログラム。
A computer having a device having an image processing function
A first process of individually acquiring white balance correction coefficients of a plurality of target pixels spaced apart from each other in an image;
A white balance correction coefficient for a non-target pixel located between the plurality of target pixels is acquired by interpolation from a plurality of target pixel correction coefficients existing around the non-target pixel acquired in the first process. A second process to
White balance correction is performed on the target pixel based on the correction coefficient acquired by the first process, and white balance correction is performed on the non-target pixel based on the correction coefficient acquired by the second process. A program for executing the third process.
撮像手段により撮像した被写体画像を画像データとして記録媒体に記録する電子カメラにおいて、
被写体画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の係数取得手段と、
前記複数の注目画素の間に位置する被写体画像における非注目画素のホワイトバランスの補正係数を、前記第1の係数取得手段により取得された、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の係数取得手段と、
被写体画像の各画素のうち、前記注目画素に対しては前記第1の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の係数取得手段によって取得された補正係数に基づきホワイトバランス補正を施す補正手段と
を備えたことを特徴とする電子カメラ装置。
In an electronic camera that records a subject image imaged by an imaging means on a recording medium as image data,
First coefficient acquisition means for individually acquiring white balance correction coefficients of a plurality of target pixels spaced apart from each other in a subject image;
The correction coefficient of the white balance of the non-target pixel in the subject image located between the plurality of target pixels is obtained by calculating the white balance correction coefficient of the plurality of target pixels existing around the non-target pixel acquired by the first coefficient acquisition unit. Second coefficient acquisition means for acquiring the correction coefficient by interpolation;
Of each pixel of the subject image, white balance correction is performed on the target pixel based on the correction coefficient acquired by the first coefficient acquisition unit, and the second coefficient is acquired for the non-target pixel. An electronic camera apparatus comprising: a correction unit that performs white balance correction based on the correction coefficient acquired by the unit.
JP2004161705A 2004-05-31 2004-05-31 White balance correction device, white balance correction method, program, and electronic camera device Expired - Fee Related JP4433883B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004161705A JP4433883B2 (en) 2004-05-31 2004-05-31 White balance correction device, white balance correction method, program, and electronic camera device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004161705A JP4433883B2 (en) 2004-05-31 2004-05-31 White balance correction device, white balance correction method, program, and electronic camera device

Publications (2)

Publication Number Publication Date
JP2005347811A true JP2005347811A (en) 2005-12-15
JP4433883B2 JP4433883B2 (en) 2010-03-17

Family

ID=35499826

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004161705A Expired - Fee Related JP4433883B2 (en) 2004-05-31 2004-05-31 White balance correction device, white balance correction method, program, and electronic camera device

Country Status (1)

Country Link
JP (1) JP4433883B2 (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008219198A (en) * 2007-02-28 2008-09-18 Olympus Corp Image processor and image processing program
JP2008311741A (en) * 2007-06-12 2008-12-25 Canon Inc Image pickup device, its control method, and program
JP2009038611A (en) * 2007-08-02 2009-02-19 Ricoh Co Ltd Imaging device and imaging method
JP2009094997A (en) * 2007-09-18 2009-04-30 Ricoh Co Ltd Imaging apparatus, imaging method
JP2009212787A (en) * 2008-03-04 2009-09-17 Ricoh Co Ltd Imaging apparatus and imaging method
KR100959343B1 (en) 2007-03-02 2010-05-20 후지필름 가부시키가이샤 White balance correction apparatus and method
JP2010213213A (en) * 2009-03-12 2010-09-24 Ricoh Co Ltd Imaging device and imaging method
JP2010213232A (en) * 2009-02-16 2010-09-24 Ricoh Co Ltd Imaging device and imaging method
KR100987030B1 (en) 2008-09-18 2010-10-11 연세대학교 산학협력단 Method and apparatus for correcting white balance
JP2010272996A (en) * 2009-05-20 2010-12-02 Casio Computer Co Ltd Image processor and image processing program
JP2011109729A (en) * 2011-03-10 2011-06-02 Mega Chips Corp Image processing apparatus
JP2012054827A (en) * 2010-09-02 2012-03-15 Canon Inc Image processor, image processing method and program
JP2013058870A (en) * 2011-09-07 2013-03-28 Canon Inc Image processor, image processing method, and program
JP2013225909A (en) * 2013-06-21 2013-10-31 Mega Chips Corp Image processing system
US8717454B2 (en) 2009-12-24 2014-05-06 Samsung Electronics Co., Ltd. Image pickup apparatus and image pickup method for adjusting white balance to account for flash and external light sources
JP2019062466A (en) * 2017-09-27 2019-04-18 カシオ計算機株式会社 Image processing system, image processing method and program
CN114363480A (en) * 2020-09-29 2022-04-15 合肥君正科技有限公司 Color temperature and illumination based adaptive lens shading correction method and system
CN115460386A (en) * 2022-08-31 2022-12-09 武汉精立电子技术有限公司 Method and system for acquiring color image by using black and white camera

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106033538B (en) * 2015-03-19 2020-06-23 联想(北京)有限公司 Information processing method and electronic equipment

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8351695B2 (en) 2007-02-28 2013-01-08 Olympus Corporation Image processing apparatus, image processing program, and image processing method
JP2008219198A (en) * 2007-02-28 2008-09-18 Olympus Corp Image processor and image processing program
KR100959343B1 (en) 2007-03-02 2010-05-20 후지필름 가부시키가이샤 White balance correction apparatus and method
JP2008311741A (en) * 2007-06-12 2008-12-25 Canon Inc Image pickup device, its control method, and program
JP2009038611A (en) * 2007-08-02 2009-02-19 Ricoh Co Ltd Imaging device and imaging method
JP2009094997A (en) * 2007-09-18 2009-04-30 Ricoh Co Ltd Imaging apparatus, imaging method
JP2013034261A (en) * 2007-09-18 2013-02-14 Ricoh Co Ltd Imaging apparatus and imaging method
JP2009212787A (en) * 2008-03-04 2009-09-17 Ricoh Co Ltd Imaging apparatus and imaging method
KR100987030B1 (en) 2008-09-18 2010-10-11 연세대학교 산학협력단 Method and apparatus for correcting white balance
JP2010213232A (en) * 2009-02-16 2010-09-24 Ricoh Co Ltd Imaging device and imaging method
US8830348B2 (en) 2009-02-16 2014-09-09 Ricoh Company, Ltd. Imaging device and imaging method
JP2010213213A (en) * 2009-03-12 2010-09-24 Ricoh Co Ltd Imaging device and imaging method
US8212890B2 (en) 2009-03-12 2012-07-03 Ricoh Company, Ltd. Imaging device and imaging method
JP2010272996A (en) * 2009-05-20 2010-12-02 Casio Computer Co Ltd Image processor and image processing program
US8717454B2 (en) 2009-12-24 2014-05-06 Samsung Electronics Co., Ltd. Image pickup apparatus and image pickup method for adjusting white balance to account for flash and external light sources
JP2012054827A (en) * 2010-09-02 2012-03-15 Canon Inc Image processor, image processing method and program
US8941756B2 (en) 2010-09-02 2015-01-27 Canon Kabushiki Kaisha Image processing apparatus, image processing method, and program
JP2011109729A (en) * 2011-03-10 2011-06-02 Mega Chips Corp Image processing apparatus
JP2013058870A (en) * 2011-09-07 2013-03-28 Canon Inc Image processor, image processing method, and program
JP2013225909A (en) * 2013-06-21 2013-10-31 Mega Chips Corp Image processing system
JP2019062466A (en) * 2017-09-27 2019-04-18 カシオ計算機株式会社 Image processing system, image processing method and program
CN114363480A (en) * 2020-09-29 2022-04-15 合肥君正科技有限公司 Color temperature and illumination based adaptive lens shading correction method and system
CN114363480B (en) * 2020-09-29 2023-09-26 合肥君正科技有限公司 Adaptive lens shading correction method and system based on color temperature and illumination
CN115460386A (en) * 2022-08-31 2022-12-09 武汉精立电子技术有限公司 Method and system for acquiring color image by using black and white camera

Also Published As

Publication number Publication date
JP4433883B2 (en) 2010-03-17

Similar Documents

Publication Publication Date Title
JP4433883B2 (en) White balance correction device, white balance correction method, program, and electronic camera device
JP4943721B2 (en) Color noise removal method for image data and imaging apparatus using the method
JP5123137B2 (en) Imaging apparatus and imaging method
JPWO2008150017A1 (en) Signal processing method and signal processing apparatus
EP2214136B1 (en) Method and program for controlling image capture apparatus
JP5272699B2 (en) Image processing apparatus, imaging apparatus, program, and image processing method
US8345121B2 (en) Image processing apparatus, method, and program
US20060092485A1 (en) Color signal correcting method, apparatus, and program
JP2004328117A (en) Digital camera and photographing control method
JP5589660B2 (en) Image processing apparatus, imaging apparatus, and image processing program
JP2004363853A (en) Method and device for reducing noise of image signal
JP4167200B2 (en) Signal processing apparatus, signal processing method, and digital camera
JP2007274504A (en) Digital camera
JP2006345388A (en) Imaging apparatus
JP2009200743A (en) Image processor, image processing method, image processing program and imaging apparatus
US20070269133A1 (en) Image-data noise reduction apparatus and method of controlling same
JP2006253970A (en) Imaging apparatus, shading correction data generating method, and program
US9413974B2 (en) Information processing apparatus, image sensing apparatus, control method, and recording medium for conversion processing
JP2007306422A (en) Imaging apparatus and imaging method
JP6157274B2 (en) Imaging apparatus, information processing method, and program
JP2010056817A (en) Imaging apparatus
JP4449692B2 (en) Electronic camera
JP4028396B2 (en) Image composition method and digital camera
JP5627252B2 (en) Imaging apparatus and control method thereof
JP2009044236A (en) White balance adjustment device and white balance adjustment method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070424

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20091125

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4433883

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130108

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees