JP5740147B2 - Light source estimation apparatus and light source estimation method - Google Patents

Light source estimation apparatus and light source estimation method Download PDF

Info

Publication number
JP5740147B2
JP5740147B2 JP2010283123A JP2010283123A JP5740147B2 JP 5740147 B2 JP5740147 B2 JP 5740147B2 JP 2010283123 A JP2010283123 A JP 2010283123A JP 2010283123 A JP2010283123 A JP 2010283123A JP 5740147 B2 JP5740147 B2 JP 5740147B2
Authority
JP
Japan
Prior art keywords
color
light source
luminance
unit
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2010283123A
Other languages
Japanese (ja)
Other versions
JP2012134625A (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.)
Hanwha Techwin Co Ltd
Original Assignee
Samsung Techwin 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 Samsung Techwin Co Ltd filed Critical Samsung Techwin Co Ltd
Priority to JP2010283123A priority Critical patent/JP5740147B2/en
Priority to KR1020110105534A priority patent/KR101695246B1/en
Priority to US13/331,719 priority patent/US8503771B2/en
Priority to CN201110441913.3A priority patent/CN102572211B/en
Publication of JP2012134625A publication Critical patent/JP2012134625A/en
Application granted granted Critical
Publication of JP5740147B2 publication Critical patent/JP5740147B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01LSEMICONDUCTOR DEVICES NOT COVERED BY CLASS H10
    • H01L27/00Devices consisting of a plurality of semiconductor or other solid-state components formed in or on a common substrate
    • H01L27/14Devices consisting of a plurality of semiconductor or other solid-state components formed in or on a common substrate including semiconductor components sensitive to infrared radiation, light, electromagnetic radiation of shorter wavelength or corpuscular radiation and specially adapted either for the conversion of the energy of such radiation into electrical energy or for the control of electrical energy by such radiation
    • H01L27/144Devices controlled by radiation
    • H01L27/146Imager structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/10Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Description

本発明は、光源推定装置及び光源推定方法に関する。   The present invention relates to a light source estimation device and a light source estimation method.

人間の視覚系は、光源色の特性が未知であっても、ある程度物体の色を同定できる。例えば、太陽光の下で白い紙を見ると、人間は白い紙と認識する。一方、この紙を例えばハロゲンランプの下でみると、ハロゲンランプはオレンジがかった光源なので、紙はオレンジ色に見えるはずである。ところが、人間はハロゲンランプの下で見た場合でも太陽光の下で見たときと同様に白い紙と認識する。このように、光源色が変化しても本来の色を認識する機能を色恒常性という。色恒常性はデジタルスチルカメラやデジタルビデオカメラなどの電子撮像機器におけるホワイトバランス調整と同義である。ホワイトバランスとは、本来無彩色である物体が無彩色に見えるようにRGB各カラーチャネル間の調整を行うことである。この調整は本来、光源と物体表面の分光特性が分からないとできない処理である。すなわち、人間の眼にとどく光の分光特性は光源と物体表面それぞれの分光反射特性の積で表されるが、両者が未知なので不良設定問題となっている。そのため、光源と物体表面、および観察しているシーンに対して仮定や制約を設けて、色恒常性をモデル化した様々なアルゴリズムが提案されている。   The human visual system can identify the color of an object to some extent even if the characteristics of the light source color are unknown. For example, when a white paper is viewed under sunlight, humans recognize it as white paper. On the other hand, when the paper is viewed under, for example, a halogen lamp, the halogen lamp is an orangeish light source, so the paper should look orange. However, even when viewed under a halogen lamp, humans perceive it as white paper as when viewed under sunlight. Thus, the function of recognizing the original color even when the light source color changes is called color constancy. Color constancy is synonymous with white balance adjustment in electronic imaging devices such as digital still cameras and digital video cameras. White balance is adjustment between RGB color channels so that an originally achromatic object looks achromatic. This adjustment is originally a process that cannot be performed unless the spectral characteristics of the light source and the object surface are known. That is, the spectral characteristic of light reaching the human eye is represented by the product of the spectral reflection characteristics of the light source and the object surface, but since both are unknown, this is a defect setting problem. For this reason, various algorithms have been proposed in which color constancy is modeled by making assumptions and restrictions on the light source, the object surface, and the scene being observed.

色恒常性を解くために良く用いられているアルゴリズムの一つに灰色仮説がある(例えば、非特許文献1参照)。灰色仮説は、一般的なシーンでは視野内に様々な色が分布するため、その平均色は灰色に近いという経験則に基づいている。もしこの平均色が灰色からずれていれば、そのずれを光源色によるものと判断し、RGBカラーチャネル間の調整を行うことでホワイトバランス調整ができる。この手法は計算コストが小さく、デジタルスチルカメラのような組み込み機器への実装が容易であるという利点がある。反面、物理的には光源と独立であるはずの物体表面についての仮定に基づくため、シーンによってはその仮定が成立せず、光源推定結果が大きく左右される。例えば、赤い壁の一部に灰色のロゴがあったとする。このとき、画像平均色は赤くなり、灰色仮説はその赤みを光源色によるものと判断する。そのため、シーン全体を灰色にしようとして赤の反対色であるシアンを画面全体に加えるので、もともと灰色であったロゴの部分にシアンの色がついてしまう。これをカラーフェリアという。   One of the algorithms often used for solving the color constancy is the gray hypothesis (see, for example, Non-Patent Document 1). The gray hypothesis is based on the rule of thumb that the average color is close to gray because various colors are distributed in the field of view in a general scene. If the average color deviates from gray, it is determined that the deviation is due to the light source color, and white balance adjustment can be performed by adjusting between the RGB color channels. This method is advantageous in that the calculation cost is low and it can be easily mounted on an embedded device such as a digital still camera. On the other hand, since it is based on an assumption about the object surface that should be physically independent of the light source, the assumption does not hold depending on the scene, and the light source estimation result greatly depends. For example, suppose there is a gray logo on a part of a red wall. At this time, the average image color is red, and the gray hypothesis determines that the redness is due to the light source color. For this reason, cyan, which is the opposite color of red, is added to the entire screen in order to make the entire scene gray, so that the portion of the logo that was originally gray has a cyan color. This is called a color feria.

灰色仮説に対して、光源と物体表面の分光特性を用いて推定する手法が提案されている(例えば、非特許文献2参照)。この手法は光源と物体表面の分光特性を低次の直交基底で表現し、光源・物体表面・撮像系に対する仮定により制約条件を設けたり、光源・物体表面・撮像系に関する既知情報を確率分布で統合したりすることで、統計的に光源推定精度を高める。この手法の利点は詳細な光源推定が行える点にある。しかしその反面、演算量が増えるため、デジタルカメラ内部のホワイトバランス処理などの画像処理演算で利用する場合、実時間処理に支障が生じる場合がある。   For the gray hypothesis, a method of estimating using the spectral characteristics of the light source and the object surface has been proposed (for example, see Non-Patent Document 2). This method expresses the spectral characteristics of the light source and the object surface with low-order orthogonal bases, sets constraints based on assumptions about the light source / object surface / imaging system, and uses the probability distribution of known information about the light source / object surface / imaging system By integrating them, the light source estimation accuracy is statistically improved. The advantage of this method is that detailed light source estimation can be performed. However, on the other hand, since the amount of calculation increases, when used in image processing calculations such as white balance processing inside a digital camera, real-time processing may be hindered.

計算コストを下げつつ、光源、および物体表面の分光特性を考慮して光源種類を推定する方法として、輝度−色相関が提案されている(例えば、非特許文献3参照)。この手法は、光源色が赤い場合(緑、青も同様)には赤い領域がより赤くなるという輝度と色との間にある相関関係を利用して、光源色が白色光源かそうでないかを識別する。図9及び図10を参照して輝度−色相関の概念を説明する。図9及び図10は、輝度−色相関を説明するためのスペクトル分布の模式図である。図9及び図10に示すグラフの横軸は波長、縦軸は各波長が持つエネルギーである。図9(a)は、左から、様々な色を含む一般的な物体Xの画像、その物体Xに照射する赤色光源Lr、およびその光源Lrを物体Xに照射したときに撮像した撮像画像それぞれのスペクトル分布の模式図である。図9(a)の撮像画像のスペクトルは、短波長側(青い側)の強度が下がり、長波長側(赤い側)の強度が増大する。すなわち、一般的な物体に赤色光源を照射して撮像した画像は、画像内で明るい領域ほど赤みが増すという相関関係を有する。ただし、この相関関係は画面内に複数の色が存在する場合に生じる。一方、図9(b)は、左から赤い物体Xrの画像、その物体Xrに照射する白色光源Lh(例えば色温度が5,500[K(ケルビン)]の光源)、およびその光源Lhを物体Xrに照射したときに撮像した撮像画像それぞれのスペクトル分布の模式図である。白色光源のスペクトル分布は平坦なので、この場合は撮像対象のスペクトル分布がそのまま検知される。従って、この場合は輝度と色との間に相関が無いということになる。また、この相関は赤みだけでなく、青みにも同様な性質がある。   Luminance-color correlation has been proposed as a method of estimating the type of light source in consideration of the light source and the spectral characteristics of the object surface while reducing the calculation cost (see Non-Patent Document 3, for example). This method uses the correlation between brightness and color that the red region becomes red when the light source color is red (same for green and blue), and determines whether the light source color is a white light source or not. Identify. The concept of luminance-color correlation will be described with reference to FIGS. 9 and 10 are schematic diagrams of spectral distributions for explaining the luminance-color correlation. The horizontal axis of the graphs shown in FIGS. 9 and 10 is the wavelength, and the vertical axis is the energy of each wavelength. FIG. 9A shows, from the left, an image of a general object X including various colors, a red light source Lr that irradiates the object X, and a captured image that is captured when the object X is irradiated with the light source Lr. It is a schematic diagram of the spectrum distribution. In the spectrum of the captured image in FIG. 9A, the intensity on the short wavelength side (blue side) decreases and the intensity on the long wavelength side (red side) increases. That is, an image captured by irradiating a general object with a red light source has a correlation such that redness increases in a bright region in the image. However, this correlation occurs when there are a plurality of colors in the screen. On the other hand, FIG. 9B shows an image of a red object Xr from the left, a white light source Lh (for example, a light source having a color temperature of 5,500 [K (Kelvin)]) irradiated on the object Xr, and the light source Lh as an object. It is a schematic diagram of each spectrum distribution of the captured image imaged when it irradiated to Xr. Since the spectral distribution of the white light source is flat, in this case, the spectral distribution of the imaging target is detected as it is. Therefore, in this case, there is no correlation between luminance and color. In addition, this correlation has not only redness but also blueness.

図10は、赤色光源を照射したときのスペクトル分布の模式図である。図10(a)は、左から、赤系領域Srの画像、その赤系領域Srに照射する赤色光源Lr、およびその光源Lrを赤系領域Srに照射したときに撮像した撮像画像それぞれのスペクトル分布の模式図である。図10(b)は、左から、緑系領域Sgの画像、その緑系領域Sgに照射する赤色光源Lr、およびその光源Lrを緑系領域Sgに照射したときに撮像した撮像画像それぞれのスペクトル分布の模式図である。図10(c)は、左から、青系領域Sbの画像、その青系領域Sbに照射する赤色光源Lr、およびその光源Lrを青系領域Sbに照射したときに撮像した撮像画像それぞれのスペクトル分布の模式図である。青系領域Sbには長波長側のエネルギーが少ないため、青系領域Sbに赤色光源Lrが照射された場合は、赤系領域Srに赤色光源Lrが照射された場合と比較して暗くなる。一方、青系領域Sbの反射光に含まれる短波長側のエネルギーは赤い光の分光特性により減衰するが、青系領域Sbは赤系領域Srに赤い光が当たった場合と比較して短波長成分が残る(青系領域には短波長側のスペクトルが大きいため)。すなわち、暗いほど青みが強くなるという負の相関関係になる。以上が「輝度−色相関」と呼ばれている原理である。   FIG. 10 is a schematic diagram of a spectral distribution when a red light source is irradiated. FIG. 10A illustrates, from the left, the image of the red region Sr, the red light source Lr that irradiates the red region Sr, and the spectrum of each captured image that is captured when the red region Sr is irradiated with the light source Lr. It is a schematic diagram of distribution. FIG. 10B shows, from the left, the image of the green region Sg, the red light source Lr that irradiates the green region Sg, and the spectrum of each captured image that is captured when the light source Lr is irradiated to the green region Sg. It is a schematic diagram of distribution. FIG. 10C shows, from the left, the image of the blue-based region Sb, the red light source Lr that irradiates the blue-based region Sb, and the spectrum of each captured image captured when the light-source region Lb is irradiated to the blue-based region Sb. It is a schematic diagram of distribution. Since the blue-based region Sb has less energy on the long wavelength side, when the red light source Lr is irradiated to the blue-based region Sb, it becomes darker than when the red light source Lr is irradiated to the red-based region Sr. On the other hand, the energy on the short wavelength side included in the reflected light of the blue region Sb is attenuated by the spectral characteristics of red light, but the blue region Sb has a shorter wavelength than when red light strikes the red region Sr. The component remains (because the spectrum on the short wavelength side is large in the blue region). In other words, the negative correlation is such that the darker the color, the greater the blueness. The above is the principle called “luminance-color correlation”.

この手法の利点は少ない演算量で大まかな光源の特性(白色、または非白色)を推定できる点にある。これは、上述の分光反射特性を用いる方法と比較して、光源と物体表面の詳細な分光特性を考慮する必要が無いからである。よって、カラーフェリア問題を低減するために十分な光源種類推定性能を持っており、かつ計算コストが小さいため、組み込み機器実装に向いている。   The advantage of this method is that it is possible to estimate rough light source characteristics (white or non-white) with a small amount of computation. This is because it is not necessary to consider the detailed spectral characteristics of the light source and the object surface as compared with the method using the spectral reflection characteristics described above. Therefore, it has sufficient light source type estimation performance to reduce the color feria problem, and the calculation cost is low, so it is suitable for mounting embedded devices.

また、特許文献1には、複数の異なる分光感度特性を持つセンサの応答値から、被写体を照射する光源の色を示す分光特性を推定することが記載されている。   Japanese Patent Application Laid-Open No. H10-228561 describes that a spectral characteristic indicating the color of a light source that irradiates a subject is estimated from response values of sensors having a plurality of different spectral sensitivity characteristics.

特許第3767541号公報Japanese Patent No. 3767541

E. H. Land, “Recent Advance in Retinex Theory”, Vision Research, 26, 1986.E. H. Land, “Recent Advance in Retinex Theory”, Vision Research, 26, 1986. D. H. Brainard & W. T. Freeman, “Baysian Color Constancy”, J. Opt. Soc. Am. A, Vol.14, No.7, 1997.D. H. Brainard & W. T. Freeman, “Baysian Color Constancy”, J. Opt. Soc. Am. A, Vol. 14, No. 7, 1997. J. Golz & D. I. A. Macleod,“Influence of scene statistics on color constancy”, NATURE, VOL. 415, 7, FEBRUARY, 2002.J. Golz & D. I. A. Macleod, “Influence of scene statistics on color constancy”, NATURE, VOL. 415, 7, FEBRUARY, 2002.

しかしながら、上述した輝度−色相関は、カメラ位置や光源強度に起因する画像のテクスチャ程度に影響される、という問題点がある。例えば、画像のカラーテクスチャが平坦で色数が少ない場合、輝度と色の入力データ分布が広がらないため、輝度−色相関が不安定になる場合がある。実環境下で安定した光源推定性能を確保するには、この問題による影響を低減する必要がある。
また、輝度−色相関は入力データの正規分布を仮定しているため、入力データ数が少なかったりデータにはずれ値が存在したりすると正規分布の仮定から外れ、正しい輝度−色相関を算出できない場合がある。また、物体の鏡面反射により一部の画素が白飛びしてハイライト領域が存在するシーンでは、それらの画素がはずれ値となり、輝度−色相関が不安定になる場合がある。
また、特許文献1に記載された技術では、センサの応答値に基づいて光源の色を示す分光特性を推定するため、計算量が多くなる、という問題がある。また、撮像手段は、複数の異なる分光感度特性を持つセンサを備えなければならない。
However, there is a problem that the above-described luminance-color correlation is affected by the degree of image texture due to the camera position and the light source intensity. For example, if the color texture of the image is flat and the number of colors is small, the luminance-color correlation may become unstable because the luminance and color input data distribution does not spread. In order to ensure stable light source estimation performance in an actual environment, it is necessary to reduce the influence of this problem.
Also, since the luminance-color correlation assumes a normal distribution of input data, if the number of input data is small or there is a deviation value in the data, the normal distribution is not assumed and the correct luminance-color correlation cannot be calculated. There is. In addition, in a scene where some pixels are white-out due to specular reflection of an object and a highlight area exists, these pixels may become outliers and the luminance-color correlation may become unstable.
In addition, the technique described in Patent Document 1 has a problem that the amount of calculation increases because the spectral characteristic indicating the color of the light source is estimated based on the response value of the sensor. In addition, the imaging means must include a plurality of sensors having different spectral sensitivity characteristics.

本発明は上記の点に鑑みてなされたものであり、その目的は、画像のカラーテクスチャが平坦で色数が少ない場合であっても、少ない計算量で精度良く光源を推定することができる光源推定装置及び光源推定方法を提供することにある。   The present invention has been made in view of the above points, and an object thereof is to provide a light source capable of accurately estimating a light source with a small amount of calculation even when the color texture of the image is flat and the number of colors is small. An object of the present invention is to provide an estimation device and a light source estimation method.

本発明は上記の課題を解決するためになされたものであり、本発明の一態様は、被写体を撮像する撮像素子により生成された画像信号から、輝度と色との間の相関係数を算出する輝度−色相関算出部と、前記画像信号における画像全体のカラーバランスを算出する第1のカラーバランス算出部と、前記画像信号において平均色が灰色の領域であるニュートラルグレー領域のカラーバランスを算出する第2のカラーバランス算出部と、前記相関係数と、前記画像全体のカラーバランスと、前記ニュートラルグレー領域のカラーバランスとに基づく特徴ベクトルを生成する特徴ベクトル生成部と、前記特徴ベクトル生成部により生成された特徴ベクトルに基づき、前記画像信号における光源の種類を判定する識別器と、を備えることを特徴とする光源推定装置である。   SUMMARY An advantage of some aspects of the invention is that a correlation coefficient between luminance and color is calculated from an image signal generated by an imaging element that images a subject. A luminance-color correlation calculating unit, a first color balance calculating unit that calculates a color balance of the entire image in the image signal, and a color balance of a neutral gray region in which the average color is a gray region in the image signal A second color balance calculation unit, a feature vector generation unit that generates a feature vector based on the correlation coefficient, a color balance of the entire image, and a color balance of the neutral gray region, and the feature vector generation unit And a discriminator for determining the type of light source in the image signal based on the feature vector generated by Is the source estimating apparatus.

この発明によれば、輝度と色との間の相関係数に加えて、画像全体のカラーバランス、及びニュートラルグレー領域のカラーバランスに基づいて、光源の種類を判定する。これにより、画像のカラーテクスチャが平坦で色数が少ない場合であっても、少ない計算量で精度良く光源を推定することができる。   According to this invention, in addition to the correlation coefficient between brightness and color, the type of light source is determined based on the color balance of the entire image and the color balance of the neutral gray area. As a result, even when the color texture of the image is flat and the number of colors is small, the light source can be accurately estimated with a small amount of calculation.

また、本発明の一態様は、上記の光源推定装置において、前記画像信号における色の多様性を示すカラーテクスチャ特徴を算出するテクスチャ解析部を備え、前記特徴ベクトル生成部は、前記カラーテクスチャ特徴に基づいて、前記特徴ベクトルを生成することを特徴とする。   According to another aspect of the present invention, the light source estimation device includes a texture analysis unit that calculates a color texture feature indicating color diversity in the image signal, and the feature vector generation unit includes the color texture feature. Based on this, the feature vector is generated.

この発明によれば、輝度と色との間の相関係数、画像全体のカラーバランス、及びニュートラルグレー領域のカラーバランスに加えて、カラーテクスチャ特徴に基づいて光源の種類を判定する。これにより、より精度良く光源を推定することができる。   According to this invention, in addition to the correlation coefficient between luminance and color, the color balance of the entire image, and the color balance of the neutral gray area, the type of light source is determined based on the color texture characteristics. Thereby, a light source can be estimated more accurately.

また、本発明の一態様は、上記の光源推定装置において、前記画像信号において輝度が一定となる輝度一定領域を特定する輝度むら解析部を備え、輝度−色相関算出部は、前記輝度むら解析部により特定された輝度一定領域において前記相関係数を算出することを特徴とする。   According to another aspect of the present invention, the light source estimation device includes a luminance unevenness analysis unit that specifies a constant luminance region in which the luminance is constant in the image signal, and the luminance-color correlation calculation unit analyzes the luminance unevenness analysis. The correlation coefficient is calculated in a constant luminance region specified by the unit.

この発明によれば、輝度一定領域において相関係数を算出しているため、光源の位置や強度に依存することなく相関係数を算出することができる。これにより、カラーフェリアを軽減することができる。   According to the present invention, since the correlation coefficient is calculated in the constant luminance region, the correlation coefficient can be calculated without depending on the position and intensity of the light source. Thereby, color feria can be reduced.

また、本発明の一態様は、上記の光源推定装置において、前記撮像素子により生成された画像信号を時系列に順次記憶する時系列データバッファを備え、輝度−色相関算出部は、前記時系列に記憶された複数の画像信号から、前記相関係数を算出することを特徴とする。   According to another aspect of the present invention, the light source estimation device includes a time-series data buffer that sequentially stores the image signals generated by the imaging element in time series, and the luminance-color correlation calculation unit includes the time series The correlation coefficient is calculated from a plurality of image signals stored in.

この発明によれば、複数の画像信号を用いて相関係数を算出するため、精度良く相関係数を算出することができる。また、時系列データを用いているため、手振れ、シーン内に存在する被写体の運動、及び照明条件の変化等によって生じる画像情報の時間変化に対応することができる。   According to the present invention, since the correlation coefficient is calculated using a plurality of image signals, the correlation coefficient can be calculated with high accuracy. In addition, since time series data is used, it is possible to cope with temporal changes in image information caused by camera shake, movement of a subject existing in a scene, changes in illumination conditions, and the like.

また、本発明の一態様は、上記の光源推定装置において、前記識別器は、複数の画像信号の特徴ベクトルと各画像信号に対応する光源の種類とからなる学習データに基づいて、特徴ベクトルから光源の種類を導くための判定基準を学習する学習部と、前記学習部による学習結果に基づき、前記特徴ベクトル生成部により生成された特徴ベクトルに対応する光源の種類を判定する識別部と、を備えることを特徴とする。   According to another aspect of the present invention, in the above-described light source estimation device, the discriminator is configured based on learning data including feature vectors of a plurality of image signals and types of light sources corresponding to the image signals. A learning unit that learns a criterion for deriving a type of light source; and an identification unit that determines a type of light source corresponding to the feature vector generated by the feature vector generation unit based on a learning result by the learning unit. It is characterized by providing.

この発明によれば、機会学習による学習結果に基づき光源種類を判定しているため、マニュアルで特徴ベクトルから光源の種類を導くための判断基準を設定する必要がない。   According to the present invention, since the light source type is determined based on the learning result by the opportunity learning, it is not necessary to manually set a determination criterion for deriving the light source type from the feature vector.

また、本発明の一態様は、光源推定装置の輝度−色相関算出部が、被写体を撮像する撮像素子により生成された画像信号から、輝度と色との間の相関係数を算出するステップと、前記光源推定装置の第1のカラーバランス算出部が、前記画像信号における画像全体のカラーバランスを算出するステップと、前記光源推定装置の第2のカラーバランス算出部が、前記画像信号において平均色が灰色の領域であるニュートラルグレー領域のカラーバランスを算出するステップと、前記光源推定装置の特徴ベクトル生成部が、前記相関係数と、前記画像全体のカラーバランスと、前記ニュートラルグレー領域のカラーバランスとに基づく特徴ベクトルを生成するステップと、前記光源推定装置の識別器が、前記特徴ベクトル生成部により生成された特徴ベクトルに基づき、前記画像信号における光源の種類を判定するステップと、を有することを特徴とする光源推定方法である。   According to another aspect of the present invention, a luminance-color correlation calculation unit of the light source estimation device calculates a correlation coefficient between luminance and color from an image signal generated by an image sensor that images a subject. A step in which a first color balance calculation unit of the light source estimation device calculates a color balance of the entire image in the image signal; and a second color balance calculation unit of the light source estimation device calculates an average color in the image signal. Calculating a color balance of a neutral gray area in which the gray area is a gray area; and a feature vector generation unit of the light source estimation device includes the correlation coefficient, the color balance of the entire image, and the color balance of the neutral gray area. And a classifier of the light source estimation device is generated by the feature vector generation unit. Based on symptom vector a light source estimation method characterized by having a step of determining the type of the light source in the image signal.

また、本発明の一態様は、上記の光源推定方法において、前記光源推定装置のテクスチャ解析部が、前記画像信号における色の多様性を示すカラーテクスチャ特徴を算出するステップを有し、前記特徴ベクトル生成部は、前記カラーテクスチャ特徴に基づいて、前記特徴ベクトルを生成することを特徴とする。   According to another aspect of the present invention, in the above light source estimation method, the texture analysis unit of the light source estimation device includes a step of calculating a color texture feature indicating color diversity in the image signal, and the feature vector The generation unit generates the feature vector based on the color texture feature.

また、本発明の一態様は、上記の光源推定方法において、前記光源推定装置の輝度むら解析部が、前記画像信号において輝度が一定となる輝度一定領域を特定するステップを有し、輝度−色相関算出部は、前記輝度むら解析部により特定された輝度一定領域において前記相関係数を算出することを特徴とする。   In addition, according to another aspect of the present invention, in the light source estimation method, the luminance unevenness analysis unit of the light source estimation device includes a step of identifying a constant luminance region where the luminance is constant in the image signal, and the luminance-color The correlation calculation unit calculates the correlation coefficient in a constant luminance region specified by the luminance unevenness analysis unit.

また、本発明の一態様は、上記の光源推定方法において、記光源推定装置は、前記撮像素子により生成された画像信号を時系列に順次記憶する時系列データバッファを備え、輝度−色相関算出部は、前記時系列に記憶された複数の画像信号から、前記相関係数を算出することを特徴とする。   According to another aspect of the present invention, in the above light source estimation method, the light source estimation device includes a time-series data buffer that sequentially stores the image signals generated by the imaging device in time series, and calculates a luminance-color correlation. The unit calculates the correlation coefficient from a plurality of image signals stored in the time series.

また、本発明の一態様は、上記の光源推定方法において、前記識別器は、前記識別器の学習部が、複数の画像信号と各画像信号に対応する光源の種類とからなる学習データに基づいて、特徴ベクトルから光源の種類を導くための判定基準を学習するステップと、前記識別器の識別部が、前記学習部による学習結果に基づき、前記特徴ベクトル生成部により生成された特徴ベクトルに対応する光源の種類を判定するステップと、を有することを特徴とする。   According to another aspect of the present invention, in the light source estimation method, the classifier is based on learning data in which a learning unit of the classifier includes a plurality of image signals and types of light sources corresponding to the image signals. Learning a criterion for deriving the type of light source from the feature vector, and the discriminator of the discriminator corresponds to the feature vector generated by the feature vector generator based on the learning result by the learning unit Determining the type of light source to be used.

本発明によれば、輝度と色との間の相関係数に加えて、カラーテクスチャ特徴、画像全体のカラーバランス、及びニュートラルグレー領域のカラーバランスを用いて、光源の種類を判定する。これにより、画像のカラーテクスチャが平坦で色数が少ない場合であっても、少ない計算量で精度良く光源を推定することができる。   According to the present invention, in addition to the correlation coefficient between luminance and color, the type of light source is determined using the color texture feature, the color balance of the entire image, and the color balance of the neutral gray area. As a result, even when the color texture of the image is flat and the number of colors is small, the light source can be accurately estimated with a small amount of calculation.

本実施形態によるホワイトバランス調整装置の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the white balance adjustment apparatus by this embodiment. 本実施形態による光源種類推定部の機能構成を示すブロック図である。It is a block diagram which shows the function structure of the light source kind estimation part by this embodiment. 本実施形態による光源種類推定処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the light source kind estimation process by this embodiment. 本実施形態による特徴ベクトル算出処理の手順を示すフローチャートである。It is a flowchart which shows the procedure of the feature vector calculation process by this embodiment. 本実施形態による一般的な被写体に対して赤色光源を照射して撮像した入力画像における輝度と色との相関を示すグラフである。It is a graph which shows the correlation of the brightness | luminance and color in the input image imaged by irradiating the red light source with respect to the general to-be-photographed object by this embodiment. 本実施形態による一般的な被写体に対して白色光源を照射して撮像した入力画像における輝度と色との相関を示すグラフである。It is a graph which shows the correlation of the brightness | luminance and color in the input image imaged by irradiating the general subject by this embodiment with a white light source. 本実施形態による色−輝度相関係数をプロットした2次元散布図である。It is the two-dimensional scatter diagram which plotted the color-luminance correlation coefficient by this embodiment. 本実施形態による特徴ベクトルの3次元プロットを示すグラフである。It is a graph which shows the three-dimensional plot of the feature vector by this embodiment. 輝度−色相関を説明するためのスペクトル分布の模式図である。It is a schematic diagram of the spectrum distribution for demonstrating luminance-color correlation. 輝度−色相関を説明するためのスペクトル分布の模式図である。It is a schematic diagram of the spectrum distribution for demonstrating luminance-color correlation.

以下、図面を参照しながら本発明の一実施形態について詳しく説明する。
図1は、本実施形態によるホワイトバランス調整装置1の機能構成を示すブロック図である。
ホワイトバランス調整装置1は、デジタルビデオカメラ、デジタルスチルカメラやカメラ付携帯端末等の被写体光学像を変換して画像信号を電気的に出力する装置おいて、画像信号のホワイトバランスを調整する装置である。ホワイトバランス調整装置1は、レンズ101と、アイリス102と、撮像素子103と、AGC(Automatic Gain Control)部104と、前処理部105と、画像情報算出部106と、照度検出部107と、駆動部108と、光源種類推定部109と、ホワイトバランスゲイン算出部111と、ホワイトバランス制御部112と、色補正制御部113と、ガンマ補正制御部114と、出力部115とを含んで構成される。
Hereinafter, an embodiment of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a block diagram showing a functional configuration of the white balance adjusting apparatus 1 according to the present embodiment.
The white balance adjusting device 1 is a device that adjusts the white balance of an image signal in a device that converts a subject optical image and electrically outputs an image signal such as a digital video camera, a digital still camera, or a mobile terminal with a camera. is there. The white balance adjustment device 1 includes a lens 101, an iris 102, an image sensor 103, an AGC (Automatic Gain Control) unit 104, a preprocessing unit 105, an image information calculation unit 106, an illuminance detection unit 107, and a drive. Unit 108, light source type estimation unit 109, white balance gain calculation unit 111, white balance control unit 112, color correction control unit 113, gamma correction control unit 114, and output unit 115. .

レンズ101は、撮像素子103の受光面に光学像を導く。アイリス102は、レンズ101から撮像素子103への光の出力を調整する。撮像素子103は、その受光面に結像した光学像を光電変換して画像信号を生成し、生成した画像信号をAGC部104へ出力する。AGC部104は、照度検出部107により検出された照度に基づいて、入力された画像信号のレベルを一定にし、レベルを一定にした画像信号を前処理部105に出力する。前処理部105は、入力された画像信号に対してノイズ除去、欠陥補正、及びシェーディング補正等の前処理を行い、前処理した画像信号を画像情報算出部106とホワイトバランス制御部112とに出力する。   The lens 101 guides an optical image to the light receiving surface of the image sensor 103. The iris 102 adjusts the light output from the lens 101 to the image sensor 103. The image sensor 103 photoelectrically converts the optical image formed on the light receiving surface to generate an image signal, and outputs the generated image signal to the AGC unit 104. The AGC unit 104 makes the level of the input image signal constant based on the illuminance detected by the illuminance detection unit 107, and outputs the image signal with the constant level to the preprocessing unit 105. The preprocessing unit 105 performs preprocessing such as noise removal, defect correction, and shading correction on the input image signal, and outputs the preprocessed image signal to the image information calculation unit 106 and the white balance control unit 112. To do.

画像情報算出部106は、入力された画像信号を縮小してホワイトバランス算出用の縮小画像信号を生成し、生成した縮小画像信号を照度検出部107と光源種類推定部109とホワイトバランスゲイン算出部111とに出力する。照度検出部107は、入力された縮小画像信号に基づいて露出処理に用いる照度を算出し、算出した照度をAGC部104と駆動部108とホワイトバランスゲイン算出部111とに出力する。駆動部108は、入力された照度に基づいてアイリスを駆動し、露出を調整する。   The image information calculation unit 106 reduces the input image signal to generate a reduced image signal for white balance calculation, and uses the generated reduced image signal for the illuminance detection unit 107, the light source type estimation unit 109, and the white balance gain calculation unit. And output to 111. The illuminance detection unit 107 calculates the illuminance used for the exposure process based on the input reduced image signal, and outputs the calculated illuminance to the AGC unit 104, the drive unit 108, and the white balance gain calculation unit 111. The driving unit 108 drives the iris based on the input illuminance and adjusts the exposure.

光源種類推定部(光源推定装置)109は、入力された縮小画像信号を用いて「輝度−色相関」原理を基にした画像特徴量(特徴ベクトル)を算出し、光源種類(光源の種類)が白色系か非白色系かを判定する。そして、光源種類推定部109は、判定結果をホワイトバランスゲイン算出部111へ出力する。光源種類推定部109の詳細については後述する。   The light source type estimation unit (light source estimation device) 109 calculates an image feature amount (feature vector) based on the “luminance-color correlation” principle using the input reduced image signal, and the light source type (type of light source). Is white or non-white. Then, the light source type estimation unit 109 outputs the determination result to the white balance gain calculation unit 111. Details of the light source type estimation unit 109 will be described later.

ホワイトバランスゲイン算出部111は、光源種類推定部109により判定された光源種類と照度検出部107により検出された照度とに基づいて、ホワイトバランスゲインを算出する。具体的には、ホワイトバランスゲイン算出部111は、光源種類に対応するホワイトバランスゲインをホワイトバランスチューニングパラーメータ記憶部110から読み出し、読み出したホワイトバランスゲインをホワイトバランス制御部112に出力する。ホワイトバランスチューニングパラーメータ記憶部110は、光源種類毎に最適化されたホワイトバランスゲインを示すホワイトバランスチューニングパラメータを記憶する。   The white balance gain calculation unit 111 calculates a white balance gain based on the light source type determined by the light source type estimation unit 109 and the illuminance detected by the illuminance detection unit 107. Specifically, the white balance gain calculation unit 111 reads the white balance gain corresponding to the type of light source from the white balance tuning parameter storage unit 110 and outputs the read white balance gain to the white balance control unit 112. The white balance tuning parameter storage unit 110 stores a white balance tuning parameter indicating a white balance gain optimized for each light source type.

なお、本実施形態では、ホワイトバランスゲイン算出部111は、ホワイトバランスチューニングパラーメータに基づいて、ホワイトバランスゲインを算出しているが、一般的なホワイトバランス算出アルゴリズムを用いてホワイトバランスゲインを算出してもよい。例えば、ホワイトバランスゲイン算出部111は、縮小画像全体の色が光源種類の光源色であればカラーバランスがグレーになるようにホワイトバランスゲインを算出し、縮小画像全体の色が光源色以外の物体色であれば色味を補正せず残すホワイトバランスゲインを算出する。この方法は元のホワイトバランスアルゴリズムを変更する必要が無いので、システム親和性が高いというメリットがある。さらに別の例を説明する。光源種類が推定できると各光源を照射したときの被写体輝度(Brightness Value)の範囲を制限できる。このため、その被写体輝度範囲をパラメータとしてホワイトバランスゲイン算出に用いることが考えられる。一般的なホワイトバランス算出アルゴリズムでは被写体輝度から光源種別を推定するロジックを含むことが多いが、カメラシステムによってはレンズ101と本体(撮像素子103以降)が通信できないために被写体輝度を取得できず、ホワイトバランス算出の精度に影響が出る場合がある。本例によれば、光源種類を推定することにより被写体輝度範囲をある程度推定するため、ホワイトバランス算出の精度劣化を防ぐことができる。   In this embodiment, the white balance gain calculation unit 111 calculates the white balance gain based on the white balance tuning parameter. However, the white balance gain calculation unit 111 calculates the white balance gain using a general white balance calculation algorithm. Also good. For example, the white balance gain calculation unit 111 calculates the white balance gain so that the color balance is gray if the color of the entire reduced image is the light source type, and the color of the entire reduced image is an object other than the light source color. If it is a color, the white balance gain that remains without correcting the color is calculated. This method has the advantage of high system compatibility because there is no need to change the original white balance algorithm. Still another example will be described. If the type of light source can be estimated, the range of subject brightness (Brightness Value) when each light source is irradiated can be limited. For this reason, it is conceivable to use the subject luminance range as a parameter for white balance gain calculation. A general white balance calculation algorithm often includes logic for estimating the light source type from the subject brightness, but depending on the camera system, the subject brightness cannot be acquired because the lens 101 and the main body (after the image sensor 103) cannot communicate. The accuracy of white balance calculation may be affected. According to this example, since the subject luminance range is estimated to some extent by estimating the light source type, it is possible to prevent deterioration in accuracy of white balance calculation.

ホワイトバランス制御部112は、入力されたホワイトバランスゲインに基づき、前処理部105から入力された画像信号に対しホワイトバランス調整する。そして、ホワイトバランス制御部112は、ホワイトバランス調整した画像信号を色補正制御部113に出力する。色補正制御部113は、入力された画像信号を色補正し、色補正した画像信号をガンマ補正制御部114に出力する。ガンマ補正制御部114は、入力された画像信号をガンマ補正し、ガンマ補正した画像信号を出力部115に出力する。出力部115は、入力された画像信号を外部記憶媒体、ディスプレイ、又はネットワーク等に出力する。   The white balance control unit 112 performs white balance adjustment on the image signal input from the preprocessing unit 105 based on the input white balance gain. Then, the white balance control unit 112 outputs the white balance adjusted image signal to the color correction control unit 113. The color correction control unit 113 performs color correction on the input image signal, and outputs the color-corrected image signal to the gamma correction control unit 114. The gamma correction control unit 114 performs gamma correction on the input image signal and outputs the gamma corrected image signal to the output unit 115. The output unit 115 outputs the input image signal to an external storage medium, a display, a network, or the like.

図2は、本実施形態による光源種類推定部109の機能構成を示すブロック図である。
光源種類推定部109は、時系列データバッファ202と、輝度むら解析部203と、特徴量算出部204と、識別器211とを含んで構成される。
時系列データバッファ202は、縮小画像信号201を入力とし、入力された縮小画像信号の画像データ(以下、縮小画像データとする)をフレーム毎に時系列に記憶する。時系列データバッファ202は、例えばDRAM(Dynamic Random Access Memory)等のフラッシュメモリ上に確保されたリングバッファであり、所定フレーム数の画像データを格納することができる。時系列データバッファ202に記憶された縮小画像データは、順次輝度むら解析部203に入力される。
FIG. 2 is a block diagram illustrating a functional configuration of the light source type estimation unit 109 according to the present embodiment.
The light source type estimation unit 109 includes a time series data buffer 202, a luminance unevenness analysis unit 203, a feature amount calculation unit 204, and a discriminator 211.
The time-series data buffer 202 receives the reduced image signal 201 and stores image data of the input reduced image signal (hereinafter referred to as reduced image data) in time series for each frame. The time-series data buffer 202 is a ring buffer secured on a flash memory such as a DRAM (Dynamic Random Access Memory), for example, and can store a predetermined number of frames of image data. The reduced image data stored in the time series data buffer 202 is sequentially input to the luminance unevenness analysis unit 203.

輝度むら解析部203は、フレーム単位で輝度一定領域とハイライト画素とを特定する。輝度一定領域とは、光源の位置を仮定したときに、輝度が一定になる領域である。また、ハイライト画素とは、2色性反射モデル(例えば、S.A.Shafer, “Using color to separate reflection components,” in COLOR Research and Application, Vol.10, No.4, pp.210-218, 1985.参照)等によって得られる極端に明るい画素である。そして、輝度むら解析部203は、特定した輝度一定領域の情報(面積、座標)である輝度むら情報とハイライト画素の情報(座標)であるハイライト画素情報と縮小画像データとを特徴量算出部204に出力する。輝度むら解析部203における処理の詳細は後述する。   The luminance unevenness analysis unit 203 specifies a constant luminance region and a highlight pixel in units of frames. The constant luminance region is a region where the luminance is constant when the position of the light source is assumed. The highlight pixel is a dichroic reflection model (for example, SAShafer, “Using color to separate reflection components,” in COLOR Research and Application, Vol. 10, No. 4, pp. 210-218, 1985. This is an extremely bright pixel obtained by (see Fig.). Then, the luminance unevenness analysis unit 203 calculates the feature amount of luminance unevenness information that is information (area, coordinates) of the specified constant luminance region, highlight pixel information that is information (coordinates) of highlight pixels, and reduced image data. Output to the unit 204. Details of processing in the luminance unevenness analysis unit 203 will be described later.

特徴量算出部204は、縮小画像データにおける光源種類を判定するための特徴量(以下、特徴ベクトルとする)を算出し、算出した特徴ベクトルを識別器211に出力する。特徴量算出部204は、輝度−色相関算出部205と、テクスチャ解析部206と、平均色算出部207と、ニュートラルグレー領域探索部208と、カラーバランス算出部209と、特徴ベクトル算出部210とを含んで構成される。   The feature amount calculation unit 204 calculates a feature amount (hereinafter referred to as a feature vector) for determining the light source type in the reduced image data, and outputs the calculated feature vector to the classifier 211. The feature amount calculation unit 204 includes a luminance-color correlation calculation unit 205, a texture analysis unit 206, an average color calculation unit 207, a neutral gray area search unit 208, a color balance calculation unit 209, and a feature vector calculation unit 210. It is comprised including.

輝度−色相関算出部205は、時系列に並べられたK(Kは2以上の整数)フレームの縮小画像データと、各縮小画像データに対応する輝度むら情報と、各縮小画像データに対応するハイライト画素情報とに基づいて、輝度と色の間の相関を示す輝度−色相関係数を算出する。この輝度−色相関係数は、カラーテクスチャの多い(色数の多い)画像に対して精度良く光源種類を推定できる特徴量である。そして、輝度−色相関算出部205は、算出した輝度−色相関係数を特徴ベクトル算出部210に出力する。輝度−色相関算出部205における処理の詳細については後述する。   The luminance-color correlation calculation unit 205 corresponds to reduced image data of K frames (K is an integer of 2 or more) arranged in time series, luminance unevenness information corresponding to each reduced image data, and each reduced image data. Based on the highlight pixel information, a luminance-color correlation coefficient indicating a correlation between luminance and color is calculated. This luminance-color correlation coefficient is a feature quantity that can accurately estimate the type of light source for an image with a large number of color textures (a large number of colors). Then, the luminance-color correlation calculating unit 205 outputs the calculated luminance-color correlation coefficient to the feature vector calculating unit 210. Details of the processing in the luminance-color correlation calculation unit 205 will be described later.

テクスチャ解析部206は、時系列に並べられたKフレームの縮小画像データからカラーテクスチャ特徴を算出し、算出したカラーテクスチャ特徴を特徴ベクトル算出部210に出力する。カラーテクスチャ特徴は、色の多様性を表す指標である。テクスチャ解析部206における処理の詳細については後述する。   The texture analysis unit 206 calculates color texture features from the reduced image data of K frames arranged in time series, and outputs the calculated color texture features to the feature vector calculation unit 210. The color texture feature is an index representing color diversity. Details of processing in the texture analysis unit 206 will be described later.

平均色算出部207は、縮小画像データにおけるRGBチャネルそれぞれの平均色を算出し、算出した平均色と縮小画像データとをカラーバランス算出部209に出力する。ニュートラルグレー領域探索部208は、縮小画像データにおけるニュートラルグレー(灰色)領域を探索し、縮小画像データにニュートラルグレー領域があるか否かを判定する。ニュートラルグレー領域は、平均色が灰色である領域である。そして、ニュートラルグレー領域探索部208は、ニュートラルグレー領域の有無と縮小画像データとをカラーバランス算出部209に出力する。   The average color calculation unit 207 calculates the average color of each of the RGB channels in the reduced image data, and outputs the calculated average color and reduced image data to the color balance calculation unit 209. The neutral gray area search unit 208 searches for a neutral gray area in the reduced image data, and determines whether or not there is a neutral gray area in the reduced image data. The neutral gray area is an area where the average color is gray. Then, the neutral gray area search unit 208 outputs the presence / absence of the neutral gray area and the reduced image data to the color balance calculation unit 209.

カラーバランス算出部209は、平均色算出部207が算出したRGBチャネルそれぞれの平均色から、縮小画像データにおける画像全体のカラーバランスを算出する。また、カラーバランス算出部209は、ニュートラルグレー領域探索部208が探索したニュートラルグレー領域のカラーバランスを算出する。そして、カラーバランス算出部209は、算出した画像全体のカラーバランスとニュートラルグレー領域のカラーバランスとを特徴ベクトル算出部210に出力する。カラーバランスの算出方法の詳細については後述する。画像全体のカラーバランスとニュートラルグレー領域のカラーバランスとの組は、カラーテクスチャの少ない画像に対して精度良く光源種類を推定できる特徴量である。   The color balance calculation unit 209 calculates the color balance of the entire image in the reduced image data from the average colors of the RGB channels calculated by the average color calculation unit 207. Further, the color balance calculation unit 209 calculates the color balance of the neutral gray area searched by the neutral gray area search unit 208. Then, the color balance calculation unit 209 outputs the calculated color balance of the entire image and the color balance of the neutral gray area to the feature vector calculation unit 210. Details of the color balance calculation method will be described later. The combination of the color balance of the entire image and the color balance of the neutral gray region is a feature quantity that can accurately estimate the type of light source for an image with little color texture.

特徴ベクトル算出部210は、輝度−色相関算出部205により算出された輝度−色相関と、テクスチャ解析部206により抽出されたカラーテクスチャ特徴と、カラーバランス算出部209により算出されたカラーバランスとに基づいて、特徴ベクトル(輝度−色相関,カラーテクスチャ特徴,画像全体のカラーバランス,ニュートラルグレー領域のカラーバランス)を生成し、識別器211の学習部212又は識別部215に出力する。   The feature vector calculation unit 210 converts the luminance-color correlation calculated by the luminance-color correlation calculation unit 205, the color texture feature extracted by the texture analysis unit 206, and the color balance calculated by the color balance calculation unit 209. Based on this, a feature vector (luminance-color correlation, color texture feature, color balance of the entire image, color balance of the neutral gray region) is generated and output to the learning unit 212 or the identification unit 215 of the classifier 211.

識別器211は、複数の画像データの特徴ベクトルと各画像データに対応する光源種類(教示データ)とからなる学習データに基づいて、特徴ベクトルから光源種類を導くための判定基準を機械学習する。このとき、識別部11は、ブースティング(Boosting)、サポート・ベクター・マシーン(SVM)、決定木(Decision Tree)、あるいは決定木を拡張したRandom Forest等を用いて機械学習する。そして、識別器211は、学習した結果に基づいて、特徴量算出部204により入力された特徴ベクトルに対応する光源種類を判定する。識別器211は、学習部212と、識別部215とを含んで構成される。なお、識別器211は、本実施形態では機械学習しているが、例えばマニュアル操作によって判断基準に基づいて光源種類を判定してもよい。   The discriminator 211 performs machine learning on a criterion for deriving the light source type from the feature vector based on learning data including a feature vector of a plurality of image data and a light source type (teaching data) corresponding to each image data. At this time, the identification unit 11 performs machine learning using boosting (Boosting), support vector machine (SVM), decision tree, or Random Forest that is an extension of the decision tree. Then, the classifier 211 determines the light source type corresponding to the feature vector input by the feature amount calculation unit 204 based on the learned result. The classifier 211 includes a learning unit 212 and a classifying unit 215. The discriminator 211 is machine-learned in the present embodiment, but may determine the light source type based on a judgment criterion by manual operation, for example.

学習部212は、学習データに基づいて、特徴ベクトルから光源種類を導くための判定基準を機械学習し、この学習結果を学習結果記憶部214に書き込む。学習結果記憶部214は、ホワイトバランス調整装置1の外部にある外部記憶装置であり、学習部212による学習結果を記憶する。なお、学習部212は、学習に続いて光源種類推定処理をする場合には、ホワイトバランス調整装置1内に設けられたフラッシュメモリ等に学習結果を書き込む。   The learning unit 212 performs machine learning on the criterion for deriving the light source type from the feature vector based on the learning data, and writes the learning result in the learning result storage unit 214. The learning result storage unit 214 is an external storage device that is external to the white balance adjustment device 1, and stores the learning result of the learning unit 212. Note that the learning unit 212 writes the learning result in a flash memory or the like provided in the white balance adjustment device 1 when performing the light source type estimation process following the learning.

識別部215は、学習部212による学習結果に基づいて、特徴ベクトル算出部210により入力された特徴ベクトルに対応する光源種類を判定し、判定結果をホワイトバランスゲイン算出部111に出力する。例えば、識別部215は、特徴ベクトル(輝度−色相関,カラーテクスチャ特徴,画像全体のカラーバランス,ニュートラルグレー領域のカラーバランス)において、カラーテクスチャ特徴が大きい(カラーテクスチャが多い)場合には輝度−色相関に対する重みを重くして光源種類を判定し、カラーテクスチャ特徴が小さい(カラーテクスチャが少ない)場合には画像全体のカラーバランスとニュートラルグレー領域のカラーバランスとの組に対する重みを重くして光源種類を判定する。   The identification unit 215 determines the light source type corresponding to the feature vector input by the feature vector calculation unit 210 based on the learning result from the learning unit 212, and outputs the determination result to the white balance gain calculation unit 111. For example, the identification unit 215 determines that the luminance vector is large when the color texture feature is large (the color texture is large) in the feature vector (luminance-color correlation, color texture feature, color balance of the entire image, color balance of the neutral gray region). The light source type is determined by increasing the weight for the color correlation, and if the color texture feature is small (the color texture is small), the light source is set by increasing the weight for the combination of the color balance of the entire image and the color balance of the neutral gray area. Determine the type.

次に、図3を参照して、光源種類推定部109による光源種類推定処理について説明する。図3は、本実施形態による光源種類推定処理の手順を示すフローチャートである。
まず、識別部215が、学習結果記憶部214から学習結果を読み込む(ステップS10)。次に、光源種類推定部109は、時系列データバッファ202へ縮小画像データを書き込む(ステップS20)。
Next, the light source type estimation process by the light source type estimation unit 109 will be described with reference to FIG. FIG. 3 is a flowchart showing the procedure of the light source type estimation process according to this embodiment.
First, the identification unit 215 reads a learning result from the learning result storage unit 214 (step S10). Next, the light source type estimation unit 109 writes the reduced image data in the time series data buffer 202 (step S20).

次に、光源種類推定部109は、時系列データバッファ202に書き込んだ縮小画像データ数が所定の閾値以上であるか否かを判定する(ステップS30)。縮小画像データ数が閾値以上であればステップS40へ進み、縮小画像データ数が閾値未満であればステップS20へ戻る。この分岐の目的は、後述する輝度−色相関係数の算出を安定して行うために、十分な数のデータを確保することである。   Next, the light source type estimation unit 109 determines whether or not the number of reduced image data written in the time series data buffer 202 is equal to or greater than a predetermined threshold (step S30). If the number of reduced image data is greater than or equal to the threshold, the process proceeds to step S40. If the number of reduced image data is less than the threshold, the process returns to step S20. The purpose of this branching is to secure a sufficient number of data in order to stably calculate the luminance-color correlation coefficient described later.

次に、輝度むら解析部203が、輝度むら解析によりフレーム単位で輝度一定領域とハイライト画素とを特定する(ステップS40)。具体的には、輝度むら解析部203は、次の領域近似方法を用いて輝度一定領域を特定する。輝度むらは、光源位置、物体の形状・配置に依存する。このため、この領域近似方法では、光源位置について正面を中心として上下左右の8方向とした場合を想定し、さらに物体の奥行きサイズはカメラから物体までの距離と比較して十分小さいものと仮定し、画像上で水平・垂直・斜め方向のいずれかの方向において照明強度が一定であると仮定した上で、輝度一定領域を特定する。
なお、この方法に限らず、他の領域近似方法を用いて輝度一定領域を特定してもよい。例えば、画像の領域分割を行う領域近似方法がある。この領域近似方法は、影の領域や鏡面反射で白飛びしている領域を領域分割し、輝度レベルが一定の領域のみを用いる手法である。影の領域は色や輝度のクラスタリングで求めることができる。また、鏡面反射している領域は例えば、2色性反射モデルを用いて推定することができる。なお、これら2つの領域近似手法を併用してもよい。
Next, the luminance unevenness analysis unit 203 specifies a constant luminance region and a highlight pixel in units of frames by luminance unevenness analysis (step S40). Specifically, the luminance unevenness analysis unit 203 specifies a constant luminance region using the following region approximation method. The luminance unevenness depends on the light source position and the shape / arrangement of the object. For this reason, in this region approximation method, it is assumed that the light source position has eight directions (up, down, left, and right) with the front as the center, and further, the depth size of the object is assumed to be sufficiently small compared to the distance from the camera to the object. The constant luminance region is specified on the assumption that the illumination intensity is constant in any one of the horizontal, vertical, and diagonal directions on the image.
Note that the present invention is not limited to this method, and the constant luminance region may be specified using another region approximation method. For example, there is a region approximation method for dividing an image region. This region approximation method is a method in which a shadow region or a region that is whitened by specular reflection is divided into regions, and only a region having a constant luminance level is used. The shadow area can be obtained by color and luminance clustering. The specularly reflected region can be estimated using, for example, a dichroic reflection model. Note that these two region approximation methods may be used in combination.

次に、特徴量算出部204が、輝度一定領域の情報である輝度むら情報と、ハイライト情報と、縮小画像データとに基づいて、光源種類を判定するための特徴ベクトルを算出する(ステップS50)。この特徴ベクトル算出処理の詳細は後述する。
次に、識別部215が、読み込んだ学習結果に基づいて、算出された特徴ベクトルに対するスコアを光源種類毎に算出する(ステップS60)。そして、識別部215は、光源種類毎に算出されたスコアに基づき、光源種類を判定する(ステップS70)。具体的には、識別部215は、スコアの高い光源種類を、算出された特徴ベクトルに対応する光源種類とする。
Next, the feature amount calculation unit 204 calculates a feature vector for determining the light source type based on the luminance unevenness information, which is information of the constant luminance region, highlight information, and reduced image data (step S50). ). Details of this feature vector calculation process will be described later.
Next, the identification unit 215 calculates a score for the calculated feature vector for each light source type based on the read learning result (step S60). And the identification part 215 determines a light source type based on the score calculated for every light source type (step S70). Specifically, the identification unit 215 sets the light source type having a high score as the light source type corresponding to the calculated feature vector.

次に、図4を参照して、上述したステップS50における特徴ベクトル算出処理について説明する。図4は、本実施形態による特徴ベクトル算出処理の手順を示すフローチャートである。
まず、特徴量算出部204は、輝度むら解析部203から、時系列に並べられたKフレームの縮小画像データと、各縮小画像データに対応する輝度むら情報と、各縮小画像データに対応するハイライト画素情報とを取得する(ステップS100,S110,S120)。次に、特徴量算出部204は、輝度−色相関算出処理と、カラーテクスチャ解析処理と、画像全体のカラーバランス算出処理と、ニュートラルグレー領域のカラーバランス算出処理とを並行して行う。なお、本実施形態では、輝度−色相関算出処理と、カラーテクスチャ解析処理と、画像全体のカラーバランス算出処理と、ニュートラルグレー領域のカラーバランス算出処理とを並行して行うが、1処理ずつ順に行ってもよい。
Next, the feature vector calculation process in step S50 described above will be described with reference to FIG. FIG. 4 is a flowchart showing the procedure of the feature vector calculation process according to this embodiment.
First, the feature amount calculation unit 204 receives reduced image data of K frames arranged in time series, luminance unevenness information corresponding to each reduced image data, and a high level corresponding to each reduced image data from the luminance unevenness analysis unit 203. Light pixel information is acquired (steps S100, S110, S120). Next, the feature amount calculation unit 204 performs a luminance-color correlation calculation process, a color texture analysis process, a color balance calculation process for the entire image, and a color balance calculation process for the neutral gray area in parallel. In the present embodiment, the luminance-color correlation calculation process, the color texture analysis process, the color balance calculation process for the entire image, and the color balance calculation process for the neutral gray area are performed in parallel. You may go.

[輝度−色相関算出処理(ステップS140)]
まず、輝度−色相関算出処理について説明する。
輝度−色相関算出部205は、時系列に並べられたKフレームの縮小画像データと、各縮小画像データに対応する輝度むら情報と、各縮小画像データに対応するハイライト画素情報とに基づいて、輝度−色相関係数を算出する(ステップS140)。
ここで、Kフレームの縮小画像データを用いるのは、後述する相関係数の算出を安定して行うためである。相関係数の算出は、データ分布が正規分布でなければ安定して行うことができないが、相関係数の算出に用いるデータ数が少ないと、データ分布が正規分布になっているかがわからない。このため、複数のフレームを用いて、相関係数を算出するためのデータ数を確保する。また、時系列データを用いる理由は、手振れ、シーン内に存在する被写体の運動、及び照明条件の変化等によって生じる画像情報の時間変化に対応するためである。
[Luminance-Color Correlation Calculation Processing (Step S140)]
First, luminance-color correlation calculation processing will be described.
The luminance-color correlation calculating unit 205 is based on the reduced image data of K frames arranged in time series, luminance unevenness information corresponding to each reduced image data, and highlight pixel information corresponding to each reduced image data. The luminance-color correlation coefficient is calculated (step S140).
Here, the reduced image data of the K frame is used in order to stably calculate a correlation coefficient described later. The calculation of the correlation coefficient cannot be performed stably unless the data distribution is a normal distribution. However, if the number of data used for calculating the correlation coefficient is small, it is not known whether the data distribution is a normal distribution. For this reason, the number of data for calculating the correlation coefficient is secured using a plurality of frames. The reason for using time-series data is to cope with temporal changes in image information caused by camera shake, movement of subjects existing in the scene, changes in lighting conditions, and the like.

具体的には、まず、輝度−色相関算出部205は、輝度一定領域以外の領域とハイライト画素とを各縮小画像データから除去する。これは、光源位置が偏っている場合や物体表面の反射特性に極端に差がある場合等には、撮像画像の輝度分布に大きな差が生じ(シェーディング)、輝度と色味のデータ分布が正規分布にならず輝度−色相関係数の算出が不安定になるためである。
次に、輝度−色相関算出部205は、輝度一定領域以外の領域とハイライト画素とを除去した各縮小画像データを縦横にN(Nは2以上の整数)分割する。以下、分割した領域を分割ブロックとする。なお、Nの値は任意であり、例えば画素を1分割ブロックとしてもよい。そして、輝度−色相関算出部205は、分割ブロックi(i=1,2,…,N×K)毎にRチャネルの平均値Rと、Gチャネルの平均値Gと、Bチャネルの平均値Bとを算出する。そして、輝度−色相関算出部205は、次の式(1)により各分割ブロックiの輝度Lumを算出する。
Specifically, first, the luminance-color correlation calculation unit 205 removes regions other than the luminance constant region and highlight pixels from each reduced image data. This is because when the light source position is biased or there is an extreme difference in the reflection characteristics of the object surface, there is a large difference in the luminance distribution of the captured image (shading), and the luminance and color data distribution is normal. This is because the calculation of the luminance-color correlation coefficient becomes unstable without being distributed.
Next, the luminance-color correlation calculation unit 205 divides each reduced image data from which regions other than the constant luminance region and highlight pixels are removed into N (N is an integer of 2 or more) vertically and horizontally. Hereinafter, the divided area is referred to as a divided block. Note that the value of N is arbitrary. For example, the pixel may be a one-division block. Then, the luminance - color correlation calculating unit 205, dividing the block i (i = 1,2, ..., N × K) for each and the average value R i of R channels, an average value G i of the G channel, and B channel An average value B i is calculated. Then, the luminance - color correlation calculator 205 calculates a luminance Lum i of each divided block i by the following equation (1).

Figure 0005740147
Figure 0005740147

次に、輝度−色相関算出部205は、次の式(2)により、各分割ブロックiの赤みRednessを算出する。 Next, the luminance - color correlation calculation unit 205, by the following equation (2), to calculate the red redness i of each divided block i.

Figure 0005740147
Figure 0005740147

次に、輝度−色相関算出部205は、次の式(3)により、各分割ブロックiの青みBluenessを算出する。 Next, the luminance-color correlation calculation unit 205 calculates the blueness blue i of each divided block i by the following equation (3).

Figure 0005740147
Figure 0005740147

次に、輝度−色相関算出部205は、輝度Lumと赤みRednessの相関係数Fを次の式(4)で表されるピアソンの積率相関係数により算出する。 Next, the luminance - color correlation calculator 205 calculates the correlation coefficient of Pearson represented a correlation coefficient F r of luminance Lum and redness Redness by the following equation (4).

Figure 0005740147
Figure 0005740147

以下、式中の文字上部に「−」が付いた文字は、文中において文字の前に(−)を記載して示す。nはデータ数であり、n=N×Kである。(−)Lumは、輝度Lumの平均値である。(−)Rednessは、赤みRednessの平均値である。   Hereinafter, a character with “-” in the upper part of the character in the formula is indicated by (−) in front of the character in the sentence. n is the number of data, and n = N × K. (−) Lum is an average value of the luminance Lum. (−) Redness is an average value of redness Redness.

そして、輝度−色相関算出部205は、輝度Lumと青みBluenessの相関係数Fを次の式(5)で表されるピアソンの積率相関係数により算出する。 Then, the luminance - color correlation calculator 205 calculates the correlation coefficient of Pearson represented a correlation coefficient F b of luminance Lum and bluish Blueness by the following equation (5).

Figure 0005740147
Figure 0005740147

ただし、(−)Bluenessは、青みBluenessの平均値である。   However, (-) Blueness is an average value of bluish blueness.

最後に、輝度−色相関算出部205は、輝度−色相関係数F=(F,F)とする。相関係数の算出には式(4)及び式(5)で示されるピアソンの積率相関係数を用いるが、これはデータの正規分布性を仮定している。そのため、データ数が少なかったり、はずれ値(Outlier)が存在したりする場合には正しい相関係数を算出できない場合がある。このため、本実施形態では、時系列バッファへの画像保存(ステップS20)によりデータ数を確保して、相関係数を算出している。また、輝度むら解析(ステップS40)による輝度の変動とハイライト画素とを除去することにより、相関係数算出の誤差要因を低減する。
なお、これらの要因以外にはずれ値が混入する可能性がある。例えばシーン中に自発光する領域が存在する場合である。このような場合には輝度むら解析ではデータのはずれ値を特定できないため、データの分布が正規分布にならない可能性がある。そのため、このような場合には、データの正規分布性を仮定しないスピアマンの順位相関係数を用いてもよい。
Finally, the luminance-color correlation calculation unit 205 sets the luminance-color correlation coefficient F = (F r , F b ). The calculation of the correlation coefficient uses the Pearson product-moment correlation coefficient expressed by the equations (4) and (5), which assumes a normal distribution of the data. For this reason, when the number of data is small or there is an outlier (Outlier), a correct correlation coefficient may not be calculated. For this reason, in the present embodiment, the correlation coefficient is calculated by securing the number of data by image storage in the time series buffer (step S20). Further, by removing the luminance variation and the highlight pixel due to the luminance unevenness analysis (step S40), the error factor of the correlation coefficient calculation is reduced.
In addition to these factors, there is a possibility that a deviation value is mixed. For example, this is a case where there is a region that emits light in the scene. In such a case, since the outlier value of the data cannot be specified by the luminance unevenness analysis, there is a possibility that the data distribution does not become a normal distribution. Therefore, in such a case, Spearman's rank correlation coefficient that does not assume normal distribution of data may be used.

図5は、本実施形態による一般的な被写体に対して赤色光源を照射して撮像した入力画像における輝度と色との相関を示すグラフである。
図5(a)は、様々な色を含む一般的な被写体に対して赤色光源(ここではハロゲンランプ)を照射して撮像した入力画像である。図5(b)は、図5(a)に示す入力画像における輝度Lumに対する赤みRednessの変化をプロットしたグラフである。このグラフにおける縦軸は赤みRednessであり、横軸は輝度Lumである。本図に示すように、輝度Lumと赤みRednessは正の相関を持つ。図5(c)は、図5(a)に示す入力画像における輝度Lumに対する青みBluenessの変化をプロットしたグラフである。このグラフにおける縦軸は青みBluenessであり、横軸は輝度Lumである。本図に示すように、輝度Lumと青みBluenessは負の相関を持つ。
FIG. 5 is a graph showing a correlation between luminance and color in an input image captured by irradiating a general subject according to the present embodiment with a red light source.
FIG. 5A is an input image captured by irradiating a general subject including various colors with a red light source (here, a halogen lamp). FIG. 5B is a graph plotting the change in redness Redness with respect to the luminance Lum in the input image shown in FIG. The vertical axis in this graph is redness Redness, and the horizontal axis is luminance Lum. As shown in the figure, the luminance Lum and the redness Redness have a positive correlation. FIG. 5C is a graph in which changes in bluish blueness with respect to the luminance Lum in the input image shown in FIG. 5A are plotted. In this graph, the vertical axis is bluish blueness, and the horizontal axis is luminance Lum. As shown in the figure, the luminance Lum and the bluish blueness have a negative correlation.

図6は、本実施形態による一般的な被写体に対して白色光源を照射して撮像した入力画像における輝度と色との相関を示すグラフである。
本図に示すグラフは、図5(a)に示す様々な色を含む一般的な被写体に対して白色光源(ここでは色温度5,500[K]の白色光源)を照射して撮像した入力画像Hにおける輝度に対する色の変化を示す。図6(a)は、入力画像Hにおける輝度Lumに対する赤みRednessの変化をプロットしたグラフである。このグラフにおける縦軸は赤みRednessであり、横軸は輝度Lumである。本図に示すように、輝度Lumと赤みRednessとには相関関係が見られない。また、図6(b)は、入力画像Hにおける輝度に対する青みの変化をプロットしたグラフである。このグラフにおける縦軸は青みBluenessであり、横軸は輝度Lumである。本図に示すように、輝度Lumと青みBluenessとには相関関係が見られない。
これらのことから、赤色光源を照射したときのみ輝度−色相関が生じることが確認できる。
FIG. 6 is a graph showing a correlation between luminance and color in an input image captured by irradiating a general subject with a white light source according to the present embodiment.
The graph shown in this figure is an input imaged by irradiating a general object including various colors shown in FIG. 5A with a white light source (here, a white light source having a color temperature of 5,500 [K]). A change in color with respect to luminance in the image H is shown. FIG. 6A is a graph in which changes in redness Redness with respect to the luminance Lum in the input image H are plotted. The vertical axis in this graph is redness Redness, and the horizontal axis is luminance Lum. As shown in the figure, there is no correlation between the luminance Lum and the redness Redness. FIG. 6B is a graph in which changes in blueness with respect to luminance in the input image H are plotted. In this graph, the vertical axis is bluish blueness, and the horizontal axis is luminance Lum. As shown in the figure, there is no correlation between the luminance Lum and the bluish blueness.
From these facts, it can be confirmed that the luminance-color correlation occurs only when the red light source is irradiated.

図7は、本実施形態による色−輝度相関係数をプロットした2次元散布図である。
この2次元散布図のグラフにおける横軸は輝度と赤みの相関係数Fであり、縦軸は輝度と青みの相関係数Fである。プロットの凡例は5種類あり、赤色光源を照射して撮像した3つの被写体(様々な色を含む被写体、24色マクベスカラーチャート、グレーチャート)、および白色光源を照射して撮像した2つの被写体(様々な色を含む被写体、赤色の被写体(赤系物体))である。一つの凡例あたり、撮像位置を変えて10枚の画像を撮像した。本図から、赤色光源で撮像した凡例は、輝度−赤み相関が大きく、かつ輝度−青み相関が小さいため、プロットがグラフの右下の領域に集中することがわかる。一方、白色光源で撮像した凡例は、プロットがグラフ右下の領域以外の領域に散らばることがわかる。よって、図7に示すグラフの右下領域を検出する識別境界を学習部212で指定できれば、その領域に入ったプロットを赤色光源と判定できる。しかし、図7では、赤色光源のプロットと白色光源のプロットとが一部右下領域で混じっている。この現象の要因として、テクスチャレスの被写体に含まれる色の数が少ないため相関係数算出が不安定になり、白色光源を照射しているにも関わらず偶然輝度−赤み相関の値が大きくなることが考えられる。そこで、輝度−色相関特徴を補完するためにカラーテクスチャ特徴、画面全体のカラーバランス、ニュートラルグレー領域のカラーバランスの3つの特徴量を導入する。
FIG. 7 is a two-dimensional scatter diagram in which color-luminance correlation coefficients according to the present embodiment are plotted.
The horizontal axis in the graph of the 2-dimensional scatter diagram is the correlation coefficient F r of the luminance and red and the vertical axis represents the correlation coefficient F b of luminance and blue. There are five types of plot legends: three subjects imaged by irradiating a red light source (subjects including various colors, 24-color Macbeth color chart, gray chart), and two subjects imaged by irradiating a white light source ( A subject including various colors, a red subject (red object)). For each legend, ten images were taken at different imaging positions. From this figure, it can be seen that the legend imaged with a red light source has a large luminance-redness correlation and a small luminance-blueness correlation, so that the plot is concentrated in the lower right region of the graph. On the other hand, in the legend imaged with a white light source, it can be seen that the plot is scattered in an area other than the area at the lower right of the graph. Therefore, if the learning boundary 212 can specify an identification boundary for detecting the lower right region of the graph shown in FIG. 7, the plot that has entered the region can be determined as a red light source. However, in FIG. 7, the red light source plot and the white light source plot are partially mixed in the lower right region. As a factor of this phenomenon, the correlation coefficient calculation becomes unstable because the number of colors contained in the textureless subject is small, and the value of the luminance-redness correlation is increased accidentally even though the white light source is irradiated. It is possible. Therefore, in order to complement the luminance-color correlation feature, three feature amounts of a color texture feature, a color balance of the entire screen, and a color balance of the neutral gray region are introduced.

[カラーテクスチャ解析処理(ステップS150)]
図4に戻り、次に、カラーテクスチャ解析処理について説明する。
テクスチャ解析部206が、時系列に並べられたKフレームの縮小画像データのカラーテクスチャ解析を行う(ステップS150)。まず、テクスチャ解析部206は、縮小画像データのRGB信号をHSV信号に変換する。HはHue(色相)、SはSaturation(彩度)、VはVlightness(輝度)を表す。次に、テクスチャ解析部206は、H成分の値域を量子化ステップで量子化し、L個のビンからなるヒストグラムを生成する。そのヒストグラムをh(i)(i=1,2,…,L)とする。そして、テクスチャ解析部206は、このヒストグラムから、ノイズとみなす画素、ここでは極端に暗い、または明るい画素の影響をキャンセルした相対ヒストグラムp(i)を次の式(6)より算出する。
[Color Texture Analysis Processing (Step S150)]
Returning to FIG. 4, the color texture analysis processing will be described next.
The texture analysis unit 206 performs color texture analysis of the reduced image data of K frames arranged in time series (step S150). First, the texture analysis unit 206 converts the RGB signal of the reduced image data into an HSV signal. H represents Hue (hue), S represents Saturation, and V represents Vlightness (luminance). Next, the texture analysis unit 206 quantizes the H component range in the quantization step, and generates a histogram including L bins. Let the histogram be h (i) (i = 1, 2,..., L). Then, the texture analysis unit 206 calculates, from this histogram, a relative histogram p (i) in which the influence of pixels regarded as noise, here, extremely dark or bright pixels is canceled, from the following equation (6).

Figure 0005740147
Figure 0005740147

ただし、Mは縮小画像データ中に含まれる画素数であり、eはノイズとみなす画素の数である。続いて、テクスチャ解析部206は、次の式(7)で表されるエントロピーEを算出する。   Here, M is the number of pixels included in the reduced image data, and e is the number of pixels regarded as noise. Subsequently, the texture analysis unit 206 calculates entropy E represented by the following equation (7).

Figure 0005740147
Figure 0005740147

このエントロピーEが、色の多様性を示すカラーテクスチャ特徴である。次の式(8)に示すように、このエントロピーEは、ヒストグラムの各ビンの相対度数p(i)の値が等しいときに最大値Emaxをとる。すなわち、画像内にある色の種類が多いほどヒストグラムが平坦になるため、画像内にある色の種類が多いほどこのエントロピーEの値は大きい。 This entropy E is a color texture feature indicating color diversity. As shown in the following equation (8), this entropy E takes the maximum value E max when the relative frequencies p (i) of the bins of the histogram are equal. That is, as the number of types of colors in the image increases, the histogram becomes flat. Therefore, the number of types of colors in the image increases, and the value of entropy E increases.

Figure 0005740147
Figure 0005740147

上述した式(7)のエントロピーEを光源種類推定の特徴量として用いる理由を以下に説明する。極端な例で、もし画面全体が一色で塗りつぶされている場合、輝度と赤み(または青み)のプロットはある一点に集中してしまい、輝度と赤み(または青み)との相関係数を算出できなくなる。相関係数はある程度データの分布が広くないと算出できないが、これは画面内に複数の色が存在しなければならないことを示す。また、光源や物体表面の分光特性からも、画面全体が一色の場合は、その色が光源によるものなのか、もともとの物体の色なのかを区別できない。そこで式(7)のような色の多様性を表す指標が必要となってくる。色の多様性の指標はエントロピーに限定されるものではなく、例えば分散値も使うことができる。   The reason why the entropy E of the above formula (7) is used as the feature quantity for the light source type estimation will be described below. In an extreme example, if the entire screen is filled with a single color, the plot of brightness and redness (or blueness) will be concentrated at one point, and the correlation coefficient between brightness and redness (or blueness) can be calculated. Disappear. The correlation coefficient cannot be calculated unless the data distribution is wide to some extent, which indicates that there must be a plurality of colors in the screen. Also, from the spectral characteristics of the light source and the object surface, when the entire screen is a single color, it cannot be distinguished whether the color is due to the light source or the original object color. Therefore, an index representing the color diversity as shown in equation (7) is required. The index of color diversity is not limited to entropy, and for example, a variance value can be used.

本実施形態ではカラーテクスチャ解析で算出されるエントロピーEを光源種類の推定のための特徴ベクトルの一要素としているが、輝度−色相関算出で算出される相関係数に対する重みとしてもよい。すなわち、エントロピーが大きい画素(または領域)の相関係数は信頼性が高いとみなして大きな重みを与えた上で識別部115に送り、光源種類を推定させることもできる。   In this embodiment, the entropy E calculated by the color texture analysis is used as one element of the feature vector for estimating the light source type, but may be a weight for the correlation coefficient calculated by the luminance-color correlation calculation. That is, the correlation coefficient of a pixel (or region) having a large entropy can be regarded as highly reliable and given a large weight, and then sent to the identification unit 115 to estimate the light source type.

[画像全体のカラーバランス算出処理(ステップS160,S165)]
次に、画像全体のカラーバランス算出処理について説明する。
まず、平均色算出部207が、Kフレームの縮小画像データ全体におけるR信号の平均値(−)Rと、G信号の平均値(−)Gと、B信号の平均値(−)Bとを算出する。(ステップS160)。次に、カラーバランス算出部209が、画像全体のカラーバランスCB=((−)R/(−)G,(−)B/(−)G)を算出する(ステップS165)。
[Color Balance Calculation Processing for Entire Image (Steps S160 and S165)]
Next, the color balance calculation process for the entire image will be described.
First, the average color calculation unit 207 calculates the average value (−) R of the R signal, the average value (−) G of the G signal, and the average value (−) B of the B signal in the entire reduced image data of K frames. calculate. (Step S160). Next, the color balance calculation unit 209 calculates the color balance CB a = ((−) R / (−) G, (−) B / (−) G) of the entire image (step S165).

画像全体のカラーバランスは灰色仮説モデル(非特許文献2)に基づいている。このモデルは、画像全体には様々な色が存在し、それらの平均値はニュートラルグレー(灰色)であるという仮説に基づいている。もし、このカラーバランスがニュートラルグレーからずれていれば、そのずれは光源色によるものと判断する。ただし、灰色仮説はシンプルで使いやすいモデルではあるが、仮に赤いレンガやカーペットが画面全体に映っていると、画面全体のカラーバランスが赤に寄るので、色かぶりが発生していると間違えることがある。このような問題を低減するために、次に説明するニュートラルグレー領域のカラーバランスを特徴量に加える。   The color balance of the entire image is based on the gray hypothesis model (Non-Patent Document 2). This model is based on the hypothesis that there are various colors throughout the image, and their average value is neutral gray. If the color balance deviates from neutral gray, it is determined that the deviation is due to the light source color. However, although the gray hypothesis is a simple and easy-to-use model, if red bricks and carpets are reflected on the entire screen, the color balance of the entire screen will shift to red, so it may be mistaken for a color cast. is there. In order to reduce such a problem, the color balance of the neutral gray area described below is added to the feature amount.

[ニュートラルグレー領域のカラーバランス算出処理(ステップS170〜S190)]
次に、ニュートラルグレー領域のカラーバランス算出処理について説明する。
まず、ニュートラルグレー領域探索部208が、各フレームにおけるニュートラルグレー領域の有無を判定する(ステップS170)。具体的には、ニュートラルグレー領域探索部208は、所定サイズの矩形ウィンドウを画像中で走査して、次の式(9)を満たす矩形領域がある場合にニュートラルグレー領域があると判定し、式(9)を満たす矩形領域がない場合にニュートラルグレー領域がないと判定する。
[Neutral Gray Area Color Balance Calculation Processing (Steps S170 to S190)]
Next, the neutral gray area color balance calculation process will be described.
First, the neutral gray area search unit 208 determines whether or not there is a neutral gray area in each frame (step S170). Specifically, the neutral gray area searching unit 208 scans a rectangular window of a predetermined size in the image, and determines that there is a neutral gray area when there is a rectangular area that satisfies the following expression (9). When there is no rectangular area satisfying (9), it is determined that there is no neutral gray area.

Figure 0005740147
Figure 0005740147

iは縮小画像データのx座標値であり、jは縮小画像データのy座標値である。(−)Ri,jは、座標値(i,j)を中心とした矩形領域内のRチャネル平均値である。(−)Gi,jは、座標値(i,j)を中心とした矩形領域内のGチャネル平均値である。(−)Bi,jは、座標値(i,j)を中心とした矩形領域内のBチャネル平均値である。 i is the x coordinate value of the reduced image data, and j is the y coordinate value of the reduced image data. (−) R i, j is the R channel average value in the rectangular area centered on the coordinate value (i, j). (−) G i, j is an average value of the G channel in the rectangular area centered on the coordinate value (i, j). (−) B i, j is the B channel average value in the rectangular area centered on the coordinate value (i, j).

次に、カラーバランス算出部209が、ニュートラルグレー領域探索部208によりニュートラルグレー領域が有ると判定されたフレームのカラーバランスCを次の式(10)により算出する(ステップS180)。   Next, the color balance calculation unit 209 calculates the color balance C of the frame determined by the neutral gray region search unit 208 as having a neutral gray region using the following equation (10) (step S180).

Figure 0005740147
Figure 0005740147

ただし、Dは縮小画像データの画像領域である。そして、カラーバランス算出部209は、各フレームのカラーバランスCの中から最小値を抽出し、抽出した最小値をニュートラルグレー領域のカラーバランスCBする(ステップS190)。 Here, D is the image area of the reduced image data. Then, the color balance calculation unit 209 extracts the minimum value from the color balance C of each frame, and uses the extracted minimum value as the color balance CB n of the neutral gray area (step S190).

ニュートラルグレー領域のカラーバランスは灰色仮説と輝度−色相関原理とをサポートする特徴量である。灰色仮説では、仮に赤いレンガやカーペットが画面全体に映っていると、画面全体のカラーバランスが赤に寄るので、色かぶりが発生していると間違える。このとき、もし一部でもカラーバランスがニュートラルグレーである領域(例えば、コンクリート面が少しでも見えている領域)があれば、赤いレンガやカーペットの赤色は物体色であると予想できる。逆に光源による色かぶりであれば、そのようなニュートラルグレー領域も赤みを帯びる。この識別をするために、ニュートラルグレー領域探索部208は、上述した式(9)により、ニュートラルグレー領域を探索する。   The color balance of the neutral gray region is a feature quantity that supports the gray hypothesis and the luminance-color correlation principle. In the gray hypothesis, if a red brick or carpet is reflected on the entire screen, the color balance of the entire screen approaches red, so it is mistaken that a color cast has occurred. At this time, if there is an area where the color balance is neutral gray (for example, an area where the concrete surface can be seen even a little), the red color of the red brick or carpet can be expected to be the object color. On the contrary, if the color cast is caused by a light source, such a neutral gray region is also reddish. In order to identify this, the neutral gray area searching unit 208 searches for the neutral gray area by the above-described equation (9).

この特徴量(ニュートラルグレー領域のカラーバランス)は、画像のカラーテクスチャが少ない場合でも有効である。このため、例えば、識別部215は、カラーテクスチャ解析で得られるエントロピーEの値が小さい場合、すなわち画像がテクスチャレスである場合にニュートラルグレー領域のカラーバランスに対して大きな重みをつけ、逆に輝度−色相関係数に対する重みを小さくする。これにより、シーンのテクスチャに依存しない光源種類推定が可能となる。   This feature amount (color balance of the neutral gray region) is effective even when the color texture of the image is small. For this reason, for example, when the value of the entropy E obtained by the color texture analysis is small, that is, when the image is textureless, the identification unit 215 gives a large weight to the color balance of the neutral gray region, and conversely the luminance -Reduce the weight for the color correlation coefficient. This makes it possible to estimate the light source type independent of the scene texture.

本実施形態では、ニュートラルグレー領域探索部208は、矩形ウィンドウを画像内で走査することでニュートラルグレー領域を探索するが、このとき、走査する矩形ウィンドウがニュートラルグレー領域と色が付いている領域にまたがる場合、または動画中のあるフレームでニュートラル領域が存在しない場合には、矩形領域がニュートラルグレー領域に収まるフレームを検知する手順が考えられる。これが、上述したステップS190の最小値抽出である。   In the present embodiment, the neutral gray area search unit 208 searches for a neutral gray area by scanning a rectangular window in the image. At this time, the rectangular window to be scanned is changed to an area that is colored with the neutral gray area. In the case of crossing or when a neutral area does not exist in a certain frame in a moving image, a procedure for detecting a frame in which a rectangular area falls within a neutral gray area can be considered. This is the minimum value extraction in step S190 described above.

[特徴ベクトル算出処理(ステップS200)]
最後に、特徴ベクトル算出部210が、特徴ベクトルV=(輝度−色相関係数F,カラーテクスチャ特徴E、画像全体のカラーバランスCB,ニュートラルグレー領域のカラーバランスCB)を算出し、処理を終了する(ステップS200)。なお、本実施形態では、4つの特徴量を全て特徴ベクトルとしたが、少なくとも輝度−色相関係数Fと、画像全体のカラーバランスCBと、ニュートラルグレー領域のカラーバランスCBとが特徴ベクトルに含まれていればよい。
[Feature Vector Calculation Processing (Step S200)]
Finally, the feature vector calculation unit 210 calculates a feature vector V = (luminance-color correlation coefficient F, color texture feature E, overall image color balance CB a , neutral gray color balance CB n ), and performs processing. The process ends (step S200). In the present embodiment, four feature amounts have been all feature vectors, at least luminance - hue correlation coefficient F, the whole image and color balance CB a, the color balance CB n and the feature vector of the neutral gray area It only has to be included.

図8は、本実施形態による特徴ベクトルの3次元プロットを示すグラフである。
本図に示すグラフは、輝度と赤みの相関係数Fと、画像全体のカラーバランスCBと、ニュートラルグレー領域のカラーバランスCBとをそれぞれ軸とする。プロットの凡例は5種類あり、赤色光源を照射して撮像した3つの被写体(様々な色を含む被写体、24色マクベスカラーチャート、グレーチャート)、および白色光源を照射して撮像した2つの被写体(様々な色を含む被写体、赤色の被写体(赤系物体))である。一つの凡例あたり、撮像位置を変えて10枚の画像を撮像した。図8に示すように、輝度と赤みの相関係数Fに、画像全体のカラーバランスCBとニュートラルグレー領域のカラーバランスCBとを加えることで、赤色光源のプロットと白色光源のプロットとを分離しやすくなる様子が分かる。
FIG. 8 is a graph showing a three-dimensional plot of feature vectors according to this embodiment.
The graph shown in this figure is the correlation coefficient F r brightness and redness, and color balance CB a of the entire image, and the axial and color balance CB n neutral gray area. There are five types of plot legends: three subjects imaged by irradiating a red light source (subjects including various colors, 24-color Macbeth color chart, gray chart), and two subjects imaged by irradiating a white light source ( A subject including various colors, a red subject (red object)). For each legend, ten images were taken at different imaging positions. As shown in FIG. 8, by adding the color balance CB a of the entire image and the color balance CB n of the neutral gray area to the correlation coefficient F r of luminance and red, the plot of the red light source and the plot of the white light source You can see how it becomes easier to separate.

このように、本実施形態では、特徴量算出部204が4つの特徴量(輝度−色相関係数、カラーテクスチャ特徴、画面全体カラーバランス、ニュートラルグレー領域カラーバランス)をまとめて特徴ベクトルとし、識別部115で光源種類を判定する。このため、ホワイトバランスゲイン算出部111において光源種類毎に適切なホワイトバランスを算出できるため、カラーフェリアを低減できる。   As described above, in the present embodiment, the feature amount calculation unit 204 collects four feature amounts (luminance-color correlation coefficient, color texture feature, entire screen color balance, neutral gray area color balance) as a feature vector, and an identification unit. At 115, the light source type is determined. For this reason, since the white balance gain calculation unit 111 can calculate an appropriate white balance for each type of light source, color failure can be reduced.

また、図3,4に示す各ステップを実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより、光源種類推定処理又は特徴ベクトル算出処理を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものであってもよい。
また、「コンピュータシステム」は、WWWシステムを利用している場合であれば、ホームページ提供環境(あるいは表示環境)も含むものとする。
また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、フラッシュメモリ等の書き込み可能な不揮発性メモリ、CD−ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。
Further, by recording a program for realizing each step shown in FIGS. 3 and 4 on a computer-readable recording medium, causing the computer system to read and execute the program recorded on the recording medium, the light source type An estimation process or a feature vector calculation process may be performed. Here, the “computer system” may include an OS and hardware such as peripheral devices.
Further, the “computer system” includes a homepage providing environment (or display environment) if a WWW system is used.
The “computer-readable recording medium” means a flexible disk, a magneto-optical disk, a ROM, a writable nonvolatile memory such as a flash memory, a portable medium such as a CD-ROM, a hard disk built in a computer system, etc. This is a storage device.

さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(例えばDRAM(Dynamic Random Access Memory))のように、一定時間プログラムを保持しているものも含むものとする。
また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。
また、上記プログラムは、前述した機能の一部を実現するためのものであっても良い。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であっても良い。
Further, the “computer-readable recording medium” means a volatile memory (for example, DRAM (Dynamic DRAM) in a computer system that becomes a server or a client when a program is transmitted through a network such as the Internet or a communication line such as a telephone line. Random Access Memory)), etc., which hold programs for a certain period of time.
The program may be transmitted from a computer system storing the program in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the “transmission medium” for transmitting the program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line.
The program may be for realizing a part of the functions described above. Furthermore, what can implement | achieve the function mentioned above in combination with the program already recorded on the computer system, and what is called a difference file (difference program) may be sufficient.

以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。
例えば、本実施形態では輝度−色相関原理の説明と応用方法について、赤系光源を想定して説明しているが、蛍光灯のように緑成分を多く含む光源や、屋外晴天時のように色温度が高く青成分を含む光源についても同様である。
また、本実施形態におけるホワイト調整装置1は、ハードディスクレコーダなどの電子的画像蓄積装置における画像検索や、外光に応じて画質調整を可能とする電子的映像装置等にも用いることができる。
As described above, the embodiment of the present invention has been described in detail with reference to the drawings. However, the specific configuration is not limited to the above, and various design changes and the like can be made without departing from the scope of the present invention. It is possible to
For example, in this embodiment, the explanation of the principle of luminance-color correlation and the application method are described assuming a red light source, but a light source containing a lot of green components such as a fluorescent light or an outdoor sunny day. The same applies to a light source having a high color temperature and containing a blue component.
The white adjustment device 1 according to the present embodiment can also be used for an image search in an electronic image storage device such as a hard disk recorder, an electronic video device that enables image quality adjustment according to external light, and the like.

1…ホワイトバランス調整装置 101…レンズ 102…アイリス 103…AGC部 105…前処理部 106…画像情報算出部 107…照度検出部 108…駆動部 109…光源種類推定部 110…ホワイトバランスチューニングパラメータ記憶部 111…ホワイトバランスゲイン算出部 112…ホワイトバランス制御部 113…色補正制御部 114…ガンマ補正制御部 115…出力部 202…時系列データバッファ 203…輝度むら解析部 204…特徴量算出部 205…輝度−色相関算出部 206…テクスチャ解析部 207…平均色算出部 208…ニュートラルグレー領域探索部 209…カラーバランス算出部 210…特徴ベクトル算出部 211…識別器 212…学習部 215…識別部   DESCRIPTION OF SYMBOLS 1 ... White balance adjustment apparatus 101 ... Lens 102 ... Iris 103 ... AGC part 105 ... Pre-processing part 106 ... Image information calculation part 107 ... Illuminance detection part 108 ... Drive part 109 ... Light source type estimation part 110 ... White balance tuning parameter memory | storage part DESCRIPTION OF SYMBOLS 111 ... White balance gain calculation part 112 ... White balance control part 113 ... Color correction control part 114 ... Gamma correction control part 115 ... Output part 202 ... Time series data buffer 203 ... Brightness nonuniformity analysis part 204 ... Feature-value calculation part 205 ... Luminance -Color correlation calculation unit 206 ... Texture analysis unit 207 ... Average color calculation unit 208 ... Neutral gray area search unit 209 ... Color balance calculation unit 210 ... Feature vector calculation unit 211 ... Classifier 212 ... Learning unit 215 ... Identification unit

Claims (8)

被写体を撮像する撮像素子により生成された画像信号から、輝度と色との間の相関係数を算出する輝度−色相関算出部と、
前記画像信号における画像全体のカラーバランスを算出する第1のカラーバランス算出部と、
前記画像信号において平均色が灰色の領域であるニュートラルグレー領域のカラーバランスを算出する第2のカラーバランス算出部と、
前記画像信号における色の多様性を示すカラーテクスチャ特徴を算出するテクスチャ解析部と、
前記相関係数と、前記画像全体のカラーバランスと、前記ニュートラルグレー領域のカラーバランスと、前記カラーテクスチャ特徴とに基づく特徴ベクトルを生成する特徴ベクトル生成部と、
前記特徴ベクトル生成部により生成された特徴ベクトルに基づき、前記画像信号における光源の種類を判定する識別器と、
を備えることを特徴とする光源推定装置。
A luminance-color correlation calculating unit that calculates a correlation coefficient between luminance and color from an image signal generated by an image sensor that images a subject;
A first color balance calculator that calculates the color balance of the entire image in the image signal;
A second color balance calculation unit that calculates a color balance of a neutral gray area in which the average color is a gray area in the image signal;
A texture analysis unit for calculating a color texture characteristic indicating color diversity in the image signal;
A feature vector generation unit that generates a feature vector based on the correlation coefficient, the color balance of the entire image, the color balance of the neutral gray region, and the color texture feature ;
A discriminator for determining the type of light source in the image signal based on the feature vector generated by the feature vector generation unit;
A light source estimation device comprising:
前記画像信号において輝度が一定となる輝度一定領域を特定する輝度むら解析部を備え、
輝度−色相関算出部は、前記輝度むら解析部により特定された輝度一定領域において前記相関係数を算出する
ことを特徴とする請求項に記載の光源推定装置。
A luminance unevenness analysis unit that identifies a constant luminance region in which the luminance is constant in the image signal;
Luminance - color correlation calculation unit, the light source estimating apparatus according to claim 1, characterized in that to calculate the correlation coefficient in the luminance constant region specified by the luminance unevenness analysis unit.
前記撮像素子により生成された画像信号を時系列に順次記憶する時系列データバッファを備え、
輝度−色相関算出部は、前記時系列に記憶された複数の画像信号から、前記相関係数を算出する
ことを特徴とする請求項1又は2に記載の光源推定装置。
A time series data buffer for sequentially storing the image signals generated by the image sensor in time series,
Luminance - color correlation calculation unit, the light source estimating device according to the plurality of image signals stored in the time series, to claim 1 or 2, characterized in that to calculate the correlation coefficient.
前記識別器は、
複数の画像信号の特徴ベクトルと各画像信号に対応する光源の種類とからなる学習データに基づいて、特徴ベクトルから光源の種類を導くための判定基準を学習する学習部と、
前記学習部による学習結果に基づき、前記特徴ベクトル生成部により生成された特徴ベクトルに対応する光源の種類を判定する識別部と、
を備えることを特徴とする請求項1からいずれか1項に記載の光源推定装置。
The identifier is
A learning unit that learns a criterion for deriving the type of light source from the feature vector based on learning data consisting of feature vectors of a plurality of image signals and the type of light source corresponding to each image signal;
An identification unit for determining a type of a light source corresponding to the feature vector generated by the feature vector generation unit based on a learning result by the learning unit;
The light source estimation apparatus according to any one of claims 1 to 3, further comprising:
光源推定装置の輝度−色相関算出部が、被写体を撮像する撮像素子により生成された画像信号から、輝度と色との間の相関係数を算出するステップと、
前記光源推定装置の第1のカラーバランス算出部が、前記画像信号における画像全体のカラーバランスを算出するステップと、
前記光源推定装置の第2のカラーバランス算出部が、前記画像信号において平均色が灰色の領域であるニュートラルグレー領域のカラーバランスを算出するステップと、
前記画像信号における色の多様性を示すカラーテクスチャ特徴を算出するステップと、
前記光源推定装置の特徴ベクトル生成部が、前記相関係数と、前記画像全体のカラーバランスと、前記ニュートラルグレー領域のカラーバランスと、前記カラーテクスチャ特徴とに基づく特徴ベクトルを生成するステップと、
前記光源推定装置の識別器が、前記特徴ベクトル生成部により生成された特徴ベクトルに基づき、前記画像信号における光源の種類を判定するステップと、
を有することを特徴とする光源推定方法。
A luminance-color correlation calculation unit of the light source estimation device calculating a correlation coefficient between luminance and color from an image signal generated by an image sensor that images a subject;
A first color balance calculation unit of the light source estimation device calculating a color balance of the entire image in the image signal;
A second color balance calculating unit of the light source estimating device calculating a color balance of a neutral gray area in which the average color is a gray area in the image signal;
Calculating a color texture feature indicative of color diversity in the image signal;
A feature vector generation unit of the light source estimation device generates a feature vector based on the correlation coefficient, the color balance of the entire image, the color balance of the neutral gray region, and the color texture feature ;
A discriminator of the light source estimation device determining the type of light source in the image signal based on the feature vector generated by the feature vector generation unit;
A light source estimation method comprising:
前記光源推定装置の輝度むら解析部が、前記画像信号において輝度が一定となる輝度一定領域を特定するステップを有し、
輝度−色相関算出部は、前記輝度むら解析部により特定された輝度一定領域において前記相関係数を算出する
ことを特徴とする請求項に記載の光源推定方法。
The luminance unevenness analysis unit of the light source estimation device includes a step of specifying a constant luminance region where the luminance is constant in the image signal,
The light source estimation method according to claim 5 , wherein the luminance-color correlation calculation unit calculates the correlation coefficient in a constant luminance region specified by the luminance unevenness analysis unit.
前記光源推定装置は、前記撮像素子により生成された画像信号を時系列に順次記憶する時系列データバッファを備え、
輝度−色相関算出部は、前記時系列に記憶された複数の画像信号から、前記相関係数を算出する
ことを特徴とする請求項5又は6に記載の光源推定方法。
The light source estimation device includes a time-series data buffer that sequentially stores the image signals generated by the imaging device in time series,
The light source estimation method according to claim 5 , wherein the luminance-color correlation calculation unit calculates the correlation coefficient from the plurality of image signals stored in the time series.
前記識別器は、
前記識別器の学習部が、複数の画像信号と各画像信号に対応する光源の種類とからなる学習データに基づいて、特徴ベクトルから光源の種類を導くための判定基準を学習するステップと、
前記識別器の識別部が、前記学習部による学習結果に基づき、前記特徴ベクトル生成部により生成された特徴ベクトルに対応する光源の種類を判定するステップと、
を有することを特徴とする請求項からいずれか1項に記載の光源推定方法。
The identifier is
The learning unit of the classifier learns a determination criterion for deriving a light source type from a feature vector based on learning data composed of a plurality of image signals and a light source type corresponding to each image signal;
A step of determining a type of light source corresponding to the feature vector generated by the feature vector generation unit based on a learning result by the learning unit;
Light source estimation method according to claims 5 7 any one characterized in that it comprises a.
JP2010283123A 2010-12-20 2010-12-20 Light source estimation apparatus and light source estimation method Active JP5740147B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2010283123A JP5740147B2 (en) 2010-12-20 2010-12-20 Light source estimation apparatus and light source estimation method
KR1020110105534A KR101695246B1 (en) 2010-12-20 2011-10-14 Device for estimating light source and method thereof
US13/331,719 US8503771B2 (en) 2010-12-20 2011-12-20 Method and apparatus for estimating light source
CN201110441913.3A CN102572211B (en) 2010-12-20 2011-12-20 Estimate the method and apparatus of light source

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010283123A JP5740147B2 (en) 2010-12-20 2010-12-20 Light source estimation apparatus and light source estimation method

Publications (2)

Publication Number Publication Date
JP2012134625A JP2012134625A (en) 2012-07-12
JP5740147B2 true JP5740147B2 (en) 2015-06-24

Family

ID=46649733

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010283123A Active JP5740147B2 (en) 2010-12-20 2010-12-20 Light source estimation apparatus and light source estimation method

Country Status (2)

Country Link
JP (1) JP5740147B2 (en)
KR (1) KR101695246B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10244218B2 (en) 2016-04-07 2019-03-26 Fuji Xerox Co., Ltd. Image processing apparatus, image processing system, image processing method, and non-transitory computer readable medium

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170053744A (en) 2012-09-28 2017-05-16 엔제루 프레잉구 카도 가부시키가이샤 Card shooter device and method
WO2017043811A1 (en) * 2015-09-09 2017-03-16 삼성전자 주식회사 Image processing apparatus and image processing method
JP6563751B2 (en) 2015-09-09 2019-08-21 三星電子株式会社Samsung Electronics Co.,Ltd. Image processing apparatus and image processing method
CN106028016A (en) * 2016-06-20 2016-10-12 联想(北京)有限公司 Information processing method and electronic device
KR102570607B1 (en) * 2018-06-22 2023-08-25 삼성전자주식회사 Electronic device and method for determining type of light source of images

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006129442A (en) * 2004-09-30 2006-05-18 Fuji Photo Film Co Ltd Image correction apparatus, method and program
JP4707450B2 (en) * 2005-05-18 2011-06-22 イーストマン コダック カンパニー Image processing apparatus and white balance adjustment apparatus
JP5116389B2 (en) * 2007-07-25 2013-01-09 キヤノン株式会社 Imaging apparatus and control method
JP5166859B2 (en) * 2007-12-28 2013-03-21 キヤノン株式会社 White balance control device, imaging device using the same, and white balance control method
JP2010021651A (en) * 2008-07-08 2010-01-28 Nikon Corp Environmental light estimation apparatus, digital camera, and environmental light estimation program
WO2010132237A1 (en) * 2009-05-11 2010-11-18 Dolby Laboratories Licensing Corporation Light detection, color appearance models, and modifying dynamic range for image display

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10244218B2 (en) 2016-04-07 2019-03-26 Fuji Xerox Co., Ltd. Image processing apparatus, image processing system, image processing method, and non-transitory computer readable medium

Also Published As

Publication number Publication date
KR101695246B1 (en) 2017-01-11
KR20120069539A (en) 2012-06-28
JP2012134625A (en) 2012-07-12

Similar Documents

Publication Publication Date Title
US8503771B2 (en) Method and apparatus for estimating light source
US10812733B2 (en) Control method, control device, mobile terminal, and computer-readable storage medium
US9710715B2 (en) Image processing system, image processing device, and image processing method
JP5740147B2 (en) Light source estimation apparatus and light source estimation method
US9460521B2 (en) Digital image analysis
JP6553624B2 (en) Measurement equipment and system
EP1583371A1 (en) Light source estimating device, light source estimating method, and imaging device and image processing method
US11503262B2 (en) Image processing method and device for auto white balance
JP5781372B2 (en) Image processing apparatus and imaging apparatus
JP2021180527A (en) Image processing device
US10721448B2 (en) Method and apparatus for adaptive exposure bracketing, segmentation and scene organization
US8026954B2 (en) System and computer-readable medium for automatic white balancing
WO2020027210A1 (en) Image processing device, image processing method, and image processing program
JP2007312206A (en) Imaging apparatus and image reproducing apparatus
WO2022067761A1 (en) Image processing method and apparatus, capturing device, movable platform, and computer readable storage medium
JP6565513B2 (en) Color correction device, color correction method, and computer program for color correction
JP2021093694A (en) Information processing apparatus and method for controlling the same
Jo et al. Adaptive white point extraction based on dark channel prior for automatic white balance
JP6188360B2 (en) Image processing apparatus, control method thereof, control program, and discrimination apparatus
KR20220118339A (en) Method for determining a tooth colour
CN117615262A (en) Image signal processing method and image signal processing device
McGhie Colour consistency in computer vision: a multiple image dynamic exposure colour classification system: a thesis presented to the Institute of Natural and Mathematical Sciences in fulfilment of the requirements for the degree of Master of Science in Computer Science at Massey University, Albany, Auckland, New Zealand
CN115963087A (en) Method and system for measuring atmospheric visibility
MCGHIE A Multiple Image Dynamic Exposure Colour Classification System
JP5814555B2 (en) Image processing apparatus and image processing apparatus control method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131004

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140911

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140922

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141212

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150330

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150427

R150 Certificate of patent or registration of utility model

Ref document number: 5740147

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350