JP2016096461A - Imaging device, imaging method, program and storage medium - Google Patents

Imaging device, imaging method, program and storage medium Download PDF

Info

Publication number
JP2016096461A
JP2016096461A JP2014231663A JP2014231663A JP2016096461A JP 2016096461 A JP2016096461 A JP 2016096461A JP 2014231663 A JP2014231663 A JP 2014231663A JP 2014231663 A JP2014231663 A JP 2014231663A JP 2016096461 A JP2016096461 A JP 2016096461A
Authority
JP
Japan
Prior art keywords
calculating
green
white balance
captured image
green data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014231663A
Other languages
Japanese (ja)
Inventor
崇彦 吉田
Takahiko Yoshida
崇彦 吉田
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.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Priority to JP2014231663A priority Critical patent/JP2016096461A/en
Publication of JP2016096461A publication Critical patent/JP2016096461A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide an imaging device that can determine that the present scene is a green scene when an overall image is greened, and also determine that the present scene is not a green scene when the present scene is an indoor light source scene.SOLUTION: An imaging device 10 has brightness calculation means 121 for calculating the brightness of a subject from an exposure condition when imaging a pickup image, hue calculation means 122 for calculating the hue of each pixel of the subject from the pickup image, white balance gain calculation means 123 for calculating the a white balance gain for the pickup image, green data calculation means 124 for calculating green data representing a green scene identity of the subject, and white balance gain correction means 125 for correcting the white balance gain on the basis of the green data. In a color space coordinate system, a range A in which pixels corresponding to plants under sun light are distributed is calculated, the number of pixels existing in the range A and a pixel variance are calculated from the calculated hue, and green data are calculated based on the pixel number, the pixel variance, the brightness and the imaging sensitivity of the pickup image.SELECTED DRAWING: Figure 1

Description

本発明は撮像装置、撮像方法、プログラム及び記憶媒体に関する。   The present invention relates to an imaging apparatus, an imaging method, a program, and a storage medium.

緑シーン、特に外光があまり差し込まない暗い森や林の中、日陰などでの緑の草木を背景にしての撮影シーンは、色相データの分布や輝度データが白色蛍光灯、水銀灯等の照明下での撮影シーンと似ているため、屋外撮影にも関わらず屋内撮影と誤判定され、ホワイトバランスずれによる退色が生じることがある。   In a green scene, especially in a dark forest or forest where there is not much external light, or in a shaded background with green vegetation, the hue data distribution and luminance data are under illumination such as a white fluorescent lamp or mercury lamp. Since it is similar to the shooting scene at, it may be erroneously determined as indoor shooting despite outdoor shooting, and discoloration may occur due to white balance deviation.

このために、特許文献1には、撮像装置において、色相データの分布に基づいて、被写体の緑シーンらしさを示すデータを求め、そのデータに基づいてホワイトバランス調整データ、例えば、ホワイトバランス調整ゲインを補正することが記載されている。   For this reason, Patent Document 1 obtains data indicating the green scene-likeness of a subject based on the distribution of hue data in the imaging device, and obtains white balance adjustment data, for example, white balance adjustment gain based on the data. The correction is described.

特開2004−274367号公報JP 2004-274367 A

特許文献1記載の撮像装置では、R/G−B/G座標における緑検出枠内に存在する色相データに基づいて回帰直線を求め、回帰直線の傾き、及び、回帰直線と緑検出枠内の色相データの座標データとの誤差を利用して、緑シーンらしさを求めている。   In the imaging apparatus described in Patent Document 1, a regression line is obtained based on hue data existing in the green detection frame in the R / GB / G coordinates, the slope of the regression line, and the regression line and the green detection frame The green scene-likeness is obtained by using an error with the coordinate data of the hue data.

しかしながら、この撮像装置において、全画面が緑ですべての色相データが緑検出枠内だけになる場合は、回帰直線を算出しても傾きが大きくならず、緑シーンではないと誤判定される可能性がある。また、全画面が蛍光灯下の灰色だけになる場合は、回帰直線の傾きが大きくなることがあり、さらに回帰直線と色相データとの誤差が小さくなるので、緑シーンであると誤判定される可能性がある。   However, in this imaging device, when the entire screen is green and all hue data is only within the green detection frame, the slope does not increase even if the regression line is calculated, and it may be erroneously determined that the scene is not a green scene. There is sex. Also, if the entire screen is only gray under fluorescent light, the slope of the regression line may increase, and the error between the regression line and hue data will be smaller, so it will be erroneously determined as a green scene. there is a possibility.

本発明は、このような問題を解決するためになされたものであり、画像全体に緑があるような場合でも緑シーンであると判定でき、また、屋内光源シーンの場合には緑シーンではないと判定できる撮像装置、撮像方法、プログラム及び記憶媒体を提供することを目的とする。   The present invention has been made to solve such a problem, and even when there is green in the entire image, it can be determined that it is a green scene, and in the case of an indoor light source scene, it is not a green scene. It is an object to provide an imaging apparatus, an imaging method, a program, and a storage medium that can be determined as follows.

本発明に係る撮像装置は、撮像画像を撮像した時の露光条件から被写体の輝度を算出する輝度算出手段と、撮像画像から被写体の各画素の色相を算出する色相算出手段と、撮像画像に対するホワイトバランスゲインを算出するホワイトバランスゲイン算出手段と、被写体の緑シーンらしさを示す緑データを算出する緑データ算出手段と、緑データに基づいて、ホワイトバランスゲインを補正するホワイトバランスゲイン補正手段とを備え、緑データ算出手段は、色空間座標系において、太陽光下の植物に対応する画素が分布する範囲を算出し、算出した色相が範囲内に存在する画素の画素数及び画素分散値を算出し、画素数、画素分散値、輝度及び撮像画像の撮影感度に基づいて、緑データを算出するものである。   An imaging apparatus according to the present invention includes a luminance calculation unit that calculates the luminance of a subject from an exposure condition when the captured image is captured, a hue calculation unit that calculates a hue of each pixel of the subject from the captured image, and a white for the captured image. A white balance gain calculating unit that calculates a balance gain; a green data calculating unit that calculates green data indicating a green scene likeness of a subject; and a white balance gain correcting unit that corrects the white balance gain based on the green data. The green data calculating means calculates a range in which pixels corresponding to plants under sunlight are distributed in the color space coordinate system, and calculates the number of pixels and the pixel dispersion value of the pixels in which the calculated hue exists. The green data is calculated based on the number of pixels, the pixel dispersion value, the luminance, and the photographing sensitivity of the captured image.

この構成により、画像全体に緑があるような場合でも緑シーンであると判定することができ、また、屋内光源シーンの場合には緑シーンではないと判定することができる。   With this configuration, it is possible to determine that the image is a green scene even when the entire image is green, and it is possible to determine that the image is not a green scene in the case of an indoor light source scene.

また、本発明に係る撮像方法は、撮像画像を撮像した時の露光条件から被写体の輝度を算出するステップと、撮像画像から被写体の各画素の色相を算出するステップと、撮像画像に対するホワイトバランスゲインを算出するステップと、被写体の緑シーンらしさを示す緑データを算出するステップと、緑データに基づいて、ホワイトバランスゲインを補正するステップとを有し、緑データを算出するステップは、色空間座標系において、太陽光下の植物に対応する画素が分布する範囲を算出するステップと、算出した色相が範囲内に存在する画素の画素数及び画素分散値を算出するステップと、画素数、画素分散値、輝度及び撮像画像の撮影感度に基づいて、緑データを算出するステップとを有するものである。   In addition, the imaging method according to the present invention includes a step of calculating the luminance of a subject from an exposure condition when the captured image is captured, a step of calculating a hue of each pixel of the subject from the captured image, and a white balance gain for the captured image. Calculating the green data indicating the green scene likeness of the subject, and correcting the white balance gain based on the green data. The step of calculating the green data includes color space coordinates. In the system, a step of calculating a range in which pixels corresponding to plants under sunlight are distributed, a step of calculating a pixel number and a pixel dispersion value of a pixel in which the calculated hue exists in the range, a number of pixels, and a pixel dispersion And calculating green data based on the value, the brightness, and the photographing sensitivity of the captured image.

この構成により、画像全体に緑があるような場合でも緑シーンであると判定することができ、また、屋内光源シーンの場合には緑シーンではないと判定することができる。   With this configuration, it is possible to determine that the image is a green scene even when the entire image is green, and it is possible to determine that the image is not a green scene in the case of an indoor light source scene.

また、本発明に係るプログラムは、コンピュータに、撮像画像を撮像した時の露光条件から被写体の輝度を算出する手順と、撮像画像から被写体の各画素の色相を算出する手順と、撮像画像に対するホワイトバランスゲインを算出する手順と、被写体の緑シーンらしさを示す緑データを算出する手順と、緑データに基づいて、ホワイトバランスゲインを補正する手順とを実行させ、緑データを算出する手順は、コンピュータに、色空間座標系において、太陽光下の植物に対応する画素が分布する範囲を算出する手順と、算出した色相が範囲内に存在する画素の画素数及び画素分散値を算出する手順と、画素数、画素分散値、輝度及び撮像画像の撮影感度に基づいて、緑データを算出する手順とを実行させるためのものである。   Further, the program according to the present invention causes a computer to calculate the luminance of the subject from the exposure condition when the captured image is captured, to calculate the hue of each pixel of the subject from the captured image, and to perform white for the captured image. A procedure for calculating the green data by executing the procedure for calculating the balance gain, the procedure for calculating the green data indicating the green scene likeness of the subject, and the procedure for correcting the white balance gain based on the green data is performed by a computer. In addition, in the color space coordinate system, a procedure for calculating a range in which pixels corresponding to plants under sunlight are distributed, a procedure for calculating the number of pixels in which the calculated hue exists and a pixel variance value, This is to execute the procedure for calculating the green data based on the number of pixels, the pixel dispersion value, the luminance, and the photographing sensitivity of the captured image.

この構成により、画像全体に緑があるような場合でも緑シーンであると判定することができ、また、屋内光源シーンの場合には緑シーンではないと判定することができる。   With this configuration, it is possible to determine that the image is a green scene even when the entire image is green, and it is possible to determine that the image is not a green scene in the case of an indoor light source scene.

本発明により、画像全体に緑があるような場合でも緑シーンであると判定でき、また、屋内光源シーンの場合には緑シーンではないと判定できる撮像装置、撮像方法、プログラム及び記憶媒体を提供することができる。   According to the present invention, there are provided an imaging device, an imaging method, a program, and a storage medium that can be determined to be a green scene even when there is green in the entire image, and that can be determined to be not a green scene in the case of an indoor light source scene. can do.

実施の形態に係る撮像装置10の概略構成を示す図である。1 is a diagram illustrating a schematic configuration of an imaging apparatus 10 according to an embodiment. 実施の形態に係る色空間座標系において、太陽光下の植物に対応する画素が分布する範囲Aを示す図である。In the color space coordinate system which concerns on embodiment, it is a figure which shows the range A where the pixel corresponding to the plant under sunlight distributes. 実施の形態に係る色空間座標系において、蛍光灯下の灰色被写体に対応する画素が分布する範囲Bを示す図である。In the color space coordinate system which concerns on embodiment, it is a figure which shows the range B where the pixel corresponding to the gray to-be-photographed object under a fluorescent lamp distributes. 実施の形態に係る色空間座標系において、太陽光下の植物に対応する画素が分布する範囲Aと蛍光灯下の灰色被写体に対応する画素が分布する範囲Bとが重なる範囲Cを示す図である。In the color space coordinate system which concerns on embodiment, it is a figure which shows the range C with which the range A in which the pixel corresponding to the plant under sunlight distributes, and the range B in which the pixel corresponding to the gray object under a fluorescent lamp distributes overlap. is there. 実施の形態に係る色空間座標系において、純粋な緑領域に対応する画素の範囲Dを示す図である。It is a figure which shows the range D of the pixel corresponding to a pure green area | region in the color space coordinate system which concerns on embodiment. 実施の形態に係るGreen Count Rateの算出方法を説明するための図である。It is a figure for demonstrating the calculation method of Green Count Rate which concerns on embodiment. 実施の形態に係る撮像画像と当該撮像画像における画素の色情報の分散状態とを示す図である。It is a figure which shows the captured image which concerns on embodiment, and the dispersion | distribution state of the color information of the pixel in the said captured image. 実施の形態に係るGreen Variance Rateの算出方法を説明するための図である。It is a figure for demonstrating the calculation method of Green Variance Rate which concerns on embodiment. 実施の形態に係る他の撮像画像を示す図である。It is a figure which shows the other captured image which concerns on embodiment. 実施の形態に係るBV Rateの算出方法を説明するための図である。It is a figure for demonstrating the calculation method of BV Rate which concerns on embodiment. 実施の形態に係るSV Rateの算出方法を説明するための図である。It is a figure for demonstrating the calculation method of SV Rate which concerns on embodiment. 実施の形態に係る撮像方法の処理手順を示すフローチャートである。It is a flowchart which shows the process sequence of the imaging method which concerns on embodiment.

以下、図面を参照して本実施の形態に係る撮像装置及び撮像方法について説明する。
まず、本実施の形態に係る撮像装置及び撮像方法の概要を説明する。
一般に、オートホワイトバランス処理では様々な手法を用いて光源の判定を行うが、蛍光灯下の灰色(グレイ)の被写体と、太陽光下、特に日陰の植物の緑とを混同しやすい。そこで、太陽光下の植物の検出ができれば、オートホワイトバランス処理において光源を判定するときの補助とすることができる。つまり、オートホワイトバランス処理において、撮影しているシーンの光源が太陽光であると判断できれば、光源判定の精度を上げることができ、失敗画像を減らすことができる。
Hereinafter, an imaging apparatus and an imaging method according to the present embodiment will be described with reference to the drawings.
First, an overview of an imaging apparatus and an imaging method according to the present embodiment will be described.
In general, in the auto white balance process, a light source is determined using various methods, but it is easy to confuse a gray subject under a fluorescent lamp with a green plant in shade, particularly in shade. Therefore, if a plant under sunlight can be detected, it can be used as an aid in determining the light source in the auto white balance process. That is, in the auto white balance process, if it can be determined that the light source of the scene being shot is sunlight, the accuracy of the light source determination can be increased and the number of failed images can be reduced.

そこで、本実施の形態に係る撮像装置及び撮像方法は、実際の撮影画像について、それぞれ、太陽光下の植物シーン(緑シーン)らしさを算出し、植物シーンらしいときに、オートホワイトバランス処理における光源が太陽光である確率を高めるようにする。   Therefore, the imaging device and the imaging method according to the present embodiment calculate the likelihood of a plant scene (green scene) under sunlight for each actual captured image, and when it seems to be a plant scene, the light source in auto white balance processing To increase the probability of being sunlight.

なお、太陽光下の植物シーンらしさは、以下の要素から算出することができる。
・太陽光下の植物及び蛍光灯下の灰色被写体の色情報分布(カウント、分散)
・BV値(被写体輝度)
・SV値(感度)
Note that the plant scene likeness under sunlight can be calculated from the following elements.
・ Color information distribution (count, dispersion) of plants under sunlight and gray objects under fluorescent lights
・ BV value (subject brightness)
-SV value (sensitivity)

つぎに、本実施の形態に係る撮像装置の構成について説明する。
図1は、本実施の形態に係る撮像装置10の概略構成を示す図である。
撮像装置10は、撮像部101、信号処理部102、前処理部103、画像メモリ104、適正AE算出部105、オートホワイトバランス処理部(AWB処理部)106、後処理部107、RGB→YCC変換部108、データ圧縮部109、メモリカードインタフェース110、メモリカード111などを備えている。
Next, the configuration of the imaging apparatus according to the present embodiment will be described.
FIG. 1 is a diagram illustrating a schematic configuration of an imaging apparatus 10 according to the present embodiment.
The imaging device 10 includes an imaging unit 101, a signal processing unit 102, a preprocessing unit 103, an image memory 104, an appropriate AE calculation unit 105, an auto white balance processing unit (AWB processing unit) 106, a post processing unit 107, and RGB → YCC conversion. Unit 108, data compression unit 109, memory card interface 110, memory card 111, and the like.

撮像部101は、レンズ、絞り、シャッター、CCDイメージセンサまたはCMOSイメージセンサ等の撮像素子、露光制御部、フラッシュなどを有している。
信号処理部102は、撮像部101の撮像素子から出力された出力信号に対して信号処理を行う処理部であり、A/D変換処理を行うA/D変換部などを有している。
The imaging unit 101 includes a lens, an aperture, a shutter, an imaging device such as a CCD image sensor or a CMOS image sensor, an exposure control unit, a flash, and the like.
The signal processing unit 102 is a processing unit that performs signal processing on an output signal output from the image sensor of the imaging unit 101, and includes an A / D conversion unit that performs A / D conversion processing.

前処理部103は、信号処理部102から出力されたRGB画像信号に対して、前処理を施す処理部であり、AE評価値算出部、シェーディング補正部などを有している。
画像メモリ104は、前処理部103による各種の前処理が施されたRGB信号を記憶部する記憶部である。
適正AE算出部105は、前処理部103のAE評価値算出部から出力されたAE評価値に基づいて、撮像条件に適したAE値を算出し、撮像部101の露光制御部に出力する。
The preprocessing unit 103 is a processing unit that performs preprocessing on the RGB image signal output from the signal processing unit 102, and includes an AE evaluation value calculation unit, a shading correction unit, and the like.
The image memory 104 is a storage unit that stores RGB signals that have been subjected to various types of preprocessing by the preprocessing unit 103.
The appropriate AE calculation unit 105 calculates an AE value suitable for the imaging condition based on the AE evaluation value output from the AE evaluation value calculation unit of the preprocessing unit 103, and outputs the AE value to the exposure control unit of the imaging unit 101.

オートホワイトバランス処理部106は、実際の撮像画像を用いて、ホワイトバランス補正処理に用いられるホワイトバランスゲインを算出する処理部である。オートホワイトバランス処理部106は、輝度算出部121、色相算出部122、ホワイトバランスゲイン算出部(WBゲイン算出部)123、緑データ算出部124、ホワイトバランスゲイン補正部(WBゲイン補正部)125などを有している。オートホワイトバランス処理部106については後で詳述する。   The auto white balance processing unit 106 is a processing unit that calculates a white balance gain used for white balance correction processing using an actual captured image. The auto white balance processing unit 106 includes a luminance calculation unit 121, a hue calculation unit 122, a white balance gain calculation unit (WB gain calculation unit) 123, a green data calculation unit 124, a white balance gain correction unit (WB gain correction unit) 125, and the like. have. The auto white balance processing unit 106 will be described in detail later.

後処理部107は、前処理部103により前処理が施されたRGB画像信号に対して、各種の後処理を実施する処理部であり、ホワイトバランス制御部131などを有する。ホワイトバランス制御部131は、オートホワイトバランス処理部106が算出したホワイトバランスゲインを入力し、当該ホワイトバランスゲインを用いて、RGB画像信号に対してホワイトバランス補正処理を実施する。   The post-processing unit 107 is a processing unit that performs various post-processing on the RGB image signal that has been pre-processed by the pre-processing unit 103, and includes a white balance control unit 131 and the like. The white balance control unit 131 inputs the white balance gain calculated by the auto white balance processing unit 106, and performs white balance correction processing on the RGB image signal using the white balance gain.

RGB→YCC変換部108は、RGB画像信号をYCC画像信号へと変換する処理部である。
データ圧縮部109は、YCC画像信号を、必要に応じてJPEG等の各種の圧縮形式で圧縮する処理部である。必要に応じて圧縮されたYCC画像信号は、メモリカードインタフェース110を介してメモリカード111に記録される。
The RGB → YCC conversion unit 108 is a processing unit that converts an RGB image signal into a YCC image signal.
The data compression unit 109 is a processing unit that compresses the YCC image signal in various compression formats such as JPEG as necessary. The YCC image signal compressed as necessary is recorded in the memory card 111 via the memory card interface 110.

ここまで、撮像装置10の構成について簡単に説明したが、オートホワイトバランス処理部106を除く、各構成の詳細については、例えば、特開2014−120813号公報を参考にされたい。   Up to this point, the configuration of the imaging apparatus 10 has been briefly described. For details of each configuration excluding the auto white balance processing unit 106, refer to, for example, Japanese Patent Application Laid-Open No. 2014-120815.

つぎに、オートホワイトバランス処理部106について説明する。
前述したように、オートホワイトバランス処理部106は、輝度算出部121、色相算出部122、ホワイトバランスゲイン算出部123、緑データ算出部124、ホワイトバランスゲイン補正部125などを有している。
Next, the auto white balance processing unit 106 will be described.
As described above, the auto white balance processing unit 106 includes a luminance calculation unit 121, a hue calculation unit 122, a white balance gain calculation unit 123, a green data calculation unit 124, a white balance gain correction unit 125, and the like.

輝度算出部121は撮像画像を撮像した時の露光条件から被写体の輝度を算出する。色相算出部122は撮像画像から被写体の画素の色相を算出する。
ホワイトバランスゲイン算出部123はホワイトバランスゲインを算出するが、算出方法はどのような方法であっても良く、例えば、特許文献1記載の方法であっても良い。ホワイトバランスゲイン算出部123では、輝度算出部121及び色相算出部122が算出した輝度及び色相に基づいて、被写体の光源を判別し、判別した光源に対応するホワイトバランスゲインRa、Ga、Baを選択する。
The luminance calculation unit 121 calculates the luminance of the subject from the exposure conditions when the captured image is captured. The hue calculation unit 122 calculates the hue of the subject pixel from the captured image.
The white balance gain calculation unit 123 calculates the white balance gain, but any calculation method may be used, for example, the method described in Patent Document 1. The white balance gain calculation unit 123 determines the light source of the subject based on the luminance and hue calculated by the luminance calculation unit 121 and the hue calculation unit 122, and selects the white balance gains Ra, Ga, and Ba corresponding to the determined light source. To do.

緑データ算出部124は、太陽光下の植物シーンらしさ、すなわち、緑シーンらしさを算出する。緑シーンらしさの算出方法については後述する。
ホワイトバランスゲイン補正部125は、緑シーンらしさに基づいてホワイトバランスゲイン算出部123が選択したホワイトバランスゲインRa、Ga、Baを補正する。ホワイトバランスゲイン補正部125は、実際の撮像画像の緑シーンらしさが高いときに、光源が太陽光である確率を高めるようにする。
The green data calculation unit 124 calculates the likelihood of a plant scene under sunlight, that is, the likelihood of a green scene. A method for calculating the green sceneness will be described later.
The white balance gain correction unit 125 corrects the white balance gains Ra, Ga, and Ba selected by the white balance gain calculation unit 123 based on the green scene-likeness. The white balance gain correction unit 125 increases the probability that the light source is sunlight when the actual captured image is likely to be a green scene.

なお、オートホワイトバランス処理部106が実現する各構成要素は、例えば、コンピュータであるオートホワイトバランス処理部106が備える演算装置(図示せず)の制御によって、プログラムを実行させることにより実現できる。   Each component realized by the auto white balance processing unit 106 can be realized, for example, by executing a program under the control of an arithmetic device (not shown) provided in the auto white balance processing unit 106 that is a computer.

より具体的には、オートホワイトバランス処理部106は、記憶部(図示せず)に格納されたプログラムを主記憶装置(図示せず)にロードし、演算装置の制御によってプログラムを実行して実現する。また、各構成要素は、プログラムによるソフトウェアで実現することに限ることなく、ハードウェア、ファームウェア及びソフトウェアのうちのいずれかの組み合わせなどにより実現しても良い。   More specifically, the auto white balance processing unit 106 loads a program stored in a storage unit (not shown) to a main storage device (not shown) and executes the program under the control of the arithmetic unit. To do. Each component is not limited to being realized by software by a program, and may be realized by any combination of hardware, firmware, and software.

上述したプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。   The above-described program can be stored using various types of non-transitory computer readable media and supplied to a computer. Non-transitory computer readable media include various types of tangible storage media.

非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えば、フレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば、光磁気ディスク)、CD−ROM(Read Only Memory)、CD−R、CD−R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(random access memory))を含む。   Examples of non-transitory computer-readable media include magnetic recording media (for example, flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (for example, magneto-optical disks), CD-ROMs (Read Only Memory), CD-ROMs. R, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (random access memory)).

また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されても良い。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバなどの有線通信路、または無線通信路を介して、プログラムをコンピュータに供給できる。   Further, the program may be supplied to the computer by various types of temporary computer readable media. Examples of transitory computer readable media include electrical signals, optical signals, and electromagnetic waves. The transitory computer readable medium can supply the program to the computer via a wired communication path such as an electric wire and an optical fiber, or a wireless communication path.

つぎに、緑データ算出部124について詳細に説明する。
緑データ算出部124では、太陽光下の植物の緑を、以下の要素から検出する。
・画素の出現分布(Histogram)
太陽光下の植物に対応する画素が分布する範囲
蛍光灯下の灰色被写体に対応する画素が分布する範囲
・BV値(被写体輝度)
・SV値(感度)
Next, the green data calculation unit 124 will be described in detail.
The green data calculation unit 124 detects the green of the plant under sunlight from the following elements.
-Pixel appearance distribution (Histogram)
Range where pixels corresponding to plants under sunlight are distributed Range where pixels corresponding to gray objects under fluorescent lights are distributed ・ BV value (subject brightness)
-SV value (sensitivity)

より具体的には、緑データ算出部124では、太陽光下の植物シーンらしさ(Green Rate)を、つぎの5つの指標に基づいて算出する。
・Green Count Rate
・Green Variance RateX
・Green Variance RateY
・BV Rate
・SV Rate
More specifically, the green data calculation unit 124 calculates the plant scene likelihood (Green Rate) under sunlight based on the following five indicators.
・ Green Count Rate
・ Green Variety RateX
・ Green Variety RateY
・ BV Rate
・ SV Rate

緑データ算出部124における上記5つの指標の算出方法について説明する。
(Green Count Rate)
まず、実際の撮像画像を入手する前に、あらかじめ複数の撮像画像(サンプル画像)を入手して、これらの画像の画素のR/G、B/Gの色情報から、色空間座標系(R/G−B/G座標)において太陽光下の植物に対応する画素が分布する範囲、蛍光灯下の灰色被写体に対応する画素が分布する範囲、及び、これらの分布する範囲が重なる範囲を定めておく。
A method for calculating the five indexes in the green data calculation unit 124 will be described.
(Green Count Rate)
First, before obtaining actual captured images, a plurality of captured images (sample images) are obtained in advance, and the color space coordinate system (R) is obtained from the R / G and B / G color information of the pixels of these images. / GB / G coordinates) defines a range in which pixels corresponding to plants under sunlight are distributed, a range in which pixels corresponding to gray objects under fluorescent lights are distributed, and a range in which these distributed ranges overlap. Keep it.

図2、3、4、5はそれぞれ、本実施の形態に係る色空間座標系において太陽光下の植物に対応する画素が分布する範囲A、蛍光灯下の灰色被写体に対応する画素が分布する範囲B、太陽光下の植物に対応する画素が分布する範囲Aと蛍光灯下の灰色被写体に対応する画素が分布する範囲Bとが重なる範囲C、純粋な緑領域に対応する画素の範囲Dを示す図である。いずれの図においても、横軸はlogR/G値を示し、縦軸はlogB/G値を示す。   2, 3, 4, and 5, in the color space coordinate system according to the present embodiment, a range A in which pixels corresponding to plants under sunlight are distributed, and a pixel corresponding to gray objects under fluorescent lamps are distributed. Range B, Range C where pixels corresponding to plants under sunlight are distributed and Range B where pixels corresponding to gray objects under fluorescent lights are distributed, Pixel range D corresponding to pure green regions FIG. In any figure, the horizontal axis indicates the logR / G value, and the vertical axis indicates the logB / G value.

そして、実際に撮影した画像から、図2に示した太陽光下の植物に対応する画素が分布する範囲A、及び、図4に示した太陽光下の植物に対応する画素が分布する範囲Aと蛍光灯下の灰色被写体に対応する画素が分布する範囲Bとが重なる範囲Cにおいて、画素の出現分布(Histogram)を取得し、この取得した値から植物の検出を行う。   Then, from the actually photographed image, a range A in which pixels corresponding to plants under sunlight shown in FIG. 2 are distributed, and a range A in which pixels corresponding to plants under sunlight shown in FIG. 4 are distributed. In a range C where a pixel corresponding to a gray subject under a fluorescent lamp and a range B in which pixels are distributed overlap, a pixel appearance distribution (Histogram) is acquired, and a plant is detected from the acquired value.

つまり、式(1)のように、太陽光下の植物に対応する画素が分布する範囲A(Green Gate)における画素の出現カウント(Green Gate Count)から、前述の重なる範囲Cにおける画素の出現カウント(Overlap Gate Count)を減算し、図5に示した純粋な緑領域に対応する画素の範囲Dにおける画素の出現カウント(Green Count)を算出する。   That is, as shown in Expression (1), from the pixel appearance count (Green Gate Count) in the range A (Green Gate) in which pixels corresponding to plants under sunlight are distributed, the pixel appearance count in the overlapping range C described above. (Overlap Gate Count) is subtracted to calculate the pixel appearance count (Green Count) in the pixel range D corresponding to the pure green region shown in FIG.

このとき、Green Countが多いほど太陽光下の植物があるシーンといえるので、Green Countが多いときに高評価値となるようにGreen Count Rateを算出する。
図6は、本実施の形態に係るGreen Count Rateの算出方法を説明するための図である。横軸はGreen Count値を示し、縦軸はGreen Count Rate値を示す。
図6に示したように、Green Count RateはGreen Countに応じて線形補間により求めることができる。すなわち、Green Count Rateは式(2)により算出される。なお、Green Count Threshold 1, 2はそれぞれ調整量である。
At this time, since it can be said that there are plants under sunlight as the Green Count increases, the Green Count Rate is calculated so as to have a high evaluation value when the Green Count is large.
FIG. 6 is a diagram for explaining a method of calculating the Green Count Rate according to the present embodiment. The horizontal axis represents the Green Count value, and the vertical axis represents the Green Count Rate value.
As shown in FIG. 6, the Green Count Rate can be obtained by linear interpolation according to the Green Count. That is, the Green Count Rate is calculated by Expression (2). Green Count Threshold 1 and 2 are adjustment amounts.

以上のようにして、Green Count Rateを算出することができる。
(Green Variance RateX)
(Green Variance RateY)
ここでは、太陽光下の植物に対応する画素が分布する範囲A(Green Gate)における画素のx,y方向の分散(Green Variance)を評価する。これはx方向、y方向について個別に評価する。
As described above, the Green Count Rate can be calculated.
(Green Variety RateX)
(Green Variety RateY)
Here, the variance (Green Variance) of the pixels in the x and y directions in a range A (Green Gate) in which pixels corresponding to plants under sunlight are distributed is evaluated. This is evaluated separately for the x and y directions.

図7は、本実施の形態に係る撮像画像と当該撮像画像における画素の色情報の分散状態とを示す図である。図7(a)は人工的な被写体の撮像画像と当該撮像画像における分散状態とを示す図、図7(b)は自然な被写体の撮像画像と当該撮像画像における分散状態を示す図である。   FIG. 7 is a diagram illustrating a captured image according to the present embodiment and a dispersion state of color information of pixels in the captured image. FIG. 7A is a diagram illustrating a captured image of an artificial subject and a dispersed state in the captured image, and FIG. 7B is a diagram illustrating a captured image of a natural subject and a dispersed state in the captured image.

図7(a)に示したように平らなチャートや壁などの人工的な被写体では分散値が小さくなり、図7(b)に示したように草などの自然な被写体では分散値が大きくなる傾向がある。つまり、分散値が大きいほど植物シーンらしいといえるので、高評価値となるようにGreen Variance Rateを算出する。   As shown in FIG. 7A, the variance value is small for an artificial subject such as a flat chart or a wall, and the variance value is large for a natural subject such as grass as shown in FIG. 7B. Tend. In other words, the larger the variance value, the more likely it is to be a plant scene, so the Green Variance Rate is calculated so as to have a high evaluation value.

対象領域の分散値を取得するためには、次の情報を用いる。
・Nsum:画素カウント数
・Xsum、Ysum:X、Y各軸の和
・XXsum、YYsum:X、Y各軸の2乗和
The following information is used to obtain the variance value of the target area.
-Nsum: Pixel count number-Xsum, Ysum: Sum of X and Y axes-XXsum, YYsum: Sum of squares of X, Y axes

そして、各方向における分散値は、式(3)のように計算する。
GreenVarianceX = (XXsum/Nsum) - (Xsum/Nsum) x (Xsum/Nsum)
GreenVarianceY = (YYsum/Nsum) - (Ysum/Nsum) x (Ysum/Nsum) ・・・式(3)
Then, the variance value in each direction is calculated as in Expression (3).
GreenVarianceX = (XXsum / Nsum)-(Xsum / Nsum) x (Xsum / Nsum)
GreenVarianceY = (YYsum / Nsum)-(Ysum / Nsum) x (Ysum / Nsum) (3)

図8は、本実施の形態に係るGreen Variance Rateの算出方法を説明するための図である。横軸はGreen Variance値を示し、縦軸はGreen Variance Rate値を示す。
図8に示したように、Green Variance RateはGreen Varianceに応じて線形補間により求めることができる。すなわち、Green Variance Rateは、式(4)、(5)により算出される。なお、Green Variance Threshold 1, 2はそれぞれ調整量であり、x方向、y方向別に算出するため、Green Variance Rateと各Thresholdもx方向、y方向の2種類となる。
FIG. 8 is a diagram for explaining a method of calculating the Green Variance Rate according to the present embodiment. The horizontal axis indicates the Green Variance value, and the vertical axis indicates the Green Variance Rate value.
As shown in FIG. 8, the Green Variance Rate can be obtained by linear interpolation according to the Green Variance. That is, the Green Variance Rate is calculated by the equations (4) and (5). Green Variance Threshold 1 and 2 are adjustment amounts, and are calculated separately for the x direction and the y direction. Therefore, there are two types of Green Variance Rate and each threshold value for the x direction and the y direction.

以上のようにして、Green Variance RateX、 Green Variance RateYを算出することができる。
(BV Rate)
ここでは、BV値を評価する。
図9は、本実施の形態に係る他の撮像画像を示す図である。図9(a)は太陽光下での撮像画像を示す図、図9(b)は人工光源下での撮像画像を示す図である。
As described above, Green Variance RateX and Green Variance RateY can be calculated.
(BV Rate)
Here, the BV value is evaluated.
FIG. 9 is a diagram showing another captured image according to the present embodiment. FIG. 9A is a diagram illustrating a captured image under sunlight, and FIG. 9B is a diagram illustrating a captured image under an artificial light source.

図9(a)に示したような日向の太陽光下であるほどBV値が大きくなり、図9(b)に示したような人工光源下であるほどBV値が小さくなる傾向がある。つまり、BV値が大きいほど太陽光下の植物シーンらしいと言えるので、BV Rateを高評価値となるように算出する。   There is a tendency that the BV value increases as the sunlight is as shown in FIG. 9A, and the BV value decreases as the artificial light source is as shown in FIG. 9B. In other words, the larger the BV value, the more likely it is to be a plant scene under sunlight, so the BV Rate is calculated to be a high evaluation value.

図10は、本実施の形態に係るBV Rateの算出方法を説明するための図である。横軸はBV値を示し、縦軸はBV Rate値を示す。
図10にしたように、BV RateはBVに応じて線形補間により求めることができる。すなわち、BV Rateは式(6)により算出される。ここで、BVは、輝度算出部121が実際の撮影画像を撮像したときの撮像装置10の露光条件から算出した被写体の輝度を用いれば良い。また、BV Threshold 1, 2はそれぞれ調整量である。
FIG. 10 is a diagram for explaining the method of calculating the BV Rate according to the present embodiment. The horizontal axis shows the BV value, and the vertical axis shows the BV Rate value.
As shown in FIG. 10, the BV Rate can be obtained by linear interpolation according to BV. That is, the BV rate is calculated by equation (6). Here, as the BV, the luminance of the subject calculated from the exposure condition of the imaging device 10 when the luminance calculation unit 121 images an actual captured image may be used. BV Threshold 1 and 2 are adjustment amounts.

以上のようにして、BV Rateを算出することができる。
(SV Rate)
画像を撮像したときの撮像装置の設定が高感度であると色ノイズの影響によりS/Nが悪くなり、画素別の色判断による信頼度が低くなる。このため、撮像時の設定が高感度のときには信頼度を下げるように処理する。つまり、SV値に応じてSV信頼度(SV Rate)を算出する。
As described above, the BV Rate can be calculated.
(SV Rate)
If the setting of the image pickup apparatus when taking an image is high sensitivity, the S / N deteriorates due to the influence of color noise, and the reliability by color judgment for each pixel is lowered. For this reason, when the setting at the time of imaging is high sensitivity, processing is performed to lower the reliability. That is, the SV reliability (SV Rate) is calculated according to the SV value.

図11は、本実施の形態に係るSV Rateの算出方法を説明するための図である。横軸はSV値を示し、縦軸はSV Rate値を示す。
図11に示したように、SV信頼度はSVに応じて線形補間により求めることができる。すなわち、SV Rateは式(7)により算出される。ここで、SVは、実際の撮像画像を撮像したときの撮像装置10の設定感度SVを用いれば良い。また、SV Threshold 1, 2はそれぞれ調整量である。
FIG. 11 is a diagram for explaining an SV Rate calculation method according to the present embodiment. The horizontal axis indicates the SV value, and the vertical axis indicates the SV Rate value.
As shown in FIG. 11, the SV reliability can be obtained by linear interpolation according to SV. That is, SV Rate is calculated by the equation (7). Here, the set sensitivity SV of the imaging device 10 when an actual captured image is captured may be used as the SV. SV Threshold 1 and 2 are adjustment amounts.

以上のようにして、SV Rateを算出することができる。
(Green Rate)
最後に、前述の5つの指標を式(8)のように統合して、太陽光下の植物シーンらしさ(Green Rate)を算出することができる。
As described above, the SV Rate can be calculated.
(Green Rate)
Finally, the above-mentioned five indices are integrated as shown in Equation (8), and the plant scene likelihood (Green Rate) under sunlight can be calculated.

このように算出した太陽光下の植物シーンらしさが高ければ、撮影したシーンは太陽光下である確率が高いといえる。つまり、Green Rateは撮影シーンの光源が太陽光である信頼度ということができる。Green Rateが高いときにオートホワイトバランス処理において、光源が太陽光である確率を高めることで、失敗画像を減らすことができる。   If the plant scene under sunlight calculated in this way is high, it can be said that there is a high probability that the photographed scene is under sunlight. In other words, the Green Rate can be said to be the reliability that the light source of the shooting scene is sunlight. By increasing the probability that the light source is sunlight in the auto white balance process when the green rate is high, the number of failed images can be reduced.

具体的には、緑データ算出部124が算出した太陽光下の植物シーンらしさに基づいて、ホワイトバランスゲイン補正部125がホワイトバランスゲインRa、Ga、Baを補正し、ホワイトバランス制御部131が補正されたホワイトバランスゲインを用いて、RGB画像信号に対してホワイトバランス補正処理を実施するようにする。   Specifically, the white balance gain correction unit 125 corrects the white balance gains Ra, Ga, and Ba, and the white balance control unit 131 corrects them based on the plant scene likeness under sunlight calculated by the green data calculation unit 124. The white balance correction processing is performed on the RGB image signal using the white balance gain.

つぎに、本実施の形態に係る撮像方法の処理手順について説明する。ここでは、ホワイトバランスゲイン算出処理からホワイトバランス補正処理までに限定して説明する。
図12は、本実施の形態に係る撮像方法の処理手順を示すフローチャートである。
Next, a processing procedure of the imaging method according to the present embodiment will be described. Here, the description is limited to the process from the white balance gain calculation process to the white balance correction process.
FIG. 12 is a flowchart illustrating a processing procedure of the imaging method according to the present embodiment.

まず、ホワイトバランスゲイン算出部123が、輝度算出部121が実際の撮像画像を撮像した時の露光条件から算出した被写体の輝度と、色相算出部122が当該撮像画像から算出した被写体の画素の色相とに基づいて、当該撮像画像を撮像したときの被写体の光源を判別し、判別した光源に対応するホワイトバランスゲインRa、Ga、Baを選択する(ステップS110)。   First, the white balance gain calculation unit 123 calculates the luminance of the subject calculated from the exposure conditions when the luminance calculation unit 121 captures the actual captured image, and the hue of the subject pixel calculated by the hue calculation unit 122 from the captured image. Based on the above, the light source of the subject when the captured image is captured is determined, and the white balance gains Ra, Ga, Ba corresponding to the determined light source are selected (step S110).

続いて、緑データ算出部124が、実際の撮像画像において、純粋な緑領域に対応する画素の範囲Dにおける画素の出現カウント(Green Count)を算出し、Green Count Rateを算出する(ステップS120)。
また、緑データ算出部124が、実際の撮像画像において、太陽光下の植物に対応する画素が分布する範囲Aにおける画素のx,y方向の分散(Green Variance X,Y)を算出し、Green Variance Rate X,Yを算出する(ステップS130)。
Subsequently, the green data calculation unit 124 calculates the appearance count (Green Count) of the pixel in the pixel range D corresponding to the pure green region in the actual captured image, and calculates the Green Count Rate (Step S120). .
In addition, the green data calculation unit 124 calculates the variance (Green Variance X, Y) of the pixels in the x and y directions in the range A in which pixels corresponding to plants under sunlight are distributed in the actual captured image. Variance Rate X, Y is calculated (step S130).

また、緑データ算出部124が、輝度算出部121が実際の撮像画像を撮像した時の露光条件から算出した被写体の輝度BVに基づいて、BV Rateを算出する(ステップS140)。
また、緑データ算出部124が、実際の撮像画像を撮像したときの撮像装置10の設定感度SVに基づいて、SV Rateを算出する(ステップS150)。
ステップS110〜ステップS150は、順不同でかまわない。
Further, the green data calculation unit 124 calculates the BV Rate based on the luminance BV of the subject calculated from the exposure condition when the luminance calculation unit 121 captures an actual captured image (step S140).
Further, the green data calculation unit 124 calculates the SV rate based on the set sensitivity SV of the imaging device 10 when an actual captured image is captured (step S150).
Steps S110 to S150 may be in any order.

続いて、緑データ算出部124が、ステップS110〜ステップS150で算出した5つの指標Green Count Rate、Green Variance Rate X,Y、BV Rate、SV Rateに基づいて、太陽光下の植物シーンらしさ(Green Rate)を算出する(ステップS160)。
続いて、緑データ算出部124が算出した太陽光下の植物シーンらしさに基づいて、ホワイトバランスゲイン補正部125がホワイトバランスゲインRa、Ga、Baを補正する。もちろん、ホワイトバランスゲイン補正部125は太陽光下の植物シーンらしさが高いときには、ホワイトバランスゲインRa、Ga、Baを補正しない(ステップS170)。
Subsequently, based on the five indicators Green Count Rate, Green Variance Rate X, Y, BV Rate, and SV Rate calculated by the green data calculation unit 124 in steps S110 to S150, the likelihood of a plant scene under sunlight (Green Rate) is calculated (step S160).
Subsequently, the white balance gain correction unit 125 corrects the white balance gains Ra, Ga, and Ba based on the plant scene likeness under sunlight calculated by the green data calculation unit 124. Of course, the white balance gain correction unit 125 does not correct the white balance gains Ra, Ga, Ba when the plant scene under sunlight is high (step S170).

続いて、ホワイトバランスゲイン補正部125が補正した、または、補正しなかったホワイトバランスゲインRa、Ga、Baを用いて、ホワイトバランス制御部131がRGB画像信号に対してホワイトバランス補正処理を実施する(ステップS180)。   Subsequently, the white balance control unit 131 performs white balance correction processing on the RGB image signal using the white balance gains Ra, Ga, and Ba that are corrected or not corrected by the white balance gain correction unit 125. (Step S180).

このように、本実施の形態に係る撮像装置及び撮像方法により、撮影シーンの分散を使用することで画像全体が太陽光下の植物であっても光源が太陽光である信頼度を算出できることができ、オートホワイトバランス処理において、従来判定が難しく失敗画像となっていた日陰の植物シーンなどでの失敗を減らすことができる。   As described above, the image capturing apparatus and the image capturing method according to the present embodiment can calculate the reliability that the light source is sunlight even if the entire image is a plant under sunlight by using the variance of the shooting scene. In the auto white balance processing, it is possible to reduce failures in a shaded plant scene that has been difficult to determine in the past and has become a failed image.

なお、本実施の形態に係る撮像装置または撮像方法では、上述したようにホワイトバランス設定がオートモードに設定されているときに光源が太陽光である確率を高めても良いし、ホワイトバランス設定がマニュアルモードに設定されているときにモニター画面に緑シーンらしさを表示して、ユーザにホワイトバランスを調整させても良い。   In the imaging apparatus or imaging method according to the present embodiment, the probability that the light source is sunlight may be increased when the white balance setting is set to the auto mode as described above, or the white balance setting may be increased. When the manual mode is set, a green scene-likeness may be displayed on the monitor screen to allow the user to adjust the white balance.

また、本実施の形態に係る撮像装置または撮像方法では、輝度算出部121、色相算出部122をホワイトバランスゲイン算出部123の内部に設けても良く、また、オートホワイトバランス処理部106の外部に設けても良い。   In the imaging apparatus or imaging method according to the present embodiment, the luminance calculation unit 121 and the hue calculation unit 122 may be provided inside the white balance gain calculation unit 123, and may be provided outside the auto white balance processing unit 106. It may be provided.

また、本実施の形態に係る撮像装置または撮像方法では、図4に示した色空間座標系において太陽光下の植物に対応する画素が分布する範囲Aと蛍光灯下の灰色被写体に対応する画素が分布する範囲とが重なる範囲Bが小さいときは、純粋な緑領域に対応する画素の範囲における画素の出現カウント(Green Count)として、太陽光下の植物に対応する画素が分布する範囲A(Green Gate)における画素の出現カウント(Green Gate Count)をそのまま用いても良い。   In the imaging apparatus or imaging method according to the present embodiment, the range A in which pixels corresponding to plants under sunlight are distributed in the color space coordinate system shown in FIG. 4 and the pixels corresponding to gray subjects under fluorescent lamps. When the range B that overlaps the range in which the pixel distribution is small is small, the pixel appearance count (Green Count) in the pixel range corresponding to the pure green region is the range A (the pixel A corresponding to the plant under sunlight is distributed) The pixel appearance count (Green Gate Count) in the Green Gate may be used as it is.

また、本実施の形態に係る撮像装置または撮像方法では、画素のx,y方向の分散(Green Variance)を評価するときの色空間座標系における範囲として、図5に示した純粋な緑領域に対応する画素の範囲D、すなわち、太陽光下の植物に対応する画素が分布する範囲Aから蛍光灯下の灰色被写体に対応する画素が分布する範囲Bを除いた範囲Dを用いても良い。   Further, in the imaging apparatus or imaging method according to the present embodiment, the pure green region shown in FIG. 5 is used as the range in the color space coordinate system when evaluating the variance (Green Variance) of the pixels in the x and y directions. A corresponding pixel range D, that is, a range D in which pixels corresponding to gray objects under fluorescent lamps are distributed from a range A in which pixels corresponding to plants under sunlight are distributed may be used.

以上説明したように、本実施の形態に係る撮像装置10は、撮像画像を撮像した時の露光条件から被写体の輝度を算出する輝度算出手段121と、撮像画像から被写体の各画素の色相を算出する色相算出手段122と、撮像画像に対するホワイトバランスゲインを算出するホワイトバランスゲイン算出手段123と、被写体の緑シーンらしさを示す緑データを算出する緑データ算出手段124と、緑データに基づいて、ホワイトバランスゲインを補正するホワイトバランスゲイン補正手段125とを備え、緑データ算出手段124は、色空間座標系において、太陽光下の植物に対応する画素が分布する範囲Aを算出し、算出した色相が範囲A内に存在する画素の画素数及び画素分散値を算出し、画素数、画素分散値、輝度及び撮像画像の撮影感度に基づいて、緑データを算出するものである。   As described above, the imaging apparatus 10 according to the present embodiment calculates the luminance of the subject from the exposure condition when the captured image is captured, and calculates the hue of each pixel of the subject from the captured image. Based on the green data, the hue calculating unit 122 for performing the calculation, the white balance gain calculating unit 123 for calculating the white balance gain for the captured image, the green data calculating unit 124 for calculating the green data indicating the green scene likeness of the subject, and the white data. A white balance gain correcting unit 125 that corrects the balance gain, and the green data calculating unit 124 calculates a range A in which pixels corresponding to plants under sunlight are distributed in the color space coordinate system, and the calculated hue is The number of pixels and the pixel variance value of the pixels existing in the range A are calculated, and the number of pixels, the pixel variance value, the luminance and the captured image are captured Based on the time, and calculates the green data.

また、本実施の形態に係る撮像装置10は、ホワイトバランスゲイン算出手段123が撮像画像に基づいて被写体の光源を判別し、判別した光源に対応するホワイトバランスゲインを算出し、ホワイトバランスゲイン補正手段125が、撮像画像の緑シーンらしさが高いときに、判別した光源が太陽光である確率を高めることが好ましい。   In the imaging apparatus 10 according to the present embodiment, the white balance gain calculating unit 123 determines the light source of the subject based on the captured image, calculates the white balance gain corresponding to the determined light source, and the white balance gain correcting unit. It is preferable to increase the probability that the discriminated light source is sunlight when the captured image has a high green scene likelihood.

また、本実施の形態に係る撮像装置10は、緑データ算出手段124が画素数または画素分散値を算出するときに、太陽光下の植物に対応する画素が分布する範囲Aに代えて、太陽光下の植物に対応する画素が分布する範囲Aから蛍光灯下の灰色被写体に対応する画素が分布する範囲Bを除いた範囲Dを用いることが好ましい。   In addition, when the green data calculating unit 124 calculates the number of pixels or the pixel dispersion value, the imaging apparatus 10 according to the present embodiment replaces the range A in which pixels corresponding to plants under sunlight are distributed with the sun. It is preferable to use a range D obtained by excluding a range B in which pixels corresponding to gray objects under fluorescent lamps are distributed from a range A in which pixels corresponding to plants under light are distributed.

また、本実施の形態に係る撮像装置10は、緑データ算出手段124が、輝度の所定の値の範囲において、輝度が大きいほど緑データを大きくすることが好ましい。
また、本実施の形態に係る撮像装置10は、緑データ算出手段124が、撮影感度の所定の値の範囲において、撮影感度が大きいほど緑データを小さくすることが好ましい。
Moreover, in the imaging apparatus 10 according to the present embodiment, it is preferable that the green data calculation unit 124 increases the green data as the luminance increases within a predetermined luminance range.
In the imaging apparatus 10 according to the present embodiment, it is preferable that the green data calculation unit 124 decreases the green data as the shooting sensitivity increases within a predetermined value range of the shooting sensitivity.

また、本実施の形態に係る撮像装置10は、緑データ算出手段124が、太陽光下の植物に対応する画素が分布する範囲Aを、撮像画像の撮影前に取得することが好ましい。   In the imaging apparatus 10 according to the present embodiment, it is preferable that the green data calculation unit 124 acquires the range A in which pixels corresponding to plants under sunlight are distributed before capturing a captured image.

また、本発明に係る撮像方法は、撮像画像を撮像した時の露光条件から被写体の輝度を算出するステップS110と、撮像画像から被写体の各画素の色相を算出するステップS110と、撮像画像に対するホワイトバランスゲインを算出するステップS110と、被写体の緑シーンらしさを示す緑データを算出するステップS120〜S160と、緑データに基づいて、ホワイトバランスゲインを補正するステップS170とを有し、緑データを算出するステップS120〜S160は、色空間座標系において、太陽光下の植物に対応する画素が分布する範囲Aを算出するステップと、算出した色相が範囲A内に存在する画素の画素数及び画素分散値を算出するステップS120、S130と、画素数、画素分散値、輝度及び撮像画像の撮影感度に基づいて、緑データを算出するステップS160とを有するものである。   Further, the imaging method according to the present invention includes a step S110 for calculating the luminance of the subject from the exposure condition when the captured image is captured, a step S110 for calculating the hue of each pixel of the subject from the captured image, and a white for the captured image. Step S110 for calculating the balance gain, Steps S120 to S160 for calculating the green data indicating the green scene likeness of the subject, and Step S170 for correcting the white balance gain based on the green data. Steps S120 to S160 include a step of calculating a range A in which pixels corresponding to plants under sunlight are distributed in the color space coordinate system, and the number of pixels and the pixel variance of the pixels in which the calculated hue exists in the range A. Steps S120 and S130 for calculating the value, the number of pixels, the pixel dispersion value, the luminance, and shooting of the captured image Based on the time, in which a step S160 of calculating the green data.

10 撮像装置
106 オートホワイトバランス処理部
107 後処理部
121 輝度算出部
122 色相算出部
123 ホワイトバランスゲイン算出部
124 緑データ算出部
125 ホワイトバランスゲイン補正部
131 ホワイトバランス制御部
DESCRIPTION OF SYMBOLS 10 Imaging device 106 Auto white balance processing part 107 Post-processing part 121 Luminance calculation part 122 Hue calculation part 123 White balance gain calculation part 124 Green data calculation part 125 White balance gain correction part 131 White balance control part

Claims (9)

撮像画像を撮像した時の露光条件から被写体の輝度を算出する輝度算出手段と、
前記撮像画像から前記被写体の各画素の色相を算出する色相算出手段と、
前記撮像画像に対するホワイトバランスゲインを算出するホワイトバランスゲイン算出手段と、
前記被写体の緑シーンらしさを示す緑データを算出する緑データ算出手段と、
前記緑データに基づいて、前記ホワイトバランスゲインを補正するホワイトバランスゲイン補正手段とを備え、
前記緑データ算出手段は、
色空間座標系において、太陽光下の植物に対応する画素が分布する範囲を算出し、
前記算出した色相が前記範囲内に存在する画素の画素数及び画素分散値を算出し、
前記画素数、前記画素分散値、前記輝度及び前記撮像画像の撮影感度に基づいて、前記緑データを算出する
撮像装置。
Luminance calculation means for calculating the luminance of the subject from the exposure conditions when the captured image was captured;
Hue calculation means for calculating the hue of each pixel of the subject from the captured image;
White balance gain calculating means for calculating a white balance gain for the captured image;
Green data calculating means for calculating green data indicating the likelihood of the subject's green scene;
White balance gain correction means for correcting the white balance gain based on the green data,
The green data calculating means includes
In the color space coordinate system, calculate the range where pixels corresponding to plants under sunlight are distributed,
Calculating the number of pixels and the pixel variance of the pixels where the calculated hue is within the range;
An imaging apparatus that calculates the green data based on the number of pixels, the pixel dispersion value, the luminance, and the photographing sensitivity of the captured image.
前記ホワイトバランスゲイン算出手段は、前記撮像画像に基づいて前記被写体の光源を判別し、前記判別した光源に対応する前記ホワイトバランスゲインを算出し、
前記ホワイトバランスゲイン補正手段は、前記撮像画像の前記緑シーンらしさが高いときに、前記判別した光源が太陽光である確率を高める
請求項1記載の撮像装置。
The white balance gain calculating means determines a light source of the subject based on the captured image, calculates the white balance gain corresponding to the determined light source,
The imaging apparatus according to claim 1, wherein the white balance gain correction unit increases the probability that the determined light source is sunlight when the captured image is likely to be a green scene.
前記緑データ算出手段が前記画素数または前記画素分散値を算出するときに、前記太陽光下の植物に対応する画素が分布する範囲に代えて、前記太陽光下の植物に対応する画素が分布する範囲から蛍光灯下の灰色被写体に対応する画素が分布する範囲を除いた範囲を用いる
請求項1または請求項2記載の撮像装置。
When the green data calculating means calculates the number of pixels or the pixel dispersion value, the pixels corresponding to the plants under sunlight are distributed instead of the range in which the pixels corresponding to the plants under sunlight are distributed. The imaging apparatus according to claim 1, wherein a range obtained by excluding a range in which pixels corresponding to a gray subject under a fluorescent lamp are distributed is used.
前記緑データ算出手段は、前記輝度の所定の値の範囲において、前記輝度が大きいほど前記緑データを大きくする
請求項1乃至請求項3のいずれか1項記載の撮像装置。
The imaging apparatus according to any one of claims 1 to 3, wherein the green data calculation unit increases the green data as the luminance increases within a predetermined value range of the luminance.
前記緑データ算出手段は、前記撮影感度の所定の値の範囲において、前記撮影感度が大きいほど前記緑データを小さくする
請求項1乃至請求項4のいずれか1項記載の撮像装置。
5. The imaging apparatus according to claim 1, wherein the green data calculation unit reduces the green data as the imaging sensitivity increases within a predetermined value range of the imaging sensitivity.
前記緑データ算出手段は、前記太陽光下の植物に対応する画素が分布する範囲を、前記撮像画像の撮影前に取得する
請求項1乃至請求項5のいずれか1項記載の撮像装置。
The imaging apparatus according to any one of claims 1 to 5, wherein the green data calculation unit acquires a range in which pixels corresponding to plants under sunlight are distributed before capturing the captured image.
撮像画像を撮像した時の露光条件から被写体の輝度を算出するステップと、
前記撮像画像から前記被写体の各画素の色相を算出するステップと、
前記撮像画像に対するホワイトバランスゲインを算出するステップと、
前記被写体の緑シーンらしさを示す緑データを算出するステップと、
前記緑データに基づいて、前記ホワイトバランスゲインを補正するステップとを有し、
前記緑データを算出するステップは、
色空間座標系において、太陽光下の植物に対応する画素が分布する範囲を算出するステップと、
前記算出した色相が前記範囲内に存在する画素の画素数及び画素分散値を算出するステップと、
前記画素数、前記画素分散値、前記輝度及び前記撮像画像の撮影感度に基づいて、前記緑データを算出するステップとを有する
撮像方法。
Calculating the luminance of the subject from the exposure conditions when the captured image was captured;
Calculating the hue of each pixel of the subject from the captured image;
Calculating a white balance gain for the captured image;
Calculating green data indicating the green scene likeness of the subject;
Correcting the white balance gain based on the green data,
The step of calculating the green data includes:
Calculating a range in which pixels corresponding to plants under sunlight are distributed in a color space coordinate system;
Calculating the number of pixels and the pixel dispersion value of pixels in which the calculated hue exists within the range;
Calculating the green data based on the number of pixels, the pixel dispersion value, the luminance, and the photographing sensitivity of the captured image.
コンピュータに、
撮像画像を撮像した時の露光条件から被写体の輝度を算出する手順と、
前記撮像画像から前記被写体の各画素の色相を算出する手順と、
前記撮像画像に対するホワイトバランスゲインを算出する手順と、
前記被写体の緑シーンらしさを示す緑データを算出する手順と、
前記緑データに基づいて、前記ホワイトバランスゲインを補正する手順とを実行させ、
前記緑データを算出する手順は、コンピュータに、
色空間座標系において、太陽光下の植物に対応する画素が分布する範囲を算出する手順と、
前記算出した色相が前記範囲内に存在する画素の画素数及び画素分散値を算出する手順と、
前記画素数、前記画素分散値、前記輝度及び前記撮像画像の撮影感度に基づいて、前記緑データを算出する手順とを実行させるための
プログラム。
On the computer,
A procedure for calculating the brightness of the subject from the exposure conditions when the captured image was captured;
A procedure for calculating the hue of each pixel of the subject from the captured image;
A procedure for calculating a white balance gain for the captured image;
Calculating green data indicating the green scene likeness of the subject;
A step of correcting the white balance gain based on the green data;
The procedure for calculating the green data is as follows.
In the color space coordinate system, a procedure for calculating a range in which pixels corresponding to plants under sunlight are distributed;
A procedure for calculating the number of pixels and the pixel dispersion value of pixels in which the calculated hue is within the range;
A program for executing the procedure of calculating the green data based on the number of pixels, the pixel dispersion value, the luminance, and the photographing sensitivity of the captured image.
請求項8記載のプログラムを記録したコンピュータ読み取り可能な記録媒体。   A computer-readable recording medium on which the program according to claim 8 is recorded.
JP2014231663A 2014-11-14 2014-11-14 Imaging device, imaging method, program and storage medium Pending JP2016096461A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014231663A JP2016096461A (en) 2014-11-14 2014-11-14 Imaging device, imaging method, program and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014231663A JP2016096461A (en) 2014-11-14 2014-11-14 Imaging device, imaging method, program and storage medium

Publications (1)

Publication Number Publication Date
JP2016096461A true JP2016096461A (en) 2016-05-26

Family

ID=56071497

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014231663A Pending JP2016096461A (en) 2014-11-14 2014-11-14 Imaging device, imaging method, program and storage medium

Country Status (1)

Country Link
JP (1) JP2016096461A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020106206A1 (en) * 2001-01-15 2002-08-08 Nikon Corporation Image-capturing device
JP2004297650A (en) * 2003-03-28 2004-10-21 Fuji Photo Film Co Ltd Control method of white balance and digital camera
JP2009147440A (en) * 2007-12-11 2009-07-02 Olympus Corp White balance adjustment device and white balance adjustment method
JP2012165147A (en) * 2011-02-04 2012-08-30 Canon Inc Image processing apparatus and control method of the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020106206A1 (en) * 2001-01-15 2002-08-08 Nikon Corporation Image-capturing device
JP2004297650A (en) * 2003-03-28 2004-10-21 Fuji Photo Film Co Ltd Control method of white balance and digital camera
JP2009147440A (en) * 2007-12-11 2009-07-02 Olympus Corp White balance adjustment device and white balance adjustment method
JP2012165147A (en) * 2011-02-04 2012-08-30 Canon Inc Image processing apparatus and control method of the same

Similar Documents

Publication Publication Date Title
US20200043225A1 (en) Image processing apparatus and control method thereof
JP6445844B2 (en) Imaging device and method performed in imaging device
US9813634B2 (en) Image processing apparatus and method
US9129188B2 (en) Image processing apparatus and control method thereof
US10223770B2 (en) Image processing apparatus, image processing method, and storage medium
JP2012124682A5 (en)
JP2008072575A (en) Image processor, method, and computer program
US11893716B2 (en) Image processing apparatus and image processing method, and image capturing apparatus
JP5848662B2 (en) Image processing apparatus and control method thereof
KR20170030418A (en) Imaging processing device and Imaging processing method
CN113691795A (en) Image processing apparatus, image processing method, and storage medium
US10863103B2 (en) Setting apparatus, setting method, and storage medium
JP6718253B2 (en) Image processing apparatus and image processing method
JP6937603B2 (en) Image processing equipment and its control methods, programs, and storage media
US10021314B2 (en) Image processing apparatus, image capturing apparatus, method of controlling the same, and storage medium for changing shading using a virtual light source
JP6808482B2 (en) Image processing equipment, image processing methods, and programs
JP2016096461A (en) Imaging device, imaging method, program and storage medium
JP6561479B2 (en) Imaging device capable of color shading correction
JP2016213717A (en) Image processing apparatus, image processing method, program, and storage medium
JP2013115571A (en) Information processing apparatus
JP2016024482A (en) Image processing device, image processing method and image processing program
US11228724B2 (en) Image processing apparatus, image processing method, and computer-readable recording medium for interpolating pixel value of determined defective pixel to be corrected
JP2017123069A (en) Image processing apparatus and method, and imaging device
JP2017182668A (en) Data processor, imaging device, and data processing method
JP2016096474A (en) Imaging device, imaging method, program and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170904

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180814

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180925

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20190416