JP2008219838A - Imaging apparatus, white balance control device and white balance control method - Google Patents

Imaging apparatus, white balance control device and white balance control method Download PDF

Info

Publication number
JP2008219838A
JP2008219838A JP2007058205A JP2007058205A JP2008219838A JP 2008219838 A JP2008219838 A JP 2008219838A JP 2007058205 A JP2007058205 A JP 2007058205A JP 2007058205 A JP2007058205 A JP 2007058205A JP 2008219838 A JP2008219838 A JP 2008219838A
Authority
JP
Japan
Prior art keywords
light source
different light
white
white balance
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.)
Pending
Application number
JP2007058205A
Other languages
Japanese (ja)
Inventor
Eisuke Shibata
英輔 柴田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2007058205A priority Critical patent/JP2008219838A/en
Publication of JP2008219838A publication Critical patent/JP2008219838A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus capable of appropriately controlling white balance by detecting white data suitable for each area corresponding to lightness of a light source even under a mix light source and calculating, for each input image, a suitable white balance gain corresponding to each image in each area corresponding to the lightness of the light source. <P>SOLUTION: This imaging apparatus 1000 comprises: a different light source separating section 7 for separating an image signal into a plurality of different light source areas corresponding to lightness of a light source based on a contrast value of the image signal; a different light source area white data detecting section for detecting white data for each of different light source areas; a white balance gain calculating section for calculating a white balance gain on the basis of white data for each of the different light source areas; and a white balance control section 5 for performing white balance control based on the white balance gain. The different light source area white data detecting section and the white balance gain calculating section are provided within a white detection section 100 by areas. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、画像に対してホワイトバランスの調整を行う撮像装置、ホワイトバランス調整装置およびホワイトバランス調整方法に関する。撮像装置は、主にデジタルスチルカメラやデジタルビデオカメラ等に代表される。   The present invention relates to an imaging apparatus, a white balance adjustment apparatus, and a white balance adjustment method that perform white balance adjustment on an image. Imaging devices are mainly represented by digital still cameras, digital video cameras, and the like.

近年、デジタルスチルカメラやデジタルビデオカメラ等の撮像装置は、自動ホワイトバランス調整機能(AWB:Auto White Balance)を有しており、撮影時にホワイトバランスを自動的に調整して撮影することができる。この自動ホワイトバランス調整機能は、撮影時の光源による色味の違いを自動的に補正する機能をいう。具体的には、自動ホワイトバランス調整機能は、撮像している被写体の画像信号から、撮影時の光源下における無彩色の映像信号(白エリア部分)を白データとして検出し、無彩色の被写体が画像上で無彩色になるように、3原色画像信号RGBの各データの大きさを等しく揃える制御を行う機能をいう。このように、この自動ホワイトバランス調整機能を用いることにより、いろいろな光源の色温度や明るさに応じてホワイトバランスの調整を行える。   In recent years, an imaging apparatus such as a digital still camera or a digital video camera has an automatic white balance adjustment function (AWB: Auto White Balance), and can automatically adjust the white balance during shooting. The automatic white balance adjustment function is a function for automatically correcting a difference in color depending on a light source at the time of shooting. Specifically, the automatic white balance adjustment function detects the achromatic video signal (white area) under the light source at the time of shooting as white data from the image signal of the subject being imaged, and the achromatic subject is detected. This is a function for performing control to equalize the sizes of the three primary color image signals RGB so that they become achromatic on the image. Thus, by using this automatic white balance adjustment function, white balance can be adjusted according to the color temperature and brightness of various light sources.

ここで、画像から白データを検出する一般的な技術として、無彩色被写体が集まる領域を白判定エリアとして色空間上に定義し、画面毎に白判定エリア内に入った画像信号を白データとして検出する技術が、知られている。ところが、この一般的な技術のように、画面に対して1つの白判定エリアを一律に設定して白データの検出を行う場合、異なる色温度の光源によって照らされた映像領域が画面中に存在する撮像条件(この撮像条件をミックス光源という)の下では、ホワイトバランスの調整が正確に行われない場合があった。   Here, as a general technique for detecting white data from an image, an area where achromatic objects gather is defined as a white determination area on the color space, and an image signal that falls within the white determination area for each screen is used as white data. Techniques for detecting are known. However, when white data is detected by uniformly setting one white determination area on the screen as in this general technique, there are image areas illuminated by light sources having different color temperatures in the screen. Under certain imaging conditions (this imaging condition is referred to as a mix light source), white balance adjustment may not be performed accurately.

この問題を解決するために、例えば特許文献1に記載のホワイトバランス調整技術が提案されている。ホワイトバランスの調整は、撮像素子から得られた映像信号にホワイトバランスゲインを乗算することによって行われる。このホワイトバランスゲインの算出が、特許文献1に記載のホワイトバランス調整技術では、次のように行われている。すなわち、このホワイトバランス調整技術では、色座標上に設定された色温度別の複数の白判定エリアに基づいて、画像から得られる色信号が複数の白判定エリアのいずれに含まれるか判定され、白判定エリア毎に白データが加算されることにより、色信号毎のホワイトバランス制御値が算出される。また、色信号毎のホワイトバランス制御値の算出と同時に、白判定エリアに入った色信号数が白判定エリア毎にカウントされる。   In order to solve this problem, for example, a white balance adjustment technique described in Patent Document 1 has been proposed. The white balance is adjusted by multiplying the video signal obtained from the image sensor by the white balance gain. The white balance gain is calculated as follows in the white balance adjustment technique described in Patent Document 1. That is, in this white balance adjustment technique, based on a plurality of white determination areas for each color temperature set on the color coordinates, it is determined which of the plurality of white determination areas the color signal obtained from the image is included in, By adding white data for each white determination area, a white balance control value for each color signal is calculated. Simultaneously with the calculation of the white balance control value for each color signal, the number of color signals that have entered the white determination area is counted for each white determination area.

そして、複数の白判定エリア毎の白判定のカウント値に基づいて、色温度毎のホワイトバランス制御値の混合比がそれぞれ決定され、混合比に応じて色温度毎のホワイトバランス制御値が混合加算されて、ホワイトバランスゲインが算出される。これにより、ミックス光源などの撮像画像においても、画面中に色温度が異なる光源の占める割合を判別し、色温度別の混合比に基づいたホワイトバランスゲインを求めることができる。
特開2002−135802号公報
A mixing ratio of white balance control values for each color temperature is determined based on the white determination count value for each of the plurality of white determination areas, and the white balance control value for each color temperature is mixed and added according to the mixing ratio. Thus, the white balance gain is calculated. As a result, even in a captured image such as a mixed light source, it is possible to determine the proportion of light sources having different color temperatures in the screen, and obtain a white balance gain based on the mixing ratio for each color temperature.
JP 2002-135802 A

しかしながら、特許文献1に記載のホワイトバランス調整技術では、色温度別の混合比に基づいてホワイトバランスゲインを求めることができるものの、例えば日向および日陰が混在するミックス光源下において、撮影者が日陰側を主として撮影している場合に、日向側で白が多く検出されると、主な被写体である日陰側でホワイトバランスが合わないという問題があった。また、逆に、撮影者が日向側を主として撮影している場合に、日陰側で白が多く検出されると、主な被写体である日向側でホワイトバランスが合わないという問題があった。   However, with the white balance adjustment technique described in Patent Document 1, although the white balance gain can be obtained based on the mixing ratio for each color temperature, for example, the photographer is on the shade side under a mixed light source in which the sun and shade are mixed. When a large amount of white is detected on the sunny side, there is a problem that the white balance does not match on the shade side, which is the main subject. On the other hand, when the photographer mainly shoots on the sunshine side, if a lot of white is detected on the shade side, there is a problem that the white balance is not matched on the sunshine side as the main subject.

また、特許文献1に記載のホワイトバランス調整技術では、いずれかの白判定エリアで白色の誤検出が発生した場合に、意図しない色温度方向にホワイトバランスが収束することがあるという問題があった。例えば、高色温度の光源下における肌色は、低色温度の光源下における白色と誤検出しやすく、このことがホワイトバランスゲインに影響を与えてしまっていた。また、例えば、夕刻の空などの淡い青色は、高色温度の光源下における白と誤検出されやすい。   In addition, the white balance adjustment technique described in Patent Document 1 has a problem that white balance may converge in an unintended color temperature direction when white detection error occurs in any of the white determination areas. . For example, a flesh color under a light source with a high color temperature is likely to be erroneously detected as white under a light source with a low color temperature, which has affected white balance gain. In addition, for example, a light blue color such as an evening sky is likely to be erroneously detected as white under a high color temperature light source.

本発明は、上記従来の問題を解決するためになされたもので、ミックス光源下であっても、光源の明るさに応じた異光源領域の各々に適した白データの検出を行い、各異光源領域中の画像に対応した適切なホワイトバランスゲインを入力画像毎に算出でき、適切なホワイトバランスの調整を行うことができる撮像装置を提供することを目的とする。   The present invention has been made to solve the above-described conventional problems. Even under a mixed light source, the present invention detects white data suitable for each of the different light source regions according to the brightness of the light source. An object of the present invention is to provide an imaging device capable of calculating an appropriate white balance gain corresponding to an image in a light source region for each input image and adjusting an appropriate white balance.

本発明に係る撮像装置は、撮像された画像に対してホワイトバランスの調整を行う撮像装置であって、画像信号のコントラスト値に基づいて、前記画像信号を光源の明るさに応じた複数の異光源領域に分離する異光源分離部と、前記異光源分離部により分離された前記異光源領域毎に、前記画像中の白エリア部分を白データとして検出する白データ検出部と、前記白データ検出部により検出された異光源領域毎の白データに基づいて、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出するホワイトバランスゲイン算出部と、前記ホワイトバランスゲイン算出部により算出される前記ホワイトバランスゲインに基づいて、前記画像に対してホワイトバランスの調整を行うホワイトバランス調整部とを備えた構成を有している。   An image pickup apparatus according to the present invention is an image pickup apparatus that performs white balance adjustment on a picked-up image, and based on a contrast value of the image signal, the image signal is converted into a plurality of differences according to the brightness of a light source. A different light source separation unit that separates light source regions, a white data detection unit that detects a white area portion in the image as white data for each different light source region separated by the different light source separation unit, and the white data detection A white balance gain calculating unit that calculates a white balance gain for adjusting white balance based on white data for each different light source region detected by the unit, and the white balance calculated by the white balance gain calculating unit. And a white balance adjustment unit configured to adjust a white balance for the image based on the gain.

この構成により、光源の明るさに応じた複数の異光源領域に画像信号を分離した上で、異光源領域毎に白データを検出するので、日向および日陰が混在するミックス光源下であっても、光源の明るさに応じた異光源領域の各々に適した白データの検出を行い、各異光源領域中の画像に対応した適切なホワイトバランスゲインを入力画像毎に算出でき、適切なホワイトバランスの調整を行うことができる。すなわち、ミックス光源下において、光源の異なる領域を異光源領域として分離することで、異光源領域毎に被写体中の白エリア部分を白データとして検出するので、撮像シーンと被写体に応じて、白データを検出するための白判定エリアを絞り込むことが可能となり、白の誤検出と誤検出によるホワイトバランスのずれを低減することができる。   With this configuration, the image signal is separated into a plurality of different light source regions according to the brightness of the light source, and white data is detected for each different light source region, so even under a mixed light source where the sun and shade are mixed Detects white data suitable for each of the different light source regions according to the brightness of the light source, and calculates an appropriate white balance gain corresponding to the image in each different light source region for each input image. Adjustments can be made. That is, by separating the different light source areas as different light source areas under the mixed light source, the white area portion in the subject is detected as white data for each different light source area. It is possible to narrow down the white determination area for detecting white, and it is possible to reduce white balance misalignment due to erroneous white detection.

また、本発明に係る撮像装置において、前記ホワイトバランスゲイン算出部が、前記異光源領域毎の白データを、前記異光源領域の各面積比に応じて合成することにより、前記ホワイトバランスゲインを算出する構成を有している。   In the imaging apparatus according to the present invention, the white balance gain calculation unit calculates the white balance gain by combining the white data for each different light source region according to each area ratio of the different light source region. It has the composition to do.

この構成により、光源の明るさに応じた各領域の白データを、光源の明るさに応じた領域の面積に対応して合成することができ、より適切なホワイトバランスゲインを算出できる。すなわち、光源の明るさに応じた各領域の画面占有率に応じて、主要被写体に重点を置いてホワイトバランスの調整を行うことができる。例えば、主要被写体がどの異光源領域にあるかによって、データの重み付けを行え、ミックス光源下で異なる異光源領域がどのような比率で存在したとしても、主要被写体に対して重点的にホワイトバランスを合わせることができる。   With this configuration, the white data of each region corresponding to the brightness of the light source can be synthesized corresponding to the area of the region corresponding to the brightness of the light source, and a more appropriate white balance gain can be calculated. That is, it is possible to adjust the white balance with emphasis on the main subject according to the screen occupancy ratio of each area corresponding to the brightness of the light source. For example, data weighting can be performed depending on which different light source area the main subject is in, and white balance is focused on the main subject regardless of the ratio of different different light source areas under the mixed light source. Can be matched.

また、本発明に係る撮像装置において、前記異光源分離部が、前記画像を分割した複数のブロック毎の輝度に基づいて、各ブロックと隣接するブロックとの間のコントラスト値を算出するコントラスト算出部と、前記コントラスト算出部で算出されたコントラスト値と、所定のコントラスト閾値とを比較することにより、前記異光源領域の境界部を検出する境界部検出部と、前記境界部検出部により検出される前記異光源領域の境界部の情報に基づいて、前記画像信号を前記異光源領域に分離する画像信号分離部とを備えた構成を有している。   Further, in the imaging device according to the present invention, the different light source separation unit calculates a contrast value between each block and an adjacent block based on the luminance for each of the plurality of blocks obtained by dividing the image. And a contrast value calculated by the contrast calculation unit and a predetermined contrast threshold value to detect a boundary part of the different light source region and detected by the boundary part detection unit And an image signal separation unit that separates the image signal into the different light source regions based on information on a boundary portion of the different light source regions.

この構成により、日向と日陰のミックス光源下においても、各ブロック間のコントラスト値から異光源領域の境界部を容易に検出することができ、当該異光源領域の境界部の情報に基づき、画像信号を異光源領域に分離できる。また、境界部検出部により検出された異光源領域の境界部の情報に基づいて、画像信号を異光源領域に分離する判断基準を定めることができるので、画像信号を異光源領域に分離するための画面分轄パターンを複数用意することなく、画像信号を複数の異光源領域に容易に分離できる。   This configuration makes it possible to easily detect the boundary between different light source regions from the contrast value between each block even under a mixed light source of sun and shade, and based on the information of the boundary of the different light source region, the image signal Can be separated into different light source regions. Further, since it is possible to set a criterion for separating the image signal into the different light source regions based on the information on the boundary portion of the different light source region detected by the boundary detection unit, the image signal is separated into the different light source regions. The image signal can be easily separated into a plurality of different light source regions without preparing a plurality of screen division patterns.

また、本発明に係る撮像装置は、コントラスト算出部が、前記ブロック分割測光部により測光された各ブロックの輝度と、前記各ブロックに隣接する全てのブロックの輝度との差分値を算出し、算出された前記差分値の最大差分値に基づいて、互いに隣接するブロックとの間のコントラスト値を算出する構成を有する。   In the imaging apparatus according to the present invention, the contrast calculation unit calculates a difference value between the luminance of each block measured by the block division photometry unit and the luminance of all the blocks adjacent to the block. The contrast value between adjacent blocks is calculated based on the maximum difference value of the difference values.

この構成により、輝度変化の大きいブロックが隣接するブロックに存在するかを適切に判断でき、異光源領域の境界部を検出するためのコントラスト値を適切に算出できる。   With this configuration, it is possible to appropriately determine whether a block having a large luminance change is present in an adjacent block, and it is possible to appropriately calculate a contrast value for detecting a boundary portion of a different light source region.

また、本発明に係る撮像装置において、前記画像信号分離部は、前記異光源領域の境界部におけるブロックの平均輝度値の代表値に基づいて、前記画像信号を前記異光源領域に分離する構成を有する。   Further, in the imaging apparatus according to the present invention, the image signal separation unit is configured to separate the image signal into the different light source regions based on a representative value of an average luminance value of a block at a boundary portion of the different light source regions. Have.

この構成により、異光源領域の境界部におけるブロックの平均輝度値の代表値に基づいて、画像信号を複数の異光源領域に分離する判断基準が明確に定められる。一義的に決定された閾値で判別する方式と異なり、代表値という実際の値を用いることで、輝度の変化量(コントラスト値)にのみ基づいた判定が可能となり、境界部を正確に判別できる。   With this configuration, a criterion for separating an image signal into a plurality of different light source regions is clearly determined based on the representative value of the average luminance value of the block at the boundary between the different light source regions. Unlike the method of discriminating with a uniquely determined threshold value, by using an actual value called a representative value, it becomes possible to make a determination based only on the amount of change in brightness (contrast value), and the boundary portion can be discriminated accurately.

また、本発明に係る撮像装置において、前記画像信号分離部は、前記異光源領域の境界部におけるブロックの平均輝度値の最小値に基づいて、前記画像信号を前記異光源領域に分離する構成を有する。   Further, in the imaging apparatus according to the present invention, the image signal separation unit is configured to separate the image signal into the different light source regions based on a minimum value of an average luminance value of a block at a boundary portion of the different light source regions. Have.

この構成により、異光源領域の境界部におけるブロックの平均輝度値の最小値に基づいて、画像信号を複数の異光源領域に分離する判断基準がより明確に定められるので、画像信号を複数の異光源領域に正確に分離できる。   With this configuration, the determination criterion for separating the image signal into a plurality of different light source regions can be more clearly determined based on the minimum value of the average luminance value of the block at the boundary between the different light source regions. It can be accurately separated into the light source region.

本発明に係る撮像装置において、前記境界部検出部が、前記所定のコントラスト閾値を、同一フレーム内のコントラスト値の大きさに基づいて変化させる構成を有している。   In the imaging apparatus according to the present invention, the boundary detection unit has a configuration that changes the predetermined contrast threshold based on a contrast value in the same frame.

この構成により、露光状態に関係なく、撮像シーンが変わった時などにも、自動的に、かつ、柔軟に、異光源領域の境界部を安定して検出することができる。   With this configuration, it is possible to detect the boundary portion of the different light source region stably and automatically and flexibly even when the imaging scene changes regardless of the exposure state.

また、本発明に係る撮像装置において、前記境界部検出部が、前記所定のコントラスト閾値を、同一フレーム内のコントラスト値の大きさに基づいて設定する際に、前記所定のコントラスト閾値には下限値が設けられている。   In the imaging apparatus according to the present invention, when the boundary detection unit sets the predetermined contrast threshold based on a contrast value in the same frame, a lower limit value is set for the predetermined contrast threshold. Is provided.

この構成により、変化幅の小さい輝度変化を除外して、異なる光源により発生したコントラスト値に基づいて、異光源領域の境界部を検出することができる。   With this configuration, it is possible to detect a boundary portion of a different light source region based on a contrast value generated by a different light source by excluding a luminance change having a small change width.

また、本発明に係る撮像装置において、前記境界部検出部が、前記画像の明るさに基づいて、前記コントラスト閾値の下限値を設定する構成を有している。   In the imaging device according to the present invention, the boundary detection unit sets a lower limit value of the contrast threshold based on the brightness of the image.

この構成により、被写体画像の明るさに基づいて、異光源領域の境界部の検出の敏感度を制御できる。例えば、照度の低い屋内撮影条件下では、ミックス光源が存在する可能性が少ないので、コントラスト閾値の下限値を上げることで、画像信号を異光源領域に分離しないようにすることもできる。   With this configuration, it is possible to control the sensitivity of detection of the boundary portion of the different light source region based on the brightness of the subject image. For example, under indoor shooting conditions with low illuminance, there is little possibility of a mixed light source, so the image signal can be prevented from being separated into different light source regions by increasing the lower limit of the contrast threshold.

また、本発明に係る撮像装置において、前記異光源分離部が複数の異光源領域に分離できない場合、前記白データ検出部が、前記画像全体中の白エリア部分を白データとして検出する構成を有している。   Further, in the imaging device according to the present invention, when the different light source separation unit cannot be separated into a plurality of different light source regions, the white data detection unit detects a white area portion in the entire image as white data. is doing.

この構成により、例えば単一光源下のように、異光源分離部が複数の異光源領域に分離できない場合にであっても、白エリア部分を白データとして検出することができる。   With this configuration, even when the different light source separation unit cannot be separated into a plurality of different light source regions, for example, under a single light source, the white area portion can be detected as white data.

本発明に係るホワイトバランス調整装置は、画像に対してホワイトバランスの調整を行うホワイトバランス調整装置であって、画像信号のコントラストに基づいて、前記画像信号を光源の明るさに応じた複数の異光源領域に分離する異光源分離部と、前記異光源分離部により分離された前記異光源領域毎に、前記画像中の白エリア部分を白データとして検出する白データ検出部と、前記白データ検出部により検出された異光源領域毎の白データに基づいて、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出するホワイトバランスゲイン算出部と、前記ホワイトバランスゲイン算出部により算出される前記ホワイトバランスゲインに基づいて、前記画像に対してホワイトバランスの調整を行うホワイトバランス調整部とを備えた構成を有している。   A white balance adjustment device according to the present invention is a white balance adjustment device that performs white balance adjustment on an image, and based on the contrast of the image signal, the image signal is converted into a plurality of differences according to the brightness of the light source. A different light source separation unit that separates light source regions, a white data detection unit that detects a white area portion in the image as white data for each different light source region separated by the different light source separation unit, and the white data detection A white balance gain calculating unit that calculates a white balance gain for adjusting white balance based on white data for each different light source region detected by the unit, and the white balance calculated by the white balance gain calculating unit. A white balance adjustment unit that adjusts the white balance of the image based on the gain. Has a configuration was.

この構成は、撮像装置のホワイトバランス調整技術に限定されない。すなわち、ホワイトバランス調整装置は、撮像装置に設けられても、設けられなくてもよい。そして、本発明のホワイトバランス調整処理が、撮像装置で撮像された画像だけでなく、一般的な画像に対しても施されてもよい。この構成によっても。上述した本発明の利点が得られる。   This configuration is not limited to the white balance adjustment technique of the imaging apparatus. That is, the white balance adjustment device may or may not be provided in the imaging device. And the white balance adjustment process of this invention may be performed not only on the image imaged with the imaging device but on a general image. Even with this configuration. The advantages of the present invention described above can be obtained.

本発明に係るホワイトバランス調整方法は、画像に対してホワイトバランスの調整を行うホワイトバランス調整方法であって、画像信号のコントラストに基づいて、前記画像信号を光源の明るさに応じた複数の異光源領域に分離するステップと、前記複数の異光源領域に分離するステップにより分離された前記異光源領域毎に、前記画像中の白エリア部分を白データとして検出するステップと、前記白データを検出するステップにより検出された異光源領域毎の白データに基づいて、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出するステップと、前記ホワイトバランスゲインを算出するステップにより算出される前記ホワイトバランスゲインに基づいて、前記画像に対してホワイトバランスの調整を行うステップとを含んでいる。   A white balance adjustment method according to the present invention is a white balance adjustment method for adjusting white balance on an image, and based on the contrast of the image signal, the image signal is converted into a plurality of differences according to the brightness of the light source. A step of separating the light source region, a step of detecting a white area portion in the image as white data for each of the different light source regions separated by the step of separating the plurality of different light source regions, and detecting the white data Calculating the white balance gain for adjusting the white balance based on the white data for each different light source region detected by the step of calculating the white balance gain, and calculating the white balance gain And adjusting the white balance of the image based on And Nde.

このホワイトバランス調整方法の適用対象も、撮像装置に限定されない。このホワイトバランス調整方法によっても、上述した本発明の利点が得られる。   The application target of this white balance adjustment method is not limited to the imaging apparatus. The above-described advantages of the present invention can also be obtained by this white balance adjustment method.

本発明は、光源の明るさに応じた複数の異光源領域に画像信号を分離した上で、異光源領域毎に白データを検出するので、ミックス光源下であっても、光源の明るさに応じた領域の各々に適した白データの検出を行い、光源の明るさに応じた各領域の各画像に対応した適切なホワイトバランスゲインを入力画像毎に算出でき、適切なホワイトバランスの調整を行うことができるという効果を有する撮像装置を提供することができるものである。   In the present invention, the image signal is separated into a plurality of different light source areas corresponding to the brightness of the light source, and the white data is detected for each different light source area. Appropriate white balance can be calculated for each input image by detecting white data suitable for each of the corresponding areas and calculating the appropriate white balance gain corresponding to each image in each area according to the brightness of the light source. An imaging device having an effect that it can be performed can be provided.

(第1の実施の形態)
以下、本発明の第1の実施の形態に係る撮像装置について、図面を用いて説明する。本発明の実施の形態における撮像装置を図1に示す。図1に示されるように、本発明の第1の実施の形態に係る撮像装置1000は、レンズ1と、撮像素子2と、AGC(Auto Gain Control)部3と、A/D変換部4と、ホワイトバランス調整部5と、画面分割測色部6と、異光源領域分離部7と、測光部8と、制御部9と、画像処理部10と、領域別白検出部100とを備えている。また、画面分割測色部6、異光源領域分離部7、測光部8、制御部9、画像処理部10および領域別白検出部100により、ホワイトバランスゲイン生成部200が構成されている。
(First embodiment)
Hereinafter, an imaging apparatus according to a first embodiment of the present invention will be described with reference to the drawings. An imaging apparatus according to an embodiment of the present invention is shown in FIG. As shown in FIG. 1, the imaging apparatus 1000 according to the first embodiment of the present invention includes a lens 1, an imaging element 2, an AGC (Auto Gain Control) unit 3, an A / D conversion unit 4, and the like. A white balance adjustment unit 5, a screen division colorimetry unit 6, a different light source region separation unit 7, a photometry unit 8, a control unit 9, an image processing unit 10, and a region-specific white detection unit 100. Yes. Further, the screen division colorimetry unit 6, the different light source region separation unit 7, the photometry unit 8, the control unit 9, the image processing unit 10, and the area-specific white detection unit 100 constitute a white balance gain generation unit 200.

レンズ1は、被写体からの光を撮像素子2に結像するものである。撮像素子2は、レンズ1により結像した像を光電変換することにより、撮像された画像から画像信号を生成する。また、撮像素子2は電子シャッター(不図示)を備えており、この電子シャッターは制御部9の制御により画像全体の明るさを電子的に制御する。AGC部3は、撮像素子2に入射する光量の制御情報や画像全体の明るさに応じて、A/D変換部4への出力を一定に利得制御する。A/D変換部4は、撮像素子3から得られるアナログ信号をデジタル信号に変換する。   The lens 1 focuses light from the subject on the image sensor 2. The imaging element 2 generates an image signal from the captured image by photoelectrically converting the image formed by the lens 1. In addition, the image sensor 2 includes an electronic shutter (not shown), and the electronic shutter electronically controls the brightness of the entire image under the control of the control unit 9. The AGC unit 3 controls the gain of the output to the A / D conversion unit 4 at a constant according to the control information of the amount of light incident on the image sensor 2 and the brightness of the entire image. The A / D converter 4 converts an analog signal obtained from the image sensor 3 into a digital signal.

ホワイトバランス調整部5は、ホワイトバランスゲイン生成部200により生成されるホワイトバランスゲインに基づいて、画像に対してホワイトバランスの調整を行う。画面分割測色部6は、撮像した画像信号を複数のブロックに分割して、各ブロックの3原色画像信号であるR信号、G信号、B信号それぞれの平均値を順次算出して、これをRGBブロック平均値S1として、領域別白検出部100へ出力する。   The white balance adjustment unit 5 adjusts the white balance of the image based on the white balance gain generated by the white balance gain generation unit 200. The screen division colorimetry unit 6 divides the captured image signal into a plurality of blocks, sequentially calculates the average values of the R, G, and B signals that are the three primary color image signals of each block, The RGB block average value S1 is output to the area-specific white detection unit 100.

異光源領域分離部7は、画像信号のコントラスト値に基づいて、画像信号を光源の明るさに応じた異光源領域に分離する。具体的には、異光源領域分離部7は、まず、撮影した画像信号を複数のブロックに分割して、分割後のブロック毎の画像信号を複数の異光源領域に分離する。ここでは、異光源領域が、明るい光源によって照らされている領域(明光源領域)と、暗い光源によって照らされている領域(暗光源領域)であるとする。このとき、異光源領域分離部7は、分割後の各ブロックの画像信号を、明光源領域および暗光源領域に分離する。異光源領域分離部7は、画像信号を複数の異光源領域に分離した後、分割後の各ブロックの画像信号がどの異光源領域に属するかの判定結果と各ブロックの座標とが関連付けられた信号である異光源領域判別信号S2を、領域別白検出部100へ出力する。なお、図2に示されるように、異光源分離部7は、ブロック分割部7aと、ブロック輝度測定部7bと、コントラスト算出部7cと、境界部検出部7dと、画像信号分離部7eとを備えている。これらの機能および動作についての詳細な説明については、後述の動作説明と共に説明する。   The different light source region separation unit 7 separates the image signal into different light source regions according to the brightness of the light source based on the contrast value of the image signal. Specifically, the different light source region separation unit 7 first divides the captured image signal into a plurality of blocks, and separates the image signal for each divided block into a plurality of different light source regions. Here, it is assumed that the different light source regions are a region illuminated by a bright light source (bright light source region) and a region illuminated by a dark light source (dark light source region). At this time, the different light source region separation unit 7 separates the image signal of each divided block into a bright light source region and a dark light source region. The different light source region separation unit 7 separates the image signal into a plurality of different light source regions, and then associates the determination result as to which different light source region the image signal of each divided block belongs to and the coordinates of each block. The different light source region determination signal S2 as a signal is output to the region-specific white detection unit 100. As shown in FIG. 2, the different light source separation unit 7 includes a block division unit 7a, a block luminance measurement unit 7b, a contrast calculation unit 7c, a boundary detection unit 7d, and an image signal separation unit 7e. I have. A detailed description of these functions and operations will be described together with a description of operations described later.

測光部8は、撮像された画像全体の明るさを測定する。この画像全体の明るさは、例えばAGC部3が利得制御を行うのに用いられる。また、制御部9は、測光部8で得られた画像全体の輝度に基づいて、撮像素子2、AGC部3、異光源分離部7、領域別白検出部100の制御を行う。画像処理部10は、ホワイトバランス調整部5によりホワイトバランスの調整が行われた画像信号に基づいて、輝度信号および色信号を生成する。   The photometry unit 8 measures the brightness of the entire captured image. The brightness of the entire image is used, for example, when the AGC unit 3 performs gain control. The control unit 9 controls the image sensor 2, the AGC unit 3, the different light source separation unit 7, and the area-specific white detection unit 100 based on the luminance of the entire image obtained by the photometry unit 8. The image processing unit 10 generates a luminance signal and a color signal based on the image signal whose white balance has been adjusted by the white balance adjustment unit 5.

次に、領域別白検出部100の構成について、図に基づいて説明する。本発明の第1の実施の形態における領域別白検出部100を図3に示す。図3に示されるように、領域別白検出部100は、異光源領域選択部11と、異光源領域白データ検出部12と、ホワイトバランスゲイン算出部14とを備えている。また、異光源領域白データ検出部12は、明光源領域用白データ検出部13Aと、暗光源領域用白データ検出部13Bとを備えている。   Next, the configuration of the area-specific white detection unit 100 will be described with reference to the drawings. FIG. 3 shows the area-specific white detection unit 100 according to the first embodiment of the present invention. As illustrated in FIG. 3, the region-specific white detection unit 100 includes a different light source region selection unit 11, a different light source region white data detection unit 12, and a white balance gain calculation unit 14. Further, the different light source region white data detection unit 12 includes a bright light source region white data detection unit 13A and a dark light source region white data detection unit 13B.

異光源領域選択部11は、異光源領域分離部7から入力される異光源領域判別信号S2に基づいて、画面分割測色部6から入力されるRGBブロック平均値S1が明光源領域または暗光源領域のどちらの光源領域のデータであるのかを、ブロック毎に順次判定する。異光源領域選択部11は、RGBブロック平均値S1が明光源領域のデータである場合には、RGBブロック平均値S1を明光源領域用白データ検出部13Aへ出力し、RGBブロック平均値S1が暗光源領域のデータである場合には、RGBブロック平均値S1を暗光源領域用白データ検出部13Bへ出力する。   The different light source region selection unit 11 determines whether the RGB block average value S1 input from the screen division colorimetry unit 6 is a bright light source region or a dark light source based on the different light source region determination signal S2 input from the different light source region separation unit 7. Which light source area of the area is determined sequentially for each block. When the RGB block average value S1 is the bright light source area data, the different light source area selection unit 11 outputs the RGB block average value S1 to the bright light source area white data detection unit 13A, and the RGB block average value S1 is In the case of the dark light source area data, the RGB block average value S1 is output to the dark light source area white data detection unit 13B.

白データ検出部としての異光源領域白データ検出部12は、異光源分離部7により分離された異光源領域毎に被写体中の白エリア部分を白判定データ(白データ)として検出して、異光源領域毎に検出された白データを積算する。ここで、被写体中の白エリアを検出するために、異光源領域毎に白判定エリアが色空間上に設定される。制御部9から入力される白判定エリア制御信号S4は、異光源領域毎に白判定エリアを色空間上に設定するための信号である。明光源領域用白データ検出部13Aは、異光源領域選択部11により選択された明光源領域のブロックの白データの検出および積算を行う。暗光源領域用白データ検出部13Bは、異光源領域選択部11により選択された暗光源領域のブロックの白データの検出および積算を行う。   The different light source region white data detection unit 12 as the white data detection unit detects a white area portion in the subject as white determination data (white data) for each different light source region separated by the different light source separation unit 7, The white data detected for each light source area is integrated. Here, in order to detect a white area in the subject, a white determination area is set on the color space for each different light source region. The white determination area control signal S4 input from the control unit 9 is a signal for setting a white determination area on the color space for each different light source region. The bright light source region white data detection unit 13A detects and integrates white data of the blocks of the bright light source region selected by the different light source region selection unit 11. The dark light source region white data detection unit 13B detects and integrates white data of blocks in the dark light source region selected by the different light source region selection unit 11.

ホワイトバランスゲイン算出部14は、異光源領域選択部11により選択された明光源領域および暗光源領域のブロック個数の比、すなわち、明光源領域および暗光源領域の面積比に応じて、明光源領域用白データ検出部13Aおよび暗光源領域用白データ検出部13Bにより積算された白データを合成して、ホワイトバランスゲインを算出する。このホワイトバランスゲインは、ホワイトバランス調整部5によるホワイトバランスの調整に用いられる。   The white balance gain calculation unit 14 determines the bright light source region according to the ratio of the number of blocks of the bright light source region and the dark light source region selected by the different light source region selection unit 11, that is, the area ratio of the bright light source region and the dark light source region. The white data gain is calculated by synthesizing the white data integrated by the white data detection unit 13A and the dark light source region white data detection unit 13B. This white balance gain is used for white balance adjustment by the white balance adjustment unit 5.

次に、本発明の第1の実施の形態における撮像装置1000の動作について、図に基づいて説明する。本発明の第1の実施の形態における撮像装置のホワイトバランスゲイン生成処理のフローを図4に示す。図2および図4に示されるように、まず、異光源分離部7のブロック分割部7aが、A/D変換部4によりデジタル信号に変換された画像信号データを、1画面中で複数のブロックに分割する。そして、異光源分離部7のブロック輝度測定部7bが、複数のブロック毎の輝度平均値を輝度ブロック平均値として算出する(ステップ(STEP:以下、Sと称する)401)。   Next, the operation of the imaging apparatus 1000 according to the first embodiment of the present invention will be described based on the drawings. FIG. 4 shows a flow of white balance gain generation processing of the imaging apparatus according to the first embodiment of the present invention. As shown in FIG. 2 and FIG. 4, first, the block dividing unit 7a of the different light source separating unit 7 converts the image signal data converted into a digital signal by the A / D converting unit 4 into a plurality of blocks in one screen. Divide into Then, the block luminance measurement unit 7b of the different light source separation unit 7 calculates the luminance average value for each of the plurality of blocks as the luminance block average value (step (STEP: hereinafter referred to as S) 401).

次に、異光源分離部7のコントラスト算出部7cが、輝度ブロック平均値に基づいて、各ブロックと隣接するブロックとの間のコントラスト値をブロック毎に算出する(S402)。ここで、S402のコントラスト値の算出方法について、図5に基づいて、詳しく説明する。異光源分離部7で分割されたブロックの例を図5に示す。図5(a)〜図5(f)の各ブロック内に示された数値はブロックの番号である。図5(a)は異光源分離部7で分割されたブロックの例を示す図、図5(b)はブロック1を注目ブロックとしたときの隣接ブロックを示す図、図5(c)はブロック2を注目ブロックとしたときの隣接ブロックを示す図、図5(d)はブロック8を注目ブロックとしたときの隣接ブロックを示す図、図5(e)はブロック9を注目ブロックとしたときの隣接ブロックを示す図、図5(f)はブロック10を注目ブロックとしたときの隣接ブロックを示す図である。   Next, the contrast calculation unit 7c of the different light source separation unit 7 calculates the contrast value between each block and the adjacent block for each block based on the luminance block average value (S402). Here, the contrast value calculation method in S402 will be described in detail with reference to FIG. An example of blocks divided by the different light source separation unit 7 is shown in FIG. The numerical values shown in each block in FIGS. 5A to 5F are block numbers. 5A is a diagram showing an example of blocks divided by the different light source separation unit 7, FIG. 5B is a diagram showing adjacent blocks when the block 1 is a target block, and FIG. 5C is a block. FIG. 5 (d) is a diagram showing an adjacent block when block 8 is a target block, and FIG. 5 (e) is a diagram when block 9 is a target block. FIG. 5 (f) is a diagram showing an adjacent block when the block 10 is a target block.

S402では、図5(a)に示されるように、分割されたブロック1〜48に対して、順次、コントラスト値を算出する。まず、はじめにブロック1のコントラスト値を求める。図5(b)に示されるように、コントラスト値を求めたいブロック(以下、注目ブロックとする)がブロック1の場合、斜め方向も含めて注目ブロックに隣接するブロック(以下、隣接ブロックとする)は、ブロック2、ブロック9、ブロック10となる。   In S402, as shown in FIG. 5A, contrast values are sequentially calculated for the divided blocks 1 to 48. First, the contrast value of block 1 is obtained. As shown in FIG. 5B, when the block whose contrast value is to be obtained (hereinafter referred to as the target block) is block 1, the block adjacent to the target block including the diagonal direction (hereinafter referred to as the adjacent block). Are block 2, block 9, and block 10.

また、図5(c)に示すように注目ブロックがブロック2の場合、隣接するブロックはブロック1、ブロック3、ブロック9、ブロック10、ブロック11となる。図5(d)〜図5(f)も同様に注目ブロックと隣接ブロックとの関係を示している。このように隣接ブロックは注目ブロックを取り囲む全てのブロックを指していて、注目ブロックがブロック1からブロック48に至るまで同様の法則で隣接ブロックが決定される。   As shown in FIG. 5C, when the target block is block 2, adjacent blocks are block 1, block 3, block 9, block 10, and block 11. Similarly, FIGS. 5D to 5F show the relationship between the block of interest and the adjacent block. In this way, the adjacent block indicates all the blocks surrounding the target block, and the adjacent block is determined by the same rule until the target block reaches from block 1 to block 48.

この時コントラスト値は注目ブロック毎に算出するもので、注目ブロックのブロック輝度平均値から隣接ブロック各々のブロック輝度平均値を減算し、全減算結果の最大値をコントラスト値とする。ブロック1のコントラスト値を求め終わると、ブロック2、ブロック3、・・・、ブロック48のように、注目ブロック毎にコントラスト値を順次求める。   At this time, the contrast value is calculated for each block of interest. The block luminance average value of each adjacent block is subtracted from the block luminance average value of the block of interest, and the maximum value of all subtraction results is used as the contrast value. When the contrast value of the block 1 is obtained, the contrast value is obtained sequentially for each block of interest, such as the block 2, the block 3,.

このように注目ブロック毎にコントラスト値を求めることにより、例えばコントラスト値が負の値の場合、隣接ブロックの中に注目ブロックよりも輝度の高いブロックが存在するという情報が得られ、逆にコントラスト値が正の値場合、隣接ブロックの中に注目ブロックよりも輝度の低いブロックが存在するという情報が得られる。また、このように注目ブロック毎にコントラスト値を求めることにより、隣接するブロックとの間で輝度変化の大きいブロックを効率よく抽出でき、光源の異なる2つの異光源領域の境界部である可能性の高いブロックを効率よく抽出することができる。従って、輝度変化の大きいブロックが隣接するブロックに存在するかを適切に判断でき、異光源領域の境界部を検出するためのコントラスト値を適切に算出できる。   By obtaining the contrast value for each target block in this way, for example, when the contrast value is negative, information is obtained that there is a block with higher brightness than the target block in the adjacent blocks, and conversely the contrast value When is a positive value, information is obtained that there is a block having lower luminance than the target block in the adjacent blocks. In addition, by obtaining the contrast value for each block of interest in this way, it is possible to efficiently extract a block having a large luminance change between adjacent blocks, which may be a boundary between two different light source regions with different light sources. High blocks can be extracted efficiently. Therefore, it is possible to appropriately determine whether a block having a large luminance change exists in the adjacent block, and it is possible to appropriately calculate a contrast value for detecting the boundary portion of the different light source region.

次に、異光源分離部7の境界部検出部7dが、S402の処理により算出されたコントラスト値と、所定のコントラスト閾値とを比較することにより、光源の明るさに応じた異光源領域の境界部を検出する。具体的には、異光源分離部7の境界部検出部7dが、S402の処理により算出されたコントラスト値と、光源の異なる二つの異光源領域の境界部であるかどうかを判定するためのコントラスト判定閾値(TH_cont)とを比較し、S402の処理のより算出されたコントラスト値がコントラスト判定閾値(TH_cont)よりも大きいブロックを抽出する(S403)。ここで、抽出されたブロックが存在する場合(S404)、抽出された各ブロックを異光源領域の境界部として検出して、次のS405へ移行する。   Next, the boundary detection unit 7d of the different light source separation unit 7 compares the contrast value calculated by the process of S402 with a predetermined contrast threshold value, so that the boundary of the different light source region according to the brightness of the light source. Part. Specifically, the boundary detection unit 7d of the different light source separation unit 7 determines the contrast value calculated by the process of S402 and the boundary between two different light source regions having different light sources. The determination threshold value (TH_cont) is compared, and a block whose contrast value calculated by the process of S402 is larger than the contrast determination threshold value (TH_cont) is extracted (S403). Here, when the extracted block exists (S404), each extracted block is detected as the boundary part of a different light source area | region, and it transfers to following S405.

S405では、異光源領域分離部7によって分割された各ブロックが、明光源領域であるか、暗光源領域であるかを判定するための異光源領域分離閾値(TH_border)を求める(S405)。TH_borderは、異光源領域の境界部として抽出されたブロックの平均輝度の情報に基づいて設定される。これにより、画像信号を異光源領域に分離する判断基準が明確に定められるので、画像信号を異光源領域に分離するための画面分割パターンを複数用意することなく、画像信号を異光源領域に容易に分離できる。ここでは、異光源領域の境界部として抽出されたブロックで構成される抽出エリアの中で最小のエリア輝度平均値を、TH_borderに設定している。これにより、画像信号を複数の異光源領域に分離する判断基準がより明確に定められるので、画像信号を複数の異光源領域に正確に分離できる。但し、TH_borderに、上記抽出エリアの中で最小のエリア輝度平均値以外の値を設定してもよい。   In S405, a different light source region separation threshold (TH_order) for determining whether each block divided by the different light source region separation unit 7 is a bright light source region or a dark light source region is obtained (S405). TH_order is set based on the average luminance information of the blocks extracted as the boundary part of the different light source regions. This clearly defines the criteria for separating the image signal into the different light source regions, so that it is easy to separate the image signal into the different light source regions without preparing multiple screen division patterns for separating the image signal into the different light source regions. Can be separated. Here, the minimum area luminance average value among the extraction areas composed of the blocks extracted as the boundary portions of the different light source regions is set to TH_border. Thereby, since the determination criterion for separating the image signal into the plurality of different light source regions is more clearly defined, the image signal can be accurately separated into the plurality of different light source regions. However, a value other than the minimum area luminance average value in the extraction area may be set in TH_border.

次に、異光源分離部7の画像信号分離部7eが、異光源領域分離閾値(TH_border)を基準に、画像信号を各異光源領域に分離する。具体的には、異光源分離部7の画像信号分離部7eは、輝度ブロック平均値がTH_border以上のブロックを明光源領域と判定し、輝度ブロック平均値がTH_border未満のブロックを暗光源領域と判定する(S406)。このようにして、異光源分離部7の画像信号分離部7eが、境界部検出部7dにより検出された異光源領域の境界部の情報に基づいて、画像信号を異光源領域に分離する。   Next, the image signal separation unit 7e of the different light source separation unit 7 separates the image signal into the different light source regions with reference to the different light source region separation threshold (TH_order). Specifically, the image signal separation unit 7e of the different light source separation unit 7 determines a block having a luminance block average value equal to or higher than TH_border as a bright light source region, and determines a block having a luminance block average value less than TH_border as a dark light source region. (S406). In this way, the image signal separation unit 7e of the different light source separation unit 7 separates the image signal into the different light source regions based on the information on the boundary part of the different light source region detected by the boundary detection unit 7d.

ここで、S401〜S406異光源分離部7の処理について、図6(a)に示すような異光源領域が存在するシーンを例に、図に基づいて、より詳細に説明する。図6(a)は撮像画像の例を示す図、図6(b)は画像をブロック毎に分割した状態を示す図、図6(c)は異光源領域の境界部として検出されたブロックを示す図、図6(d)は分離後の明光源領域および暗光源領域を示す図である。   Here, the processing of S401 to S406 different light source separation unit 7 will be described in more detail with reference to the drawing, taking as an example a scene in which a different light source region as shown in FIG. 6A is a diagram illustrating an example of a captured image, FIG. 6B is a diagram illustrating a state in which the image is divided into blocks, and FIG. 6C is a block detected as a boundary portion of a different light source region. FIG. 6D is a diagram showing the bright light source region and the dark light source region after separation.

図6(a)では、異光源分離部7に入力される画像の例として、非常に明るい太陽光および青空を光源とする日向部と、建物に太陽光を遮られて青空のみを光源する日陰部からなる典型的なミックス光源と呼ばれるシーンを示している。図6(a)〜図6(d)では、日陰部に斜線のハッチングを施している。図6(b)では、図6(a)で示された画像を複数のブロックに分割した状態を示している。この図6(b)に示されるブロック毎の画像に対して、S401〜S404の処理を行うことによって、各ブロックと隣接するブロックとの間のコントラスト値がコントラスト判定閾値(TH_cont)より大きいブロックが、異光源領域の境界部として検出される。   In FIG. 6 (a), as an example of the image input to the different light source separation unit 7, the sun part using very bright sunlight and blue sky as the light source, and the day when the building blocks sunlight and only the blue sky is used as the light source. It shows a scene called a typical mix light source consisting of the shadow. 6 (a) to 6 (d), shaded areas are hatched. FIG. 6B shows a state where the image shown in FIG. 6A is divided into a plurality of blocks. By performing the processing of S401 to S404 on the image for each block shown in FIG. 6B, a block whose contrast value between each block and the adjacent block is larger than the contrast determination threshold value (TH_cont). , Detected as a boundary between different light source regions.

図6(c)では、S401〜S404の処理後に、異光源領域の境界部として検出されたブロックが太枠で示されている。図6(c)に示されるように、日向と日陰の境界部では、各ブロックと隣接するブロックとの間のコントラスト値が非常に大きくなるため、異光源領域の境界部として検出された各ブロックは、日向と日陰の境界部周辺に集中して存在している。   In FIG. 6C, the blocks detected as the boundary portions of the different light source regions after the processing of S401 to S404 are indicated by thick frames. As shown in FIG. 6C, since the contrast value between each block and the adjacent block is very large at the boundary between the sun and the shade, each block detected as a boundary between different light source regions. Is concentrated around the boundary between the sun and the shade.

図6(d)では、S405、S406の処理後に、ブロック毎に分割された各画像を、明光源領域と暗光源領域に分離した状態が示されている。S401〜S404の処理を経て抽出され、異光源領域の境界部として検出されたブロック(図6(c)にて太枠で示したブロック)の中で、最小の輝度ブロック平均値が異光源領域分離閾値(TH_border)と設定されると、図6(c)の太枠で示されるブロックの全てがTH_border未満の輝度ブロック平均値を持つブロックとなり、明るい側のブロックを明光源領域として、暗い側のブロックを暗光源領域として、正確に分離することが可能となる。図6(d)にて、網目のハッチングを施された領域が暗光源領域に該当する。このようにして、図6(d)に示されるように、画像を光源の明るさに応じた異光源領域に分離することができる。   FIG. 6D shows a state in which each image divided for each block is separated into a bright light source region and a dark light source region after the processing of S405 and S406. Among the blocks (blocks indicated by a thick frame in FIG. 6C) extracted through the processing of S401 to S404 and detected as the boundary portion of the different light source region, the minimum luminance block average value is the different light source region. When the separation threshold (TH_border) is set, all of the blocks indicated by a thick frame in FIG. 6C are blocks having a luminance block average value less than TH_border, and the bright side block is used as the bright light source region and the dark side This block can be accurately separated as a dark light source region. In FIG. 6D, the hatched area corresponds to the dark light source area. In this manner, as shown in FIG. 6D, the image can be separated into different light source regions according to the brightness of the light source.

次に、制御部9が、露光情報に従って、異光源領域が存在する場合における明光源領域用および暗光源領域用の白判定ブロックを、後述の異光源領域白データ検出部12で用いる色空間上に、それぞれ設定する(S407)。なお、露光情報は、測光部8により測定される画像全体の明るさに基づいた情報である。   Next, the control unit 9 uses the white determination blocks for the bright light source region and the dark light source region when there are different light source regions according to the exposure information on the color space used by the different light source region white data detection unit 12 described later. Are set respectively (S407). The exposure information is information based on the brightness of the entire image measured by the photometry unit 8.

なお、S404の処理で、異光源領域の境界部が抽出されなかった場合、すなわち異光源領域が存在しない場合は全ブロックを明光源領域と判定し(S408)、制御部9が上述の露光情報に基づいて、異光源領域が存在しない場合における明光源用の白判定ブロックを、異光源領域白データ検出部12で用いる色空間上に設定する(S409)。これにより、例えば単一光源下のように、異光源分離部7が複数の異光源領域に分離できない場合にであっても、白エリア部分を白データとして検出することができる。   If the boundary of the different light source region is not extracted in the process of S404, that is, if the different light source region does not exist, all the blocks are determined as the bright light source region (S408), and the control unit 9 performs the above-described exposure information. Based on the above, the white determination block for the bright light source when the different light source region does not exist is set on the color space used by the different light source region white data detection unit 12 (S409). Thus, even when the different light source separation unit 7 cannot separate into different light source regions, for example, under a single light source, the white area portion can be detected as white data.

次に、被写体中の白エリア部分を白データとして検出するために、異光源領域白データ検出部12で用いる白判定エリアについて、図に基づいて説明する。異光源領域白データ検出部12で用いる白判定エリアを色空間上に示した例を図7に示す。図7(a)は領域別白判定エリアの一例を示す図、図7(b)は高照度時かつ異光源領域が存在する場合の領域別白判定エリアを示す図、図7(c)は中照度時かつ異光源領域が存在する場合の領域別白判定エリアを示す図、図7(d)は低照度時かつ異光源領域が存在する場合の領域別白判定エリアを示す図、図7(e)は高照度時かつ異光源領域が存在しない場合の単一白判定エリアを示す図、図7(f)は中照度時かつ異光源領域が存在しない場合の単一白判定エリアを示す図、図7(g)は低照度時かつ異光源領域が存在しない場合の単一白判定エリアを示す図である。   Next, a white determination area used by the different light source region white data detection unit 12 in order to detect a white area portion in the subject as white data will be described with reference to the drawings. FIG. 7 shows an example in which the white determination area used in the different light source region white data detection unit 12 is shown in the color space. FIG. 7A is a diagram showing an example of a region-specific white determination area, FIG. 7B is a diagram showing a region-specific white determination area when there is a high illuminance and a different light source region, and FIG. FIG. 7D is a diagram showing a region-specific white determination area when there is a different illuminant region at medium illuminance. FIG. 7D is a diagram showing a region-specific white determination area when there is a different illuminant region at low illumination. FIG. 7E is a diagram showing a single white determination area when there is a high illuminance and no different light source area exists, and FIG. 7F shows a single white determination area when there is no illuminance area when there is a medium illuminance. FIG. 7 (g) is a diagram showing a single white determination area when there is no illuminance and there is no different light source region.

図7(a)では、本発明における撮像装置の白データ検出で用いる色空間の例として、B(ブルー)、G(グリーン)、R(レッド)の各色信号から算出されるB/GおよびR/Gの値をプロットした座標空間が示されている。撮影時の光源下における無彩色の映像信号である白データは色温度変化に応じて、図7(a)中の白データ軌跡に沿って変化し、白データ軌跡上には色温度3000K、5000K、7000Kの3点を例としてプロットしている。白データ軌跡は、黒体輻射の色度に近似した曲線であって、白判定エリア設定の基準となる。   In FIG. 7A, B / G and R calculated from each color signal of B (blue), G (green), and R (red) are shown as examples of the color space used for white data detection of the imaging apparatus according to the present invention. A coordinate space in which the values of / G are plotted is shown. White data, which is an achromatic video signal under a light source at the time of shooting, changes along the white data locus in FIG. 7A according to the change in color temperature, and the color temperature is 3000K, 5000K on the white data locus. , 3 points of 7000K are plotted as an example. The white data locus is a curve that approximates the chromaticity of black body radiation, and serves as a reference for setting a white determination area.

図7(a)に示されるように、明光源領域用の白判定エリアと暗光源領域用の白判定エリアが、白データ軌跡付近に設けられている。図7(a)に例示されるように、明光源領域用の白判定エリアは3000Kから5000Kまでの白データ軌跡上にあるRGBデータのみを白データとして判定する事が可能な白判定エリアであり、暗光源領域用の白判定エリアは5000Kから7000Kまでの白データ軌跡上のRGBデータを白データとして判定可能な白判定エリアである。   As shown in FIG. 7A, a white determination area for the bright light source region and a white determination area for the dark light source region are provided in the vicinity of the white data locus. As illustrated in FIG. 7A, the white determination area for the bright light source region is a white determination area in which only RGB data on a white data locus from 3000K to 5000K can be determined as white data. The white determination area for the dark light source region is a white determination area in which RGB data on a white data locus from 5000K to 7000K can be determined as white data.

図7(b)〜図7(d)では、特にミックス光源が存在すると判定された場合に、ステップS407で設定される異光源領域別の白判定エリアの例が示されている。図7(b)では、露光情報に応じて、制御部9が晴天時屋外の可能性が高いと判断した場合の例が示されている。なお、露光情報は、上述の通り、測光部8により測定される画像全体の明るさに基づいた情報である。晴天時屋外におけるミックス光源は、青空と昼間の太陽光の両方が光源となる日向と、青空のみが光源となる日陰によるミッスク光源である可能性が高い。このとき、明光源領域は晴天時の日向で取りうる色温度範囲4800Kから6000Kを囲むような白判定エリア、暗光源領域は日陰で取りうる色温度範囲6000Kから8000Kを囲むような白判定エリアとなる。   FIGS. 7B to 7D show examples of white determination areas for different light source regions set in step S407, particularly when it is determined that a mixed light source is present. FIG. 7B shows an example of the case where the control unit 9 determines that there is a high possibility of outdoor in fine weather according to the exposure information. The exposure information is information based on the brightness of the entire image measured by the photometry unit 8 as described above. There is a high possibility that the mixed light source outdoors in fine weather is a misk light source in the shade where both the blue sky and daytime sunlight are the light sources and in the shade where only the blue sky is the light source. At this time, the bright light source area is a white determination area surrounding the color temperature range 4800K to 6000K that can be taken in the sunny day, and the dark light source area is a white determination area surrounding the color temperature range 6000K to 8000K that can be taken in the shade. Become.

制御部9は、このような各異光源領域の白判定エリアを色空間上に設定する指示を、上記露光情報に基づいて、白判定エリア制御信号S4として、異光源領域白データ検出部12へ出力する。そして、異光源領域白データ検出部12は、白判定エリア制御信号S4に基づいて、異光源領域毎の白判定エリアを設定する。   The control unit 9 sends an instruction to set the white determination area of each different light source region on the color space to the different light source region white data detection unit 12 as a white determination area control signal S4 based on the exposure information. Output. Then, the different light source area white data detection unit 12 sets a white determination area for each different light source area based on the white determination area control signal S4.

図7(c)では、露光情報から制御部9が夕刻時である可能性が高いと判断した場合の例が示されている。夕刻時のミックス光源は、青空と色温度が下がった夕方の太陽光の両方が光源となる日向と、青空のみが光源となる日陰によるミッスク光源である可能性が高い。このとき、明光源領域は夕刻の日向で取りうる色温度範囲4000Kから5000Kを囲むような白判定エリア、暗光源領域は日陰で取りうる色温度範囲6000Kから8000Kを囲むような白判定エリアとなる。この場合においても、制御部9は、白判定エリア制御信号S4を、上記露光情報に基づいて異光源領域白データ検出部12へ出力し、異光源領域白データ検出部12は、白判定エリア制御信号S4に基づいて、異光源領域毎の白判定エリアを設定する。   FIG. 7C shows an example when the control unit 9 determines that there is a high possibility that it is evening time from the exposure information. There is a high possibility that the mixed light source in the evening is a misk light source in the shade where both the blue sky and evening sunlight with a lowered color temperature are the light sources and in the shade where only the blue sky is the light source. At this time, the bright light source region is a white determination area surrounding the color temperature range 4000K to 5000K that can be taken in the evening sun, and the dark light source region is a white determination area surrounding the color temperature range 6000K to 8000K that can be taken in the shade. . Also in this case, the control unit 9 outputs the white determination area control signal S4 to the different light source region white data detection unit 12 based on the exposure information, and the different light source region white data detection unit 12 performs the white determination area control. Based on the signal S4, a white determination area for each different light source region is set.

図7(d)では、露光情報から制御部9が屋内である可能性が高いと判断した場合の例が示されている。屋内時のミックス光源は、屋内に差し込む屋外光と、ハロゲン光や蛍光灯からなる屋内人工光源によるミッスク光源である可能性が高い。このとき、明光源領域は屋外で昼間から夕刻までに取りうる色温度範囲4000Kから5000Kを囲むような白判定エリア、暗光源領域は屋内人工光源が主に取りうる色温度範囲3000Kから4000Kを囲むような白判定エリアとなる。この場合においても、制御部9は、白判定エリア制御信号S4を、上記露光情報に基づいて異光源領域白データ検出部12へ出力し、異光源領域白データ検出部12は、白判定エリア制御信号S4に基づいて、異光源領域毎の白判定エリアを設定する。   FIG. 7D shows an example when the controller 9 determines that there is a high possibility of being indoors from the exposure information. There is a high possibility that the mix light source for indoor use is a misk light source composed of outdoor light inserted indoors and an indoor artificial light source composed of halogen light or fluorescent lamps. At this time, the bright light source region surrounds a color determination range 4000K to 5000K that can be taken outdoors from daytime to evening, and the dark light source region surrounds a color temperature range 3000K to 4000K that the indoor artificial light source can mainly take. This is the white determination area. Also in this case, the control unit 9 outputs the white determination area control signal S4 to the different light source region white data detection unit 12 based on the exposure information, and the different light source region white data detection unit 12 performs the white determination area control. Based on the signal S4, a white determination area for each different light source region is set.

一方、図7(e)、図7(f)、図7(g)には、ミックス光源が存在しないと判定された場合の白判定エリアの例が示されている。図7(e)は晴天時屋外、図7(f)は夕刻時屋外、図7(g)は屋内の場合であり、それぞれ単一光源時に取りうる色温度範囲を囲む白判定エリアが設定される。   On the other hand, FIG. 7 (e), FIG. 7 (f), and FIG. 7 (g) show examples of white determination areas when it is determined that there is no mixed light source. FIG. 7 (e) shows the case of outdoor in fine weather, FIG. 7 (f) shows the case of outdoor in the evening, and FIG. 7 (g) shows the case of indoor. The

図4に戻り、次に、画面分割測色部6が、S401で異光源分離部7のブロック分割部7aが行ったように、A/D変換器4によりデジタル信号に変換された画像信号データを、1画面中で複数のブロックに分割する。そして、画面分割測色部6が、分割された各ブロックの3原色画像信号であるR信号、G信号、B信号それぞれの平均値であるRGBブロック平均値を算出する(S410)。このとき、画面分割測色部6は、S401で異光源分離部7のブロック分割部7aが分割した各ブロックの画像信号データを利用して、RGBブロック平均値を算出してもよい。そして、画面分割測色部6がRGBブロック平均値S1を領域別白検出部100へ出力する。   Returning to FIG. 4, the image signal data converted by the A / D converter 4 by the screen division colorimetry unit 6 next as the block division unit 7 a of the different light source separation unit 7 performs in S <b> 401. Are divided into a plurality of blocks in one screen. Then, the screen division colorimetry unit 6 calculates an RGB block average value that is an average value of each of the R signal, the G signal, and the B signal that are the three primary color image signals of each divided block (S410). At this time, the screen division colorimetry unit 6 may calculate the RGB block average value using the image signal data of each block divided by the block division unit 7a of the different light source separation unit 7 in S401. Then, the screen division colorimetry unit 6 outputs the RGB block average value S1 to the area-specific white detection unit 100.

次に、異光源領域選択部11が、異光源領域分離部7から入力される異光源領域判別信号S2に基づいて、画面分割測色部6から入力されるRGBブロック平均値S1が明光源領域または暗光源領域のどちらの光源領域のデータであるのかを、ブロック毎に順次判定する(S411)。異光源領域選択部11は、RGBブロック平均値S1が明光源領域のデータである場合には、RGBブロック平均値S1を明光源領域白データ検出部13Aへ出力し、RGBブロック平均値S1が暗光源領域のデータである場合には、RGBブロック平均値S1を暗光源領域白データ検出部13Bへ出力する。   Next, based on the different light source region determination signal S2 input from the different light source region separation unit 7, the different light source region selection unit 11 obtains the RGB block average value S1 input from the screen division colorimetric unit 6 as the bright light source region. Alternatively, it is sequentially determined for each block which light source area data is the dark light source area (S411). When the RGB block average value S1 is the bright light source area data, the different light source area selection unit 11 outputs the RGB block average value S1 to the bright light source area white data detection unit 13A, and the RGB block average value S1 is dark. In the case of the light source region data, the RGB block average value S1 is output to the dark light source region white data detection unit 13B.

次に、異光源領域白データ検出部12が、RGBブロック平均値S1を図7(a)〜図7(g)に示されるような色空間にプロットし、S407またはS409で設定された明光源領域用および暗光源領域の白判定エリアを用いて、異光源領域毎に被写体中の白エリア部分を白データとして検出し、検出された各白データを異光源領域毎に積算する(S412)。このとき、明光源領域用白データ検出部13Aが、異光源領域選択部11により選択された明光源領域のブロックの白データの検出および積算を行い、暗光源領域用白データ検出部13Bが、異光源領域選択部11により選択された暗光源領域のブロックの白データの検出および積算を行う。ここで、白データ検出により白データと判定されたRGBブロック平均値のみを明光源領域および暗光源領域のそれぞれで積算し、白データと判定されなかったRGBブロック平均値の積算は行わない。   Next, the different light source region white data detection unit 12 plots the RGB block average value S1 in a color space as shown in FIGS. 7A to 7G, and the bright light source set in S407 or S409. Using the white determination areas for the area and the dark light source area, the white area portion in the subject is detected as white data for each different light source area, and each detected white data is integrated for each different light source area (S412). At this time, the bright light source region white data detection unit 13A detects and integrates white data of the blocks of the bright light source region selected by the different light source region selection unit 11, and the dark light source region white data detection unit 13B Detection and integration of white data of blocks in the dark light source region selected by the different light source region selection unit 11 is performed. Here, only the RGB block average values determined as white data by white data detection are integrated in each of the bright light source region and the dark light source region, and the RGB block average values not determined as white data are not integrated.

次に、ホワイトバランスゲイン算出部14が、暗光源領域および暗光源領域のブロック個数比に応じて、S412で白データとして積算されたR信号、G信号およびB信号の各白データを合成する(S413)。合成後のR信号、G信号およびR信号の各白データをRdata、GdataおよびBdataとすると、これらは下記に示す式(1)、式(2)および式(3)によって表される。式(1)、式(2)および式(3)において、明光源領域用白データ検出部13Aにおいて積算されたR信号、G信号およびB信号の各白データをRa、Ga、Ba、暗領域用白データ検出部13Bにおいて積算されたR信号、G信号およびB信号の各白データをRb、Gb、Bb、明光源領域のブロック数をNa、暗光源領域のブロック数をNb、明光源領域および暗光源領域のブロックの全てを合わせた全ブロック数をNtとしている。   Next, the white balance gain calculation unit 14 combines the white data of the R signal, the G signal, and the B signal integrated as white data in S412 according to the block number ratio of the dark light source region and the dark light source region ( S413). If the white data of the R signal, G signal, and R signal after synthesis is Rdata, Gdata, and Bdata, these are represented by the following equations (1), (2), and (3). In Expression (1), Expression (2), and Expression (3), the white data of the R signal, G signal, and B signal accumulated in the bright light source area white data detection unit 13A is represented by Ra, Ga, Ba, and dark areas. Rb, Gb, Bb for each white data of the R signal, G signal, and B signal accumulated in the white data detection unit 13B, Na for the number of blocks in the bright light source region, Nb for the number of blocks in the dark light source region, and the bright light source region The total number of blocks including all the blocks in the dark light source region is Nt.

Rdata=(Ra×Na+Rb×Nb)/Nt・・・(1)
Gdata=(Ga×Na+Gb×Nb)/Nt・・・(2)
Bdata=(Ba×Na+Bb×Nb)/Nt・・・(3)
Rdata = (Ra × Na + Rb × Nb) / Nt (1)
Gdata = (Ga × Na + Gb × Nb) / Nt (2)
Bdata = (Ba × Na + Bb × Nb) / Nt (3)

このように、各異光源領域のブロック数Na、Nbに応じて、各光源領域用の白データ検出部13A、13Bによって積算された白データを合成することにより、合成後のR信号、G信号およびR信号の各白データRdata、GdataおよびBdataが算出される。このとき、各ブロックは互いに等しい面積を有するので、各異光源領域のブロック数Na、Nbに応じて、各異光源領域の面積が変化する。このようにして、ホワイトバランスゲイン算出部14が、各異光源領域の面積比に応じて、各光源領域用の白データ検出部13A、13Bにより積算された白データを合成する。   Thus, by combining the white data accumulated by the white data detection units 13A and 13B for each light source region in accordance with the number of blocks Na and Nb in each different light source region, the combined R signal and G signal And white data Rdata, Gdata, and Bdata of the R signal are calculated. At this time, since each block has the same area, the area of each different light source region changes according to the number of blocks Na and Nb of each different light source region. In this way, the white balance gain calculation unit 14 synthesizes the white data accumulated by the white data detection units 13A and 13B for each light source region in accordance with the area ratio of each different light source region.

最後に、ホワイトバランスゲイン算出部14が、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出する(S414)。ホワイトバランスゲインは、次に示す式(4)および式(5)に従って、R信号およびB信号をG信号のレベルに正規化する形で算出される。式(4)および式(5)において、R信号をG信号のレベルに正規化したホワイトバランスゲインをRgain、B信号をG信号のレベルに正規化したホワイトバランスゲインをBgainとしている。
Rgain=Gdata/Rdata・・・(4)
Bgain=Gdata/Bdata・・・(5)
Finally, the white balance gain calculation unit 14 calculates a white balance gain for adjusting the white balance (S414). The white balance gain is calculated in such a manner that the R signal and the B signal are normalized to the level of the G signal according to the following equations (4) and (5). In the equations (4) and (5), the white balance gain obtained by normalizing the R signal to the level of the G signal is Rgain, and the white balance gain obtained by normalizing the B signal to the level of the G signal is Bgain.
Rgain = Gdata / Rdata (4)
Bgain = Gdata / Bdata (5)

このように、ホワイトバランスの調整を行うためのホワイトバランスゲインがホワイトバランス生成部200により入力画像毎に生成される。このホワイトバランスゲインを用いて、ホワイトバランス調整部5がホワイトバランスの調整を入力画像毎に行う。そして、画像処理部10が、ホワイトバランス調整部5によりホワイトバランスの調整が行われた画像信号に基づいて、輝度信号および色信号を生成する。   As described above, the white balance gain for adjusting the white balance is generated for each input image by the white balance generation unit 200. Using this white balance gain, the white balance adjustment unit 5 performs white balance adjustment for each input image. Then, the image processing unit 10 generates a luminance signal and a color signal based on the image signal whose white balance has been adjusted by the white balance adjusting unit 5.

以上の通り、本発明に係る撮像装置では、光源の明るさに応じた複数の異光源領域に画像信号を分離した上で、異光源領域毎に白データを検出するので、日向および日陰が混在するミックス光源下であっても、光源の明るさに応じた異光源領域の各々に適した白データの検出を行い、各異光源領域中の画像に対応した適切なホワイトバランスゲインを入力画像毎に算出でき、適切なホワイトバランスの調整を行うことができる。例えば、撮影者が明光源領域を主に撮影している場合は、明光源領域のブロック数が多くなるために明光源領域の結果が重んじられ、逆に暗光源領域を主に撮影している場合は、暗光源領域のブロック数が多くなるために暗光源領域の結果が重んじられる。従って、撮影者の意図にあったホワイトバランスを実現する事ができる。   As described above, in the imaging apparatus according to the present invention, the image signal is separated into a plurality of different light source regions according to the brightness of the light source, and the white data is detected for each different light source region. Even under a mixed light source, white data suitable for each different light source region is detected according to the brightness of the light source, and an appropriate white balance gain corresponding to the image in each different light source region is detected for each input image. And an appropriate white balance adjustment can be performed. For example, when the photographer mainly shoots the bright light source area, the number of blocks in the bright light source area increases, so the result of the bright light source area is valued, and conversely, the dark light source area is mainly shot. In this case, since the number of blocks in the dark light source region increases, the result of the dark light source region is respected. Therefore, it is possible to realize white balance that meets the photographer's intention.

本実施の形態では、ミックス光源下において、光源の異なる領域を異光源領域として分離することで、異光源領域毎に被写体中の白エリア部分を白データとして検出するので、撮像シーンと被写体に応じて、白データを検出するための白判定エリアを絞り込むことが可能となり、白の誤検出と誤検出によるホワイトバランスのずれを低減することができる。   In this embodiment, under the mixed light source, by separating different light source regions as different light source regions, the white area portion in the subject is detected as white data for each different light source region. Thus, it is possible to narrow down a white determination area for detecting white data, and it is possible to reduce white misdetection and deviation of white balance due to erroneous detection.

また、本発明に係る撮像装置において、異光源領域毎の白データを異光源領域の各面積比に応じて合成することにより、ホワイトバランスゲインを算出するので、光源の明るさに応じた各領域の白データを、光源の明るさに応じた各領域の面積に対応して合成することができ、より適切なホワイトバランスゲインを算出できる。すなわち、光源の明るさに応じた各領域の画面占有率に応じて、主要被写体に重点を置いてホワイトバランスの調整を行うことができる。例えば、主要被写体がどの異光源領域にあるかによって、データの重み付けを行え、ミックス光源下で異なる異光源領域がどのような比率で存在したとしても、主要被写体に対して重点的にホワイトバランスを合わせることができる。   Further, in the imaging apparatus according to the present invention, the white balance gain is calculated by combining the white data for each different light source region according to each area ratio of the different light source region, so that each region according to the brightness of the light source The white data can be synthesized corresponding to the area of each region according to the brightness of the light source, and a more appropriate white balance gain can be calculated. That is, it is possible to adjust the white balance with emphasis on the main subject according to the screen occupancy ratio of each area corresponding to the brightness of the light source. For example, data weighting can be performed depending on which different light source area the main subject is in, and white balance is focused on the main subject regardless of the ratio of different different light source areas under the mixed light source. Can be matched.

また、本発明に係る撮像装置において、画像を分割した複数のブロック毎の輝度に基づいて、各ブロックと隣接するブロックとの間のコントラスト値を算出し、算出されたコントラスト値と、所定のコントラスト閾値とを比較することにより、異光源領域の境界部を検出し、検出された異光源領域の境界部の情報に基づいて、画像信号を異光源領域に分離するので、日向と日陰のミックス光源下においても、各ブロック間のコントラスト値から異光源領域の境界部を容易に検出することができ、当該異光源領域の境界部の情報に基づき、画像信号を異光源領域に容易に分離できる。また、検出された異光源領域の境界部の情報に基づいて、画像信号を異光源領域に分離する判断基準を定めることができるので、画像信号を異光源領域に分離するための画面分割パターンを複数用意することなく、画像信号を異光源領域に容易に分離できる。   Further, in the imaging apparatus according to the present invention, a contrast value between each block and an adjacent block is calculated based on the luminance for each of the plurality of blocks obtained by dividing the image, and the calculated contrast value and a predetermined contrast By comparing the threshold value and the boundary part of the different light source area, and separating the image signal into the different light source area based on the detected information on the boundary part of the different light source area, a mixed light source of the sun and shade Even below, the boundary portion of the different light source region can be easily detected from the contrast value between the blocks, and the image signal can be easily separated into the different light source region based on the information of the boundary portion of the different light source region. In addition, since it is possible to determine a criterion for separating the image signal into the different light source regions based on the detected information on the boundary between the different light source regions, a screen division pattern for separating the image signal into the different light source regions can be set. The image signal can be easily separated into different light source regions without preparing a plurality.

また、本発明に係る撮像装置において、各ブロックの輝度と、各ブロックに隣接する全てのブロックの輝度との差分値を算出し、算出された差分値の最大差分値に基づいて、互いに隣接するブロックとの間のコントラスト値を算出するので、輝度変化の大きいブロックが隣接するブロックに存在するかを適切に判断でき、異光源領域の境界部を検出するためのコントラスト値を適切に算出できる。   In the imaging device according to the present invention, the difference value between the luminance of each block and the luminance of all the blocks adjacent to each block is calculated, and adjacent to each other based on the maximum difference value of the calculated difference values. Since the contrast value between the blocks is calculated, it is possible to appropriately determine whether a block having a large luminance change exists in the adjacent block, and it is possible to appropriately calculate the contrast value for detecting the boundary portion of the different light source region.

また、本発明に係る撮像装置において、異光源領域の境界部におけるブロックの平均輝度値の代表値に基づいて、画像信号を異光源領域に分離するので、異光源領域の境界部におけるブロックの平均輝度値に基づいて、画像信号を異光源領域に分離する判断基準が明確に定められる。一義的に決定された閾値で判別する方式と異なり、代表値という実際の値を用いることで、輝度の変化量(コントラスト値)にのみ基づいた判定が可能となり、境界部を正確に判別できる。   Further, in the imaging device according to the present invention, the image signal is separated into different light source regions based on the representative value of the average luminance value of the blocks at the boundary portions of the different light source regions. Based on the luminance value, a criterion for separating the image signal into different light source regions is clearly defined. Unlike the method of discriminating with a uniquely determined threshold value, by using an actual value called a representative value, it becomes possible to make a determination based only on the amount of change in brightness (contrast value), and the boundary portion can be discriminated accurately.

また、本発明に係る撮像装置において、異光源領域の境界部におけるブロックの平均輝度値の最小値に基づいて、画像信号を異光源領域に分離するので、異光源領域の境界部におけるブロックの平均輝度値の最小値に基づいて、画像信号を複数の異光源領域に分離する判断基準がより明確に定められるので、画像信号を異光源領域に正確に分離できる。   In the imaging device according to the present invention, since the image signal is separated into different light source regions based on the minimum value of the average luminance value of the blocks at the boundary portions of the different light source regions, the average of the blocks at the boundary portions of the different light source regions Since the criterion for separating the image signal into a plurality of different light source regions is more clearly determined based on the minimum value of the luminance value, the image signal can be accurately separated into the different light source regions.

(第2の実施の形態)
以下、本発明の第2の実施の形態に係る撮像装置について、図面を用いて説明する。本発明の第2の実施の形態に係る撮像装置の概略的な構成は、第1の実施の形態に係る撮像装置と同じである。ただし、次に説明するように、ホワイトバランスゲイン生成処理が第1の実施の形態とは異なる。本発明の第2の実施の形態における撮像装置のホワイトバランスゲイン生成処理のフローを図8に示す。図8では、図4と比較して、S801〜S804の処理が追加されている点で相違する。すなわち、図8に示されるように、本発明の第2の実施の形態では、S403で用いるコントラスト判定閾値(TH_cont)を予め設定せずに、S801〜S804の処理に従ってコントラスト判定閾値(TH_cont)を設定する点で、第1の実施の形態と相違する。
(Second Embodiment)
Hereinafter, an imaging apparatus according to a second embodiment of the present invention will be described with reference to the drawings. The schematic configuration of the imaging apparatus according to the second embodiment of the present invention is the same as that of the imaging apparatus according to the first embodiment. However, as will be described next, the white balance gain generation processing is different from that of the first embodiment. FIG. 8 shows a flow of white balance gain generation processing of the imaging apparatus according to the second embodiment of the present invention. FIG. 8 is different from FIG. 4 in that the processes of S801 to S804 are added. That is, as shown in FIG. 8, in the second embodiment of the present invention, the contrast determination threshold value (TH_cont) is set according to the processing of S801 to S804 without setting the contrast determination threshold value (TH_cont) used in S403 in advance. It differs from the first embodiment in that it is set.

本発明の第2の実施の形態における撮像装置のホワイトバランスゲイン生成処理について、図8に基づいて説明する。本発明の第2の実施の形態における撮像装置では、第1の実施の形態と同様に、異光源分離部7のコントラスト算出部7cが、輝度ブロック平均値に基づいて、各ブロックと隣接するブロックとの間のコントラスト値をブロック毎に算出する(S402)。その次に、第1の実施の形態と異なり、同一フレーム内の画面中の全ブロックのコントラスト値の中から最大のコントラスト値(cont_max)を求め、次式(6)に示す通り、cont_maxに係数Kを乗算した値をTH_contとする(S801)。
TH_cont=cont_max×K、(但し、0≦K≦1)・・・(6)
A white balance gain generation process of the imaging apparatus according to the second embodiment of the present invention will be described with reference to FIG. In the imaging apparatus according to the second embodiment of the present invention, as in the first embodiment, the contrast calculation unit 7c of the different light source separation unit 7 is adjacent to each block based on the luminance block average value. The contrast value between is calculated for each block (S402). Next, unlike the first embodiment, the maximum contrast value (cont_max) is obtained from the contrast values of all the blocks in the screen in the same frame, and the coefficient is calculated as shown in the following equation (6). A value obtained by multiplying K is TH_cont (S801).
TH_cont = cont_max × K (where 0 ≦ K ≦ 1) (6)

ここで、Kはcont_maxからTH_contを求めるための係数であり、取りうる値は0≦K≦1である。例えば、Kを1に近づければTH_contが大きくなり、S403でのコントラスト判定で抽出されるブロックは少なくなる。逆に0に近づけていくとTH_contが小さくなり、S403でのコントラスト判定で抽出されるブロックは多くなる。   Here, K is a coefficient for obtaining TH_cont from cont_max, and a possible value is 0 ≦ K ≦ 1. For example, if K is close to 1, TH_cont increases, and the number of blocks extracted by the contrast determination in S403 decreases. Conversely, as the value approaches 0, TH_cont decreases, and the number of blocks extracted by the contrast determination in S403 increases.

被写体が適正な明るさで撮影されている状態に対して、露光状態が全体的に暗いシーン(以下露出アンダー)や露光が過剰な状態(以下露出オーバー)等の条件により、コントラスト値自体も大きく変動する。このため、S403でのコントラスト判定を予め固定値として設定されたTH_contを用いて行う第1の実施の形態と比べて、第2の実施の形態では、cont_maxに対する係数Kを決定するだけでTH_contを様々な撮影状態に合わせて適切に制御できるので、露出アンダーや露出オーバーのような露光状態に関係なく安定して異光源領域の境界部を抽出することができる。   The contrast value itself is large due to conditions such as a scene with a dark overall exposure (hereinafter underexposed) or an overexposed state (hereinafter overexposed) when the subject is photographed at an appropriate brightness. fluctuate. Therefore, compared to the first embodiment in which the contrast determination in S403 is performed using TH_cont that is set in advance as a fixed value, in the second embodiment, TH_cont is simply determined by determining the coefficient K for cont_max. Since it can be appropriately controlled according to various shooting conditions, the boundary portion of the different light source region can be stably extracted regardless of the exposure state such as underexposure or overexposure.

このように、コントラスト閾値を同一フレーム内のコントラスト値の大きさに基づいて可変設定されるので、露光状態に関係なく、撮像シーンが変わった時などにも、自動的に、かつ、柔軟に、異光源領域の境界部を安定して検出することができる。   In this way, since the contrast threshold is variably set based on the size of the contrast value in the same frame, automatically and flexibly even when the imaging scene changes regardless of the exposure state, The boundary portion of the different light source region can be detected stably.

次に、異光源分離部7のコントラスト算出部7cが、上述した露光情報に基づいて、コントラスト判定閾値(TH_cont)の下限値を、コントラスト判定下限閾値(TH_cont_min)として設定する(S802)。なお、露光情報は、上述した通り、測光部8により測定される画像全体の明るさに基づいた情報である。   Next, the contrast calculation unit 7c of the different light source separation unit 7 sets the lower limit value of the contrast determination threshold value (TH_cont) as the contrast determination lower limit threshold value (TH_cont_min) based on the above-described exposure information (S802). The exposure information is information based on the brightness of the entire image measured by the photometry unit 8 as described above.

次に、異光源分離部7のコントラスト算出部7cが、TH_cont_minとTH_contとを比較する(S803)。ここで、TH_contがTH_cont_minを下回った場合は、TH_contをTH_cont_minに置き換える(S804)。これにより、コントラスト判定閾値(TH_cont)が過剰に下がる事を防止する事ができる。   Next, the contrast calculation unit 7c of the different light source separation unit 7 compares TH_cont_min with TH_cont (S803). If TH_cont falls below TH_cont_min, TH_cont is replaced with TH_cont_min (S804). As a result, it is possible to prevent the contrast determination threshold (TH_cont) from being excessively lowered.

逆に、TH_contがTH_cont_minを上回った場合は、S801で求めたTH_contをそのままS403の処理で使用する。ミックス光源時のコントラスト値と比較すると、単一光源時や屋内撮影時などの暗いシーンでのコントラスト値は小さいため、TH_contが過度に下がり、ミックス光源が存在しない場合のコントラスト誤判定をこの構成により防ぐ事ができる。そして、異光源分離部7の境界部検出部7dが、第1の実施の形態と同様に、S403以降の処理を行う。このようにして、露出アンダー状態および露出オーバー状態など撮影条件によらず、安定してミックス光源における異光源領域の境界部の検出を行う事ができる。   Conversely, if TH_cont exceeds TH_cont_min, TH_cont obtained in S801 is used as it is in the processing of S403. Compared with the contrast value when using a mixed light source, the contrast value in a dark scene such as when using a single light source or indoor shooting is small. It can be prevented. And the boundary part detection part 7d of the different light source separation part 7 performs the process after S403 similarly to 1st Embodiment. In this way, it is possible to stably detect the boundary portion of the different light source regions in the mix light source regardless of shooting conditions such as an underexposed state and an overexposed state.

以上のように、本実施の形態では、所定のコントラスト閾値を同一フレーム内のコントラスト値の大きさに基づいて変化させているので、露光状態に関係なく、撮像シーンが変わった時などにも、自動的に、かつ、柔軟に、異光源領域の境界部を安定して検出することができる。   As described above, in the present embodiment, since the predetermined contrast threshold is changed based on the magnitude of the contrast value in the same frame, even when the imaging scene changes regardless of the exposure state, The boundary portion of the different light source region can be stably detected automatically and flexibly.

また、本実施の形態では、コントラスト閾値(TH_cont)を、同一フレーム内のコントラスト値の大きさに基づいて設定する際に、コントラスト値(TH_cont)にコントラスト閾値の下限値を設けることにより、変化幅の小さい輝度変化を除外して、異なる光源により発生したコントラスト値に基づいて、異光源領域の境界部を検出することができる。   In the present embodiment, when the contrast threshold (TH_cont) is set based on the magnitude of the contrast value in the same frame, the change width is provided by providing the contrast threshold (TH_cont) with a lower limit value of the contrast threshold. Therefore, the boundary portion of the different light source region can be detected based on the contrast value generated by the different light sources.

また、本実施の形態では、画像の明るさに基づいて、コントラスト閾値(TH_cont)の下限値が設定されるので、被写体画像の明るさに基づいて、異光源領域境界部の検出の敏感度を制御できる。例えば、照度の低い屋内撮影条件下では、ミックス光源が存在する可能性の少ないので、コントラスト閾値の下限値を上げることで、画像信号を異光源領域に分離しないようにすることもできる。   In the present embodiment, since the lower limit value of the contrast threshold (TH_cont) is set based on the brightness of the image, the sensitivity of detection of the boundary between different light source regions is set based on the brightness of the subject image. Can be controlled. For example, under indoor shooting conditions with low illuminance, there is little possibility of a mixed light source, so the image signal can be prevented from being separated into different light source regions by increasing the lower limit of the contrast threshold.

以上、本発明の実施の形態を例示により説明したが、本発明の範囲はこれらに限定されるものではなく、請求項に記載された範囲内において目的に応じて変更・変形することが可能である。   The embodiments of the present invention have been described above by way of example, but the scope of the present invention is not limited to these embodiments, and can be changed or modified according to the purpose within the scope of the claims. is there.

上記実施態様では、画面分割測色部6における画面分割数と異光源領域分割部7における画面分割数を同じ例で説明したが、画面分割測色部6における画面分割数は、異光源領域分割部7における画面分割数に対して少なくならなければ、例えば図9のように分割数を増やす事も可能である。この構成により、RGBブロック平均値を求める際の空間分解能を向上させる事が可能となり、S412で行う白データの検出の精度も向上させる事ができる。   In the above embodiment, the screen division number in the screen division colorimetry unit 6 and the screen division number in the different light source area division unit 7 have been described with the same example. However, the screen division number in the screen division colorimetry unit 6 is different from the different light source area division. If the number of screen divisions in the unit 7 is not reduced, the number of divisions can be increased as shown in FIG. 9, for example. With this configuration, it is possible to improve the spatial resolution when obtaining the RGB block average value, and it is possible to improve the accuracy of the white data detection performed in S412.

また、上記実施態様において、例えば図10(a)に示されるように、明光源領域用の白判定エリアと暗光源領域用の判定エリアが互いに重なる設定や、白データ軌跡に沿った形に設定する事も可能である。この構成により、より細かなミックス光源に対してのホワイトバランス調整が可能となる。また、図10(b)に示されるように、光源による白データ軌跡の差が発生した場合にも、ホワイトバランス調整が可能となる。   In the above embodiment, for example, as shown in FIG. 10A, the white determination area for the bright light source region and the determination area for the dark light source region are set to overlap each other, or set along the white data locus. It is also possible to do. With this configuration, it is possible to adjust the white balance for a finer mix light source. Also, as shown in FIG. 10B, white balance adjustment is possible even when a difference in the white data trajectory due to the light source occurs.

また、上記実施態様において、異光源分離部7は、コントラスト値を求める際、光源によって発生した輝度変化を求め得る構成であれば、画面の分割方法を如何様にも変える事も可能である。この構成により、例えば分割数を増やす等ブロックの分解能を上げて、より精度の高いコントラスト判定を行う事も可能となる。   In the above embodiment, the different light source separation unit 7 can change the screen division method in any way as long as it can obtain the luminance change generated by the light source when obtaining the contrast value. With this configuration, for example, it is possible to increase the resolution of a block, for example, by increasing the number of divisions, and to perform more accurate contrast determination.

また、上記実施態様においては、白データが画面中に存在する場合について説明したが、白データが存在しない場合は、全画面で求めたRdata、GdataおよびBdataを用いてホワイトバランスゲインを求めても良い。この構成により、白データが画面中に存在しない場合にも画面全体の色情報からホワイトバランスゲインを求めることが可能となる。   In the above embodiment, the case where white data exists on the screen has been described. However, when white data does not exist, the white balance gain can be obtained using Rdata, Gdata, and Bdata obtained on the entire screen. good. With this configuration, it is possible to obtain the white balance gain from the color information of the entire screen even when white data does not exist in the screen.

なお、上記実施態様では、RGBの原色カラーフィルタを用いた撮像装置を例に説明したが、補色フィルタの撮像装置にも本発明を適用することができる。   In the above embodiment, the image pickup apparatus using the RGB primary color filters has been described as an example. However, the present invention can also be applied to an image pickup apparatus using a complementary color filter.

以上のように、本発明は、ミックス光源下であっても、光源の明るさに応じた異光源領域の各々に適した白データの検出を行い、各異光源領域中の画像に対応した適切なホワイトバランスゲインを入力画像毎に算出でき、適切なホワイトバランスの調整を行うことができるという効果を有し、デジタルスチルカメラやデジタルビデオカメラ等に代表される撮像装置に用いるホワイトバランス調整装置等に有用である。   As described above, the present invention detects white data suitable for each of the different light source regions according to the brightness of the light source even under the mixed light source, and appropriately detects the image corresponding to the image in each different light source region. White balance gain can be calculated for each input image, and an appropriate white balance adjustment can be performed, such as a white balance adjustment device used in an imaging device typified by a digital still camera or a digital video camera. Useful for.

本発明の第1の実施の形態における撮像装置を示すブロック図The block diagram which shows the imaging device in the 1st Embodiment of this invention 本発明の第1の実施の形態における異光源分離部のブロック図The block diagram of the different light source separation part in the 1st Embodiment of this invention 本発明の第1の実施の形態における領域別白データ検出部のブロック図Block diagram of the area-specific white data detection unit in the first embodiment of the present invention 本発明の第1の実施の形態における撮像装置のホワイトバランスゲイン生成処理のフロー図FIG. 3 is a flowchart of white balance gain generation processing of the imaging apparatus according to the first embodiment of the present invention. (a)異光源分離部で分割されたブロックの例を示す図 (b)ブロック1を注目ブロックとしたときの隣接ブロックを示す図 (c)ブロック2を注目ブロックとしたときの隣接ブロックを示す図 (d)ブロック8を注目ブロックとしたときの隣接ブロックを示す図 (e)ブロック9を注目ブロックとしたときの隣接ブロックを示す図 (f)ブロック10を注目ブロックとしたときの隣接ブロックを示す図(A) The figure which shows the example of the block divided | segmented by the different light source separation part (b) The figure which shows an adjacent block when making the block 1 into an attention block (c) The adjacent block when making the block 2 into an attention block is shown (D) A diagram showing an adjacent block when the block 8 is the target block (e) A diagram showing an adjacent block when the block 9 is the target block (f) An adjacent block when the block 10 is the target block Illustration (a)撮像画像の例を示す図 (b)画像をブロック毎に分割した状態を示す図 (c)異光源領域の境界部として検出されたブロックを示す図 (d)分離後の明光源領域および暗光源領域を示す図(A) The figure which shows the example of a captured image (b) The figure which shows the state which divided | segmented the image for every block (c) The figure which shows the block detected as a boundary part of a different light source area (d) Bright light source area | region after isolation | separation And dark light source area (a)領域別白判定エリアの一例を示す図 (b)高照度時かつ異光源領域が存在する場合の領域別白判定エリアを示す図 (c)中照度時かつ異光源領域が存在する場合の領域別白判定エリアを示す図 (d)低照度時かつ異光源領域が存在する場合の領域別白判定エリアを示す図 (e)高照度時かつ異光源領域が存在しない場合の単一白判定エリアを示す図 (f)中照度時かつ異光源領域が存在しない場合の単一白判定エリアを示す図 (g)低照度時かつ異光源領域が存在しない場合の単一白判定エリアを示す図(A) The figure which shows an example of the white judgment area according to area (b) The figure which shows the white judgment area according to area when there is a high illuminance and different light source area (c) When there is a different light source area at medium illuminance (D) The figure which shows the white judgment area according to area | region at the time of low illuminance and when a different light source area exists (e) Single white when there is no different light source area at the time of high illuminance The figure which shows a judgment area (f) The figure which shows a single white judgment area at the time of medium illumination intensity and when a different light source area does not exist (g) The single white judgment area at the time of low illumination intensity and when a different light source area does not exist is shown Figure 本発明の第2の実施の形態における撮像装置のホワイトバランスゲイン生成処理のフロー図Flowchart of white balance gain generation processing of the imaging apparatus according to the second embodiment of the present invention 画面分割測色部で設定可能なブロックの分割の一例を示す図The figure which shows an example of the division | segmentation of the block which can be set in a screen division | segmentation colorimetry part (a) 設定可能な異光源領域毎の白判定エリアの一例を示す図 (b) 設定可能な異光源領域毎の白判定エリアの一例を示す図(A) The figure which shows an example of the white determination area for every settable different light source area (b) The figure which shows an example of the white judgment area for every settable different light source area

符号の説明Explanation of symbols

1 レンズ
2 撮像素子
3 AGC部
4 A/D変換部
5 ホワイトバランス調整部
6 画面分割測色部
7 異光源領域分離部
8 測光部
9 制御部
10 画像処理部
11 異光源領域選択部
12 異光源領域白データ検出部
13A 明光源領域用白データ検出部
13B 暗光源領域用白データ検出部
14 ホワイトバランスゲイン算出部
100 領域別白検出部
200 ホワイトバランスゲイン生成部
1000 撮像装置
DESCRIPTION OF SYMBOLS 1 Lens 2 Image sensor 3 AGC part 4 A / D conversion part 5 White balance adjustment part 6 Screen division | segmentation colorimetry part 7 Different light source area separation part 8 Photometry part 9 Control part 10 Image processing part 11 Different light source area selection part 12 Different light source Area white data detection unit 13A Bright light source region white data detection unit 13B Dark light source region white data detection unit 14 White balance gain calculation unit 100 White detection unit by region 200 White balance gain generation unit 1000 Imaging device

Claims (12)

撮像された画像に対してホワイトバランスの調整を行う撮像装置であって、
画像信号のコントラスト値に基づいて、前記画像信号を光源の明るさに応じた複数の異光源領域に分離する異光源分離部と、
前記異光源分離部により分離された前記異光源領域毎に、前記画像中の白エリア部分を白データとして検出する白データ検出部と、
前記白データ検出部により検出された異光源領域毎の白データに基づいて、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出するホワイトバランスゲイン算出部と、
前記ホワイトバランスゲイン算出部により算出される前記ホワイトバランスゲインに基づいて、前記画像に対してホワイトバランスの調整を行うホワイトバランス調整部とを備えたことを特徴とする撮像装置。
An imaging device that performs white balance adjustment on a captured image,
A different light source separation unit for separating the image signal into a plurality of different light source regions according to the brightness of the light source based on a contrast value of the image signal;
For each different light source region separated by the different light source separation unit, a white data detection unit that detects a white area portion in the image as white data;
A white balance gain calculation unit that calculates a white balance gain for adjusting white balance based on white data for each different light source region detected by the white data detection unit;
An image pickup apparatus comprising: a white balance adjustment unit configured to adjust a white balance for the image based on the white balance gain calculated by the white balance gain calculation unit.
前記ホワイトバランスゲイン算出部は、
前記異光源領域毎の白データを、前記異光源領域の面積比に応じて合成することにより、前記ホワイトバランスゲインを算出することを特徴とする請求項1に記載の撮像装置。
The white balance gain calculation unit
The imaging apparatus according to claim 1, wherein the white balance gain is calculated by combining white data for each different light source region in accordance with an area ratio of the different light source region.
前記異光源分離部は、
前記画像を分割した複数のブロック毎の輝度に基づいて、各ブロックと隣接するブロックとの間のコントラスト値を算出するコントラスト算出部と、
前記コントラスト算出部で算出されたコントラスト値と、所定のコントラスト閾値とを比較することにより、前記異光源領域の境界部を検出する境界部検出部と、
前記境界部検出部により検出される前記異光源領域の境界部の情報に基づいて、前記画像信号を前記異光源領域に分離する画像信号分離部とを備えたことを特徴とする請求項1に記載の撮像装置。
The different light source separation unit is
A contrast calculating unit that calculates a contrast value between each block and an adjacent block based on the luminance of each of the plurality of blocks obtained by dividing the image;
A boundary detection unit that detects a boundary of the different light source region by comparing the contrast value calculated by the contrast calculation unit with a predetermined contrast threshold;
The image signal separation unit according to claim 1, further comprising: an image signal separation unit that separates the image signal into the different light source regions based on information on a boundary part of the different light source regions detected by the boundary detection unit. The imaging device described.
前記コントラスト算出部は、前記各ブロックの輝度と、前記各ブロックに隣接するブロックの輝度との差分値の最大値に基づいて、前記コントラスト値を算出することを特徴とする請求項1に記載の撮像装置。   The said contrast calculation part calculates the said contrast value based on the maximum value of the difference value of the brightness | luminance of each said block, and the brightness | luminance of the block adjacent to each said block. Imaging device. 前記画像信号分離部は、前記異光源領域の境界部におけるブロックの平均輝度値の代表値に基づいて、前記画像信号を前記異光源領域に分離することを特徴とする請求項3に記載の撮像装置。   4. The imaging according to claim 3, wherein the image signal separation unit separates the image signal into the different light source regions based on a representative value of an average luminance value of a block at a boundary portion of the different light source regions. apparatus. 前記画像信号分離部は、前記異光源領域の境界部におけるブロックの平均輝度値の最小値に基づいて、前記画像信号を前記異光源領域に分離することを特徴とする請求項3に記載の撮像装置。   4. The imaging according to claim 3, wherein the image signal separation unit separates the image signal into the different light source regions based on a minimum value of an average luminance value of a block at a boundary portion of the different light source regions. apparatus. 前記境界部検出部は、前記所定のコントラスト閾値を、同一フレーム内のコントラスト値の大きさに基づいて変化させることを特徴とする請求項3に記載の撮像装置。   The imaging apparatus according to claim 3, wherein the boundary detection unit changes the predetermined contrast threshold based on a contrast value in the same frame. 前記境界部検出部が、前記所定のコントラスト閾値を、同一フレーム内のコントラスト値の大きさに基づいて設定する際に、前記所定のコントラスト閾値には下限値が設けられていることを特徴とする請求項7に記載の撮像装置。   When the boundary detection unit sets the predetermined contrast threshold based on the magnitude of the contrast value in the same frame, the predetermined contrast threshold is provided with a lower limit value. The imaging device according to claim 7. 前記境界部検出部は、前記画像の明るさに基づいて、前記コントラスト閾値の下限値を設定することを特徴とする請求項8に記載の撮像装置。   The imaging apparatus according to claim 8, wherein the boundary detection unit sets a lower limit value of the contrast threshold based on brightness of the image. 前記異光源分離部が前記画像信号を複数の異光源領域に分離できない場合、前記白データ検出部は、前記画像全体中の白エリア部分を検出することを特徴とする請求項1に記載の撮像装置。   The imaging according to claim 1, wherein when the different light source separation unit cannot separate the image signal into a plurality of different light source regions, the white data detection unit detects a white area portion in the entire image. apparatus. 画像に対してホワイトバランスの調整を行うホワイトバランス調整装置であって、
画像信号のコントラストに基づいて、前記画像信号を光源の明るさに応じた複数の異光源領域に分離する異光源分離部と、
前記異光源分離部により分離された前記異光源領域毎に、前記画像中の白エリア部分を白データとして検出する白データ検出部と、
前記白データ検出部により検出された異光源領域毎の白データに基づいて、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出するホワイトバランスゲイン算出部と、
前記ホワイトバランスゲイン算出部により算出される前記ホワイトバランスゲインに基づいて、前記画像に対してホワイトバランスの調整を行うホワイトバランス調整部とを備えたことを特徴とするホワイトバランス調整装置。
A white balance adjustment device for adjusting white balance on an image,
A different light source separation unit that separates the image signal into a plurality of different light source regions according to the brightness of the light source based on the contrast of the image signal;
For each different light source region separated by the different light source separation unit, a white data detection unit that detects a white area portion in the image as white data;
A white balance gain calculation unit that calculates a white balance gain for adjusting white balance based on white data for each different light source region detected by the white data detection unit;
A white balance adjustment device comprising: a white balance adjustment unit configured to adjust a white balance for the image based on the white balance gain calculated by the white balance gain calculation unit.
画像に対してホワイトバランスの調整を行うホワイトバランス調整方法であって、
画像信号のコントラストに基づいて、前記画像信号を光源の明るさに応じた複数の異光源領域に分離するステップと、
前記複数の異光源領域に分離するステップにより分離された前記異光源領域毎に、前記画像中の白エリア部分を白データとして検出するステップと、
前記白データを検出するステップにより検出された異光源領域毎の白データに基づいて、ホワイトバランスの調整を行うためのホワイトバランスゲインを算出するステップと、
前記ホワイトバランスゲインを算出するステップにより算出される前記ホワイトバランスゲインに基づいて、前記画像に対してホワイトバランスの調整を行うステップとを含むことを特徴とするホワイトバランス調整方法。
A white balance adjustment method for adjusting white balance on an image,
Separating the image signal into a plurality of different light source regions according to the brightness of the light source based on the contrast of the image signal;
Detecting a white area portion in the image as white data for each of the different light source regions separated by the step of separating the plurality of different light source regions;
Calculating a white balance gain for adjusting white balance based on the white data for each different light source region detected by the step of detecting the white data;
Adjusting the white balance of the image based on the white balance gain calculated in the step of calculating the white balance gain.
JP2007058205A 2007-03-08 2007-03-08 Imaging apparatus, white balance control device and white balance control method Pending JP2008219838A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007058205A JP2008219838A (en) 2007-03-08 2007-03-08 Imaging apparatus, white balance control device and white balance control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007058205A JP2008219838A (en) 2007-03-08 2007-03-08 Imaging apparatus, white balance control device and white balance control method

Publications (1)

Publication Number Publication Date
JP2008219838A true JP2008219838A (en) 2008-09-18

Family

ID=39839273

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007058205A Pending JP2008219838A (en) 2007-03-08 2007-03-08 Imaging apparatus, white balance control device and white balance control method

Country Status (1)

Country Link
JP (1) JP2008219838A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101030393B1 (en) 2009-02-20 2011-04-20 인하대학교 산학협력단 Apparatus and method for adjusting white balance of digital image
KR101315300B1 (en) 2008-11-05 2013-10-04 삼성테크윈 주식회사 Apparatus and method for compensating white
KR101324246B1 (en) 2008-12-04 2013-11-01 삼성테크윈 주식회사 Method of white balancing within digital image processing apparatus
JP2015192152A (en) * 2014-03-27 2015-11-02 リコーイメージング株式会社 White balance adjustment device, white balance adjustment method and imaging device
JP2015192179A (en) * 2014-03-27 2015-11-02 リコーイメージング株式会社 White balance control device, imaging apparatus, and white balance control method
US10491875B2 (en) 2015-09-09 2019-11-26 Samsung Electronics Co., Ltd. Image processing apparatus and image processing method
CN111405260A (en) * 2020-03-25 2020-07-10 福州英迪格成像技术有限公司 Self-adaptive white balance control method and system thereof

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101315300B1 (en) 2008-11-05 2013-10-04 삼성테크윈 주식회사 Apparatus and method for compensating white
KR101324246B1 (en) 2008-12-04 2013-11-01 삼성테크윈 주식회사 Method of white balancing within digital image processing apparatus
KR101030393B1 (en) 2009-02-20 2011-04-20 인하대학교 산학협력단 Apparatus and method for adjusting white balance of digital image
JP2015192152A (en) * 2014-03-27 2015-11-02 リコーイメージング株式会社 White balance adjustment device, white balance adjustment method and imaging device
JP2015192179A (en) * 2014-03-27 2015-11-02 リコーイメージング株式会社 White balance control device, imaging apparatus, and white balance control method
US10491875B2 (en) 2015-09-09 2019-11-26 Samsung Electronics Co., Ltd. Image processing apparatus and image processing method
CN111405260A (en) * 2020-03-25 2020-07-10 福州英迪格成像技术有限公司 Self-adaptive white balance control method and system thereof
CN111405260B (en) * 2020-03-25 2022-01-18 福州英迪格成像技术有限公司 Self-adaptive white balance control method and system thereof

Similar Documents

Publication Publication Date Title
JP3849834B2 (en) Auto white balance control method
US9148638B2 (en) Digital photographing apparatus
CN100553301C (en) The modification method of brightness
JP4042432B2 (en) Imaging device
JP2004328140A (en) Solid state imaging device and digital camera
JP4680753B2 (en) Image processing method, image processing apparatus, and imaging apparatus
JP2008219838A (en) Imaging apparatus, white balance control device and white balance control method
US8810681B2 (en) Image processing apparatus and image processing method
US9036046B2 (en) Image processing apparatus and method with white balance correction
KR100967091B1 (en) Method for adjusting white balance of digital image device
JP3821729B2 (en) Digital camera
JP2015005927A (en) Image processing apparatus and control method of the same
JP2003333616A (en) White balance adjustment method, image pickup device, program, and storage medium
JP2005033609A (en) Solid-state image-taking device and digital camera
JP4306306B2 (en) White balance control method and imaging apparatus
JP5875307B2 (en) Imaging apparatus and control method thereof
JP3958700B2 (en) Digital camera
JPH07284118A (en) White balance device for video camera
JP6552165B2 (en) Image processing apparatus, control method therefor, and control program
JP4396225B2 (en) White balance control device and electronic device
JP2004186876A (en) Digital camera
JP2011188186A (en) Device for calculating white balance gain
JP5791454B2 (en) Imaging apparatus and control method thereof
JP4458114B2 (en) Imaging device
JP2004349930A (en) Digital camera