JP3052592B2 - Light source estimation device - Google Patents

Light source estimation device

Info

Publication number
JP3052592B2
JP3052592B2 JP4222432A JP22243292A JP3052592B2 JP 3052592 B2 JP3052592 B2 JP 3052592B2 JP 4222432 A JP4222432 A JP 4222432A JP 22243292 A JP22243292 A JP 22243292A JP 3052592 B2 JP3052592 B2 JP 3052592B2
Authority
JP
Japan
Prior art keywords
chromaticity
light source
unit
color
average
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP4222432A
Other languages
Japanese (ja)
Other versions
JPH0670345A (en
Inventor
伸 山田
利和 藤岡
俊和 高柳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP4222432A priority Critical patent/JP3052592B2/en
Publication of JPH0670345A publication Critical patent/JPH0670345A/en
Application granted granted Critical
Publication of JP3052592B2 publication Critical patent/JP3052592B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
  • Processing Of Color Television Signals (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、ビデオカメラなどにお
いて正しい色調を再現するためのホワイトバランス調整
装置の制御などを行なう、光源推定装置に関するもので
ある。
The present invention relates to a control and white balance adjustment apparatus for reproducing correct tone in a video camera line of it, to an optical source estimating apparatus.

【0002】[0002]

【従来の技術】近年、ビデオカメラの普及にともなっ
て、美しい色を得るために撮影条件に追従する手段がま
すます重要になってきている。特に、撮影時の光源を的
確に推定することは、色再現を正確にするために非常に
重要である。
2. Description of the Related Art In recent years, with the spread of video cameras, means for following shooting conditions in order to obtain beautiful colors has become increasingly important. In particular, it is very important to accurately estimate the light source at the time of shooting in order to make color reproduction accurate.

【0003】従来、撮影時の光源を推定するための手段
として、異なるスペクトル特性を持った複数の光感応素
子を用いて推定を行なう手段と、画像処理を通して推定
を行なう手段とが知られている。光源推定装置は、一般
にデザイン・コストなどの制約により、光感応素子を用
いた手段から、画像信号を処理して推定する手段(以
下、AWBと呼ぶ)へと移行してきている。
Conventionally, as means for estimating a light source at the time of photographing, there have been known means for estimating using a plurality of light-sensitive elements having different spectral characteristics and means for estimating through image processing. . In general, the light source estimating apparatus has shifted from a means using a photosensitive element to a means for processing and estimating an image signal (hereinafter, referred to as AWB) due to restrictions such as design cost.

【0004】画像処理によって光源を推定する手法の根
拠は、画面中の被写体の色を混合平均すると無彩色にな
るという仮定(Gray World Assumpt
ion:GWA)である。画面中に十分多くの色が含ま
れていれば、この仮定が成立するため、画像信号から得
られる色情報を混合平均すれば、それは撮影時の光源の
色を表わすはずである。この仮定に基づいて色調整を行
なう手法としては、特開昭56−36291号公報に記
載されたものが知られている。
[0004] The basis of the method of estimating the light source by image processing is based on the assumption that mixing and averaging the colors of the objects on the screen results in an achromatic color (Gray World Assumption).
ion: GWA). If the screen contains a sufficiently large number of colors, this assumption holds. If the color information obtained from the image signal is mixed and averaged, it should represent the color of the light source at the time of shooting. As a method of performing color adjustment based on this assumption, a method described in JP-A-56-36291 is known.

【0005】しかしながら、GWAに基づく従来の手法
では、特定の色が画面の広い範囲を占める場合に光源推
定を誤るという欠点があった。
[0005] However, the conventional method based on the GWA has a drawback that the light source estimation is erroneous when a specific color occupies a wide area of the screen.

【0006】この欠点を解決するものとして、次のよう
な2つの手法が考えられる。まず第1には、画面の色分
布の分散を計算する分散計算部と、分散計算部からの出
力が設定値より大きいか否かによって閾値処理を行なう
閾値処理部とからなる構成によってGWAの成立不成立
を画像ごとに判定し、光源推定結果の採用不採用を制御
するというものである。
The following two methods can be considered to solve this drawback. First, GWA is established by a configuration including a variance calculation unit that calculates the variance of the color distribution of the screen, and a threshold processing unit that performs a threshold process based on whether an output from the variance calculation unit is larger than a set value. The failure is determined for each image, and the adoption / non-adoption of the light source estimation result is controlled.

【0007】また第2に、すべての画像に対して光源推
定を実行する必要がある電源投入時をも考慮すると、G
WAに基づく光源推定の代わりに、全ての画像に対して
画面上で支配的な色を取り出すような動作をして光源推
定を行う手法が考えられる。
Second, considering the power-on time when it is necessary to perform light source estimation for all images, G
Instead of the light source estimation based on the WA, a method of estimating the light source by performing an operation of extracting a dominant color on the screen from all images can be considered.

【0008】これらの手法を用いると、高彩度の色から
の影響を小さくすることができ、光源推定精度を向上さ
せることができる。
By using these techniques, it is possible to reduce the influence of high-saturation colors and to improve the accuracy of light source estimation.

【0009】[0009]

【発明が解決しようとする課題】しかしながら、枯草が
広い範囲を占める被写体を屋外で撮影した場合のよう
に、画面上の支配的な色(枯草の色)が屋外の光源の色
でも屋内の光源でもない場合には、電源ON時にしばし
ば光源推定を間違えるという課題があった。また、画面
上にあまり鮮やかではない複数の色が存在する場合など
のように、画像全体の色分布をみると光源推定に適した
画像であるようにみえても、支配的な色が存在しない場
合には、しばしば光源推定を間違えるという課題があっ
However, the hay is
Like shooting a subject covering a wide area outdoors
The dominant color (color of hay) on the screen is the color of the outdoor light source
However, if it is not an indoor light source, turn on the power for a while.
For example, there is a problem that the light source estimation is wrong. Also the screen
For example, when there are multiple colors that are not very vivid on the top
Looking at the color distribution of the whole image like
Where there is no dominant color even though it looks like an image
In many cases, there is a problem that the light source estimation is wrong.
Was .

【0010】[0010]

【0011】[0011]

【0012】本発明は上記従来の問題点を解決するもの
で、画面上に支配的な色が存在しない場合や屋外光源で
も屋内光源でもない色の占める面積が大きい場合などに
おいても、光源色度を精度よく推定する光源推定装置を
提供することを目的とする。
The present invention solves the above-mentioned conventional problems, and is applied to a case where a dominant color does not exist on a screen or an outdoor light source.
When the area occupied by colors that are neither indoor nor light sources is large
It is another object of the present invention to provide a light source estimating apparatus that estimates a light source chromaticity with high accuracy .

【0013】[0013]

【0014】[0014]

【0015】[0015]

【課題を解決するための手段】この目的を達成するため
に、光源推定装置は、画像信号を適当なサンプリング規
則に従って変換するサンプリング回路と、サンプリング
回路でサンプリングされた画像信号を色度信号に変換す
る色度変換部と、色度信号を処理して光源色度の候補を
推定する光源色度候補計算部と、光源色度候補を中心と
した限定領域にある色度信号の数を調べて支配色が存在
するかどうかを判定する支配色存在判定部と、光源色度
候補計算部からの光源色度候補と支配色判定部からの光
源推定制御信号を用いて推定光源色度を判定する光源色
度判定部と、色度平面上を分割し各領域に光源を割り振
り、推定された光源色度がどの領域に属するかで光源を
推定する光源推定部とを備えている。
In order to achieve this object, a light source estimating apparatus converts an image signal into an appropriate sampling rule.
Sampling circuit that converts according to the rule, and sampling
Converts image signals sampled by the circuit into chromaticity signals
And a chromaticity conversion unit that processes the chromaticity signal to determine a light source chromaticity candidate.
Light source chromaticity candidate calculation unit to be estimated
Dominant color exists by checking the number of chromaticity signals in the limited area
Dominant color existence determination unit that determines whether to perform
Light source chromaticity candidate from candidate calculation unit and light from dominant color judgment unit
Light source color for determining estimated light source chromaticity using source estimation control signal
Divide the chromaticity plane and assign light sources to each area
The light source is determined by the area to which the estimated light source chromaticity belongs.
And a light source estimating unit for estimating.

【0016】[0016]

【0017】[0017]

【0018】[0018]

【0019】[0019]

【作用】この構成によって、限定領域の色度信号が多い
場合に、画面上に支配的な色が存在すると判定すること
で、画面上に支配的な色が存在するかどうか判定するこ
とができる。そして、上記判定結果を処理することで光
源推定に適した画像を判定することができる。そして、
画面上に支配的な色が存在しない場合などにおいても光
源推定の誤りを抑制することができる光源推定装置が実
現される。さらに、支配的な色が光源の色であるかどう
か判定し、これが成り立たない場合には別の方法で推定
した光源色度候補を用いて光源を推定することで、屋外
光源でも屋内光源でもない色の占める面積が大きい場合
などにおいても光源推定を有効に行なうことができる光
源推定装置が実現される。
With this configuration, there are many chromaticity signals in the limited area.
If there is a dominant color on the screen
To determine if there is a dominant color on the screen.
Can be. Then, by processing the above determination result,
An image suitable for source estimation can be determined. And
Even when there is no dominant color on the screen
A light source estimator that can suppress errors in
Will be revealed. In addition, whether the dominant color is the color of the light source
If this is not the case, use another method to estimate
By estimating the light source using the light source chromaticity candidate
When the area occupied by a color that is neither a light source nor an indoor light source is large
Light that can effectively perform light source estimation
A source estimation device is realized.

【0020】[0020]

【0021】[0021]

【0022】[0022]

【0023】[0023]

【実施例】以下、本発明の実施例について、図面を参照
しながら説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0024】まず、第1の本発明の原理について述べ
る。従来のAWBは、さきに述べたGWAを前提として
いた。しかしながら、赤い服を着た人のズームアップな
どのシーンなどのように、特定の色、特に彩度の高い色
が画面の広い範囲を占める場合には、画面中の色の平均
はその特定の色に近いものとなり、無彩色とはならな
い。このように、GWAは必ずしもすべてのシーンにつ
いて成立するとは限らない。従って、より色再現のよい
AWBを実現するためには、画像ごとにGWAが成立し
ているかどうかを判定し、GWAの成立しない画像を光
源推定の対象から外すことが必要である。
First, the principle of the first present invention will be described. Conventional AWB is based on the GWA described above. However, when a specific color, especially a highly saturated color, occupies a wide area of the screen, such as in a scene such as a zoom-up of a person wearing red clothes, the average of the colors in the screen is the specific color. It is close to color and not achromatic. As described above, the GWA does not always hold for all scenes. Therefore, in order to realize AWB with better color reproduction, it is necessary to determine whether or not GWA is established for each image, and exclude an image for which GWA is not established from the targets of light source estimation.

【0025】広く一般に用いられている照明光源の多く
は、黒体輻射光に近い色を持つ。このことに基づき、黒
体の温度をパラメータとして、黒体輻射光の色を色度平
面上にプロットした軌跡を「黒体輻射曲線」と呼ぶこと
にする。さらに、実際の機器に搭載する際の簡便性を考
え、色度平面上に「黒体輻射曲線」を一次近似する直線
を設定し、これを「光源ライン」と呼ぶことにする。こ
れらを図4に示す。
Many of the widely used illumination light sources have a color close to blackbody radiation. Based on this, the locus of the color of the blackbody radiation plotted on the chromaticity plane with the temperature of the blackbody as a parameter will be referred to as a “blackbody radiation curve”. Further, considering the simplicity of mounting on an actual device, a straight line that first-order approximates the “blackbody radiation curve” is set on the chromaticity plane, and this will be referred to as a “light source line”. These are shown in FIG.

【0026】画像の色度データを「光源ライン」に垂直
な方向に射影したものの統計的分散を「垂直分散」と呼
ぶことにする。本発明者は、GWAの成立を判定するた
めのパラメータとして、「垂直分散」を設定した。いっ
ぽう、画像の色度データを「光源ライン」に平行な方向
に射影したものの統計的分散を「平行分散」と呼ぶこと
にする。
The statistical variance of the chromaticity data of the image projected in the direction perpendicular to the "light source line" is called "vertical variance". The inventor has set "vertical dispersion" as a parameter for determining whether GWA has been established. On the other hand, the statistical variance of the chromaticity data of the image projected in the direction parallel to the “light source line” will be referred to as “parallel variance”.

【0027】本発明者は、多数の画像データを収集し、
これらを、GWAが成立せず光源推定を誤りやすい画像
と、GWAが成立し光源推定を正しく行える画像とに分
類して分析を行なった。その結果、前者(GWAが成立
しない画像)は後者に比べて、「垂直分散」が大きいと
いう傾向を持つことが明らかとなった。いっぽう、「平
行分散」について同様の分析を行なった結果、このよう
な傾向はみられなかった。従って、「垂直分散」はGW
Aを判定するパラメータとして有効である。
The inventor has collected a large number of image data,
The analysis was performed by classifying these into an image in which GWA was not established and the light source estimation was likely to be erroneous, and an image in which GWA was established and light source estimation could be performed correctly. As a result, it became clear that the former (the image in which GWA is not established) has a tendency that the “vertical dispersion” is larger than the latter. On the other hand, as a result of performing the same analysis for “parallel dispersion”, such a tendency was not observed. Therefore, "vertical dispersion" is GW
This is effective as a parameter for determining A.

【0028】そこで、「垂直分散」が大きいときにはG
WAが成立していないと判定して光源推定動作を停止
し、その時点での光源推定結果を保持することで、誤り
を低減した光源推定装置の実現が可能である。
Therefore, when "vertical dispersion" is large, G
By determining that WA is not established and stopping the light source estimation operation and holding the light source estimation result at that time, it is possible to realize a light source estimation device with reduced errors.

【0029】ところが、このような光源推定装置には、
カラーチャート撮影時に光源推定動作を停止するという
問題がある。カラーチャートはビデオカメラの商品テス
トなどで頻繁に用いられるので、カラーチャートに対し
て光源推定が停止することは好ましくない。従って、被
写体がカラーチャートであるかどうかを認識する装置が
必要となる。
However, such a light source estimation device includes:
There is a problem that the light source estimating operation is stopped at the time of photographing the color chart. Since the color chart is frequently used in a product test of a video camera or the like, it is not preferable to stop the light source estimation for the color chart. Therefore, a device that recognizes whether or not the subject is a color chart is required.

【0030】カラーチャートを撮影した画像の特徴は、
次の2点にまとめられる。 1。高彩度の色が多く分布していること。 2。すべての色相にわたって、ほぼ彩度の等しい色が、
ほぼ等量ずつ分布していること。
The characteristics of the image obtained by photographing the color chart are as follows.
The following two points can be summarized. One. Many highly saturated colors are distributed. 2. A color with almost the same saturation over all hues,
They should be distributed in approximately equal amounts.

【0031】以上2点の特徴のうち、1は「垂直分散」
が大きいことが有効な指標となる。また、2は色度平面
上の色分布が円形に近いことが有効な指標となる。従っ
て、「垂直分散が大きく、色分布が円形に近い」画像を
検出すれば、これはカラーチャートの画像であると判断
でき、カラーチャートを認識する装置が実現できる。
Of the above two features, 1 is "vertical dispersion".
Is an effective index. 2 is an effective index that the color distribution on the chromaticity plane is close to a circle. Therefore, if an image having “large vertical variance and a color distribution close to a circle” is detected, it can be determined that this is a color chart image, and an apparatus that recognizes the color chart can be realized.

【0032】本発明者は、2次元のデータの分布が円形
に近いことを検出するためのパラメータとして、次のよ
うに定義するパラメータRを設定した。
The inventor has set a parameter R defined as follows as a parameter for detecting that the distribution of two-dimensional data is close to a circle.

【0033】2次元データを(xi,yi)とするとき、 R=C(X,Y) ただし、 C(X,Y):2次元データ(Xi,Yi)の相関係数 (Xi,Yi):(xi,yi)から次のように生成される
2次元データ Xi = A11i + A12ii = A21i + A22i11、A12、A21、A22:「分布の軸」が45゜方向に
なるように座標軸を回転する2×2行列Aの成分 A11 = A22 = (1+a)/[2(1+a2)]1/2 −A12 = A21 = (1−a)/[2(1+a2)]1/2 a:以下に述べる「分布の軸」の傾き 「分布の軸」:2次元データの各点からの距離の平方和
が最小となる直線 「分布の軸」の傾きaは次の方程式で与えられる。
When the two-dimensional data is (x i , y i ), R = C (X, Y) where C (X, Y): the correlation coefficient of the two-dimensional data (X i , Y i ) X i, Y i) :( x i, 2 -dimensional data is generated from the y i) as follows: X i = a 11 x i + a 12 y i Y i = a 21 x i + a 22 y i a 11 , A 12 , A 21 , A 22 : A 2 × 2 matrix A component that rotates the coordinate axes so that the “distribution axis” is in the 45 ° direction A 11 = A 22 = (1 + a) / [2 (1 + a 2) )] 1/2 -A 12 = A 21 = (1−a) / [2 (1 + a 2 )] 1/2 a: slope of “distribution axis” described below “distribution axis”: two-dimensional data The gradient a of the straight line “axis of distribution” where the sum of squares of the distance from each point is the minimum is given by the following equation.

【0034】 Cov(x,y)a2+(V(x)−V(y))a−Cov(x,y)=0 2Cov(x,y)+V(x)−V(y)>0 ただし、 Cov(x,y):2次元データ(xi,yi)の共分散 V(x): 1次元データxiの分散 V(y): 1次元データyiの分散 以上が、パラメータRの定義である。ここで定義された
パラメータRを、以下「回転相関係数」と呼ぶことにす
る。なお、ここで定義されている「分布の軸」は一般に
「主成分軸」として知られているものと同一である。
Cov (x, y) a 2 + (V (x) −V (y)) a−Cov (x, y) = 0 2Cov (x, y) + V (x) −V (y)> 0 However, Cov (x, y): 2 -dimensional data (x i, y i) of covariance V (x): one-dimensional data x i of variance V (y): dispersion more one-dimensional data y i is a parameter This is the definition of R. The parameter R defined here is hereinafter referred to as “rotational correlation coefficient”. The “axis of distribution” defined here is the same as that generally known as “principal component axis”.

【0035】「回転相関係数」の計算には、まず2次元
データの「分布の軸」を抽出する。「分布の軸」は上記
の通り「2次元データの各点からの距離の平方和が最小
となる直線」と定義される直線で、これは、与えられた
2次元データがどの方向に「細長く」分布しているかを
表わす。次にこの直線が傾き1(45゜の方向)となる
ように座標軸を回転する。このようにしてできた新しい
座標系で、改めて2次元データの相関係数を計算する。
これが「回転相関係数」である。
In calculating the "rotational correlation coefficient", first, the "distribution axis" of the two-dimensional data is extracted. The “distribution axis” is a straight line defined as “a straight line that minimizes the sum of the squares of the distances from each point of the two-dimensional data” as described above. ”Indicates whether or not they are distributed. Next, the coordinate axes are rotated so that this straight line has an inclination 1 (45 ° direction). The correlation coefficient of the two-dimensional data is calculated again in the new coordinate system thus created.
This is the “rotation correlation coefficient”.

【0036】「回転相関係数」の絶対値が小さいほど、
2次元データの分布は円形に近いと判断できる。以下、
「回転相関係数」が「偏平度」を表わす理由を説明す
る。
The smaller the absolute value of the “rotational correlation coefficient”,
It can be determined that the distribution of the two-dimensional data is close to a circle. Less than,
The reason why the “rotational correlation coefficient” indicates the “flatness” will be described.

【0037】相関係数は色度BY、RYの相関の強さを
表わすが、かならずしも「偏平度」を表わさない。例え
ば、BY軸に沿って色度が分布している場合、「偏平
度」は大きいが、BY、RYの相関は低くなるため相関
係数は小さくなる。従って、相関係数は「偏平度」を表
わすパラメータとしては不十分である。
The correlation coefficient indicates the strength of the correlation between the chromaticities BY and RY, but does not always indicate the "flatness". For example, when the chromaticity is distributed along the BY axis, the “flatness” is large, but the correlation between BY and RY is low, so the correlation coefficient is small. Therefore, the correlation coefficient is not sufficient as a parameter representing “flatness”.

【0038】これは、色度座標が2つの量からなる座標
値ではなく、色という本来2次元の量を表わすデータで
あることによる。BYとRYとは、もともと相関が存在
するような関係にはない。従って、2次元データの分布
の形状を取り出す統計量が必要となる。
This is because the chromaticity coordinates are not two-dimensional coordinate values but data representing a two-dimensional amount of color. BY and RY do not originally have a relationship where a correlation exists. Therefore, a statistic for extracting the shape of the distribution of the two-dimensional data is required.

【0039】いま、「分布の軸」がうまく定義されれ
ば、2次元データの分布の形状だけを取り出すことが可
能である。相関係数では、分布の形状が同じでも、「分
布の軸」の方向によって相関の強さの評価が変わってし
まうため、形状だけの比較は難しかった。「分布の軸」
を揃えて比較すれば、相関係数でも分布の形状を評価す
ることができる。
Now, if the "axis of distribution" is well defined, it is possible to extract only the shape of the distribution of the two-dimensional data. In the case of the correlation coefficient, even if the shape of the distribution is the same, the evaluation of the strength of the correlation changes depending on the direction of the “axis of the distribution”, and it is difficult to compare only the shape. "Axis of distribution"
, The shape of the distribution can be evaluated even with the correlation coefficient.

【0040】従って、1.「分布の軸」を抽出し、2.
これを45゜方向(BY、RYの相関が最も強くなる方
向)に揃えたうえで、3。改めて相関係数を計算すれ
ば、分布の「偏平度」を評価できるわけである。以上
が、「回転相関係数」が「偏平度」を表わす理由であ
る。
Therefore, 1. 1. Extract "axis of distribution" and
After aligning this in the 45 ° direction (the direction in which the correlation between BY and RY becomes the strongest), 3. By calculating the correlation coefficient again, the "flatness" of the distribution can be evaluated. The above is the reason why the “rotational correlation coefficient” represents the “flatness”.

【0041】本発明者は、「垂直分散」が大きい多数の
画像について「回転相関係数」を調べ、カラーチャート
を撮影した画像では、日常の風物を撮影した画像よりも
「回転相関係数」の絶対値が著しく小さいという結果を
得た。従って、色度データの「垂直分散」と「回転相関
係数」とを総合的に判断すれば、きわめて高い精度でカ
ラーチャートを認識することができる。しかも、日常の
風物の画像とカラーチャートの画像とでは、図7に示す
ように「回転相関係数」の分布する範囲に著しい差があ
るため、カラーチャートを認識するための「回転相関係
数」のしきい値の設定が非常に簡便にできる。
The present inventor has examined the “rotational correlation coefficient” for a large number of images having a large “vertical variance”. Was found to have an extremely small absolute value. Therefore, if the “vertical dispersion” and “rotational correlation coefficient” of the chromaticity data are comprehensively determined, the color chart can be recognized with extremely high accuracy. In addition, since there is a remarkable difference in the distribution range of the “rotational correlation coefficient” between the image of the everyday feature and the image of the color chart, as shown in FIG. Can be set very easily.

【0042】なお、「回転相関係数」の絶対値を用いな
くても同様の処理は可能であるが、絶対値を用いた方が
処理は簡単である。以下、説明を簡単にするために、
「回転相関係数」の絶対値を単に「回転相関係数」と呼
んで説明を行なう。また、「回転相関係数」ではなく、
色度座標BY、RYの単なる相関係数を用いてもカラー
チャートの認識は可能であるが、本発明者の分析によれ
ば、その認識精度は「回転相関係数」を用いる方法より
も低くなることがわかっている。
Although the same processing can be performed without using the absolute value of the "rotational correlation coefficient", the processing is simpler when the absolute value is used. Below, for simplicity of explanation,
The absolute value of the “rotational correlation coefficient” will be described simply as “rotational correlation coefficient”. Also, instead of "rotational correlation coefficient",
Although it is possible to recognize a color chart using a simple correlation coefficient of the chromaticity coordinates BY and RY, according to the analysis of the present inventor, the recognition accuracy is lower than the method using the “rotational correlation coefficient”. I know it will be.

【0043】また、「分布の軸」の傾きを計算する際
に、上記のように厳密な方程式を立てて解を求めずに、
例えば a=V(y)/V(x)×(適当な符号) のように、およその値を求めて代用することもできる。
以上が第1の本発明の原理である。
Also, when calculating the slope of the "axis of distribution", instead of setting up a strict equation as described above and finding a solution,
For example, an approximate value such as a = V (y) / V (x) × (appropriate sign) can be obtained and substituted.
The above is the principle of the first present invention.

【0044】次に、第2の本発明の原理について述べ
る。本発明の光源色度推定部の動作の考え方は、GWA
に基づく光源推定に悪影響を及ぼす高彩度の色を除外す
ることにより、光源色度推定精度を向上させることにあ
る。高彩度の色を除外して光源を推定するためには、色
度平面上で被写体の無彩色の周囲にある色だけから光源
を推定すればよい。問題は、被写体の無彩色の位置が定
められないことにある。
Next, the principle of the second invention will be described. The concept of the operation of the light source chromaticity estimating unit according to the present invention is GWA.
Another object of the present invention is to improve light source chromaticity estimation accuracy by excluding high-saturation colors that adversely affect light source estimation based on the chromaticity. In order to estimate the light source while excluding high-saturation colors, the light source may be estimated only from the colors around the achromatic color of the subject on the chromaticity plane. The problem is that the position of the achromatic color of the subject cannot be determined.

【0045】本発明者のデータ分析によれば、GWAが
壊れるような画像であっても、ほとんどの場合、主たる
色は無彩色である。したがって、全平均は高彩度色より
も無彩色に近い色度平面上の位置をとる。それゆえ、全
平均のまわりの限定された領域においてのみ、データの
平均をとるとその平均(2重平均)は、高彩度色の影響
が小さくなり、より無彩色へと近づく。さらに、2重平
均のまわりの限定された領域で平均(3重平均)をとる
と、その効果はさらに大きくなる。こうした手続きを繰
り返すことにより、多重平均はほとんど無彩色のみの平
均となり、光源色度推定精度が向上する。
According to the data analysis by the present inventors, even in an image in which the GWA is destroyed, the main color is achromatic in most cases. Therefore, the overall average takes a position on the chromaticity plane that is closer to an achromatic color than a highly saturated color. Therefore, when the data is averaged only in a limited area around the overall average, the average (double average) is less affected by the high-saturation color and approaches an achromatic color. Furthermore, when the average (triple average) is obtained in a limited area around the double average, the effect is further increased. By repeating such a procedure, the multiple average becomes an average of almost only achromatic colors, and the accuracy of estimating the light source chromaticity is improved.

【0046】多重平均値を分析した結果によれば、多重
平均値は、画面上で支配的な色の色度に近くなる。した
がって、無彩色が多い画面では、多重平均値はほとんど
無彩色のみの平均となるし、枯草の色が多い画面では、
多重平均値はほとんど枯草の色のみの平均となる。一
方、画面上に支配的な色が存在しない場合には、多重平
均値は画像の全平均色度のまわりにある色のなかで多く
存在するものの近くになり、どのような色の近くになる
かは一概にはいえない。支配的な色が存在しない画像の
例としては、背景が枯草で、赤い服を着た人をズームア
ップして服の色が画面の半分を占めたような画像が考え
られる。このとき、画像の色分布は枯草の色と服の赤い
色が分布したものになり、支配的な唯一の色は存在しな
い。したがって、支配的な色度に近い値になる特性をも
つ多重平均値は、どこになるかわからない。
According to the analysis result of the multiple average value, the multiple average value is close to the chromaticity of the dominant color on the screen. Therefore, on a screen with many achromatic colors, the multiple average is almost the average of only achromatic colors, and on a screen with many hay colors,
The multiple average is almost the average of only the color of the hay. On the other hand, if there is no dominant color on the screen, the multi-average value will be close to what is most common among the colors around the overall average chromaticity of the image, and what color will be close I can't say for sure. An example of an image in which a dominant color does not exist is an image in which the background is hay grass and the color of the clothes occupies half of the screen by zooming in on a person wearing red clothes. At this time, the color distribution of the image is a distribution of the color of hay and the red color of clothes, and there is no dominant single color. Therefore, it is not known where the multiple average value having a characteristic close to the dominant chromaticity will be.

【0047】これらのことから、多重平均値は、画面上
に支配的な色が存在するときに有効であるといえる。し
たがって、画面上に支配的な色が存在する場合に多重平
均値を用いて光源色度の推定を実行し、そうでない場合
にはGWAに基づいて画像データの全平均を用いて光源
色度の推定を実行することで、光源色度推定精度が向上
する。
From these facts, it can be said that the multiple average value is effective when a dominant color exists on the screen. Therefore, when there is a dominant color on the screen, the estimation of the light source chromaticity is performed using the multiple average value. By performing the estimation, the accuracy of estimating the light source chromaticity is improved.

【0048】多重平均値による光源色度推定が有効な画
像の例としては、ビルのように無彩色に近い色の背景が
あって、木の緑が小さな面積を占めるようなものがあげ
られる。この場合、画像データの全平均の色度は、無彩
色に比べて低色温度側になり、多重平均値は無彩色に近
くなる。そして、無彩色は光源の色を反映するので、多
重平均値を用いれば正しい光源推定ができるが、全平均
を用いると誤った光源推定をすることになる。
An example of an image for which light source chromaticity estimation based on multiple average values is effective is an image in which a green background of a tree occupies a small area, such as a building, with a color background close to an achromatic color. In this case, the overall average chromaticity of the image data is on the lower color temperature side as compared with the achromatic color, and the multiple average value is close to the achromatic color. Since the achromatic color reflects the color of the light source, correct light source estimation can be performed by using the multiple average value, but incorrect light source estimation is performed by using the total average value.

【0049】第1の本発明の原理のところで、「垂直分
散が大きいときにはGWAが成立していないと判定して
光源推定動作を停止し、その時点での光源推定結果を保
持することで、誤りを低減した光源推定装置の実現が可
能である」ことを述べた。そのときには、画像と垂直分
散の関係については述べなかった。そこで、彩度の高い
服を着た人のバストショットのような被写体を例にとっ
て、画像と垂直分散の関係を分析しながら、この装置の
有効性について述べる。このような被写体では、画面か
らサンプリングした色のいくつかの彩度が比較的高くな
り、サンプリングデータの色度平面上での広がりが大き
くなって、垂直分散が大きくなる。したがって、上記装
置の内部では、被写体がGWA適用限界の外にあると判
定する。一方、上記被写体に対してGWAに基づく光源
推定を実行すると、画面全体の平均の色が服などの色に
強く引かれた色になるために、光源推定を誤りやすい。
以上のことから、上記装置が有効であることを確認でき
る。
According to the principle of the first aspect of the present invention, when the vertical variance is large, it is determined that the GWA is not established, the light source estimation operation is stopped, and the light source estimation result at that time is held, whereby an error is detected. It is possible to realize a light source estimating apparatus with reduced noise. " At that time, the relationship between the image and the vertical dispersion was not described. Thus, taking the example of a subject such as a bust shot of a person wearing highly saturated clothes, the effectiveness of this device will be described while analyzing the relationship between the image and the vertical dispersion. In such a subject, the saturation of some of the colors sampled from the screen becomes relatively high, the spread of the sampling data on the chromaticity plane increases, and the vertical dispersion increases. Therefore, inside the device, it is determined that the subject is outside the GWA application limit. On the other hand, when the light source estimation based on GWA is performed on the subject, the average color of the entire screen becomes a color strongly drawn by the color of clothes and the like, so that the light source estimation is easily erroneous.
From the above, it can be confirmed that the device is effective.

【0050】さらに、多重平均値とGWA適用限界の関
係について考える。多重平均値の特徴は、画像データの
全平均が無彩色の近いときに高彩度の色を除外すること
にあった。したがって、高彩度の色が画面上にあってG
WAが成り立たない場合にも、支配的な色が無彩色なら
ば、全平均が無彩色に近くなるので、多重平均値を用い
て光源推定を実行できる。このことから、画像がGWA
適用限界の外にあっても、多重平均値を用いて光源が推
定できる場合があるといえる。そのため、多重平均値を
用いれば、支配的な色が存在する画像に対してGWA判
定の条件を緩めることができる。したがって、支配的な
色が存在すると判定された画像に対して、GWA適用限
界内にあるかどうかの判定を行うための垂直分散のしき
い値を大きくすることで、画像データ判定精度を向上さ
せることができる。さらに、支配的な色が存在する画像
に対して多重平均値を用いて光源を推定することで、光
源推定精度を向上させることができる。
Further, the relationship between the multiple average value and the GWA application limit will be considered. The feature of the multiple average value is that high-saturation colors are excluded when the overall average of the image data is close to an achromatic color. Therefore, if a highly saturated color is on the screen and G
Even when WA does not hold, if the dominant color is an achromatic color, the overall average is close to an achromatic color, so that the light source estimation can be performed using the multiple average value. From this, the image is GWA
It can be said that there are cases where the light source can be estimated using the multiple average value even outside the applicable limit. Therefore, if the multiple average value is used, the conditions for GWA determination can be relaxed for an image in which a dominant color exists. Therefore, the image data determination accuracy is improved by increasing the threshold value of the vertical dispersion for determining whether or not the image in which the dominant color exists is within the GWA application limit. be able to. Furthermore, by estimating the light source using the multiple average value for an image in which a dominant color exists, the light source estimation accuracy can be improved.

【0051】一方、データ分析によれば、支配的な無彩
色が存在しない画像は、支配的な無彩色が存在する画像
に比べてGWA適用限界の範囲が小さい。そのため、支
配的な色が存在する画像と支配的な色が存在しない画像
とを同一のしきい値を用いてGWA適用限界内にあるか
どうか判定すると、支配的な色が存在しない画像に対し
て判定誤りを生じる場合がある。この問題は、支配的な
色が存在する画像とそうでない画像を区別して、支配的
な色が存在する画像に対してはGWA適用限界を広げ、
そうでない画像に対してはGWA適用限界を狭くするこ
とで解決できる。
On the other hand, according to the data analysis, an image in which a dominant achromatic color does not exist has a smaller GWA application limit range than an image in which a dominant achromatic color exists. Therefore, when it is determined whether an image in which a dominant color exists and an image in which a dominant color does not exist are within the GWA application limit using the same threshold value, an image in which a dominant color does not exist is determined. In some cases, a judgment error may occur. This problem distinguishes images with dominant colors from those that do not, and extends the GWA coverage for images with dominant colors.
For other images, the problem can be solved by narrowing the GWA application limit.

【0052】なお、以上の説明から、画像がGWA適用
限界の外にあっても、画像データの全平均が無彩色の近
くにあるときに、多重平均値を用いた光源推定方法が有
効な場合があることが明らかになった。したがって、多
重平均値を用いた光源推定方法が有効であるための必要
条件として、画像データの全平均が無彩色に近いという
ことがあるといえる。これは、GWAがほぼ成り立つこ
とであり、拡張GWAと呼んだ方が適当であるが、以下
では説明を簡単にするために、これを単にGWAと呼ぶ
ことにする。このとき、全平均値や多重平均値を用いた
光源推定を前提に考えると、GWA適用限界内にある画
像が光源推定に適した画像であるといえる。
From the above description, it can be seen that even if the image is outside the GWA application limit, the light source estimation method using multiple average values is effective when the total average of the image data is close to achromatic. It became clear that there was. Therefore, it can be said that a necessary condition for the light source estimation method using the multiple average value to be effective is that the total average of the image data is close to achromatic. This means that the GWA is almost satisfied, and it is more appropriate to call it an extended GWA. However, for the sake of simplicity, the following description will simply call it GWA. At this time, considering light source estimation using the total average value or the multiple average value, it can be said that an image within the GWA application limit is an image suitable for light source estimation.

【0053】ここで、画面上に支配的な色が存在するか
どうかの判定方法について考える。画面上に2つ以上の
大きな面積をしめる色が存在する場合には、支配的な色
が存在するとはいえない。このような場合には、色度平
面上で全平均色度やその付近の色度のまわりにある画像
データは少なくなる。一方、画面上に大きな面積を占め
る色が1つしか存在しない場合には、色度平面上で全平
均色度やその付近の色度のまわりにある画像データは多
くなる。したがって、画面上に支配的な色が存在するか
どうかは、色度平面上で、全平均色度やその付近を基準
色度とし、基準色度のまわりにある画像データの数を調
べることで判定できる。
Here, a method of determining whether a dominant color exists on the screen will be considered. If there are two or more colors that have a large area on the screen, it cannot be said that there is a dominant color. In such a case, the amount of image data around the total average chromaticity and the chromaticity in the vicinity thereof on the chromaticity plane is reduced. On the other hand, when there is only one color occupying a large area on the screen, the amount of image data around the entire average chromaticity and the chromaticity in the vicinity thereof on the chromaticity plane increases. Therefore, whether or not a dominant color exists on the screen can be determined by examining the total average chromaticity and its vicinity as the reference chromaticity on the chromaticity plane, and examining the number of image data around the reference chromaticity. Can be determined.

【0054】なお、多重平均色度のまわりにある画像デ
ータ数が十分少ない場合には、画面からサンプリングし
た画像データが色度平面上で広がっていることを表すの
で、GWA適用限界の外にあると判定することができ
る。多重平均色度は、画面上で支配的な色の近くになる
性質があるので、多重平均色度のまわりにある画像デー
タ数が少ない場合には支配的な色が存在しないといえ
る。このことから、支配的な色が存在する画像がGWA
適用限界内にあり、そうでない画像はGWA適用限界の
外にあると考えられる。したがって、支配的な色が存在
する画像を調べ、その条件を満たす画像がGWA適用限
界内にあると判定することができ、さらに、光源推定に
適した画像であると判定することができる。
When the number of image data around the multiple average chromaticity is sufficiently small, it indicates that the image data sampled from the screen is spread on the chromaticity plane, and is outside the GWA application limit. Can be determined. Since the multi-average chromaticity has a property of being close to the dominant color on the screen, it can be said that there is no dominant color when the number of image data around the multi-average chromaticity is small. From this, the image where the dominant color exists is GWA
Images that are within the application limits and otherwise are considered to be outside the GWA application limits. Therefore, an image in which a dominant color exists can be examined, and an image satisfying the condition can be determined to be within the GWA application limit, and further, an image suitable for light source estimation can be determined.

【0055】ところで、支配色が無彩色ではない場合に
は、支配色に近くなる多重平均値は光源の色度を表さな
い。電源ON時でなければ、支配色が無彩色ではない可
能性が大きい場合には光源推定結果を保持すればよい。
しかし、電源ON時には、必ず光源推定をしなければな
らない。そこで、支配色が無彩色ではない場合に、サン
プリングされた画像データの分布の重心を表す全平均を
用いると光源を正しく推定することができることがあ
る。この例としては、屋外で、空と大きい面積を占める
枯草とを同時に撮影したシーンがある。このとき、全平
均色度は枯草と空の色度の中間になるが、多重平均値は
枯草の色に近くなって低色温度側によってしまう。そし
て、多重平均値を用いると光源推定を誤ってしまうが、
全平均色度を用いると正しい光源推定ができる。
By the way, when the dominant color is not an achromatic color, the multiple average value near the dominant color does not represent the chromaticity of the light source. If the power is not turned on and the dominant color is not likely to be an achromatic color, the light source estimation result may be held.
However, when the power is turned on, the light source must be estimated. Therefore, when the dominant color is not an achromatic color, the light source can be correctly estimated by using the total average representing the center of gravity of the distribution of the sampled image data. As an example of this, there is a scene in which the sky and hay occupying a large area are simultaneously photographed outdoors. At this time, the total average chromaticity is in the middle between the chromaticity of the grass and the sky, but the multiple average value is close to the color of the grass and is shifted to the low color temperature side. Then, when using the multiple average value, the light source estimation is incorrect,
If the total average chromaticity is used, correct light source estimation can be performed.

【0056】なお、多重平均色度が無彩色であるかどう
か判定する方法としては、図4に示した光源ラインの近
くに特定領域を設定し、その特定領域に入るかどうかに
よって判定する方法が考えられる。以上が第2の本発明
の原理である。
As a method for determining whether or not the multiple average chromaticity is an achromatic color, a method for setting a specific area near the light source line shown in FIG. Conceivable. The above is the principle of the second invention.

【0057】さらに、第3の本発明の原理について述べ
る。屋外光源下の白色板の色温度は高い。一方、蛍光灯
下の白色板の色温度は低い。本発明者の分析によれば、
屋外撮影時に画面中に空が入ると、空の色は高色温度
で、輝度が高いことが明らかになっている。しかし、高
色温度で輝度が高い色を含む画像が、必ずしも屋外で撮
影されているとは限らない。これは、蛍光灯下で撮影し
た明るい青色のものも、高色温度で輝度が高くなるから
である。
Further, the principle of the third invention will be described. The color temperature of the white plate under the outdoor light source is high. On the other hand, the color temperature of the white plate under the fluorescent lamp is low. According to our analysis,
It is clear that when the sky enters the screen during outdoor shooting, the color of the sky has a high color temperature and high brightness. However, an image including a color having a high color temperature and a high luminance is not always taken outdoors. This is because the brightness of a bright blue image captured under a fluorescent lamp also increases at a high color temperature.

【0058】ところで、蛍光灯下で撮影した青色も屋外
で撮影した空も高輝度となるが、両者の絶対的な明るさ
は異なる。絶対的な明るさが違うのに、両者とも輝度が
高くなる理由は、撮影時の絞り調整の状態が異なること
にある。一般に、光源を直接映さない限り、蛍光灯下で
は、絞り状態を表すF値が一定値以上にはならない。ま
た、蛍光灯を直接映した場合には、F値は大きくなる
が、高輝度部分は低色温度の色となる。したがって、F
値が一定値以上で、高輝度かつ高色温度の色が含まれて
いれば、そのときの撮影環境は屋外であると判定でき
る。なお、本発明者の分析によれば、屋外で撮影した画
像中で高輝度かつ高色温度となる色は、空の色だけでは
なく、白い洋服の色などもある。
By the way, the blue color photographed under fluorescent light and the sky photographed outdoors have high brightness, but the absolute brightness of both is different. The reason why the brightness is high in both cases, although the absolute brightness is different, is that the state of aperture adjustment at the time of shooting is different. Generally, under a fluorescent light, the F-number representing the aperture state does not exceed a certain value unless the light source is directly projected. When a fluorescent lamp is directly projected, the F value increases, but the high-luminance portion has a low color temperature. Therefore, F
If the value is a certain value or more and a color with high luminance and high color temperature is included, it can be determined that the shooting environment at that time is outdoors. According to the analysis of the present inventor, colors having high luminance and high color temperature in an image photographed outdoors include not only the color of the sky but also the color of white clothes.

【0059】以上のことから、高輝度かつ高色温度の色
を含み、F値が大きい状態は、屋外で空などを撮影した
ときにのみ特徴的に現れるといえる。本発明の屋外光源
検出部は、このような画像を検出する部分である。検出
には、絞り調整機構制御部からの制御信号をしきい値処
理した信号と、画像データから得られる輝度データと色
度データとを用いる。以上が第3の本発明の原理であ
る。
From the above, it can be said that a state including a color with high luminance and a high color temperature and a large F value appears characteristically only when the sky or the like is photographed outdoors. The outdoor light source detection unit of the present invention is a unit that detects such an image. For detection, a signal obtained by subjecting a control signal from the aperture adjustment mechanism control unit to a threshold value, and luminance data and chromaticity data obtained from image data are used. The above is the principle of the third invention.

【0060】(実施例1)次に、本発明の第一の実施例
の構成について、図面を参照しながら説明する。図1
は、本発明の光源推定装置の構成を示すブロック結線図
である。
(Embodiment 1) Next, a configuration of a first embodiment of the present invention will be described with reference to the drawings. FIG.
FIG. 1 is a block diagram showing a configuration of a light source estimation device of the present invention.

【0061】図1において、1はCCD等からの画像信
号ISを適当なサンプリング規則に従って変換するサン
プリング回路であり、2はサンプリング回路1からサン
プリングされた画像信号ISを輝度信号と2つの色度信
号に変換する輝度色度変換部であり、14は被写体がカ
ラーチャートであるかどうか判定するカラーチャート認
識部である。カラーチャート認識部の詳細を示した図2
において、3は一方の色度信号の分散を計算する分散計
算手段であり、4は他方の色度信号の分散を計算する分
散計算手段であり、5は2つの色度信号の共分散を計算
する共分散計算手段であり、6は原理の説明で述べた光
源ラインに垂直な方向に色度信号を射影してその成分の
大きさ(すなわち光源ラインからの垂直方向変位)に変
換する射影手段であり、7は射影手段6から垂直方向変
位を受けてその分散を計算する分散計算手段であり、8
は分散計算手段3と分散計算手段4と共分散計算手段5
とのそれぞれの出力を受けてそれらの値から構成される
係数を持つ2次方程式を解いて適当な解を出力する2次
方程式求解手段であり、9は色度変換部2で計算された
色度座標値に対して2次方程式求解手段8の出力に応じ
た適当な座標変換を施す座標変換手段であり、10は座
標変換手段9の出力からその相関係数を計算する相関係
数計算手段であり、11と12とは内部に蓄えられたし
きい値と入力信号とを比較して判定信号を出力するしき
い値処理手段であり、13は通常のAND回路であり、
14はカラーチャート認識部であり、15は統計量計算
部であり、16は画像分散計算部である。
In FIG. 1, reference numeral 1 denotes a sampling circuit for converting an image signal IS from a CCD or the like in accordance with an appropriate sampling rule. Reference numeral 2 denotes an image signal IS sampled from the sampling circuit 1 as a luminance signal and two chromaticity signals. And 14 is a color chart recognizing unit that determines whether or not the subject is a color chart. FIG. 2 showing details of the color chart recognition unit.
, 3 is variance calculating means for calculating the variance of one chromaticity signal, 4 is variance calculating means for calculating the variance of the other chromaticity signal, and 5 is the covariance of the two chromaticity signals. And 6 a projection means for projecting a chromaticity signal in a direction perpendicular to the light source line described in the description of the principle and converting the chromaticity signal into a component size (ie, a vertical displacement from the light source line). Numeral 7 is a variance calculating means for receiving the vertical displacement from the projecting means 6 and calculating its variance.
Are variance calculation means 3, variance calculation means 4, and covariance calculation means 5
Is a quadratic equation solving means for receiving an output of each of the above and solving a quadratic equation having a coefficient composed of those values and outputting an appropriate solution. Reference numeral 9 denotes a color calculated by the chromaticity conversion unit 2. Coordinate conversion means for performing appropriate coordinate conversion on the degree coordinate value in accordance with the output of the quadratic equation solving means 8, and 10 is a correlation coefficient calculation means for calculating the correlation coefficient from the output of the coordinate conversion means 9. Where 11 and 12 are threshold value processing means for comparing the internally stored threshold value with the input signal and outputting a judgment signal, 13 is a normal AND circuit,
14 is a color chart recognition unit, 15 is a statistic calculation unit, and 16 is an image variance calculation unit.

【0062】図1において、17は輝度色度変換部2か
らの色度座標値を受けてその平均値を計算する平均計算
手段であり、18は平均計算手段17からなるカラーチ
ャート用光源色度推定部である。19は輝度色度変換部
2で変換された輝度信号と色度信号をそれぞれ輝度デー
タ、色度データとして記憶する輝度色度データ記憶部、
20は画像判定が終了するまで輝度色度データ記憶部へ
の記憶を禁止する記憶制御部である。50は一般画像用
光源色度推定部で次のものから構成されており、21は
光源色度の候補を推定する光源色度候補計算部であり、
光源色度候補計算部の詳細を示した図3(a)におい
て、22は色度データの全平均を計算する平均計算手段
であり、23、24は、入力された基準色度と輝度色度
データ記憶部から読みだされた色度データとから基準色
度のまわりの限定された領域に属するデータを選択して
出力する限定領域データ出力部であり、25、26は、
限定領域データ出力部から出力された限定領域データの
平均を計算する領域限定平均計算部であり、27は、平
均計算手段からの全平均色度と領域限定平均計算部から
の多重平均色度とを記憶する光源色度候補記憶部であ
る。
In FIG. 1, reference numeral 17 denotes an average calculation means for receiving the chromaticity coordinate values from the luminance / chromaticity conversion unit 2 and calculating an average value thereof; It is an estimation unit. Reference numeral 19 denotes a luminance / chromaticity data storage unit that stores the luminance signal and the chromaticity signal converted by the luminance / chromaticity conversion unit 2 as luminance data and chromaticity data, respectively.
Reference numeral 20 denotes a storage control unit that prohibits storage in the luminance and chromaticity data storage unit until image determination is completed. 50 is for general images
And it consists of: in the light source chromaticity estimator, 2 1 Ri source chromaticity candidate calculation unit der for estimating a candidate of a light source chromaticity,
In FIG. 3A showing the details of the light source chromaticity candidate calculation unit, reference numeral 22 denotes an average calculation unit for calculating the total average of the chromaticity data, and reference numerals 23 and 24 denote input reference chromaticity and luminance chromaticity. A limited area data output unit for selecting and outputting data belonging to a limited area around the reference chromaticity from the chromaticity data read from the data storage unit;
An area limited average calculation unit 27 calculates the average of the limited area data output from the limited area data output unit. Reference numeral 27 denotes the total average chromaticity from the average calculation unit and the multiple average chromaticity from the area limited average calculation unit. Is a light source chromaticity candidate storage unit.

【0063】図1において、28は光源色度候補計算部
からの多重平均色度を受けて記憶する限定領域中心計算
部である。29は限定領域にある色度データの数を調べ
て支配色が存在するかどうかを判定する支配色存在判定
部であり、入力された基準色度と色度データ記憶部から
読みだされた色度データとから基準色度のまわりの限定
された領域に属するデータを選択して出力する限定領域
データ出力部30と、限定領域データ出力部から出力さ
れるデータの数をカウントするカウンター31と、カウ
ンターからの出力が設定値よりも大きい場合に支配色存
在とし、その他の場合には支配色不在とする支配色存在
判定しきい値処理部32とを備えている。33は光源色
度候補が光源ラインに近いかどうかを判定する特定色判
定部である。34は光源色度候補から光源色度を推定す
る光源色度判定部であり、支配色存在判定しきい値処理
部32からの光源推定制御信号が支配色不在の場合に全
平均色度を優先色度とし、そうでない場合に多重平均色
度を優先色度とする優先色度選択部35と、多重平均色
度が優先色度で光源ラインに近いならばその色度を推定
光源色度とし、そうでない場合には全平均色度を推定光
源色度とする総合色度判定部36とを備えている。
In FIG. 1, reference numeral 28 denotes a limited area center calculating section which receives and stores the multiple average chromaticity from the light source chromaticity candidate calculating section. Reference numeral 29 denotes a dominant color existence determining unit that determines whether or not a dominant color exists by checking the number of chromaticity data in the limited area, and the input reference chromaticity and the color read from the chromaticity data storage unit. A limited area data output unit 30 for selecting and outputting data belonging to a limited area around the reference chromaticity from the degree data, a counter 31 for counting the number of data output from the limited area data output unit, A dominant color presence determination threshold value processing unit 32 that determines that the dominant color is present when the output from the counter is greater than the set value, and determines that the dominant color is absent in other cases. A specific color determination unit 33 determines whether or not the light source chromaticity candidate is close to the light source line. Reference numeral 34 denotes a light source chromaticity determination unit that estimates the light source chromaticity from the light source chromaticity candidates, and gives priority to the total average chromaticity when the light source estimation control signal from the dominant color presence determination threshold value processing unit 32 is absent. A chromaticity, and if not, a priority chromaticity selection unit 35 that sets a multiple average chromaticity as a priority chromaticity. If not, a total chromaticity determination unit 36 is provided that uses the total average chromaticity as the estimated light source chromaticity.

【0064】37はカラーチャート認識部14からのカ
ラーチャート認識信号とカラーチャート用光源色度推定
部18からのカラーチャート用推定光源色度信号と総合
色度判定部36からの一般画像用推定光源色度信号とを
受けて、撮影された画像がカラーチャート画像であるか
それ以外の一般画像であるかによって推定光源色度を選
択する推定光源色度選択部である。38は、推定光源色
度選択部37からの推定光源色度を受け、色度平面上を
適切に分割し各領域に光源を割り振り、推定光源色度が
どの領域に属するかで光源を推定する光源推定部であ
る。39は、絞り調整機構を制御する絞り調整機構制御
部である。40は、屋外で空などを撮影したときに特徴
的に現れる現象が起きているかどうか判定する屋外光源
検出部である。屋外光源検出部40の詳細を示した図3
(b)において、41は、絞り調整機構制御部からの制
御信号と内部に保持するしきい値とを比較して判定信号
を出力するしきい値処理手段であり、42は輝度色度デ
ータ記憶部19から輝度データを読みだして内部に保持
するしきい値と比較して判定信号を出力するしきい値処
理手段であり、43は輝度色度データ記憶部19から色
度データを読みだして、その色度データが内部に保持す
る高色温度領域に属するかどうか判定する高色温度色判
定部であり、44はAND回路であり、45はAND回
路44からの出力が0から1に反転した回数を数えるカ
ウンターであり、46は、高色温度色判定部43から出
力される判定信号を数えて、すべての色度データに対す
る判定が終わったら制御信号を出力する検出制御部であ
り、47は、検出制御部46からの制御信号を受けて、
カウンター45からカウントされた数を読みだし、その
値と内部に保持するしきい値とを比較して判定信号を出
力するしきい値処理手段であり、48は、しきい値処理
手段41、47からの判定信号を受けて、被写体に屋外
光源が照射されているかあるかどうかの総合的な判定結
果を出力するAND回路である。
Reference numeral 37 denotes a color chart recognition signal from the color chart recognition unit 14, a color chart estimated light source chromaticity signal from the color chart light source chromaticity estimation unit 18, and a general image estimated light source from the total chromaticity determination unit 36. An estimated light source chromaticity selection unit that receives the chromaticity signal and selects the estimated light source chromaticity according to whether the captured image is a color chart image or another general image. 38 receives the estimated illuminant chromaticity from the estimated illuminant chromaticity selection unit 37, appropriately divides the chromaticity plane, allocates the light source to each area, and estimates the light source based on which area the estimated illuminant chromaticity belongs to. This is a light source estimation unit. Reference numeral 39 denotes an aperture adjustment mechanism control unit that controls the aperture adjustment mechanism. Reference numeral 40 denotes an outdoor light source detection unit that determines whether or not a phenomenon that characteristically occurs when the sky or the like is photographed outdoors has occurred. FIG. 3 showing details of the outdoor light source detection unit 40.
In (b), reference numeral 41 denotes a threshold processing means for comparing a control signal from the aperture adjustment mechanism control unit with a threshold value held therein and outputting a determination signal; Threshold value processing means for reading out the luminance data from the section 19 and comparing it with a threshold value held therein to output a judgment signal; 43 reads out the chromaticity data from the luminance and chromaticity data storage section 19; A high color temperature color determination unit 44 for determining whether or not the chromaticity data belongs to a high color temperature area held therein; 44, an AND circuit; 45, an output from the AND circuit 44 inverted from 0 to 1 A detection control unit 46 counts the determination signal output from the high color temperature color determination unit 43 and outputs a control signal when all the chromaticity data have been determined. Is detected In response to a control signal from the control unit 46,
Threshold processing means for reading out the counted number from the counter 45, comparing the value with a threshold value held therein, and outputting a determination signal; 48, threshold processing means 41, 47; Is an AND circuit that receives a determination signal from the controller and outputs a comprehensive determination result as to whether or not the subject is illuminated with an outdoor light source.

【0065】図1において、49は、屋外光源検出部4
0からの光源判定制御信号と光源推定部38からの推定
光源とを受けて、光源を総合的に判定する光源判定部で
ある。
In FIG. 1, reference numeral 49 denotes the outdoor light source detecting unit 4.
The light source determination unit receives the light source determination control signal from 0 and the estimated light source from the light source estimation unit 38, and comprehensively determines the light source.

【0066】以上のように構成された光源推定装置の動
作について説明する。なお、入力される画像信号ISに
ついては、(Y,R−Y,B−Y)として説明するが、
これは本発明を拘束するものではない。このことは、以
下の実施例でも同様のことなので、繰り返さない。
The operation of the light source estimating apparatus configured as described above will be described. The input image signal IS will be described as (Y, RY, BY).
This is not binding on the invention. This is the same in the following embodiments, and will not be repeated.

【0067】まず、CCD等からの画像信号ISは、サ
ンプリング回路1に入り、適当なサンプリング規則に従
って変換される。その一例としては、図5に示したよう
に画面をn×m個のブロックに分割し、図6に示したよ
うに各ブロックから複数(k個)のデータ点を取り出し
て平均しブロック平均 <IS>i=Σ(Yj, R−Yj, B−Yj)/k ただし i = 1,2,...,N N = n×m kは各ブロック内でサンプリングされるデータ数 を求めるという方法が考えられる。輝度色度変換部2
は、サンプリング回路1でサンプリングされた画像信号
<IS>i=(YYi,RYYi,BYYi)を受け
て、これを色度信号 CSi = (BYi,RYi) ただし BYi = BYYi / YYi RYi = RYYi / YYi に変換する。また、本実施例では、YYiが輝度信号と
なる。
First, an image signal IS from a CCD or the like enters the sampling circuit 1 and is converted according to an appropriate sampling rule. As an example, as shown in FIG. 5, the screen is divided into n × m blocks, and as shown in FIG. 6, a plurality of (k) data points are extracted from each block and averaged to obtain a block average <IS> i = Σ (Y j , R−Y j , B−Y j ) / k where i = 1, 2,..., NN = n × mk determines the number of data sampled in each block. A method is conceivable. Brightness / chromaticity converter 2
Receives the image signal <IS> i = (YYi, RYYi, BYYi) sampled by the sampling circuit 1 and converts it into a chromaticity signal CSi = (BYi, RYi) where BYi = BYYi / YYi RYi = RYYi / YYi. Convert to In this embodiment, YYi is a luminance signal.

【0068】カラーチャート認識部14は、一画面分の
サンプリングデータから求められた色度座標を受けて、
それがカラーチャート画像の色度分布であるかどうかの
認識を行なう。以下、カラーチャート認識部14の動作
について、図8を参照しながら説明する。
The color chart recognizing unit 14 receives the chromaticity coordinates obtained from the sampling data for one screen,
Whether or not it is the chromaticity distribution of the color chart image is recognized. Hereinafter, the operation of the color chart recognition unit 14 will be described with reference to FIG.

【0069】分散計算手段3は、一画面分のサンプリン
グデータから求められた色度座標BYi(i=1,2,...,N)
の分散 VB = < ( BYi−<BY> )2 > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。分散計算手段4は、一画面分のサンプリン
グデータから求められた色度座標RYi(i=1,2,...,N)
の分散 VR = < ( RYi−<RY> )2 > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。共分散計算手段5は、一画面分のサンプリ
ングデータから求められた色度信号CSi=(BYi,R
Yi)から、BYi,RYiの共分散 CV = < ( BYi−<BY> ) ( RYi−<RY> ) > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。
The variance calculation means 3 calculates the chromaticity coordinates BYi (i = 1, 2,..., N) obtained from the sampling data for one screen
Distributed VB = <(BYi- <BY> ) 2> However, <x>: calculating an average value? X i / N of the variable x. The variance calculation means 4 calculates the chromaticity coordinates RYi (i = 1, 2,.
Distributed VR = <(RYi- <RY> ) 2> However, <x>: calculating an average value? X i / N of the variable x. The covariance calculation means 5 calculates the chromaticity signal CSi = (BYi, R
From Yi), the covariance of BYi, RYi CV = <(BYi− <BY>) (RYi− <RY>)> where <x>: average value 変 数xi / N of variable x.

【0070】射影手段6は、色度信号CSiを受けて、
原理の説明で述べた「光源ライン」に垂直な方向(V
1、V2)にこれを射影し、その方向の成分すなわち
「光源ライン」からの垂直方向変位 Vi = V1・BYi + V2・RYi に変換する。ただしここで(V1、V2)は2次元の単位
ベクトルとしている。分散計算手段7は、射影手段6か
ら垂直方向変位Viを受けて、画像信号分散 VV = < ( Vi−<V> )2 > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。2次方程式求解手段8は、分散計算手段3
で計算した分散VBと分散計算手段4で計算した分散VRと
共分散計算手段5で計算した共分散CVとを受けて、原理
の説明で述べた、色度信号CSiの「分布の軸」の傾
き、すなわち2次方程式 CV・a2 + (VB−VR)a − CV = 0 の解のうち 2CV・a + VB − VR ≧ 0 を満たすものを計算する。
The projecting means 6 receives the chromaticity signal CSi,
The direction perpendicular to the "light source line" described in the explanation of the principle (V
1, V2), and is converted into a component in that direction, that is, a vertical displacement from the “light source line”, Vi = V1 · BYi + V2 · RYi. Here, (V1, V2) is a two-dimensional unit vector. Distributed computing unit 7 receives the vertical displacement Vi from projection unit 6, the image signal variance VV = <(Vi- <V> ) 2> However, <x>: calculating an average value? X i / N of the variable x I do. The quadratic equation solving means 8 includes the variance calculating means 3
Of the chromaticity signal CSi described in the explanation of the principle based on the variance VB calculated by The gradient, that is, the solution of the quadratic equation CV · a 2 + (VB−VR) a−CV = 0 that satisfies 2CV · a + VB−VR ≧ 0 is calculated.

【0071】座標変換手段9は、2次方程式求解手段6
で求められた「分布の軸」の傾きaと色度変換部2で計
算された色度信号CSiとを受けて、色度信号CSi=
(BYi、RYi)に対して座標変換 BY’i = A11・BYi + A12・RYi RY’i = A21・BYi + A22・RYi を施し、変換された色度座標(BY’i,RY’i)を計
算する。ただしここで、A11、A12、A21、A22は「分
布の軸」が45゜方向になるように座標軸を回転する2
×2行列Aの成分 A11 = A22 = (1+a)/[2(1+a2)]1/2 −A12 = A21 = (1−a)/[2(1+a2)]1/2 としている。相関係数計算手段10では、座標変換手段
9から得られる変換された色度座標BY’iとRY’i
との相関係数の絶対値 RC = |Cov(BY',RY')/[V(BY')V(RY')]1/2| ただし Cov(BY',RY') = < ( BYi−<BY> ) ( RYi−<RY> ) > V(BY') = < ( BYi−<BY> )2 > V(RY') = < ( RYi−<RY> )2 > <x> : 変数xの平均値 Σxi/N を計算する。これは原理の説明で述べた「回転相関係
数」の絶対値にほかならない。
The coordinate transformation means 9 is a quadratic equation solving means 6
And the chromaticity signal CSi calculated by the chromaticity conversion unit 2 based on the gradient a of the “distribution axis” obtained in
(BYi, RYi) coordinate transformation on BY'i = A 11 · BYi + A 12 · RYi RY'i = A subjected to 21 · BYi + A 22 · RYi , converted chromaticity coordinates (BY'i, RY′i) is calculated. Here, A 11 , A 12 , A 21 , and A 22 rotate the coordinate axes so that the “axis of distribution” is in the 45 ° direction.
The components of the × 2 matrix A are A 11 = A 22 = (1 + a) / [2 (1 + a 2 )] 1/2 −A 12 = A 21 = (1−a) / [2 (1 + a 2 )] 1/2 I have. The correlation coefficient calculation means 10 converts the converted chromaticity coordinates BY′i and RY′i obtained from the coordinate conversion means 9.
Absolute value of correlation coefficient RC = | Cov (BY ', RY') / [V (BY ') V (RY')] 1/2 | where Cov (BY ', RY') = <(BYi- <BY>) (RYi-<RY>)> V (BY ') = <(BYi-<BY>) 2 > V (RY') = <(RYi-<RY>) 2 ><x>: variable x calculating the average value? x i / N. This is nothing but the absolute value of the “rotational correlation coefficient” described in the explanation of the principle.

【0072】しきい値処理手段11は、相関係数計算手
段10で計算された相関係数RCと内部に蓄えられた相関
係数しきい値θRCとを比較し、 RC < θRC の場合 SC1=1 : カラーチャートの可
能性あり そうでない場合 SC1=0 : カラーチャートでな
い として、カラーチャート相関係数判定信号SC1を出力
する。しきい値処理手段12は、分散計算手段7で計算
された画像信号分散VVと内部に蓄えられた画像分散しき
い値θVVとを比較し、 VV > θVV の場合 SC2=1 : カラーチャートの可
能性あり そうでない場合 SC2=0 : カラーチャートでな
い として、カラーチャート分散判定信号SC2を出力す
る。
The threshold value processing means 11 compares the correlation coefficient RC calculated by the correlation coefficient calculation means 10 with the correlation coefficient threshold value θRC stored therein, and when RC <θRC, SC1 = 1: If there is no possibility of a color chart SC1 = 0: Not a color chart, and outputs a color chart correlation coefficient determination signal SC1. The threshold value processing means 12 compares the image signal variance VV calculated by the variance calculation means 7 with the image variance threshold value θVV stored therein. If VV> θVV, SC2 = 1: possible color chart If not, SC2 = 0: the color chart is not determined, and the color chart dispersion determination signal SC2 is output.

【0073】AND回路13は、しきい値処理手段11
が出力するカラーチャート相関係数判定信号SC1とし
きい値処理手段12が出力するカラーチャート分散判定
信号SC2との論理積をとり、カラーチャート判定信号
SC: SC = 1 : カラーチャートである SC = 0 : カラーチャートでない を出力する。こうして画像信号から、カラーチャートの
判定がなされる。
The AND circuit 13 includes a threshold processing unit 11
Of the color chart correlation coefficient determination signal SC1 output by the threshold value processing means 12 and the color chart dispersion determination signal SC2 output by the threshold value processing means 12
SC: SC = 1: Output color chart SC = 0: Output not color chart. Thus, the color chart is determined from the image signal.

【0074】以上が、カラーチャート認識部14の動作
である。カラーチャート用光源色度推定部18は、輝度
色度変換部2からの色度信号CSiを受けて、その平均
値を計算して出力し、カラーチャート用推定光源色度信
号JCとして出力する。
The operation of the color chart recognition section 14 has been described above. The color chart light source chromaticity estimating unit 18 receives the chromaticity signal CSi from the luminance / chromaticity converting unit 2, calculates and outputs an average value thereof, and outputs it as a color chart estimated light source chromaticity signal JC.

【0075】輝度色度データ記憶部19は、色度信号C
Siを色度データとして記憶し、輝度信号YYiを輝度
データとして記憶する。記憶が終了すると、記憶制御部
20が輝度色度データ記憶部への輝度データと色度デー
タの書き込みを禁止する。次に、一般画像用光源色度推
定部50について説明する。
The luminance / chromaticity data storage section 19 stores the chromaticity signal C
Si is stored as chromaticity data, and the luminance signal YYi is stored as luminance data. When the storage is completed, the storage control unit 20 prohibits the writing of the luminance data and the chromaticity data to the luminance and chromaticity data storage unit. Next, illuminance chromaticity estimation for general image
The setting unit 50 will be described.

【0076】光源色度候補計算部21の内部にある平均
計算手段22は、輝度色度データ記憶部19から色度デ
ータを読みだし、全平均色度を計算する。限定領域デー
タ出力部23は、平均計算手段22から全平均色度信号
を受けて基準色度とし、輝度色度データ記憶部19から
色度データを読みだし、色度データの内で、基準色度の
周囲の制限された領域に属するデータのみを出力する。
その一例としては、色度データと基準色度との差δCS
iを計算して、内積(δCSi,δCSi)とあらかじ
め設定されている値θとを比較して、 (δCSi,δCSi)<θ の場合に領域内に存在と判断して、この場合のみ色度デ
ータを出力する方法が考えられる。領域限定平均計算部
25は、限定領域データ出力部23から出力されたデー
タを平均し、2重平均色度とする。限定領域データ出力
部24は、領域限定平均計算部25から2重平均色度を
受けて基準色度とし、輝度色度データ記憶部19から色
度データを読みだし、色度データの内で、基準色度の周
囲の制限された領域に属するデータのみを出力する。領
域限定平均計算部26は、限定領域データ出力部24か
ら出力されたデータを平均し、3重平均色度とする。光
源色度候補記憶部26は、平均計算手段22からの全平
均色度と領域限定平均計算部26からの3重平均色度と
を受けて、それぞれを光源色度候補SS1、SS2とし
て記憶する。限定領域中心計算部28は光源色度候補記
憶部27から光源色度候補SS2を受け、限定領域中心
色度SSCとする。支配色存在判定部29の内部にある
限定領域データ出力部30は、限定領域中心計算部28
から限定領域中心色度SSCを受けて基準色度とし、色
度データ記憶部19から色度データを読みだし、色度デ
ータの内で、基準色度の周囲の制限された領域に属する
データのみを出力する。カウンター31は、限定領域デ
ータ出力部から出力されるデータの数を数え、限定領域
データ数N3とする。支配色存在判定しきい値処理部3
2は、限定領域データ数N3を受けて、内部に保持する
しきい値θ1と比較し、 N3≧θ1のとき、J1=1(支配色存在) N3<θ1のとき、J1=0(支配色不在) とする。特定色判定部33は、推定光源色度記憶部27
から光源色度候補SS1、SS2を受け、内部に保持す
る色度平面上の特定領域に光源色度候補SS2が入るか
どうかを調べ、 入っている場合には、J2=1(SS2が特定領域の内
部にある) 入っていない場合に、J2=0(SS2が特定領域の外
部にある) とする。光源色度判定部34の内部にある優先色度選択
部35は、支配色存在判定しきい値処理部32からの光
源推定制御信号J1を受けて、 J1=1のとき、J3=1(3重平均色度SS2優先) J1=0のとき、J3=0(全平均色度SS1優先) とする。総合色度判定部36は、特定色判定部33から
の特定色判定信号J2と優先色度選択部35からの優先
色度指定信号J3と光源色度候補記憶部27からの光源
色度候補SS1、SS2とを受け、 J2=1かつJ3=1のとき、SS=SS2(3重平均
色度採用) そうでないとき、SS=SS1(全平均色度採用) とし、SSを推定された光源色度として出力する。
The average calculation means 22 inside the light source chromaticity candidate calculation unit 21 reads out the chromaticity data from the luminance chromaticity data storage unit 19 and calculates the total average chromaticity. The limited area data output unit 23 receives the total average chromaticity signal from the average calculation unit 22 and sets it as the reference chromaticity, reads out the chromaticity data from the luminance chromaticity data storage unit 19, and reads the chromaticity data from the chromaticity data. Only data belonging to the restricted area around the output is output.
One example is the difference δCS between the chromaticity data and the reference chromaticity.
i is calculated, the inner product (δCSi, δCSi) is compared with a preset value θ, and if (δCSi, δCSi) <θ, it is determined that it exists in the area. A method of outputting data is conceivable. The area limited average calculation unit 25 averages the data output from the limited area data output unit 23 to obtain a double average chromaticity. The limited area data output unit 24 receives the double average chromaticity from the area limited average calculation unit 25 and sets it as the reference chromaticity, reads out the chromaticity data from the luminance chromaticity data storage unit 19, and, among the chromaticity data, Only data belonging to a restricted area around the reference chromaticity is output. The area limited average calculation unit 26 averages the data output from the limited area data output unit 24 and sets the average as triple average chromaticity. The light source chromaticity candidate storage unit 26 receives the total average chromaticity from the average calculation unit 22 and the triple average chromaticity from the area limited average calculation unit 26, and stores them as light source chromaticity candidates SS1 and SS2. . The limited area center calculation unit 28 receives the light source chromaticity candidate SS2 from the light source chromaticity candidate storage unit 27 and sets it as the limited area center chromaticity SSC. The limited area data output unit 30 inside the dominant color existence determination unit 29 is
From the chromaticity data storage unit 19, the chromaticity data is read out from the chromaticity data storage unit 19, and only the data belonging to the restricted area around the reference chromaticity is included in the chromaticity data. Is output. The counter 31 counts the number of data output from the limited area data output unit and sets the number as the limited area data number N3. Dominant color presence determination threshold processing unit 3
2 receives the limited area data number N3 and compares it with a threshold value θ1 held inside. When N3 ≧ θ1, J1 = 1 (presence of dominant color). When N3 <θ1, J1 = 0 (predominant color). Absence). The specific color determination unit 33 includes an estimated light source chromaticity storage unit 27.
From the light source chromaticity candidates SS1 and SS2, it is checked whether or not the light source chromaticity candidate SS2 enters a specific area on the chromaticity plane held therein. If yes, J2 = 1 (SS2 is a specific area) If not, it is assumed that J2 = 0 (SS2 is outside the specific area). The priority chromaticity selection unit 35 inside the light source chromaticity determination unit 34 receives the light source estimation control signal J1 from the dominant color presence determination threshold value processing unit 32, and when J1 = 1, J3 = 1 (3 When J1 = 0, J3 = 0 (overall average chromaticity SS1 priority). The overall chromaticity determination unit 36 includes a specific color determination signal J2 from the specific color determination unit 33, a priority chromaticity designation signal J3 from the priority chromaticity selection unit 35, and a light source chromaticity candidate SS1 from the light source chromaticity candidate storage unit 27. , SS2, when J2 = 1 and J3 = 1, SS = SS2 (adopting triple average chromaticity), otherwise, SS = SS1 (adopting total average chromaticity), and SS is estimated light source color Output as degrees.

【0077】推定光源色度選択部37は、カラーチャー
ト認識部14からのカラーチャート認識信号SCとカラー
チャート用光源色度推定部18からのカラーチャート用
推定光源色度信号JCと光源色度判定部34からの一般画
像用推定光源色度信号SSとを受けて、カラーチャート
認識信号SCの値により、 SC = 1 (カラーチャートである) → SJG = JC SC = 0 (カラーチャートである) → SJG = SS として、推定光源色度信号SJGを出力する。
The estimated light source chromaticity selection unit 37 includes a color chart recognition signal SC from the color chart recognition unit 14, a color chart estimated light source chromaticity signal JC from the color chart light source chromaticity estimation unit 18, and a light source chromaticity determination. Receiving the estimated light source chromaticity signal SS for general image from the unit 34, and by the value of the color chart recognition signal SC, SC = 1 (a color chart) → SJG = JC SC = 0 (a color chart) → Assuming that SJG = SS, an estimated light source chromaticity signal SJG is output.

【0078】光源推定部38は、あらかじめ色度平面上
を適切に分割して各領域に光源を割り振っておき、推定
光源色度選択部からの推定光源色度SJGをうけて、推
定光源色度SJGがどの領域に属するかで光源を推定
し、光源推定結果をS1とする。
The light source estimating unit 38 appropriately divides the chromaticity plane in advance and allocates light sources to the respective regions, receives the estimated light source chromaticity SJG from the estimated light source chromaticity selecting unit, The light source is estimated according to which region the SJG belongs to, and the light source estimation result is set to S1.

【0079】絞り調整機構制御部39は、輝度色度変換
部2からの輝度信号と色度信号を受け、最適な絞り調整
を行うための絞り調整機構制御信号CIを計算し、絞り
調整機構と、屋外光源検出部40の内部にあるしきい値
処理手段41とに対して絞り調整機構制御信号CIを出
力する。ただし、CIは、絞りを最も閉じるときに最大
となる。したがって、F値が大きくなるとCIも大きく
なる。しきい値処理手段41は、絞り調整機構制御信号
CIと内部に保持するしきい値θCIとを比較し、 CI≧θCIのとき、JI1=1(屋外撮影画像の可能性
あり) そうでないとき、JI1=0(屋内撮影画像の可能性あ
り) とする。しきい値処理手段42は、輝度色度データ記憶
部19から輝度データYYiを読みだし、内部に保持す
るしきい値θYYと比較し、 YYi≧θYYのとき、JYi=1(高輝度色) そうでないとき、JYi=0(高輝度色ではない) とする。高色温度色判定部43は、輝度色度データ記憶
部19から色度データCSiを読みだし、あらかじめ設
定されている領域内にあるかどうか調べ、 SCiが領域内にあるとき、JAi=1(高色温度色) そうでないとき、JAi=0(高色温度色ではない) とする。AND回路44は、JYiとJAiが共に1の
ときのみ1を出力し、そうでない場合には0を出力す
る。カウンター45は、AND回路44からの出力が0
から1に反転した回数を数える。検出制御部46は、通
常は0を出力するが、高色温度色判定部43から出力さ
れる判定信号を数えて、すべての色度データに対する判
定が終わったら制御信号1を出力する。しきい値処理手
段47は、検出制御部46から出力される制御信号が1
になったら、カウンター45からカウントされた数NY
を読みだし、NYと内部に保持するしきい値θNYとを比
較して、 NY≧θNYのとき、JI2=1(屋外撮影画像の可能性
あり) そうでないとき、JI2=0(屋内撮影画像の可能性あ
り) とする。カウンター45のカウンター値は、しきい値処
理手段47に信号NYを出力すると0にされる。AND
回路48は、しきい値処理手段41からの判定信号JI
1と、しきい値処理手段47からの判定信号JI2とを
受けて、 JI1=JI2=0のとき、JI3=1(屋外撮影画像
である) そうでないとき、JI3=0(屋内撮影画像の可能性あ
り) とする。光源判定部49は、AND回路48からの光源
判定制御信号JI3と光源推定部38からの推定光源S
1とを受けて、 JI3=1のとき、Sf=OUT(屋外光源) JI3=0のとき、Sf=S1 とする。
The aperture adjustment mechanism control section 39 receives the luminance signal and the chromaticity signal from the luminance / chromaticity conversion section 2 and calculates an aperture adjustment mechanism control signal CI for performing an optimal aperture adjustment. And outputs the aperture adjustment mechanism control signal CI to the threshold value processing means 41 inside the outdoor light source detection section 40. However, CI becomes maximum when the aperture is closed most. Therefore, as the F value increases, the CI also increases. The threshold value processing means 41 compares the aperture adjustment mechanism control signal CI with the internally held threshold value θCI. If CI ≧ θCI, JI1 = 1 (there is a possibility of an outdoor photographed image). JI1 = 0 (there is a possibility of an indoor photographed image). The threshold value processing means 42 reads out the luminance data YYi from the luminance / chromaticity data storage unit 19 and compares it with a threshold value θYY stored therein. When YYi ≧ θYY, JYi = 1 (high luminance color) If not, JYi = 0 (not a high brightness color). The high color temperature color determination section 43 reads the chromaticity data CSi from the luminance / chromaticity data storage section 19 and checks whether or not the chromaticity data CSi is within a preset area. Otherwise, JAi = 0 (not high color temperature color). The AND circuit 44 outputs 1 only when both JYi and JAi are 1, and outputs 0 otherwise. The counter 45 outputs 0 from the AND circuit 44.
Count the number of times of inversion from 1 to 1. The detection control unit 46 normally outputs 0, but counts the determination signals output from the high color temperature color determination unit 43, and outputs the control signal 1 when the determination for all chromaticity data is completed. The threshold processing unit 47 determines that the control signal output from the detection control unit 46 is 1
, The number NY counted from the counter 45
Is read, and NY is compared with a threshold value θNY held internally. If NY ≧ θNY, JI2 = 1 (there is a possibility of an outdoor photographed image). Otherwise, JI2 = 0 (the indoor photographed image There is a possibility). When the signal NY is output to the threshold value processing means 47, the counter value of the counter 45 is set to 0. AND
The circuit 48 receives the judgment signal JI from the threshold value processing means 41.
1 and the judgment signal JI2 from the threshold processing means 47, JI1 = JI2 = 0, JI3 = 1 (outdoor shot image), otherwise JI3 = 0 (indoor shot image possible ). The light source determination unit 49 is configured to control the light source determination control signal JI3 from the AND circuit 48
In response to 1, when JI3 = 1, Sf = OUT (outdoor light source) When JI3 = 0, Sf = S1.

【0080】こうして、カラーチャートとそれ以外の一
般画像とを判別し、さらに一般画像の中でも支配色が存
在する画像と、屋外で撮影された画像特有の特徴を持つ
画像と、いずれにもあてはまらない画像とを判別して、
それぞれに適した方法で光源を推定する光源推定装置が
実現される。また、カラーチャート認識部14からの出
力は画像がカラーチャート画像であるかどうかを表わし
ているので、カラーチャート認識装置としての役割も果
たすことができる。
In this way, the color chart and the general image other than the color chart are discriminated, and the image does not apply to any of the general images having the dominant color and the image having the characteristic characteristic of the image photographed outdoors. Determine the image and
A light source estimation device that estimates a light source by a method suitable for each is realized. Further, since the output from the color chart recognition unit 14 indicates whether or not the image is a color chart image, it can also serve as a color chart recognition device.

【0081】さらに、支配色存在判定部からの出力は画
面上に支配色が存在するかどうかを表しているので、支
配色存在判定装置としての役割も果たすことができる。
また、光源色度判定部34からの出力は、一般画像に対
する光源色度の推定結果を表すので、光源色度推定装置
としての役割も果たすことができる。
Further, since the output from the dominant color presence determination unit indicates whether or not the dominant color exists on the screen, it can also serve as a dominant color presence determination device.
Further, the output from the light source chromaticity determination unit 34 represents the estimation result of the light source chromaticity for the general image, and thus can also serve as a light source chromaticity estimating device.

【0082】なお、「光源ライン」に垂直な方向を与え
るベクトル(V1,V2)は、ベクトル(1,1)におおよそ平
行であればよく、厳密に定める必要はない。パラメータ
によってカラーチャート判定精度は多少変化するが、デ
ータ分析の結果、その影響は小さいことがわかってい
る。また、画像分散VVの計算の本質は、画像信号として
(R,G,B)を用いるか(Y,R−Y,B−Y)を用
いるかなどには依存しない。
The vector (V1, V2) for giving a direction perpendicular to the "light source line" need only be approximately parallel to the vector (1, 1), and need not be strictly determined. Although the accuracy of the color chart determination slightly varies depending on the parameters, the data analysis shows that the effect is small. The essence of the calculation of the image variance VV does not depend on whether (R, G, B) or (Y, RY, BY) is used as the image signal.

【0083】また、画像分散計算部16では、画像信号
を2次元の色度座標に変換した上で画像分散を計算して
いるが、「光源曲線」を「光源曲面」と考え直すなどの
工夫で3次元の画像信号から直接画像分散を計算するこ
ともできる。また、カラーチャート判定条件は、本実施
例に掲げた方法の他にも、多くの方法がある。例えば、
適当な係数α、βを用意して CV = αRC − βVV を計算し、CVとしきい値とを比較してカラーチャート判
定信号を出力することも可能である。
The image variance calculating section 16 calculates the image variance after converting the image signal into two-dimensional chromaticity coordinates. It is also possible to calculate the image variance directly from the three-dimensional image signal. In addition, there are many color chart determination conditions other than the method described in the present embodiment. For example,
It is also possible to prepare appropriate coefficients α and β, calculate CV = αRC−βVV, compare the CV with a threshold value, and output a color chart determination signal.

【0084】また、座標変換手段9で「分布の軸」を4
5゜方向に合わせているのは、45゜に合わせるのが最
も効果的と考えられるからであって、必ずしも45゜で
ある必要はない。また、座標変換手段7で用いている2
×2行列Aの成分に共通な係数1/[2(1+a2)]1/2を省
略し、または別のものを用いても最後に得られる効果は
同じである。
The “axis of distribution” is set to 4 by the coordinate conversion means 9.
The reason why the angle is set to the direction of 5 ° is that it is considered that it is most effective to adjust the angle to 45 °, and it is not always necessary to set the angle to 45 °. In addition, 2 used in the coordinate conversion means 7
Even if the coefficient 1 / [2 (1 + a 2 )] 1/2 common to the components of the × 2 matrix A is omitted or another one is used, the effect obtained last is the same.

【0085】また、本実施例では座標変換後に再び相関
係数を計算しているが、座標変換後の相関係数は、座標
変換に用いる2×2行列の成分と座標変換前の2つの分
散と座標変換前の共分散とから容易に算出できるため、
必ずしも座標変換を実行する必要はない。座標変換を実
行せずにこれらの値を用いて座標変換後の相関係数を算
出することによって、より計算量の少ない単純な構成に
することも可能である。
Further, in this embodiment, the correlation coefficient is calculated again after the coordinate conversion. And the covariance before coordinate transformation,
It is not always necessary to perform coordinate transformation. By calculating the correlation coefficient after the coordinate conversion using these values without executing the coordinate conversion, a simple configuration with a smaller amount of calculation is possible.

【0086】また、本実施例では相関係数の絶対値を用
いているが、絶対値を用いなくても同様の処理は可能で
ある。本実施例では原理の説明で述べた、色度座標の
「回転相関係数」を用いているが、単なる色度座標の相
関係数を用いても、カラーチャートの認識は可能であ
る。
Although the present embodiment uses the absolute value of the correlation coefficient, the same processing can be performed without using the absolute value. In the present embodiment, the “rotational correlation coefficient” of the chromaticity coordinates described in the explanation of the principle is used. However, the color chart can be recognized even by simply using the correlation coefficient of the chromaticity coordinates.

【0087】さらに、本実施例では、限定領域中心色度
SSCを3重平均色度としたが、全平均色度としてもよ
いし、2重平均色度でもよい。2重平均を全平均の代わ
りの光源色度候補SS1としてもよい。2重平均は、色
度平面上で全平均のまわりの限定された領域にある画像
データの平均なので、画面上に枯草と空とがある場合な
どに、3重平均値ほど枯草の色の近くにはならない。
Further, in this embodiment, the limited area center chromaticity SSC is a triple average chromaticity, but may be a total average chromaticity or a double average chromaticity. The double average may be used as the light source chromaticity candidate SS1 instead of the total average. The double average is the average of the image data in a limited area around the entire average on the chromaticity plane, so when there is hay and the sky on the screen, the triple average value is closer to the color of the hay. It does not become.

【0088】また、支配色存在判定部では、限定領域に
入るデータ数を用いて支配色が存在するかどうかの判定
を行っているが、限定領域に入る画像データの分散が小
さいときに支配色存在と判定し、そうでないときに支配
色不在と判定してもよい。
In the dominant color existence determination unit, whether or not a dominant color exists is determined by using the number of data in the limited area. It may be determined that the color exists, and otherwise, it may be determined that the dominant color is absent.

【0089】本実施例では、3重平均色度のまわりの画
像データを用いて、画面上に支配色が存在するかどうか
判定したが、3重平均色度を計算するときに使ったデー
タ数を用いても、支配色が存在するかどうかの判定はで
きる。このとき、支配色存在判定部の構成を簡単にする
ことができる。
In this embodiment, it is determined whether or not a dominant color exists on the screen by using image data around the triple average chromaticity. However, the number of data used when calculating the triple average chromaticity is determined. Can be used to determine whether a dominant color exists. At this time, the configuration of the dominant color presence determination unit can be simplified.

【0090】さらに、限定領域データ出力部では、基準
色度からの距離が設定値θ以下であるような色度データ
を出力しているが、基準色度を中心とする多角形内に入
る色度データを出力してもよい。このとき、多角形を決
める複数点をあらかじめ保持しておけば、構成上問題は
ない。
Further, the limited area data output unit outputs chromaticity data such that the distance from the reference chromaticity is equal to or less than the set value θ. The degree data may be output. At this time, if a plurality of points that determine the polygon are held in advance, there is no problem in configuration.

【0091】本実施例では、屋外光源検出部による判定
結果が「被写体は屋内画像の可能性もある」となったと
きに、カラーチャート認識結果と支配色存在判定結果と
GWAとに基づく光源推定結果を出力するが、このとき
出力する光源推定結果は、どのような方法で推定した光
源であっても構成上問題はない。また、検出制御部は高
色温度色判定部からの出力を数えているが、輝度データ
に対してしきい値処理するしきい値処理手段42からの
出力を数えて、輝度データと色度データに対する処理が
終了したかどうか判断するように構成してもよい。これ
らの事柄は、以下の実施例においても同様なので、繰り
返さない。
In this embodiment, when the judgment result by the outdoor light source detecting section is “the subject may be an indoor image”, the light source estimation based on the color chart recognition result, the dominant color existence judgment result, and the GWA is performed. Although the result is output, the light source estimation result to be output at this time has no problem in the configuration even if the light source is estimated by any method. Although the detection control unit counts the output from the high color temperature color judgment unit, it counts the output from the threshold processing unit 42 that performs threshold processing on the luminance data, and calculates the luminance data and the chromaticity data. May be configured to determine whether the processing for is completed. These matters are the same in the following embodiments and will not be repeated.

【0092】(実施例2)次に、本発明の第2の実施例
の構成について、図面を参照しながら説明する。図9
は、カラーチャート認識装置の構成を示すブロック結線
図である。
(Embodiment 2) Next, the configuration of a second embodiment of the present invention will be described with reference to the drawings. FIG.
FIG. 3 is a block diagram showing a configuration of a color chart recognition device.

【0093】図9において、1はCCD等からの画像信
号ISを適当なサンプリング規則に従って変換するサン
プリング回路であり、100はサンプリング回路1から
サンプリングされた画像信号ISを2つの色度信号に変
換する色度変換部であり、71は原理の説明で述べた光
源ラインに垂直な方向に色度信号を射影してその成分の
大きさ(すなわち光源ラインからの垂直方向変位)に変
換する射影手段であり、72は光源ラインに平行な方向
に色度信号を射影してその成分の大きさ(すなわち光源
ラインに沿った平行方向変位)に変換する射影手段であ
り、3は射影手段71から垂直方向変位を受けてその分
散を計算する分散計算手段であり、4は射影手段72か
ら平行方向変位を受けてその分散を計算する分散計算手
段であり、5は射影手段71からの垂直方向変位と射影
手段72からの平行方向変位とを受けてそれらの共分散
を計算する共分散計算手段であり、8は分散計算手段3
と分散計算手段4と共分散計算手段5とのそれぞれの出
力を受けてそれらの値から構成される係数を持つ2次方
程式を解いて適当な解を出力する2次方程式求解手段で
あり、73は分散計算手段3と分散計算手段4と共分散
計算手段5と2次方程式求解手段8とのそれぞれの出力
を受けてこれらを用いて回転相関係数を算出して出力す
る演算回路であり、11と12とは内部に蓄えられたし
きい値と入力信号とを比較して判定信号を出力するしき
い値処理手段であり、13はAND回路であり、101
は本発明の中核をなすカラーチャート判定部、102は
統計量計算部、103は画像分散計算部である。
In FIG. 9, reference numeral 1 denotes a sampling circuit for converting an image signal IS from a CCD or the like in accordance with an appropriate sampling rule, and 100 converts the image signal IS sampled from the sampling circuit 1 into two chromaticity signals. A chromaticity conversion unit 71 is a projecting means for projecting a chromaticity signal in a direction perpendicular to the light source line described in the explanation of the principle and converting the chromaticity signal into the size of the component (ie, vertical displacement from the light source line). Reference numeral 72 denotes projection means for projecting a chromaticity signal in a direction parallel to the light source line and converting the chromaticity signal into a component size (that is, displacement in a parallel direction along the light source line). Reference numeral 3 denotes a vertical direction from the projection means 71. A variance calculating means for calculating the variance in response to the displacement, 4 is a variance calculating means for calculating the variance in response to the parallel displacement from the projecting means 72, and 5 is a variance calculating means. Receiving a direction parallel displacement from vertical displacement and projection means 72 from the means 71 is a covariance calculation means for calculating their covariance, 8 distributed computing unit 3
And quadratic equation solving means for receiving an output of each of the variance calculating means 4 and the covariance calculating means 5, solving a quadratic equation having coefficients constituted by the values, and outputting an appropriate solution. Is an arithmetic circuit that receives the outputs of the variance calculation means 3, the variance calculation means 4, the covariance calculation means 5, and the quadratic equation solving means 8 and calculates and outputs a rotational correlation coefficient using these outputs; Reference numerals 11 and 12 denote threshold value processing means for comparing the threshold value stored therein with the input signal and outputting a judgment signal. Reference numeral 13 denotes an AND circuit.
Denotes a color chart determination unit which is the core of the present invention, 102 denotes a statistic calculation unit, and 103 denotes an image variance calculation unit.

【0094】以上のように構成されたカラーチャート認
識装置の動作について、図10を用いて説明する。ま
ず、CCD等からの画像信号ISは、サンプリング回路
1に入り、適当なサンプリング規則に従って変換され
る。色度変換部100は、サンプリング回路1でサンプ
リングされた画像信号<IS>i=(YYi, RYY
i,BYYi)を受けて、これを色度信号CSi=(B
Yi, RYi)に変換する。
The operation of the color chart recognizing device thus constructed will be described with reference to FIG. First, an image signal IS from a CCD or the like enters the sampling circuit 1 and is converted according to an appropriate sampling rule. The chromaticity converter 100 converts the image signal <IS> i = (YYi, RYY) sampled by the sampling circuit 1
i, BYYi), and receives the chromaticity signal CSi = (B
Yi, RYi).

【0095】射影手段71は、色度信号CSiを受け
て、原理の説明で述べた「光源ライン」に垂直な方向
(V1,V2)にこれを射影し、その方向の成分すなわち
「光源ライン」からの垂直方向変位 Vi = V1・BYi + V2・RYi に変換する。ただしここで(V1、V2)は2次元の単位
ベクトルとしている。射影手段72は、色度信号CSi
を受けて、原理の説明で述べた「光源ライン」に平行な
方向(V2,−V1)にこれを射影し、その方向の成分す
なわち「光源ライン」からの平行方向変位 Ui = V2・BYi − V1・RYi に変換する。分散計算手段3は、射影手段71から垂直
方向変位Viを受けて、垂直方向画像信号分散 VV = < ( Vi−<V> )2 > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。分散計算手段4は、射影手段72から平行
方向変位Uiを受けて、平行方向画像信号分散 VU = < ( Ui−<U> )2 > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。
The projection means 71 receives the chromaticity signal CSi, and receives the chromaticity signal CSi in a direction perpendicular to the "light source line" described in the description of the principle.
This is projected onto (V1, V2), and is converted into a component in that direction, that is, a vertical displacement Vi = V1.BYi + V2.RYi from the "light source line". Here, (V1, V2) is a two-dimensional unit vector. The projection means 72 outputs the chromaticity signal CSi
Accordingly, the light is projected in a direction (V2, −V1) parallel to the “light source line” described in the description of the principle, and a component in that direction, that is, a parallel direction displacement from the “light source line” Ui = V2 · BYi− V1 · RYi. Distributed computing unit 3 receives the vertical displacement Vi from projection unit 71, the vertical direction image signal variance VV = <(Vi- <V> ) 2> However, <x>: the average value of the variable x? X i / N Is calculated. Distributed computing unit 4 receives the parallel displacement Ui from the projection means 72, parallel image signal variance VU = <(Ui- <U> ) 2> However, <x>: average value? X i / N of the variable x Is calculated.

【0096】共分散計算手段5は、射影手段71からの
垂直方向変位Viと射影手段72からの平行方向変位U
iとを受けて、これらの共分散 CVU = < ( Vi−<V> ) ( Ui−<U> ) > ただし、 <x> : 変数xの平均値 Σxi/N を計算する。2次方程式求解手段8は、分散計算手段3
で計算した分散VVと分散計算手段4で計算した分散VUと
共分散計算手段5で計算した共分散CVUとを受けて、
「光源ライン」に垂直な方向に対する色度信号CSiの
「分布の軸」の傾き、すなわち2次方程式 CVU・a2 + (VV−VU)a − CVU = 0 の解のうち 2CVU・a + VV − VU ≧ 0 を満たすものを計算する。
The covariance calculation means 5 calculates the vertical displacement Vi from the projection means 71 and the parallel displacement U from the projection means 72.
In response to i, these covariances CVU = <(Vi- <V>) (Ui- <U>)> where <x>: average value 変 数xi / N of variable x. The quadratic equation solving means 8 includes the variance calculating means 3
Receiving the variance VV calculated in the above, the variance VU calculated by the variance calculation means 4 and the covariance CVU calculated by the covariance calculation means 5,
The gradient of the “distribution axis” of the chromaticity signal CSi with respect to the direction perpendicular to the “light source line”, that is, 2CVU · a + VV of the solution of the quadratic equation CVU · a 2 + (VV−VU) a−CVU = 0 -Calculate those that satisfy VU ≥ 0.

【0097】演算回路73は、2次方程式求解手段8で
求められた「分布の軸」の傾きaと分散計算手段3で計
算した分散VVと分散計算手段4で計算した分散VUと共分
散計算手段5で計算した共分散CVUとを受けて、変位X
i=(Vi,Ui)に対して座標変換 V’i = A11・Vi + A12・Ui U’i = A21・Vi + A22・Ui を施した場合の変換された変位X’=(V’i,U’i)
の相関係数の絶対値を計算する。ここで、A11,A12,A21,
A22は「分布の軸」が45゜方向になるように座標軸を
回転する2×2行列Aの成分 A11 = A22 = (1+a)/[2(1+a2)]1/2 −A12 = A21 = (1−a)/[2(1+a2)]1/2 としている。ただしここで座標変換後の相関係数の絶対
値は座標変換前の分散及び共分散から次の式で計算でき
る。
The arithmetic circuit 73 calculates the gradient a of the “distribution axis” obtained by the quadratic equation solving means 8, the variance VV calculated by the variance calculating means 3, the variance VU calculated by the variance calculating means 4, and the covariance calculation. Given the covariance CVU calculated by the means 5, the displacement X
i = (Vi, Ui) transformed displacement X when subjected to coordinate transformation V'i = A 11 · Vi + A 12 · Ui U'i = A 21 · Vi + A 22 · Ui against '= (V'i, U'i)
Calculate the absolute value of the correlation coefficient of Where A 11 , A 12 , A 21 ,
A 22 is a component of the 2 × 2 matrix A that rotates the coordinate axes so that the “axis of distribution” is in the 45 ° direction. A 11 = A 22 = (1 + a) / [2 (1 + a 2 )] 1/2 −A 12 = a 21 = (1-a ) / [2 (1 + a 2)] is set to 1/2. Here, the absolute value of the correlation coefficient after the coordinate transformation can be calculated from the variance and the covariance before the coordinate transformation using the following equation.

【0098】 RC' = |Cov(v',u') / [V(v')V(u')]1/2| ただし Cov(v',u') = A11A21VV+(A11A22+A12A21)CVU+A12A22VU V(v') = A11 2VV+A11A12CVU+A12 2VU V(u') = A21 2VV+A21A22CVU+A22 2VU これは原理の説明で述べた「回転相関係数」の絶対値に
ほかならない。
RC ′ = | Cov (v ′, u ′) / [V (v ′) V (u ′)] 1/2 | where Cov (v ′, u ′) = A 11 A 21 VV + (A 11 a 22 + a 12 a 21) CVU + a 12 a 22 VU V (v ') = a 11 2 VV + a 11 a 12 CVU + a 12 2 VU V (u') = a 21 2 VV + a 21 a 22 CVU + a 22 2 VU This principle This is nothing less than the absolute value of the “rotational correlation coefficient” described in the description.

【0099】しきい値処理手段11は、演算回路73で
計算された回転相関係数RC'と内部に蓄えられた相関係
数しきい値θRC'とを比較し、 RC' < θRC' の場合 SC1=1 : カラーチャートの
可能性あり そうでない場合 SC1=0 : カラーチャートで
ない として、カラーチャート相関係数判定信号SC1を出力
する。しきい値処理手段12は、分散計算手段3で計算
された画像信号分散VVと内部に蓄えられた画像分散しき
い値θVVとを比較し、 VV > θVV の場合 SC2=1 : カラーチャートの
可能性あり そうでない場合 SC2=0 : カラーチャートで
ない として、カラーチャート分散判定信号SC2を出力す
る。
The threshold value processing means 11 compares the rotational correlation coefficient RC ′ calculated by the arithmetic circuit 73 with the correlation coefficient threshold value θRC ′ stored therein, and if RC ′ <θRC ′ SC1 = 1: If there is no possibility of a color chart SC1 = 0: Not a color chart, and outputs a color chart correlation coefficient determination signal SC1. The threshold value processing unit 12 compares the image signal variance VV calculated by the variance calculation unit 3 with the image variance threshold value θVV stored therein. If VV> θVV, SC2 = 1: color chart possible If not, SC2 = 0: It is determined that the color chart is not displayed, and the color chart dispersion determination signal SC2 is output.

【0100】AND回路13は、しきい値処理手段11
が出力するカラーチャート相関係数判定信号SC1とし
きい値処理手段12が出力するカラーチャート分散判定
信号SC2との論理積をとり、カラーチャート判定信号
SC: SC = 1 : カラーチャートである SC = 0 : カラーチャートでない を出力する。こうして画像信号から、カラーチャートの
判定がなされる。
The AND circuit 13 includes a threshold processing unit 11
Of the color chart correlation coefficient determination signal SC1 output by the threshold value processing means 12 and the color chart dispersion determination signal SC2 output by the threshold value processing means 12
SC: SC = 1: Output color chart SC = 0: Output not color chart. Thus, the color chart is determined from the image signal.

【0101】本実施例の特徴は、実施例1のカラーチャ
ート認識部では分散計算が3回必要なのに対し、色度デ
ータの座標軸を「光源ライン」に垂直な方向と平行な方
向とに取り直して画像分散を計算することにより分散計
算が2回で済み、より計算量が少なく、構成も簡単とな
る点にある。
The feature of this embodiment is that the color chart recognizing unit of the first embodiment requires three variance calculations, whereas the coordinate axes of the chromaticity data are reset to the direction perpendicular to the “light source line” and the direction parallel thereto. By calculating the image variance, only two variance calculations are required, and the amount of calculation is smaller and the configuration is simpler.

【0102】なお、本実施例では「回転相関係数」の計
算に際して、座標変換を実行する代わりに一次変換前の
分散及び共分散と一次変換後の分散及び共分散との間に
一般的に成立する関係を利用することによって、計算量
を減らし、構成をより単純にしているが、このような構
成を必ずしもとる必要はなく、実施例1のカラーチャー
ト認識部のように座標変換を実行する構成にしてもよ
い。
In this embodiment, when calculating the “rotational correlation coefficient”, instead of performing coordinate transformation, the variance and covariance before the first-order transformation and the variance and covariance after the first-order transformation are generally calculated. Although the amount of calculation is reduced and the configuration is simplified by using the relationship that is established, such a configuration is not necessarily required, and coordinate conversion is performed as in the color chart recognition unit of the first embodiment. It may be configured.

【0103】(実施例3)次に、本発明の第3の実施例
について図面を参照しながら説明する。図11は、第3
の実施例である支配色存在判定部を備えた画像データ判
定装置の構成を示すブロック図である。
(Embodiment 3) Next, a third embodiment of the present invention will be described with reference to the drawings. FIG.
It is a block diagram showing the composition of the image data judging device provided with the dominant color existence judging part which is an Example of.

【0104】図11において、1はCCD等からの画像
信号ISを適当なサンプリング規則にしたがって変換す
るサンプリング回路、100はサンプリングされた画像
データを色度信号に変換する色度変換部、200は変換
された色度信号を色度データとして記憶する色度データ
記憶部、20は画像判定が終了するまで色度データ記憶
部への記憶を禁止する記憶制御部である。201は限定
領域の中心となる色度を計算する限定領域中心計算部で
あり、色度データの全平均色度を計算する平均計算手段
22と、入力された基準色度と色度データ記憶部から読
みだされた色度データとから基準色度のまわりの限定さ
れた領域に属するデータを選択して出力する限定領域デ
ータ出力部23と、限定領域データ出力部から出力され
る限定領域データの平均を計算する領域限定平均計算部
25とを備えている。202は画面上に支配的な色が存
在するかどうか判定する支配色存在判定部であり、入力
された基準色度と色度データ記憶部から読みだされた色
度データとから基準色度のまわりの限定された領域に属
するデータを選択して出力する限定領域データ出力部3
0と、限定領域データ出力部から出力されるデータの数
をカウントするカウンター31と、カウンター31から
の出力が第1の設定値よりも大きい場合に支配色存在と
し、第2の設定値よりも小さい場合にGWA不成立と
し、その他の場合には支配色不在とする支配色存在判定
しきい値処理部203とを備えている。
In FIG. 11, reference numeral 1 denotes a sampling circuit for converting an image signal IS from a CCD or the like in accordance with an appropriate sampling rule; 100, a chromaticity conversion unit for converting sampled image data into a chromaticity signal; A chromaticity data storage unit that stores the obtained chromaticity signal as chromaticity data, and a storage control unit 20 that prohibits storage in the chromaticity data storage unit until image determination is completed. Reference numeral 201 denotes a limited area center calculation unit that calculates the chromaticity at the center of the limited area, an average calculation unit 22 that calculates the total average chromaticity of the chromaticity data, and an input reference chromaticity and chromaticity data storage unit. A limited area data output unit 23 that selects and outputs data belonging to a limited area around the reference chromaticity from the chromaticity data read from the limited chromaticity data; And an area-limited average calculating unit 25 for calculating an average. Reference numeral 202 denotes a dominant color existence determination unit that determines whether or not a dominant color exists on the screen, and determines a reference chromaticity based on the input reference chromaticity and chromaticity data read from the chromaticity data storage unit. Limited area data output unit 3 for selecting and outputting data belonging to a limited area around it
0, a counter 31 for counting the number of data output from the limited area data output unit, and when the output from the counter 31 is larger than the first set value, it is determined that there is a dominant color, and the control color is larger than the second set value. A dominant color presence determination threshold value processing unit 203 that determines that the GWA is not established when the value is smaller and that the dominant color is absent in other cases.

【0105】204は支配色存在判定部202からの判
定結果を処理してGWAの成立を調べることで光源推定
に適した画像であるかどうかを判定する判定結果処理部
であり、光源ラインに垂直な方向へ射影しその方向の成
分の大きさである変位に変換する射影手段205と、色
度データから求められた変位の分散を計算する分散計算
手段206と、支配色存在判定しきい値処理部203か
らのしきい値制御信号を受けて、支配色が存在する場合
に大きなしきい値を設定し、支配色が不在の場合に小さ
なしきい値を設定し、GWA不成立の場合にしきい値を
0に設定するしきい値設定部207と、分散計算手段か
らの分散としきい値設定部からのしきい値とを受けて、
分散がしきい値より小さい場合にはGWA成立とし、そ
の他の場合にはGWA不成立とするGWA判定しきい値
処理部208とを備えている。
A determination result processing unit 204 processes the determination result from the dominant color presence determination unit 202 and checks whether GWA is established or not to determine whether the image is suitable for light source estimation. Projecting means 205 for projecting in a particular direction and converting the displacement into a displacement which is the size of the component in that direction; dispersion calculating means 206 for calculating the variance of the displacement obtained from the chromaticity data; In response to the threshold control signal from unit 203, a large threshold is set when a dominant color is present, a small threshold is set when a dominant color is absent, and a threshold is set when GWA is not established. Receiving a variance from the variance calculation means and a threshold from the threshold setting unit,
A GWA determination threshold value processing unit 208 determines that the GWA is established when the variance is smaller than the threshold value, and otherwise determines that the GWA is not established.

【0106】以上のように構成された画像データ判定装
置について、その動作を説明する。まず、CCDなどか
らの画像信号IS=(Y,R−Y,B−Y)は、サンプ
リング回路1に入り、適当なサンプリング規則に従って
変換される。色度変換部100はサンプリング回路1か
らブロック平均(YYi,RYYi,BYYi)を受
け、 BYi=BYYi/YYi RYi=RYYi/YYi を計算し、色度信号CSi=(BYi,RYi)に変換
する。色度データ記憶部200は、色度信号CSiを色
度データとして記憶する。記憶が終了すると、記憶制御
部20が色度データ記憶部への色度データの書き込みを
禁止する。
The operation of the image data judging device configured as described above will be described. First, an image signal IS = (Y, RY, BY) from a CCD or the like enters the sampling circuit 1 and is converted according to an appropriate sampling rule. The chromaticity conversion unit 100 receives the block average (YYi, RYYi, BYYi) from the sampling circuit 1, calculates BYi = BYYi / YYi, RYi = RYYi / YYi, and converts it into a chromaticity signal CSi = (BYi, RYi). The chromaticity data storage unit 200 stores the chromaticity signal CSi as chromaticity data. When the storage is completed, the storage control unit 20 prohibits the writing of the chromaticity data to the chromaticity data storage unit.

【0107】限定領域中心計算部201の内部にある平
均計算手段22は、色度データ記憶部200から色度デ
ータを読みだし、全平均色度を計算する。限定領域デー
タ出力部23は、平均計算手段22から全平均色度信号
を受けて基準色度とし、色度データ記憶部200から色
度データを読みだし、色度データの内で、基準色度の周
囲の制限された領域に属するデータのみを出力する。領
域限定平均計算部25は、限定領域データ出力部23か
ら出力されたデータを平均し、2重平均色度とする。支
配色存在判定部202の内部にある限定領域データ出力
部30は、領域限定平均計算部25から2重平均色度を
受けて基準色度とし、色度データ記憶部200から色度
データを読みだし、色度データの内で、基準色度の周囲
の制限された領域に属するデータのみを出力する。カウ
ンター31は、限定領域データ出力部から出力されるデ
ータの数を数え、限定領域データ数N2とする。無彩色
存在判定しきい値処理部203は、限定領域データ数N
2を受けて、内部に保持するしきい値θ1、θ2と比較
し、 N2≧θ1のとき、J1=1(支配色存在) θ1>N2≧θ2のとき、J1=0(支配色不在) N2<θ2のとき、J1=2(GWA不成立) とする。判定結果処理部204の内部にある射影手段2
05は、色度データ記憶部200から色度データCSi
=(C1i,C2i)、i=1、・・・ 、Nを受けて、図
4の光源ラインに垂直な方向(V1,V2)に射影し、
その方向の成分の大きさ、すなわち光源ラインからの変
位 Xi=BYi・V1+RYi・V2 <X>=(ΣXi)/N に変換する。分散計算手段206は、射影手段205か
ら、変位Xi、<X>を受けて、分散 SGM={Σ(Xi−<X>)2 }/N を計算する。しきい値設定部207は、内部に設定値θ
3、θ4を保持しており、支配色存在判定しきい値処理
部203からのしきい値制御信号J1を受けて、 J1=1のとき、θs=θ3 J1=0のとき、θs=θ4 J1=2のとき、θs=0 とする。ただし、θ3≧θ4である。GWA判定しきい
値処理部208は、分散計算手段206からの画像デー
タ分散SGMとしきい値設定部207からのしきい値信
号θsとを受けて、 SGM<θsの時、J4=1(GWA成立) その他の場合には、J4=0(GWA不成立) とする。
The average calculating means 22 inside the limited area center calculating section 201 reads out the chromaticity data from the chromaticity data storage section 200 and calculates the total average chromaticity. The limited area data output unit 23 receives the total average chromaticity signal from the average calculation unit 22 and sets it as the reference chromaticity, reads out the chromaticity data from the chromaticity data storage unit 200, and sets the reference chromaticity Only the data belonging to the restricted area around is output. The area limited average calculation unit 25 averages the data output from the limited area data output unit 23 to obtain a double average chromaticity. The limited area data output unit 30 inside the dominant color existence determination unit 202 receives the double average chromaticity from the area limited average calculation unit 25 and sets it as the reference chromaticity, and reads the chromaticity data from the chromaticity data storage unit 200. However, of the chromaticity data, only data belonging to a restricted area around the reference chromaticity is output. The counter 31 counts the number of data output from the limited area data output unit and sets the number as limited area data number N2. The achromatic color existence determination threshold value processing unit 203 calculates the limited area data number N
And N2 ≧ 2, J1 = 1 (presence of dominant color), θ1> N2 ≧ θ2, J1 = 0 (absence of predominant color) N2 When <θ2, J1 = 2 (GWA not established). Projection means 2 inside judgment result processing section 204
05 is the chromaticity data CSi from the chromaticity data storage unit 200.
= (C1i, C2i), i = 1,..., N, and project in the direction (V1, V2) perpendicular to the light source line in FIG.
The magnitude of the component in that direction, that is, the displacement from the light source line Xi = BYi · V1 + RYi · V2 <X> = (ΣXi) / N The variance calculation unit 206 receives the displacement Xi, <X> from the projection unit 205 and calculates the variance SGM = {(Xi− <X>) 2 } / N. The threshold value setting unit 207 internally stores a set value θ
3 and θ4, and receives the threshold value control signal J1 from the dominant color presence determination threshold value processing unit 203. When J1 = 1, θs = θ3, when J1 = 0, θs = θ4 J1 = 2, θs = 0. However, θ3 ≧ θ4. The GWA determination threshold value processing unit 208 receives the image data variance SGM from the variance calculation unit 206 and the threshold value signal θs from the threshold value setting unit 207, and when SGM <θs, J4 = 1 (GWA holds) In other cases, J4 = 0 (GWA not established).

【0108】こうして、支配色が存在する画像とそうで
ない画像を判別して、判別した結果を用いてGWA判定
のしきい値を設定し、垂直分散と設定したしきい値との
大小関係からGWAの成立を判定することで、光源推定
に適した画像を判別する画像データ判定装置が実現され
る。
In this way, an image in which a dominant color exists and an image in which it does not exist are discriminated, and a threshold value for GWA judgment is set using the discrimination result, and GWA is determined from the magnitude relationship between the vertical dispersion and the set threshold value. By determining whether or not is established, an image data determination device that determines an image suitable for light source estimation is realized.

【0109】なお、本実施例では、支配色存在判定部か
ら出力されるしきい値制御信号J1として、支配色存
在、支配色不在、GWA不成立の3通りとしたが、2重
平均のまわりの色度データ数N2が十分小さい場合に
は、垂直分散が大きくなりGWA判定部でGWA不成立
と判定されるケースが多いので、J1として、支配色存
在、支配色不在の2通りとしてもよい。そして、支配色
存在判定部からの判定結果が支配色存在の場合にGWA
成立とし、そうでない場合にGWA不成立とするように
判定結果処理部を構成してもよい。
In the present embodiment, the threshold control signal J1 output from the dominant color existence determining section is three, that is, dominant color exists, dominant color does not exist, and GWA does not hold. When the number of chromaticity data N2 is sufficiently small, the vertical variance becomes large and the GWA determination unit often determines that GWA is not established. Therefore, J1 may be two types, that is, the presence of a dominant color and the absence of a dominant color. If the determination result from the dominant color presence determination unit is that there is a dominant color,
The determination result processing unit may be configured so that the determination is made, and otherwise, the GWA is not determined.

【0110】さらに、支配色存在判定部から出力される
しきい値制御信号J1は3通り以上としてもよい。この
とき、しきい値設定部の内部に保持する設定値を増やす
ことで、よりきめ細かくGWA判定用しきい値θsを設
定できるようになり、画像データ判定精度が向上する。
これらの事柄は、以下の実施例においても同様なので、
繰り返さない。
Furthermore, the threshold control signal J1 output from the dominant color existence determination section may be of three or more types. At this time, by increasing the set value held inside the threshold value setting unit, the threshold value θs for GWA determination can be set more finely, and the image data determination accuracy is improved.
Since these matters are the same in the following examples,
Do not repeat.

【0111】(実施例4)次に、本発明の第4の実施例
について図面を参照しながら説明する。第4の実施例
は、支配色存在判定部と特定色判定部とを備えた光源推
定装置である。第1の実施例で光源色度推定部について
述べ、第3の実施例で画像データ判定装置について述べ
たが、光源推定装置の一部分と考えたときには、支配色
存在判定部を共通の部分とし、光源色度候補の一つを限
定領域中心色度とすることができる。また、支配色存在
判定部を光源推定部の一部として使う場合には、きめ細
かい判定結果を出力するように支配色存在判定部を構成
した方が、光源推定精度が向上する。そこで、第4の実
施例では、光源色度推定部分と画像データ判定部分を備
え、かつ、推定された光源色度と判定結果を用いて光源
推定を実行する光源推定装置について述べる。
(Embodiment 4) Next, a fourth embodiment of the present invention will be described with reference to the drawings. The fourth embodiment is a light source estimating device including a dominant color existence determination unit and a specific color determination unit. Although the light source chromaticity estimating unit has been described in the first embodiment, and the image data determining device has been described in the third embodiment, when considered as a part of the light source estimating device, the dominant color existence determining unit is a common part, One of the light source chromaticity candidates can be the limited area center chromaticity. When the dominant color presence determination unit is used as a part of the light source estimating unit, the configuration of the dominant color presence determination unit so as to output a detailed determination result improves the light source estimation accuracy. Therefore, a fourth embodiment describes a light source estimating apparatus that includes a light source chromaticity estimation portion and an image data determination portion, and that performs light source estimation using the estimated light source chromaticity and the determination result.

【0112】図12は、第4の実施例である光源推定装
置の構成を示すブロック図である。図12において、1
はCCD等からの画像信号ISを適当なサンプリング規
則にしたがって変換するサンプリング回路、100はサ
ンプリングされた画像データを色度信号に変換する色度
変換部、200は変換された色度信号を色度データとし
て記憶する色度データ記憶部、20は画像判定が終了す
るまで色度データ記憶部への記憶を禁止する記憶制御部
である。301は光源色度を推定する光源色度推定部で
あり、色度データの全平均色度を計算する平均計算手段
22と、入力された基準色度と色度データ記憶部から読
みだされた色度データとから基準色度のまわりの限定さ
れた領域に属するデータを選択して出力する限定領域デ
ータ出力部23、24と、限定領域データ出力部から出
力される限定領域データの平均を計算する領域限定平均
計算部25、26と、平均計算手段からの全平均色度と
領域限定平均計算部からの多重平均色度とを記憶する光
源色度候補記憶部27と、色度データを黒体輻射からの
光源の色が黒体の温度をパラメータとしたときに色度平
面上に描く軌跡を近似する直線に、光源色度候補が近い
場合に特定色と判定し、そうでない場合に特定色以外と
判定する特定色判定部33と、支配色不在またはGWA
不成立の場合に全平均色度を優先色度とし、そうでない
場合に多重平均色度を優先色度とする優先色度選択部3
02と、全平均色度が優先色度の場合には全平均色度を
推定光源色度とし、多重平均色度が優先色度で、かつ、
特定色判定部からの特定色判定信号が特定色ならば多重
平均色度を推定光源色度とし、いずれの場合にもあては
まらないときには「条件付きで全平均色度」とする総合
色度判定部36とを備えている。
FIG. 12 is a block diagram showing the configuration of a light source estimation device according to the fourth embodiment. In FIG. 12, 1
Is a sampling circuit for converting an image signal IS from a CCD or the like according to an appropriate sampling rule, 100 is a chromaticity conversion unit for converting sampled image data into a chromaticity signal, and 200 is a chromaticity signal for converting the converted chromaticity signal. A chromaticity data storage unit 20 that stores data is a storage control unit that prohibits storage in the chromaticity data storage unit until image determination is completed. Reference numeral 301 denotes a light source chromaticity estimating unit for estimating the light source chromaticity, which is read from the average calculating unit 22 for calculating the total average chromaticity of the chromaticity data, and the input reference chromaticity and chromaticity data storage unit. Limited area data output units 23 and 24 for selecting and outputting data belonging to a limited area around the reference chromaticity from the chromaticity data, and calculating an average of limited area data output from the limited area data output unit Region limited average calculation units 25 and 26, a light source chromaticity candidate storage unit 27 that stores the total average chromaticity from the average calculation unit and the multiple average chromaticity from the region limited average calculation unit, When the color of the light source from body radiation is the parameter of the temperature of the black body as a parameter, the light source chromaticity candidate is determined to be a specific color if the light source chromaticity candidate is close to a straight line that approximates the locus drawn on the chromaticity plane, and otherwise specified. Specific color determination unit 33 that determines that the color is not a color , Dominant color absence or GWA
Priority chromaticity selection unit 3 that sets the overall average chromaticity as the priority chromaticity if the condition is not satisfied, and sets the multiple average chromaticity as the priority chromaticity otherwise.
02, when the total average chromaticity is the priority chromaticity, the total average chromaticity is the estimated light source chromaticity, the multiple average chromaticity is the priority chromaticity, and
If the specific color determination signal from the specific color determination unit is a specific color, the multi-average chromaticity is set as the estimated light source chromaticity, and if not applicable in any case, the total chromaticity is set to "conditionally total average chromaticity" 36.

【0113】303は支配色存在判定部であり、限定領
域データ出力部24から出力されるデータの数をカウン
トするカウンター31と、カウンターからの出力が第1
の設定値よりも大きい場合に支配色存在とし、カウンタ
ーからの出力が第2の設定値よりも小さい場合にGWA
不成立とし、カウンターからの出力が第2の設定値より
も大きく第3の設定値よりも小さい場合に支配色不在と
し、その他の場合には支配色存在可能性小とする支配色
存在判定しきい値処理部304とを備えている。305
は、支配色存在判定部303からの判定結果を処理して
GWAの成立を調べることで光源推定に適した画像であ
るかどうかを判定する判定結果処理部であり、色度デー
タを黒体輻射からの光源の色が黒体の温度をパラメータ
としたときに色度平面上に描く軌跡を近似する直線に垂
直な方向へ射影しその方向の成分の大きさである変位に
変換する射影手段205と、色度データから求められた
変位の分散を計算する分散計算手段206と、支配色存
在判定しきい値処理部304からのしきい値制御信号を
受けて、支配色存在の場合に大きなしきい値を設定し、
GWA不成立の場合にしきい値を0に設定し、その他の
場合には小さなしきい値を設定するしきい値設定部30
6と、分散計算手段からの分散としきい値設定部からの
しきい値とを受けて、分散がしきい値より小さい場合に
はGWA成立とし、その他の場合にはGWA不成立とす
るGWA判定しきい値処理部208と、総合色度判定部
で判定された推定光源色度を受け色度平面上を適切に分
割し各領域に光源を割り振り、推定光源色度がどの領域
に属するかで光源を推定する光源推定部307と、GW
A判定しきい値処理部からの光源推定制御信号と光源推
定部からの光源推定結果とを用いて総合的な判定を行う
総合判定部308と、総合判定部からの総合判定結果を
受け、それが判定不能であった場合には内部に保持され
た光源推定結果を出力する光源推定結果保持部309と
を備えている。
Reference numeral 303 denotes a dominant color presence determination unit, which includes a counter 31 for counting the number of data output from the limited area data output unit 24, and a first output from the counter.
Is set to be larger than the second set value, and GWA is set when the output from the counter is smaller than the second set value.
If the output from the counter is greater than the second set value and smaller than the third set value, the control color is determined to be absent, and otherwise the control color existence possibility is determined to be small, and the control color presence determination threshold is determined. A value processing unit 304. 305
Is a determination result processing unit that processes the determination result from the dominant color presence determination unit 303 and checks whether GWA is established to determine whether the image is suitable for light source estimation. When the color of the light source from the camera as a parameter is the temperature of the black body, the projection unit 205 projects the trajectory drawn on the chromaticity plane in a direction perpendicular to a straight line approximating the trajectory and converts the trajectory into a displacement which is the size of the component in that direction. And a variance calculating means 206 for calculating the variance of the displacement obtained from the chromaticity data, and a threshold control signal from the dominant color presence determination threshold value processing unit 304 to determine whether or not there is a dominant color. Set the threshold,
A threshold setting unit 30 that sets a threshold to 0 when GWA is not established, and sets a small threshold in other cases.
6 and the variance from the variance calculation means and the threshold value from the threshold value setting unit, and if the variance is smaller than the threshold value, the GWA is determined to be established; otherwise, the GWA is determined to be not established. The threshold value processing unit 208 and the estimated illuminant chromaticity determined by the overall chromaticity determination unit are appropriately divided on the chromaticity plane, and the light sources are allocated to the respective regions. Light source estimating section 307 for estimating
A comprehensive determination unit 308 that performs a comprehensive determination using the light source estimation control signal from the A determination threshold value processing unit and the light source estimation result from the light source estimation unit, and receives the comprehensive determination result from the comprehensive determination unit. And a light source estimation result holding unit 309 that outputs the light source estimation result held therein when the determination of the light source cannot be made.

【0114】以上のように構成された光源推定装置につ
いて、その動作を説明する。まず、CCDなどからの画
像信号IS=(Y,R−Y,B−Y)は、サンプリング
回路1に入り、適当なサンプリング規則に従って変換さ
れる。色度変換部100はサンプリング回路1からブロ
ック平均(YYi,RYYi,BYYi)を受け、 BYi=BYYi/YYi RYi=RYYi/YYi を計算し、色度信号CSi=(BYi,RYi)に変換
する。色度データ記憶部200は、色度信号CSiを色
度データとして記憶する。記憶が終了すると、記憶制御
部20が色度データ記憶部への色度データの書き込みを
禁止する。
The operation of the light source estimating apparatus configured as described above will be described. First, an image signal IS = (Y, RY, BY) from a CCD or the like enters the sampling circuit 1 and is converted according to an appropriate sampling rule. The chromaticity conversion unit 100 receives the block average (YYi, RYYi, BYYi) from the sampling circuit 1, calculates BYi = BYYi / YYi, RYi = RYYi / YYi, and converts it into a chromaticity signal CSi = (BYi, RYi). The chromaticity data storage unit 200 stores the chromaticity signal CSi as chromaticity data. When the storage is completed, the storage control unit 20 prohibits the writing of the chromaticity data to the chromaticity data storage unit.

【0115】光源色度推定部301の内部にある平均計
算手段22は、色度データ記憶部200から色度データ
を読みだし、全平均色度を計算する。限定領域データ出
力部23は、平均計算手段22から全平均色度信号を受
けて基準色度とし、色度データ記憶部200から色度デ
ータを読みだし、色度データの内で、基準色度の周囲の
制限された領域に属するデータのみを出力する。領域限
定平均計算部25は、限定領域データ出力部23から出
力されたデータを平均し、2重平均色度とする。限定領
域データ出力部24は、領域限定平均計算部25から2
重平均色度を受けて基準色度とし、色度データ記憶部2
00から色度データを読みだし、色度データの内で、基
準色度の周囲の制限された領域に属するデータのみを出
力する。領域限定平均計算部26は、限定領域データ出
力部24から出力されたデータを平均し、3重平均色度
とする。光源色度候補記憶部27は、平均計算手段から
の全平均色度と領域限定平均計算部26からの3重平均
色度とを受けて、それぞれを光源色度候補SS1、SS
2として記憶する。
The average calculating means 22 inside the light source chromaticity estimating unit 301 reads out the chromaticity data from the chromaticity data storage unit 200 and calculates the total average chromaticity. The limited area data output unit 23 receives the total average chromaticity signal from the average calculation unit 22 and sets it as the reference chromaticity, reads out the chromaticity data from the chromaticity data storage unit 200, and sets the reference chromaticity Only the data belonging to the restricted area around is output. The area limited average calculation unit 25 averages the data output from the limited area data output unit 23 to obtain a double average chromaticity. The limited area data output unit 24 outputs the limited area average calculation unit 25
The chromaticity data storage unit 2 receives the weighted average chromaticity and sets it as a reference chromaticity.
The chromaticity data is read from 00, and only the data belonging to the restricted area around the reference chromaticity is output from the chromaticity data. The area limited average calculation unit 26 averages the data output from the limited area data output unit 24 and sets the average as triple average chromaticity. The light source chromaticity candidate storage unit 27 receives the total average chromaticity from the average calculation unit and the triple average chromaticity from the area limited average calculation unit 26, and stores them in the light source chromaticity candidates SS1, SS
Stored as 2.

【0116】支配色存在判定部303の内部にあるカウ
ンター31は、限定領域データ出力部24から出力され
るデータの数を数え、限定領域データ数N2とする。支
配色存在判定しきい値処理部304は、限定領域データ
数N2を受けて、内部に保持するしきい値θ1、θ2、
θ1’と比較し、 N2≧θ1のとき、J1=1(支配色存在) θ1>N2≧θ1’のとき、J1=3(支配色存在可能
性小) θ1’>N2≧θ2のとき、J1=0(支配色不在) N2<θ2のとき、J1=2(GWA不成立) とする。
The counter 31 inside the dominant color existence determining section 303 counts the number of data output from the limited area data output section 24 and sets the number as limited area data number N2. The dominant color presence determination threshold value processing unit 304 receives the limited area data number N2, and stores the threshold values θ1, θ2,
Compared with θ1 ′, when N2 ≧ θ1, J1 = 1 (presence of dominant color) θ1> N2 ≧ θ1 ′, J1 = 3 (small possibility of dominant color existence) θ1 ′> N2 ≧ θ2, J1 = 0 (absence of dominant color) When N2 <θ2, J1 = 2 (GWA not established).

【0117】特定色判定部33は、光源色度候補記憶部
27から光源色度候補SS1、SS2を受け、内部に保
持する色度平面上の特定領域に光源色度候補SS2が入
るかどうかを調べ、 入っている場合には、J2=1(SS2が特定領域の内
部にある) 入っていない場合に、J2=0(SS2が特定領域の外
部にある) とする。優先色度選択部302は、支配色存在判定しき
い値処理部304からの光源推定制御信号J1を受け
て、 J1=1またはJ1=3のとき、J3=1(3重平均色
度SS2優先) J1=0またはJ1=2のとき、J3=0(全平均色度
SS1優先) とする。総合色度判定部36は、特定色判定部からの特
定色判定信号J2と優先色度選択部からの優先色度指定
信号J3と光源色度候補記憶部27からの光源色度候補
SS1、SS2とを受け、 J2=1かつJ3=1のとき、SS=SS2(3重平均
色度採用) SJJ=0(条件なし) J2=0のとき、SS=SS1(全平均色度採用) SJJ=0(条件なし) J2=1かつJ3=0のとき、SS=SS1(全平均色
度採用) SJJ=1(基本的には判定不能) とし、(SS、SJJ)を推定された光源色度として出
力する。
The specific color determination unit 33 receives the light source chromaticity candidates SS1 and SS2 from the light source chromaticity candidate storage unit 27, and determines whether or not the light source chromaticity candidate SS2 enters a specific area on the chromaticity plane held therein. Investigation, if it is included, J2 = 1 (SS2 is inside the specific area) If not, set J2 = 0 (SS2 is outside the specific area). The priority chromaticity selection unit 302 receives the light source estimation control signal J1 from the dominant color existence determination threshold value processing unit 304, and when J1 = 1 or J1 = 3, J3 = 1 (triple average chromaticity SS2 priority) When J1 = 0 or J1 = 2, J3 = 0 (the overall average chromaticity SS1 has priority). The overall chromaticity determination unit 36 includes a specific color determination signal J2 from the specific color determination unit, a priority chromaticity designation signal J3 from the priority chromaticity selection unit, and light source chromaticity candidates SS1 and SS2 from the light source chromaticity candidate storage unit 27. When J2 = 1 and J3 = 1, SS = SS2 (adopting triple average chromaticity) SJJ = 0 (no condition) When J2 = 0, SS = SS1 (adopting total average chromaticity) SJJ = 0 (no condition) When J2 = 1 and J3 = 0, SS = SS1 (total chromaticity is adopted) SJJ = 1 (basically undeterminable), and (SS, SJJ) is estimated light source chromaticity Output as

【0118】判定結果処理部305の内部にある射影手
段205は、色度データ記憶部200から色度データC
Si=(BYi,RYi)、i=1、・・・ 、Nを受け
て、図4の光源ラインに垂直な方向(V1,V2)に射
影し、その方向の成分の大きさ、すなわち光源ラインか
らの変位 Xi=BYi・V1+RYi・V2 <X>=(ΣXi)/N に変換する。分散計算手段206は、射影手段205か
ら、変位Xi、<X>を受けて、分散 SGM={Σ(Xi−<X>)2 }/N を計算する。しきい値設定部306は、内部に設定値θ
3、θ4を保持しており、支配色存在判定しきい値処理
部304からのしきい値制御信号J1を受けて、 J1=1のとき、θs=θ3 J1=0またはJ1=3のとき、θs=θ4 J1=2のとき、θs=0 とする。ただし、θ3≧θ4である。GWA判定しきい
値処理部208は、分散計算手段206からの画像デー
タ分散SGMとしきい値設定部207からのしきい値信
号θsとを受けて、 SGM<θsの時、J4=1(GWA成立) その他の場合には、J4=0(GWA不成立) とする。
The projection means 205 inside the determination result processing unit 305 stores the chromaticity data C
In response to Si = (BYi, RYi), i = 1,..., N, the light is projected in the direction (V1, V2) perpendicular to the light source line in FIG. Xi = BYi · V1 + RYi · V2 <X> = (ΣXi) / N The variance calculation unit 206 receives the displacement Xi, <X> from the projection unit 205 and calculates the variance SGM = {(Xi− <X>) 2 } / N. The threshold value setting unit 306 internally stores the set value θ
3 and θ4, and receives the threshold control signal J1 from the dominant color presence determination threshold value processing unit 304. When J1 = 1, θs = θ3 When J1 = 0 or J1 = 3, θs = θ4 When J1 = 2, θs = 0. However, θ3 ≧ θ4. The GWA determination threshold value processing unit 208 receives the image data variance SGM from the variance calculation unit 206 and the threshold value signal θs from the threshold value setting unit 207, and when SGM <θs, J4 = 1 (GWA holds) In other cases, J4 = 0 (GWA not established).

【0119】光源推定部307は、あらかじめ色度平面
上を適切に分割して各領域に光源を割り振っておき、総
合色度判定部からの推定光源色度SSを受けて、推定光
源色度SSがどの領域に属するかで光源を推定し、光源
推定結果をS1とする。そして、光源推定結果S1と総
合色度判定部からの条件信号SJJとを出力する。
The illuminant estimating unit 307 appropriately divides the chromaticity plane in advance and allocates the illuminant to each area, receives the estimated illuminant chromaticity SS from the overall chromaticity determining unit, and receives the estimated illuminant chromaticity SS. The light source is estimated based on which region the light source belongs to, and the light source estimation result is set to S1. Then, it outputs the light source estimation result S1 and the condition signal SJJ from the overall chromaticity determination unit.

【0120】総合判定部308は光源推定部307とG
WA判定しきい値処理部208とからそれぞれ1次光源
推定結果S1、条件信号SSJと、光源推定制御信号J
4とを受け、 立ち上がり時は、S2=S1 非立ち上がり時でJ4=1(GWA成立)かつSSJ=
0のとき、S2=S1 非立ち上がり時でJ4=0(GWA不成立)またはSS
J=1のとき、S2=判定不能 として、2次光源推定結果S2を出力する。光源推定結
果保持部309は、総合判定部308からの2次光源推
定結果S2を受け、 S2≠判定不能のとき Sf =S2 Sbuf =S2 S2=判定不能のとき Sf =Sbuf Sbuf =Sbuf として、2次光源推定結果をSbuf に保持するととも
に、最終光源推定結果Sfを出力する。
The overall judgment unit 308 is provided with the light source estimation unit 307 and G
The primary light source estimation result S1, the condition signal SSJ, and the light source estimation control signal J
4, when rising, S2 = S1 when non-rising J4 = 1 (GWA established) and SSJ =
When 0, S2 = S1 When non-rising, J4 = 0 (GWA not established) or SS
When J = 1, it is determined that S2 = impossible, and the secondary light source estimation result S2 is output. The light source estimation result holding unit 309 receives the secondary light source estimation result S2 from the comprehensive judgment unit 308, and when S2 ≠ cannot be determined Sf = S2 Subf = S2 S2 = when determination is not possible Sf = Sbuf Assuming that 2 The next light source estimation result is held in Sbuf, and the final light source estimation result Sf is output.

【0121】こうして、支配色が存在する画像とそうで
ない画像を判別して、判別した結果を用いてGWA判定
のしきい値を設定し、垂直分散と設定したしきい値との
大小関係からGWAの成立を判定することで、光源推定
に適した画像を判別し、光源推定に適した画像だけを用
いて光源を推定する光源推定装置が実現される。
In this manner, an image having a dominant color is discriminated from an image not having a dominant color, and a threshold value for GWA determination is set by using the discriminated result, and the GWA is determined based on the magnitude relationship between the vertical dispersion and the set threshold value. Is determined, an image suitable for light source estimation is determined, and a light source estimation device that estimates a light source using only an image suitable for light source estimation is realized.

【0122】なお、サンプリングされた画像信号ISを
輝度信号と2つの色度信号に変換する輝度色度変換部
と、輝度色度変換部で変換された輝度信号と色度信号を
それぞれ輝度データ、色度データとして記憶する輝度色
度データ記憶部と、光源推定が終了するまで輝度色度デ
ータ記憶部への記憶を禁止する記憶制御部と、絞り調整
機構を制御する絞り調整機構制御部と、屋外で空などを
撮影したときに特徴的に現れる現象が起きているかどう
か判定する屋外光源検出部と、光源結果保持部からの光
源推定結果と屋外光源検出部からの検出結果を受けて総
合的に光源を判定する光源判定部とを付加することによ
り、光源推定精度を向上させることができる。輝度色度
変換部と輝度色度データ記憶部と絞り調整機構制御部と
屋外光源検出部の動作は、実施例1と同様である。光源
判定部は、屋外光源検出部で特徴的な屋外撮影画像が検
出できた場合には、光源推定結果を屋外光源とし、そう
でない場合には、光源推定結果保持部から出力される光
源推定結果を出力する。こうすることで、屋外で空など
を撮影したときに正しい光源推定ができる光源推定装置
が実現される。
A luminance / chromaticity conversion unit for converting the sampled image signal IS into a luminance signal and two chromaticity signals, and a luminance signal and a chromaticity signal converted by the luminance / chromaticity conversion unit are respectively represented by luminance data, A luminance and chromaticity data storage unit that stores as chromaticity data, a storage control unit that prohibits storage in the luminance and chromaticity data storage unit until the light source estimation ends, an aperture adjustment mechanism control unit that controls an aperture adjustment mechanism, An outdoor light source detection unit that determines whether a phenomenon that appears characteristically when shooting the sky outdoors, etc., and a light source estimation result from the light source result holding unit and a detection result from the outdoor light source detection unit are comprehensively received. By adding a light source determination unit for determining the light source to the light source, it is possible to improve the light source estimation accuracy. The operations of the luminance / chromaticity converter, the luminance / chromaticity data storage, the aperture adjustment mechanism controller, and the outdoor light source detector are the same as those in the first embodiment. The light source determination unit sets the light source estimation result to the outdoor light source when the characteristic outdoor captured image can be detected by the outdoor light source detection unit; otherwise, the light source estimation result output from the light source estimation result holding unit Is output. In this way, a light source estimating apparatus capable of correctly estimating the light source when shooting the sky or the like outdoors is realized.

【0123】[0123]

【発明の効果】以上のように本発明は、画像信号を適当
なサンプリング規則に従って変換するサンプリング回路
と、前記サンプリングされたN個(Nは2以上の整数)
の画像信号を色度平面上の座標としてN個の色度に変換
する色度変換部と、前記N個の色度の平均座標を全平均
色度として求め、前記N個の色度の内、前記全平均色度
の限定領域に存在する色度の平均座標を多重平均色度と
して求め、全平均色度と多重平均色度を光源色度候補と
する光源色度候補計算部と、前記N個の色度の内前記多
重平均色度を中心とした限定領域に含まれる色度の総数
から、画像中に多く含まれる色を示す支配色が存在する
かを判定する支配色存在判定部と、前記支配色存在判定
部からの判定結果から前記光源色度候補の中から1つを
選択し光源色度とする光源色度判定部と、前記光源色度
が色度平面上のどの領域に属するかで光源を推定する光
源推定部とからなる構成によって、正しく光源を推定す
ることにより、ビデオカメラなどにおいて正しい色調を
再現することができる。
As described above, according to the present invention, an image signal
Circuit that converts according to simple sampling rules
And the sampled N pieces (N is an integer of 2 or more)
Image signal is converted to N chromaticities as coordinates on the chromaticity plane
Chromaticity conversion unit, and the average coordinates of the N chromaticities are all averaged.
Calculated as chromaticity, and among the N chromaticities, the total average chromaticity
The average coordinates of chromaticity existing in the limited area of
The total average chromaticity and multiple average chromaticity are determined as light source chromaticity candidates.
A light source chromaticity candidate calculating unit to perform
Total number of chromaticities included in the limited area centered on the weighted average chromaticity
There is a dominant color that indicates a color that is often included in the image from
A dominant color presence determining unit for determining whether the dominant color is present
One of the light source chromaticity candidates is determined from the determination result from the
A light source chromaticity determination unit that selects and sets the light source chromaticity, and the light source chromaticity
And a light source estimating unit for estimating the light source to which region on the chromaticity plane belongs to
The correct color tone in video cameras, etc.
Can be reproduced.

【0124】[0124]

【0125】[0125]

【0126】[0126]

【0127】[0127]

【0128】[0128]

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施例における光源推定装置の
構成を示すブロック結線図
FIG. 1 is a block diagram illustrating a configuration of a light source estimation device according to a first embodiment of the present invention.

【図2】同実施例におけるカラーチャート認識部の構成
を示すブロック結線図
FIG. 2 is a block connection diagram showing a configuration of a color chart recognition unit in the embodiment.

【図3】(a) 同実施例における光源色度候補計算部
の構成を示すブロック結線図 (b) 同実施例における屋外光源検出部の構成を示す
ブロック結線図
FIG. 3A is a block connection diagram illustrating a configuration of a light source chromaticity candidate calculation unit according to the embodiment; and FIG. 3B is a block connection diagram illustrating a configuration of an outdoor light source detection unit according to the embodiment.

【図4】本発明の原理を説明するための色空間における
「光源ライン」と「光源ライン」に近い特定領域を示す
概念図
FIG. 4 is a conceptual diagram showing a “light source line” and a specific area near the “light source line” in a color space for explaining the principle of the present invention.

【図5】画像データのサンプリング形式の一例を示す概
念図
FIG. 5 is a conceptual diagram showing an example of a sampling format of image data.

【図6】画像データのサンプリング形式の一例を示す概
念図
FIG. 6 is a conceptual diagram showing an example of a sampling format of image data.

【図7】本発明の原理を説明するための分散−「回転相
関係数」平面上でのカラーチャート画像と一般画像との
分布の概念図
FIG. 7 is a conceptual diagram of a distribution between a color chart image and a general image on a variance- “rotational correlation coefficient” plane for explaining the principle of the present invention.

【図8】本発明の第1の実施例におけるカラーチャート
認識部の動作を示すフローチャート
FIG. 8 is a flowchart showing the operation of a color chart recognition unit according to the first embodiment of the present invention.

【図9】本発明の第2の実施例におけるカラーチャート
認識装置の構成を示すブロック結線図
FIG. 9 is a block diagram showing a configuration of a color chart recognition device according to a second embodiment of the present invention.

【図10】同実施例におけるカラーチャート認識装置の
動作を示すフローチャート
FIG. 10 is a flowchart showing the operation of the color chart recognition device in the embodiment.

【図11】本発明の第3の実施例における画像データ判
定装置の構成を示すブロック図
FIG. 11 is a block diagram illustrating a configuration of an image data determination device according to a third embodiment of the present invention.

【図12】本発明の第4の実施例における光源推定装置
の構成を示すブロック図
FIG. 12 is a block diagram illustrating a configuration of a light source estimation device according to a fourth embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1 サンプリング回路 2 輝度色度変換部 3 分散計算手段 4 分散計算手段 5 共分散計算手段 6 射影手段 7 分散計算手段 8 2次方程式求解手段 9 座標変換手段 10 相関係数計算手段 11 しきい値処理手段 12 しきい値処理手段 13 AND回路 14 カラーチャート認識部 15 統計量計算部 16 画像分散計算部 17 平均計算手段 18 カラーチャート用光源色度推定部 19 輝度色度データ記憶部 20 記憶制御部 21 光源色度候補計算部 22 平均計算手段 23 限定領域データ出力部 24 限定領域データ出力部 25 領域限定平均計算部 26 領域限定平均計算部 27 光源色度候補記憶部 28 限定領域中心計算部 29 支配色存在判定部 30 限定領域データ出力部 31 カウンター 32 支配色存在判定しきい値処理部 33 特定色判定部 34 光源色度判定部 35 優先色度選択部 36 総合色度判定部 37 推定光源色度選択部 38 光源推定部 39 絞り調整機構制御部 40 しきい値処理手段 41 しきい値処理手段 42 しきい値処理手段 43 高色温度判定部 44 AND回路 45 カウンター 46 検出制御部 47 しきい値処理手段 48 AND回路 49 光源判定部50 一般画像用光源色度推定部 71 射影手段 72 射影手段 73 演算回路 100 色度変換部 101 カラーチャート認識部 102 統計量計算部 103 画像分散計算部 200 色度データ記憶部 201 限定領域中心計算部 202 支配色存在判定部 203 支配色存在判定しきい値処理部 204 判定結果処理部 205 射影手段 206 分散計算手段 207 しきい値設定部 208 GWA判定しきい値処理部 301 光源色度推定部 302 優先色度選択部 303 支配色存在判定部 304 支配色存在判定しきい値処理部 305 判定結果処理部 306 しきい値設定部 307 光源推定部 308 総合判定部 309 光源推定結果保持部REFERENCE SIGNS LIST 1 sampling circuit 2 luminance and chromaticity conversion unit 3 variance calculation means 4 variance calculation means 5 covariance calculation means 6 projection means 7 variance calculation means 8 quadratic equation solving means 9 coordinate conversion means 10 correlation coefficient calculation means 11 threshold processing Means 12 Threshold processing means 13 AND circuit 14 Color chart recognition unit 15 Statistics calculation unit 16 Image variance calculation unit 17 Average calculation means 18 Color chart light source chromaticity estimation unit 19 Luminance chromaticity data storage unit 20 Storage control unit 21 Light source chromaticity candidate calculation unit 22 Average calculation means 23 Limited area data output unit 24 Limited area data output unit 25 Area limited average calculation unit 26 Area limited average calculation unit 27 Light source chromaticity candidate storage unit 28 Limited area center calculation unit 29 Dominant color Presence determination unit 30 Limited area data output unit 31 Counter 32 Dominant color presence determination threshold processing unit 33 Specific color determination unit 34 Light source chromaticity determination unit 35 Priority chromaticity selection unit 36 Overall chromaticity determination unit 37 Estimated light source chromaticity selection unit 38 Light source estimation unit 39 Aperture adjustment mechanism control unit 40 Threshold processing unit 41 Threshold processing Means 42 Threshold processing means 43 High color temperature determination unit 44 AND circuit 45 Counter 46 Detection control unit 47 Threshold processing means 48 AND circuit 49 Light source determination unit 50 Light source chromaticity estimation unit for general image 71 Projection unit 72 Projection unit 73 arithmetic circuit 100 chromaticity conversion unit 101 color chart recognition unit 102 statistic calculation unit 103 image variance calculation unit 200 chromaticity data storage unit 201 limited area center calculation unit 202 dominant color existence determination unit 203 dominant color existence determination threshold processing Unit 204 Judgment result processing unit 205 Projection unit 206 Variance calculation unit 207 Threshold setting unit 208 GWA Constant threshold processing section 301 Light source chromaticity estimating section 302 Priority chromaticity selecting section 303 Dominant color presence determining section 304 Dominant color presence determining threshold processing section 305 Decision result processing section 306 Threshold setting section 307 Light source estimating section 308 Comprehensive judgment unit 309 Light source estimation result holding unit

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平5−49048(JP,A) 特開 平5−49049(JP,A) 特開 平5−111059(JP,A) 特開 昭63−13489(JP,A) 特開 平3−16494(JP,A) (58)調査した分野(Int.Cl.7,DB名) H04N 17/02 H04N 9/73 ────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-5-49048 (JP, A) JP-A-5-49049 (JP, A) JP-A-5-111059 (JP, A) JP-A-63- 13489 (JP, A) JP-A-3-16494 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) H04N 17/02 H04N 9/73

Claims (6)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 画像信号を適当なサンプリング規則に従
って変換するサンプリング回路と、前記サンプリングさ
れたN個(Nは2以上の整数)の画像信号を色度平面上
の座標としてN個の色度に変換する色度変換部と、前記
N個の色度の平均座標を全平均色度として求め、前記N
個の色度の内、前記全平均色度の限定領域に存在する色
度の平均座標を多重平均色度として求め、全平均色度と
多重平均色度を光源色度候補とする光源色度候補計算部
と、前記N個の色度の内前記多重平均色度を中心とした
限定領域に含まれる色度の総数から、画像中に多く含ま
れる色を示す支配色が存在するかを判定する支配色存在
判定部と、前記支配色存在判定部からの判定結果から前
記光源色度候補の中から1つを選択し光源色度とする光
源色度判定部と、前記光源色度が色度平面上のどの領域
に属するかで光源を推定する光源推定部とを備えた光源
推定装置。
1. A sampling circuit for converting an image signal in accordance with the appropriate sampling rule, the sampling of
N (N is an integer of 2 or more) image signals on the chromaticity plane
A chromaticity conversion unit for converting into N chromaticities as coordinates of
The average coordinates of N chromaticities are determined as the total average chromaticity,
Colors present in the limited area of the total average chromaticity among the chromaticities
The average coordinates of degrees are determined as multiple average chromaticities,
Light source chromaticity candidate calculator that uses multiple average chromaticity as a light source chromaticity candidate
And centering on the multiple average chromaticity of the N chromaticities
From the total number of chromaticities included in the limited area, many are included in the image
Dominant color exists to determine if there is a dominant color indicating the color
From the determination result from the determination unit and the dominant color presence determination unit
Light that selects one of the light source chromaticity candidates and sets it as the light source chromaticity
A light source estimating apparatus comprising: a source chromaticity determining unit; and a light source estimating unit that estimates a light source based on which region on the chromaticity plane the light source chromaticity belongs to.
【請求項2】 光源色度候補計算部は、N個の色度の平
均座標を全平均色度として計算する平均計算手段と、前
記N個の色度の内、前記全平均色度または多重平均色度
の周辺の限定領域に属する色度を選択して出力する限定
領域データ出力部と、前記限定領域データ出力部から出
力された色度の平均座標を多重平均色度として計算する
領域限定平均計算部と、前記全平均色度と前記多重平均
色度とを記憶して出力する光源色度候補記憶部とを備
え、前記多重平均色度の周辺の限定領域に属する色度か
ら多重平均色度を繰り返し求めることを特徴とする請求
項1記載の光源推定装置。
2. A light source chromaticity candidate calculation unit , comprising:
Means for calculating average coordinates as the total average chromaticity;
Of the N chromaticities, the total average chromaticity or the multiple average chromaticity
To select and output chromaticity belonging to a limited area around
Output from the area data output section and the limited area data output section.
Calculate the average coordinates of the applied chromaticity as multiple average chromaticity
An area-limited average calculator, the total average chromaticity and the multiple average
A light source chromaticity candidate storage unit for storing and outputting chromaticity.
Chromaticity belonging to a limited area around the multiple average chromaticity
A multi-average chromaticity is repeatedly obtained from the
Item 3. The light source estimation device according to Item 1 .
【請求項3】 光源色度判定部は、前記支配色存在判定
部からの判定結果が支配色不在の場合に全平均色度を優
先色度とし、そうでない場合に多重平均色度を優先色度
とする優先色度選択部と、前記多重平均色度があらかじ
め色度平面上に設定した領域に含まれる時は特定色と判
定し、領域に含まれない時は特定色以外と判定する特定
色判定部と、前記多重平均色度が優先色度で、かつ、
記特定色判定部からの判定結果が特定色ならばその色度
を光源色度とし、そうでない場合には前記全平均色度を
源色度とする総合色度判定部とを備えた請求項に記
載の光源推定装置。
3. The illuminant chromaticity determination unit determines the presence of the dominant color.
Determination result from parts is the total average chromaticity and priority chromaticity in the case of dominant colors absent, multiple average chromaticity and the priority chromaticity selection unit for a priority chromaticity Otherwise, the multiple average chromaticity is rough The fire
If it is included in the area set on the chromaticity plane,
Constant, and the specific color determination unit determines that the non-specific color when not included in the area, the multiple average chromaticity in priority chromaticity, and, prior to
If the judgment result from the specific color judgment unit is a specific color, its chromaticity
It was a light source chromaticity, the total average chromaticity otherwise
A light source estimating apparatus according to claim 2 comprising a total chromaticity judging unit that the light source chromaticity.
【請求項4】 前記光源色度判定部からの優先色度が多
重平均色度で、かつ特 定色以外と判定されたとき、判定
不能とする総合判定部と、前記総合判定部からの判定結
果が判定可能な場合は、前記光源推定部からの光源推定
結果を保持し、判定不能の場合は内部に保持された光源
推定結果を出力する光源推定結果保持部とを備えた請求
項3記載の光源推定装置。
4. The method according to claim 1, wherein the priority chromaticity from the light source chromaticity determination unit is large.
In weighted average chromaticity and when it is determined that the non-Japanese Teiiro, determination
And a determination result from the comprehensive determination unit
If the result can be determined, light source estimation from the light source estimation unit
The light source that holds the result, and if it cannot be determined, it is held inside
A light source estimation result holding unit for outputting the estimation result
Item 3. The light source estimation device according to item 3 .
【請求項5】 前記N個の色度がカラーチャートを撮影
したカラーチャート画像かどうかを色度平面上の分布か
ら認識するカラーチャート認識部と、前記N個の色度の
平均座標を全平均色度として計算するカラーチャート用
光源色度推定部と、カラーチャート画像が認識された場
合には全平均色度を光源色度として、そうでない場合に
は光源色度判定部からの光源色度を光源推定部に出力す
る推定光源色度選択部とを備えた請求項1記載の光源推
定装置。
5. The N chromaticities photograph a color chart.
Whether the color chart image is a distribution on the chromaticity plane
A color chart recognizing unit for recognizing the N chromaticities
For color charts that calculate average coordinates as total average chromaticity
The light source chromaticity estimator and the
If the total chromaticity is the light source chromaticity,
Outputs the light source chromaticity from the light source chromaticity determination unit to the light source estimation unit.
The light source estimation device according to claim 1, further comprising: an estimated light source chromaticity selection unit .
【請求項6】 カラーチャートの認識は、前記N個の色
度の色度分布が主成分軸にどの程度沿っているかを表わ
す回転相関係数が小さく、かつ、前記N個の色度の分散
が大きいことを特徴とする請求項5記載の光源推定装
置。
6. The recognition of a color chart is performed by using the N colors.
Shows how much the chromaticity distribution of the degree is along the principal component axis.
The rotation correlation coefficient is small, and the variance of the N chromaticities is
6. The light source estimating device according to claim 5, wherein is larger .
JP4222432A 1992-08-21 1992-08-21 Light source estimation device Expired - Fee Related JP3052592B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4222432A JP3052592B2 (en) 1992-08-21 1992-08-21 Light source estimation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4222432A JP3052592B2 (en) 1992-08-21 1992-08-21 Light source estimation device

Publications (2)

Publication Number Publication Date
JPH0670345A JPH0670345A (en) 1994-03-11
JP3052592B2 true JP3052592B2 (en) 2000-06-12

Family

ID=16782308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4222432A Expired - Fee Related JP3052592B2 (en) 1992-08-21 1992-08-21 Light source estimation device

Country Status (1)

Country Link
JP (1) JP3052592B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3801177B2 (en) * 2002-04-04 2006-07-26 株式会社ニコン Image processing apparatus, image processing program, and image processing method
JP2004080402A (en) * 2002-08-19 2004-03-11 Nec Viewtechnology Ltd Circuit for adjusting dynamic white balance and multi-screen display device
EP2833636B1 (en) 2012-03-30 2017-11-08 Fujitsu Limited Color chart detection device, color chart detection method and color chart detection computer program
JP6669163B2 (en) 2015-04-01 2020-03-18 コニカミノルタ株式会社 Colorimetric device and colorimetric method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62134778A (en) * 1985-12-06 1987-06-17 Nec Corp Method and device for detecting color pattern
JPH02205984A (en) * 1989-02-06 1990-08-15 Canon Inc Picture processor

Also Published As

Publication number Publication date
JPH0670345A (en) 1994-03-11

Similar Documents

Publication Publication Date Title
US10542243B2 (en) Method and system of light source estimation for image processing
US10013764B2 (en) Local adaptive histogram equalization
US7705892B2 (en) Auto white balance apparatus and white balance adjusting method
EP0519761B1 (en) Devices for judging quality of an image
CN107077725A (en) Data processing equipment, imaging device and data processing method
US20200154086A1 (en) White Balance Method for Image and Terminal Device
US8233094B2 (en) Methods, systems and apparatuses for motion detection using auto-focus statistics
JP2017510186A (en) Automatic white balance adjustment using chromaticity measurement of original image data
US9307213B2 (en) Robust selection and weighting for gray patch automatic white balancing
WO2022257396A1 (en) Method and apparatus for determining color fringe pixel point in image and computer device
CN108063934B (en) Image processing method and device, computer readable storage medium and computer device
Li et al. Color constancy using achromatic surface
JP3052592B2 (en) Light source estimation device
Mazin et al. Estimation of illuminants from projections on the planckian locus
CN104883520A (en) Image processing apparatus and method for controlling image processing apparatus
US10499047B2 (en) Image processing apparatus, image processing system, and non-transitory computer readable medium
JP5265338B2 (en) Illuminant estimation
US20180176528A1 (en) Light locus generation for automatic white balance
CN115426487A (en) Color correction matrix adjusting method and device, electronic equipment and readable storage medium
CN112243118B (en) White balance correction method, device, equipment and storage medium
KR100695128B1 (en) Method for determining color of illuminant
JPH0549049A (en) Color chart recognition device, gwa discrimination device and light source estimate device
KR100230446B1 (en) Determination method for color of light from color image
JP2506584B2 (en) Image judgment device
CN112995633B (en) Image white balance processing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080407

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090407

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20100407

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees