JP2011139489A - Apparatus for adjusting white balance, and apparatus for identifying color - Google Patents

Apparatus for adjusting white balance, and apparatus for identifying color Download PDF

Info

Publication number
JP2011139489A
JP2011139489A JP2011020430A JP2011020430A JP2011139489A JP 2011139489 A JP2011139489 A JP 2011139489A JP 2011020430 A JP2011020430 A JP 2011020430A JP 2011020430 A JP2011020430 A JP 2011020430A JP 2011139489 A JP2011139489 A JP 2011139489A
Authority
JP
Japan
Prior art keywords
color
cluster
white balance
area
region
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
JP2011020430A
Other languages
Japanese (ja)
Other versions
JP5225403B2 (en
Inventor
Takanaga Miki
隆永 三木
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.)
Eastman Kodak Co
Original Assignee
Eastman Kodak Co
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 Eastman Kodak Co filed Critical Eastman Kodak Co
Priority to JP2011020430A priority Critical patent/JP5225403B2/en
Publication of JP2011139489A publication Critical patent/JP2011139489A/en
Application granted granted Critical
Publication of JP5225403B2 publication Critical patent/JP5225403B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

<P>PROBLEM TO BE SOLVED: To improve accuracy of white balance adjustment. <P>SOLUTION: Images from an imaging device 10 are divided into blocks, and white balance gain is calculated using a representative value of each block. Before calculation of the representative value of each block, whether a pixel belongs to a light source color or an obvious object color region is determined by a color gamut determination circuit 13 for every pixel constituting each block. The representative value of the block is calculated by residual pixels obtained by excluding the pixels determined to be in the obvious object color region. The accuracy of the white balance gain is improved by preventing the object color from being reflected in the representative value. <P>COPYRIGHT: (C)2011,JPO&INPIT

Description

本発明は、デジタルカメラ等の撮像装置で撮影された画像のホワイトバランスを調整する技術に関する。   The present invention relates to a technique for adjusting white balance of an image taken by an imaging apparatus such as a digital camera.

デジタルカメラ等においては、白い被写体を白く再現するためにオートホワイトバランス調整が行われている。ホワイトバランス方式としては、画像全体の平均が無彩色となるように各画素の信号のRGB成分のバランスを調整する方式が用いられる。また、画像を複数のブロックに分割し、各ブロックのRGBの平均値を算出し、その平均値が予め定めた範囲に属しているブロックのみを抽出し、抽出したブロック群のRGBの平均値が無彩色となるようにRGB各成分の調整を行う技術も知られている。   In a digital camera or the like, auto white balance adjustment is performed to reproduce a white subject white. As the white balance method, a method of adjusting the balance of the RGB components of the signal of each pixel so that the average of the entire image becomes an achromatic color is used. Also, the image is divided into a plurality of blocks, the average value of RGB of each block is calculated, only blocks whose average value belongs to a predetermined range are extracted, and the average value of RGB of the extracted block group is There is also known a technique for adjusting each of RGB components so that an achromatic color is obtained.

さらに、下記の特許文献には、画像を複数のブロックに分割し、各ブロックの代表値を算出し、全てのブロックの代表値を用いてホワイトバランスゲインを算出する技術が開示されている。   Further, the following patent document discloses a technique for dividing an image into a plurality of blocks, calculating a representative value of each block, and calculating a white balance gain using the representative values of all the blocks.

図12に、この従来技術の構成ブロック図を示す。デジタルカメラ等の撮像装置10は、画像を撮影し、得られた画像をブロック分割回路12に出力する。   FIG. 12 shows a configuration block diagram of this prior art. The imaging device 10 such as a digital camera takes an image and outputs the obtained image to the block dividing circuit 12.

ブロック分割回路12は、入力画像を複数のブロックに等分割する。各ブロックは、n×m画素から構成される。ブロック分割回路12は、各ブロックを順次代表値計算回路14に出力する。   The block dividing circuit 12 equally divides the input image into a plurality of blocks. Each block is composed of n × m pixels. The block division circuit 12 sequentially outputs each block to the representative value calculation circuit 14.

代表値計算回路14は、各ブロックを構成するn×m個の画素のRGBの平均値を算出し、その平均値に対して次の線形変換を施して代表値(Tl、Tg、Ti)を算出する。
ここで、Tlはブロックの輝度、Tg、Tiはブロックの色差である。代表値計算回路14は、算出した各ブロックの代表値(Tl、Tg、Ti)をホワイトバランス評価回路16に出力する。
The representative value calculation circuit 14 calculates an RGB average value of n × m pixels constituting each block, and performs the following linear transformation on the average value to obtain representative values (Tl, Tg, Ti). calculate.
Here, Tl is the luminance of the block, and Tg and Ti are the color differences of the block. The representative value calculation circuit 14 outputs the calculated representative values (Tl, Tg, Ti) of each block to the white balance evaluation circuit 16.

ホワイトバランス評価回路16は、各ブロックの信頼度を評価し、信頼度に応じた重み係数を算出してホワイトバランスゲイン計算回路18に出力する。信頼度は、例えば各光源についての経験的知識を用いて評価され、被写体の輝度が非常に高い場合には照明が蛍光灯である可能性が低いという経験的知識を用いて特定ブロック(蛍光灯の可能性が高いブロック)の重みを被写体輝度が増大するほど小さく設定する。   The white balance evaluation circuit 16 evaluates the reliability of each block, calculates a weighting factor corresponding to the reliability, and outputs the weight coefficient to the white balance gain calculation circuit 18. The reliability is evaluated by using, for example, empirical knowledge about each light source. When the luminance of the subject is very high, the reliability is not likely to be a fluorescent lamp. The weight of the block that is highly likely to be) is set smaller as the subject brightness increases.

ホワイトバランスゲイン計算回路18は、各ブロックの代表値、及びホワイトバランス評価回路16で算出された各ブロックの信頼度に基づく重み係数を用いて加重平均することによりホワイトバランスゲインを算出する。具体的には、以下の式によりホワイトバランスゲインを算出する。
ここで、TlMix、TgMix、TiMixは、各ブロックの代表値の加重平均値である。上記の式で算出された(RMix、GMix、BMix)が被写体を照明する光源の色であり、ホワイトバランスゲインRgain、Ggain、Bgainはこの光源色が白色物体で反射されたときの色をグレイに補正する(つまりR=G=B)ように設定される。ホワイトバランスゲイン計算回路18は、算出したゲインをホワイトバランス調整回路20に出力する。
The white balance gain calculation circuit 18 calculates a white balance gain by performing weighted averaging using a representative value of each block and a weighting factor based on the reliability of each block calculated by the white balance evaluation circuit 16. Specifically, the white balance gain is calculated by the following equation.
Here, TlMix, TgMix, and TiMix are weighted average values of representative values of each block. The (RMix, Gmix, Bmix) calculated by the above formula is the color of the light source that illuminates the subject. The white balance gains Rgain, Ggain, and Bgain are gray when the light source color is reflected by a white object. It is set to correct (that is, R = G = B). The white balance gain calculation circuit 18 outputs the calculated gain to the white balance adjustment circuit 20.

ホワイトバランス調整回路20は、撮像装置10から入力した画像を構成する各画素の画素値R、G、Bに対してホワイトバランスゲイン計算回路18で算出したゲインを乗じることで画像のホワイトバランスを調整し、その結果を出力する。   The white balance adjustment circuit 20 adjusts the white balance of the image by multiplying the pixel values R, G, and B of each pixel constituting the image input from the imaging device 10 by the gain calculated by the white balance gain calculation circuit 18. And output the result.

特開2000−92509号公報JP 2000-92509 A

しかしながら、上記従来技術では、各ブロックを構成する全画素のR,G,B平均値を求め、その平均値に対して(1)式を用いて各ブロックの代表値を算出しているから、あるブロック内に光源色ではない特定の物体色が存在した場合に、そのブロックの平均値はその物体色の影響を受けてしまう。   However, in the above prior art, the R, G, B average values of all the pixels constituting each block are obtained, and the representative value of each block is calculated using equation (1) for the average value. When a specific object color that is not a light source color exists in a block, the average value of the block is affected by the object color.

