JP5023874B2 - Color imaging device - Google Patents

Color imaging device Download PDF

Info

Publication number
JP5023874B2
JP5023874B2 JP2007204610A JP2007204610A JP5023874B2 JP 5023874 B2 JP5023874 B2 JP 5023874B2 JP 2007204610 A JP2007204610 A JP 2007204610A JP 2007204610 A JP2007204610 A JP 2007204610A JP 5023874 B2 JP5023874 B2 JP 5023874B2
Authority
JP
Japan
Prior art keywords
color
group
illumination
shooting
shooting scene
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2007204610A
Other languages
Japanese (ja)
Other versions
JP2009044255A (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.)
Nikon Corp
Original Assignee
Nikon 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 Nikon Corp filed Critical Nikon Corp
Priority to JP2007204610A priority Critical patent/JP5023874B2/en
Publication of JP2009044255A publication Critical patent/JP2009044255A/en
Application granted granted Critical
Publication of JP5023874B2 publication Critical patent/JP5023874B2/en
Active 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 color imaging apparatus equipped with a white balance adjustment function.

画像に施すべきホワイトバランス調整の調整量を算出するに当たり、その画像の撮影時に使用された照明の種類を判別する方法が特許文献1に記載されている。この方法は、画像の特定の色成分(例えばR成分)を特徴量とした教師有り学習により判別基準を予め算出し、その判別基準と、個々の画像から抽出された特徴量とに基づき、画像撮影時における被写界の照明種類が特定の種類であるか否かを判別するものである。
特開2006−129442号公報
Japanese Patent Application Laid-Open No. 2004-151867 describes a method for determining the type of illumination used when photographing an image when calculating the amount of white balance adjustment to be performed on the image. This method calculates a discrimination criterion in advance by supervised learning using a specific color component (for example, R component) of an image as a feature amount, and based on the discrimination criterion and a feature amount extracted from each image, It is determined whether or not the illumination type of the object scene at the time of shooting is a specific type.
JP 2006-129442 A

しかしながらこの判別方法では、特定の種類の照明で照らされた無彩色物体と似た色成分を持つ物体像が画像中に多く存在した場合に誤判別の起こる確率が高い。   However, with this discrimination method, there is a high probability of erroneous discrimination when there are many object images having color components similar to an achromatic object illuminated with a specific type of illumination in the image.

そこで本発明は、個々の撮影シーンをその照明色により高精度にグループ分けすることのできるカラー撮像装置を提供することを目的とする。   Accordingly, an object of the present invention is to provide a color imaging apparatus capable of grouping individual shooting scenes with high accuracy according to the illumination color.

本発明のカラー撮像装置は、判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、前記特徴量ベクトルのベクトル成分には、撮影レンズのレンズ情報が含まれることを特徴とする。  The color imaging apparatus of the present invention extracts a feature vector reflecting both the subject condition and the shooting condition of the shooting scene from the shooting scene to be discriminated, and calculates the feature vector in advance by supervised learning. And determining means for determining whether or not the shooting scene belongs to a specific group having a similar illumination color based on the determined determination criteria, and the vector component of the feature vector includes lens information of the shooting lens. It is characterized by that.
本発明の別のカラー撮像装置は、判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段と、前記撮影シーンで撮影された画像の色ヒストグラムに基づき撮影時の照明色を推定する推定手段とを備え、前記推定手段は、前記推定に使用される前記色ヒストグラムの色範囲を、前記判別手段が行った判別の結果に応じて制限することを特徴とする。  Another color imaging apparatus of the present invention extracts a feature vector reflecting both the subject condition and the shooting condition of the shooting scene from the shooting scene to be discriminated, and the feature vector and supervised learning. Discrimination means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors based on a discrimination criterion calculated in advance, and illumination at the time of shooting based on a color histogram of an image shot in the shooting scene An estimation unit configured to estimate a color, and the estimation unit limits a color range of the color histogram used for the estimation according to a result of determination performed by the determination unit.
本発明の別のカラー撮像装置は、判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、前記特徴量ベクトルのベクトル成分には、被写界の色と、撮影レンズのレンズポジションとが含まれることを特徴とする。  Another color imaging apparatus of the present invention extracts a feature vector reflecting both the subject condition and the shooting condition of the shooting scene from the shooting scene to be discriminated, and the feature vector and supervised learning. Based on a pre-determined discrimination criterion, it comprises discrimination means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors, and the vector component of the feature vector contains the color of the object scene And the lens position of the photographing lens.
本発明の別のカラー撮像装置は、判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、前記判別手段は、サポートベクターマシンであることを特徴とする。  Another color imaging apparatus of the present invention extracts a feature vector reflecting both the subject condition and the shooting condition of the shooting scene from the shooting scene to be discriminated, and the feature vector and supervised learning. Based on a pre-determined discrimination criterion, it comprises discrimination means for discriminating whether or not the photographic scene belongs to a specific group having similar illumination colors, and the discrimination means is a support vector machine.
本発明の別のカラー撮像装置は、判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、前記判別手段は、照明色の異なる複数の特定グループの各々に関して前記判別を行うことを特徴とする。  Another color imaging apparatus of the present invention extracts a feature vector reflecting both the subject condition and the shooting condition of the shooting scene from the shooting scene to be discriminated, and the feature vector and supervised learning. And determining means for determining whether or not the photographic scene belongs to a specific group having a similar illumination color based on a pre-determined determination criterion, wherein the determination means relates to each of a plurality of specific groups having different illumination colors. The discrimination is performed.

また、前記特徴量ベクトルのベクトル成分には、前記被写界中に存在するエッジ量が含まれることが望ましい。   The vector component of the feature vector preferably includes an edge amount existing in the scene.

また、前記判別手段は、前記判別を撮影前の期間に行うことが望ましい。   Further, it is desirable that the determination means perform the determination in a period before photographing.

また、前記判別手段は、前記複数の特定グループの各々に関する判別を順次に行い、その判別結果が「正」となった場合は、それ以降の判別の処理を省略してもよい。   In addition, the determination unit may sequentially determine each of the plurality of specific groups, and if the determination result is “positive”, subsequent determination processing may be omitted.

また、前記複数の特定グループは、照明色が低色温度照明の色度範囲に属するようなグループ、照明色が蛍光灯又は水銀灯の色度範囲に属するようなグループ、照明色が演色性の良い蛍光灯又は自然太陽光の色度範囲に属するようなグループ、照明色が日陰又は曇天の色度範囲に属するようなグループのうち何れか3つであってもよい。   The plurality of specific groups include a group in which the illumination color belongs to a chromaticity range of low color temperature illumination, a group in which the illumination color belongs to a chromaticity range of a fluorescent lamp or a mercury lamp, and the illumination color has good color rendering. Any three of the groups belonging to the chromaticity range of fluorescent light or natural sunlight and the groups of the illumination color belonging to the shade or cloudy chromaticity range may be used.

また、前記複数の特定グループは、照明色が晴天の色度範囲に属するようなグループ、照明色が日陰の色度範囲に属するようなグループ、照明色が低色温度蛍光灯又は電球の色度範囲に属するようなグループ、照明色が中色温度蛍光灯の色度範囲に属するようなグループ、照明色が高色温度蛍光灯の色度範囲に属するようなグループ、照明色が水銀灯の色度範囲に属するようなグループ、照明色が低色温度照明の色度範囲に属するようなグループのうち何れか6つであってもよい。   Further, the plurality of specific groups include a group in which the illumination color belongs to a chromaticity range of clear sky, a group in which the illumination color belongs to a shaded chromaticity range, and the illumination color of a low color temperature fluorescent lamp or a light bulb. A group that belongs to the range, a group that the illumination color belongs to the chromaticity range of the medium temperature fluorescent lamp, a group that the illumination color belongs to the chromaticity range of the high color temperature fluorescent lamp, and the chromaticity of the mercury lamp There may be any six of the groups belonging to the range and the groups having the illumination color belonging to the chromaticity range of the low color temperature illumination.

また、本発明のカラー撮像装置は、前記撮影シーンで撮影された画像の色ヒストグラムに基づき撮影時の照明種類を推定する推定手段を更に備え、前記推定手段は、前記色ヒストグラムの色範囲を、前記判別手段が行った判別の結果に応じて制限してもよい。   The color imaging apparatus of the present invention further includes an estimation unit that estimates an illumination type at the time of shooting based on a color histogram of an image shot in the shooting scene, and the estimation unit includes a color range of the color histogram, You may restrict | limit according to the result of the discrimination | determination which the said discrimination means performed.

また、前記撮影シーンで撮影された画像の色ヒストグラムに基づき撮影時の照明種類を推定する推定手段を更に備え、前記推定手段は、前記色ヒストグラムの各色範囲の頻度に対し、前記判別手段が行った判別の結果に応じて重み付けをしてもよい。   Further, the image processing apparatus further includes an estimation unit that estimates an illumination type at the time of shooting based on a color histogram of an image shot in the shooting scene, and the estimation unit performs the determination unit on the frequency of each color range of the color histogram. Weighting may be performed according to the determination result.

本発明によれば、個々の撮影シーンをその照明色により高精度にグループ分けすることができる。   According to the present invention, individual shooting scenes can be grouped with high accuracy by their illumination colors.

[第1実施形態]
本実施形態は、電子カメラの実施形態である。ここでは電子カメラが一眼レフレックスタイプであると仮定する。
[First Embodiment]
The present embodiment is an embodiment of an electronic camera. Here, it is assumed that the electronic camera is a single-lens reflex type.

先ず、電子カメラの撮影機構を説明する。図1は、電子カメラの光学系の構成を示す模式図である。図1に示すとおり電子カメラは、カメラ本体11と、撮影レンズ12を収容したレンズユニット13とを有する。レンズユニット13は、不図示のマウントを介してカメラ本体11に交換可能に装着される。   First, the photographing mechanism of the electronic camera will be described. FIG. 1 is a schematic diagram showing a configuration of an optical system of an electronic camera. As shown in FIG. 1, the electronic camera includes a camera body 11 and a lens unit 13 that houses a photographing lens 12. The lens unit 13 is replaceably attached to the camera body 11 via a mount (not shown).

カメラ本体11には、メインミラー14と、メカニカルシャッタ15と、カラー撮像素子16と、ファインダ光学系(17〜20)とが配置される。メインミラー14、メカニカルシャッタ15およびカラー撮像素子16は、撮影レンズ12の光軸に沿って配置され、ファインダ光学系(17〜20)はカメラ本体11の上部領域に配置される。   In the camera body 11, a main mirror 14, a mechanical shutter 15, a color image sensor 16, and a finder optical system (17 to 20) are arranged. The main mirror 14, the mechanical shutter 15, and the color image sensor 16 are disposed along the optical axis of the photographing lens 12, and the finder optical system (17 to 20) is disposed in the upper region of the camera body 11.

メインミラー14は不図示の回動軸の周りを回動し、それによって観察状態と退避状態との間で切り替えられる。観察状態のメインミラー14は、メカニカルシャッタ15およびカラー撮像素子16の前方で傾斜配置される。この観察状態のメインミラー14は、撮影レンズ12が捉えた光束を上方へ反射してファインダ光学系(17〜20)へ導く。なお、メインミラー14の中央はハーフミラーとなっており、観察状態のメインミラー14を透過した一部の光束はサブミラーによって不図示の焦点検出部に導かれる。   The main mirror 14 rotates around a rotation shaft (not shown), and is thereby switched between an observation state and a retracted state. The main mirror 14 in the observation state is inclined and disposed in front of the mechanical shutter 15 and the color image sensor 16. The main mirror 14 in the observation state reflects the light beam captured by the photographing lens 12 upward and guides it to the finder optical system (17 to 20). The center of the main mirror 14 is a half mirror, and a part of the light beam transmitted through the main mirror 14 in the observation state is guided to a focus detection unit (not shown) by the sub mirror.

一方、退避状態のメインミラー14は、上方に跳ね上げられて撮影光路から外れた位置にある。メインミラー14が退避状態にあるときは、撮影レンズ12の捉えた光束がメカニカルシャッタ15およびカラー撮像素子16に導かれる。   On the other hand, the main mirror 14 in the retracted state is in a position that is flipped upward and off the photographing optical path. When the main mirror 14 is in the retracted state, the light beam captured by the photographing lens 12 is guided to the mechanical shutter 15 and the color image sensor 16.

ファインダ光学系(17〜20)は、焦点板17と、コンデンサレンズ18と、ペンタプリズム19と、接眼レンズ20とを有している。このうちペンタプリズム19の近傍には再結像レンズ21および分割測光センサ22が配置されている。   The finder optical system (17 to 20) includes a focusing screen 17, a condenser lens 18, a pentaprism 19, and an eyepiece lens 20. Among these, a re-imaging lens 21 and a split photometric sensor 22 are disposed in the vicinity of the pentaprism 19.

焦点板17はメインミラー14の上方に位置している。この焦点板17で結像した光束はコンデンサレンズ18を介してペンタプリズム19の下面の入射面へ入射する。その入射面へ入射した一部の光束は、ペンタプリズム19の内面を反射した後、入射面と垂直な射出面からペンタプリズム19の外部へ射出し、接眼レンズ20へ向かう。   The focusing screen 17 is located above the main mirror 14. The light beam formed on the focusing screen 17 enters the incident surface on the lower surface of the pentaprism 19 via the condenser lens 18. A part of the light beam incident on the incident surface is reflected from the inner surface of the pentaprism 19, exits from the exit surface perpendicular to the incident surface to the outside of the pentaprism 19, and travels toward the eyepiece lens 20.

また、前記入射面へ入射した他の一部の光束は、ペンタプリズム19の内面を反射した後、前記射出面からペンタプリズム19の外部へ射出し、再結像レンズ21を介して分割測光センサ22に導かれる。   Further, another part of the light beam incident on the incident surface is reflected from the inner surface of the pentaprism 19 and then exits from the exit surface to the outside of the pentaprism 19, and is divided into photometric sensors via the re-imaging lens 21. To 22.

次に、電子カメラの回路構成を説明する。図2は、電子カメラの回路構成を示すブロック図である。図2に示すとおりカメラ本体11には、カラー撮像素子16と、AFE16aと、分割測光センサ22と、A/D変換回路22aと、画像処理回路23と、バッファメモリ(MEM)24と、記録インタフェース(記録I/F)25と、操作スイッチ(SW)26と、CPU29と、RAM28と、ROM27と、バス31とが備えられる。このうち画像処理回路23、バッファメモリ24、記録インタフェース25、CPU29、RAM28、ROM27は、バス31を介して互いに接続されている。また、操作スイッチ26は、CPU29に接続されている。   Next, the circuit configuration of the electronic camera will be described. FIG. 2 is a block diagram showing a circuit configuration of the electronic camera. As shown in FIG. 2, the camera body 11 includes a color image sensor 16, an AFE 16a, a divided photometric sensor 22, an A / D conversion circuit 22a, an image processing circuit 23, a buffer memory (MEM) 24, and a recording interface. (Recording I / F) 25, operation switch (SW) 26, CPU 29, RAM 28, ROM 27, and bus 31 are provided. Among these, the image processing circuit 23, the buffer memory 24, the recording interface 25, the CPU 29, the RAM 28, and the ROM 27 are connected to each other via a bus 31. The operation switch 26 is connected to the CPU 29.

カラー撮像素子16は、記録用の画像(本画像)を生成するために備えられたカラー撮像素子である。カラー撮像素子16は、その撮像面に形成された被写界像を光電変換することにより本画像のアナログ画像信号を生成する。なお、カラー撮像素子16の撮像面には、その被写界像をカラー検出するために、赤色(R)、緑色(G)、青色(B)の3種類のカラーフィルタが例えばベイヤ配列で配置されている。よって、本画像のアナログ画像信号はR成分、G成分、B成分の3成分から構成される。   The color image pickup device 16 is a color image pickup device provided for generating a recording image (main image). The color imaging device 16 generates an analog image signal of the main image by photoelectrically converting the object scene image formed on the imaging surface. Note that, on the imaging surface of the color imaging device 16, three types of color filters of red (R), green (G), and blue (B) are arranged in, for example, a Bayer array in order to detect the color of the object scene image. Has been. Therefore, the analog image signal of the main image is composed of three components of R component, G component, and B component.

AFE16aは、カラー撮像素子16が生成するアナログ画像信号に対して信号処理を施すアナログフロントエンド回路である。このAFE16aは、画像信号の相関二重サンプリングや、画像信号のゲインの調整や、画像信号のA/D変換を行う。このAFE16aが出力する画像信号(ディジタル画像信号)は、本画像の画像データとして画像処理回路23へ入力される。   The AFE 16a is an analog front-end circuit that performs signal processing on an analog image signal generated by the color imaging device 16. The AFE 16a performs correlated double sampling of the image signal, adjustment of the gain of the image signal, and A / D conversion of the image signal. The image signal (digital image signal) output from the AFE 16a is input to the image processing circuit 23 as image data of the main image.

分割測光センサ22は、非撮影時における被写界の色度分布及び明るさ分布を監視するために備えられたカラー撮像素子である。分割測光センサ22の撮像面には、カラー撮像素子16の撮像面に形成されるのと同じ範囲の被写界像が形成される。分割測光センサ22は、その撮像面に形成された被写界像を光電変換することにより被写界像のアナログ画像信号を生成する。なお、分割測光センサ22の撮像面には、被写界像をカラー検出するためにカラーフィルタが配置されている。よって、この被写界像の画像信号も、R成分、G成分、B成分の3成分から構成される。なお、この分割測光センサ22が出力する被写界像のアナログ画像信号は、A/D変換回路22aを介してCPU29へ入力される。   The divided photometric sensor 22 is a color image sensor provided for monitoring the chromaticity distribution and brightness distribution of the object scene during non-shooting. An object scene image in the same range as that formed on the imaging surface of the color image sensor 16 is formed on the imaging surface of the split photometry sensor 22. The divided photometric sensor 22 photoelectrically converts the object scene image formed on the imaging surface thereof to generate an analog image signal of the object scene image. A color filter is disposed on the imaging surface of the split photometric sensor 22 for color detection of the object scene image. Therefore, the image signal of the object scene image is also composed of three components of R component, G component, and B component. The analog image signal of the object scene image output from the divided photometric sensor 22 is input to the CPU 29 via the A / D conversion circuit 22a.

画像処理回路23は、AFE16aから入力される本画像の画像データに対して各種の画像処理(色補間処理、階調変換処理、輪郭強調処理、ホワイトバランス調整など)を施す。それら各処理のパラメータ(階調変換特性、輪郭強調強度、ホワイトバランス調整量など)は、CPU29によって適宜算出される。このうちホワイトバランス調整量は、R/Gゲインの値と、B/Gゲインの値とで構成される。   The image processing circuit 23 performs various image processing (color interpolation processing, gradation conversion processing, contour enhancement processing, white balance adjustment, etc.) on the image data of the main image input from the AFE 16a. The parameters (tone conversion characteristics, contour enhancement strength, white balance adjustment amount, etc.) of these processes are calculated as appropriate by the CPU 29. Of these, the white balance adjustment amount is composed of an R / G gain value and a B / G gain value.

バッファメモリ24は、画像処理回路23による個々の処理の速度差を補償するため、画像処理回路23の動作中の必要なタイミングで本画像の画像データを一時的に記憶する。   The buffer memory 24 temporarily stores the image data of the main image at a necessary timing during the operation of the image processing circuit 23 in order to compensate for a difference in speed of individual processing by the image processing circuit 23.

記録インタフェース25には、記憶媒体32を接続するためのコネクタが形成されている。記録インタフェース25は、そのコネクタに接続された記憶媒体32にアクセスし、本画像の画像データの書き込みや読み込みを行う。なお、記憶媒体32はハードディスクや、半導体メモリを内蔵したメモリカードなどで構成される。   The recording interface 25 is formed with a connector for connecting the storage medium 32. The recording interface 25 accesses the storage medium 32 connected to the connector, and writes and reads image data of the main image. The storage medium 32 is constituted by a hard disk, a memory card incorporating a semiconductor memory, or the like.

操作スイッチ26は、レリーズボタン、コマンドダイヤル、十字状のカーソルキーなどであり、ユーザによる操作内容に応じてCPU29へ信号を与える。例えばユーザは、レリーズボタンを全押しすることにより撮影の指示をCPU29へ与える。また、ユーザは、操作スイッチ26を操作することにより記録モードの切り替え指示をCPU29に与える。   The operation switch 26 is a release button, a command dial, a cross-shaped cursor key, and the like, and gives a signal to the CPU 29 according to the operation content by the user. For example, the user gives a shooting instruction to the CPU 29 by fully pressing the release button. In addition, the user gives an instruction to switch the recording mode to the CPU 29 by operating the operation switch 26.

なお、記録モードには通常記録モードとRAW記録モードとがあり、通常記録モードはCPU29が画像処理後の本画像の画像データを記憶媒体32に記録する記録モードであり、RAW記録モードは、CPU29が画像処理前の本画像の画像データ(RAWデータ)を記憶媒体32に記録する記録モードである。   The recording mode includes a normal recording mode and a RAW recording mode. The normal recording mode is a recording mode in which the CPU 29 records the image data of the main image after image processing in the storage medium 32. The RAW recording mode is the CPU 29. Is a recording mode in which image data (RAW data) of a main image before image processing is recorded in the storage medium 32.

CPU29は、電子カメラの統括的な制御を行うプロセッサである。CPU29は、ROM27に予め格納されたシーケンスプログラムをRAM28へ読み出し、そのプログラムを実行することにより各処理のパラメータを算出したり、電子カメラの各部を制御したりする。この際、CPU29は、必要に応じてレンズユニット13の不図示のレンズCPUからレンズ情報を取り込む。このレンズ情報には、撮影レンズ12の焦点距離、被写体距離、絞り値などの情報が含まれる。   The CPU 29 is a processor that performs overall control of the electronic camera. The CPU 29 reads out a sequence program stored in advance in the ROM 27 to the RAM 28 and executes the program to calculate parameters for each process and control each unit of the electronic camera. At this time, the CPU 29 captures lens information from a lens CPU (not shown) of the lens unit 13 as necessary. This lens information includes information such as the focal length of the photographing lens 12, the subject distance, and the aperture value.

また、CPU29は、プログラムの実行によって、現在の撮影シーンが特定のグループD1に属するか否かの判別(第1の判別)を行うサポートベクターマシン(SVM)として機能する。また、このSVMは、現在の撮影シーンが別のグループD2に属するか否かの判別(第2の判別)、及び現在の撮影シーンがグループD3に属するか否かの判別(第3の判別)を行うことも可能である。 Further, the CPU 29 functions as a support vector machine (SVM) that determines whether the current shooting scene belongs to the specific group D 1 (first determination) by executing the program. The SVM also determines whether or not the current shooting scene belongs to another group D 2 (second determination), and determines whether or not the current shooting scene belongs to group D 3 (third Determination) can also be performed.

ここで、グループD1、グループD2、グループD3は、様々な撮影シーンをその照明色によってグループ分けしてできる各グループである。また、SVMによる第1の判別、第2の判別、第3の判別の各々の判別基準は、SVMが教師有り学習によって予め算出したものである。これらの判別基準は、識別面S1,S2,S3のデータとして予めROM27に格納されている。 Here, the group D 1 , the group D 2 , and the group D 3 are groups in which various shooting scenes can be grouped according to their illumination colors. Further, each discrimination criterion of the first discrimination, the second discrimination, and the third discrimination by the SVM is calculated in advance by the supervised learning by the SVM. These discrimination criteria are stored in the ROM 27 in advance as data of the discrimination surfaces S 1 , S 2 , S 3 .

次に、各グループを詳しく説明する。図3に示すのは、各種の無彩色検出範囲を色度座標上で表した図である。これら無彩色検出範囲のデータは、ROM27に予め予め格納されている。これらの無彩色検出範囲は、黒体放射軌跡の近傍に分布した以下の無彩色検出範囲CL,CSSL,CFL1,CFL2,CHG,CS,CCL,CSHからなる。 Next, each group will be described in detail. FIG. 3 shows various achromatic color detection ranges on chromaticity coordinates. The achromatic color detection range data is stored in advance in the ROM 27. These achromatic color detection ranges include the following achromatic color detection ranges C L , C SSL , C FL1 , C FL2 , C HG , C S , C CL , and C SH distributed in the vicinity of the black body radiation locus.

無彩色検出範囲CL…電球の色度範囲(=電球で照らされた無彩色物体の色度範囲)。 Achromatic color detection range C L ... Chromaticity range of a light bulb (= chromaticity range of an achromatic object illuminated by a light bulb).

無彩色検出範囲CSSL…夕日の色度範囲(=夕日で照らされた無彩色物体の色度範囲)。 Achromatic color detection range C SSL ... Chromaticity range of sunset (= chromaticity range of an achromatic object illuminated by sunset).

無彩色検出範囲CFL1…第1の蛍光灯の色度範囲(=第1の蛍光灯で照らされた無彩色物体の色度範囲)。 Achromatic color detection range C FL1 ... Chromaticity range of the first fluorescent lamp (= chromaticity range of the achromatic object illuminated by the first fluorescent lamp).

無彩色検出範囲CFL2…第2の蛍光灯の色度範囲(=第2の蛍光灯で照らされた無彩色物体の色度範囲)。 Achromatic color detection range C FL2 ... The chromaticity range of the second fluorescent lamp (= the chromaticity range of the achromatic object illuminated by the second fluorescent lamp).

無彩色検出範囲CHG…水銀灯の色度範囲(=水銀灯で照らされた無彩色物体の色度範囲)。 Achromatic detection range C HG ... The chromaticity range of a mercury lamp (= chromaticity range of an achromatic object illuminated with a mercury lamp).

無彩色検出範囲CS…晴天の色度範囲(=晴天下に存在する無彩色物体の色度範囲)。なお、演色性の良いものであれば蛍光灯の色度もこの色度範囲に属する。 Achromatic color detection range C S .. chromaticity range in fine weather (= chromaticity range of an achromatic object existing under fine weather). If the color rendering property is good, the chromaticity of the fluorescent lamp also belongs to this chromaticity range.

無彩色検出範囲CCL…曇天の色度範囲(=曇天下に存在する無彩色物体の色度範囲)。 Achromatic color detection range C CL ... Chromatic chromaticity range (= chromaticity range of an achromatic object existing under cloudy weather).

無彩色検出範囲CSH…日陰の色度範囲(=日陰に存在する無彩色物体の色度範囲)。 Achromatic color detection range C SH ... shaded chromaticity range (= chromaticity range of an achromatic object existing in the shade).

そして、グループD1,D2,D3は、以下のグループである。 The groups D 1 , D 2 and D 3 are the following groups.

グループD1…照明色が比較的色温度の低い無彩色検出範囲CL,CSSLの何れかに属するような撮影シーンのグループ。 Group D 1 : A group of shooting scenes in which the illumination color belongs to one of the achromatic color detection ranges C L and C SSL having a relatively low color temperature.

グループD2…照明色が無彩色検出範囲CFL1,CFL2,CHGの何れかに属するような撮影シーンのグループ。 Group D 2 ... A group of shooting scenes in which the illumination color belongs to one of the achromatic color detection ranges C FL1 , C FL2 , and C HG .

グループD3…照明色が無彩色検出範囲CSに属するような撮影シーンのグループ。 Group D 3 ... A group of shooting scenes in which the illumination color belongs to the achromatic color detection range C S.

また、グループD4,D0を以下のとおり定義する。 Groups D 4 and D 0 are defined as follows.

グループD4…照明色が無彩色検出範囲CCL,CSHの何れかに属するような撮影シーンのグループ。 Group D 4 ... A group of shooting scenes in which the illumination color belongs to either the achromatic color detection range C CL or C SH .

グループD0…照明色が無彩色検出範囲CL,CSSL,CFL1,CFL2,CHG,CS,CCL,CSHの何れかに属する撮影シーンのグループ。 Group D 0 ... A group of shooting scenes in which the illumination color belongs to any one of the achromatic color detection ranges C L , C SSL , C FL1 , C FL2 , C HG , C S , C CL , C SH .

次に、識別面S1,S2,S3を算出するための教師有り学習の内容を説明する。 Next, the content of supervised learning for calculating the identification surfaces S 1 , S 2 , S 3 will be described.

この学習で使用される学習サンプルは、電子カメラに想定され得る多数の撮影シーンである。個々の学習サンプルは、電子カメラの製造者によってグループD1,グループD2,グループD3、グループD4の何れに属するかがラベリングされている。 The learning samples used in this learning are a large number of shooting scenes that can be assumed for an electronic camera. Each learning sample is labeled as belonging to one of group D 1 , group D 2 , group D 3 , or group D 4 by the manufacturer of the electronic camera.

個々の学習サンプルからは、ベクトル成分x1,x2,…,x15を持った15次の特徴量ベクトルが抽出される。個々のベクトル成分x1,x2,…,x15は、以下の量からなる。 From each learning sample, a 15th-order feature vector having vector components x 1 , x 2 ,..., X 15 is extracted. Each vector component x 1 , x 2 ,..., X 15 consists of the following quantities:

1=被写界の平均Bv値,
2=被写界の最大Bv値,
3=被写界の最小Bv値,
4=被写界のBv値の標準偏差,
5=被写界の平均B/G値,
6=被写界の最大B/G値,
7=被写界の最小B/G値,
8=被写界のB/G値の標準偏差,
9=被写界の平均R/G値,
10=被写界の最大R/G値,
11=被写界の最小R/G値,
12=被写界のR/G値の標準偏差,
13=被写界中に存在するエッジ量,
14=撮影レンズの焦点距離,
15=撮影レンズの被写体距離
このうちベクトル成分x1〜x13は、分割測光センサ22が生成した画像信号に基づき算出される。一方、ベクトル成分x14,x15は、レンズCPUから取り込まれたレンズ情報によって決定される。また、ベクトル成分x13は、次のようにして算出される。
x 1 = average Bv value of the object scene,
x 2 = maximum Bv value of the scene,
x 3 = minimum Bv value of the scene,
x 4 = standard deviation of the Bv value of the object scene,
x 5 = average B / G value of the field,
x 6 = maximum B / G value of the field,
x 7 = minimum B / G value of the field,
x 8 = standard deviation of the B / G value of the object scene,
x 9 = average R / G value of the field,
x 10 = maximum R / G value of the field,
x 11 = minimum R / G value of the field,
x 12 = standard deviation of R / G value of the field,
x 13 = the amount of edges existing in the object scene,
x 14 = focal length of the taking lens,
x 15 = Subject distance of the taking lens Of these, vector components x 1 to x 13 are calculated based on the image signal generated by the split photometric sensor 22. On the other hand, the vector components x 14 and x 15 are determined by lens information fetched from the lens CPU. Furthermore, the vector components x 13 is calculated as follows.

先ず、分割測光センサ22が生成した画像信号のG成分に対しX方向のエッジフィルタ処理及びY方向のエッジフィルタ処理が施される。それによって被写界のX方向のエッジ量とY方向のエッジ量とが算出される。そして、X方向のエッジ量とY方向のエッジ量との和が算出される。その和がベクトル成分x13である。 First, edge filter processing in the X direction and edge filter processing in the Y direction are performed on the G component of the image signal generated by the divided photometric sensor 22. Thereby, the edge amount in the X direction and the edge amount in the Y direction of the object scene are calculated. Then, the sum of the edge amount in the X direction and the edge amount in the Y direction is calculated. The sum is the vector component x 13 .

学習では、全ての学習サンプルの特徴量ベクトルがベクトル空間上の点で表わされる。このうちグループD1に属する各学習サンプルの特徴量ベクトルと、グループD1に属さない各学習サンプルの特徴量ベクトルとでは、図4に点線で示すとおり、分布領域が異なる。なお、図4では簡単のため15次元のベクトル空間Pを2次元で表した。 In learning, feature quantity vectors of all learning samples are represented by points on the vector space. Among these, the feature amount vector of each learning sample belonging to the group D 1 and the feature amount vector of each learning sample not belonging to the group D 1 have different distribution regions as shown by dotted lines in FIG. In FIG. 4, for the sake of simplicity, the 15-dimensional vector space P is represented in two dimensions.

次に、グループD1に属する学習サンプルと、グループD1に属さない学習サンプルとの間のマージンが最大となるような超平面が算出され、その超平面が識別面S1とされる。この識別面S1のデータはROM27に書き込まれる。 Next, a learning sample belonging to the group D 1, margin between the learning samples that do not belong to the group D 1 is the hyperplane such that the maximum is calculated, the hyperplane is a discriminant plane S 1. The data of the identification surface S 1 is written in the ROM 27.

ここで、図4中に示すとおり、識別面S1から個々の学習サンプルまでのユークリッド距離d1を考える。なお、距離d1の極性は、グループD1に属さない学習サンプルの多くが分布する側を正、グループD1に属する学習サンプルの多くが分布する側を負にとる。 Here, as shown in FIG. 4, the Euclidean distance d 1 from the identification plane S 1 to each learning sample is considered. The polarity of the distance d 1 takes the side where many learning samples that do not belong to the group D 1 is distributed positive and negative side many training samples belonging to the group D 1 is distributed.

図5は、この距離d1とサンプル数mとの関係を示す図である。図5に示すとおり、グループD1に属する学習サンプルの多くは距離d1が負となり、グループD1に属さない学習サンプルの多くは距離d1が正となるが、グループD1に属するにも拘わらず距離d1が正となるような学習サンプルや、グループD1に属さないにも拘わらず距離d1が負となるような学習サンプルも存在する。ここでは、このような学習サンプルの距離d1の範囲Zg1を「グレーゾーンZg1」という。 FIG. 5 is a diagram showing the relationship between the distance d 1 and the number of samples m. As shown in FIG. 5, the number of training samples belonging to the group D 1 becomes the distance d 1 is negative, many learning samples that do not belong to the group D 1 becomes the distance d 1 positive, also belonging to the group D 1 and the distance d 1 positive become such training samples despite the distance d 1 despite not belonging to group D 1 is also present learning samples as negative. Here, the range Zg 1 of the distance d 1 of such learning samples is referred to as “gray zone Zg 1 ”.

そこで本実施形態では、識別面S1を算出する際に、このグレーゾーンZg1のプラス側の境界値Thpos1とマイナス側の境界値Thneg1とを算出しておく。これらの境界値Thpos1,Thneg1のデータも、識別面S1のデータと共にROM27に書き込まれる。 Therefore, in the present embodiment, when the identification surface S 1 is calculated, a positive boundary value Th pos1 and a negative boundary value Th neg1 of the gray zone Zg 1 are calculated in advance . Data of these boundary values Th pos1 and Th neg1 are also written in the ROM 27 together with the data of the identification surface S 1 .

次に、ベクトル空間P上でグループD2に属する学習サンプルと、グループD2に属さない学習サンプルとの間のマージンが最大となるような超平面が算出され、その超平面が識別面S2とされる。また、その識別面S2の近傍のグレーゾーンZg2が算出され、グレーゾーンZg2のプラス側の境界値Thpos2と、マイナス側の境界値Thneg2とが算出される(図6参照)。これら識別面S2、境界値Thpos2、Thneg2のデータは、ROM27に書き込まれる。 Next, a learning sample belonging to the group D 2 in a vector space P, the margin between the learning samples that do not belong to the group D 2 is calculated hyperplane such that maximum, the hyperplane discriminant plane S 2 It is said. Further, the identification surface S gray area Zg 2 in the vicinity of 2 is calculated, the boundary value Th pos2 the positive side of the gray area Zg 2, the boundary value Th Neg2 the minus side is calculated (see FIG. 6). Data of these identification surface S 2 , boundary values Th pos2 , Th neg2 is written in the ROM 27.

次に、ベクトル空間P上でグループD3に属する学習サンプルと、グループD3に属さない学習サンプルとの間のマージンが最大となるような超平面が算出され、その超平面が識別面S3とされる。また、その識別面S3の近傍のグレーゾーンZg3が算出され、グレーゾーンZg3のプラス側の境界値Thpos3と、マイナス側の境界値Thneg3とが算出される(図7参照)。これら識別面S3、境界値Thpos3、Thneg3のデータは、ROM27に書き込まれる。 Next, a learning sample belonging to the group D 3 in a vector space P, the margin between the learning samples that do not belong to the group D 3 is calculated hyperplane such that maximum, the hyperplane discriminant plane S 3 It is said. Further, the calculated identification surface gray area Zg 3 in the vicinity of the S 3, the boundary value Th pos3 the positive side of the gray area Zg 3, the boundary value Th Neg3 the minus side is calculated (see FIG. 7). The data of the identification surface S 3 , boundary values Th pos3 , Th neg3 is written in the ROM 27.

次に、撮影に関するCPU29の動作の流れを説明する。図8は、撮影に関するCPU29の動作フローチャートである。ここでは、電子カメラのオートホワイトバランス機能がオンされ、電子カメラの記録モードが通常記録モードに設定されていると仮定する。また、フローチャートの開始時点では、メインミラー14は観察状態の位置にあり、ユーザが被写界を接眼レンズ20から観察できるものとする。   Next, the flow of operation of the CPU 29 relating to shooting will be described. FIG. 8 is an operation flowchart of the CPU 29 regarding photographing. Here, it is assumed that the auto white balance function of the electronic camera is turned on and the recording mode of the electronic camera is set to the normal recording mode. At the start of the flowchart, the main mirror 14 is in the observation state, and the user can observe the object scene from the eyepiece 20.

ステップS101:CPU29は、レリーズボタンが半押しされたか否かを判別し、レリーズ釦が半押しされた場合はステップS102に移行し、レリーズボタンが半押しされていない場合はステップS101を繰り返す。   Step S101: The CPU 29 determines whether or not the release button is half-pressed. If the release button is half-pressed, the process proceeds to step S102, and if the release button is not half-pressed, the step S101 is repeated.

ステップS102:CPU29は、撮影レンズ12の焦点調節を実行すると共に、分割測光センサ22に被写界の画像信号の出力を開始させる。なお、焦点調節は、焦点検出部が生成するデフォーカス信号をCPU29がレンズCPUへ与えることによって行われる。このときレンズCPUは、CPU29から与えられるデフォーカス信号がゼロに近づくように撮影レンズ12のレンズポジションを変化させ、それによって撮影レンズ12の焦点を被写界中の物体(被写体)に合わせる。   Step S102: The CPU 29 performs focus adjustment of the photographing lens 12, and causes the split photometric sensor 22 to start outputting an image signal of the object scene. The focus adjustment is performed when the CPU 29 gives a defocus signal generated by the focus detection unit to the lens CPU. At this time, the lens CPU changes the lens position of the photographic lens 12 so that the defocus signal supplied from the CPU 29 approaches zero, and thereby focuses the photographic lens 12 on an object (subject) in the object field.

ステップS103:CPU29は、SVMの機能により、現在の撮影シーンから特徴量ベクトルを抽出する。この抽出は、分割測光センサ22から出力される被写界の画像信号と、レンズCPUから与えられるレンズ情報(焦点調節後のレンズ情報)とに基づき行われる。その特徴量ベクトルは、学習時に抽出された特徴量ベクトルと同じベクトル成分を持った特徴量ベクトルである。   Step S103: The CPU 29 extracts a feature vector from the current shooting scene by using the SVM function. This extraction is performed based on the image signal of the object scene output from the divided photometric sensor 22 and lens information (lens information after focus adjustment) given from the lens CPU. The feature vector is a feature vector having the same vector component as the feature vector extracted at the time of learning.

ステップS104:CPU29は、SVMの機能により、ステップS103で抽出された特徴量ベクトルと識別面S1との距離d1を算出する(第1の判別)。この距離d1が小さいほど、現在の撮影シーンがグループD1に属する確度は高く、距離d1が大きいほど、現在の撮影シーンがグループD1に属する確度は低い。 Step S104: The CPU 29 calculates a distance d 1 between the feature vector extracted in step S103 and the identification surface S 1 by the SVM function (first determination). As this distance d 1 is small, the accuracy of the current shooting scene belongs to the group D 1 is high, as the distance d 1 is larger, the accuracy of the current shooting scene belongs to the group D 1 is low.

ステップS105:CPU29は、ステップS104で算出された距離d1と境界値Thneg1とを比較し、d1<Thneg1の式が満たされるか否かを判別する。この式が満たされる場合は、現在の撮影シーンの距離d1がグレーゾーンZg1(図5参照)のマイナス側に位置していることになる。よってCPU209は、この式が満たされた場合は現在の撮影シーンがグループD1に属するとみなしてステップS106へ移行し、この式が満たされない場合は次の判別を行うべくステップS107へ移行する。 Step S105: CPU 29 compares the distance d 1 and the boundary value Th neg1 calculated in step S104, it is determined whether expression of d 1 <Th neg1 is satisfied. When this expression is satisfied, the distance d 1 of the current shooting scene is located on the minus side of the gray zone Zg 1 (see FIG. 5). Therefore CPU209, the current shooting scene If this expression is satisfied migrates regarded as belonging to the group D 1 to step S106, if the expression is not satisfied, the process proceeds to step S107 to perform the following determination.

ステップS106:CPU29は、現在の撮影シーンのグループ番号iを「1」に設定してステップS116へ移行する。   Step S106: The CPU 29 sets the group number i of the current shooting scene to “1”, and proceeds to step S116.

ステップS107:CPU29は、SVMの機能により、ステップS103で抽出された特徴量ベクトルと識別面S2との距離d2を算出する(第2の判別)。この距離d2が小さいほど、現在の撮影シーンがグループD2に属する確度は高く、距離d2が大きいほど、現在の撮影シーンがグループD2に属する確度は低い。 Step S107: CPU 29 by the function of the SVM, the feature vector extracted in step S103 and calculates the distance d 2 between the identification surface S 2 (second determination). As this distance d 2 is small, the accuracy of the current shooting scene belongs to the group D 2 is high, as the distance d 2 is greater, the accuracy of the current shooting scene belongs to the group D 2 is low.

ステップS108:CPU29は、ステップS107で算出された距離d2と境界値Thneg2とを比較し、d2<Thneg2の式が満たされるか否かを判別する。この式が満たされる場合は、現在の撮影シーンの距離d2がグレーゾーンZg2(図6参照)のマイナス側に位置していることになる。よってCPU209は、この式が満たされた場合は現在の撮影シーンがグループD2に属するとみなしてステップS109へ移行し、この式が満たされない場合は次の判別を行うべくステップS110へ移行する。 Step S108: CPU 29 compares the distance d 2 and boundary value Th Neg2 calculated in step S107, it is determined whether expression of d 2 <Th neg2 is satisfied. When this equation is satisfied, the distance d 2 of the current shooting scene is located on the minus side of the gray zone Zg 2 (see FIG. 6). Therefore CPU209, the current shooting scene If this expression is satisfied, the process proceeds to step S109 is regarded as belonging to the group D 2, if this equation is not satisfied, the process proceeds to step S110 to perform the following determination.

ステップS109:CPU29は、現在の撮影シーンのグループ番号iを「2」に設定してステップS116へ移行する。   Step S109: The CPU 29 sets the group number i of the current shooting scene to “2”, and proceeds to step S116.

ステップS110:CPU29は、SVMの機能により、ステップS103で抽出された特徴量ベクトルと識別面S3との距離d3を算出する(第3の判別)。この距離d3が小さいほど、現在の撮影シーンがグループD3に属する確度は高く、距離d3が大きいほど、現在の撮影シーンがグループD3に属する確度は低い。 Step S110: The CPU 29 calculates a distance d 3 between the feature vector extracted in step S103 and the identification surface S 3 by the function of the SVM (third discrimination). As this distance d 3 is small, the accuracy of the current shooting scene belongs to the group D 3 is high, as the distance d 3 large, the accuracy of the current shooting scene belongs to the group D 3 is low.

ステップS111:CPU29は、ステップS110で算出された距離d3と境界値Thneg3とを比較し、d3<Thneg3の式が満たされるか否かを判別する。この式が満たされる場合は、現在の撮影シーンの距離d3がグレーゾーンZg3(図7参照)のマイナス側に位置していることになる。よってCPU209は、この式が満たされた場合は現在の撮影シーンがグループD3属するとみなしてステップS112へ移行し、この式が満たされない場合はステップS113へ移行する。 Step S 111: CPU 29 compares the distance d 3 and boundary value Th Neg3 calculated in step S110, it is determined whether expression of d 3 <Th neg3 is satisfied. When this equation is satisfied, the distance d 3 of the current shooting scene is located on the minus side of the gray zone Zg 3 (see FIG. 7). Therefore, the CPU 209 regards the current shooting scene as belonging to the group D 3 when this equation is satisfied, and proceeds to step S112. If this equation is not satisfied, the CPU 209 proceeds to step S113.

ステップS112:CPU29は、現在の撮影シーンのグループ番号iを「3」に設定してステップS116へ移行する。   Step S112: The CPU 29 sets the group number i of the current shooting scene to “3”, and proceeds to step S116.

ステップS113:CPU29は、ステップS104,S107,S110の各々で算出した距離d1,d2,d3と境界値Thpos1,Thpos2,Thpos3とを比較し、以下の式の全てが満たされるか否かを判別する。 Step S113: The CPU 29 compares the distances d 1 , d 2 and d 3 calculated in each of steps S104, S107 and S110 with the boundary values Th pos1 , Th pos2 and Th pos3 and all of the following expressions are satisfied. It is determined whether or not.

Thpos1<d1,Thpos2<d2,Thpos3<d3
この式の全てが満たされる場合は、現在の撮影シーンの距離d1がグレーゾーンZg1(図5参照)のプラス側に位置し、かつ現在の撮影シーンの距離d2がグレーゾーンZg2(図6参照)のプラス側に位置し、かつ、現在の撮影シーンの距離d3がグレーゾーンZg3のプラス側に位置していることになる。よってCPU29は、この式が満たされた場合は現在の撮影シーンがグループD4に属するとみなしてステップS114へ移行し、満たされない場合は現在の撮影シーンがグループD0に属するとみなして(つまり、グループの判別が不能とみなして)ステップS115へ移行する。
Th pos1 <d 1 , Th pos2 <d 2 , Th pos3 <d 3
When all of these expressions are satisfied, the distance d 1 of the current shooting scene is located on the plus side of the gray zone Zg 1 (see FIG. 5), and the distance d 2 of the current shooting scene is the gray zone Zg 2 ( located on the plus side in FIG see 6), and the distance d 3 of the present shooting scene will have been positioned on the positive side of the gray area Zg 3. Therefore, the CPU 29 regards the current shooting scene as belonging to the group D 4 when this expression is satisfied, and proceeds to step S114. If not satisfied, the CPU 29 regards the current shooting scene as belonging to the group D 0 (ie. , Assuming that group discrimination is impossible), the process proceeds to step S115.

ステップS114:CPU29は、現在の撮影シーンのグループ番号iを「4」に設定してステップS116へ移行する。   Step S114: The CPU 29 sets the group number i of the current shooting scene to “4”, and proceeds to step S116.

ステップS115:CPU29は、現在の撮影シーンのグループ番号iを「0」に設定してステップS116へ移行する。   Step S115: The CPU 29 sets the group number i of the current shooting scene to “0”, and proceeds to step S116.

ステップS116:CPU29は、レリーズボタンが全押しされたか否かを判別する。レリーズボタンが全押しされていない場合はS117に移行し、レリーズボタンが全押しされた場合はS118に移行する。   Step S116: The CPU 29 determines whether or not the release button has been fully pressed. If the release button is not fully pressed, the process proceeds to S117, and if the release button is fully pressed, the process proceeds to S118.

ステップS117:CPU29は、レリーズボタンの半押しが解除されたか否かを判別し、レリーズボタンの半押しが解除された場合には、分割測光センサ22の信号の出力を停止させてステップS101に戻り、レリーズボタンの半押しが継続している場合は、ステップS103に戻る。   Step S117: The CPU 29 determines whether or not the half-press of the release button has been released. If the half-press of the release button has been released, the CPU 29 stops the signal output of the divided photometric sensor 22 and returns to step S101. If the half-press of the release button continues, the process returns to step S103.

ステップS118:CPU29は、撮像処理を実行し、本画像の画像データを取得する。すなわちCPU29は、メインミラー14を退避状態の位置に移動させ、さらにカラー撮像素子16を駆動することにより、本画像の画像データを取得する。その本画像のデータは、AFE16aおよび画像処理部23をパイプライン式に通過してからバッファメモリ24にバッファリングされる。撮影処理が終了すると、メインミラー14は観察状態の位置に戻される。   Step S118: The CPU 29 executes an imaging process and acquires image data of the main image. That is, the CPU 29 acquires the image data of the main image by moving the main mirror 14 to the retracted position and driving the color imaging device 16. The actual image data passes through the AFE 16 a and the image processing unit 23 in a pipeline manner, and is then buffered in the buffer memory 24. When the photographing process is completed, the main mirror 14 is returned to the observation position.

ステップS119:CPU29は、ステップS118で取得された本画像の画像データに施すべきホワイトバランス調整のホワイトバランス調整量を、設定中のグループ番号iに応じて以下の手順(1)〜(5)で算出する。   Step S119: The CPU 29 determines the white balance adjustment amount of white balance adjustment to be applied to the image data of the main image acquired in step S118 according to the following procedures (1) to (5) according to the group number i being set. calculate.

(1)CPU29は、色度座標上に規定されている無彩色検出範囲(図3)を、現在設定中のグループ番号iに対応するもののみに制限する。つまり、グループ番号iが「1」であった場合には無彩色検出範囲CL,CSSL以外の無彩色検出範囲を無効とし、グループ番号iが「2」であった場合には無彩色検出範囲CFL1,CFL2,CHG以外の無彩色検出範囲を無効とし、グループ番号iが「3」であった場合には無彩色検出範囲CS以外の無彩色検出範囲を無効とし、グループ番号iが「4」であった場合には、無彩色検出範囲CCL,CSH以外の無彩色検出範囲を無効とし、グループ番号iが「0」であった場合には全ての無彩色検出領域を有効にする。 (1) The CPU 29 restricts the achromatic color detection range (FIG. 3) defined on the chromaticity coordinates to only those corresponding to the group number i currently set. That is, when the group number i is “1”, the achromatic color detection ranges other than the achromatic color detection ranges C L and C SSL are invalidated, and when the group number i is “2”, the achromatic color detection is performed. When the achromatic color detection range other than the ranges C FL1 , C FL2 , and C HG is invalidated and the group number i is “3”, the achromatic color detection range other than the achromatic color detection range C S is invalidated, and the group number When i is “4”, the achromatic color detection ranges other than the achromatic color detection ranges C CL and C SH are invalidated, and when the group number i is “0”, all achromatic color detection areas are set. Enable

(2)CPU29は、本画像を複数の小領域に分割し、個々の小領域の色度(小領域内の平均色度)を算出し、その色度に応じて個々の小領域を色度座標上へ写像する。さらにCPU29は、各小領域の中で有効な無彩色検出範囲に写像される小領域を見出し、それら小領域の数(頻度)を無彩色検出範囲毎に算出する。これによって、有効な無彩色検出範囲に関する色ヒストグラムが作成される。   (2) The CPU 29 divides the main image into a plurality of small areas, calculates the chromaticity of each small area (average chromaticity in the small area), and converts each small area according to the chromaticity. Map onto the coordinates. Further, the CPU 29 finds small areas mapped to the effective achromatic color detection range in each small area, and calculates the number (frequency) of these small areas for each achromatic color detection range. As a result, a color histogram relating to an effective achromatic color detection range is created.

例えば、図9に示すとおり、グループ番号iが「1」であった場合に作成される色ヒストグラムは、無彩色検出範囲CL,CSSLのみに関する色ヒストグラムH1であり、グループ番号iが「2」であった場合に作成される色ヒストグラムは、無彩色検出範囲CFL1,CFL2,CHGのみに関する色ヒストグラムH2であり、グループ番号iが「3」であった場合に作成される色ヒストグラムは、無彩色検出範囲CSのみに関する色ヒストグラムH3であり、グループ番号iが「4」であった場合に作成される色ヒストグラムは、無彩色検出範囲CCL,CSHのみに関する色ヒストグラムH4である。また、グループ番号iが「0」であった場合に作成される色ヒストグラムは、全ての無彩色検出範囲CL,CSSL,CFL1,CFL2,CHG,CS,CCL,CSHに関する色ヒストグラムH0である。 For example, as illustrated in FIG. 9, the color histogram created when the group number i is “1” is the color histogram H 1 related only to the achromatic color detection ranges C L and C SSL , and the group number i is “ 2 ”is a color histogram H 2 relating only to the achromatic color detection ranges C FL1 , C FL2 , and C HG , and is generated when the group number i is“ 3 ”. The color histogram is a color histogram H 3 related only to the achromatic color detection range C S , and the color histogram created when the group number i is “4” is a color related to only the achromatic color detection ranges C CL and C SH. Histogram H 4 . Further, the color histogram created when the group number i is “0” indicates that all the achromatic color detection ranges C L , C SSL , C FL1 , C FL2 , C HG , C S , C CL , C SH Is a color histogram H 0 for.

(3)CPU29は、(2)で作成された色ヒストグラムを参照し、頻度が最大であるような無彩色検出範囲を見出し、その無彩色検出範囲に対応する照明種類を、撮影時に使用された照明種類とみなす。図9の例によると、例えば、作成された色ヒストグラムが色ヒストグラムH1であった場合は、無彩色検出範囲CLに対応する照明種類「電球」を、撮影時に使用された照明種類とみなす。また、作成された色ヒストグラムが色ヒストグラムH2であった場合は、無彩色検出範囲CFL1に対応する照明種類「第1の蛍光灯」を、撮影時に使用された照明種類とみなす。 (3) The CPU 29 refers to the color histogram created in (2), finds the achromatic color detection range having the maximum frequency, and uses the illumination type corresponding to the achromatic color detection range at the time of shooting. Considered as a lighting type. According to the example of FIG. 9, for example, when the created color histogram is the color histogram H 1 , the illumination type “bulb” corresponding to the achromatic color detection range C L is regarded as the illumination type used at the time of shooting. . If the created color histogram is the color histogram H 2 , the illumination type “first fluorescent lamp” corresponding to the achromatic color detection range C FL1 is regarded as the illumination type used at the time of photographing.

(4)CPU29は、本画像上の小領域のうち、(3)で見出された無彩色検出範囲に写像される小領域に着目し、それら小領域の色度座標上の重心位置を算出する。そして、その重心位置に相当する色度を、現在の撮影シーンで使用中の照明色とみなす。なお、重心位置の算出は、各小領域の色度を相関色温度に換算してから行うことが望ましい。相関色温度は、色温度成分Tcと、黒体放射軌跡からのずれ成分duvとからなり、複数の色度を平均(重み付け平均)する際の演算が簡単になる。   (4) The CPU 29 pays attention to the small areas mapped in the achromatic color detection range found in (3) among the small areas on the main image, and calculates the centroid position on the chromaticity coordinates of these small areas. To do. Then, the chromaticity corresponding to the position of the center of gravity is regarded as the illumination color being used in the current shooting scene. The calculation of the center of gravity position is preferably performed after converting the chromaticity of each small region into a correlated color temperature. The correlated color temperature is composed of a color temperature component Tc and a deviation component duv from the black body radiation locus, and the calculation when averaging a plurality of chromaticities (weighted average) is simplified.

(5)CPU29は、算出された重心位置の相関色温度(Tc,duv)からホワイトバランス調整量を算出する。このホワイトバランス調整量は、ホワイトバランス調整前の本画像上で相関色温度(Tc,duv)と同じ色度を持つような領域を無彩色に表現するためのホワイトバランス調整量である。   (5) The CPU 29 calculates the white balance adjustment amount from the correlated color temperature (Tc, duv) of the calculated center of gravity position. This white balance adjustment amount is a white balance adjustment amount for expressing an area having the same chromaticity as the correlated color temperature (Tc, duv) on the main image before white balance adjustment in an achromatic color.

ステップS120:CPU29は、算出されたホワイトバランス調整量を画像処理回路23へ与え、かつ画像処理回路23に対し画像処理の指示を与える。画像処理回路23は、その指示に応じて本画像の画像データに対しホワイトバランス調整、及びその他の画像処理を施す。画像処理後の本画像の画像データは、CPU29によって記憶媒体32に記録される。以上が、撮影に関するCPU29の動作である。   Step S120: The CPU 29 gives the calculated white balance adjustment amount to the image processing circuit 23 and gives an image processing instruction to the image processing circuit 23. The image processing circuit 23 performs white balance adjustment and other image processing on the image data of the main image in accordance with the instruction. The image data of the main image after the image processing is recorded on the storage medium 32 by the CPU 29. The above is the operation of the CPU 29 regarding photographing.

以上、本実施形態のCPU29は、現在の撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと教師有り学習で獲得された識別面とに基づき、その撮影シーンが照明色の類似した特定のグループに属するか否かの判別を行う。このように、被写体条件と撮影条件との双方が反映された特徴量ベクトルに基づく判別は、被写体条件のみが反映された特徴量に基づく判別よりも高性能である。   As described above, the CPU 29 according to the present embodiment extracts the feature vector reflecting both the subject condition and the shooting condition of the shooting scene from the current shooting scene, and the feature vector and the identification obtained by supervised learning. Based on the surface, it is determined whether or not the shooting scene belongs to a specific group having similar illumination colors. As described above, the determination based on the feature amount vector reflecting both the subject condition and the shooting condition is higher performance than the determination based on the feature amount reflecting only the subject condition.

また、本実施形態のCPU29は、グループD1,D2,D3の各々について判別を行い、撮影時の照明種類を推定する際に参照すべき色ヒストグラムの色度範囲を、それらの判別の結果に応じて制限する。したがって、照明種類は高い確度で推定される。したがって、ホワイトバランス調整の成功率も高まる。 Further, the CPU 29 of the present embodiment makes a determination for each of the groups D 1 , D 2 , and D 3 , and determines the chromaticity range of the color histogram to be referred to when estimating the illumination type at the time of shooting. Limit according to the result. Therefore, the illumination type is estimated with high accuracy. Therefore, the success rate of white balance adjustment is also increased.

また、本実施形態のCPU29は、複数の判別を直列的に行い、現在の撮影シーンが或るグループに属することが判明した時点で、それ以降の判別の処理を省略する。したがって、判別に関するCPU29の演算負荷は必要最小限に抑えられる。   Further, the CPU 29 of this embodiment performs a plurality of determinations in series, and omits subsequent determination processing when it is determined that the current shooting scene belongs to a certain group. Therefore, the calculation load of the CPU 29 relating to the determination can be minimized.

また、本実施形態の判別はSVMによって行われるので、未知の撮影シーンに対する判別能力が高く、汎化性に優れている。   In addition, since the discrimination according to the present embodiment is performed by SVM, the discrimination capability for an unknown shooting scene is high and the generalization property is excellent.

また、本実施形態のCPU29は、撮影シーンの判別を撮影前の期間(ここではレリーズボタンの半押し中)に行うので、撮影直後に照明種類を推定する際の演算量を抑えることができる。   In addition, since the CPU 29 according to the present embodiment determines the shooting scene during a period before shooting (here, the release button is half-pressed), it is possible to reduce the amount of calculation when estimating the illumination type immediately after shooting.

[第2実施形態]
本実施形態は、第1実施形態の変形例である。ここでは第1実施形態との相違点のみを説明する。また、無彩色検出範囲の分割数を15、グループの分割数を4とする。以下、個々の無彩色検出範囲を第1の無彩色検出範囲、第2の無彩色検出範囲、第3の無彩色検出範囲、…、第15の無彩色検出範囲と称し、個々のグループを、グループD1,グループD2,グループD3,グループD4と称す。これらの無彩色検出範囲とグループとの関係は、以下のとおりである。
[Second Embodiment]
This embodiment is a modification of the first embodiment. Here, only differences from the first embodiment will be described. Further, the number of divisions of the achromatic color detection range is 15 and the number of divisions of the group is 4. Hereinafter, each achromatic color detection range is referred to as a first achromatic color detection range, a second achromatic color detection range, a third achromatic color detection range,..., A fifteenth achromatic color detection range, These are referred to as group D 1 , group D 2 , group D 3 , and group D 4 . The relationship between these achromatic color detection ranges and groups is as follows.

グループD1…照明色が第5の無彩色検出範囲、第14の無彩色検出範囲、第15の無彩色検出範囲の何れかに属するような撮影シーンのグループ。 Group D 1 is a group of shooting scenes in which the illumination color belongs to any one of the fifth achromatic color detection range, the fourteenth achromatic color detection range, and the fifteenth achromatic color detection range.

グループD2…照明色が第7の無彩色検出範囲、第8の無彩色検出範囲、第9の無彩色検出範囲の何れかに属するような撮影シーンのグループ。 Group D 2 ... A group of shooting scenes in which the illumination color belongs to any one of the seventh achromatic color detection range, the eighth achromatic color detection range, and the ninth achromatic color detection range.

グループD3…照明色が第1の無彩色検出範囲、第2の無彩色検出範囲、第3の無彩色検出範囲の何れかに属するような撮影シーンのグループ。 Group D 3 ... A group of shooting scenes in which the illumination color belongs to one of the first achromatic color detection range, the second achromatic color detection range, and the third achromatic color detection range.

グループD4…グループD1,D2,D3の何れにも属さないような撮影シーンのグループ。 Group D 4 ... A group of shooting scenes that do not belong to any of the groups D 1 , D 2 , and D 3 .

また、本実施形態のROM27には、グループD1に関する判別(第1の判別)で使用すべき識別面S1,境界値Thpos1,Thneg1、グループD2に関する判別(第2の判別)で使用すべき識別面S2,境界値Thpos2,Thneg2、グループD3に関する判別(第3の判別)で使用すべき識別面S3,境界値Thpos3,Thneg3のデータが予め格納される。 In the ROM 27 of the present embodiment, the discrimination surface S 1 , the boundary values Th pos1 and Th neg1 , and the discrimination regarding the group D 2 (second discrimination) to be used in the discrimination regarding the group D 1 (first discrimination). Data of the identification surface S 2 , boundary values Th pos2 , Th neg2 to be used, and identification surface S 3 , boundary values Th pos3 , Th neg3 to be used in the determination (third determination) regarding the group D 3 are stored in advance. .

さらに、本実施形態のROM27には、第1の重み付け係数テーブル(図10)と、第2の重み付け係数テーブル(図11)と、第3の重み付け係数テーブル(図12)とが予め格納されている。   Further, the ROM 27 of the present embodiment stores in advance a first weighting coefficient table (FIG. 10), a second weighting coefficient table (FIG. 11), and a third weighting coefficient table (FIG. 12). Yes.

図10に示すとおり、第1の重み付け係数テーブルは、無彩色検出範囲の種類毎、かつ距離d1の値毎に重み付け係数を格納している。 As shown in FIG. 10, the first weighting coefficient table stores weighting coefficients for each type of achromatic color detection range and for each value of distance d 1 .

この第1の重み付け係数テーブルにおいて、グループD1との類似度の高い無彩色検出範囲(ここでは第5の無彩色検出範囲、第14の無彩色検出範囲、第15の無彩色検出範囲など)に対応する係数列に着目すると、小さい値の距離d1に対応する係数ほど大きな値を持つ。 In the first weighting coefficient table, the achromatic color detection range having a high similarity to the group D 1 (here, the fifth achromatic color detection range, the fourteenth achromatic color detection range, the fifteenth achromatic color detection range, etc.) Focusing on the coefficient sequence corresponding to, the coefficient corresponding to the smaller distance d 1 has a larger value.

また、第1の重み付け係数テーブルにおいて、グループD1との類似度の低い無彩色検出範囲(ここでは第1の無彩色検出範囲、第2の無彩色検出範囲など)に対応する係数列に着目すると、大きい値の距離d1に対応する係数ほど大きな値を持つ。 Also, interest in the first weighting coefficient table, (the first achromatic detection range in this case, the like 2 achromatic detection range) low similarity achromatic detection range of the group D 1 to coefficient sequence corresponding to the Then, the coefficient corresponding to the larger distance d 1 has a larger value.

図11に示すとおり、第2の重み付け係数テーブルは、無彩色検出範囲の種類毎、かつ距離d2の値毎に重み付け係数を格納している。 As shown in FIG. 11, the second weighting coefficient table, each type of achromatic detection range, and for each value of the distance d 2 stores weighting coefficients.

この第2の重み付け係数テーブルにおいて、グループD2との類似度の高い無彩色検出範囲(ここでは第7の無彩色検出範囲、第8の無彩色検出範囲、第9の無彩色検出範囲など)に対応する係数列に着目すると、小さい値の距離d2に対応する係数ほど大きな値を持つ。 In this second weighting coefficient table, the achromatic color detection range having a high similarity to the group D 2 (here, the seventh achromatic color detection range, the eighth achromatic color detection range, the ninth achromatic color detection range, etc.) When the coefficient sequence corresponding to is focused on, the coefficient corresponding to the smaller distance d 2 has a larger value.

また、第2の重み付け係数テーブルにおいて、グループD2との類似度の低い無彩色検出範囲(ここでは第1の無彩色検出範囲、第2の無彩色検出範囲など)に対応する係数列に着目すると、大きい値の距離d2に対応する係数ほど大きな値を持つ。 Also, interest in the second weighting coefficient table, (the first achromatic detection range in this case, the like 2 achromatic detection range) low similarity achromatic detection range of the group D 2 in coefficient sequence corresponding to the Then, the coefficient corresponding to the larger value of distance d 2 has a larger value.

図12に示すとおり、第3の重み付け係数テーブルは、無彩色検出範囲の種類毎、かつ距離d3の値毎に重み付け係数を格納している。 As shown in FIG. 12, the third weighting coefficient table stores weighting coefficients for each type of achromatic color detection range and for each value of distance d 3 .

この第3の重み付け係数テーブルにおいて、グループD3との類似度の高い無彩色検出範囲(ここでは第1の無彩色検出範囲、第2の無彩色検出範囲、第3の無彩色検出範囲など)に対応する係数列に着目すると、小さい値の距離d3に対応する係数ほど大きな値を持つ。 In the third weighting coefficient table, a high degree of similarity achromatic detection range of the group D 3 (first achromatic detection range in this case, the second achromatic detection range, such as the third achromatic detection range) Focusing on the coefficient sequence corresponding to, the coefficient corresponding to the smaller distance d 3 has a larger value.

また、第3の重み付け係数テーブルにおいて、グループD3との類似度の低い無彩色検出範囲(ここでは第7の無彩色検出範囲、第8の無彩色検出範囲、第9の無彩色検出範囲など)に対応する係数列に着目すると、大きい値の距離d3に対応する係数ほど大きな値を持つ。 Further, in the third weighting coefficient table, an achromatic color detection range having a low similarity to the group D 3 (here, the seventh achromatic color detection range, the eighth achromatic color detection range, the ninth achromatic color detection range, etc.) ), The coefficient corresponding to the larger value of distance d 3 has a larger value.

図13は、撮影に関するCPU29の動作フローチャートである。ここでも、電子カメラのオートホワイトバランス機能がオンされ、電子カメラの記録モードが通常記録モードい設定されていると仮定する。   FIG. 13 is an operation flowchart of the CPU 29 regarding photographing. Again, it is assumed that the auto white balance function of the electronic camera is turned on and the recording mode of the electronic camera is set to the normal recording mode.

ステップS101:CPU29は、レリーズボタンが半押しされたか否かを判別し、レリーズ釦が半押しされた場合はステップS102に移行し、レリーズボタンが半押しされていない場合はステップS101を繰り返す。   Step S101: The CPU 29 determines whether or not the release button is half-pressed. If the release button is half-pressed, the process proceeds to step S102, and if the release button is not half-pressed, the step S101 is repeated.

ステップS102:CPU29は、撮影レンズ12の焦点調節を実行すると共に、分割測光センサ22に被写界の画像信号の出力を開始させる。焦点調節の方法は、前述したとおりである。   Step S102: The CPU 29 performs focus adjustment of the photographing lens 12, and causes the split photometric sensor 22 to start outputting an image signal of the object scene. The focus adjustment method is as described above.

ステップS103:CPU29は、SVMの機能により、現在の撮影シーンから特徴量ベクトルを抽出する。この抽出の方法は、前述したとおりである。   Step S103: The CPU 29 extracts a feature vector from the current shooting scene by using the SVM function. This extraction method is as described above.

ステップS104:CPU29は、SVMの機能により、ステップS103で抽出された特徴量ベクトルと識別面S1との距離d1を算出する。 Step S104: The CPU 29 calculates a distance d 1 between the feature vector extracted in step S103 and the identification surface S 1 by the function of the SVM.

ステップS107:CPU29は、SVMの機能により、ステップS103で抽出された特徴量ベクトルと識別面S2との距離d2を算出する。 Step S107: The CPU 29 calculates a distance d 2 between the feature vector extracted in step S103 and the identification surface S 2 by the function of the SVM.

ステップS110:CPU29は、SVMの機能により、ステップS103で抽出された特徴量ベクトルと識別面S3との距離d3を算出する。 Step S110: The CPU 29 calculates a distance d 3 between the feature vector extracted in step S103 and the identification surface S 3 by the function of the SVM.

ステップS116:CPU29は、レリーズボタンが全押しされたか否かを判別する。レリーズボタンが全押しされていない場合はS117に移行し、レリーズボタンが全押しされた場合はS118に移行する。   Step S116: The CPU 29 determines whether or not the release button has been fully pressed. If the release button is not fully pressed, the process proceeds to S117, and if the release button is fully pressed, the process proceeds to S118.

ステップS117:CPU29は、レリーズボタンの半押しが解除されたか否かを判別し、レリーズボタンの半押しが解除された場合には、分割測光センサ22からの信号の出力を停止させてステップS101に戻り、レリーズボタンの半押しが継続している場合は、ステップS103に戻る。   Step S117: The CPU 29 determines whether or not the half-press of the release button has been released. If the half-press of the release button has been released, the CPU 29 stops the output of the signal from the divided photometric sensor 22 and proceeds to step S101. Returning, if the half-press of the release button continues, the process returns to step S103.

ステップS118:CPU29は、撮像処理を実行し、本画像の画像データを取得する。本画像の画像データの取得方法は、前述したとおりである。   Step S118: The CPU 29 executes an imaging process and acquires image data of the main image. The method for acquiring the image data of the main image is as described above.

ステップS119’:CPU29は、ステップS118で取得された本画像の画像データに施すべきホワイトバランス調整のホワイトバランス調整量を、最新の判別の結果(距離d1,d2,d3)に応じて以下の手順(1)〜(7)で算出する。 Step S119 ′: The CPU 29 determines the white balance adjustment amount of white balance adjustment to be performed on the image data of the main image acquired in step S118 according to the latest determination result (distances d 1 , d 2 , d 3 ). It calculates with the following procedures (1)-(7).

(1)CPU29は、第1の重み付け係数テーブル(図10)から、距離d1の値に対応する係数を読み出す。例えば距離d1の値が−200であったとすると、図10中に点線で囲ったように、第1の無彩色検出範囲に対応する重み係数「−16」、第2の無彩色検出範囲に対応する重み係数「−16」、第3の無彩色検出範囲に対応する重み係数「−16」、…、第15の無彩色検出範囲に対応する重み係数「16」が読み出される。以下、これらの重み係数を順にA1,A2,A3,…,A15とおく。 (1) The CPU 29 reads a coefficient corresponding to the value of the distance d 1 from the first weighting coefficient table (FIG. 10). For example, if the value of the distance d 1 is −200, the weighting coefficient “−16” corresponding to the first achromatic color detection range and the second achromatic color detection range are set as shown by the dotted line in FIG. The corresponding weight coefficient “−16”, the weight coefficient “−16” corresponding to the third achromatic color detection range,..., The weight coefficient “16” corresponding to the fifteenth achromatic color detection range are read. Hereinafter, these weighting coefficients sequentially A 1, A 2, A 3 , ..., put the A 15.

また、CPU29は、第2の重み付け係数データ(図11)から、距離d2の値に対応する係数を読み出す。例えば、距離d2の値が+800であったとすると、図11中に点線で囲ったように、第1の無彩色検出範囲に対応する重み係数「4」、第2の無彩色検出範囲に対応する重み係数「4」、第3の無彩色検出範囲に対応する重み係数「4」、…、第15の無彩色検出範囲に対応する重み係数「−4」が読み出される。以下、これらの重み係数を順にB1,B2,B3,…,B15とおく。 Further, the CPU 29 reads a coefficient corresponding to the value of the distance d 2 from the second weighting coefficient data (FIG. 11). For example, if the value of the distance d 2 is +800, the weighting coefficient “4” corresponding to the first achromatic color detection range and the second achromatic color detection range correspond to each other as shown by the dotted line in FIG. The weight coefficient “4”, the weight coefficient “4” corresponding to the third achromatic color detection range,..., The weight coefficient “−4” corresponding to the fifteenth achromatic color detection range are read out. Hereinafter, these weighting coefficients sequentially B 1, B 2, B 3 , ..., put the B 15.

また、CPU29は、第3の重み付け係数データ(図12)から、距離d3の値に対応する係数を読み出す。例えば、距離d3の値が−800であったとすると、図12に点線で囲ったように、第1の無彩色検出範囲に対応する重み係数「28」、第2の無彩色検出範囲に対応する重み係数「28」、第3の無彩色検出範囲に対応する重み係数「28」、…、第15の無彩色検出範囲に対応する重み係数「−28」が読み出される。以下、これらの重み係数を順にC1,C2,C3,…,C15とおく。 Further, the CPU 29 reads a coefficient corresponding to the value of the distance d 3 from the third weighting coefficient data (FIG. 12). For example, if the value of the distance d 3 is −800, the weighting coefficient “28” corresponding to the first achromatic color detection range and the second achromatic color detection range are supported as shown by the dotted line in FIG. The weight coefficient “28”, the weight coefficient “28” corresponding to the third achromatic color detection range,..., The weight coefficient “−28” corresponding to the fifteenth achromatic color detection range are read out. Hereinafter, these weighting factors are sequentially set as C 1 , C 2 , C 3 ,..., C 15 .

(2)CPU29は、読み出された重み係数のうち、第1の無彩色検出範囲に対応する重み係数A1,B1,C1を、K1=A1+B1+C1の式に当てはめることにより、第1の無彩色検出範囲に関する重み係数K1を算出する。同様に、CPU29は、第nの無彩色検出範囲に対応する重み係数An,Bn,CnをKn=An+Bn+Cnの式に当てはめることにより、第nの無彩色検出範囲に関する重み係数Knを算出する(n=2〜15)。 (2) The CPU 29 applies the weighting factors A 1 , B 1 , C 1 corresponding to the first achromatic color detection range among the read weighting factors to the equation of K 1 = A 1 + B 1 + C 1. Thus, the weighting coefficient K 1 related to the first achromatic color detection range is calculated. Similarly, CPU 29, by fitting the weight coefficient A n corresponding to achromatic detection range of the n, B n, the C n in formula K n = A n + B n + C n, achromatic detection range of the n calculating a weighting factor K n about (n = 2~15).

(3)CPU29は、算出された重み係数K1〜K15の値を調整する。具体的に、CPU29は、重み係数K1〜K15のうち、負の値を採るものについては全てゼロに置換してから、重み係数K1〜K15の各々を、重み係数K1〜K15の和が1となるように正規化する。正規化後の重み係数K1〜K15を、「正規化重み係数K1〜K15」と称す。 (3) The CPU 29 adjusts the values of the calculated weighting factors K 1 to K 15 . Specifically, the CPU 29 replaces all of the weighting factors K 1 to K 15 that are negative with zero, and then replaces each of the weighting factors K 1 to K 15 with the weighting factors K 1 to K 15. Normalize so that the sum of 15 is 1. The normalized weight coefficients K 1 to K 15 are referred to as “normalized weight coefficients K 1 to K 15 ”.

(4)CPU29は、本画像を複数の小領域に分割し、個々の小領域の色度(領域内の平均色度)を算出し、それらの色度を色度座標上へ写像する。なお、本実施形態の色度座標上には第1の無彩色検出範囲〜第15の無彩色検出範囲の各々が規定されている。   (4) The CPU 29 divides the main image into a plurality of small areas, calculates the chromaticity of each small area (average chromaticity within the area), and maps these chromaticities onto the chromaticity coordinates. Each of the first achromatic color detection range to the fifteenth achromatic color detection range is defined on the chromaticity coordinates of the present embodiment.

そして、CPU29は、第1の無彩色検出範囲〜第15の無彩色検出範囲に写像された小領域の数(頻度)をそれぞれ算出する。但し、CPU29は、第1の無彩色検出範囲〜第15の無彩色検出範囲の各々の頻度に対し、(3)で取得した正規化重み係数K1,K2,K3,…,K15をそれぞれ乗算する。これによって、第1の無彩色検出範囲〜第15の無彩色検出範囲に関する重み付きの色ヒストグラムが作成される。 Then, the CPU 29 calculates the number (frequency) of small regions mapped in the first achromatic color detection range to the fifteenth achromatic color detection range. However, the CPU 29 normalizes the weighting factors K 1 , K 2 , K 3 ,..., K 15 acquired in (3) with respect to the frequencies of the first achromatic color detection range to the fifteenth achromatic color detection range. Respectively. As a result, a weighted color histogram relating to the first achromatic color detection range to the fifteenth achromatic color detection range is created.

(5)CPU29は、(4)で作成された色ヒストグラムを参照し、頻度が最大であるような無彩色検出範囲を見出し、その無彩色検出範囲に対応する照明種類を、撮影時に使用された照明種類とみなす。   (5) The CPU 29 refers to the color histogram created in (4), finds the achromatic color detection range having the maximum frequency, and uses the illumination type corresponding to the achromatic color detection range at the time of shooting. Considered as a lighting type.

(6)CPU29は、本画像上の小領域のうち、(5)で見出された無彩色検出範囲に写像される小領域に着目し、それら小領域の色度座標上の重心位置を算出する。そして、その重心位置の色度を、本画像の撮影時に使用された照明色とみなす。なお、重心位置の算出は、各小領域の色度を相関色温度に換算してから行うことが望ましい。相関色温度は、色温度成分Tcと、黒体放射軌跡からのずれ成分duvとからなり、複数の色度を平均(重み付け平均)する際の演算が簡単になる。   (6) The CPU 29 pays attention to the small areas mapped in the achromatic color detection range found in (5) among the small areas on the main image, and calculates the centroid position on the chromaticity coordinates of these small areas. To do. Then, the chromaticity at the position of the center of gravity is regarded as the illumination color used at the time of photographing the main image. The calculation of the center of gravity position is preferably performed after converting the chromaticity of each small region into a correlated color temperature. The correlated color temperature is composed of a color temperature component Tc and a deviation component duv from the black body radiation locus, and the calculation when averaging a plurality of chromaticities (weighted average) is simplified.

(7)CPU29は、算出された重心位置の相関色温度(Tc,duv)からホワイトバランス調整量を算出する。このホワイトバランス調整量は、ホワイトバランス調整前の本画像上で相関色温度(Tc,duv)と同じ色度を持つような領域を無彩色に表現するためのホワイトバランス調整量である。   (7) The CPU 29 calculates the white balance adjustment amount from the correlated color temperature (Tc, duv) at the calculated center of gravity position. This white balance adjustment amount is a white balance adjustment amount for expressing an area having the same chromaticity as the correlated color temperature (Tc, duv) on the main image before white balance adjustment in an achromatic color.

ステップS120:CPU29は、算出されたホワイトバランス調整量を画像処理回路23へ与え、かつ画像処理回路23に対し画像処理の指示を与える。画像処理回路23は、その指示に応じて本画像の画像データに対しホワイトバランス調整、及びその他の画像処理を施す。画像処理後の本画像の画像データは、CPU29によって記憶媒体32に記録される。   Step S120: The CPU 29 gives the calculated white balance adjustment amount to the image processing circuit 23 and gives an image processing instruction to the image processing circuit 23. The image processing circuit 23 performs white balance adjustment and other image processing on the image data of the main image in accordance with the instruction. The image data of the main image after the image processing is recorded on the storage medium 32 by the CPU 29.

以上、本実施形態のCPU29は、グループD1,D2,D3,D4の各々について判別を行い、撮影時の照明種類を推定する際に参照すべき色ヒストグラムの各色度範囲の頻度に対し、それらの判別の結果に応じた重み付けをする。したがって、本実施形態でも照明種類は高精度に推定される。 As described above, the CPU 29 according to the present embodiment performs determination for each of the groups D 1 , D 2 , D 3 , and D 4 , and determines the frequency of each chromaticity range of the color histogram to be referred to when estimating the illumination type at the time of shooting. On the other hand, weighting is performed according to the result of the discrimination. Therefore, in this embodiment, the illumination type is estimated with high accuracy.

なお、本実施形態のCPU29は、重み付けを行う際に第1の判別の結果(距離d1)と、第2の判別の結果(距離d2)と、第3の判別の結果(距離d2)との全てを使用するので、第1実施形態のように判別の処理を省略することは無い。したがって、本実施形態のCPU29は、第1の判別の処理と、第2の判別の処理と、第3の判別の処理とを並列的に実行してもよい。 Incidentally, CPU 29 of this embodiment includes a first determination result when performing weighting (distance d 1), the second determination result (the distance d 2), a third determination result (Distance d 2 ) Is used, so that the determination process is not omitted as in the first embodiment. Therefore, the CPU 29 according to the present embodiment may execute the first determination process, the second determination process, and the third determination process in parallel.

[その他の実施形態]
なお、上記何れかの実施形態では、閃光発光装置が使用されないことを前提としたが、閃光発光装置が使用される可能性を考慮し、特徴量ベクトルのベクトル成分に、閃光の発光強度を含めてもよい。
[Other Embodiments]
In any of the above embodiments, it is assumed that no flash light emitting device is used. However, considering the possibility of using the flash light emitting device, the vector component of the feature vector includes the light emission intensity of the flash light. May be.

また、上記何れかの実施形態では、特徴量ベクトルのベクトル成分に、撮影条件として撮影レンズの焦点距離と被写体距離とを含めたが、撮影レンズの絞り値などの他の撮影条件をを含めてもよい。   In any of the above embodiments, the vector component of the feature vector includes the focal length of the photographing lens and the subject distance as photographing conditions, but includes other photographing conditions such as the aperture value of the photographing lens. Also good.

また、上記何れかの実施形態では、特徴量ベクトルのベクトル成分に、被写体条件として被写界のエッジ量を含めたが、被写界のコントラストなどの他の被写体条件を含めてもよい。   In any of the above embodiments, the edge amount of the object scene is included as the subject condition in the vector component of the feature vector. However, other object conditions such as the contrast of the object scene may be included.

また、第1実施形態のCPU29は、無彩色検出範囲の分割数を8とし、グループの分割数を4とした。また、第2の実施形態のCPU29は、無彩色検出範囲の分割数を15とし、グループの分割数を4とした。しかし、無彩色検出範囲の分割数とグループの分割数との組み合わせは、他の組み合わせであってもよい。   In addition, the CPU 29 of the first embodiment sets the number of divisions of the achromatic color detection range to 8 and sets the number of group divisions to 4. Further, the CPU 29 of the second embodiment sets the number of divisions of the achromatic color detection range to 15 and sets the number of group divisions to 4. However, the combination of the division number of the achromatic color detection range and the division number of the group may be another combination.

例えば、無彩色検出範囲の分割数を15とし、グループの分割数を7としてもよい。15個の無彩色検出範囲と、7個のグループとの組み合わせの一例を以下に示す。   For example, the number of divisions of the achromatic color detection range may be 15, and the number of divisions of the group may be 7. An example of a combination of 15 achromatic color detection ranges and 7 groups is shown below.

無彩色検出範囲CS1…色温度の低い晴天の色度範囲。 Achromatic color detection range C S1 ... A chromaticity range in fine weather with a low color temperature.

無彩色検出範囲CS2…色温度の高い晴天の色度範囲。 Achromatic color detection range C S2 ... A chromaticity range in fine weather with a high color temperature.

無彩色検出範囲CCL…曇天の色度範囲。 Achromatic color detection range C CL ... Cloudy chromaticity range.

無彩色検出範囲CSH…日陰の色度範囲。 Achromatic color detection range C SH ... Shade chromaticity range.

無彩色検出範囲CL…電球の色度範囲。 Achromatic color detection range C L ... Chromaticity range of the light bulb.

無彩色検出範囲CFLWW…電球色蛍光灯の色度範囲。 Achromatic color detection range C FLWW ... Chromaticity range of light bulb color fluorescent lamp.

無彩色検出範囲CFLW…白色蛍光灯の色度範囲。 Achromatic color detection range C FLW ... The chromaticity range of white fluorescent lamps.

無彩色検出範囲CFLN…昼白色蛍光灯の色度範囲。 Achromatic color detection range C FLN ... Chromaticity range of daylight fluorescent lamps.

無彩色検出領域CFLD…昼光色蛍光灯の色度範囲。 Achromatic color detection area C FLD ... The chromaticity range of daylight fluorescent lamps.

無彩色検出領域CEXN…演色性の高い昼白色蛍光灯の色度範囲。 Achromatic color detection area C EXN ... The chromaticity range of daylight white fluorescent lamps with high color rendering properties.

無彩色検出領域CEXD…演色性の高い昼光色蛍光灯の色度範囲。 Achromatic color detection area C EXD ... The chromaticity range of daylight fluorescent lamps with high color rendering properties.

無彩色検出領域CHG1…第1の水銀灯の色度範囲。 Achromatic color detection area C HG1 ... The chromaticity range of the first mercury lamp.

無彩色検出領域CHG2…第2の水銀灯の色度範囲。 Achromatic color detection area C HG2 ... The chromaticity range of the second mercury lamp.

無彩色検出範囲CSSL…夕日の色度範囲。 Achromatic color detection range C SSL ... The chromaticity range of the sunset.

無彩色検出範囲CNTL…ナトリウムランプの色度範囲。 Achromatic color detection range C NTL ... The chromaticity range of the sodium lamp.

グループD1…照明色が無彩色検出範囲CS1,CS2の何れかに属するような撮影シーンのグループ。 Group D 1 is a group of shooting scenes in which the illumination color belongs to one of the achromatic color detection ranges C S1 and C S2 .

グループD2…照明色が無彩色検出範囲CCL,CSHの何れかに属するような撮影シーンのグループ。 Group D 2 ... A group of shooting scenes in which the illumination color belongs to one of the achromatic color detection ranges C CL and C SH .

グループD3…照明色が無彩色検出範囲CL,CFLWW,CFLWの何れかに属するような撮影シーンのグループ。 Group D 3 : A group of shooting scenes in which the illumination color belongs to one of the achromatic color detection ranges C L , C FLWW , C FLW .

グループD4…照明色が無彩色検出範囲CFLNに属するような撮影シーンのグループ。 Group D 4 ... A group of shooting scenes in which the illumination color belongs to the achromatic color detection range C FLN .

グループD5…照明色が無彩色検出領域CFLD,CEXN,CEXDの何れかに属するような撮影シーンのグループ。 Group D 5 : A group of shooting scenes in which the illumination color belongs to one of the achromatic color detection areas C FLD , C EXN , C EXD .

グループD6…照明色が無彩色検出領域CHG1,CHG2の何れかに属するような撮影シーンのグループ。 Group D 6 ... A group of shooting scenes in which the illumination color belongs to one of the achromatic color detection areas C HG1 and C HG2 .

グループD7…照明色が無彩色検出範囲CSSL,CNTLの何れかに属するような撮影シーンのグループ。 Group D 7 A group of shooting scenes in which the illumination color belongs to either the achromatic color detection range C SSL or C NTL .

また、上記した何れかの実施形態では、SVMの学習は予め行われ、識別面等のデータ(S1,S2,S3,Thpos1,Thneg1,Thpos2,Thneg2,Thpos3,Thneg2)は書き換えられないことを前提としたが、ユーザから指定された照明種類に応じてホワイトバランス調整を行う手動ホワイトバランス機能が電子カメラに搭載されている場合は、その照明種類が指定される度にSVMが学習を行い、そのデータを更新してもよい。なお、その場合は、識別面のデータの格納先が書き換え可能なメモリとなる。 In any of the above-described embodiments, learning of the SVM is performed in advance, and data such as identification surfaces (S 1 , S 2 , S 3 , Th pos1 , Th neg1 , Th pos2 , Th neg2 , Th pos3 , Th neg2 ) is based on the assumption that it cannot be rewritten, but if the electronic camera has a manual white balance function that adjusts the white balance according to the lighting type specified by the user, the lighting type is specified. Each time the SVM learns, the data may be updated. In this case, the data storage destination of the identification surface is a rewritable memory.

また、上記した何れかの実施形態では、撮影シーンの判別処理がレリーズボタンの半押し期間中に繰り返されたが、レリーズボタンの半押直後に1回だけ行われることとしてもよい。この場合、レリーズボタンの半押し直後の判別結果がレリーズボタンの半押し期間中に保持されることになる。   In any of the above-described embodiments, the shooting scene determination process is repeated during the half-press period of the release button, but may be performed only once immediately after the release button is half-pressed. In this case, the determination result immediately after the release button is half-pressed is held during the half-press period of the release button.

また、上記した何れかの実施形態では、被写界の監視と本画像の取得とを異なる撮像素子で行う一眼レフレックスタイプの電子カメラを説明したが、共通の撮像素子で行うコンパクトタイプの電子カメラにも本発明は適用可能である。   In any of the above-described embodiments, the single-lens reflex type electronic camera that performs the monitoring of the object scene and the acquisition of the main image using different image sensors has been described. However, the compact type electronic camera that uses the common image sensor. In addition, the present invention is applicable.

また、上記した何れかの実施形態では、電子カメラの記録モードが通常記録モードである場合を想定したが、RAW記録モードであった場合、CPU29は、判別によって得られたデータを含む付帯情報を作成し、その付帯情報を本画像のRAWデータと共に記憶媒体32へ記録すればよい。その後、RAWデータの現像処理を行う際に、CPU29が記憶媒体32からRAWデータを読み込んで、上述したステップS119(又はS119’)及びステップS120を実行すればよい。   In any of the above-described embodiments, it is assumed that the recording mode of the electronic camera is the normal recording mode. However, when the recording mode is the RAW recording mode, the CPU 29 displays additional information including data obtained by the determination. The auxiliary information may be created and recorded in the storage medium 32 together with the RAW data of the main image. Thereafter, when performing development processing of RAW data, the CPU 29 may read the RAW data from the storage medium 32 and execute Step S119 (or S119 ') and Step S120 described above.

また、上記した何れかの実施形態では、ホワイトバランス調整量の算出処理を電子カメラが実行したが、それら処理の一部又は全部をコンピュータに実行させてもよい。その場合、処理に必要なプログラムがコンピュータへインストールされる。そのインストールは、CD−ROMなどの記憶媒体やインターネットなどを介して行われる。   In any of the above-described embodiments, the electronic camera executes the white balance adjustment amount calculation process, but the computer may execute part or all of the process. In that case, a program necessary for processing is installed in the computer. The installation is performed via a storage medium such as a CD-ROM or the Internet.

また、上記した第2実施形態では、撮影時に使用される照明種類が1種類であると仮定してその照明種類を推定したが、使用される照明種類が複数である可能性を考慮してもよい。その場合のステップS119’は、例えば以下のとおりとなる。   Further, in the above-described second embodiment, the illumination type is estimated on the assumption that the illumination type used at the time of photographing is one. However, even if the possibility that there are a plurality of illumination types used is considered. Good. In this case, for example, step S119 'is as follows.

(1)CPU29は、第1の重み付け係数テーブル(図10)から距離d1の値に対応する係数A1〜A15を読み出し、第2の重み付け係数データ(図11)から距離d2の値に対応する係数B1〜B15を読み出し、第3の重み付け係数データ(図12)から距離d3の値に対応する係数C1〜C15を読み出す。 (1) The CPU 29 reads the coefficients A 1 to A 15 corresponding to the value of the distance d 1 from the first weighting coefficient table (FIG. 10), and the value of the distance d 2 from the second weighting coefficient data (FIG. 11). reads the coefficient B 1 .about.B 15 corresponding to, read the third weighting coefficient data factors C 1 -C 15 corresponding to the value of the distance d 3 (FIG. 12).

(2)CPU29は、読み出された重み係数A1〜A15,B1〜B15,C1〜C15に基づき、第nの無彩色検出範囲に関する重み係数Knを、Kn=An+Bn+Cnの式により算出する(n=1〜15)。 (2) Based on the read weighting factors A 1 to A 15 , B 1 to B 15 , and C 1 to C 15 , the CPU 29 sets the weighting factor K n related to the nth achromatic color detection range to K n = A It is calculated by the formula n + B n + C n ( n = 1~15).

(3)CPU29は、算出された重み係数K1〜K15の値を調整する。具体的に、CPU29は、重み係数K1〜K15のうち、負の値を採るものについては全てゼロに置換してから、重み係数K1〜K15の各々を、重み係数K1〜K15の和が1となるように正規化する。正規化後の重み係数K1〜K15を、「正規化重み係数K1〜K15」と称す。 (3) The CPU 29 adjusts the values of the calculated weighting factors K 1 to K 15 . Specifically, the CPU 29 replaces all of the weighting factors K 1 to K 15 that are negative with zero, and then replaces each of the weighting factors K 1 to K 15 with the weighting factors K 1 to K 15. Normalize so that the sum of 15 is 1. The normalized weight coefficients K 1 to K 15 are referred to as “normalized weight coefficients K 1 to K 15 ”.

(4)CPU29は、本画像を複数の小領域に分割し、個々の小領域の色度(領域内の平均色度)を算出し、それらの色度を色度座標上へ写像する。さらにCPU29は、各小領域の中で無彩色検出範囲(第1の無彩色検出範囲〜第15の無彩色検出範囲)に写像された小領域の数(頻度)を、無彩色検出範囲毎に算出する。但し、CPU29は、第1の無彩色検出範囲〜第15の無彩色検出範囲の各々の頻度に対し、(3)で取得した正規化重み係数K1,K2,K3,…,K1,K15をそれぞれ乗算する。 (4) The CPU 29 divides the main image into a plurality of small areas, calculates the chromaticity of each small area (average chromaticity within the area), and maps these chromaticities onto the chromaticity coordinates. Further, the CPU 29 calculates, for each achromatic color detection range, the number (frequency) of the small regions mapped in the achromatic color detection range (the first achromatic color detection range to the fifteenth achromatic color detection range) in each small region. calculate. However, the CPU 29 normalizes the weighting factors K 1 , K 2 , K 3 ,..., K 1 acquired in (3) with respect to the frequencies of the first achromatic color detection range to the fifteenth achromatic color detection range. , K 15 respectively.

(5)CPU29は、本画像上の第1の無彩色検出範囲〜第15の無彩色検出領域に写像される各小領域の色度座標上の重心位置を算出し、算出された重心位置の色度(相関色温度)を、撮影時に使用された照明色とみなす。   (5) The CPU 29 calculates the centroid position on the chromaticity coordinates of each small area mapped to the first achromatic color detection range to the fifteenth achromatic color detection area on the main image, and the calculated centroid position Chromaticity (correlated color temperature) is regarded as the illumination color used during shooting.

(6)CPU29は、算出された重心位置の相関色温度(Tc,duv)からホワイトバランス調整量(ゲインGB,GR)を算出する。 (6) The CPU 29 calculates white balance adjustment amounts (gains G B and G R ) from the calculated correlated color temperature (Tc, duv) at the center of gravity.

電子カメラの光学系の構成を示す模式図である。It is a schematic diagram which shows the structure of the optical system of an electronic camera. 電子カメラの回路構成を示すブロック図である。It is a block diagram which shows the circuit structure of an electronic camera. 第1実施形態の無彩色検出範囲を示す図である。It is a figure which shows the achromatic color detection range of 1st Embodiment. ベクトル空間上の学習サンプルの分布例を示す図である。It is a figure which shows the example of distribution of the learning sample on vector space. 距離d1とサンプル数との関係(一例)を示す図である。Distance relationship between d 1 and the number of samples is a diagram showing a (one example). 距離d2とサンプル数との関係(一例)を示す図である。Distance relationship between d 2 and the number of samples is a diagram showing a (one example). 距離d3とサンプル数との関係(一例)を示す図である。Distance relationship between d 3 and the number of samples is a diagram showing a (one example). 撮影に関する第1実施形態のCPU29の動作フローチャートである。It is an operation | movement flowchart of CPU29 of 1st Embodiment regarding imaging | photography. 色ヒストグラムの色度範囲を説明する図である。It is a figure explaining the chromaticity range of a color histogram. 第1の重み付け係数テーブルを説明する図である。It is a figure explaining a 1st weighting coefficient table. 第2の重み付け係数テーブルを説明する図である。It is a figure explaining the 2nd weighting coefficient table. 第3の重み付け係数テーブルを説明する図である。It is a figure explaining a 3rd weighting coefficient table. 撮影に関する第2実施形態のCPU29の動作フローチャートである。It is an operation | movement flowchart of CPU29 of 2nd Embodiment regarding imaging | photography.

符号の説明Explanation of symbols

11…カメラ本体,16…カラー撮像素子,16a…AFE,22…分割測光センサ,22a…A/D変換回路,23…画像処理回路,24…バッファメモリ,25…記録インタフェース,26…操作スイッチ,29…CPU,28…RAM,27…ROM,31…バス
DESCRIPTION OF SYMBOLS 11 ... Camera body, 16 ... Color imaging device, 16a ... AFE, 22 ... Divided photometry sensor, 22a ... A / D conversion circuit, 23 ... Image processing circuit, 24 ... Buffer memory, 25 ... Recording interface, 26 ... Operation switch, 29 ... CPU, 28 ... RAM, 27 ... ROM, 31 ... Bus

Claims (14)

判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、  From the shooting scene to be discriminated, a feature vector that reflects both the subject condition and the shooting condition of the shooting scene is extracted, and based on the feature vector and the discrimination criterion calculated in advance by supervised learning, A discriminating means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors;
前記特徴量ベクトルのベクトル成分には、  The vector component of the feature vector includes
撮影レンズのレンズ情報が含まれる  Contains lens information of the taking lens
ことを特徴とするカラー撮像装置。  A color imaging apparatus characterized by the above.
判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段と、From the shooting scene to be discriminated, a feature vector that reflects both the subject condition and the shooting condition of the shooting scene is extracted, and based on the feature vector and the discrimination criterion calculated in advance by supervised learning, A discriminating means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors;
前記撮影シーンで撮影された画像の色ヒストグラムに基づき撮影時の照明色を推定する推定手段とを備え、  An estimation means for estimating an illumination color at the time of shooting based on a color histogram of an image shot in the shooting scene;
前記推定手段は、  The estimation means includes
前記推定に使用される前記色ヒストグラムの色範囲を、前記判別手段が行った判別の結果に応じて制限する  The color range of the color histogram used for the estimation is limited according to the result of discrimination performed by the discrimination means.
ことを特徴とするカラー撮像装置。  A color imaging apparatus characterized by the above.
判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、
前記特徴量ベクトルのベクトル成分には、
被写界の色と、撮影レンズのレンズポジションとが含まれる
ことを特徴とするカラー撮像装置。
From the shooting scene to be discriminated, a feature vector that reflects both the subject condition and the shooting condition of the shooting scene is extracted, and based on the feature vector and the discrimination criterion calculated in advance by supervised learning, A discriminating means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors;
The vector component of the feature vector includes
A color imaging apparatus comprising a color of an object scene and a lens position of a photographing lens.
判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、
前記判別手段は、
サポートベクターマシンである
ことを特徴とするカラー撮像装置。
From the shooting scene to be discriminated, a feature vector that reflects both the subject condition and the shooting condition of the shooting scene is extracted, and based on the feature vector and the discrimination criterion calculated in advance by supervised learning, A discriminating means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors;
The discrimination means includes
A color imaging device characterized by being a support vector machine.
判別対象となる撮影シーンから、その撮影シーンの被写体条件と撮影条件との双方を反映した特徴量ベクトルを抽出し、その特徴量ベクトルと、教師有り学習で予め算出された判別基準とに基づき、照明色の類似した特定グループに前記撮影シーンが属するか否かを判別する判別手段を備え、
前記判別手段は、
照明色の異なる複数の特定グループの各々に関して前記判別を行う
ことを特徴とするカラー撮像装置。
From the shooting scene to be discriminated, a feature vector that reflects both the subject condition and the shooting condition of the shooting scene is extracted, and based on the feature vector and the discrimination criterion calculated in advance by supervised learning, A discriminating means for discriminating whether or not the shooting scene belongs to a specific group having similar illumination colors;
The discrimination means includes
The color imaging apparatus, wherein the determination is performed for each of a plurality of specific groups having different illumination colors.
請求項に記載のカラー撮像装置において、
前記判別手段は、
前記複数の特定グループの各々に関する判別を順次に行い、その判別結果が「正」となった場合は、それ以降の判別の処理を省略する
ことを特徴とするカラー撮像装置。
The color imaging device according to claim 5 ,
The discrimination means includes
A color imaging apparatus characterized by sequentially performing discrimination regarding each of the plurality of specific groups and omitting subsequent discrimination processing when the discrimination result is “positive”.
請求項又は請求項に記載のカラー撮像装置において、
前記複数の特定グループは、
照明色が低色温度照明の色度範囲に属するようなグループ、照明色が蛍光灯又は水銀灯の色度範囲に属するようなグループ、照明色が演色性の良い蛍光灯又は自然太陽光の色度範囲に属するようなグループ、照明色が日陰又は曇天の色度範囲に属するようなグループのうち何れか3つである
ことを特徴とするカラー撮像装置。
The color imaging device according to claim 5 or 6 ,
The plurality of specific groups are:
Groups whose lighting color belongs to the chromaticity range of low color temperature lighting, groups whose lighting color belongs to the chromaticity range of fluorescent lamps or mercury lamps, chromaticity of fluorescent lamps with natural color rendering or natural sunlight A color imaging apparatus characterized by being any three of a group belonging to a range and a group having an illumination color belonging to a shaded or cloudy chromaticity range.
請求項又は請求項に記載のカラー撮像装置において、
前記複数の特定グループは、
照明色が晴天の色度範囲に属するようなグループ、照明色が日陰の色度範囲に属するようなグループ、照明色が低色温度蛍光灯又は電球の色度範囲に属するようなグループ、照明色が中色温度蛍光灯の色度範囲に属するようなグループ、照明色が高色温度蛍光灯の色度範囲に属するようなグループ、照明色が水銀灯の色度範囲に属するようなグループ、照明色が低色温度照明の色度範囲に属するようなグループのうち何れか6つである
ことを特徴とするカラー撮像装置。
The color imaging device according to claim 5 or 6 ,
The plurality of specific groups are:
A group in which the illumination color belongs to the chromaticity range of clear sky, a group in which the illumination color belongs to the shaded chromaticity range, a group in which the illumination color belongs to the chromaticity range of the low-temperature fluorescent lamp or bulb, and the illumination color , A group that belongs to the chromaticity range of the medium color temperature fluorescent lamp, a group that the illumination color belongs to the chromaticity range of the high color temperature fluorescent lamp, a group that the illumination color belongs to the chromaticity range of the mercury lamp, and the illumination color A color imaging apparatus characterized in that any one of the groups belonging to the chromaticity range of the low color temperature illumination.
請求項〜請求項の何れか一項に記載のカラー撮像装置において、
前記撮影シーンで撮影された画像の色ヒストグラムに基づき撮影時の照明種類を推定する推定手段を更に備え、
前記推定手段は、前記色ヒストグラムの色範囲を、前記判別手段が行った判別の結果に応じて制限する
ことを特徴とするカラー撮像装置。
The color imaging device according to any one of claims 5 to 8 ,
An estimation means for estimating the type of illumination at the time of shooting based on a color histogram of an image shot in the shooting scene;
The color imaging apparatus, wherein the estimation unit limits a color range of the color histogram according to a result of determination performed by the determination unit.
請求項〜請求項の何れか一項に記載のカラー撮像装置において、
前記撮影シーンで撮影された画像の色ヒストグラムに基づき撮影時の照明種類を推定する推定手段を更に備え、
前記推定手段は、前記色ヒストグラムの各色範囲の頻度に対し、前記判別手段が行った判別の結果に応じて重み付けをする
ことを特徴とするカラー撮像装置。
The color imaging device according to any one of claims 5 to 8 ,
An estimation means for estimating the type of illumination at the time of shooting based on a color histogram of an image shot in the shooting scene;
The color estimation apparatus, wherein the estimation unit weights the frequency of each color range of the color histogram according to a result of determination performed by the determination unit.
請求項1、請求項2、請求項4〜請求項10の何れか一項に記載のカラー撮像装置において、  In the color imaging device according to any one of claims 1, 2, and 4 to 10,
前記特徴量ベクトルのベクトル成分には、  The vector component of the feature vector includes
被写界の色と、撮影レンズのレンズポジションとが含まれる  Includes the field color and the lens position of the taking lens
ことを特徴とするカラー撮像装置。  A color imaging apparatus characterized by the above.
請求項1〜請求項3、請求項5〜請求項11の何れか一項に記載のカラー撮像装置において、  In the color imaging device according to any one of claims 1 to 3 and claims 5 to 11,
前記判別手段は、  The discrimination means includes
サポートベクターマシンである  It is a support vector machine
ことを特徴とするカラー撮像装置。  A color imaging apparatus characterized by the above.
請求項1〜請求項12の何れか一項に記載のカラー撮像装置において、
前記特徴量ベクトルのベクトル成分には、
前記被写界中に存在するエッジ量が含まれる
ことを特徴とするカラー撮像装置。
In the color imaging device according to any one of claims 1 to 12 ,
The vector component of the feature vector includes
A color imaging apparatus comprising an edge amount existing in the object scene.
請求項1〜請求項13の何れか一項に記載のカラー撮像装置において、
前記判別手段は、
前記判別を撮影前の期間に行う
ことを特徴とするカラー撮像装置。
In the color imaging device according to any one of claims 1 to 13 ,
The discrimination means includes
A color imaging apparatus, wherein the discrimination is performed in a period before photographing.
JP2007204610A 2007-08-06 2007-08-06 Color imaging device Active JP5023874B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007204610A JP5023874B2 (en) 2007-08-06 2007-08-06 Color imaging device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007204610A JP5023874B2 (en) 2007-08-06 2007-08-06 Color imaging device

Publications (2)

Publication Number Publication Date
JP2009044255A JP2009044255A (en) 2009-02-26
JP5023874B2 true JP5023874B2 (en) 2012-09-12

Family

ID=40444552

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007204610A Active JP5023874B2 (en) 2007-08-06 2007-08-06 Color imaging device

Country Status (1)

Country Link
JP (1) JP5023874B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6345430B2 (en) * 2014-01-31 2018-06-20 オリンパス株式会社 Multi-area white balance control device, multi-area white balance control method, multi-area white balance control program, computer recording multi-area white balance control program, multi-area white balance image processing device, multi-area white balance image processing method, multi-area White balance image processing program, computer recording multi-area white balance image processing program, and imaging apparatus provided with multi-area white balance image processing device
JP6934240B2 (en) * 2017-03-01 2021-09-15 株式会社ブライセン Image processing device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006080746A (en) * 2004-09-08 2006-03-23 Nikon Corp Image processor, electronic camera, and image processing program
JP2006129442A (en) * 2004-09-30 2006-05-18 Fuji Photo Film Co Ltd Image correction apparatus, method and program
JP2006295303A (en) * 2005-04-06 2006-10-26 Fuji Photo Film Co Ltd Image processing method, apparatus and program

Also Published As

Publication number Publication date
JP2009044255A (en) 2009-02-26

Similar Documents

Publication Publication Date Title
JP5092612B2 (en) Color imaging device
US20050185084A1 (en) Camera having autofocus adjustment function
JP5092565B2 (en) Imaging apparatus, image processing apparatus, and program
US20050212950A1 (en) Focal length detecting method, focusing device, image capturing method and image capturing apparatus
JP2020537382A (en) Methods and equipment for dual camera-based imaging and storage media
JP5597078B2 (en) Imaging apparatus and control method thereof
US20050099522A1 (en) Variable length encoding method and variable length decoding method
JP2019086775A (en) Image processing device, control method thereof, program, and storage medium
JP2013214878A (en) Imaging apparatus, exposure control method, and program
KR20130043925A (en) Photographing apparatus and method
JP2008042617A (en) Digital camera
JP2010072619A (en) Exposure operation device and camera
JP5023874B2 (en) Color imaging device
JP2013168723A (en) Image processing device, imaging device, image processing program, and image processing method
JP2009088800A (en) Color imaging device
JP5849515B2 (en) Exposure calculation device and camera
JP5794665B2 (en) Imaging device
JP5070856B2 (en) Imaging device
JP5202245B2 (en) Imaging apparatus and control method thereof
JP5055569B2 (en) Color imaging apparatus and image processing program
JP3240705B2 (en) Camera photometer
JPH10150598A (en) Exposure controller for still video camera
JP4995133B2 (en) Imaging apparatus and control method
JP7022534B2 (en) Image processing device and image processing method
JP2828314B2 (en) White balance control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100723

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120123

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20120228

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120501

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

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

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

Free format text: PAYMENT UNTIL: 20150629

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5023874

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150629

Year of fee payment: 3

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250