JP4433883B2 - White balance correction device, white balance correction method, program, and electronic camera device - Google Patents
White balance correction device, white balance correction method, program, and electronic camera device Download PDFInfo
- Publication number
- JP4433883B2 JP4433883B2 JP2004161705A JP2004161705A JP4433883B2 JP 4433883 B2 JP4433883 B2 JP 4433883B2 JP 2004161705 A JP2004161705 A JP 2004161705A JP 2004161705 A JP2004161705 A JP 2004161705A JP 4433883 B2 JP4433883 B2 JP 4433883B2
- Authority
- JP
- Japan
- Prior art keywords
- white balance
- coefficient
- correction
- acquired
- image
- 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
Links
Images
Landscapes
- Color Television Image Signal Generators (AREA)
- Processing Of Color Television Signals (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
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 the distance is too far to reach the strobe light or when 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には、入力した画像を複数のブロック領域に分割し、ブロック毎に異なるホワイトバランス補正量を設定して、ホワイトバランス補正を施す方法が記載されている。
しかしながら、上記のようにブロック毎に異なる補正量によるホワイトバランスを施す方法においては、互いに隣接するブロック同士の境界部分に色調の違い(色ずれ)が不可避的に生じ、結果的に画質が低下するという問題があった。 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
かかる構成においては、画像が、画素毎に取得された補正係数に基づき画素毎にホワイトバランスを調整されることにより、画像内に異なる種類の光源の照射エリアが存在する場合においても、画像の全域に適したホワイトバランス補正を行うことができる。しかも、複数の注目画素の間に位置する非注目画素の補正係数が、非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得されるため、隣接する注目画素と非注目画素、又は隣接する非注目画素同士の間における画素毎の補正係数を滑らかに変化させることができる。同時に、非注目画素の補正係数を画像に基づき直接取得する場合に比べ、ホワイトバランス補正に要するデータ処理量を削減することができる。 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
また、請求項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 image is acquired by linear interpolation based on distances from a plurality of target pixels existing around the pixel.
また、請求項5の発明にあっては、画像における互いに離間する複数の注目画素のホワイトバランスの補正係数を個別に取得する第1の工程と、前記複数の注目画素の間に位置する非注目画素におけるホワイトバランスの補正係数を、第1の工程で取得した、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第2の工程と、前記注目画素に対しては前記第1の工程によって取得された補正係数に基づきホワイトバランス補正を施し、前記非注目画素に対しては前記第2の工程によって取得された補正係数に基づきホワイトバランス補正を施す第3の工程とを含む方法とした。
In the invention of
かかる方法によれば、画像が、画素毎に取得された補正係数に基づき画素毎にホワイトバランスを調整されることにより、画像内に異なる種類の光源の照射エリアが存在する場合においても、画像の全域に適したホワイトバランス補正を行うことができる。しかも、複数の注目画素の間に位置する非注目画素の補正係数が、非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得されるため、隣接する注目画素と非注目画素、又は隣接する非注目画素同士の間における画素毎の補正係数を滑らかに変化させることができる。同時に、非注目画素の補正係数を画像に基づき直接取得する場合に比べ、ホワイトバランス補正に要するデータ処理量を削減することができる。 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
また、請求項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. It 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
また、本発明電子カメラ装置によれば、撮像した被写体画像の全域に亙って色ずれが生じない良好なホワイトバランス補正を施すことが可能となり、また、それを高速に行うことができる。 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
このデジタルカメラ1は、撮像素子であるCCD2により被写体を撮像し、撮像により取得した被写体画像をLCD(液晶表示装置)4に表示させるとともに、撮影操作に応じて、撮像した被写体画像を画像データに変換し画像メモリ5に記録する構成であるとともに、AE(自動露出制御)、AF(オートフォーカス)、AWB(オートホワイトバランス)の各機能を有している。なお、画像メモリ5は、カメラ本体に内蔵又は着脱自在なフラッシュメモリ等の不揮発性メモリである。
The
CCD2は、感光部にベイヤー配列の原色フィルターが設けられたものであり、CCD2から出力されたアナログの撮像信号は、信号処理部3において各種の信号処理を施されて、最終的には輝度信号(Y信号)と色差信号(Cb信号、Cr信号)を含んだYUVデータ、すなわちデジタルの画像信号として出力される。
The
信号処理部3から出力された画像信号は、撮影待機状態にあるときLCD4に送られて被写体画像として表示される。また、撮影操作時には、CPU6によりJPEG等の所定フォーマットに従い圧縮され画像メモリ5に記録される。画像メモリ5に記録された圧縮後の画像データは、必要に応じCPU6により読み出され、いったん伸張された後LCD4において静止画像、或いは動画像として再生表示される。
The image signal output from the
また、デジタルカメラ1は、CPU6が上記画像データの圧縮・伸張、及び装置全体の制御に必要とする各種の制御プログラムが記録されたROM7と、CPU6の作業用メモリであるRAM8、キー入力部9、レンズ駆動部10を有している。ROM7には、CPU6に後述するホワイトバランスの補正係数取得処理を行わせることにより、CPU6を本発明の第1の係数取得手段、第2の係数取得手段として機能させるためのプログラムが格納されている。
The
キー入力部9は、シャッターキーや、動作モードの切り替えに使用されるモード切替キー等からなり、キー操作に応じた操作信号をCPU6へ出力する。レンズ駆動部10は、CCD2の前面に配置されたフォーカスレンズを含む光学系を光軸方向に駆動するモーターや、それを制御するためのドライバー等から構成され、AF制御時におけるCPU6からの指令に基づきレンズ位置を変化させる。
The
図2は、前述した信号処理部3の詳細を示すブロック図である。信号処理部3は、CCD2から出力されるアナログの撮像信号が入力するアナログ処理部11と、黒レベル調整部12、色補間部13、計測部14、ホワイトバランス調整部15、ガンマ補正部19、フィルタ処理部20、YUV変換処理部21の各部から構成されている。
FIG. 2 is a block diagram showing details of the
アナログ処理部11は、CCD2から出力された撮像信号に含まれるCCD2の駆動ノイズを減少させる相関二重サンプリング回路(CDS回路)と、ノイズ低減後における信号のゲインを調整する自動利得制御回路(AGC回路)、ゲイン調整後の信号をデジタル信号に変換するA/D変換器を含み、CCD2から入力したアナログの撮像信号をデジタルの画像信号、すなわちベイヤーデータに変換する。黒レベル調整部12は、デジタル化された画像信号を所定の黒レベルにクランプする。
The
色補間部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
ホワイトバランス調整部15は本発明の補正手段であって、色補間部13で生成されたRGBデータをストアするメモリ16と、メモリ16上のRGBデータを読み出し、画素毎にホワイトバランス補正係数(以下、単に補正係数という。)をかけて、前記ガンマ補正部19へ出力するゲイン乗算回路17と、その補正係数が設定される係数レジスタ18とから構成されている。係数レジスタ18に設定される補正係数は、後述する処理によってCPU6から送られる各画素に対するR画素用のゲイン(Rゲイン係数)とB画素用のゲイン(Bゲイン係数)である。
The white
ガンマ補正部19は、ホワイトバランス調整後のRGBデータに対するガンマ特性(階調特性)の補正を行い、フィルタ処理部20は、ガンマ補正後のRGBデータに種々のフィルタ処理を施し、YUV変換処理部21は、RGBデータから輝度信号(Y)と色差信号(U、V)からなるYUVデータを画素毎に生成し、CPU6やLCD4へ出力する。
The
次に、以上の構成において、CCD2が駆動されている間にCPU6が実施するホワイトバランスの補正係数取得処理に関する手順を図4のフローチャートに従って説明する。
Next, a procedure related to the white balance correction coefficient acquisition process performed by the
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
例えば図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
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
そして、算出した全ての非中心画素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
これにより、画像内の全ての画素に対する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
以上のように本実施の形態においては、画素毎に取得した補正係数(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
しかも、非中心画素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
なお、本実施の形態においては、各係数ブロック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
また、本実施の形態とは異なり、計測部14の係数ブロック111毎のR,G,B値の積分処理を含めた中心画素121のR,Bゲイン係数の取得に要する全ての処理をCPU6によりプログラム処理で行う場合においては、複数の注目画素の補正係数を効率的に取得することができる。つまりCPU6のデータ処理負担を必要最小限に止めることができる。
Further, unlike the present embodiment, the
また、本実施の形態においては、ベイヤー画像101を均等に256分割した係数ブロック111毎に、中心画素121のR,Bゲイン係数を取得するものを示したが、係数ブロック111の分割数や、係数ブロック111の個々の形状については適宜変更することができる。
Further, in the present embodiment, the acquisition of the R and B gain coefficients of the
また、非中心画素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
また、本実施の形態においては、ベイヤー画像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
また、本実施の形態においては、CCDを備えたデジタルカメラに本発明を採用した場合について説明したが、これに限らず本発明は、CMOSセンサを備えたデジタルカメラや、CCDやCMOSセンサ等の撮像素子を備えた他の撮像装置、例えばデジタルビデオカメラ、カメラ付き携帯電話機、カメラ付きPDA、カメラ付きパソコン等の種々の電子カメラ装置にも採用することができる。その場合においても、前述した効果を得ることができる。 In the present 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 can be applied to a digital camera equipped with a CMOS sensor, a CCD, a CMOS sensor, etc. 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
次に、以上の構成からなるパソコン51において、画像処理プログラムが起動しているときCPU52が必要に応じて実行する画像に対するホワイトバランス補正処理の内容を図6のフローチャートにしたがって説明する。なお、ここでは、処理対象となる画像が、第1の実施の形態で説明したデジタルカメラのCCD2と同様に感光部にベイヤー配列の原色フィルターを有した撮像素子を備えた任意のデジタルカメラで撮影され記録された撮影画像であり、例えばメモリカードを介してカードドライブ63からハードディスク61に読み込まれているものとする。また、上記撮影画像のデータが、一般にRAWデータと呼ばれる撮像素子の生出力データ、つまり撮像素子における画素毎のデータ(ここでは、ベイヤーデータ)であるものとする。
Next, in the
以下、説明すると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
引き続き、処理対象の画像データに色補間処理を施して、画素毎に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
したがって、本実施の形態のパソコン51においても、第1の実施の形態に示したデジタルカメラ1と同様、画面内の被写体に複数の光源照射があり、その照射エリアがある程度分離されているような場合であっても、照射エリア毎に適したホワイトバランスを確保することができる。同時に、隣接する係数ブロック111同士の境界部分に色ずれが生じることがない。したがって、画面全域に極めて良好なホワイトバランス補正を施すことができる。しかも、画素毎にホワイトバランス調整を行っても、ホワイトバランス補正を高速に行うことができるとともに、CPU52にかかる処理負担を抑えることができる。
Therefore, also in the
また、各係数ブロック111における中心画素121のR,Bゲイン係数を、色補間前のベイヤー画像101を構成する画素のR,G,B毎の積分値に基づき取得するため、複数の注目画素の補正係数を効率的に取得することができる。つまりCPU52のデータ処理負担を必要最小限に止めることができる。
In addition, since the R and B gain coefficients of the
なお、本実施の形態においては、処理対象の撮影画像のデータが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
また、本実施の形態においても、係数ブロック111の分割数や、係数ブロック111の個々の形状については適宜変更することができ、また、非中心画素122の補正係数を、その周囲に存在する複数の中心画素121の補正係数から、線形補間以外のスプライン補間などの他の補間方法を用いて求めるようにしてもよい。
Also in the present embodiment, the number of divisions of the
また、本実施の形態においては、前述したように汎用的な構成を備えたパソコン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
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
3
7 ROM
8 RAM
13
53 ROM
54 RAM
56
Claims (7)
前記複数の注目画素の間に位置する前記画像における非注目画素のホワイトバランスの補正係数を、前記第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の工程で取得した、当該非注目画素の周囲に存在する複数の注目画素の補正係数から補間によって取得する第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.
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 JP2005347811A (en) | 2005-12-15 |
JP4433883B2 true 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 (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033538A (en) * | 2015-03-19 | 2016-10-19 | 联想(北京)有限公司 | Information processing method and electronic equipment |
Families Citing this family (18)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4916341B2 (en) | 2007-02-28 | 2012-04-11 | オリンパス株式会社 | Image processing apparatus and image processing program |
JP5021338B2 (en) | 2007-03-02 | 2012-09-05 | 富士フイルム株式会社 | White balance correction apparatus and method |
JP5105964B2 (en) * | 2007-06-12 | 2012-12-26 | キヤノン株式会社 | Imaging apparatus, control method therefor, and program |
JP5095294B2 (en) * | 2007-08-02 | 2012-12-12 | 株式会社リコー | Imaging apparatus and imaging method |
JP5169318B2 (en) * | 2007-09-18 | 2013-03-27 | 株式会社リコー | Imaging apparatus and imaging method |
JP5146015B2 (en) * | 2008-03-04 | 2013-02-20 | 株式会社リコー | Imaging apparatus and imaging method |
KR100987030B1 (en) | 2008-09-18 | 2010-10-11 | 연세대학교 산학협력단 | Method and apparatus for correcting white balance |
JP5187241B2 (en) * | 2009-02-16 | 2013-04-24 | 株式会社リコー | Imaging apparatus and imaging method |
JP5321163B2 (en) | 2009-03-12 | 2013-10-23 | 株式会社リコー | Imaging apparatus and imaging method |
JP4900419B2 (en) * | 2009-05-20 | 2012-03-21 | カシオ計算機株式会社 | Image processing apparatus 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 |
JP5761946B2 (en) * | 2010-09-02 | 2015-08-12 | キヤノン株式会社 | Image processing apparatus, image processing method, and storage medium |
JP5325246B2 (en) * | 2011-03-10 | 2013-10-23 | 株式会社メガチップス | Image processing device |
JP5911241B2 (en) * | 2011-09-07 | 2016-04-27 | キヤノン株式会社 | Image processing apparatus, image processing method, and program |
JP5698796B2 (en) * | 2013-06-21 | 2015-04-08 | 株式会社メガチップス | Image processing device |
JP6953961B2 (en) * | 2017-09-27 | 2021-10-27 | カシオ計算機株式会社 | Image processing equipment, image processing methods and programs |
CN114363480B (en) * | 2020-09-29 | 2023-09-26 | 合肥君正科技有限公司 | Adaptive lens shading correction method and system based on color temperature and illumination |
CN115460386B (en) * | 2022-08-31 | 2024-05-17 | 武汉精立电子技术有限公司 | Method and system for acquiring color image by black-and-white camera |
-
2004
- 2004-05-31 JP JP2004161705A patent/JP4433883B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106033538A (en) * | 2015-03-19 | 2016-10-19 | 联想(北京)有限公司 | Information processing method and electronic equipment |
Also Published As
Publication number | Publication date |
---|---|
JP2005347811A (en) | 2005-12-15 |
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 | |
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 | |
JP4004849B2 (en) | Color correction circuit and imaging device | |
JP2007306422A (en) | Imaging apparatus and imaging method | |
JP6157274B2 (en) | Imaging apparatus, information processing method, and program | |
JP2005277618A (en) | Photography taking apparatus and device and method for correcting shading | |
JP2017229025A (en) | Image processing apparatus, image processing method, and program | |
JP2010056817A (en) | Imaging apparatus | |
JP2010154390A (en) | Imaging device, imaging method, and program | |
JP4879508B2 (en) | Conversion parameter calculation method, conversion parameter calculation program, and image processing apparatus |
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 |