図13に、画像を複数のブロックに分割した場合における、あるブロック100を示す。ブロック100はn×m個の画素から構成され、全画素のR,G,Bの単純平均が算出される。ところが、図に示すように、ブロック100内に緑の葉の画像102が存在する場合、背景色と緑色とが平均化されることになるから、その平均値はブロックを照らしている光源の色を反映しなくなり、本来であればデイライトと判定すべきところを蛍光灯と誤って判定しまう事態が生じ得る。   FIG. 13 shows a block 100 when the image is divided into a plurality of blocks. The block 100 is composed of n × m pixels, and a simple average of R, G, and B of all the pixels is calculated. However, as shown in the figure, when a green leaf image 102 exists in the block 100, the background color and the green color are averaged, so the average value is the color of the light source illuminating the block. Therefore, there may be a situation in which a place that should be determined as daylight is erroneously determined as a fluorescent lamp.

このように、従来技術では、ブロック内に有彩色のものが存在する場合やブロック内が一様でない場合の対策が十分でなく、ホワイトバランス調整の精度低下を招く一因となっていた。   As described above, according to the conventional technique, there is not enough countermeasures when a chromatic color is present in a block or when the block is not uniform, which causes a decrease in accuracy of white balance adjustment.

本発明の目的は、ブロック内に有彩色のものが存在する場合やブロック内が一様ではない場合においてもホワイトバランス調整を確実に実行できる装置を提供することにある。   An object of the present invention is to provide an apparatus capable of reliably performing white balance adjustment even when a chromatic color is present in a block or when the block is not uniform.

本発明は、入力画像のホワイトバランスを調整するホワイトバランス調整装置であって、入力画像の各画素の色度に基づき入力画像を複数のクラスタに分割する分割手段と、各クラスタの代表値を演算する代表値演算手段と、前記代表値に基づき各クラスタが物体色クラスタであるか否かを判定する判定手段と、全てのクラスタのうち物体色クラスタと判定されたクラスタを除く残存クラスタの代表値を用いてホワイトバランスゲインを演算するゲイン演算手段とを有することを特徴とする。   The present invention is a white balance adjustment device that adjusts the white balance of an input image, the dividing means for dividing the input image into a plurality of clusters based on the chromaticity of each pixel of the input image, and calculating the representative value of each cluster Representative value calculating means, determining means for determining whether each cluster is an object color cluster based on the representative value, and representative values of remaining clusters excluding clusters determined as object color clusters among all clusters And gain calculating means for calculating a white balance gain using.

また、本発明は、入力画像を色度が一致する画素群で構成される複数のクラスタに分割し、各クラスタの代表値を用いてホワイトバランスを調整するホワイトバランス調整装置であって、全クラスタのうち、光源色を反映しているクラスタを選択する選択手段と、選択されたクラスタの代表値のみを用いて前記ホワイトバランスを調整する調整手段とを有することを特徴とする。   The present invention also relates to a white balance adjustment device that divides an input image into a plurality of clusters composed of pixel groups having the same chromaticity and adjusts the white balance using a representative value of each cluster. Among them, there is a selection means for selecting a cluster reflecting the light source color, and an adjustment means for adjusting the white balance using only the representative value of the selected cluster.

また、本発明は、入力画像を構成するクラスタが光源色を反映しているか否かを識別する色識別装置であって、前記クラスタの色差を算出する色差演算手段と、色差平面上において、複数の光源下における無彩色物体の色差領域を光源色領域として記憶するとともに特定色物体の色差領域を物体色領域として記憶する記憶手段と、前記クラスタの色差が前記記憶手段に記憶された光源色領域あるいは物体色領域に属するか否かを判定することで前記クラスタが光源色を反映しているか否かを識別する処理手段とを有することを特徴とする。   The present invention is also a color identification device for identifying whether or not a cluster constituting an input image reflects a light source color, and includes a color difference calculation means for calculating a color difference of the cluster, and a plurality of color difference planes on the color difference plane. Storage means for storing the color difference area of the achromatic object under the light source as a light source color area and storing the color difference area of the specific color object as the object color area; and a light source color area in which the color difference of the cluster is stored in the storage means Alternatively, it has a processing means for identifying whether or not the cluster reflects a light source color by determining whether or not it belongs to the object color region.

本発明によれば、ホワイトバランスの調整精度を向上でき、高品質画質を得ることができる。   According to the present invention, white balance adjustment accuracy can be improved, and high quality image quality can be obtained.

実施形態の構成ブロック図である。It is a configuration block diagram of an embodiment. 入力画像の画素構成図である。It is a pixel block diagram of an input image. 色差平面上の光源色領域と明らかな物体色領域の説明図である。It is explanatory drawing of the light source color area | region on a color difference plane, and a clear object color area | region. 処理結果を示す説明図である。It is explanatory drawing which shows a process result. 実施形態のフローチャートである。It is a flowchart of an embodiment. 他の実施形態の構成ブロック図である。It is a block diagram of the configuration of another embodiment. クラスタリングの説明図である。It is explanatory drawing of clustering. グレーゾーンの識別説明図である。It is identification explanatory drawing of a gray zone. 実施形態のフローチャートである。It is a flowchart of an embodiment. 特定色域領域の説明図である。It is explanatory drawing of a specific color gamut area | region. 特定色域領域の位置調整説明図である。It is a position adjustment explanatory diagram of a specific color gamut region. 従来装置の構成ブロック図である。It is a block diagram of a conventional apparatus. ブロック内に葉像が存在する説明図である。It is explanatory drawing in which the leaf image exists in a block.

以下、図面に基づき本発明の実施形態について説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

<第1実施形態>
図1に、本実施形態に係るホワイトバランス調整装置の構成ブロック図を示す。本実施形態のホワイトバランス調整装置は、プロセッサ及びメモリを有する画像処理ICとしてデジタルカメラに内蔵される。図12に示す従来の構成と異なる点は、代表値計算回路14の前段に色域判定回路13が設けられる点である。
<First Embodiment>
FIG. 1 is a block diagram showing the configuration of the white balance adjusting apparatus according to this embodiment. The white balance adjustment device of this embodiment is built in a digital camera as an image processing IC having a processor and a memory. The difference from the conventional configuration shown in FIG. 12 is that a color gamut determination circuit 13 is provided in the preceding stage of the representative value calculation circuit 14.

ブロック分割回路12は、撮像装置10から入力した画像を複数のブロックに等分割し、各ブロックを順次色域判定回路13に出力する。   The block division circuit 12 equally divides the image input from the imaging device 10 into a plurality of blocks, and sequentially outputs each block to the color gamut determination circuit 13.

色域判定回路13は、各ブロックを構成するn×m個の画素それぞれに対し、その色差に基づいて明らかな物体色の画素であるか否かを判定し、明らかな物体色の画素とそうでない画素とを識別する。色域判定回路13は、全てのブロックに対し、そのブロックを構成する各画素を識別し、識別結果を代表値計算回路14に出力する。識別結果は、例えば明らかな物体色の画素に対して特定のフラグを設定することで行う。   The color gamut determination circuit 13 determines whether or not each of the n × m pixels constituting each block is a pixel having an apparent object color based on the color difference, and determines that the pixel has an apparent object color. Identify non-pixels. The color gamut determination circuit 13 identifies each pixel constituting the block for all blocks and outputs the identification result to the representative value calculation circuit 14. The identification result is obtained, for example, by setting a specific flag for a pixel having an obvious object color.

代表値計算回路14は、基本的に従来の回路と同様に各ブロックの代表値を算出するが、本実施形態の代表値計算回路14は、従来のように各ブロックの構成する全画素の平均値を用いて各ブロックの代表値を算出するのではなく、明らかな物体色と識別された画素を除いた残存画素のみの平均値を用いて各ブロックの代表値を算出する。各ブロックの代表値算出は、(1)式を用いて行われる。(R、G、B)は全画素の平均ではなく、明らかな物体色と識別されていない画素の平均値である点が異なる。代表値計算回路14は、各ブロックの代表値をホワイトバランス評価回路16に出力する。以後の処理は図12と同様であり、各ブロックの代表値を加重平均し、さらに加重平均値から(2)〜(4)式を用いてホワイトバランスゲイン(Rgain、Ggain、Bgain)を算出する。本実施形態では、各ブロックから明らかな物体色の画素を除去して代表値を算出し、この代表値に基づいてホワイトバランスゲインを算出しているから、各ブロック自体は無彩色とは限らず、各ブロックの代表値の加重平均が無彩色であるとして処理する。したがって、入力画像内に無彩色が存在しない場合であっても適当なホワイトバランスゲインを算出することができる。また、各ブロックにおいて残存画素の平均値をもってそのブロックの代表値としているため、各ブロック内のノイズも吸収できる。   The representative value calculation circuit 14 basically calculates the representative value of each block in the same manner as the conventional circuit, but the representative value calculation circuit 14 of the present embodiment calculates the average of all the pixels constituting each block as in the conventional case. Instead of calculating the representative value of each block using the value, the representative value of each block is calculated using the average value of only the remaining pixels excluding the pixels identified as the obvious object color. The representative value calculation for each block is performed using equation (1). The difference is that (R, G, B) is not the average of all pixels, but is the average value of pixels that are not identified as clear object colors. The representative value calculation circuit 14 outputs the representative value of each block to the white balance evaluation circuit 16. The subsequent processing is the same as in FIG. 12, and the representative value of each block is weighted and averaged, and the white balance gain (Rgain, Ggain, Bgain) is calculated from the weighted average value using equations (2) to (4). . In the present embodiment, the representative value is calculated by removing the pixel of the obvious object color from each block, and the white balance gain is calculated based on the representative value. Therefore, each block itself is not necessarily an achromatic color. The weighted average of the representative values of each block is processed as an achromatic color. Therefore, an appropriate white balance gain can be calculated even when there is no achromatic color in the input image. Further, since the average value of the remaining pixels in each block is used as the representative value of that block, noise in each block can be absorbed.

以下、色域判定回路13の処理をより具体的に説明する。   Hereinafter, the processing of the color gamut determination circuit 13 will be described more specifically.

図2に、ブロック分割回路12から入力する各ブロックを構成する画素を示す。ブロックを構成する画素群200のそれぞれはR画素、G画素、及びB画素から構成される。本実施形態では、R画素、G画素、B画素をまとめて1画素202とする。色域判定回路13は、各画素を構成するR画素、G画素、B画素の各画素値を用いて色差(Tg、Ti)を算出する。色差の算出は、(R、G、B)として各画素のR画素値、G画素値、B画素値を用いて(1)式により算出できる。   FIG. 2 shows the pixels constituting each block input from the block dividing circuit 12. Each of the pixel groups 200 constituting the block is composed of R pixels, G pixels, and B pixels. In the present embodiment, the R pixel, the G pixel, and the B pixel are collectively referred to as one pixel 202. The color gamut determination circuit 13 calculates a color difference (Tg, Ti) using each pixel value of the R pixel, the G pixel, and the B pixel constituting each pixel. The color difference can be calculated by the equation (1) using the R pixel value, G pixel value, and B pixel value of each pixel as (R, G, B).

図3に、色差平面(Ti−Tg平面)を示す。色差平面において、一般に光源色と考えられる領域204及び明らかな物体色と考えられる領域206を一義的に設定できる。光源色と考えられる領域204は、Ti及びTgの大きさが所定値以下の矩形領域として設定され、明らかな物体色と考えられる領域はTi及びTgの大きさが所定値より大きい領域として設定される。色域判定回路13は、図3に示す領域204、206をメモリに記憶しておき、各ブロックを構成する各画素に対して算出された色差(Tg、Ti)が、いずれの領域に属するかを識別する。所定値をTith、Tgthとし、あるブロックを構成するある画素の色差(Tga、Tia)が、Tga>Tgth、かつ、Tia>Tithであれば、その画素は明らかな物体色と考えられる領域206の画素であると識別する。   FIG. 3 shows a color difference plane (Ti-Tg plane). In the color difference plane, a region 204 generally considered as a light source color and a region 206 considered as a clear object color can be uniquely set. A region 204 that is considered to be a light source color is set as a rectangular region in which the sizes of Ti and Tg are less than a predetermined value, and a region that is considered to be an obvious object color is set as a region in which the sizes of Ti and Tg are larger than a predetermined value. The The color gamut determination circuit 13 stores the areas 204 and 206 shown in FIG. 3 in a memory, and to which area the color difference (Tg, Ti) calculated for each pixel constituting each block belongs. Identify If the predetermined values are Tith and Tgth, and the color difference (Tga, Tia) of a certain pixel constituting a certain block is Tga> Tgth and Tia> Tith, the pixel is in an area 206 that is considered to be an obvious object color. Identify as a pixel.

なお、無彩色は、分光反射率において波長によらずほぼ一定(フラット)の反射率を有する物体の色をいい、この物体に光源が反射して得られた光の色が光源色と考えられる。デイライト、蛍光灯、タングステン光等の光源の相違により、色差平面上では無彩色は変動する。図3における光源色領域204は、種々の光源下で無彩色の変動する範囲として設定される。一方、明らかな物体色は、分光反射率がフラットでない物体の色である。光源が変化すれば、この物体の分光反射分布は当然ながら変動するが、明らかな物体色はたとえ光源が変化してもその色差は上記の光源色領域204に属することはない。言い換えれば、光源が変化した場合にその色差が光源色領域204に入るものは本実施形態における「明らかな物体色」から除外される。但し、両領域の境界にはグレーゾーンが存在し得る。グレーゾーンの処理については後述する。   The achromatic color refers to the color of an object having a substantially constant (flat) reflectance regardless of the wavelength in spectral reflectance, and the light color obtained by reflecting the light source on this object is considered as the light source color. . The achromatic color fluctuates on the color difference plane due to differences in light sources such as daylight, fluorescent light, and tungsten light. The light source color area 204 in FIG. 3 is set as a range in which the achromatic color varies under various light sources. On the other hand, the obvious object color is the color of an object whose spectral reflectance is not flat. If the light source changes, the spectral reflection distribution of this object naturally changes, but even if the light source changes, the color difference does not belong to the light source color region 204 described above. In other words, when the light source changes, the color difference that enters the light source color region 204 is excluded from the “obvious object color” in the present embodiment. However, a gray zone may exist at the boundary between both regions. The gray zone processing will be described later.

図4に、色域判定回路13で判定したあるブロック100の判定結果を模式的に示す。ブロック100を構成する画素のうち、図中斜線で示した画素が明らかな物体色と考えられる領域206に属する画素、つまり明らかな物体色の画素208で識別された画素を示す。このブロック100の代表値計算では、斜線の画素を除く残存画素の画素値の平均値を算出し、この平均値を用いて(1)式に従いブロック100の代表値を算出する。明らかな物体色の画素208を除去して平均値を算出するため、明らかな物体色の影響を排除し、その代表値も光源色を反映した値となる。図13に即して説明すると、緑の葉の像102を構成する画素群が排除され、残存画素群のみの平均値が算出され、この平均値を用いてブロック100の代表値が算出されることになる。   FIG. 4 schematically shows a determination result of a certain block 100 determined by the color gamut determination circuit 13. Among the pixels constituting the block 100, the pixels indicated by the diagonal lines in the drawing are pixels belonging to the region 206 considered to be an obvious object color, that is, the pixels identified by the pixel 208 of the obvious object color. In the representative value calculation of the block 100, the average value of the pixel values of the remaining pixels excluding the hatched pixels is calculated, and the representative value of the block 100 is calculated according to equation (1) using this average value. Since the average value is calculated by removing the pixel 208 of the obvious object color, the influence of the obvious object color is eliminated, and the representative value is also a value reflecting the light source color. Explaining with reference to FIG. 13, the pixel group constituting the green leaf image 102 is excluded, the average value of only the remaining pixel group is calculated, and the representative value of the block 100 is calculated using this average value. It will be.

図5に、本実施形態の処理フローチャートを示す。まず、撮像装置10から画像を入力すると(S101)、画像を所定サイズのブロックに分割する(S102)。ブロックのサイズは任意である。各ブロックを順次入力し、各ブロックにおいて、そのブロックを構成する各画素の画素値(R、G、B)を用いて(1)式に従い色差(Tg、Ti)を算出する(S103)。算出した色差(Tg、Ti)はその画素を特定する情報、例えば画素番号や画素座標と関連付けてメモリに記憶する。   FIG. 5 shows a processing flowchart of the present embodiment. First, when an image is input from the imaging device 10 (S101), the image is divided into blocks of a predetermined size (S102). The block size is arbitrary. Each block is sequentially input, and in each block, the color difference (Tg, Ti) is calculated according to the equation (1) using the pixel values (R, G, B) of each pixel constituting the block (S103). The calculated color difference (Tg, Ti) is stored in the memory in association with information for specifying the pixel, for example, a pixel number or pixel coordinate.

着目している画素の色差(Tg、Ti)を算出した後、その色差(Tg、Ti)が予め設定された、明らかな物体色領域206に属するか否かを判定する(S104)。具体的には、上記のとおり光源色領域206と明らかな物体色領域208とを識別するしきい値Tgth、Tithとの大小を判定する。着目している画素の色差(Tg、Ti)が明らかな物体色領域206に属すると判定された場合、その画素にフラグを設定してメモリに記憶する(S105)。一方、明らかな物体色領域206に属しないと判定された場合、フラグはセットしない。以上の処理をブロックを構成する全ての画素について繰り返し実行する(S106)。そして、あるブロック内の全ての画素について実行した後、メモリからフラグの設定された画素以外の画素を読み出し、読み出した画素の画素値の平均値を算出し、さらに算出された平均値を(R、G、B)として(1)式に従いそのブロックの代表値を算出する(S107)。以上の処理を全てのブロックに対して実行し、全てのブロックについてその代表値を算出する(S108)。全てのブロックの代表値を算出した後、各ブロックの代表値に基づきホワイトバランスゲインを(2)〜(4)に従って算出する(S109)。算出されたホワイトバランスゲインは、撮像装置10から入力した画像を構成する各画素の画素値に乗じられ、ホワイトバランスが調整される。   After calculating the color difference (Tg, Ti) of the pixel of interest, it is determined whether or not the color difference (Tg, Ti) belongs to a preset clear object color region 206 (S104). Specifically, as described above, the threshold values Tgth and Tith for identifying the light source color region 206 and the obvious object color region 208 are determined. If it is determined that the color difference (Tg, Ti) of the pixel of interest belongs to the clear object color region 206, a flag is set for the pixel and stored in the memory (S105). On the other hand, if it is determined that it does not belong to the clear object color area 206, the flag is not set. The above process is repeated for all the pixels constituting the block (S106). Then, after executing for all the pixels in a certain block, the pixels other than the pixel for which the flag is set are read from the memory, the average value of the pixel values of the read pixels is calculated, and the calculated average value is (R , G, B), the representative value of the block is calculated according to the equation (1) (S107). The above processing is executed for all the blocks, and the representative values are calculated for all the blocks (S108). After calculating the representative values of all the blocks, the white balance gain is calculated according to (2) to (4) based on the representative value of each block (S109). The calculated white balance gain is multiplied by the pixel value of each pixel constituting the image input from the imaging device 10 to adjust the white balance.

<第2実施形態>
図6に、本実施形態の構成ブロック図を示す。第1実施形態では、ブロック分割回路12で入力画像を予め定めたサイズのブロックに等分割したが、本実施形態では画像を構成する各画素の色度に応じて動的にクラスタリングする。このため、クラスタリングブロック分割回路22、代表値計算回路24及び色域判定回路26がホワイトバランス評価回路16の前段に設けられる。
Second Embodiment
FIG. 6 shows a configuration block diagram of the present embodiment. In the first embodiment, the input image is equally divided into blocks of a predetermined size by the block dividing circuit 12, but in this embodiment, clustering is dynamically performed according to the chromaticity of each pixel constituting the image. For this reason, the clustering block division circuit 22, the representative value calculation circuit 24, and the color gamut determination circuit 26 are provided before the white balance evaluation circuit 16.

クラスタリングブロック分割回路22は、撮像装置10から画像を入力し、画像を構成する各画素の色度に基づき各画素をクラスタリングする。すなわち、色度が互いに一致する隣接画素同士を順次グループ化していき(同一ラベルを付していく)、同一色度の領域範囲を画定していく。クラスタリングした各領域に順次ナンバリングしてメモリに記憶する。クラスタリングブロック分割回路22は、各クラスタに属する画素を代表値計算回路24に出力する。   The clustering block dividing circuit 22 inputs an image from the imaging device 10 and clusters each pixel based on the chromaticity of each pixel constituting the image. That is, adjacent pixels having the same chromaticity are sequentially grouped (the same label is attached), and the region range of the same chromaticity is defined. Each clustered area is numbered sequentially and stored in the memory. The clustering block division circuit 22 outputs the pixels belonging to each cluster to the representative value calculation circuit 24.

代表値計算回路24は、各クラスタに属する画素の平均値を算出し、算出した平均値(R、G、B)を用いて(1)色に従いそのクラスタの代表値を算出する。代表値計算回路24は、全てのクラスタについてその代表値を算出すると、色域判定回路26に出力する。   The representative value calculation circuit 24 calculates the average value of the pixels belonging to each cluster, and calculates the representative value of the cluster according to (1) color using the calculated average value (R, G, B). When the representative value calculation circuit 24 calculates the representative values for all the clusters, the representative value calculation circuit 24 outputs the representative values to the color gamut determination circuit 26.

色域判定回路26は、図1における色域判定回路13と同様に、図3に示すような光源色領域204及び明らかな物体色領域206をマップとしてメモリに記憶しており、各クラスタの代表値の色差(Tg、Ti)が明らかな物体色領域206に属するか否かを判定する。色域判定回路26は、全てのクラスタについて明らかな物体色か否かを判定した後、明らかな物体色を除く残存クラスタの代表値のみをホワイトバランス評価回路16に出力する。以後の処理は図1と同様である。本実施形態では、光源色領域204に属するクラスタの代表値のみがホワイトバランスゲインの算出に寄与することとなる。   Similar to the color gamut determination circuit 13 in FIG. 1, the color gamut determination circuit 26 stores a light source color area 204 and an apparent object color area 206 as shown in FIG. It is determined whether or not the value color difference (Tg, Ti) belongs to the clear object color region 206. The color gamut determination circuit 26 determines whether or not all the clusters have clear object colors, and then outputs only the representative values of the remaining clusters excluding the clear object colors to the white balance evaluation circuit 16. The subsequent processing is the same as in FIG. In the present embodiment, only representative values of clusters belonging to the light source color region 204 contribute to the calculation of the white balance gain.

図7に、クラスタリングブロック分割回路22、代表値計算回路24及び色域判定回路26の処理を模式的に示す。入力画像1を構成する各画素の色度を算出し、順次メモリに記憶していく。そして、色度が互いに一致する画素に同一ラベルを付してクラスタリングする。なお、図7では説明の都合上白黒で示しているが、実際には赤や緑、橙、黄色等であることに注意されたい。図では、クラスタ300、302、304、306が例示されている。クラスタ300を構成する全画素、つまり同一ラベルを有する画素をメモリから読み出してその平均値(R、G、B)を算出し、(1)式によりクラスタ300の代表値を算出する。代表値のうちの色差(Tg、Ti)が明らかな物体色領域206に属するか否かを判定し、属しない場合には光源色領域300と識別する。同様に、クラスタ302を構成する全画素をメモリから読み出してその平均値(R、G、B)を算出し、(1)式によりクラスタ302の代表値を算出する。代表値のうちの色差(Tg、Ti)が明らかな物体色領域206に属するか否かを判定し、属する場合には明らかな物体色領域302と識別する。   FIG. 7 schematically shows processing of the clustering block division circuit 22, the representative value calculation circuit 24, and the color gamut determination circuit 26. The chromaticity of each pixel constituting the input image 1 is calculated and sequentially stored in the memory. Then, the pixels having the same chromaticity are clustered with the same label. In FIG. 7, it is shown in black and white for convenience of explanation, but it should be noted that it is actually red, green, orange, yellow and the like. In the figure, clusters 300, 302, 304, and 306 are illustrated. All the pixels constituting the cluster 300, that is, the pixels having the same label are read from the memory and the average value (R, G, B) is calculated, and the representative value of the cluster 300 is calculated by the equation (1). It is determined whether or not the color difference (Tg, Ti) of the representative values belongs to the clear object color region 206. If not, the light source color region 300 is identified. Similarly, all the pixels constituting the cluster 302 are read from the memory, the average value (R, G, B) is calculated, and the representative value of the cluster 302 is calculated by the equation (1). It is determined whether or not the color difference (Tg, Ti) among the representative values belongs to the clear object color region 206, and if it belongs, it is identified as the clear object color region 302.

一方、クラスタ304は橙に相当する色度のクラスタであり、明らかな物体色領域206と光源色領域204の境界領域、グレーゾーンに位置する。色度だけから判定すると橙色に相当しタングステンの光源色領域とも識別され得る。しかしながら、クラスタ領域304は明らかな物体色領域302にその周囲を囲まれており、このことからクラスタ領域304も明らかな物体色領域であると判定する。クラスタ306も同様であり、明らかな物体色領域206と光源色領域204のグレーゾーンに位置し、色度だけから判定すると黄緑色に相当し蛍光灯の光源色領域とも識別され得るが、その周囲に色度が近く、しかも明らかな物体色領域302と識別されたクラスタが存在するため、クラスタ306も明らかな物体色領域であると判定する。   On the other hand, the cluster 304 is a cluster having a chromaticity corresponding to orange, and is located in the boundary region between the obvious object color region 206 and the light source color region 204 and in the gray zone. Judging from the chromaticity alone, it corresponds to orange and can be identified as a light source color region of tungsten. However, the cluster area 304 is surrounded by an obvious object color area 302, and from this, it is determined that the cluster area 304 is also an obvious object color area. Similarly, the cluster 306 is located in the gray zone of the obvious object color region 206 and the light source color region 204, and corresponds to yellow-green when judged from the chromaticity alone, and can be identified as the light source color region of the fluorescent lamp. Therefore, the cluster 306 is also determined to be an obvious object color region.

このように、光源色領域であるか、明らかな物体色領域であるかの識別が困難な場合には、
(1)周囲に色度の近いクラスタが存在するか
(2)色度の近いクラスタは光源色領域あるいは明らかな物体色領域のいずれであるか
を判定することで、精度良く識別することができる。すなわち、あるクラスタの識別が困難である場合、つまり、その色差(Tg、Ti)がしきい値(Tgth、Tith)近傍である場合(その差が所定の誤差範囲内にある場合)、周囲に色度の近いクラスタが存在し、そのクラスタが明らかな物体色領域であれば着目しているクラスタも明らかな物体色領域であると識別し、そのクラスタが明らかな物体色領域でなければ着目しているクラスタも光源色領域と識別する。周囲に色度の近いクラスタが存在しない場合、あるいは色度の近いクラスタが複数存在しそれらの識別結果が互いに異なる場合には、いずれの領域に識別するかは任意に設定し得るが、例えば着目しているクラスタを明らかな物体色領域と識別する。以下に、グレーゾーンの着目クラスタを明らかな物体色領域と識別するためのアルゴリズムの一例を示す。
In this way, when it is difficult to identify whether it is a light source color region or an obvious object color region,
(1) A cluster with close chromaticity exists in the surrounding area. (2) A cluster with close chromaticity can be identified with high accuracy by determining whether it is a light source color region or an obvious object color region. . That is, when it is difficult to identify a certain cluster, that is, when the color difference (Tg, Ti) is near the threshold (Tgth, Tith) (when the difference is within a predetermined error range), If there is a cluster with close chromaticity and the cluster is an obvious object color area, the cluster of interest is identified as an obvious object color area, and if the cluster is not an obvious object color area, Are also identified as light source color regions. When there are no clusters with close chromaticity around them, or when there are multiple clusters with close chromaticity and their identification results are different from each other, it can be arbitrarily set which area to identify. Are identified as distinct object color regions. An example of an algorithm for identifying a focused cluster in the gray zone as an obvious object color area is shown below.

(a)色度が近く、既に明らかな物体色と識別されたクラスタが隣接して存在する場合に着目クラスタを明らかな物体色領域と識別する。
(b)色度が近く、既に明らかな物体色と識別されたクラスタが隣接して存在しない場合に、その周囲を既に明らかな物体色と識別されたクラスタが囲んでいる場合には着目クラスタを明らかな物体色領域と識別する。
(A) A cluster of interest is identified as an apparent object color region when there is a cluster that is close to chromaticity and already identified as an obvious object color.
(B) If there is no adjacent cluster that has already been identified as an object color that is close to chromaticity, and if the cluster that has already been identified as an object color surrounds the cluster, It is identified as an obvious object color area.

図8に、グレーゾーンにおける上記処理を模式的に示す。着目しているクラスタ310の色差が色差平面上においてグレーゾーンに存在し、クラスタ310の周囲、あるいは隣接して物体色領域308が存在するものとする。クラスタ310単独では識別できないものの、隣接して物体色領域308が存在する場合、クラスタ310の色度と物体色領域308の色度とを比較する。色度差が所定の許容範囲内である場合には図示のようにクラスタ310を物体色領域310と識別する。色度差が所定の許容範囲を超える場合には、周囲を物体色領域が取り囲んでいるか否かを判定し、取り囲んでいる場合にも物体色領域と識別する。   FIG. 8 schematically shows the above processing in the gray zone. It is assumed that the color difference of the cluster 310 of interest exists in the gray zone on the color difference plane, and the object color region 308 exists around or adjacent to the cluster 310. If the object color region 308 exists adjacent to the cluster 310 that cannot be identified by the cluster 310 alone, the chromaticity of the cluster 310 is compared with the chromaticity of the object color region 308. When the chromaticity difference is within a predetermined allowable range, the cluster 310 is identified as the object color region 310 as shown in the figure. When the chromaticity difference exceeds a predetermined allowable range, it is determined whether or not the object color region surrounds the surroundings, and even if it is surrounded, it is identified as the object color region.

図9に、本実施形態の処理フローチャートを示す。撮像装置10から画像を入力すると(S201)、ブロックに分割することなく、入力画像を構成する各画素毎に色度を算出し、色度の一致する画素群をグループ化することでクラスタを形成する(S202)。クラスタリングはコンピュータを用いた画像処理で周知技術である。ある画素の色度を算出し、隣接する画素の色度と比較し、一致する場合には両画素に同一のラベリングを付していく。以上の処理を全ての画素について行い、同一ラベルが付された画素群を1つのクラスタとしてナンバリングしメモリに記憶する。クラスタ1には画素1、2、3が属し、クラスタ2には画素4、5、6、7が属する等である。クラスタリングを行った後、各クラスタに属する画素の画素値を用いてそのクラスタの代表値を算出する(S203)。すなわち、クラスタに属する画素の平均値を算出し、その平均値を用いて(1)式によりそのクラスタの輝度Tl及び色差(Tg、Ti)を算出する。   FIG. 9 shows a processing flowchart of the present embodiment. When an image is input from the imaging device 10 (S201), a chromaticity is calculated for each pixel constituting the input image without being divided into blocks, and a cluster is formed by grouping pixel groups having the same chromaticity. (S202). Clustering is a well-known technique for image processing using a computer. The chromaticity of a certain pixel is calculated and compared with the chromaticity of adjacent pixels. If they match, both pixels are labeled with the same labeling. The above processing is performed for all the pixels, and the pixel group with the same label is numbered as one cluster and stored in the memory. Pixel 1, 2, 3 belongs to cluster 1, pixels 4, 5, 6, 7 belong to cluster 2, and so on. After clustering, the representative value of the cluster is calculated using the pixel values of the pixels belonging to each cluster (S203). That is, the average value of the pixels belonging to the cluster is calculated, and the luminance Tl and the color difference (Tg, Ti) of the cluster are calculated by the equation (1) using the average value.

クラスタの代表値(Tl、Tg、Ti)を算出した後、代表値の色差(Tg、Ti)を色差平面上において予め設定された光源色領域204及び明らかな物体色領域206(図3参照)と比較し、明らかな物体色領域206に属するか否かを判定する(S204)。明らかな物体色領域206に属する場合には、そのクラスタにフラグを設定する(S205)。明らかな物体色領域206に属しない場合には、そのクラスタにはフラグを設定しない。   After calculating the representative values (Tl, Tg, Ti) of the clusters, the color difference (Tg, Ti) of the representative values is set in advance on the color difference plane, and the light source color region 204 and the obvious object color region 206 (see FIG. 3). And whether it belongs to the clear object color area 206 or not (S204). If it belongs to the obvious object color area 206, a flag is set for the cluster (S205). If it does not belong to the obvious object color area 206, no flag is set for that cluster.

S205の判定処理において、クラスタの色差(Tg、Ti)が光源色領域204と明らかな物体色領域206の境界近傍(グレーゾーン)に位置する場合には、次にそのクラスタに隣接して色度の近いクラスタであって明らかな物体色領域と識別されたクラスタが存在するか否かを判定する。存在すればそのクラスタも明らかな物体色領域に属するとしてフラグを設定する。また、存在しない場合には、さらに周囲を明らかな物体色領域で囲まれているか否かを判定し、囲まれていればそのクラスタも明らかな物体色領域に属するとしてフラグを設定する。図3において、光源色領域204と明らかな物体色領域206との境界に所定幅を有するグレーゾーンを設してもよい。クラスタの色差がこのグレーゾーンに位置する場合に上記の判定処理に移行する。   If the color difference (Tg, Ti) of the cluster is located in the vicinity of the boundary (gray zone) between the light source color region 204 and the obvious object color region 206 in the determination processing of S205, the chromaticity is next adjacent to the cluster. It is determined whether or not there is a cluster identified as an apparent object color area. If it exists, the flag is set on the assumption that the cluster also belongs to the clear object color region. If it does not exist, it is further determined whether or not the surrounding area is surrounded by a clear object color area, and if it is surrounded, a flag is set as belonging to the clear object color area. In FIG. 3, a gray zone having a predetermined width may be provided at the boundary between the light source color region 204 and the obvious object color region 206. When the color difference of the cluster is located in this gray zone, the process proceeds to the above determination process.

以上の処理を全てのクラスタについて繰り返し実行し(S206)、全てのクラスタについて識別した後、フラグの設定されたクラスタを除いた残存クラスタの代表値を用いてホワイトバランスゲインを算出する(S207)。   The above processing is repeatedly executed for all clusters (S206), and after identifying all the clusters, a white balance gain is calculated using the representative values of the remaining clusters excluding the cluster with the flag set (S207).

本実施形態によっても、明らかな物体色と認定されたクラスタを除外してホワイトバランスゲインを算出するため、ホワイトバランスの調整精度を向上することができる。   Also according to the present embodiment, the white balance gain is calculated by excluding clusters recognized as clear object colors, so that the white balance adjustment accuracy can be improved.

なお、本実施形態では、グレーゾーンに位置するクラスタの識別について説明したが、同様の処理を第1実施形態における色域判定回路13で各画素に対して実行することもできる。各画素の色差に基づいて各画素が光源色領域204であるか明らかな物体色領域206であるかを判定する際に、周囲を明らかな物体色画素で囲まれている場合には、着目している画素も物体色画素であると識別する等である。   In the present embodiment, the identification of the cluster located in the gray zone has been described. However, the same processing can be performed on each pixel by the color gamut determination circuit 13 in the first embodiment. When determining whether each pixel is the light source color area 204 or the obvious object color area 206 based on the color difference of each pixel, pay attention when surrounding the area with clear object color pixels. The identified pixel is also identified as an object color pixel.

<第3実施形態>
上記の実施形態では、図3に示す領域マップを用いて各画素あるいは各クラスタが明らかな物体色領域206に属するか否かを判定しているが、さらに特定の物体固有の色差領域を設定し、これらの特定領域に属するか否かを判定することで識別精度を向上することもできる。
<Third Embodiment>
In the above embodiment, it is determined whether or not each pixel or each cluster belongs to the clear object color area 206 using the area map shown in FIG. 3, but a specific object-specific color difference area is set. It is also possible to improve the identification accuracy by determining whether or not it belongs to these specific areas.

図10に、特定色域領域の一例を示す。特定領域として、青空領域400、肌色領域402、葉領域404、花領域406が色差平面上にマッピングされる。クラスタの色差がこれらの特定色域領域に属する場合に、明らかな物体色領域と識別する。例えば、あるクラスタの色差が葉領域404あるいは花領域406に属する場合、そのクラスタを明らかな物体色領域と識別する。あるクラスタがグレーゾーンに存在していても、これらの特定色域領域に属する場合には、そのクラスタを明らかな物体色領域と識別し、ホワイトバランスゲインの演算から排除することができる。   FIG. 10 shows an example of the specific color gamut region. As the specific region, the blue sky region 400, the skin color region 402, the leaf region 404, and the flower region 406 are mapped on the color difference plane. When the color difference of the cluster belongs to these specific color gamut regions, it is identified as an obvious object color region. For example, when the color difference of a certain cluster belongs to the leaf area 404 or the flower area 406, the cluster is identified as an obvious object color area. Even if a certain cluster exists in the gray zone, if it belongs to these specific color gamut regions, the cluster can be identified as an apparent object color region and excluded from the calculation of the white balance gain.

<第4実施形態>
第3実施形態では、色差平面上に特定色域領域をマッピングし、クラスタの色差がこれらの特定色域領域に属するか否かを判定することで識別精度を上げているが、当然ながら識別精度は各特定色域領域のマッピング精度に依存する。特定色域は、図10に示すような肌色領域402や葉領域404であるが、特定色域領域を増大させるほど識別精度が向上する一方、特定色域領域を細分化するほど正確にマッピングすることが困難となる。
<Fourth embodiment>
In the third embodiment, the identification accuracy is improved by mapping specific color gamut regions on the color difference plane and determining whether or not the color difference of the cluster belongs to these specific color gamut regions. Depends on the mapping accuracy of each specific color gamut region. The specific color gamut is a skin color area 402 or a leaf area 404 as shown in FIG. 10, and the identification accuracy improves as the specific color gamut area increases, while more accurate mapping is performed as the specific color gamut area is subdivided. It becomes difficult.

そこで、本実施形態では、ある特定色域領域における被写体の位置関係から、他の特定色域領域の正確なマッピング位置を推定する。   Therefore, in this embodiment, an accurate mapping position of another specific color gamut region is estimated from the positional relationship of the subject in a specific color gamut region.

図11に、本実施形態の処理を模式的に示す。マッピング補正に用いる被写体は人物の顔画像である。顔画像内には眼部があり、唇部が存在する。ここで、ホワイトバランスの異なる2つの顔画像500、502が存在するものとする。顔画像500の肌色部分及び唇部分と、顔画像502の肌色部分及び唇部分の色差はそれぞれ異なる。一方、色差平面上には、デイライト(昼光)、蛍光灯、タングステン光源を考慮した肌色領域504がマッピングされる。顔画像500における肌色部分の色差は、この肌色領域504内のいずれかに位置し(位置P)、顔画像502における肌色画像の色差も同様に肌色504内のいずれかに位置する(位置Q)。但し、両者の位置は元の画像のホワイトバランスが異なるため肌色領域504内の異なる位置にある。唇部分は肌色部分内に存在するので、肌色部分の位置が異なれば唇部分の位置も当然異なってくる。そこで、図示のように、特定色域領域として唇色領域をマッピングする場合には、肌色領域504内における位置Pに応じて唇色領域506を設定し、あるいは肌色領域504内における位置Qに応じて肌色領域508を設定する。すなわち、肌色領域504における画像の肌色部分の色差位置に応じて、唇色領域の位置をシフトさせる。具体的には、画像処理ICのプロセッサが、メモリに記憶されている肌色領域504の中心位置と肌部分の位置P(あるいは位置Q)とのずれ量に応じて同じメモリに記憶されている唇色領域のデフォルト位置をシフトさせてメモリに再記憶する。これにより、唇色領域を正確にマッピングすることができ、あるクラスタが唇色であるか否かの識別精度が向上する。図において、顔画像500の唇部分は、位置Pに応じて色差平面上に設定された唇色領域506内に位置し、顔画像502の唇部分は、位置Qに応じて色差平面上に設定された唇色領域508に位置していることを示す。唇色領域506しか存在しない場合、顔画像502の唇部分は唇色領域506外となるため正確に識別できないことが理解されよう。位置P、Qに応じた特定色域領域の設定は、唇色領域のみならず他の特定色域領域にも同様に適用できる。例えば、眼部は黒目部分と白目部分から構成されているが、無彩色である白目部分の特定色領域の位置を位置P、Qに応じて可変設定できる。なお、眼部の場合、色差だけでなく、白目部分と黒目部分の輝度差に着目することでさらに精度を上げることも可能である。   FIG. 11 schematically shows the processing of this embodiment. The subject used for mapping correction is a human face image. There are eyes in the face image and lips. Here, it is assumed that there are two face images 500 and 502 with different white balance. The color difference between the skin color portion and lip portion of the face image 500 and the skin color portion and lip portion of the face image 502 are different. On the other hand, on the color difference plane, a skin color region 504 is mapped in consideration of daylight (daylight), a fluorescent lamp, and a tungsten light source. The color difference of the skin color portion in the face image 500 is located anywhere in this skin color area 504 (position P), and the color difference of the skin color image in the face image 502 is also located anywhere in the skin color 504 (position Q). . However, both positions are at different positions in the skin color region 504 because the white balance of the original image is different. Since the lip part exists in the skin color part, the position of the lip part naturally differs if the position of the skin color part is different. Therefore, as shown in the figure, when the lip color area is mapped as the specific color gamut area, the lip color area 506 is set according to the position P in the skin color area 504, or according to the position Q in the skin color area 504. The skin color area 508 is set. That is, the position of the lip color region is shifted according to the color difference position of the skin color portion of the image in the skin color region 504. Specifically, the processor of the image processing IC stores the lips stored in the same memory in accordance with the deviation amount between the center position of the skin color area 504 stored in the memory and the position P (or position Q) of the skin portion. Shift the default position of the color area and store it again in memory. As a result, the lip color region can be accurately mapped, and the identification accuracy of whether or not a certain cluster is a lip color is improved. In the figure, the lip portion of the face image 500 is located in the lip color area 506 set on the color difference plane according to the position P, and the lip portion of the face image 502 is set on the color difference plane according to the position Q. The lip color region 508 is positioned. It will be understood that when only the lip color area 506 exists, the lip portion of the face image 502 is outside the lip color area 506 and cannot be accurately identified. The setting of the specific color gamut region according to the positions P and Q can be similarly applied not only to the lip color region but also to other specific color gamut regions. For example, the eye part is composed of a black eye part and a white eye part, but the position of the specific color region of the achromatic white eye part can be variably set according to the positions P and Q. In the case of the eye part, it is possible to further improve the accuracy by paying attention not only to the color difference but also to the luminance difference between the white eye part and the black eye part.

10 撮像装置、12 ブロック分割回路、13 色域判定回路、14 代表値計算回路、16 ホワイトバランス評価回路、18 ホワイトバランスゲイン計算回路、20 ホワイトバランス調整回路。   10 imaging device, 12 block division circuit, 13 color gamut determination circuit, 14 representative value calculation circuit, 16 white balance evaluation circuit, 18 white balance gain calculation circuit, 20 white balance adjustment circuit.

Claims (11)

入力画像のホワイトバランスを調整するホワイトバランス調整装置であって、
入力画像の各画素の色度に基づき入力画像を複数のクラスタに分割する分割手段と、
各クラスタの代表値を演算する代表値演算手段と、
前記代表値に基づき各クラスタが物体色クラスタであるか否かを判定する判定手段と、
全てのクラスタのうち物体色クラスタと判定されたクラスタを除く残存クラスタの代表値を用いてホワイトバランスゲインを演算するゲイン演算手段と、
を有することを特徴とするホワイトバランス調整装置。
A white balance adjustment device for adjusting the white balance of an input image,
Dividing means for dividing the input image into a plurality of clusters based on the chromaticity of each pixel of the input image;
Representative value calculating means for calculating the representative value of each cluster;
Determining means for determining whether each cluster is an object color cluster based on the representative value;
A gain calculating means for calculating a white balance gain using a representative value of remaining clusters excluding a cluster determined as an object color cluster among all the clusters;
A white balance adjusting device comprising:
請求項1記載の装置において、
前記クラスタの代表値にはそのクラスタの色差が含まれ、
色差平面上における光源色領域及び明らかな物体色領域を予め記憶する記憶手段
を有し、前記判定手段は、前記クラスタの代表値に含まれる前記色差が、前記記憶手段に記憶された明らかな物体色領域に属する場合に前記物体色クラスタと判定することを特徴とするホワイトバランス調整装置。
The apparatus of claim 1.
The representative value of the cluster includes the color difference of the cluster,
Storage means for preliminarily storing a light source color area and an apparent object color area on a color difference plane, and the determination means includes an obvious object in which the color difference included in the representative value of the cluster is stored in the storage means. A white balance adjustment apparatus, wherein the white balance adjustment apparatus determines that the object color cluster belongs to a color region.
請求項2記載の装置において、
前記判定手段は、判定すべき前記色差が前記光源色領域と前記明らかな物体色領域の境界近傍である場合に、周囲の画素あるいはクラスタの判定結果に応じて判定することを特徴とするホワイトバランス調整装置。
The apparatus of claim 2.
The white balance is characterized in that the determination means performs determination according to a determination result of surrounding pixels or clusters when the color difference to be determined is in the vicinity of a boundary between the light source color area and the clear object color area. Adjustment device.
請求項2記載の装置において、
前記記憶手段は、さらに特定物体固有の特定色領域を予め記憶し、
前記判定手段は、判定すべき前記色差が、前記記憶手段に記憶された特定色領域に属する場合に物体色画素あるいは物体色クラスタと判定することを特徴とするホワイトバランス調整装置。
The apparatus of claim 2.
The storage means further stores in advance a specific color region specific to the specific object,
The white balance adjustment apparatus, wherein the determination unit determines an object color pixel or an object color cluster when the color difference to be determined belongs to a specific color region stored in the storage unit.
請求項4記載の装置において、
複数の前記特定色領域の前記色差平面上における位置は、ある基準特定色領域内における特定部位色の位置と前記基準特定色領域の中心位置とのずれに応じて設定されることを特徴とするホワイトバランス調整装置。
The apparatus of claim 4.
The positions of the plurality of specific color regions on the color difference plane are set according to a shift between a position of a specific part color in a certain reference specific color region and a center position of the reference specific color region. White balance adjustment device.
請求項5記載の装置において、
前記基準特定色領域は種々の光源下における肌色の領域であり、前記特定部位色は唇色であることを特徴とするホワイトバランス調整装置。
The apparatus of claim 5.
2. The white balance adjusting apparatus according to claim 1, wherein the reference specific color region is a skin color region under various light sources, and the specific part color is a lip color.
入力画像を色度が一致する画素群で構成される複数のクラスタに分割し、各クラスタの代表値を用いてホワイトバランスを調整するホワイトバランス調整装置であって、
全クラスタのうち、光源色を反映しているクラスタを選択する選択手段と、
選択されたクラスタの代表値のみを用いて前記ホワイトバランスを調整する調整手段と、
を有することを特徴とするホワイトバランス調整装置。
A white balance adjustment device that divides an input image into a plurality of clusters composed of pixel groups having the same chromaticity and adjusts white balance using a representative value of each cluster,
A selection means for selecting a cluster reflecting the light source color among all the clusters,
Adjusting means for adjusting the white balance using only representative values of the selected clusters;
A white balance adjusting device comprising:
入力画像を構成するクラスタが光源色を反映しているか否かを識別する色識別装置であって、
前記クラスタの色差を算出する色差演算手段と、
色差平面上において、複数の光源下における無彩色物体の色差領域を光源色領域として記憶するとともに特定色物体の色差領域を物体色領域として記憶する記憶手段と、
前記クラスタの色差が前記記憶手段に記憶された光源色領域あるいは物体色領域に属するか否かを判定することで前記クラスタが光源色を反映しているか否かを識別する処理手段と、
を有することを特徴とする色識別装置。
A color identification device for identifying whether or not a cluster constituting an input image reflects a light source color,
Color difference calculating means for calculating the color difference of the cluster;
Storage means for storing a color difference area of an achromatic object under a plurality of light sources as a light source color area on the color difference plane and storing a color difference area of a specific color object as an object color area;
Processing means for identifying whether the cluster reflects the light source color by determining whether the color difference of the cluster belongs to a light source color area or an object color area stored in the storage means;
A color identification device characterized by comprising:
請求項8記載の装置において、
前記物体色領域には、肌色領域、葉の緑領域、花の赤領域、青空の青領域の少なくともいずれかが含まれることを特徴とする色識別装置。
The apparatus of claim 8.
The color identification apparatus, wherein the object color area includes at least one of a skin color area, a green area of leaves, a red area of flowers, and a blue area of blue sky.
請求項8記載の装置において、
前記物体色領域には、肌色領域が含まれ、
前記肌色領域内における、前記入力画像の肌色クラスタの色差の位置に応じて前記物体色領域の少なくともいずれかの位置を可変設定する手段
を有することを特徴とする色識別装置。
The apparatus of claim 8.
The object color area includes a skin color area,
A color identification apparatus comprising: means for variably setting at least one position of the object color area in accordance with a position of a color difference of a skin color cluster of the input image in the skin color area.
請求項8記載の装置において、
前記処理手段は、さらに、判定対象のクラスタに隣接して、色度が近く既に物体色領域と識別されたクラスタが存在するか否かにより前記クラスタが光源色を反映しているか否かを識別することを特徴とする色識別装置。
The apparatus of claim 8.
The processing means further identifies whether or not the cluster reflects the light source color by whether or not there is a cluster that is adjacent to the determination target cluster and has already been identified as an object color region with a close chromaticity. A color identification device characterized by:
JP2011020430A 2011-02-02 2011-02-02 White balance adjustment device and color identification device Expired - Fee Related JP5225403B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011020430A JP5225403B2 (en) 2011-02-02 2011-02-02 White balance adjustment device and color identification device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011020430A JP5225403B2 (en) 2011-02-02 2011-02-02 White balance adjustment device and color identification device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2005117456A Division JP4849818B2 (en) 2005-04-14 2005-04-14 White balance adjustment device and color identification device

Publications (2)

Publication Number Publication Date
JP2011139489A true JP2011139489A (en) 2011-07-14
JP5225403B2 JP5225403B2 (en) 2013-07-03

Family

ID=44350371

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011020430A Expired - Fee Related JP5225403B2 (en) 2011-02-02 2011-02-02 White balance adjustment device and color identification device

Country Status (1)

Country Link
JP (1) JP5225403B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014032444A (en) * 2012-08-01 2014-02-20 Asia Air Survey Co Ltd Low resolution image generation method, low resolution image generation device, and program for the same
JP2014063478A (en) * 2012-08-29 2014-04-10 Canon Inc Image processor and the method thereof
JP2017073171A (en) * 2017-01-10 2017-04-13 アジア航測株式会社 Low-resolution image generation method, low-resolution image generation device, and program of the device
JP2018527782A (en) * 2015-06-30 2018-09-20 ユウトウ・テクノロジー(ハンジョウ)・カンパニー・リミテッド Method for controlling projector and projector applied to the method
CN112055191A (en) * 2020-08-25 2020-12-08 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
US11457189B2 (en) * 2019-06-20 2022-09-27 Samsung Electronics Co., Ltd. Device for and method of correcting white balance of image

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102170686B1 (en) 2014-03-18 2020-10-27 한화테크윈 주식회사 Apparatus and method for interpolating white balance

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05130636A (en) * 1991-11-06 1993-05-25 Sharp Corp Automatic white balance circuit
JPH06323908A (en) * 1993-05-14 1994-11-25 Matsushita Electric Ind Co Ltd Illumination-color estimation apparatus
JPH11205812A (en) * 1998-01-19 1999-07-30 Ricoh Co Ltd White balance control method and system thereof
JP2000092509A (en) * 1998-09-11 2000-03-31 Eastman Kodak Japan Ltd Auto-white balance device
JP2002095003A (en) * 2000-09-14 2002-03-29 Olympus Optical Co Ltd Electronic camera
JP2002199409A (en) * 2000-12-25 2002-07-12 Casio Comput Co Ltd Imaging device and its white balance adjustment method
JP2004274344A (en) * 2003-03-07 2004-09-30 Fuji Photo Film Co Ltd Image processing apparatus and method
JP2005142890A (en) * 2003-11-07 2005-06-02 Fuji Photo Film Co Ltd White balance adjusting method and image processing apparatus
JP2006148464A (en) * 2004-11-18 2006-06-08 Fuji Photo Film Co Ltd Apparatus and method for white balance correction

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05130636A (en) * 1991-11-06 1993-05-25 Sharp Corp Automatic white balance circuit
JPH06323908A (en) * 1993-05-14 1994-11-25 Matsushita Electric Ind Co Ltd Illumination-color estimation apparatus
JPH11205812A (en) * 1998-01-19 1999-07-30 Ricoh Co Ltd White balance control method and system thereof
JP2000092509A (en) * 1998-09-11 2000-03-31 Eastman Kodak Japan Ltd Auto-white balance device
JP2002095003A (en) * 2000-09-14 2002-03-29 Olympus Optical Co Ltd Electronic camera
JP2002199409A (en) * 2000-12-25 2002-07-12 Casio Comput Co Ltd Imaging device and its white balance adjustment method
JP2004274344A (en) * 2003-03-07 2004-09-30 Fuji Photo Film Co Ltd Image processing apparatus and method
JP2005142890A (en) * 2003-11-07 2005-06-02 Fuji Photo Film Co Ltd White balance adjusting method and image processing apparatus
JP2006148464A (en) * 2004-11-18 2006-06-08 Fuji Photo Film Co Ltd Apparatus and method for white balance correction

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014032444A (en) * 2012-08-01 2014-02-20 Asia Air Survey Co Ltd Low resolution image generation method, low resolution image generation device, and program for the same
JP2014063478A (en) * 2012-08-29 2014-04-10 Canon Inc Image processor and the method thereof
JP2018527782A (en) * 2015-06-30 2018-09-20 ユウトウ・テクノロジー(ハンジョウ)・カンパニー・リミテッド Method for controlling projector and projector applied to the method
JP2017073171A (en) * 2017-01-10 2017-04-13 アジア航測株式会社 Low-resolution image generation method, low-resolution image generation device, and program of the device
US11457189B2 (en) * 2019-06-20 2022-09-27 Samsung Electronics Co., Ltd. Device for and method of correcting white balance of image
CN112055191A (en) * 2020-08-25 2020-12-08 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium
CN112055191B (en) * 2020-08-25 2022-08-09 浙江大华技术股份有限公司 White balance adjustment method, image acquisition device and storage medium

Also Published As

Publication number Publication date
JP5225403B2 (en) 2013-07-03

Similar Documents

Publication Publication Date Title
JP4849818B2 (en) White balance adjustment device and color identification device
JP5225403B2 (en) White balance adjustment device and color identification device
CN108024055B (en) Method, apparatus, mobile terminal and the storage medium of white balance processing
JP4754227B2 (en) Auto white balance device and white balance adjustment method
US7791649B2 (en) Apparatus, medium, and method with automatic white balance control
KR100983037B1 (en) Method for controlling auto white balance
US8358835B2 (en) Method for detecting and correcting chromatic aberration, and apparatus and method for processing image using the same
JP2003299117A (en) Method of automatically correcting white balance of digital image
JP6274931B2 (en) Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer recording multi-area white balance control program, multi-area white balance image processing device, multi-area white balance image processing method, multi-area White balance image processing program, computer recording multi-area white balance image processing program, and imaging apparatus provided with multi-area white balance image processing device
JP6004221B2 (en) Image processing device
JP2009518982A (en) Adaptive automatic white balance
CN106303483B (en) A kind of image processing method and device
US10491875B2 (en) Image processing apparatus and image processing method
KR101685887B1 (en) Image processing device, image processing method, and computer-readable storage medium having image processing program
US10713764B2 (en) Method and apparatus for controlling image data
US9392180B2 (en) Partial lens shading compensation method
JP2005124186A (en) System and method for correcting image color balance
JP5855852B2 (en) Contrast improvement method using hyperbolic tangent function curve
JP2007097175A (en) White balance mechanism with zone weighting function
US8614750B2 (en) Apparatus and method for auto white balance control considering the effect of single tone image
US20130155254A1 (en) Imaging apparatus, image processing apparatus, and image processing method
KR20200145670A (en) Device and method for correcting white balance of image
JP6196882B2 (en) Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer recording multi-area white balance control program, multi-area white balance image processing device, multi-area white balance image processing method, multi-area White balance image processing program, computer recording multi-area white balance image processing program, and imaging apparatus provided with multi-area white balance image processing device
US9113121B2 (en) Method for white balance adjustment of images
US8804025B2 (en) Signal processing device and imaging device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130121

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130312

R150 Certificate of patent or registration of utility model

Ref document number: 5225403

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

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees