JP4277315B2 - White balance correction apparatus and method - Google Patents

White balance correction apparatus and method Download PDF

Info

Publication number
JP4277315B2
JP4277315B2 JP2004334702A JP2004334702A JP4277315B2 JP 4277315 B2 JP4277315 B2 JP 4277315B2 JP 2004334702 A JP2004334702 A JP 2004334702A JP 2004334702 A JP2004334702 A JP 2004334702A JP 4277315 B2 JP4277315 B2 JP 4277315B2
Authority
JP
Japan
Prior art keywords
color
value
white balance
balance correction
screen
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2004334702A
Other languages
Japanese (ja)
Other versions
JP2006148464A (en
Inventor
玄太 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2004334702A priority Critical patent/JP4277315B2/en
Publication of JP2006148464A publication Critical patent/JP2006148464A/en
Application granted granted Critical
Publication of JP4277315B2 publication Critical patent/JP4277315B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明はホワイトバランス補正装置及び方法に係り、特にカラーの画像信号に対して適正なホワイトバランス補正を施すことができるホワイトバランス補正装置及び方法に関する。   The present invention relates to a white balance correction apparatus and method, and more particularly to a white balance correction apparatus and method capable of performing appropriate white balance correction on a color image signal.

カラー撮像素子によって得られた画像信号にホワイトバランス補正を施す際、光源色は低彩度である確率が高いことに着目し、撮影画面内で低彩度の部分を検出し、この低彩度の部分の色温度に依存した補正値を用いてホワイトバランス補正を行うようにしたものが知られている(例えば特許文献1を参照)。   When performing white balance correction on the image signal obtained by the color image sensor, paying attention to the high probability that the light source color is low in saturation, this low saturation is detected in the shooting screen. There is known a method in which white balance correction is performed using a correction value depending on the color temperature of the portion (for example, see Patent Document 1).

ところで、ホワイトバランス補正を行う際には、物体色が光源色と誤判別されることにより過補正されてしまうという、いわゆるカラーフェリア現象を考慮する必要がある。具体的には、画面中に光源色によく似た色合いの物体色が入ってくると、そのような物体色が光源色と誤判別されて過補正されてしまう。   By the way, when performing white balance correction, it is necessary to consider a so-called color feria phenomenon in which an object color is erroneously determined as a light source color and is overcorrected. Specifically, when an object color having a color similar to the light source color enters the screen, such an object color is erroneously determined as the light source color and overcorrected.

そこで、従来は、例えば、カラーフェリア現象を軽減するためにホワイトバランスを完全には補正しないで、補正量を本来の例えば50〜60%にとどめるといったような、適正なホワイトバランス補正をある程度犠牲にしてしまうような対策が取られていた。   Therefore, conventionally, for example, the white balance is not completely corrected in order to reduce the color feria phenomenon, and an appropriate white balance correction such as keeping the correction amount to 50% to 60%, for example, is sacrificed to some extent. Measures were taken to end up.

なお、本発明者は、画面の各部分の色情報(積算値)について特定の表色座標上における分布を検出し、その表色座標上でグレーに最も近い部分を最も光源らしいと判断し、この最も光源らしい部分からの表色座標上での距離に基づいてホワイトバランスを補正する方法を既に提案している(特許文献2を参照)。
特開平6−98335号公報 特開2004−274344号公報(特に明細書の第0074〜0085欄)
The inventor detects a distribution on a specific color coordinate for color information (integrated value) of each part of the screen, determines that the portion closest to gray on the color coordinate is the most likely light source, A method for correcting the white balance based on the distance on the color coordinate from the most likely light source has already been proposed (see Patent Document 2).
JP-A-6-98335 JP 2004-274344 A (particularly columns 0074 to 0085 of the specification)

オレンジ、イエロー系の物体色が存在するシーンでは、このような物体色をタングステン光源色と誤判別してしまい、例えばオレンジ、イエローがグレーに補正され、本来グレーであったものは青っぽく過補正されてしまうことになる。   In a scene where orange and yellow object colors exist, such an object color is misidentified as a tungsten light source color. For example, orange and yellow are corrected to gray, and what was originally gray is overcorrected to be bluish. It will be.

また、スポット光は部分光であって広範囲に光を照らしているわけではないので、そのようなスポット光を基準にホワイトバランス補正値を算出すると、不適切なホワイトバランス補正が施されてしまうことになる。   Also, since spot light is partial light and does not illuminate a wide area, calculating the white balance correction value based on such spot light may result in inappropriate white balance correction. become.

また、特に室内シーンにおいて、画面中で最も低彩度の部分(すなわちグレーに最も近い部分)が光源ではないというシーンが存在している。例えば、イエロー系光源下における青色物体色は、光源色と物体色とが互いに対称色相の関係であるがために減色し、実際には暗いグレーに近づいてしまう。したがって、画面中で最もグレーに近い部分を最も光源らしいと仮定したとすると、物体色を基準にホワイトバランスを補正することになるので、最適なホワイトバランス補正が行われないという場合も生じてしまう。なお、光源と物体色との組み合わせが、昼光と黄色、水銀灯光源と赤色系、赤色系光源と緑シアン、といった場合にも、減法混色または加法混色されて、物体色であるか光源色であるかの判断が困難になる。   In particular, in an indoor scene, there is a scene in which the lowest saturation portion (that is, the portion closest to gray) in the screen is not a light source. For example, a blue object color under a yellow light source is reduced in color because the light source color and the object color have a symmetric hue relationship with each other, and actually approaches a dark gray color. Therefore, assuming that the portion closest to gray on the screen is most likely the light source, the white balance is corrected based on the object color, so there may be cases where the optimal white balance correction is not performed. . In addition, even when the combination of the light source and the object color is daylight and yellow, the mercury lamp light source and red, the red light source and green cyan, the subtractive or additive color mixture is applied to the object color or the light source color. It becomes difficult to judge whether there is any.

本発明はこのような事情に鑑みてなされたもので、カラーフェリア現象を防止するとともにシーンに応じた最適なホワイトバランス補正を施すことができ、もって画質を改善することができるホワイトバランス補正装置及び方法を提供することを目的とする。   The present invention has been made in view of such circumstances, and a white balance correction device capable of preventing color feria phenomenon and performing optimum white balance correction according to the scene, thereby improving image quality, and It aims to provide a method.

前記目的を達成するために、請求項1に記載に発明は、各色別の画像信号に基づいてホワイトバランスの補正値を算出し、該ホワイトバランスの補正値に基づいて前記画像信号のホワイトバランスを補正するホワイトバランス補正装置であって、画面を分割してなる各部分の色情報を前記画面の各部分内の画像信号に基づいて検出する手段と、前記画面の各部分の明るさ情報を検出する手段と、前記画面内の複数の色情報のうちで所定の光源色に近似している物体色らしい色情報を前記画面の各部分の明るさ情報に基づいて除去する色情報除去手段と、前記所定の光源色に近似している物体色らしいものが除去された複数の色情報に基づいて前記ホワイトバランスの補正値を算出するホワイトバランス補正値算出手段と、を備え、前記画像信号は、赤、緑、青の各色別のR信号、G信号およびB信号からなり、前記色情報は、前記画面の各部分ごとの前記B信号の積算値と前記G信号の積算値との比であるB/G値を含み、前記色情報除去手段は、前記B/G値が閾値以下であり、且つ、前記明るさ情報が前記B/G値ごとに定まる値以上である場合、前記色情報を除去する構成になっている。 In order to achieve the object, the invention according to claim 1 calculates a white balance correction value based on an image signal for each color, and determines the white balance of the image signal based on the white balance correction value. A white balance correction device for correcting, a means for detecting color information of each part obtained by dividing a screen based on an image signal in each part of the screen, and detecting brightness information of each part of the screen Color information removing means for removing color information that seems to be an object color that approximates a predetermined light source color among a plurality of color information in the screen based on brightness information of each part of the screen; and a white balance correction value calculating means for calculating a correction value of the white balance based on the plurality of color information as likely object color that approximates the predetermined light source color has been removed, the image signal Is composed of R, G, and B signals for each color of red, green, and blue, and the color information is a ratio of an integrated value of the B signal and an integrated value of the G signal for each portion of the screen. If the B / G value is equal to or less than a threshold value and the brightness information is equal to or greater than a value determined for each B / G value, the color information removing unit includes the B / G value. It is configured to remove information .

この構成によれば、例えばオレンジ、イエロー系の物体色をタングステン光源色と誤判別しやすいシーンであっても、そのような所定の光源色に近似している物体色らしい色情報が明るさ情報に基づいて除去された後にホワイトバランス補正値が算出されるので、カラーフェリア現象が防止されるとともにシーンに応じた最適なホワイトバランス補正が施されることになる。   According to this configuration, even in a scene in which, for example, an orange or yellow object color is easily misidentified as a tungsten light source color, color information that seems to be an object color that approximates such a predetermined light source color is brightness information. Since the white balance correction value is calculated after being removed based on the above, the color feria phenomenon is prevented and the optimum white balance correction according to the scene is performed.

請求項に記載の発明は、各色別の画像信号に基づいてホワイトバランスの補正値を算出し、該ホワイトバランスの補正値に基づいて前記画像信号のホワイトバランスを補正するホワイトバランス補正方法であって、画面を分割してなる各部分の色情報を前記画面の各部分内の画像信号に基づいて検出するステップと、前記画面の各部分の明るさ情報を検出するステップと、前記画面内の複数の色情報のうちで所定の光源色に近似している物体色らしい色情報を前記画面の各部分の明るさ情報に基づいて除去する色情報除去ステップと、前記所定の光源色に近似している物体色らしいものが除去された複数の色情報に基づいて前記ホワイトバランスの補正値を算出するステップと、を含み、前記画像信号は、赤、緑、青の各色別のR信号、G信号およびB信号からなり、前記色情報は、前記画面の各部分ごとの前記B信号の積算値と前記G信号の積算値との比であるB/G値を含み、前記色情報除去ステップにて、前記B/G値が閾値以下であり、且つ、明るさ情報が前記B/G値ごとに定まる値以上である場合、前記色情報を除去する構成になっている。 The invention according to claim 2 is a white balance correction method for calculating a white balance correction value based on an image signal for each color and correcting the white balance of the image signal based on the white balance correction value. Detecting the color information of each part obtained by dividing the screen based on the image signal in each part of the screen; detecting the brightness information of each part of the screen; A color information removal step of removing color information that is likely to be an object color that approximates a predetermined light source color from among a plurality of color information based on brightness information of each part of the screen, and approximates the predetermined light source color comprises a step of calculating a correction value of the white balance based on the plurality of color information by what seems object color which has been removed, the image signal is red, green, each color of R signals of blue, G The color information includes a B / G value that is a ratio of the integrated value of the B signal and the integrated value of the G signal for each part of the screen, and the color information removing step When the B / G value is equal to or smaller than a threshold value and the brightness information is equal to or larger than a value determined for each B / G value, the color information is removed .

本発明によれば、カラーフェリア現象を防止するとともにシーンに応じた最適なホワイトバランス補正を施すことができ、画質を改善することができる。   According to the present invention, it is possible to prevent a color feria phenomenon and perform an optimal white balance correction according to the scene, thereby improving image quality.

以下、添付図面に従って、本発明を実施するための最良の形態について詳細に説明する。   The best mode for carrying out the present invention will be described below in detail with reference to the accompanying drawings.

図1は、本発明に係るホワイトバランス補正装置の一実施形態としてのカメラ10の概略構成を示すブロック図である。   FIG. 1 is a block diagram showing a schematic configuration of a camera 10 as an embodiment of a white balance correction apparatus according to the present invention.

このカメラ10は、静止画や動画の撮影機能を備えたデジタルカメラである。   The camera 10 is a digital camera having a still image and moving image shooting function.

カメラ10全体の動作は中央処理装置(CPU)12によって統括制御される。CPU12は、所定のプログラムに従って本カメラ10を制御する制御手段として機能する。例えば、自動露出(AE)制御処理、自動焦点調節(AF)制御処理、オートホワイトバランス(AWB)制御処理を行う。   The overall operation of the camera 10 is centrally controlled by a central processing unit (CPU) 12. The CPU 12 functions as a control unit that controls the camera 10 according to a predetermined program. For example, automatic exposure (AE) control processing, automatic focus adjustment (AF) control processing, and auto white balance (AWB) control processing are performed.

バス14を介してCPU12と接続されたROM16には、CPU12が実行するプログラムやプログラムの動作に必要な各種の固定データなどが格納されている。メモリ(SDRAM)18は、CPU12が行う各種制御処理用の領域として利用されるとともに、画像データの一時記憶領域として利用される。VRAM20は、画像表示用の画像データを一時記憶するものであり、A領域20AとB領域20Bを有する。   A ROM 16 connected to the CPU 12 via the bus 14 stores a program executed by the CPU 12 and various fixed data necessary for the operation of the program. The memory (SDRAM) 18 is used as an area for various control processes performed by the CPU 12 and is used as a temporary storage area for image data. The VRAM 20 temporarily stores image data for image display, and has an A area 20A and a B area 20B.

カメラ10には、モード選択スイッチ22および撮影ボタン24が設けられている。また、メニューキー、OKキー、十字キー、キャンセルキーなどからなる画面操作キー26が設けられている。これら各種の操作手段(22、24、26)からの信号はCPU12に入力され、CPU12は、入力信号に基づいてカメラ10の各部を制御し、レンズ駆動制御、撮像制御、画像信号処理制御、画像記録制御、画像再生制御などの制御を行うようになっている。   The camera 10 is provided with a mode selection switch 22 and a shooting button 24. A screen operation key 26 including a menu key, an OK key, a cross key, a cancel key, and the like is provided. Signals from these various operation means (22, 24, 26) are input to the CPU 12, and the CPU 12 controls each part of the camera 10 based on the input signals, and controls lens drive control, imaging control, image signal processing control, and image. Control such as recording control and image reproduction control is performed.

モード選択スイッチ22は、被写体を撮影して画像データを所定の記録メディア32に記録するための撮影モードと、記録メディア32に記録された画像データを再生するための再生モードとを切り替えるための操作手段である。可動切片22Aが接点aに接続されると静止画撮影モードが設定され、可動切片22Aが接点bに接続されると動画撮影モードが設定され、可動切片22Aが接点cに接続されると再生モードが設定されるようになっている。撮影ボタン24は、撮影準備指示や撮影開始指示を入力するための操作手段であり、半押し時にオンするS1スイッチと、全押し時にオンするS2スイッチとを有する二段ストローク式のスイッチで構成されている。メニューキーは、画像表示装置28の画面上にメニューを表示させる指示を入力するための操作手段である。OKキーは、選択された内容の確定および実行などの指示を入力するための操作手段である。十字キーは、メニュー内の項目の選択などのために上下左右4方向の指示を入力する操作手段である。キャンセルキーは、選択内容や指示内容などの取消の指示を入力する操作手段である。   The mode selection switch 22 is an operation for switching between a photographing mode for photographing a subject and recording image data on a predetermined recording medium 32 and a reproduction mode for reproducing image data recorded on the recording medium 32. Means. When the movable piece 22A is connected to the contact point a, the still image shooting mode is set. When the movable piece 22A is connected to the contact point b, the moving image shooting mode is set. When the movable piece 22A is connected to the contact point c, the reproduction mode is set. Is set. The shooting button 24 is an operation means for inputting a shooting preparation instruction and a shooting start instruction, and is composed of a two-stroke switch having an S1 switch that is turned on when half-pressed and an S2 switch that is turned on when fully pressed. ing. The menu key is an operation means for inputting an instruction to display a menu on the screen of the image display device 28. The OK key is an operation means for inputting an instruction to confirm and execute the selected content. The cross key is an operation means for inputting instructions in four directions, up, down, left, and right for selecting items in the menu. The cancel key is an operation means for inputting a cancellation instruction such as selection contents and instruction contents.

画像表示装置28は、カラー表示可能な液晶ディスプレイ(LCD)で構成されている。画像表示装置28は、撮影時に画角確認用の電子ファインダとして使用できるとともに、記録済み画像を再生表示する手段として利用される。また、画像表示装置28は、ユーザインタフェース用表示画面としても利用され、必要に応じてメニューや選択項目、設定内容などの情報が表示される。   The image display device 28 is composed of a liquid crystal display (LCD) capable of color display. The image display device 28 can be used as an electronic viewfinder for checking the angle of view at the time of shooting, and is used as a means for reproducing and displaying a recorded image. The image display device 28 is also used as a user interface display screen, and displays information such as menus, selection items, and setting contents as necessary.

メディアコントローラ34は、メディアソケット30に装着される記録メディア32に適した入出力信号の受け渡しを行うために所定の信号変換を行う。   The media controller 34 performs predetermined signal conversion in order to exchange input / output signals suitable for the recording medium 32 mounted in the media socket 30.

USBインタフェース部36は、パソコンその他の外部機器をカメラ10に接続するための手段である。図示せぬUSBケーブルを用いてカメラ10と外部機器を接続することにより、外部機器との間でデータの受け渡しが可能となる。もちろん、通信方式はUSBに限らず、IEE1394や無線その他の通信方式を適用してもよい。   The USB interface unit 36 is a means for connecting a personal computer or other external device to the camera 10. By connecting the camera 10 and an external device using a USB cable (not shown), it is possible to exchange data with the external device. Of course, the communication method is not limited to USB, and IEE1394 or wireless or other communication methods may be applied.

次にカメラ10の撮影機能について説明する。   Next, the shooting function of the camera 10 will be described.

モード選択スイッチ22によって撮影モードが選択されると、CCD38を含む撮影に関する部分(撮影部)に電源が供給され、撮影可能な状態になる。なお、撮影モードには、前述のように静止画撮影モードと動画撮影モードがあるが、以下では本発明の理解を容易にするために、主として撮影モードとして静止画撮影モードが設定された場合について説明する。   When the shooting mode is selected by the mode selection switch 22, power is supplied to the shooting-related portion (shooting unit) including the CCD 38, and shooting is ready. As described above, the shooting modes include the still image shooting mode and the moving image shooting mode. However, in order to facilitate the understanding of the present invention, the case where the still image shooting mode is mainly set as the shooting mode will be described below. explain.

レンズユニット40は、フォーカスレンズを含む撮影レンズ42とアイリスによる絞り兼用メカシャッタ44とを含む光学ユニットである。レンズユニット40は、CPU12によって制御されるレンズ駆動部46、絞り駆動部48によって電動駆動されることにより、ズーム制御、フォーカス制御およびアイリス制御が行われる。レンズユニット40を通過した光は、CCD38の受光面に結像される。CCD38の受光面には多数のフォトダイオード(受光素子)が二次元的に配列されており、各フォトダイオードに対応して赤(R)、緑(G)、青(B)の原色カラーフィルタが所定の配列構造(ベイヤ、Gストライプなど)で配置されている。また、CCD38は、電荷蓄積時間(シャッタスピード)を制御する、いわゆる電子シャッタ機能を有している。CPU12は、タイミングジェネレータ50を介してCCD38での電荷蓄積時間を制御する。CCD38の受光面に結像された被写体像は、各フォトダイオードによって入射光量に応じた量の信号電荷に変換される。各フォトダイオードに蓄積された信号電荷は、CPU12の指示に従いタイミングジェネレータ50から与えられる駆動パルスに基づいて信号電荷に応じた電圧信号(R,G,B各色別の画像信号)として順次読み出される。   The lens unit 40 is an optical unit that includes a photographic lens 42 including a focus lens and an iris combined mechanical shutter 44 using an iris. The lens unit 40 is electrically driven by a lens driving unit 46 and a diaphragm driving unit 48 controlled by the CPU 12, thereby performing zoom control, focus control, and iris control. The light that has passed through the lens unit 40 is imaged on the light receiving surface of the CCD 38. A large number of photodiodes (light receiving elements) are two-dimensionally arranged on the light receiving surface of the CCD 38, and red (R), green (G), and blue (B) primary color filters corresponding to the respective photodiodes. They are arranged in a predetermined arrangement structure (Bayer, G stripe, etc.). The CCD 38 has a so-called electronic shutter function for controlling the charge accumulation time (shutter speed). The CPU 12 controls the charge accumulation time in the CCD 38 via the timing generator 50. The subject image formed on the light receiving surface of the CCD 38 is converted into a signal charge of an amount corresponding to the amount of incident light by each photodiode. The signal charge accumulated in each photodiode is sequentially read out as a voltage signal (image signal for each color of R, G, B) corresponding to the signal charge based on the drive pulse given from the timing generator 50 according to the instruction of the CPU 12.

CCD38から取り出されたR,G,B各色別の画像信号は、アナログ処理部(CDS/AMP回路)52に送られ、ここで画素ごとにサンプリングホールド(相関二重サンプリング処理)され、増幅された後、A/D変換器54に与えられ、アナログからデジタルに変換される。A/D変換器54から出力された画像信号は、画像入力コントローラ56を介してメモリ18に一時記憶される。画像信号処理回路58は、メモリ18に記憶されたR,G,B各色別の画像信号をCPU12の指示に従って処理する。具体的には、画像信号処理回路58は、同時化回路(CCD38のカラーフィルタ配列などに伴なうR,G,B信号の空間的なズレを補正して画像信号を同時式に変換する回路)、ホワイトバランス補正回路、ガンマ補正回路、YC信号生成回路などを含む画像信号処理手段として機能し、CPU12からのコマンドに従ってメモリ18を用いながら所定の画像信号処理を行う。画像信号処理回58の処理により得られた画像データはVRAM20に格納される。   The R, G, B image signals taken out from the CCD 38 are sent to an analog processing unit (CDS / AMP circuit) 52, where each pixel is sampled and held (correlated double sampling processing) and amplified. Thereafter, it is supplied to the A / D converter 54 and converted from analog to digital. The image signal output from the A / D converter 54 is temporarily stored in the memory 18 via the image input controller 56. The image signal processing circuit 58 processes the R, G, and B image signals stored in the memory 18 in accordance with instructions from the CPU 12. Specifically, the image signal processing circuit 58 is a synchronization circuit (a circuit that corrects the spatial deviation of the R, G, and B signals accompanying the color filter array of the CCD 38 and converts the image signal into a simultaneous type. ), Function as image signal processing means including a white balance correction circuit, a gamma correction circuit, a YC signal generation circuit, etc., and perform predetermined image signal processing using the memory 18 in accordance with commands from the CPU 12. Image data obtained by the processing of the image signal processing round 58 is stored in the VRAM 20.

画像表示装置28への画像の出力については、VRAM20から画像データが読み出され、バス14を介してビデオエンコーダ60に送られる。ビデオエンコーダ60は、入力された画像データを表示用の所定方式(例えばNTSC方式)の信号に変換して画像表示装置28に出力する。具体的には、CCD38から出力された画像信号は、1コマごとの画像データとしてVRAM20のA領域20AとB領域20Bとに交互に書き換えられる。これらのA領域20AおよびB領域20Bのうち、画像データが書き換えられている方の領域以外の領域から、画像データが読み出される。そして、VRAM20内の画像データが定期的に書き換えられることにより、撮影者は、画像表示装置28に表示される映像(スルームービー画)によって撮影画角を確認できる。   As for image output to the image display device 28, image data is read from the VRAM 20 and sent to the video encoder 60 via the bus 14. The video encoder 60 converts the input image data into a signal of a predetermined display system (for example, NTSC system) and outputs it to the image display device 28. Specifically, the image signal output from the CCD 38 is alternately rewritten into the A area 20A and the B area 20B of the VRAM 20 as image data for each frame. Of these A area 20A and B area 20B, image data is read from an area other than the area where the image data is rewritten. Then, by periodically rewriting the image data in the VRAM 20, the photographer can check the shooting angle of view by the video (through movie image) displayed on the image display device 28.

撮影画角を確認した撮影者により撮影ボタン24が半押しされ、S1がオンすると、CPU12は、撮影準備処理として、AEおよびAF処理を開始する。CCD38から出力されたR,G,B各色別の画像信号は、CDS/AMP回路52、A/D変換器54および画像入力コントローラ56を介して、メモリ18に一時記憶されるとともに、AF検出回路62およびAE/AWB検出回路64に入力される。   When the shooting button 24 is half-pressed by the photographer who has confirmed the shooting angle of view and S1 is turned on, the CPU 12 starts AE and AF processing as shooting preparation processing. The R, G, and B image signals output from the CCD 38 are temporarily stored in the memory 18 via the CDS / AMP circuit 52, the A / D converter 54, and the image input controller 56, and also the AF detection circuit. 62 and the AE / AWB detection circuit 64.

AE/AWB検出回路64は、画面を複数のエリア(例えば、16×16、8×8など)に分割し、分割エリアごとにR,G,B各色別の画像信号を積算する回路を含み、その積算値をCPU12に提供する。CPU12は、AE/AWB検出回路64から取得した積算値に基づいて被写体輝度を検出し、被写体輝度に対応するEV値を算出する。このEV値は、画面全体のEV値、および、画面上の分割エリアごとのEV値など、後述のホワイトバランス補正処理で参照可能に整理されて、メモリ18に記憶される。CPU12は、所定のプログラム線図に従い、絞り値とシャッタスピードを決定し、これらに従いCCD38の電子シャッタおよびレンズユニット40のアイリス44を制御して適正な露光量を得る。   The AE / AWB detection circuit 64 includes a circuit that divides a screen into a plurality of areas (for example, 16 × 16, 8 × 8, etc.) and integrates image signals for each of the R, G, and B colors for each divided area. The integrated value is provided to the CPU 12. The CPU 12 detects the subject brightness based on the integrated value acquired from the AE / AWB detection circuit 64, and calculates an EV value corresponding to the subject brightness. This EV value is arranged in a memory 18 so that it can be referred to in the white balance correction process described later, such as the EV value for the entire screen and the EV value for each divided area on the screen. The CPU 12 determines an aperture value and a shutter speed according to a predetermined program diagram, and controls the electronic shutter of the CCD 38 and the iris 44 of the lens unit 40 according to these to obtain an appropriate exposure amount.

本カメラ10におけるAF制御は、例えば映像信号のG信号の高周波成分が極大になるようにフォーカシングレンズ(撮影レンズ42を構成するレンズ光学系のうちフォーカス調整に寄与する移動レンズ)を移動させるコントラストAFが適用される。即ち、AF検出回路62は、G信号の高周波成分のみを通過させるハイパスフィルタ、絶対値化処理部、画面内(例えば画面中央部)に予め設定されているフォーカス対像エリア内の信号を切り出すAFエリア抽出部、及びAFエリア内の絶対値データを積算する積算部から構成される。AF検出回路62で求めた積算値のデータはCPU12に通知される。CPU12は、レンズ駆動部46を制御してフォーカシングレンズを移動させながら、複数のAF検出ポイントで焦点評価値(AF評価値)を演算し、評価値が極大となるレンズ位置を合焦位置として決定する。そして、求めた合焦位置にフォーカシングレンズを移動させるようにレンズ駆動部46を制御する。尚、AF評価値の演算はG信号を利用する態様に限らず、輝度信号(Y信号)を利用してもよい。   The AF control in the camera 10 is, for example, a contrast AF that moves a focusing lens (a moving lens that contributes to focus adjustment among the lens optical systems constituting the photographing lens 42) so that the high-frequency component of the G signal of the video signal is maximized. Applies. That is, the AF detection circuit 62 cuts out a signal in a focus-to-image area preset in a high-pass filter that passes only a high-frequency component of the G signal, an absolute value processing unit, and a screen (for example, the center of the screen). An area extraction unit and an integration unit that integrates absolute value data in the AF area are configured. The integrated value data obtained by the AF detection circuit 62 is notified to the CPU 12. The CPU 12 calculates a focus evaluation value (AF evaluation value) at a plurality of AF detection points while moving the focusing lens by controlling the lens driving unit 46, and determines a lens position where the evaluation value is a maximum as a focus position. To do. Then, the lens driving unit 46 is controlled so as to move the focusing lens to the obtained in-focus position. The calculation of the AF evaluation value is not limited to a mode using the G signal, and a luminance signal (Y signal) may be used.

撮影ボタン24の半押し(S1オン)によってAE処理およびAF処理等の撮影準備処理が行われた後、撮影ボタン24が全押し(S2オン)されると、画像を記録するための撮影動作がスタートする。   After shooting preparation processing such as AE processing and AF processing is performed by half-pressing the shooting button 24 (S1 on), when the shooting button 24 is fully pressed (S2 on), a shooting operation for recording an image is performed. Start.

CPU12は、AE/AWB検出回路64から、分割エリアごとのR,G,B信号別の積算値を取得する。なお、AE/AWB検出回路64からCPU12に通知される分割エリアごとの積算値は、R,G,B信号別に単純に積算した値とした態様や、平均値とした態様がある。そして、CPU12は、AE/AWB検出回路64から取得した分割エリアごとのR,G,B信号別の積算値に基づいて、ホワイトバランス補正値を算出し、画像信号処理回路58によってR,G,B信号にホワイトバランス処理を施す。このホワイトバランス補正処理は後に詳細に説明する。   The CPU 12 acquires an integrated value for each R, G, B signal for each divided area from the AE / AWB detection circuit 64. The integrated value for each divided area notified from the AE / AWB detection circuit 64 to the CPU 12 includes a mode in which values are simply integrated for each of the R, G, and B signals, and a mode in which average values are used. Then, the CPU 12 calculates a white balance correction value based on the integrated value for each R, G, B signal obtained from the AE / AWB detection circuit 64 for each divided area, and the image signal processing circuit 58 uses the R, G, White balance processing is applied to the B signal. This white balance correction process will be described in detail later.

画像処理回路58によってホワイトバランス補正が施されたR,G,B各色別の画像信号は、さらに画像処理回路58によってガンマ補正などの画像処理を施され、YC信号(輝度信号Yおよび色差信号C)に変換され、圧縮伸長回路66によって所定のフォーマットで圧縮された後、メディアコントローラ34およびメディアソケット30を介して記録メディア32に画像データとして記録される。   The image signals for each of the R, G, and B colors that have been subjected to white balance correction by the image processing circuit 58 are further subjected to image processing such as gamma correction by the image processing circuit 58 to obtain YC signals (luminance signal Y and color difference signal C). ) And compressed in a predetermined format by the compression / decompression circuit 66, and then recorded as image data on the recording medium 32 via the media controller 34 and the media socket 30.

モード選択スイッチ22により再生モードが選択されると、記録メディア32に記録されている圧縮された画像データがメディアコントローラ34を介して読み出される。読み出された画像データは、圧縮伸長回路66によって伸長され、VRAM20、ビデオコントローラ60を介して画像表示装置28に表示される。利用者は、適切なホワイトバランス補正が施された画像を再生して楽しむことができる。   When the playback mode is selected by the mode selection switch 22, the compressed image data recorded on the recording medium 32 is read out via the media controller 34. The read image data is decompressed by the compression / decompression circuit 66 and displayed on the image display device 28 via the VRAM 20 and the video controller 60. The user can reproduce and enjoy an image with appropriate white balance correction.

次に、図2を用いて、基本的なホワイトバランス補正機能の概要を説明する。図2は、カメラ10のホワイトバランス補正機能に関連する要部を示すブロック図である。図2中、図1と同一の部分には同一の符号を付し、その説明は省略する。   Next, an outline of a basic white balance correction function will be described with reference to FIG. FIG. 2 is a block diagram showing a main part related to the white balance correction function of the camera 10. 2, the same parts as those in FIG. 1 are denoted by the same reference numerals, and the description thereof is omitted.

図2のデジタル信号処理回路100は、図1の画像信号処理回路58の一部であり、同時化回路102、ホワイトバランス補正回路104、ガンマ補正回路106、YC信号生成回路108を含む。なお、図2では、信号の流れを理解し易くするためにデジタル信号処理回路100内にメモリ110を設けているが、このメモリ110は、実際には図中のもうひとつのメモリ18に含まれる。   A digital signal processing circuit 100 in FIG. 2 is a part of the image signal processing circuit 58 in FIG. 1 and includes a synchronization circuit 102, a white balance correction circuit 104, a gamma correction circuit 106, and a YC signal generation circuit 108. In FIG. 2, a memory 110 is provided in the digital signal processing circuit 100 in order to facilitate understanding of the signal flow, but this memory 110 is actually included in another memory 18 in the figure. .

CCD38から出力されたR,G,B信号(画像信号)は、CDS/AMP回路52、A/D変換器54および画像入力コントローラ56を介して、一旦メモリ18に格納される。同時化処理回路102は、メモリ18から読み出された点順次のR,G,B信号を同時式に変換して、R,G,B信号を同時にホワイトバランス補正回路104に出力する。ホワイトバランス補正回路104は、R,G,B信号のデジタル値をそれぞれ増減するための乗算器104R,104G、104Bから構成されており、R,G,B信号は、それぞれ乗算器104R,104G、104Bに加えられる。   The R, G, B signals (image signals) output from the CCD 38 are temporarily stored in the memory 18 via the CDS / AMP circuit 52, the A / D converter 54, and the image input controller 56. The synchronization processing circuit 102 converts the dot-sequential R, G, B signals read from the memory 18 into simultaneous equations, and outputs the R, G, B signals to the white balance correction circuit 104 simultaneously. The white balance correction circuit 104 includes multipliers 104R, 104G, and 104B for increasing and decreasing the digital values of the R, G, and B signals. The R, G, and B signals are respectively multiplied by the multipliers 104R, 104G, and 104B, respectively. Added to 104B.

乗算器104R、104G、104Bには、R,G,B信号がそれぞれ入力されるほか、CPU12からゲイン値Rg,Gg,Bg(ホワイトバランス補正値)が入力されるようになっており、乗算器104R,104G、104Bは、R,G,B信号にそれぞれゲイン値Rg,Gg,Bgを乗算し、この乗算によってホワイトバランス補正されたR,G,B信号(R’,G’,B’)をガンマ補正回路106に出力する。ゲイン値Rg,Gg,Bgの算出は、CPU12によって行われる。   The multipliers 104R, 104G, and 104B receive R, G, and B signals, respectively, and the CPU 12 receives gain values Rg, Gg, and Bg (white balance correction values). 104R, 104G, and 104B multiply R, G, and B signals by gain values Rg, Gg, and Bg, respectively, and R, G, and B signals (R ′, G ′, and B ′) that are white balance corrected by this multiplication. Is output to the gamma correction circuit 106. The CPU 12 calculates the gain values Rg, Gg, and Bg.

CCD38で生成されたR,G,B信号(画像信号)は、CDS/AMP52、A/D変換器54、画像入力コントローラ56を介して積算回路112に入力され、積算回路112によって、分割エリアごとにR,G,B信号別で積算される。この積算回路112は図1のAE/AWB検出回路64に含まれている。積算回路112とCPU12との間には乗算器112R、112G、112Bが設けられており、乗算器112R、112G、112Bには、機器のばらつきを調整するため調整ゲインが加えられるようになっている。CPU12は、積算回路112から分割エリアごとの積算値を取得し、取得した積算値に基づいてホワイトバランス補正値を算出する。   The R, G, B signals (image signals) generated by the CCD 38 are input to the integrating circuit 112 via the CDS / AMP 52, the A / D converter 54, and the image input controller 56. Is accumulated for each R, G, B signal. This integration circuit 112 is included in the AE / AWB detection circuit 64 of FIG. Multipliers 112R, 112G, and 112B are provided between the integration circuit 112 and the CPU 12, and an adjustment gain is added to the multipliers 112R, 112G, and 112B in order to adjust device variations. . The CPU 12 acquires an integrated value for each divided area from the integrating circuit 112, and calculates a white balance correction value based on the acquired integrated value.

ホワイトバランス補正前の画像信号をR,G,B、ゲイン値をRg,Gg,Bgとすると、ホワイトバランス補正後の画像信号R’,G’,B’は、(数式1)によって表わされる。   Assuming that the image signals before white balance correction are R, G, B and the gain values are Rg, Gg, Bg, the image signals R ′, G ′, B ′ after white balance correction are expressed by (Equation 1).

(数式1)
R’=Rg×R
G’=Gg×G
B’=Bg×B
ガンマ補正回路106は、ホワイトバランス補正されたR,G,B信号(数式1のR’,G’,B’からなる画像信号)が所望のガンマ特性となるように入出力特性を変更し、YC信号生成回路108に出力する。YC信号生成回路108は、ガンマ補正されたR,G,B信号から輝度信号Yと色差信号Cr,Cbを生成する。これらの輝度信号Yと色差信号Cr,Cbは、メモリ110に格納される。メモリ110内のYC信号を読み出して、図1のVRAM20およびビデオエンコーダ60を介して画像表示装置28に出力することにより、画像を表示させることができる。
(Formula 1)
R ′ = Rg × R
G ′ = Gg × G
B ′ = Bg × B
The gamma correction circuit 106 changes the input / output characteristics so that the white balance corrected R, G, B signals (image signals composed of R ′, G ′, B ′ in Equation 1) have the desired gamma characteristics, This is output to the YC signal generation circuit 108. The YC signal generation circuit 108 generates a luminance signal Y and color difference signals Cr and Cb from the gamma-corrected R, G, and B signals. The luminance signal Y and the color difference signals Cr and Cb are stored in the memory 110. An image can be displayed by reading the YC signal in the memory 110 and outputting it to the image display device 28 via the VRAM 20 and the video encoder 60 of FIG.

以下では、オートホワイトバランス(AWB)制御処理の流れについて、詳細に説明する。このオートホワイトバランス制御処理の各ステップは、図1のROM16に予め記憶されたプログラムにしたがって、CPU12によって実行される。   Hereinafter, the flow of the auto white balance (AWB) control process will be described in detail. Each step of the auto white balance control process is executed by the CPU 12 in accordance with a program stored in advance in the ROM 16 of FIG.

図3は、オートホワイトバランス制御処理のうち、色情報検出処理、明るさ情報検出処理、カタマリ演算処理、及び、物体色らしさ演算処理の流れを示している。   FIG. 3 shows the flow of color information detection processing, brightness information detection processing, catamari calculation processing, and object color likelihood calculation processing in the auto white balance control processing.

図3において、撮影ボタン24の全押し(S2オン)に応動して、CPU12によるオートホワイトバランス(AWB)制御が開始される(ステップS100)。   In FIG. 3, the auto white balance (AWB) control by the CPU 12 is started in response to the full depression (S2 on) of the shooting button 24 (step S100).

なお、CCD38により生成されたR(赤),G(緑),B(青)の各色別の画像信号(R,G,B信号)は、撮影画面ごとにデジタルデータとしてメモリ18に一時記憶される。ひとつの撮影画面は複数のエリア(例えば8×8、16×16など)に分割されており、このような分割されたエリア(分割エリア)ごとに図2の積算回路112によってR,G,B信号の各色別の積算値(「RGB積算値」と称する)が算出されるので、これらの各分割エリアのRGB積算値を積算回路112から取得し(ステップS102)、分割エリアごとに、R信号の積算値とG信号の積算値との比R/G、および、B信号の積算値とG信号の積算値との比B/Gを算出する(ステップS104)。言い換えると、分割エリアごとに、RGB積算値を(R,G,B)座標から(R/G,B/G)座標に変換する。このような(R/G,B/G)座標に変換されたRGB積算値を「R/G,B/G値」と呼ぶことにする。また、R/G,B/G値のように撮影画面の各部分ごとの色を示す情報を、その各部分の「色情報」ともいう。   Note that R (red), G (green), and B (blue) image signals (R, G, and B signals) generated by the CCD 38 are temporarily stored in the memory 18 as digital data for each shooting screen. The One shooting screen is divided into a plurality of areas (for example, 8 × 8, 16 × 16, etc.), and R, G, B is added to each divided area (divided area) by the integrating circuit 112 in FIG. Since the integrated value for each color of the signal (referred to as “RGB integrated value”) is calculated, the RGB integrated value of each divided area is acquired from the integrating circuit 112 (step S102), and the R signal is obtained for each divided area. The ratio R / G of the integrated value of G and the integrated value of the G signal and the ratio B / G of the integrated value of the B signal and the integrated value of the G signal are calculated (step S104). In other words, the RGB integrated value is converted from (R, G, B) coordinates to (R / G, B / G) coordinates for each divided area. The RGB integrated values converted into such (R / G, B / G) coordinates are referred to as “R / G, B / G values”. Information indicating the color of each part of the shooting screen such as the R / G and B / G values is also referred to as “color information” of each part.

さらに、各色別の画像信号(R,G,B信号)に基づいて、各分割エリアごとの明るさ情報を算出する(ステップS106)。ここで、明るさ情報として、本実施形態では、輝度を示す「EV値」を算出する。   Further, brightness information for each divided area is calculated based on the image signals (R, G, B signals) for each color (step S106). Here, as the brightness information, in the present embodiment, an “EV value” indicating luminance is calculated.

次に、(R/G,B/G)座標上で相互に近似する色情報(R/G,B/G値)同士をグループ化するとともに、各グループを代表する色情報(座標)を算出する。このような特定の表色座標上で相互に近似する色情報同士を集めたグループを「カタマリ」と呼び、各グループ(カタマリ)を代表する色情報(座標)を「カタマリ座標」と呼ぶことにする。言い換えると、「カタマリ」を検出して「カタマリ座標」を算出する(ステップS108)。   Next, color information (R / G, B / G values) that approximate each other on (R / G, B / G) coordinates are grouped together, and color information (coordinates) that represents each group is calculated. To do. A group in which color information that approximates each other on specific color coordinates is collected is called “catamari”, and color information (coordinates) that represents each group (catamari) is called “catamari coordinates”. To do. In other words, “catamari” is detected, and “catamari coordinates” are calculated (step S108).

ここで、色情報のグループ化(言い換えると色情報に基づく分割エリアのグループ化である)の態様には、各種ある。   Here, there are various modes of color information grouping (in other words, division area grouping based on color information).

第1に、図8に示すように、(R/G,B/G)座標300上に複数の検出枠を予め設けておき、各分割エリアの色情報(R/G,B/G値)が入る検出枠を判定して、同じ検出枠に入った色情報(R/G,B/G値)同士をひとつのカタマリとして検出する態様がある。すなわち表色座標上で色が近似する分割エリア同士を色情報に基づいてひとつのカタマリとして検出する態様がある。そして、各検出枠に入った分割エリアの色情報(R/G,B/G値)を平均してなるカタマリ座標を求める。   First, as shown in FIG. 8, a plurality of detection frames are provided in advance on (R / G, B / G) coordinates 300, and color information (R / G, B / G values) of each divided area. There is a mode in which a detection frame in which is inserted is determined, and color information (R / G, B / G values) that are in the same detection frame are detected as a single catamaran. That is, there is an aspect in which divided areas whose colors are approximated on the color coordinate are detected as a single catamari based on the color information. Then, the catamary coordinates obtained by averaging the color information (R / G, B / G values) of the divided areas included in each detection frame are obtained.

第2に、(R/G,B/G)座標上で各分割エリアの色情報(R/G,B/G値)に順次着目して、図9(a)又は(b)に示すように、注目した色情報を中心として所定の半径の円内に入った色情報同士をひとつのカタマリとして検出する態様がある。そして、例えば各カタマリごとの円の中心の座標をカタマリ座標とする。この第2のグループ化態様では、前述の第1のグループ化態様のような検出枠を設けなくてもカタマリを検出することができる。   Second, paying attention to the color information (R / G, B / G value) of each divided area sequentially on the (R / G, B / G) coordinates, as shown in FIG. 9 (a) or (b). In addition, there is a mode in which color information that falls within a circle with a predetermined radius centering on the noticed color information is detected as one catalyzer. Then, for example, the coordinates of the center of the circle for each catamari are set as catamari coordinates. In this second grouping mode, it is possible to detect the catamarism without providing a detection frame as in the first grouping mode described above.

なお、第2のグループ化態様のより好ましいものについて、本発明者は特許出願(特願2003−378092号)を既に行っているので、その詳細については、必要に応じて、その特許出願に係わる明細書、図面等を参照されたい。ここでは、そのより好ましい態様の構成について、その概要を説明しておくと、各分割エリアの色情報に順次注目し、注目した分割エリアの色情報と該色情報に相互に近似する他の分割エリアの色情報とからなるグループを順次形成して、形成された各グループをそれぞれ代表する代表色情報を求める第1ステップを実行し、各グループの代表色情報に順次注目し、注目したグループの代表色情報と該代表色情報に相互に近似する他のグループの代表色情報とからなる新たなグループを順次形成して、新たに形成された各グループをそれぞれ代表する代表色情報を求める第2ステップを実行し、さらに該第2ステップを代表色情報の値が収束するまで繰り返す。   In addition, since the present inventor has already filed a patent application (Japanese Patent Application No. 2003-378092) for the more preferable second grouping mode, the details thereof relate to the patent application as necessary. Refer to the description, drawings, etc. Here, the outline of the configuration of the more preferable aspect will be described. The color information of each divided area is paid attention sequentially, and the color information of the noticed divided area and other divisions that approximate the color information mutually. A group consisting of area color information is sequentially formed, and the first step for obtaining representative color information representative of each formed group is executed, and the representative color information of each group is sequentially noticed. A second group that sequentially forms a new group of representative color information and representative color information of another group that approximates the representative color information, and obtains representative color information that represents each newly formed group. Steps are executed, and the second step is repeated until the value of the representative color information converges.

第1のグループ化態様と第2のグループ化態様の効果の比較を簡単に示しておく。図9(a)は、R/G座標軸とB/G座標軸とからなる表色座標において、主としてひとつのカタマリに色情報が集中した場合を示しており、図9(b)は、R/G座標軸とB/G座標軸とからなる表色座標において、複数のカタマリに色情報が散らばった場合を示している。いずれの場合においても、従来の複数の検出枠を跨るようにしてカタマリが存在しており、このような図9(a)又は図9(b)に示すような従来の検出枠を跨るような分布状態である場合には、第2のグループ化態様によれば、図8を用いて説明した第1のグループ化態様と比較して、色情報の分布状態を的確に把握することができ、適正なホワイトバランス補正を施すことができるというメリットがある。一方で、図8を用いて説明した第1のグループ化態様は、検出枠の数が少なくてすむようなシステムにおいては、色情報の分布状態の検出処理が簡易になるというメリットがある。   A comparison of the effects of the first grouping mode and the second grouping mode will be briefly shown. FIG. 9A shows a case where color information is concentrated mainly in one catamari in the color coordinate system composed of the R / G coordinate axis and the B / G coordinate axis, and FIG. In the color specification coordinates composed of the coordinate axes and the B / G coordinate axes, a case is shown in which color information is scattered in a plurality of catamaries. In any case, there is a catamaria that straddles a plurality of conventional detection frames, and such a conventional detection frame as shown in FIG. 9A or FIG. 9B is straddled. In the case of the distribution state, according to the second grouping aspect, the distribution state of the color information can be accurately grasped as compared with the first grouping aspect described with reference to FIG. There is an advantage that appropriate white balance correction can be performed. On the other hand, the first grouping mode described with reference to FIG. 8 has an advantage that the detection process of the distribution state of the color information is simplified in a system in which the number of detection frames is small.

グループ化(ステップS108)を行った後、各カタマリごとに、EV値の平均値(カタマリEV値)を算出する(ステップS110)。ここで、カタマリEV値は、各カタマリの明るさ情報とも言える。   After grouping (step S108), the average value of the EV values (catalymic EV values) is calculated for each catamari (step S110). Here, it can be said that the catamari EV value is brightness information of each catamari.

次に、複数のカタマリ座標からなる母集合から、低色温度光源であるタングステン光源色に近似しているオレンジ、イエロー系(RY系)の色相の物体色を、カタマリEV値に基づいて除外する。   Next, object colors having orange and yellow (RY) hues that are close to the tungsten light source color, which is a low color temperature light source, are excluded from a population consisting of a plurality of catamarry coordinates based on the catamary EV value. .

例えばグレーを目標にしてホワイトバランスを補正する場合を例に説明すると、もしもオレンジ、イエロー系の色相の物体色をタングステン光源色と誤判別してしまった場合には、オレンジ、イエローがグレーに近づくように補正されるとともに、本来グレーであったものが青っぽく補正されてしまうことになる。本発明者は、光源であるならば、色温度が低くなればなるほど一般に低照度になることに着目した。本実施形態では、オレンジ、イエロー系であっても、明るさ(輝度)が色相ごとに定まる所定値以上である場合には、物体色の可能性が極めて高いとして、そのような色情報をホワイトバランス補正値算出用の母集合から除外する。   For example, when correcting the white balance with gray as an example, if an object color of orange or yellow hue is misidentified as a tungsten light source color, the orange and yellow will approach gray. In addition to being corrected, what was originally gray is corrected to bluish. The inventor of the present invention paid attention to the fact that the lower the color temperature, the lower the illuminance in general if the light source is used. In the present embodiment, even if the color is orange or yellow, if the brightness (luminance) is equal to or higher than a predetermined value determined for each hue, it is determined that the possibility of an object color is extremely high, and such color information is displayed as white. Exclude from the balance correction value calculation population.

具体的には、まず、各カタマリごとのB/G値とカタマリEV値(各カタマリの明るさ情報である)とに基づいて、光源色らしさのメンバシップ関数を用い、各カタマリ座標(各カタマリの色情報である)の光源色らしさを検出する(ステップS112)。   Specifically, first, based on the B / G value and the catamari EV value (which is the brightness information of each catamari) for each catamari, a membership function of the light source color is used and each catamaran coordinate (each catamari The color information of the light source is detected (step S112).

図10は光源色らしさのメンバシップ関数の一例を示す説明図であり、横軸をカタマリEV値とし、縦軸を各カタマリのB/G値としてあり、斜線を引いた部分は、物体色らしいことを示す。   FIG. 10 is an explanatory diagram showing an example of the membership function of the light source color likelihood, where the horizontal axis is the catalyma EV value, the vertical axis is the B / G value of each catamari, and the hatched portion is likely to be an object color It shows that.

第i番目のカタマリのカタマリ座標を(Ri/Gi,Bi/Gi)とし、そのカタマリEV値をEViとし、カタマリEV値に対する下限の閾値をX1、そのB/G値をY1とし、上限の閾値をX2、そのB/G値をYとする。 The catamary coordinate of the i-th catamaly is (Ri / Gi, Bi / Gi), its catamary EV value is EVi, the lower limit threshold for the catamary EV value is X1, its B / G value is Y1, and the upper limit threshold the X2, is the B / G value and Y 2.

そうすると、EVi<X1のとき、Bi/Gi≦Y1ならば、光源色らしさの評価値としてメンバシップ関数は「0」を出力する。   Then, when EVi <X1, if Bi / Gi ≦ Y1, the membership function outputs “0” as the evaluation value of the light source color.

EVi>X2のとき、Bi/Gi≦Y2ならば、光源色らしさの評価値としてメンバシップ関数は「0」を出力する。   When EVi> X2, if Bi / Gi ≦ Y2, the membership function outputs “0” as the evaluation value of the light source color.

X1≦EVi≦X2のとき、Bi/Gi≦(Y2―Y1)/(X2―X1)×EVi―(X1×Y2−X2×Y1)/(X2−X1)ならば、光源色らしさの評価値としてメンバシップ関数は「0」を出力する。   When X1 ≦ EVi ≦ X2, if Bi / Gi ≦ (Y2-Y1) / (X2-X1) × EVi− (X1 × Y2-X2 × Y1) / (X2-X1), the evaluation value of the light source color is evaluated. As a result, the membership function outputs “0”.

そして、光源色らしさが「0」であると評価したカタマリ座標、すなわちタングステン系の光源色に色が近似している物体色のカタマリ座標は、ホワイトバランスの補正値の算出には組み込まないように、カタマリ座標の母集合から除去する(ステップS114、S116)。そして、ほかにカタマリがあるか否かを判定して(ステップS118)、全てのカタマリについてステップS112乃至S116を繰り返す。   Then, the catamary coordinates evaluated as having a light source color likelihood of “0”, that is, the catamary coordinates of the object color whose color approximates to the tungsten-based light source color, should not be incorporated in the calculation of the white balance correction value. Then, it is removed from the population of the catamari coordinates (steps S114 and S116). Then, it is determined whether there is any other catamamy (step S118), and steps S112 to S116 are repeated for all the catamaries.

ここで、オレンジ、イエロー系の物体色らしいカタマリ座標は、光源の判別やホワイトバランス補正値の算出に用いるカタマリ座標(カタマリの色情報である)の母集合から除外されるので、後述するホワイトバランス補正において、より光源色らしいものを基準としてホワイトバランス補正が施されることになる。   Here, the catamary coordinates that are likely to be orange and yellow object colors are excluded from the set of catamary coordinates (catalyst color information) used to determine the light source and calculate the white balance correction value. In the correction, white balance correction is performed with reference to a light source color.

なお、単に明るさ情報のみを用いて光源色らしさ及び物体色らしさの判定を行うと、タングステン光源色に近似する色情報以外の本来ホワイトバランス補正に組み込むべき色情報も除去されてしまうおそれがある。そこで、R/G,B/G座標系においては、B/G値に着目すればタングステン光源系に近似する程度の判定が容易かつ的確であることに着目し、本実施形態では、メンバシップ関数としては、B/G値及びEV値の両パラメータに基づいて光源色らしさ及び物体色らしさの評価値を出力するものを用いている。   Note that if the light source color likelihood and the object color likelihood determination are performed using only brightness information, color information that should originally be incorporated in white balance correction other than color information that approximates the tungsten light source color may be removed. . Therefore, in the R / G and B / G coordinate systems, focusing on the B / G value, it is noted that determination to the extent that it approximates to the tungsten light source system is easy and accurate. Are used that output evaluation values of the light source color likelihood and the object color likelihood based on both the B / G value and the EV value parameter.

図4は、オートホワイトバランス制御処理のうち、スポット光らしさ演算処理の流れを示している。この処理では、スポット光らしい色情報をホワイトバランス補正値算出用の母集合から除外する処理を行う。   FIG. 4 shows the flow of the spot lightness calculation process in the auto white balance control process. In this process, color information that seems to be spotlight is excluded from the white balance correction value calculation set.

もしもスポット光を基準にホワイトバランス補正をすると適切な色の画像にならないことが発生する。それは、スポット光は、いわゆる部分光であり、広範囲の領域に光を照射しているわけではないので、そのスポット光を基準にスポット光が照射されていない広範囲の領域においてホワイトバランスを補正してしまうことに因り発生する。スポット光を基準にホワイトバランスを補正すると、スポット光が画面中で支配的でなければ色味残りという作用を引き起こす。色味残りは、タングステンのようなYR系の強い光源などでは高級感のある雰囲気と肯定的にもとれるが、蛍光灯のような光源下では一般に致命的な副作用とみられてしまう。そこで、本実施形態では、スポット光による特に白色系光源下での副作用を防ぐように、面積占有率による光源選別を導入する。   If the white balance is corrected based on the spot light, an appropriate color image may not be obtained. That is, spot light is so-called partial light and does not irradiate light over a wide area, so the white balance is corrected in a wide area where spot light is not irradiated based on the spot light. It is caused by that. When the white balance is corrected based on the spot light, an effect of remaining color is caused if the spot light is not dominant in the screen. The remaining color tone is positively taken as a high-class atmosphere in a strong light source such as tungsten, such as tungsten, but generally appears to be a fatal side effect under a light source such as a fluorescent lamp. Therefore, in this embodiment, light source selection based on area occupancy is introduced so as to prevent side effects caused by spot light, particularly under a white light source.

図4において、まず、各カタマリのカタマリ座標(Ri/Gi,Bi/Gi)及びカタマリEV値(EVi)をメモリ18から読み込む(ステップS120)。   In FIG. 4, first, the catamary coordinates (Ri / Gi, Bi / Gi) and the catamary EV value (EVi) of each catamaly are read from the memory 18 (step S120).

次に、撮影画面全体のEV値の平均値(平均EV値)を算出する(ステップS122)。   Next, an average value (average EV value) of the EV values of the entire shooting screen is calculated (step S122).

次に、撮影画面上での各カタマリの面積(カタマリ面積)を算出する(ステップS124)。ここで、本実施形態では、カタマリ面積として、各カタマリに属する分割エリアの個数(すなわち各カタマリに属するR/G,B/G値の個数である)を検出する。   Next, the area (catamari area) of each catamari on the photographing screen is calculated (step S124). Here, in the present embodiment, the number of divided areas belonging to each catamari (that is, the number of R / G and B / G values belonging to each catamari) is detected as the catamari area.

次に、複数のカタマリ面積のうちの最大値(最大のカタマリ面積)を検出する(ステップS126)。ここで、本実施形態では、最大のカタマリ面積として、所属する分割エリアの個数が最大であるカタマリのその分割エリアの個数(すなわち最大のカタマリに属するR/G,B/G値の個数である)を検出する。   Next, the maximum value (maximum catalog area) among the plurality of catalog areas is detected (step S126). Here, in the present embodiment, as the maximum catamary area, the number of the divided areas of the catamaries to which the number of the divided areas to which they belong is the maximum (that is, the number of R / G and B / G values belonging to the largest catamaries). ) Is detected.

そして、各カタマリごとにスポット光らしいか否かの判定を行って、スポット光らしいものはホワイトバランス補正値算出用の母集合から除去する処理を行う(ステップS128乃至S138)。   Then, it is determined whether or not each spotlight is likely to be spot light, and processing that removes the spot light that is likely to be spotlight from the population for white balance correction value calculation is performed (steps S128 to S138).

具体的には、まず、(数式2)に示されるように、各カタマリの明るさを示すカタマリEV値(Evi)と、画面全体の明るさを示す平均EV値(EVav0)との差を算出し(ステップS128)、その差が所定の閾値(SPT_EVTH)よりも大きいか否かを判定する(ステップS130)。   Specifically, first, as shown in (Equation 2), the difference between the catamari EV value (Evi) indicating the brightness of each catamari and the average EV value (EVav0) indicating the brightness of the entire screen is calculated. (Step S128), it is determined whether or not the difference is larger than a predetermined threshold value (SPT_EVTH) (Step S130).

(数式2)
EVi―EVav0>SPT_EVTH
すなわち、画面全体の明るさと比較して所定の閾値以上の差をもって明るいカタマリであるか否かを判定する。
(Formula 2)
EVi-EVav0> SPT_EVTH
That is, it is determined whether or not the image is bright with a difference equal to or greater than a predetermined threshold compared with the brightness of the entire screen.

また、(数式3)に示されるように、最大カタマリの面積を示す最大カタマリの分割エリアの個数(m1)と、各カタマリの面積を示す各カタマリごとの分割エリアの個数(mi)との差を算出し(ステップS132)、その差が所定の閾値(SPT_MTH)よりも大きいか否かを判定する(ステップS134)。   Further, as shown in (Equation 3), the difference between the number (m1) of the divided areas of the maximum catamari indicating the area of the maximum catamari and the number (mi) of the divided areas for each catamari indicating the area of each catalyzer. Is calculated (step S132), and it is determined whether the difference is larger than a predetermined threshold (SPT_MTH) (step S134).

(数式3)
m1―mi>SPT_MTH
すなわち、撮影画面内で最大のカタマリと比較して所定の閾値以上の差をもって小さい面積のカタマリであるか否かを判定する。
(Formula 3)
m1-mi> SPT_MTH
That is, it is determined whether or not the area has a small area with a difference equal to or greater than a predetermined threshold value compared to the maximum area in the shooting screen.

また、(数式4)に示されるように、各カタマリの明るさを示すカタマリEV値(EVi)が、所定の閾値(EVTH2)よりも大きいか否かを判定する(ステップS136)。   Further, as shown in (Equation 4), it is determined whether or not the catamari EV value (EVi) indicating the brightness of each catamari is larger than a predetermined threshold (EVTH2) (step S136).

(数式4)
EVi>SPT_EVTH2
すなわち、スポット光特有のある程度の明るさを持ったカタマリであるか否かを判定する。
(Formula 4)
EVi> SPT_EVTH2
That is, it is determined whether or not the spot has a certain brightness specific to the spot light.

上記(数式2)、(数式3)及び(数式4)を全て満たすカタマリは、スポット光らしいと判別して、ホワイトバランスの補正値の算出には組み込まないように、そのカタマリの色情報としてのカタマリ座標をホワイトバランス補正値算出用の母集合から除去する(ステップS138)。   It is determined that the catamari satisfying all of the above (Equation 2), (Equation 3), and (Equation 4) is likely to be spot light, so that it is not incorporated into the calculation of the white balance correction value. The catamari coordinates are removed from the white balance correction value calculation population (step S138).

そして、ほかにカタマリがあるか否かを判定して(ステップS140)、全てのカタマリについてスポット光らしい色情報を除外する処理(ステップS128乃至S138)を繰り返す。   Then, it is determined whether there is any other catalyzer (step S140), and the process of excluding color information that is likely to be spotlight for all catamaries (steps S128 to S138) is repeated.

すなわち、画面全体の明るさの平均よりも十分に明るく、画面全体に占める面積が他の色の部分と比較して十分に小さく、しかも、スポット光源特有のある程度の明るさを持ったカタマリの色情報(カタマリ座標)は、スポット光らしいとして、母集合から除外する。   In other words, the color of the catamari that is sufficiently brighter than the average brightness of the entire screen, the area occupied by the entire screen is sufficiently small compared to other color parts, and has a certain level of brightness that is characteristic of a spot light source. Information (catamari coordinates) is excluded from the mother set because it seems to be spot light.

なお、このようなスポット光源の排除は、特に画質に影響を与えやすいある特定の色温度領域に限定したい。そこで、スポット光らしいものが表色座標上で蛍光灯や晴れの検出枠に入ったときだけ除去されるように、特定の光源検出枠(蛍光灯光源枠など)をスポット光の除去枠として予め指定しておき、そのような除去枠に入ったときだけスポット光らしいものを除去するように構成すると、より好ましい。   It should be noted that such spot light source exclusion is particularly limited to a specific color temperature region that easily affects image quality. Therefore, a specific light source detection frame (such as a fluorescent light source frame) is preliminarily used as a spot light removal frame so that the spot light is removed only when it enters the fluorescent light or sunny detection frame on the color coordinates. It is more preferable to specify and configure such that a spot-like light is removed only when entering such a removal frame.

また、閾値SPT_EVTH、SPT_MTH、SPT_EVTH2は、適当な値をROM16に予め設定しておく。   Further, appropriate values for the threshold values SPT_EVTH, SPT_MTH, and SPT_EVTH2 are set in the ROM 16 in advance.

図3のフローチャートを用いて説明した明るさ依存の物体色らしさ演算処理では、タングステン光源や白色蛍光灯などの所定の光源色と誤判別し易い物体色らしい色情報をホワイトバランス補正値算出用の母集合から除去し、図4のフローチャートを用いて説明したスポット光らしさ演算処理では、画面中で支配的でないスポット光源らしい色情報をホワイトバランス補正値算出用の母集合から除去した。図5のフローチャートを用いて以下に説明する彩度基準定義処理では、従来、表色座標上でグレーに最も近いものを基準光源として彩度基準を定義していたものを、明るさによって屋内屋外ごとに表色座標上の目標値を変動させて、その目標値からの表色座標上での距離によって彩度基準を定義する制御を行う。   In the brightness-dependent object color likelihood calculation process described with reference to the flowchart of FIG. 3, color information that is likely to be misidentified as a predetermined light source color, such as a tungsten light source or a white fluorescent lamp, is calculated for white balance correction value calculation. In the spot light likelihood calculation process described with reference to the flowchart of FIG. 4, the color information that seems to be a dominant spot light source in the screen is removed from the population for calculating the white balance correction value. In the saturation reference definition process described below using the flowchart of FIG. 5, what is conventionally defined as the reference light source with the closest reference to gray on the color coordinate is used as the reference light source. Each time the target value on the color coordinate is changed, control is performed to define the saturation reference based on the distance from the target value on the color coordinate.

ここで、本発明の理解を容易にするために、ホワイトバランス補正値(ゲイン値)の算出の概要について説明しておく。   Here, in order to facilitate understanding of the present invention, an outline of calculation of a white balance correction value (gain value) will be described.

ホワイトバランス補正値を算出するためには、ホワイトバランス補正値の算出に用いる重み付け係数である色評価値HCLiを算出する必要がある。この色評価値HCLiは、彩度評価値HSi及び明るさの要素から算出される。すなわち、ホワイトバランス補正値は、(数式5)で表される。   In order to calculate the white balance correction value, it is necessary to calculate the color evaluation value HCLi, which is a weighting coefficient used for calculating the white balance correction value. This color evaluation value HCLi is calculated from the saturation evaluation value HSi and brightness elements. That is, the white balance correction value is expressed by (Formula 5).

(数式5)
F(色評価値HCLi)=F(彩度評価値HSi)×F(明るさの要素)
ここで、明るさの要素は、撮影露出値及び被写体の明るさに基づいて算出されるEV値によって決定される。また、彩度評価値HSiは、原則として、表色座標空間上で低彩度光源の座標からの距離(基準光源からの彩度距離)に基づいて算出される。
(Formula 5)
F (color evaluation value HCLi) = F (saturation evaluation value HSi) × F (element of brightness)
Here, the element of brightness is determined by the EV value calculated based on the photographing exposure value and the brightness of the subject. The saturation evaluation value HSi is calculated based on the distance from the coordinates of the low saturation light source in the color coordinate space (saturation distance from the reference light source) in principle.

(数式5)にしたがって、彩度評価値HSiを算出し、彩度評価値HSiと明るさの要素に基づいて色評価値HCLiを算出し、その色評価値HCLiに基づいてホワイトバランス補正値(ゲイン値)を算出する処理について、その詳細を以下説明する。   According to (Equation 5), the saturation evaluation value HSi is calculated, the color evaluation value HCLi is calculated based on the saturation evaluation value HSi and the brightness element, and the white balance correction value ( Details of the process of calculating the (gain value) will be described below.

まず、図3を用いて説明したカタマリ演算処理によって求められた、各カタマリの色情報としてのカタマリ座標(Ri/Gi,Bi/Gi)を、メモリ18から読み込む(ステップS142)。   First, the catamary coordinates (Ri / Gi, Bi / Gi) as the color information of each catamari obtained by the catamaran calculation process described with reference to FIG. 3 are read from the memory 18 (step S142).

次に、撮影シーンにおける撮影画面の全体の明るさ(輝度)を示すEV値(平均EV値)を算出する(ステップS144)。S1スイッチオン時の輝度を示すEV値を読み込んでもよい。   Next, an EV value (average EV value) indicating the overall brightness (luminance) of the shooting screen in the shooting scene is calculated (step S144). An EV value indicating the luminance when the S1 switch is on may be read.

次に、彩度距離の目標座標設定がオンであるか否かを判定する(ステップS146)。すなわち、表色座標上の基準点として、グレーの座標(1,1)を用いるか、それとも、明るさに応じてグレーの座標(1,1)から変動する座標を用いるかを判定する。   Next, it is determined whether or not the target coordinate setting of the saturation distance is on (step S146). That is, it is determined whether the gray coordinate (1, 1) is used as the reference point on the color coordinate or whether the coordinate fluctuating from the gray coordinate (1, 1) according to the brightness is used.

ここでの目標座標設定のオン/オフの判定の結果、オフである場合には、グレーの座標(1,1)を目標座標に設定する(ステップS148)。すなわち、目標座標設定をオフとすることにより、従来と同様にグレーの座標(1,1)を目標座標に固定することも可能である。   If it is determined that the target coordinate setting is ON / OFF, the gray coordinate (1, 1) is set as the target coordinate (step S148). That is, by turning off the target coordinate setting, the gray coordinates (1, 1) can be fixed to the target coordinates as in the conventional case.

その一方で、目標座標設定がオンである場合には、明るさに応じてグレーの座標から変動する座標を目標座標に設定する処理を実行する(ステップS150乃至S156)。   On the other hand, when the target coordinate setting is ON, a process of setting the coordinate that varies from the gray coordinate according to the brightness as the target coordinate is executed (steps S150 to S156).

具体的には、まず、EV閾値(下限値E_CBT_EV1及び上限値E_CBT_EV2)と、低輝度時の目標座標(E_CBT_R,E_CBT_B)とを、これらが予め設定されたROM16から読み込む(ステップS152)。ここでEV閾値は、目標座標をグレーの座標から変動し得る明るさ(平均EV値)の範囲を示す。また、低輝度時の目標座標(E_CBT_R,E_CBT_B)は、明るさ(平均EV値)がEV閾値の下限値E_CBT_EV1よりも小さいときに設定する目標座標である。   Specifically, first, the EV threshold value (lower limit value E_CBT_EV1 and upper limit value E_CBT_EV2) and target coordinates (E_CBT_R, E_CBT_B) at the time of low luminance are read from the ROM 16 in which these are set in advance (step S152). Here, the EV threshold value indicates a range of brightness (average EV value) in which the target coordinates can be varied from the gray coordinates. Further, the target coordinates (E_CBT_R, E_CBT_B) at the time of low luminance are target coordinates set when the brightness (average EV value) is smaller than the lower limit value E_CBT_EV1 of the EV threshold value.

次に、明るさに応じて変動する目標座標(CBT_R,CBT_B)を出力するメンバシップ関数を用いて、その目標座標を求める(ステップS152)。メンバシップ関数の例を図11に示す。ここで、平均EV値(明るさ情報)がEV閾値(下限値E_CBT_EV1及び上限値E_CBT_EV2)によって示される範囲内であれば、平均EV値(明るさ情報)に応じて、図11に示すように変動する目標座標(CBT_R,CBT_B)が出力される。なお、平均EV値(明るさ情報)が下限のEV閾値E_CBT_EV1より小さいときには、低輝度時の目標設定座標(E_CBT_R,E_CBT_B)が出力され、平均EV値(明るさ情報)が上限のEV閾値E_CBT_EV2より大きいときには、グレー座標(1,1)が出力される。   Next, the target coordinates are obtained using a membership function that outputs the target coordinates (CBT_R, CBT_B) that vary according to the brightness (step S152). An example of the membership function is shown in FIG. Here, if the average EV value (brightness information) is within the range indicated by the EV threshold values (lower limit value E_CBT_EV1 and upper limit value E_CBT_EV2), as shown in FIG. 11, according to the average EV value (brightness information). Fluctuating target coordinates (CBT_R, CBT_B) are output. When the average EV value (brightness information) is smaller than the lower limit EV threshold value E_CBT_EV1, target setting coordinates (E_CBT_R, E_CBT_B) at the time of low luminance are output, and the average EV value (brightness information) is the upper limit EV threshold value E_CBT_EV2 When it is larger, the gray coordinate (1, 1) is output.

ただし、表色座標(R/G,B/G)上で目標座標変更を許容する指定検出枠内に目標座標があるか否かを判定して(ステップS154)、その検出枠外であれば、メンバシップ関数の出力を無効にして、目標座標にグレーの座標(1,1)を設定する(ステップS148)。   However, it is determined whether or not the target coordinate is within the designated detection frame that allows the target coordinate change on the color coordinate (R / G, B / G) (step S154). The output of the membership function is invalidated and gray coordinates (1, 1) are set as the target coordinates (step S148).

目標座標設定がオンであって、目標座標が指定検出枠内である場合には、明るさに応じてグレーの座標から変動する座標(CBT_R,CBT_B)を、彩度距離の目標座標に設定する(ステップS156)。   When the target coordinate setting is on and the target coordinate is within the specified detection frame, the coordinates (CBT_R, CBT_B) that vary from the gray coordinates according to the brightness are set as the target coordinates of the saturation distance. (Step S156).

次に、表色座標(R/G,B/G)上で目標座標から各カタマリ座標までの彩度距離ΔSを算出する(ステップS166)。   Next, the saturation distance ΔS from the target coordinate to each catalyzed coordinate is calculated on the color coordinate (R / G, B / G) (step S166).

なお、グレーの座標(1,1)を目標座標に設定した場合、各カタマリ座標(Ri/Gi,Bi/Gi)の彩度距離ΔSは(数式6)によって求められる。   When the gray coordinate (1, 1) is set as the target coordinate, the saturation distance ΔS of each catalyzed coordinate (Ri / Gi, Bi / Gi) is obtained by (Formula 6).

(数式6)
ΔSi={(1−Ri/Gi)2 +(1−Bi/Gi)2 1/2
明るさに応じてグレーから変動する座標(CBT_R,CBT_B)を目標座標に設定した場合、各カタマリ座標(Ri/Gi,Bi/Gi)の彩度距離ΔSは(数式7)によって求められる。
(Formula 6)
ΔSi = {(1−Ri / Gi) 2 + (1−Bi / Gi) 2 } 1/2
When coordinates (CBT_R, CBT_B) that change from gray according to the brightness are set as the target coordinates, the saturation distance ΔS of each catamari coordinate (Ri / Gi, Bi / Gi) is obtained by (Equation 7).

(数式7)
ΔSi={(CBT_R−Ri/Gi)2 +(CBT_B−Bi/Gi)2 1/2
次のカタマリがあるか否かを判定して(ステップS164)、全てのカタマリについて彩度距離ΔSを算出し(ステップS162)、彩度距離ΔSが最小のカタマリを検出し(ステップS166)、彩度距離ΔSiが最小のカタマリを基準光源と定義する(ステップS168)。すなわち、表色座標(R/G,B/G座標)上で目標座標に最も近いカタマリ座標(カタマリを代表する色情報)を基準光源の座標と定義する。
(Formula 7)
ΔSi = {(CBT_R−Ri / Gi) 2 + (CBT_B−Bi / Gi) 2 } 1/2
It is determined whether or not there is a next catamaran (step S164), the saturation distance ΔS is calculated for all the catamaria (step S162), and the catamaran with the smallest saturation distance ΔS is detected (step S166). A catamari having the smallest degree distance ΔSi is defined as a reference light source (step S168). That is, the catamary coordinates (color information representing the catamaries) closest to the target coordinates on the color coordinates (R / G, B / G coordinates) are defined as the coordinates of the reference light source.

図6は、彩度基準定義処理で定めた基準光源を基準にホワイトバランス補正値を算出する処理(ホワイトバランス補正値算出処理)の流れを示すフローチャートである。   FIG. 6 is a flowchart showing the flow of a process (white balance correction value calculation process) for calculating a white balance correction value based on the reference light source determined in the saturation reference definition process.

まず、表色座標上において、基準光源からそれ以外の各カタマリまでの彩度距離ΔDiを求める(ステップS170)。   First, on the color coordinate, a saturation distance ΔDi from the reference light source to each other catamari is obtained (step S170).

基準光源と定義したカタマリの代表座標(基準光源座標)を(Xn、Yn)とし、他のカタマリ座標を(Xi、Yi)とすると、基準光源からの彩度距離ΔDiは(数式8)によって求められる。   Assuming that the representative coordinates (reference light source coordinates) of the catamari defined as the reference light source are (Xn, Yn) and the other catamari coordinates are (Xi, Yi), the saturation distance ΔDi from the reference light source is obtained by (Equation 8). It is done.

(数式8)
ΔDi={(Xn−Xi)2 +(Yn−Yi)2 1/2
次に、図12に示すような彩度評価値用のメンバシップ関数を用いて彩度評価値HSiを求める(ステップS172)。
(Formula 8)
ΔDi = {(Xn−Xi) 2 + (Yn−Yi) 2 } 1/2
Next, a saturation evaluation value HSi is obtained using a membership function for the saturation evaluation value as shown in FIG. 12 (step S172).

図12に示す彩度評価値用のメンバシップ関数は、基準光源から近い撮影画面上の部分は光源色が支配的であるとして彩度評価値を大きくし、基準光源から遠くなるにしたがってその撮影画面上の部分は物体色が支配的であるとして彩度評価値を小さくするものである。   The membership function for the saturation evaluation value shown in FIG. 12 increases the saturation evaluation value assuming that the light source color is dominant in the portion on the shooting screen that is close to the reference light source. In the portion on the screen, the saturation evaluation value is reduced because the object color is dominant.

つまり、R/G軸,B/G軸上でみると、図13のようになる。図13において、第一近隣円400の内側にある場合には、光源色が支配的であるとして彩度評価値を大きく、第二近隣円402の外側にある場合には、この円から離れれば離れるほど物体色が支配的であるとして彩度評価値を低くする。   That is, when viewed on the R / G axis and the B / G axis, it is as shown in FIG. In FIG. 13, if the light source color is dominant when it is inside the first neighboring circle 400, the saturation evaluation value is large, and if it is outside the second neighboring circle 402, it is necessary to move away from this circle. The saturation evaluation value is lowered because the object color is dominant as the distance increases.

以上のようにして彩度評価値HSiを求めたのち、明るさ評価値を算出し(ステップS174)、前述の(数式5)にように、彩度評価値HSiと明るさ評価値(明るさの要素)とに基づいて、ホワイトバランス補正値の重み付け係数である色評価値HCLiを算出する(ステップS176)。   After obtaining the saturation evaluation value HSi as described above, the brightness evaluation value is calculated (step S174), and the saturation evaluation value HSi and the brightness evaluation value (brightness) are calculated as in (Formula 5) described above. The color evaluation value HCLi, which is a weighting coefficient of the white balance correction value, is calculated based on the element (step S176).

次に、算出された色評価値HCLiに基づいてホワイトバランス補正値(ゲイン値)を算出する(ステップS178)。   Next, a white balance correction value (gain value) is calculated based on the calculated color evaluation value HCLi (step S178).

具体的には、(数式9)に示されような、それぞれのカタマリ座標を目標値にもっていくようなR/G,B/GゲインGr'、Gb'が算出される。   Specifically, R / G and B / G gains Gr ′ and Gb ′ are calculated as shown in (Equation 9) so as to bring the respective catamari coordinates to target values.

(数式9)
Gr'=Σ(Gri×HCLi)/ΣHCLi
Gb'=Σ(Gbi×HCLi)/ΣHCLi
以上のようにして求めたR/G,B/Gゲイン値Gr'、Gb'を、R,G,Bごとのゲイン値Rg,Gg,Bgに変換した後、図2に示すホワイトバランス補正用のR,G,B別の乗算器140R、140G、140Bに設定する(ステップS180)。
(Formula 9)
Gr ′ = Σ (Gri × HCLi) / ΣHCLi
Gb ′ = Σ (Gbi × HCLi) / ΣHCLi
The R / G and B / G gain values Gr ′ and Gb ′ obtained as described above are converted into gain values Rg, Gg, and Bg for each of R, G, and B, and then are used for white balance correction shown in FIG. R, G, B separate multipliers 140R, 140G, 140B are set (step S180).

このようにしてホワイトバランス補正値としてのゲイン値が設定されると、R,G,B各色別の画像信号のホワイトバランスが補正される。   When the gain value as the white balance correction value is set in this way, the white balance of the image signal for each color of R, G, B is corrected.

特に室内は、色温度が低くなればなるほど黄色に黄赤が足されていき、グレーのものでも黄赤ぎみになる。人の視認では、本来グレーのものはグレーであると認識しようとする順応が働くが、不完全順応なので、本来グレーのものもある程度、黄赤気味の色として色味が残ることになる。このような点に着目し、本実施形態でも、彩度の基準となる目標値をシーンに応じて黄赤気味に設定する。光源は低色温度になるにつれて低照度になる性質をもっているので、輝度が低ければ低いほど彩度基準となる目標値を黄赤気味にもっていくように設定できる。   Especially in the room, the lower the color temperature, the more yellow and red will be added to the yellow, and even the gray one will become yellow-red. For human visual recognition, adaptation is intended to recognize that gray is originally gray, but because it is incomplete adaptation, the original gray color will remain to some extent as a reddish yellow color. Focusing on this point, in this embodiment as well, the target value serving as a reference for saturation is set to yellowish red depending on the scene. Since the light source has the property that the illuminance becomes lower as the color temperature becomes lower, it is possible to set the target value serving as the color saturation reference to be yellowish red as the luminance is lower.

これによって、黄赤気味の光源下に補色色相となるような物体が存在していたとしても、目標値があらかじめ黄赤に設定されるので、カラーフェリア現象を防止できるとともに最適なホワイトバランス補正が施されるようにすることができる。   As a result, even if there is an object that has a complementary hue under a yellowish red light source, the target value is set to yellow-red in advance. Can be applied.

また、逆に、高色温度領域においても、明るさに応じて目標値を変動させることにより、カラーフェリア現象が防止されるとともに最適なホワイトバランス補正が施される。   Conversely, even in the high color temperature region, by changing the target value according to the brightness, the color feria phenomenon is prevented and the optimum white balance correction is performed.

以上説明したようなオートホワイトバランス制御処理を行うホワイトバランス補正装置の機能的なブロック図を図7に示す。   FIG. 7 shows a functional block diagram of the white balance correction apparatus that performs the auto white balance control process as described above.

図7において、ホワイトバランス補正装置10は、主として、画像信号取得部56aと、色情報検出部12aと、明るさ情報検出部12bと、カタマリ演算部12cと、物体色らしさ演算部12dと、スポット光らしさ演算部12eと、目標値変動部12f、及び、目標値からの彩度距離演算部12gからなる彩度基準定義部12hと、光源判別部12i、光源からの彩度距離演算部12j、彩度評価値算出部12k、明るさ評価値算出部12m、及び、重み付け演算部12nからなるホワイトバランス補正値算出部12pと、ホワイトバランス補正部100aと、画像信号出力部100bと、メモリ18を含んで構成される。   In FIG. 7, the white balance correction device 10 mainly includes an image signal acquisition unit 56a, a color information detection unit 12a, a brightness information detection unit 12b, a catamari calculation unit 12c, an object color likelihood calculation unit 12d, a spot Luminance calculation unit 12e, target value variation unit 12f, saturation reference calculation unit 12h including saturation distance calculation unit 12g from target value, light source determination unit 12i, saturation distance calculation unit 12j from light source, A white balance correction value calculation unit 12p including a saturation evaluation value calculation unit 12k, a brightness evaluation value calculation unit 12m, and a weighting calculation unit 12n, a white balance correction unit 100a, an image signal output unit 100b, and a memory 18 Consists of including.

画像信号取得部56aは、各色別の画像信号を取得するものである。   The image signal acquisition unit 56a acquires an image signal for each color.

色情報検出部12aは、撮影画面の各分割エリアごとの色情報を各分割エリア内の画像信号に基づいて検出するものである。   The color information detection unit 12a detects color information for each divided area of the shooting screen based on an image signal in each divided area.

明るさ情報算出部12bは、撮影画面の全体の明るさ情報、及び、撮影画面の各分割エリアごとの明るさ情報を画像信号に基づいて検出するものである。   The brightness information calculation unit 12b detects brightness information of the entire shooting screen and brightness information for each divided area of the shooting screen based on the image signal.

カタマリ演算部12cは、表色座標上において色情報のカタマリを検出するとともに、各カタマリを代表する色情報(カタマリ座標)と、各カタマリを代表する明るさ情報(カタマリEV値)と、各カタマリの撮影画面上における面積(カタマリ面積)を検出するものである。   The catamari calculation unit 12c detects the color information catamari on the color coordinates, color information representing each catamari (catamari coordinates), brightness information representing each catamari (catamari EV value), and each catamari. The area on the photographing screen (catamari area) is detected.

なお、カタマリは、互いに色が近似する分割エリアの集合であって、したがって撮影画面の部分であり、カタマリ座標は、各部分の色情報であり、カタマリEV値は、各部分の明るさ情報であり、カタマリ面積は、各部分の面積である。   Note that the catamar is a set of divided areas whose colors are similar to each other, and thus is a portion of the shooting screen, the catamary coordinates are color information of each portion, and the catamary EV value is brightness information of each portion. Yes, the catamari area is the area of each part.

ここで、カタマリは、表色座標上で座標(色)が近似して塊となっている分割エリアの集合であり、必ずしも撮影画面上での位置が近似して塊となっている分割エリアを集合させたものとはならず、撮影画面上での位置が散らばっている複数の分割エリアがひとつのカタマリを形成する場合もある。   Here, the catamari is a set of divided areas that are approximated to be a lump with coordinates (colors) on the color coordinate, and the divided areas that are always approximated to a position on the shooting screen are indicated as a lump. In some cases, a plurality of divided areas having different positions on the shooting screen form a single catamaly.

物体色らしさ演算部12dは、撮影画面の各部分の色情情報及び明るさ情報に基づいて撮影画面の各部分の色情報の物体色らしさ及び光源色らしさを検出し、撮影画面内の複数の色情報から、所定の光源色(例えば、タングステン光源色)に近似している物体色らしい色情報(すなわち明るさ情報に基づいて光源色らしくないと判定される色情報)を除去するものである。   The object color likelihood calculation unit 12d detects the object color likelihood and the light source color likelihood of the color information of each part of the shooting screen based on the color information and brightness information of each part of the shooting screen, and a plurality of colors in the shooting screen. Color information that seems to be an object color that approximates a predetermined light source color (for example, a tungsten light source color) (that is, color information that is determined not to be a light source color based on brightness information) is removed from the information.

スポット光らしさ演算部12eは、撮影画面の各部分内の画像信号及び色情報に基づいて撮影画面の各部分の色情報のスポット光らしさを検出し、撮影画面内の複数の色情報からスポット光らしい色情報を除去するものである。具体的には、カタマリEV値及びカタマリ面積に基づいて、画面中での面積占有率、他のカタマリとの明るさの差(明るさの相対値)及び明るさの絶対値を判定して、スポット光らしいカタマリ座標を検出し除去する。   The spot light likelihood calculating unit 12e detects the spot light likelihood of the color information of each part of the shooting screen based on the image signal and color information in each part of the shooting screen, and the spot light from the plurality of color information in the shooting screen. This is to remove apparent color information. Specifically, on the basis of the catamari EV value and the catamari area, the area occupancy rate in the screen, the brightness difference (brightness relative value) with other catamaris, and the absolute brightness value are determined. Detects and removes catamari coordinates that appear to be spot light.

目標値変動部12fは、撮影画面の全体又は所定の部分の明るさ情報に応じて、光源判別の基準となる色情報の目標値(目標座標)をグレーから変動させるものである。   The target value changing unit 12f changes the target value (target coordinates) of color information serving as a reference for light source determination from gray according to the brightness information of the entire photographing screen or a predetermined portion.

目標値からの彩度距離演算部12gは、表色座標上における目標値(目標座標)からの距離(彩度距離)を算出するものである。   The saturation distance calculation unit 12g from the target value calculates a distance (saturation distance) from the target value (target coordinates) on the color coordinates.

彩度基準定義部12hは、目標値(目標座標)からの彩度距離に基づいて基準光源を定めるものである。   The saturation reference definition unit 12h determines the reference light source based on the saturation distance from the target value (target coordinates).

光源判別部12iは、目標値(目標座標)と撮影画面の各部分の色情報とに基づいて光源の部分を判別するものである。   The light source discriminating unit 12i discriminates the light source part based on the target value (target coordinates) and the color information of each part of the photographing screen.

基準光源からの彩度距離演算部12jは、表色座標上における基準光源の座標からの距離(彩度距離)を算出するものである。   The saturation distance calculation unit 12j from the reference light source calculates a distance (saturation distance) from the coordinates of the reference light source on the color coordinate.

彩度評価値算出部12kは、基準光源の座標からの距離(彩度距離)に基づいて彩度評価値を算出するものである。   The saturation evaluation value calculation unit 12k calculates a saturation evaluation value based on the distance (saturation distance) from the coordinates of the reference light source.

明るさ評価値算出部12mは、明るさ評価値を算出するものである。   The brightness evaluation value calculation unit 12m calculates a brightness evaluation value.

重み付け演算部12nは、ホワイトバランス補正値の重み付け係数である色評価値を彩度評価値及び明るさ評価値に基づいて算出するものである。   The weighting calculation unit 12n calculates a color evaluation value that is a weighting coefficient of the white balance correction value based on the saturation evaluation value and the brightness evaluation value.

ホワイトバランス補正値算出部12pは、画像信号のホワイトバランスを補正するように、画像信号に対してゲインとして与えるホワイトバランス補正値を算出するものである。具体的には、彩度評価値と明るさ評価値とに基づいて算出された色評価値で重み付けを行ってホワイトバランス補正値を算出する。   The white balance correction value calculation unit 12p calculates a white balance correction value given as a gain to the image signal so as to correct the white balance of the image signal. Specifically, the white balance correction value is calculated by weighting the color evaluation value calculated based on the saturation evaluation value and the brightness evaluation value.

ホワイトバランス補正部100aは、画像信号に対してホワイトバランス補正値よる演算を行って、ホワイトバランスを補正するものである。   The white balance correction unit 100a corrects the white balance by performing a calculation using a white balance correction value on the image signal.

画像信号出力部100bは、ホワイトバランスが補正された画像信号を出力するものである。   The image signal output unit 100b outputs an image signal with the white balance corrected.

なお、図7に示した機能的構成のホワイトバランス補正装置10の構成要素と、図2に示した具体的構成のホワイトバランス補正装置10の要部の構成要素との関係について簡略に説明すると、画像信号取得部56aは、図2の画像入力コントローラ57によって構成され、色情報算出部12a、明るさ情報算出部12b、カタマリ演算部12c、物体色らしさ演算部12d、スポット光らしさ演算部12e、彩度基準定義部12h、及び、ホワイトバランス補正値算出部12pは、図2のCPU12によって構成され、ホワイトバランス補正部100a、及び、画像信号出力部100bは、図2のデジタル信号処理回路100によって構成されている。   The relationship between the constituent elements of the white balance correction apparatus 10 having the functional configuration shown in FIG. 7 and the main constituent elements of the white balance correction apparatus 10 having the specific configuration shown in FIG. The image signal acquisition unit 56a is configured by the image input controller 57 of FIG. 2, and includes a color information calculation unit 12a, a brightness information calculation unit 12b, a catamari calculation unit 12c, an object color likelihood calculation unit 12d, a spot light likelihood calculation unit 12e, The saturation reference definition unit 12h and the white balance correction value calculation unit 12p are configured by the CPU 12 of FIG. 2, and the white balance correction unit 100a and the image signal output unit 100b are configured by the digital signal processing circuit 100 of FIG. It is configured.

なお、図8を用いて説明した検出枠により撮影画面の部分集合であるカタマリを検出する態様と、図9を用いて説明した検出枠を用いないで撮影画面の部分集合であるカタマリを検出する態様とは、それぞれ別個の態様として実施してもよく、また、2つの態様を併合させて実施してもよい。   In addition, the aspect which detects the subset which is the subset of the imaging | photography screen with the detection frame demonstrated using FIG. 8, and the catalogue which is the subset of the imaging | photography screen is detected without using the detection frame demonstrated using FIG. An aspect may be implemented as a separate aspect, or two aspects may be combined.

また、本発明は、カタマリ検出を行う場合に限定されるものではなく、各カタマリごとの色情報及び明るさ情報を算出することなく、各分割エリアごとの色情報及び明るさ情報を用いてホワイトバランス補正を行う場合にも適用可能である。   In addition, the present invention is not limited to the case where catamari detection is performed, and it is possible to obtain white information using color information and brightness information for each divided area without calculating color information and brightness information for each catalog. The present invention can also be applied when performing balance correction.

また、カラーの画像信号が、R(赤),G(緑),B(青)の各色の画像信号である場合を例に説明したが、それ以外のカラーの画像信号(例えば、Y(イエロー),M(マゼンタ),C(シアン)の各色の画像信号)に対してホワイトバランス補正を施す場合に本発明を適用してもよいことは言うまでもない。   Further, the case where the color image signal is an image signal of each color of R (red), G (green), and B (blue) has been described as an example, but other color image signals (for example, Y (yellow) ), M (magenta), and C (cyan) image signals), the present invention may be applied to white balance correction.

また、色情報を表す座標(表色座標)が、(R/G,B/G)座標である場合を例に説明したが、本発明は、表色座標がこのような(R/G,B/G)座標である場合に特に限定されるものではなく、彩度及び明るさを求めることが可能なその他の表色座標を用いるようにしてもよい。その場合、表色座標として、取得した画像信号の表色座標と同じ表色座標を用いてもよい。例えば、(R,G,B)座標をそのまま用いるようにしてもよい。   Further, although the case where the coordinates (color coordinates) representing the color information are (R / G, B / G) coordinates has been described as an example, the present invention is such that the color coordinates are such (R / G, (B / G) coordinates are not particularly limited, and other color coordinates that can determine saturation and brightness may be used. In that case, the same color coordinate as the color coordinate of the acquired image signal may be used as the color coordinate. For example, (R, G, B) coordinates may be used as they are.

また、ホワイトバランス補正装置がデジタルカメラである場合を例に説明したが、本発明は特にデジタルカメラに限定されるものではなく、画像表示装置、ビデオカメラ、カメラ付き携帯電話など、カラーの画像信号に対してホワイトバランス補正を施すあらゆるホワイトバランス補正装置に適用してもよいことは言うまでもない。   In addition, although the case where the white balance correction device is a digital camera has been described as an example, the present invention is not particularly limited to a digital camera, and color image signals such as an image display device, a video camera, a camera-equipped mobile phone, etc. Needless to say, the present invention may be applied to any white balance correction apparatus that performs white balance correction.

その他、本発明は、実施形態において説明した例には限定されず、本発明の要旨を逸脱しない範囲において、各種の設計変更や改良を行ってもよいのはもちろんである。   In addition, this invention is not limited to the example demonstrated in embodiment, Of course, in the range which does not deviate from the summary of this invention, various design changes and improvements may be performed.

本発明に係るホワイトバランス補正装置の一実施形態としてのデジタルカメラの例を示すブロック図1 is a block diagram showing an example of a digital camera as an embodiment of a white balance correction apparatus according to the present invention. ホワイトバランス補正装置の要部を示すブロック図Block diagram showing the main parts of the white balance correction device 本発明に係るホワイトバランス補正方法の一実施形態の流れを示す第1のフローチャート1st flowchart which shows the flow of one Embodiment of the white balance correction method which concerns on this invention. 本発明に係るホワイトバランス補正方法の一実施形態の流れを示す第2のフローチャート2nd flowchart which shows the flow of one Embodiment of the white balance correction method which concerns on this invention. 本発明に係るホワイトバランス補正方法の一実施形態の流れを示す第3のフローチャートThird flowchart showing the flow of one embodiment of the white balance correction method according to the present invention. 本発明に係るホワイトバランス補正方法の一実施形態の流れを示す第4のフローチャートA fourth flowchart showing a flow of an embodiment of a white balance correction method according to the present invention. 本発明に係るホワイトバランス補正装置の一実施形態の機能的な構成を示すブロック図The block diagram which shows the functional structure of one Embodiment of the white balance correction apparatus which concerns on this invention. 表色座標上に設けられた検出枠の例を示す説明図Explanatory drawing which shows the example of the detection frame provided on the color coordinate 表色座標上のカタマリ分布の例を示す説明図Explanatory drawing which shows the example of the catamari distribution on the color coordinate 明るさ情報をパラメータとして物体色らしさの評価値を出力する関数の例を示す説明図Explanatory drawing which shows the example of the function which outputs the evaluation value of object color likeness using brightness information as a parameter 明るさ情報をパラメータとして変動する目標値を出力する関数の例を示す説明図Explanatory drawing which shows the example of the function which outputs the target value which fluctuates using brightness information as a parameter 彩度評価値を出力する関数の例を示す説明図Explanatory drawing showing an example of a function that outputs a saturation evaluation value 表色座標上で基準光源からの距離に基づいて光源判別を行う処理の説明に用いる説明図Explanatory drawing used for explanation of processing for performing light source discrimination based on the distance from the reference light source on the color coordinate

符号の説明Explanation of symbols

10…ホワイトバランス補正装置(カメラ)、12…CPU、12a…色情報検出部、12b…明るさ情報検出部、12c…カタマリ演算部、12d…物体色らしさ演算部、12e…スポット光らしさ演算部、12f…目標値変動部、12g…目標値からの彩度距離演算部、12h…彩度基準定義部、12i…光源判別部、12j…光源からの彩度距離演算部、12k…彩度評価値算出部、12m…明るさ評価値算出部、12n…重み付け演算部、12p…ホワイトバランス補正値算出部、18…メモリ、38…CCD(固体撮像素子)、56…画像入力コントローラ、100…デジタル信号処理回路、112…積算回路   DESCRIPTION OF SYMBOLS 10 ... White balance correction apparatus (camera), 12 ... CPU, 12a ... Color information detection part, 12b ... Brightness information detection part, 12c ... Catamari calculation part, 12d ... Object color-likeness calculation part, 12e ... Spot light-likeness calculation part , 12f: target value changing unit, 12g: saturation distance calculation unit from target value, 12h ... saturation reference definition unit, 12i ... light source determination unit, 12j ... saturation distance calculation unit from light source, 12k ... saturation evaluation Value calculation unit, 12m ... Brightness evaluation value calculation unit, 12n ... Weighting calculation unit, 12p ... White balance correction value calculation unit, 18 ... Memory, 38 ... CCD (Solid-state imaging device), 56 ... Image input controller, 100 ... Digital Signal processing circuit, 112 ... integrating circuit

Claims (2)

各色別の画像信号に基づいてホワイトバランスの補正値を算出し、該ホワイトバランスの補正値に基づいて前記画像信号のホワイトバランスを補正するホワイトバランス補正装置であって、
画面を分割してなる各部分の色情報を前記画面の各部分内の画像信号に基づいて検出する手段と、
前記画面の各部分の明るさ情報を検出する手段と、
前記画面内の複数の色情報のうちで所定の光源色に近似している物体色らしい色情報を前記画面の各部分の明るさ情報に基づいて除去する色情報除去手段と、
前記所定の光源色に近似している物体色らしいものが除去された複数の色情報に基づいて前記ホワイトバランスの補正値を算出するホワイトバランス補正値算出手段と、
を備え、
前記画像信号は、赤、緑、青の各色別のR信号、G信号およびB信号からなり、
前記色情報は、前記画面の各部分ごとの前記B信号の積算値と前記G信号の積算値との比であるB/G値を含み、
前記色情報除去手段は、前記B/G値が閾値以下であり、且つ、前記明るさ情報が前記B/G値ごとに定まる値以上である場合、前記色情報を除去することを特徴とするホワイトバランス補正装置。
A white balance correction device that calculates a white balance correction value based on an image signal for each color and corrects the white balance of the image signal based on the white balance correction value,
Means for detecting color information of each part obtained by dividing the screen based on an image signal in each part of the screen;
Means for detecting brightness information of each part of the screen;
Color information removing means for removing color information that is likely to be an object color that approximates a predetermined light source color among a plurality of color information in the screen based on brightness information of each part of the screen;
White balance correction value calculating means for calculating the white balance correction value based on a plurality of pieces of color information from which an object color similar to the predetermined light source color is removed;
With
The image signal is composed of an R signal, a G signal, and a B signal for each color of red, green, and blue,
The color information includes a B / G value that is a ratio of an integrated value of the B signal and an integrated value of the G signal for each part of the screen,
The color information removing unit removes the color information when the B / G value is equal to or smaller than a threshold value and the brightness information is equal to or larger than a value determined for each B / G value. White balance correction device.
各色別の画像信号に基づいてホワイトバランスの補正値を算出し、該ホワイトバランスの補正値に基づいて前記画像信号のホワイトバランスを補正するホワイトバランス補正方法であって、
画面を分割してなる各部分の色情報を前記画面の各部分内の画像信号に基づいて検出するステップと、
前記画面の各部分の明るさ情報を検出するステップと、
前記画面内の複数の色情報のうちで所定の光源色に近似している物体色らしい色情報を前記画面の各部分の明るさ情報に基づいて除去する色情報除去ステップと、
前記所定の光源色に近似している物体色らしいものが除去された複数の色情報に基づいて前記ホワイトバランスの補正値を算出するステップと、
を含み、
前記画像信号は、赤、緑、青の各色別のR信号、G信号およびB信号からなり、
前記色情報は、前記画面の各部分ごとの前記B信号の積算値と前記G信号の積算値との比であるB/G値を含み、
前記色情報除去ステップにて、前記B/G値が閾値以下であり、且つ、前記明るさ情報が前記B/G値ごとに定まる値以上である場合、前記色情報を除去することを特徴とするホワイトバランス補正方法。
A white balance correction method for calculating a white balance correction value based on an image signal for each color and correcting the white balance of the image signal based on the white balance correction value,
Detecting color information of each part obtained by dividing the screen based on an image signal in each part of the screen;
Detecting brightness information of each part of the screen;
A color information removal step of removing color information that is likely to be an object color that approximates a predetermined light source color among a plurality of color information in the screen based on brightness information of each part of the screen;
Calculating a correction value of the white balance based on a plurality of pieces of color information from which an object color similar to the predetermined light source color is removed;
Including
The image signal is composed of an R signal, a G signal, and a B signal for each color of red, green, and blue,
The color information includes a B / G value that is a ratio of an integrated value of the B signal and an integrated value of the G signal for each part of the screen,
In the color information removal step, the color information is removed when the B / G value is not more than a threshold value and the brightness information is not less than a value determined for each B / G value. White balance correction method.
JP2004334702A 2004-11-18 2004-11-18 White balance correction apparatus and method Expired - Fee Related JP4277315B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004334702A JP4277315B2 (en) 2004-11-18 2004-11-18 White balance correction apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004334702A JP4277315B2 (en) 2004-11-18 2004-11-18 White balance correction apparatus and method

Publications (2)

Publication Number Publication Date
JP2006148464A JP2006148464A (en) 2006-06-08
JP4277315B2 true JP4277315B2 (en) 2009-06-10

Family

ID=36627642

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004334702A Expired - Fee Related JP4277315B2 (en) 2004-11-18 2004-11-18 White balance correction apparatus and method

Country Status (1)

Country Link
JP (1) JP4277315B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5545191B2 (en) * 2010-11-30 2014-07-09 ブラザー工業株式会社 Image processing apparatus and image processing program
JP5225403B2 (en) * 2011-02-02 2013-07-03 イーストマン コダック カンパニー White balance adjustment device and color identification device

Also Published As

Publication number Publication date
JP2006148464A (en) 2006-06-08

Similar Documents

Publication Publication Date Title
US8803994B2 (en) Adaptive spatial sampling using an imaging assembly having a tunable spectral response
JP4329125B2 (en) White balance control method, white balance control device, and imaging device
JP4158592B2 (en) Auto white balance adjustment method and camera to which this method is applied
JP4284448B2 (en) Image processing apparatus and method
EP2688302B1 (en) Image processing apparatus and control method thereof, and image capture apparatus
US9749546B2 (en) Image processing apparatus and image processing method
JP2008236101A (en) Imaging device and imaging method
US20120044380A1 (en) Image capture with identification of illuminant
EP3068126B1 (en) Imaging apparatus, control method and program
US9036046B2 (en) Image processing apparatus and method with white balance correction
US20180330529A1 (en) Image processing apparatus, image processing method, and computer readable recording medium
EP2362662B1 (en) Imaging device, imaging method and computer readable recording medium storing program for performing the imaging method
JP2004192129A (en) Method and device for extracting facial area
JP4067033B2 (en) Image processing apparatus and method
US9769391B2 (en) Imaging device including light modulation element that varies between high and low transmittance for each segment
US20190246028A1 (en) Image pickup apparatus, method for controlling image pickup apparatus, and storage medium
JP2007036438A (en) Color discrimination method and device of imaging apparatus, and exposure control method of imaging apparatus
JP4718113B2 (en) White balance adjustment method and image processing apparatus
JP4026516B2 (en) Image processing apparatus and method
JP4277315B2 (en) White balance correction apparatus and method
JP4210920B2 (en) White balance adjustment method and camera
JP3958700B2 (en) Digital camera
JP2007074201A (en) Photographing apparatus
JP2004304695A (en) White balance adjustment method
JP4239219B2 (en) Auto white balance adjustment method and apparatus

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20070109

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070412

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080414

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080710

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080908

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081125

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090126

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090216

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090301

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

Free format text: PAYMENT UNTIL: 20120319

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4277315

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120319

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130319

Year of fee payment: 4

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

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

Free format text: PAYMENT UNTIL: 20130319

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140319

Year of fee payment: 5

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees