JP5915242B2 - Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer - Google Patents

Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer Download PDF

Info

Publication number
JP5915242B2
JP5915242B2 JP2012035077A JP2012035077A JP5915242B2 JP 5915242 B2 JP5915242 B2 JP 5915242B2 JP 2012035077 A JP2012035077 A JP 2012035077A JP 2012035077 A JP2012035077 A JP 2012035077A JP 5915242 B2 JP5915242 B2 JP 5915242B2
Authority
JP
Japan
Prior art keywords
white balance
area
balance evaluation
evaluation value
white
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
JP2012035077A
Other languages
Japanese (ja)
Other versions
JP2013172308A (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.)
Ricoh Co Ltd
Original Assignee
Ricoh 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2012035077A priority Critical patent/JP5915242B2/en
Publication of JP2013172308A publication Critical patent/JP2013172308A/en
Application granted granted Critical
Publication of JP5915242B2 publication Critical patent/JP5915242B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像処理装置、画像処理方法、画像処理プログラムおよび該画像処理プログラムをコンピュータに実行可能に記録した記録媒体に関する。   The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a recording medium on which the image processing program is recorded so as to be executable on a computer.

CCD(Charge Coupled Device:電荷結合素子)イメージセンサ等を撮像素子として用いた撮像装置等で撮影されるデジタル画像に関し、光源の色温度によるCCDの出力信号の色変化を、人間の目に不自然に感じさせないように補正するホワイトバランス(White Balance)補正は、必須の機能の一つである。   Regarding a digital image taken by an imaging device using a CCD (Charge Coupled Device) image sensor or the like as an imaging device, the color change of the output signal of the CCD due to the color temperature of the light source is unnatural to human eyes. White balance correction that corrects the image so that it does not feel is an essential function.

ホワイトバランス補正では、屋外(晴天)、曇天(日陰)、白熱灯、蛍光灯等の撮影シーン(すなわち、光源)を判断して、撮影シーン(単に、シーンともいう)に応じた最適なホワイトバランスゲインを決定し、ホワイトバランス補正を実行する技術が知られているが、例えば、日陰(曇天)で緑のあるシーンと室内での蛍光灯下のシーンとでは明るさ(照度)及び色の分布が似ているため識別が困難であることが知られている。   In white balance correction, the optimum white balance according to the shooting scene (simply referred to as the scene) is determined by judging the shooting scene (that is, the light source) such as outdoors (sunny), cloudy (shade), incandescent, and fluorescent. A technique for determining the gain and executing white balance correction is known. For example, brightness (illuminance) and color distribution in a shaded (cloudy) green scene and an indoor fluorescent lamp scene Are known to be difficult to identify.

そのため、撮影シーンを、屋外の緑があるシーンについて蛍光灯下のシーンと誤って判定し、屋外の緑があるシーンについてホワイトバランス補正を行った結果、緑を白く補正しようして全体的に画像がマゼンタになってしまう場合があった。   Therefore, the shooting scene is mistakenly determined as a scene under fluorescent light for a scene with green outdoors, and white balance correction is performed for a scene with green outdoors. Sometimes became magenta.

このように、従来のホワイトバランス補正技術では、屋外の緑があるシーン(屋外)と蛍光灯下のシーン(室内)との判定(屋外判定)に失敗してしまい、その判定に基づいて行われるホワイトバランス補正を精度よく行うことができない場合があった。   As described above, in the conventional white balance correction technique, determination (outdoor determination) between a scene with outdoor green (outdoor) and a scene under the fluorescent light (indoor) fails, and the determination is performed based on the determination. In some cases, white balance correction cannot be performed with high accuracy.

このような問題に対し、例えば、特許文献1には、被写体の模様に関する情報(周波数成分やエッジ量成分)に基づいて光源を推定して、ホワイトバランス補正を実行するホワイトバランス補正装置が開示されている。   To deal with such a problem, for example, Patent Document 1 discloses a white balance correction device that estimates a light source based on information (frequency component and edge amount component) on a subject pattern and performs white balance correction. ing.

また、特許文献2には、照度情報や色温度情報などの特徴情報に基づいて、多次元空間における識別境界を規定し、該識別境界により屋外判定して、判定結果に応じたホワイトバランス補正を実行する画像処理装置が開示されている。   Further, Patent Document 2 defines an identification boundary in a multidimensional space based on feature information such as illuminance information and color temperature information, performs outdoor determination based on the identification boundary, and performs white balance correction according to the determination result. An image processing apparatus to be executed is disclosed.

また、特許文献3には、色相データの分布から最小自乗法により回帰直線を求め、回帰直線の傾きに基づいて、緑シーンであるかどうかを判断して、ホワイトバランス補正を行うデジタルカメラが開示されている。   Patent Document 3 discloses a digital camera that obtains a regression line from the distribution of hue data by the least square method, determines whether the scene is green based on the slope of the regression line, and performs white balance correction. Has been.

しかしながら、上記特許文献に記載のように、ホワイトバランス補正を行うためにエッジ量成分などを検出方式では、処理量が増大し、処理時間の増加、高コスト化(CPU性能、メモリ容量の増大などによる)となるという問題がある。   However, as described in the above patent document, the detection method of the edge amount component or the like for performing the white balance correction increases the processing amount, increases the processing time, and increases the cost (increasing CPU performance, memory capacity, etc.) )).

また、特徴情報に基づく識別境界や、色相データの分布に基づく最小自乗法による回帰直線によって、一律に屋外の緑があるシーン(屋外)と蛍光灯下のシーン(室内)との屋外判定を行うことは、被写体によっては難しく、屋外判定を正確に行い、適切なホワイトバランス補正を行うことが困難な場合があった。   In addition, the outdoor boundary between a scene with outdoor greenery (outdoor) and a scene under fluorescent light (indoors) is uniformly determined based on an identification boundary based on feature information and a regression line based on a least-squares method based on the distribution of hue data. This is difficult depending on the subject, and it may be difficult to accurately perform outdoor determination and perform appropriate white balance correction.

そこで本発明は、処理負荷が少なく、高精度で安定した、撮影シーンの屋外判定を行うことができる画像処理装置、画像処理方法、画像処理プログラムおよび該画像処理プログラムをコンピュータに実行可能に記録した記録媒体を提供することを目的とする。   Therefore, the present invention records an image processing apparatus, an image processing method, an image processing program, and an image processing program that can perform outdoor determination of a shooting scene with low processing load, high accuracy, and stability in an executable manner on a computer. An object is to provide a recording medium.

かかる目的を達成するため、本発明に係る画像処理装置は、デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲外のエリアを含む第1のエリアを予め設定する第1のエリア設定手段と、デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲に相当する第2のエリアを予め複数設定する第2のエリア設定手段と、デジタル画像からホワイトバランス評価値を取得するホワイトバランス評価値取得手段と、前記ホワイトバランス評価値取得手段により取得したホワイトバランス評価値が白抽出範囲内か否かを判定し、前記白抽出範囲内であると判定されたホワイトバランス評価値を基に第1のホワイトバランス補正係数を算出する第1のホワイトバランス補正係数算出手段と、前記ホワイトバランス評価値取得手段により取得したホワイトバランス評価値が前記第1のエリアに分布するか否かを判定し、前記第1のエリアに分布するホワイトバランス評価値の個数を取得する第1のエリア判定手段と、前記ホワイトバランス評価値が複数の前記第2のエリアのいずれかに分布するか否かを判定し、前記複数の第2のエリアの各第2のエリアに分布するホワイトバランス評価値の個数をそれぞれ取得する第2のエリア判定手段と、前記第1のエリアと前記複数の第2のエリアのうち、前記第1のエリア判定手段と前記第2のエリア判定手段によって取得されたホワイトバランス評価値の個数が多い上位複数のエリアを求める上位エリア判定手段と、前記上位エリア判定手段により求められた上位複数のエリアに分布するホワイトバランス評価値と、前記第1のホワイトバランス補正係数を基に、第2のホワイトバランス補正係数を算出する第2のホワイトバランス補正係数算出手段と、を備え、前記上位エリア判定手段により求められた上位複数のエリアの各エリアに分布するホワイトバランス評価値の個数を基に、前記デジタル画像が屋外のシーンに対応するか否かに関する屋外情報を求めるものである。 In order to achieve this object, the image processing apparatus according to the present invention preliminarily includes a first area including an area outside the white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed. First area setting means for setting, and second area setting for presetting a plurality of second areas corresponding to white extraction ranges in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed A white balance evaluation value acquisition means for acquiring a white balance evaluation value from the digital image; and determining whether the white balance evaluation value acquired by the white balance evaluation value acquisition means is within a white extraction range; First white balance correction for calculating a first white balance correction coefficient based on the white balance evaluation value determined to be within the range The number calculating means, the number of the white white balance evaluation value acquired by the balance evaluation value acquisition means determines whether or not distributed to the first area, the white balance evaluation value distributed to the first area First area determination means to be acquired and whether or not the white balance evaluation value is distributed in any of the plurality of second areas, and each second area of the plurality of second areas is determined. Second area determination means for obtaining the number of distributed white balance evaluation values, and the first area determination means and the second area determination among the first area and the plurality of second areas. an upper area determining means for determining an area number is often higher multiple of the obtained white balance evaluation value by means, a plurality of upper determined by the upper area determining means A white balance evaluation value distributed to the rear, based on the first white balance correction coefficient, and a second white balance correction coefficient calculation means for calculating a second white balance correction coefficient, wherein the upper area determining On the basis of the number of white balance evaluation values distributed in each of the upper plurality of areas obtained by the means, outdoor information relating to whether or not the digital image corresponds to an outdoor scene is obtained.

本発明によれば、処理負荷が少なく、高精度で安定した、撮影シーンの屋外判定を行うことができる。   According to the present invention, it is possible to perform outdoor determination of a shooting scene with a low processing load and high accuracy and stability.

本発明に係る画像処理装置の一実施形態であるデジタルカメラの外観図の一例であって、(a)は上面図、(b)は正面図、(c)は裏面図を示す。BRIEF DESCRIPTION OF THE DRAWINGS It is an example of the external view of the digital camera which is one Embodiment of the image processing apparatus which concerns on this invention, (a) is a top view, (b) is a front view, (c) shows a back view. デジタルカメラの機能ブロック図の一例である。It is an example of the functional block diagram of a digital camera. ホワイトバランス制御に係るCPUの制御ブロックの模式図である。It is a schematic diagram of the control block of CPU which concerns on white balance control. ホワイトバランス処理のフローチャート(第1の実施形態)である。It is a flowchart (1st Embodiment) of a white balance process. G/Rをx軸、G/Bをy軸とする2次元の色座標における白検出枠、緑評価値判定の説明図である。It is explanatory drawing of the white detection frame and green evaluation value determination in the two-dimensional color coordinate which makes G / R x-axis and G / B is y-axis. G/Rをx軸、G/Bをy軸とする2次元の色座標における蛍光灯評価値判定の説明図である。It is explanatory drawing of the fluorescent lamp evaluation value determination in the two-dimensional color coordinate which makes G / R x-axis and G / B is y-axis. ホワイトバランス処理のフローチャート(第2の実施形態)である。It is a flowchart (2nd Embodiment) of a white balance process.

以下、本発明に係る構成を図1から図7に示す実施の形態に基づいて詳細に説明する。   Hereinafter, a configuration according to the present invention will be described in detail based on the embodiment shown in FIGS.

[第1の実施形態]
本実施形態に係る画像処理装置は、デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲外のエリアを含む第1のエリア(緑エリア)を予め設定する第1のエリア設定手段(緑エリア設定手段211)と、デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲に相当する第2のエリア(蛍光灯エリア)を予め複数設定する第2のエリア設定手段(蛍光灯エリア設定手段212)と、デジタル画像からホワイトバランス評価値を取得するホワイトバランス評価値取得手段(ホワイトバランス評価値取得手段203)と、ホワイトバランス評価値取得手段により取得したホワイトバランス評価値が第1のエリアに分布するか否かを判定し、第1のエリアに分布するホワイトバランス評価値の個数を取得する第1のエリア判定手段(緑評価値判定手段206)と、ホワイトバランス評価値が複数の第2のエリアのいずれかに分布するか否かを判定し、複数の第2のエリアの各第2のエリアに分布するホワイトバランス評価値の個数をそれぞれ取得する第2のエリア判定手段(蛍光灯評価値判定手段207)と、第1のエリアと複数の第2のエリアのうち、第1のエリア判定手段と第2のエリア判定手段によって取得されたホワイトバランス評価値の個数が多い上位複数のエリアを求める上位エリア判定手段(上位エリア判定手段208)と、を備え、上位エリア判定手段により求められた上位複数のエリアの各エリアに分布するホワイトバランス評価値の個数を基に、デジタル画像が屋外のシーンに対応するか否かに関する屋外情報を求めるものである(屋外加重率算出手段209)。尚、括弧内は、実施形態での文言との対応を示している。
[First Embodiment]
The image processing apparatus according to the present embodiment presets a first area (green area) including an area outside the white extraction range in which white balance evaluation values corresponding to an outdoor green subject on a digital image are distributed. A first area setting unit (green area setting unit 211) and a second area (fluorescent lamp area) corresponding to a white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed. Second area setting means (fluorescent lamp area setting means 212) for presetting a plurality of values, white balance evaluation value acquisition means (white balance evaluation value acquisition means 203) for acquiring a white balance evaluation value from a digital image, white balance It is determined whether the white balance evaluation value acquired by the evaluation value acquisition means is distributed in the first area, and is distributed in the first area. First area determining means (green evaluation value determining means 206) for acquiring the number of white balance evaluation values, determining whether the white balance evaluation values are distributed in any of a plurality of second areas, Second area determination means (fluorescent lamp evaluation value determination means 207) for respectively acquiring the number of white balance evaluation values distributed in each second area of the second area, the first area, and a plurality of second areas An upper area determining means (upper area determining means 208) for obtaining a plurality of upper areas having a large number of white balance evaluation values acquired by the first area determining means and the second area determining means, The digital image corresponds to an outdoor scene based on the number of white balance evaluation values distributed in each of the upper multiple areas obtained by the upper area determination means And requests the outdoor information about whether Luke (outside weight rate calculation unit 209). Note that the parentheses indicate correspondence with the words in the embodiment.

なお、本実施形態では、画像処理装置として、撮像装置(デジタルカメラ)を例に説明するが、本発明に係る画像処理装置はこれに限定されるものではなく、携帯電話、パーソナルコンピュータ、プリンタなどの画像形成装置等の電子機器に適用することができる。すなわち、デジタル画像(RAW−RGBデータ)を入力して、後述するホワイトバランス補正制御を実行できる電子機器で有れば良い。   In the present embodiment, an imaging apparatus (digital camera) will be described as an example of an image processing apparatus. However, the image processing apparatus according to the present invention is not limited to this, and a mobile phone, a personal computer, a printer, and the like. The present invention can be applied to electronic devices such as image forming apparatuses. That is, it is only necessary to be an electronic device that can input a digital image (RAW-RGB data) and execute white balance correction control to be described later.

(撮像装置の構成)
図1はデジタルカメラの外観図を示し、(a)はカメラ上面図、(b)はカメラ正面図、(c)はカメラ裏面図を示している。
(Configuration of imaging device)
FIG. 1 shows an external view of a digital camera, (a) shows a top view of the camera, (b) shows a front view of the camera, and (c) shows a rear view of the camera.

図1(a)に示すように、デジタルカメラは、上面に、サブLCD1と、レリーズシャッター2(SW1)と、モードダイヤル4(SW2)とを有する。   As shown in FIG. 1A, the digital camera has a sub LCD 1, a release shutter 2 (SW1), and a mode dial 4 (SW2) on the upper surface.

また、図1(b)に示すように、デジタルカメラは、正面に、ストロボ発光部3と、測距ユニット5と、リモコン受光部6と、レンズユニット7と、光学ファインダ(正面)11とを有する。また、メモリカードスロットル23は、SDカード等のメモリカード34を挿入するスロットルを示し、カメラ側面に設けられる。   As shown in FIG. 1B, the digital camera has a strobe light emitting unit 3, a distance measuring unit 5, a remote control light receiving unit 6, a lens unit 7, and an optical viewfinder (front) 11 on the front. Have. A memory card throttle 23 indicates a throttle for inserting a memory card 34 such as an SD card, and is provided on the side of the camera.

また、図1(c)に示すように、デジタルカメラは、裏面に、AFLED(オートフォーカスLED)8と、ストロボLED9と、LCDモニタ(表示手段)10と、光学ファインダ(裏面)11と、ズームボタン(ズームレバー)TELE12(SW4)と、電源スイッチ13(SW13)と、ズームボタン(ズームレバー)WIDE14(SW3)と、セルフタイマ/削除スイッチ15(SW6)とを有する。   As shown in FIG. 1C, the digital camera has an AFLED (autofocus LED) 8, a strobe LED 9, an LCD monitor (display means) 10, an optical viewfinder (back surface) 11, and a zoom on the back surface. It has a button (zoom lever) TELE12 (SW4), a power switch 13 (SW13), a zoom button (zoom lever) WIDE14 (SW3), and a self-timer / deletion switch 15 (SW6).

さらに、メニュースイッチ16(SW5)と、OKスイッチ17(SW12)と、左/画像確認スイッチ18(SW11)と、下/マクロスイッチ19(SW10)と、上/ストロボスイッチ20(SW7)と、右スイッチ21(SW8)と、画像を表示するディスプレイスイッチ22(SW9)とを有する。   Furthermore, the menu switch 16 (SW5), the OK switch 17 (SW12), the left / image confirmation switch 18 (SW11), the down / macro switch 19 (SW10), the up / strobe switch 20 (SW7), the right A switch 21 (SW8) and a display switch 22 (SW9) for displaying an image are provided.

図2は図1に示したデジタルカメラの制御系の機能ブロック図を示している。以下、デジタルカメラ内部のシステム構成について説明する。   FIG. 2 is a functional block diagram of a control system of the digital camera shown in FIG. The system configuration inside the digital camera will be described below.

図2に示すように、このデジタルカメラ内には、レンズユニット7に設置した撮影レンズ系を通して入射される被写体画像が受光面上に結像する固体撮像素子としてのCCD121、CCD121から出力される電気信号(アナログRGB画像信号)をデジタル信号に処理するフロントエンドIC(F/E)120、フロントエンドIC(F/E)120から出力されるデジタル信号を処理する信号処理IC110、データを一時的に格納するSDRAM33、制御プログラム等が記憶されたROM30、モータドライバ32等が設けられている。   As shown in FIG. 2, in this digital camera, a CCD 121 serving as a solid-state imaging device, on which a subject image incident through a photographing lens system installed in the lens unit 7 forms an image on a light receiving surface, is output from the CCD 121. Front-end IC (F / E) 120 that processes signals (analog RGB image signals) into digital signals, signal-processing IC 110 that processes digital signals output from front-end IC (F / E) 120, and data temporarily An SDRAM 33 to be stored, a ROM 30 in which a control program and the like are stored, a motor driver 32 and the like are provided.

レンズユニット7は、ズームレンズ、フォーカスレンズおよびメカニカルシャッタ等からなり、モータドライバ32によって駆動される。モータドライバ32は、信号処理IC110の内部に含まれるマイクロコンピュータ(CPU、制御部)111によって制御される。   The lens unit 7 includes a zoom lens, a focus lens, a mechanical shutter, and the like, and is driven by a motor driver 32. The motor driver 32 is controlled by a microcomputer (CPU, control unit) 111 included in the signal processing IC 110.

CCD121は、光学画像を光電変換するための固体撮像素子であって、CCDを構成する複数の画素上に色分解フィルタとしてのRGB原色フィルタが配置されており、RGB3原色に対応した電気信号(アナログRGB画像信号)が出力される。   The CCD 121 is a solid-state imaging device for photoelectrically converting an optical image, and an RGB primary color filter as a color separation filter is arranged on a plurality of pixels constituting the CCD, and an electrical signal (analogue) corresponding to RGB three primary colors. RGB image signal) is output.

フロントエンドIC(F/E)120は、CCD出力電気信号(アナログ画像データ)についてサンプリングホールド(相関二重サンプリング)を行うCDS122、このサンプリングされたデータのゲインを調整するAGC(Auto Gain Control)123、デジタル信号変換を行うA/D変換機(A/D)124、及びCCDI/F112より垂直同期信号(VD)、水平同期信号(HD)を供給されCCD121とF/E120との駆動タイミング信号を発生するTG(タイミングジェネレータ:制御信号発生器)125を有する。   A front-end IC (F / E) 120 is a CDS 122 that performs sampling hold (correlated double sampling) on the CCD output electrical signal (analog image data), and an AGC (Auto Gain Control) 123 that adjusts the gain of the sampled data. A vertical synchronization signal (VD) and a horizontal synchronization signal (HD) are supplied from an A / D converter (A / D) 124 that performs digital signal conversion and a CCD I / F 112, and drive timing signals for the CCD 121 and the F / E 120 are supplied. A TG (timing generator: control signal generator) 125 is generated.

発振器(クロックジェネレータ)は、CPU111を含む信号処理IC110のシステムクロックとTG125等にクロックを供給している。TG125は発振器のクロックを受けて、ピクセル同期をするためのピクセルクロックを信号処理IC110内のCCDI/F112に供給する。   The oscillator (clock generator) supplies a clock to the system clock of the signal processing IC 110 including the CPU 111, the TG 125, and the like. The TG 125 receives the oscillator clock and supplies a pixel clock for pixel synchronization to the CCD I / F 112 in the signal processing IC 110.

F/E120から信号処理IC110に入力されたデジタル信号は、CCDI/F112を介して、メモリコントローラ115によりSDRAM33にRGBデータ(RAW−RGB)として一時保管される。   A digital signal input from the F / E 120 to the signal processing IC 110 is temporarily stored as RGB data (RAW-RGB) in the SDRAM 33 by the memory controller 115 via the CCD I / F 112.

信号処理IC110は、システム制御を行うCPU111、CCDI/F112、リサイズ処理部113、メモリコントローラ115、表示出力制御部116、圧縮伸張部117、メディアI/F部118、YUV変換部119等から構成されている。   The signal processing IC 110 includes a CPU 111 that performs system control, a CCD I / F 112, a resizing processing unit 113, a memory controller 115, a display output control unit 116, a compression / expansion unit 117, a media I / F unit 118, a YUV conversion unit 119, and the like. ing.

CCDI/F112は、垂直同期信号(VD)、水平同期信号(HD)の出力を行い、その同期信号に合わせてA/D124から入力されるデジタル(RGB)信号を取り込んで、メモリコントローラ115経由でSDRAM33にRGBデータの書き込みを行う。   The CCD I / F 112 outputs a vertical synchronizing signal (VD) and a horizontal synchronizing signal (HD), takes in a digital (RGB) signal input from the A / D 124 in accordance with the synchronizing signal, and passes through the memory controller 115. RGB data is written to the SDRAM 33.

表示出力制御部116はSDRAM33に書き込まれた表示用データを表示部に送り、撮影した画像の表示を行う。表示出力制御部116は、デジタルカメラが内蔵しているLCDモニタ10に表示することも、TVビデオ信号として出力して外部装置に表示することも可能である。   The display output control unit 116 sends the display data written in the SDRAM 33 to the display unit, and displays the captured image. The display output control unit 116 can display on the LCD monitor 10 built in the digital camera, or output it as a TV video signal and display it on an external device.

ここでいう、表示用データとは、自然画像のYCbCrと、撮影モードアイコンなどを表示するOSD(オンスクリーンディスプレイ)データであり、いずれもSDRAM33上に置かれたデータをメモリコントローラ115が読み出して表示出力制御部116に送り、表示出力制御部116で合成したデータをビデオデータとして出力する。   The display data here is OSD (on-screen display) data for displaying a natural image YCbCr, a shooting mode icon, etc., and the memory controller 115 reads and displays the data placed on the SDRAM 33. The data is sent to the output control unit 116, and the data synthesized by the display output control unit 116 is output as video data.

圧縮伸張部117は、記録時はSDRAM33に書き込まれたYCbCrデータを圧縮してJPEG符号化されたデータを出力し、再生時は読み出したJPEG符号化データをYCbCrデータに伸張して出力する。   The compression / decompression unit 117 compresses the YCbCr data written in the SDRAM 33 during recording and outputs JPEG-encoded data. During reproduction, the compression / decompression unit 117 decompresses the read JPEG-encoded data into YCbCr data and outputs the YCbCr data.

メディアI/F118は、CPU111の指示により、メモリカード34内のデータをSDRAM33に読み出したり、SDRAM33上のデータをメモリカード34に書き込んだりする。   The media I / F 118 reads data in the memory card 34 to the SDRAM 33 or writes data on the SDRAM 33 to the memory card 34 in accordance with an instruction from the CPU 111.

YUV変換部119は、CPU111から設定された画像現像処理パラメータに基づき、SDRAM33に一時保管されたRGBデータを輝度Yと色差CbCrデータ(YUVデータ)に変換処理し、SDRAM33へ書き戻す。   The YUV conversion unit 119 converts the RGB data temporarily stored in the SDRAM 33 into luminance Y and color difference CbCr data (YUV data) based on the image development processing parameters set by the CPU 111, and writes back to the SDRAM 33.

リサイズ処理部113は、YUVデータを読み出して、記録するために必要なサイズへのサイズ変換、サムネイル画像へのサイズ変換、表示に適したサイズへのサイズ変換などを行う。   The resizing processing unit 113 reads out YUV data and performs size conversion to a size necessary for recording, size conversion to a thumbnail image, size conversion to a size suitable for display, and the like.

また、全体の動作を制御する制御部であるCPU111は、起動時にROM30に格納されたカメラの制御を行う制御プログラムおよび制御データを、例えばSDRAM33にロードし、そのプログラムコードに基づいて全体の動作を制御する。   In addition, the CPU 111 which is a control unit that controls the overall operation loads a control program and control data for controlling the camera stored in the ROM 30 at the time of startup into, for example, the SDRAM 33, and performs the overall operation based on the program code. Control.

CPU111は、操作部31のボタンキー等による指示、あるいは図示しないリモコン等の外部動作指示、あるいはパーソナルコンピュータ等の外部端末からの通信による通信動作指示に従い、撮像動作制御、画像現像処理パラメータの設定、メモリコントロール、表示制御等を行う。   The CPU 111 performs imaging operation control, setting of image development processing parameters, in accordance with an instruction by a button key of the operation unit 31, an external operation instruction from a remote controller (not shown), or a communication operation instruction by communication from an external terminal such as a personal computer. Performs memory control and display control.

操作部31は、撮影者がデジタルカメラの動作指示を行うためのものであり、撮影者の操作によって所定の動作指示信号が制御部に入力される。例えば、図1に示すように、撮影を指示する2段(半押し、全押し)レリーズシャッター2、光学ズームおよび電子ズーム倍率を設定するズームボタン12,14等の各種ボタンキーを備えている。   The operation unit 31 is used by the photographer to instruct the operation of the digital camera, and a predetermined operation instruction signal is input to the control unit by the operation of the photographer. For example, as shown in FIG. 1, various button keys such as a two-stage (half-pressed and fully-pressed) release shutter 2 for instructing shooting, zoom buttons 12 and 14 for setting an optical zoom and an electronic zoom magnification are provided.

操作部31よりデジタルカメラの電源キーがオンされたことを検出すると、CPU111は各ブロックに所定の設定を行う。この設定により、レンズユニット7を介してCCD121で受光した画像は、デジタル映像信号に変換されて信号処理IC110に入力される。   When the operation unit 31 detects that the power key of the digital camera is turned on, the CPU 111 performs a predetermined setting for each block. With this setting, an image received by the CCD 121 via the lens unit 7 is converted into a digital video signal and input to the signal processing IC 110.

信号処理IC110へ入力されたデジタル信号はCCDI/F112に入力される。CCDI/F112では光電変換されたアナログ信号に黒レベル調整等の処理が行われて、SDRAM33に一旦保存される。このSDRAM33に保存されたRAW−RGB画像データは、YUV変換部119に読み出されて、ガンマ変換処理、ホワイトバランス処理、エッジエンハンス処理、YUV変換処理が行われYUV画像データとしてSDRAM33へ書き戻される。   The digital signal input to the signal processing IC 110 is input to the CCD I / F 112. The CCD I / F 112 performs processing such as black level adjustment on the photoelectrically converted analog signal and temporarily stores it in the SDRAM 33. The RAW-RGB image data stored in the SDRAM 33 is read by the YUV conversion unit 119, and subjected to gamma conversion processing, white balance processing, edge enhancement processing, and YUV conversion processing, and is written back to the SDRAM 33 as YUV image data. .

YUV画像データは表示出力制御部116に読み出され、例えば出力先がNTSCシステムのTVであれば、リサイズ処理部113により、そのシステムに合わせた水平・垂直の変倍処理が施され、TVに出力される。この処理がVD毎に行われることで、スチル撮影前の確認用の表示であるモニタリングが行われる。   The YUV image data is read by the display output control unit 116. For example, if the output destination is an NTSC system TV, the resizing processing unit 113 performs horizontal / vertical scaling processing according to the system, and Is output. By performing this process for each VD, monitoring which is a display for confirmation before still photographing is performed.

(撮像装置の動作)
次に、デジタルカメラのモニタリング動作および静止画撮影動作について説明する。このデジタルカメラは、静止画撮影モード時には、以下に説明するようなモニタリング動作を実行しながら静止画撮影動作が行われる。
(Operation of imaging device)
Next, the monitoring operation and still image shooting operation of the digital camera will be described. This digital camera performs a still image shooting operation while performing a monitoring operation as described below in the still image shooting mode.

先ず、撮影者が電源スイッチ13をONにし、モードダイヤル4を撮影モード(静止画撮影モード)に設定することで、デジタルカメラが記録モードで起動する。これをCPU111が検知すると、CPU111はモータドライバ32に制御信号を出力して、レンズユニット7を撮影可能位置に移動させ、かつ、CCD121、F/E120、信号処理IC110、SDRAM33、ROM30、LCDモニタ10等を起動させる。   First, when the photographer turns on the power switch 13 and sets the mode dial 4 to the photographing mode (still image photographing mode), the digital camera is activated in the recording mode. When the CPU 111 detects this, the CPU 111 outputs a control signal to the motor driver 32 to move the lens unit 7 to a photographing position, and the CCD 121, F / E 120, signal processing IC 110, SDRAM 33, ROM 30, LCD monitor 10 And so on.

そして、レンズユニット7の撮影レンズ系を被写体に向けることにより、撮影レンズ系を通して入射される被写体画像がCCD121の各画素の受光面上に結像する。そして、CCD121から出力される被写体画像に応じた電気信号(アナログRGB画像信号)は、CDS122、AGC123を介してA/D124に入力され、A/D124により12ビットのRAW−RGBデータに変換する。   Then, by directing the photographic lens system of the lens unit 7 toward the subject, a subject image incident through the photographic lens system is formed on the light receiving surface of each pixel of the CCD 121. An electrical signal (analog RGB image signal) corresponding to the subject image output from the CCD 121 is input to the A / D 124 via the CDS 122 and AGC 123, and converted into 12-bit RAW-RGB data by the A / D 124.

このRAW−RGBデータは、信号処理IC110のCCDI/F112に取り込まれてメモリコントローラ115を介してSDRAM33に保存される。そして、SDRAM33から読み出されたRAW−RGBデータは、YUV変換部119に入力されて表示可能な形式であるYUVデータに変換された後に、メモリコントローラ115を介してSDRAM33にYUVデータが保存される。   This RAW-RGB data is taken into the CCD I / F 112 of the signal processing IC 110 and stored in the SDRAM 33 via the memory controller 115. The RAW-RGB data read from the SDRAM 33 is input to the YUV conversion unit 119 and converted into YUV data that can be displayed, and then the YUV data is stored in the SDRAM 33 via the memory controller 115. .

そして、SDRAM33からメモリコントローラ115を介して読み出したYUVデータは、表示出力制御部116を介してLCDモニタ10へ送られ、撮影画像(動画)が表示される。LCDモニタ10に撮影画像を表示しているモニタリング時においては、CCDI/F112による画素数の間引き処理により1/30秒の時間で1フレームを読み出している。   The YUV data read from the SDRAM 33 via the memory controller 115 is sent to the LCD monitor 10 via the display output control unit 116, and a captured image (moving image) is displayed. At the time of monitoring in which a photographed image is displayed on the LCD monitor 10, one frame is read out in a time of 1/30 seconds by thinning out the number of pixels by the CCD I / F 112.

なお、このモニタリング動作時は、電子ファインダとして機能するLCDモニタ10に撮影画像(動画)が表示されているだけで、まだレリーズボタン2が押圧(半押も含む)操作されていない状態である。   In this monitoring operation, the photographed image (moving image) is only displayed on the LCD monitor 10 functioning as an electronic viewfinder, and the release button 2 is not yet pressed (including half-pressed).

この撮影画像のLCDモニタ10への表示によって、静止画を撮影するための構図の確認等をすることができる。なお、表示出力制御部116からTVビデオ信号として出力して、ビデオケーブルを介して外部のTV(テレビ)に撮影画像(動画)を表示することもできる。   By displaying the photographed image on the LCD monitor 10, the composition for photographing a still image can be confirmed. In addition, it can output as a TV video signal from the display output control part 116, and a picked-up image (moving image) can also be displayed on external TV (television) via a video cable.

そして、信号処理IC110のCCDI/F112は、取り込まれたRAW−RGBデータより、AF(自動合焦)評価値、AE(自動露出)評価値、AWB(オートホワイトバランス)評価値(WB評価値、AWB評価値ともいう)を算出する。   Then, the CCD I / F 112 of the signal processing IC 110 determines an AF (automatic focus) evaluation value, an AE (automatic exposure) evaluation value, an AWB (auto white balance) evaluation value (WB evaluation value) from the captured RAW-RGB data. (Also referred to as AWB evaluation value).

AF評価値は、例えば高周波成分抽出フィルタの出力積分値や、近接画素の輝度差の積分値によって算出される。合焦状態にあるときは、被写体のエッジ部分がはっきりとしているため、高周波成分が一番高くなる。これを利用して、AF動作時(合焦検出動作時)には、撮影レンズ系内の各フォーカスレンズ位置におけるAF評価値を取得して、その極大になる点を合焦検出位置としてAF動作が実行される。   The AF evaluation value is calculated by, for example, the output integrated value of the high frequency component extraction filter or the integrated value of the luminance difference between adjacent pixels. When in the in-focus state, the edge portion of the subject is clear, so the high frequency component is the highest. By using this, at the time of AF operation (focus detection operation), AF evaluation values at each focus lens position in the photographing lens system are acquired, and AF operation is performed with the maximum point as the focus detection position. Is executed.

AE評価値とWB評価値は、RAW−RGBデータにおけるRGB値のそれぞれの積分値から算出される。例えば、CCD121の全画素の受光面に対応した画面(画像領域)を256ブロック(エリア)に等分割(水平16分割、垂直16分割)し、それぞれのブロックのRGB積算を算出する。なお、ブロックの分割数は一例であって、これに限られるものではない。   The AE evaluation value and the WB evaluation value are calculated from the integrated values of the RGB values in the RAW-RGB data. For example, the screen (image area) corresponding to the light receiving surface of all the pixels of the CCD 121 is equally divided into 256 blocks (areas) (horizontal 16 divisions and vertical 16 divisions), and the RGB integration of each block is calculated. The number of block divisions is merely an example, and the present invention is not limited to this.

そして、制御部は、算出されたRGB積算値を読み出し、AE処理では、画面のそれぞれのエリア(ブロック)の輝度を算出して、輝度分布から適正な露光量を決定する。決定した露光量に基づいて、露光条件(CCD121の電子シャッタ回数、絞りユニットの絞り値、NDフィルタの出し入れ等)を設定する。また、AWB処理では、RGBの分布から被写体の光源の色に合わせたAWBの制御値を決定する(後述する)。このAWB処理により、YUV変換部119でYUVデータに変換処理するときのホワイトバランスを合わせる。なお、AE処理とAWB処理は、モニタリング時には連続的に行われている。   Then, the control unit reads the calculated RGB integrated value, and in the AE process, calculates the luminance of each area (block) of the screen and determines an appropriate exposure amount from the luminance distribution. Based on the determined exposure amount, exposure conditions (the number of electronic shutters of the CCD 121, the aperture value of the aperture unit, the insertion and removal of the ND filter, etc.) are set. In the AWB process, an AWB control value that matches the color of the light source of the subject is determined from the RGB distribution (described later). By this AWB process, white balance is adjusted when the YUV conversion unit 119 performs conversion processing to YUV data. Note that the AE process and the AWB process are continuously performed during monitoring.

そして、モニタリング動作時に、レリーズボタンが押圧(半押しから全押し)操作される静止画撮影動作が開始されると、合焦位置検出動作であるAF動作と静止画記録処理が行われる。   Then, when a still image shooting operation in which the release button is pressed (half-pressed to fully pressed) is started during the monitoring operation, an AF operation that is a focus position detection operation and a still image recording process are performed.

即ち、レリーズボタンが押圧(半押しから全押し)操作されると、制御部からモータドライバ32への駆動指令により撮影レンズ系のフォーカスレンズが移動し、例えば、いわゆる山登りAFと称されるコントラスト評価方式のAF動作が実行される。   That is, when the release button is pressed (half to full), the focus lens of the photographing lens system is moved by a drive command from the control unit to the motor driver 32. For example, contrast evaluation called so-called hill-climbing AF is performed. The AF operation of the method is executed.

AF(合焦)対象範囲が無限から至近までの全領域であった場合、撮影レンズ系のフォーカスレンズは、至近から無限、又は無限から至近までの間の各フォーカス位置に移動し、CCDI/F112で算出されている各フォーカス位置におけるAF評価値を制御部が読み出す。そして、各フォーカス位置のAF評価値が極大になる点を合焦位置としてフォーカスレンズを合焦位置に移動させ、合焦させる。   When the AF (focusing) target range is the entire region from infinity to close, the focus lens of the taking lens system moves to each focus position from close to infinity or from infinity to close, and the CCD I / F 112 The control unit reads the AF evaluation value at each focus position calculated in step (1). Then, the focus lens is moved to the in-focus position with the point where the AF evaluation value at each focus position is maximized as the in-focus position, and in-focus.

そして、AE処理が行われ、露光完了時点で、制御部からモータドライバ32への駆動指令によりメカシャッタユニットが閉じられ、CCD121から静止画用のアナログRGB画像信号が出力される。そして、モニタリング時と同様に、F/E120のA/D124によりRAW−RGBデータに変換される。   Then, AE processing is performed, and when the exposure is completed, the mechanical shutter unit is closed by a drive command from the control unit to the motor driver 32, and an analog RGB image signal for a still image is output from the CCD 121. Then, as in the monitoring, the data is converted into RAW-RGB data by the A / D 124 of the F / E 120.

そして、このRAW−RGBデータは、信号処理IC110のCCDI/F112に取り込まれ、YUV変換部119でYUVデータに変換されて、メモリコントローラ115を介してSDRAM33に保存される。そして、このYUVデータはSDRAM33から読み出されて、リサイズ処理部113で記録画素数に対応するサイズに変換され、圧縮伸張部117でJPEG形式等の画像データへと圧縮される。圧縮されたJPEG形式等の画像データは、SDRAM33に書き戻された後にメモリコントローラ115を介してSDRAM33から読み出され、メディアI/F118を介してメモリカード34に保存される。   The RAW-RGB data is taken into the CCD I / F 112 of the signal processing IC 110, converted into YUV data by the YUV conversion unit 119, and stored in the SDRAM 33 via the memory controller 115. The YUV data is read from the SDRAM 33, converted into a size corresponding to the number of recording pixels by the resizing processing unit 113, and compressed to image data in the JPEG format or the like by the compression / decompression unit 117. The compressed image data such as JPEG format is written back to the SDRAM 33, read from the SDRAM 33 via the memory controller 115, and stored in the memory card 34 via the media I / F 118.

(ホワイトバランス制御)
図3は、ホワイトバランス制御に係るCPU111の制御ブロックの説明図である。CPU111の各制御ブロックが実行するホワイトバランス制御について、図4に示す処理フローチャートを併せて参照しつつ説明する。
(White balance control)
FIG. 3 is an explanatory diagram of a control block of the CPU 111 related to white balance control. The white balance control executed by each control block of the CPU 111 will be described with reference to the processing flowchart shown in FIG.

なお、図3に示すブロック分割手段201、RGB積算手段202、ホワイトバランス評価値取得手段203、白抽出手段204、ホワイトバランス補正係数算出手段(1)205(第1のホワイトバランス補正係数算出手段)、緑評価値判定手段206(第1のエリア判定手段)、蛍光灯評価値判定手段207(第2のエリア判定手段)、上位エリア判定手段208、屋外加重率算出手段209、ホワイトバランス補正係数算出手段(2)210(第2のホワイトバランス補正係数算出手段)、緑エリア設定手段211(第1のエリア設定手段)、蛍光灯エリア設定手段212(第2のエリア設定手段)、重み付け手段213、ホワイトバランス補正手段214の各手段は、CPU111で実行されるソフトウェア(撮像プログラム)を撮像装置で実行させることで構成でき、その実行の際に必要なデータは、例えば、SDRAM33にロードされる。   It should be noted that the block dividing means 201, RGB integrating means 202, white balance evaluation value acquiring means 203, white extracting means 204, white balance correction coefficient calculating means (1) 205 (first white balance correction coefficient calculating means) shown in FIG. , Green evaluation value determination means 206 (first area determination means), fluorescent lamp evaluation value determination means 207 (second area determination means), upper area determination means 208, outdoor weighting rate calculation means 209, white balance correction coefficient calculation Means (2) 210 (second white balance correction coefficient calculating means), green area setting means 211 (first area setting means), fluorescent lamp area setting means 212 (second area setting means), weighting means 213, Each unit of the white balance correction unit 214 captures software (imaging program) executed by the CPU 111. Can be configured by executing the apparatus, the data necessary for its execution, for example, is loaded into SDRAM 33.

先ず、上述したように、RGB積算手段202は、RAW−RGBがCCDI/F112に取り込まれた後、ブロック分割手段201により256ブロックに等分割された画像領域(CCD121の全画素の受光面に対応した画面)について、ブロック毎に出力されるR値、G値、B値(単に、R、G、Bともいい、RGBと総称する)それぞれの積算値(R積算値、G積算値、B積算値ともいい、RGB積算値と総称する)を取得する(S101:RGB積算値取得処理)。なお、R値、G値、B値は、例えば8ビットで表現されるが、数量化方法については特に限られるものではない。   First, as described above, the RGB accumulating unit 202 corresponds to the image area (corresponding to the light receiving surfaces of all the pixels of the CCD 121) after the RAW-RGB is taken into the CCD I / F 112 and then equally divided into 256 blocks by the block dividing unit 201. Screen) for each block, R values, G values, and B values (also simply referred to as R, G, and B, collectively referred to as RGB), integrated values (R integrated values, G integrated values, and B integrated values). (S101: RGB integrated value acquisition process). The R value, the G value, and the B value are expressed by, for example, 8 bits, but the quantification method is not particularly limited.

次に、ホワイトバランス評価値取得手段203は、取得した各ブロックのRGB積算値から1画素あたりのRGBそれぞれの平均値(R平均値、G平均値、B平均値ともいい、RGB平均値と総称する)を算出し、WB評価値(G/R、G/B)およびAE評価値(Y)を算出する(S102:WB評価値、AE評価値生成処理)。ここで、WB評価値(G/R、G/B)およびAE評価値(Y)の算出は、例えば、次式(1)〜(3)により算出することができる。
G/R=(G平均値×100)/R平均値 ・・・(1)
G/B=(G平均値×100)/B平均値 ・・・(2)
Y=(R平均値×3+G平均値×6+B平均値)/10 ・・・(3)
なお、WB評価値(G/R、G/B)およびAE評価値(Y)の算出方法は、上記の例に限られるものではなく、その他、公知または新規の算出方法によるものであっても良い。
Next, the white balance evaluation value acquisition unit 203 is also referred to as an RGB average value per pixel (also referred to as an R average value, a G average value, or a B average value from the acquired RGB integrated values of each block. Is calculated), and the WB evaluation value (G / R, G / B) and the AE evaluation value (Y) are calculated (S102: WB evaluation value, AE evaluation value generation process). Here, the calculation of the WB evaluation value (G / R, G / B) and the AE evaluation value (Y) can be calculated by, for example, the following equations (1) to (3).
G / R = (G average value × 100) / R average value (1)
G / B = (G average value × 100) / B average value (2)
Y = (R average value × 3 + G average value × 6 + B average value) / 10 (3)
Note that the calculation method of the WB evaluation value (G / R, G / B) and the AE evaluation value (Y) is not limited to the above example, but may be other known or new calculation methods. good.

また、白抽出手段204は、WB評価値(G/R、G/B)に基づいて、予め設定してある白抽出範囲内であれば白抽出ブロック(白ブロック)として記憶する(S103:白抽出処理)。なお、白抽出処理の具体的な処理方法は、特に限られるものではなく、公知または新規の白ブロック抽出方法を用いればよいが、例えば、図5に示すように、G/Rをx軸、G/Bをy軸とする2次元の色座標上における黒体輻射の特性曲線(黒体輻射カーブ)(図5中に符号cで示す)に沿った複数の楕円若しくは矩形の枠を白検出枠として設定し、WB評価値がこの白検出枠に含まれている場合に白抽出ブロックとして検出することとすればよい。なお、図5の例では、白検出範囲は複数の楕円枠で示され、個々の楕円枠が各光源の白検出範囲に対応する白検出枠に対応している。   Further, the white extraction unit 204 stores a white extraction block (white block) based on the WB evaluation value (G / R, G / B) as long as it is within a preset white extraction range (S103: white). Extraction process). The specific processing method of the white extraction processing is not particularly limited, and a known or new white block extraction method may be used. For example, as shown in FIG. White detection of a plurality of ellipse or rectangular frames along a blackbody radiation characteristic curve (blackbody radiation curve) (indicated by reference numeral c in FIG. 5) on a two-dimensional color coordinate with G / B as the y-axis It may be set as a frame, and when the WB evaluation value is included in the white detection frame, it may be detected as a white extraction block. In the example of FIG. 5, the white detection range is indicated by a plurality of ellipse frames, and each ellipse frame corresponds to a white detection frame corresponding to the white detection range of each light source.

次に、ホワイトバランス補正係数算出手段(1)205は、白抽出処理(S103)にて抽出した白抽出ブロック数が所定数以上あるかどうかを判断し、所定数以上ある場合、数式1を用いて、各白抽出ブロックのWB評価値(G/R、G/B)に対して該当ブロックのAE評価値(Y)による重み付けを行った後、積算して一画素あたりのG/R、G/B(第1のホワイトバランス補正係数)を算出する(S104:高輝度加重処理)。

Figure 0005915242
Next, the white balance correction coefficient calculation means (1) 205 determines whether or not the number of white extraction blocks extracted in the white extraction process (S103) is equal to or greater than a predetermined number. Then, the WB evaluation value (G / R, G / B) of each white extraction block is weighted by the AE evaluation value (Y) of the corresponding block, and then integrated to obtain G / R, G per pixel. / B (first white balance correction coefficient) is calculated (S104: high luminance weighting process).
Figure 0005915242

なお、一定数以上の白抽出ブロック数が存在しない場合は、全てのブロックのWB評価値(G/R、G/B)を積算し、一画素あたりのG/R、G/Bを算出し、求めた一画素あたりのG/R、G/Bをそれぞれ平均したものをWB補正係数Rgain、Bgainとし、ホワイトバランス補正係数乗算処理(S109)へ移行する。   If there are no more than a certain number of white extraction blocks, the WB evaluation values (G / R, G / B) of all the blocks are integrated to calculate G / R and G / B per pixel. Then, the average of the obtained G / R and G / B per pixel is set as the WB correction coefficients Rgain and Bgain, and the process proceeds to the white balance correction coefficient multiplication process (S109).

次に、緑評価値判定手段206は、WB評価値(G/R、G/B)に基づいて緑エリア判定を行う(S105:緑評価値判定処理)。緑評価値判定処理は、WB評価値のG/R、G/Bそれぞれについて、所定の閾値を設け、双方が閾値を超える評価値を、緑評価値と判定する(個数を取得する)。なお、緑評価値と判定されるエリアは、緑エリア設定手段211により予め設定される。   Next, the green evaluation value determination unit 206 performs green area determination based on the WB evaluation values (G / R, G / B) (S105: green evaluation value determination processing). In the green evaluation value determination process, a predetermined threshold is provided for each of the WB evaluation values G / R and G / B, and an evaluation value in which both exceed the threshold is determined as a green evaluation value (the number is acquired). The area determined as the green evaluation value is set in advance by the green area setting unit 211.

例えば、図5に示すように、G/Rをx軸、G/Bをy軸とする2次元の色座標上で、G/RおよびG/B双方の値が大きい(所定の閾値X,Yを超える)領域(図5中にAで示す斜線部分である緑エリア)にある評価値を緑評価値と判定する。判定式は、G/R≧X 、且つ G/B≧Y である。   For example, as shown in FIG. 5, the values of both G / R and G / B are large (predetermined threshold values X, G, B) on a two-dimensional color coordinate having G / R as the x axis and G / B as the y axis. The evaluation value in the region (exceeding Y) (the green area that is the hatched portion indicated by A in FIG. 5) is determined as the green evaluation value. The judgment formulas are G / R ≧ X and G / B ≧ Y.

次に、蛍光灯評価値判定手段207は、WB評価値(G/R、G/B)に基づいて蛍光灯エリア判定を行う(S106:蛍光灯評価値判定処理)。図6に蛍光灯エリアの模式図を示す。図6中にBで示す斜線部分が白色蛍光灯エリア、Cで示す斜線部分が昼白色蛍光灯エリアであり、この部分に位置する評価値を蛍光灯評価値と判定する(個数を取得する)。白色蛍光灯判定の判定式は数式2、昼白色蛍光灯判定の判定式は数式3で示される。なお、蛍光灯評価値と判定されるエリアは、蛍光灯エリア設定手段212により予め設定される。

Figure 0005915242

Figure 0005915242
Next, the fluorescent lamp evaluation value determination means 207 performs fluorescent lamp area determination based on the WB evaluation values (G / R, G / B) (S106: fluorescent lamp evaluation value determination processing). FIG. 6 shows a schematic diagram of the fluorescent lamp area. In FIG. 6, the hatched portion indicated by B is the white fluorescent lamp area, and the shaded portion indicated by C is the daylight white fluorescent lamp area, and the evaluation value located in this portion is determined as the fluorescent lamp evaluation value (the number is acquired). . The determination formula for white fluorescent lamp determination is expressed by Formula 2, and the determination formula for day white fluorescent lamp determination is expressed by Formula 3. The area determined as the fluorescent lamp evaluation value is set in advance by the fluorescent lamp area setting means 212.
Figure 0005915242

Figure 0005915242

次に、上位エリア判定手段208は、緑エリアAと蛍光灯エリアB,Cの3つのエリアうち、判定された評価値の個数が多い上位2つのエリア(第1選択エリア、第2選択エリアという)を選択する。また、屋外加重率算出手段209は、選択されたエリアの評価値数に基づいて、数式4により屋外加重率を算出する(S107:上位エリア判定、屋外加重率算出処理)。なお、屋外加重率とは、屋外のホワイトバランス目標(晴天屋外での撮影に適したホワイトバランス設定条件)に近づけるための値であって、屋外加重率が高くなるに従って屋外に最適なWBが設定されるものである。

Figure 0005915242
Next, the upper area determination means 208 has two upper areas (the first selection area and the second selection area) that have a large number of determined evaluation values among the three areas of the green area A and the fluorescent lamp areas B and C. ) Is selected. Also, the outdoor weighting factor calculation means 209 calculates the outdoor weighting factor by Equation 4 based on the number of evaluation values of the selected area (S107: upper area determination, outdoor weighting factor calculation process). The outdoor weighting factor is a value for approaching an outdoor white balance target (white balance setting conditions suitable for shooting outdoors in fine weather), and the optimal WB for outdoor use is set as the outdoor weighting factor increases. It is what is done.
Figure 0005915242

数式4について説明する。統計的に、蛍光灯下では1つの蛍光灯エリアにWB評価値が集中するのに対して、屋外で木や花などの緑を撮影した場合、緑エリアと蛍光灯エリアの複数エリアに跨ってWB評価値が分布される(緑に対応するWB評価値が緑エリアと蛍光灯エリアの両方に分散する)ため、数式4において、上位2つのエリアに評価値が広く分布された時に、屋外加重率最大となるようにしている。例えば、上位2つのエリア評価値数の割合が50%ずつで屋外加重率が最大になるように調整係数kを25とすることができる。また、上位2つのエリア評価値数の割合を掛け合わせることで片方のエリアの評価値数が少ないとき(屋外での緑シーンの確立が低い時)は屋外加重率が低くなるようにしている。   Formula 4 will be described. Statistically, WB evaluation values are concentrated in one fluorescent lamp area under fluorescent lamps, but when shooting green such as trees and flowers outdoors, the green area and the fluorescent lamp area span multiple areas. Since WB evaluation values are distributed (WB evaluation values corresponding to green are dispersed in both the green area and the fluorescent lamp area), when the evaluation values are widely distributed in the upper two areas in Equation 4, outdoor weighting is performed. The maximum rate is set. For example, the adjustment coefficient k can be set to 25 so that the ratio of the top two area evaluation values is 50% and the outdoor weighting rate is maximized. In addition, by multiplying the ratio of the upper two area evaluation values, when the number of evaluation values in one area is small (when the establishment of a green scene outdoors is low), the outdoor weighting rate is made low.

より具体的には、緑エリアとして判定されたエリアAと蛍光灯エリアとして判定されたエリアBおよびCから、WB評価値の個数が多い上位2つのエリアを選択することで、撮影シーンが屋外で緑を撮影した場合においても、少なくとも上位2つのエリアのどちらかには緑エリアAが含まれることになり、かつ蛍光灯エリアBまたはCに分布してしまった緑に対応するWB評価値についてもWB補正係数を求めるために用いることとなるため、室内蛍光灯に対応するWB補正係数になってしまうことを防ぎ、屋外の緑シーンに対応するWB補正係数を精度よく求めることが可能となるものである。   More specifically, from the area A determined as the green area and the areas B and C determined as the fluorescent lamp area, the top two areas with the largest number of WB evaluation values are selected, so that the shooting scene is outdoors. Even when green is photographed, at least one of the top two areas includes the green area A, and the WB evaluation value corresponding to the green that has been distributed in the fluorescent lamp areas B or C Since it is used to obtain the WB correction coefficient, it can be prevented from becoming a WB correction coefficient corresponding to the indoor fluorescent lamp, and the WB correction coefficient corresponding to the outdoor green scene can be accurately obtained. It is.

上位1つのエリアのみを選択するようにすると、選択されなかった方のエリアに分布する、緑に対応するWB評価値を拾いきれず、屋外加重率が下がってしまうことに繋がる可能性があるため、上位2つのエリアを選択することにより、この問題を回避することができる。   If only the top one area is selected, the WB evaluation value corresponding to green distributed in the area that has not been selected cannot be picked up, leading to a decrease in the outdoor weighting rate. By selecting the top two areas, this problem can be avoided.

また、撮影シーンが屋外ではない室内蛍光灯下のシーンの場合では、上位2つのエリアとして蛍光灯エリアB,Cが選択されることで、室内蛍光灯に対応するWB補正係数を正しく求めることが可能となる。   In addition, in the case where the shooting scene is a scene under an indoor fluorescent lamp that is not outdoor, the fluorescent lamp areas B and C are selected as the top two areas, so that the WB correction coefficient corresponding to the indoor fluorescent lamp can be obtained correctly. It becomes possible.

この屋外加重率算出処理によれば、WB評価値の分布のみに基づいて屋外加重率を算出しているので、従来方式に比べ、処理量を低減して処理時間を短くすることができる。また、明るさ情報によらず屋外の緑シーンでも安定したWBを行うことが可能となる。   According to this outdoor weighting factor calculation process, the outdoor weighting factor is calculated based only on the distribution of the WB evaluation value, so that the processing amount can be reduced and the processing time can be shortened as compared with the conventional method. In addition, it is possible to perform stable WB even in outdoor green scenes regardless of brightness information.

さらに、ホワイトバランス補正係数算出手段(2)210は、この算出した屋外加重率に基づいて、数式5に示すように、算出した一画素あたりのG/R、G/Bと、屋外WB目標との加重平均を行うことでホワイトバランス補正係数Rgain,Bgain(第2のホワイトバランス補正係数)を求める(S108:屋外加重処理)。屋外WB目標とは、高色温度光源に対応したホワイトバランス係数であって、晴天屋外で最適なホワイトバランスとなるような係数(予め記憶されている値)である。

Figure 0005915242
Further, the white balance correction coefficient calculating means (2) 210 calculates the calculated G / R, G / B per pixel and the outdoor WB target based on the calculated outdoor weighting rate as shown in Expression 5. To obtain white balance correction coefficients Rgain, Bgain (second white balance correction coefficient) (S108: outdoor weighting process). The outdoor WB target is a white balance coefficient corresponding to a high color temperature light source, and is a coefficient (a value stored in advance) that provides an optimal white balance outdoors in fine weather.
Figure 0005915242

最後に、ホワイトバランス補正手段214は、画面全体のR、B画素それぞれに対して、WB補正係数Rgain、Bgainを掛けることでホワイトバランス補正を行うものである(S109:ホワイトバランス補正係数乗算処理)。   Finally, the white balance correction unit 214 performs white balance correction by multiplying the R and B pixels of the entire screen by WB correction coefficients Rgain and Bgain (S109: white balance correction coefficient multiplication process). .

なお、本実施形態では、緑に対応するWB評価値が蛍光灯エリアに分布されることについて説明したが、例えば、光源がLEDである場合であっても、所定範囲の色温度を有するLEDでは、緑に対応するWB評価値がこのLEDに対応するエリアに分布されることも考えられる。したがって、屋外加重率を求める際に用いるエリアは、蛍光灯エリアに限られるものではなく、デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲に相当する他のエリアであれば良い。   In the present embodiment, it has been described that the WB evaluation value corresponding to green is distributed in the fluorescent lamp area. For example, even if the light source is an LED, the LED having a color temperature in a predetermined range is used. It is also conceivable that the WB evaluation value corresponding to green is distributed in the area corresponding to this LED. Therefore, the area used when calculating the outdoor weighting rate is not limited to the fluorescent lamp area, but corresponds to a white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed. If it is the area of.

また、本実施形態では、蛍光灯エリアを、白色蛍光灯エリアBと昼白色蛍光灯エリアCの2つのエリアについて説明したが、蛍光灯エリア数はこれに限られるものではなく、2以上設定されるものであればよい。また、緑エリアAと蛍光灯エリアB、Cから上位2つのエリアを選択する例について説明したが、蛍光灯エリアの設定数に応じて選択数は適宜選択されるものであればよい。   In the present embodiment, the fluorescent lamp area has been described with respect to the two areas of the white fluorescent lamp area B and the daylight white fluorescent lamp area C. However, the number of fluorescent lamp areas is not limited to this, and two or more fluorescent lamp areas are set. Anything is acceptable. Moreover, although the example which selects two upper areas from the green area A and the fluorescent lamp areas B and C was demonstrated, the selection number should just be suitably selected according to the setting number of a fluorescent lamp area.

また、本実施形態では、算出した屋外加重率をホワイトバランス補正に用いているが、屋外加重率を算出する上記処理は、すなわち、ホワイトバランス評価値の分布を用いて画像の撮影シーンが屋外か否かに関する屋外情報を取得する処理(屋外判定)であるため、算出した屋外加重率は、ホワイトバランス制御に限らず、屋外判定を必要とする撮影シーンの自動認識処理やAF処理などの他の処理に適用することができることは勿論である。   In the present embodiment, the calculated outdoor weighting factor is used for white balance correction. However, in the above processing for calculating the outdoor weighting factor, that is, whether the shooting scene of the image is outdoor using the distribution of white balance evaluation values. Because it is processing (outdoor determination) for acquiring outdoor information regarding whether or not, the calculated outdoor weighting rate is not limited to white balance control, but is other than automatic recognition processing or AF processing of shooting scenes that require outdoor determination. Of course, it can be applied to processing.

屋外加重率を算出する上記処理によれば、処理負荷が少なく高精度で安定した屋外加重率が求められるため、ホワイトバラン補正に限らず、屋外か否かに関する情報が必要な他の処理においても、有効に屋外加重率を利用することができる。   According to the above processing for calculating the outdoor weighting rate, a high accuracy and stable outdoor weighting rate is required with a small processing load. Therefore, not only in the white balun correction, but also in other processing that requires information on whether it is outdoor or not. Effectively, outdoor weighting rate can be utilized.

以上説明した本実施形態に係る画像処理装置によれば、処理負荷が少なく、高精度で安定した、シーンの屋外判定を行うことができる。また、簡易的に良好なホワイトバランス補正を行うことが可能となる。   According to the image processing apparatus according to the present embodiment described above, it is possible to perform scene outdoor determination with low processing load and high accuracy and stability. In addition, it is possible to easily perform good white balance correction.

[第2の実施形態]
以下、本実施形態に係る画像処理装置の他の実施形態について説明する。なお、上記第1の実施形態と同様の点についての説明は適宜省略する。
[Second Embodiment]
Hereinafter, other embodiments of the image processing apparatus according to the present embodiment will be described. Note that the description of the same points as in the first embodiment will be omitted as appropriate.

上記第1の実施形態では、緑エリアAと蛍光灯エリアB,Cで判定された評価値の個数が多い上位2つのエリアを選択し、当該エリアの評価値数を基に屋外加重率を算出したが、本実施形態で蛍光灯エリアと判定された評価値の個数に対して重み付けを下げる処理を行うことで、室内蛍光灯に対応するWB補正係数をさらに良好に求めることが可能となる。   In the first embodiment, the top two areas having the largest number of evaluation values determined in the green area A and the fluorescent lamp areas B and C are selected, and the outdoor weighting rate is calculated based on the number of evaluation values in the area. However, the WB correction coefficient corresponding to the indoor fluorescent lamp can be obtained more satisfactorily by performing the process of lowering the weight on the number of evaluation values determined as the fluorescent lamp area in the present embodiment.

以下、図7に示す処理フローチャートを参照して説明する。先ず、RGB積算値取得処理(S201)から蛍光灯評価値判定処理(S206)までの一連の処理については、第1の実施形態(S101〜S106)と同様に行う。   Hereinafter, the processing will be described with reference to a processing flowchart shown in FIG. First, a series of processes from the RGB integrated value acquisition process (S201) to the fluorescent lamp evaluation value determination process (S206) are performed in the same manner as in the first embodiment (S101 to S106).

本実施形態では、蛍光灯評価値判定手段207による蛍光灯評価値判定処理(S206)の後、重み付け手段213は蛍光灯エリアと判定された評価値数に対して重み付けを行う(S207:蛍光灯評価値数重み付け処理)。   In this embodiment, after the fluorescent lamp evaluation value determination process (S206) by the fluorescent lamp evaluation value determination means 207, the weighting means 213 weights the number of evaluation values determined to be a fluorescent light area (S207: fluorescent light). Evaluation value number weighting process).

蛍光灯エリアに対する重み付け(重み係数)は、例えば、0.5とすることができる。この場合、例えば、上記数式3で白色蛍光灯エリアBと判定された評価値数が100、上記数式4で昼白色蛍光灯エリアCと判定された評価値数が120であるとすると、重み付け後の評価値数はそれぞれ50、60となる。   The weighting (weighting coefficient) for the fluorescent lamp area can be set to 0.5, for example. In this case, for example, if the number of evaluation values determined as the white fluorescent lamp area B in Formula 3 is 100 and the number of evaluation values determined as the day white fluorescent lamp area C in Formula 4 is 120, after weighting The number of evaluation values is 50 and 60, respectively.

このように、蛍光灯エリアに対する重み付けを1.0より下にすることで被写体によっては室内蛍光灯シーンでも蛍光灯エリアを含む複数のエリアに評価値が跨り屋外加重率が高くなる問題を防ぐことができる。なお、蛍光灯エリアに対する重み付けは0.5に限定されるものではなく、1.0以下の範囲で適宜設定することが可能である。   In this way, by setting the weight for the fluorescent lamp area below 1.0, depending on the subject, even in an indoor fluorescent lamp scene, it is possible to prevent the problem that the outdoor weight ratio increases because the evaluation value spans a plurality of areas including the fluorescent lamp area. Can do. In addition, the weighting with respect to a fluorescent lamp area is not limited to 0.5, It is possible to set suitably in the range of 1.0 or less.

以下、上位エリア判定、屋外加重率算出処理(S208)〜ホワイトバランス補正係数算出処理(S210)は、第1の実施形態(S107〜S109)と同様に行う。   Hereinafter, the upper area determination, outdoor weighting factor calculation processing (S208) to white balance correction coefficient calculation processing (S210) are performed in the same manner as in the first embodiment (S107 to S109).

以上説明したように、第2の実施形態に係る画像処理装置によれば、重み付けされた蛍光灯エリアの評価値数を用いて屋外加重率の算出を行うことで、室内蛍光灯に対応するWB補正係数をさらに良好に求めることが可能となり、蛍光灯エリアと緑エリアに跨って評価値が分布される蛍光灯シーン、屋外の緑シーンでも安定してシーンの屋外判定、ホワイトバランス補正が可能となる。   As described above, according to the image processing apparatus according to the second embodiment, by calculating the outdoor weighting rate using the weighted evaluation value number of the fluorescent lamp area, the WB corresponding to the indoor fluorescent lamp is obtained. The correction coefficient can be calculated more satisfactorily, and even in fluorescent lamp scenes where evaluation values are distributed across the fluorescent lamp area and the green area, and in outdoor green scenes, stable outdoor judgment and white balance correction are possible. Become.

以上説明した画像処理装置によるホワイトバランス制御は、プログラム(画像処理プログラム)で実行させることもできる。また、当該画像処理プログラムをコンピュータで実行可能に記録した記録媒体の態様にも適用される。   The white balance control by the image processing apparatus described above can also be executed by a program (image processing program). The present invention is also applied to a recording medium in which the image processing program is recorded so as to be executable by a computer.

尚、上述の実施形態は本発明の好適な実施の例ではあるがこれに限定されるものではなく、本発明の要旨を逸脱しない範囲において種々変形実施可能である。   The above-described embodiment is a preferred embodiment of the present invention, but is not limited thereto, and various modifications can be made without departing from the gist of the present invention.

1 サブLCD
2 レリーズシャッター(SW1)
3 ストロボ発光部
4 モードダイヤル(SW2)
5 測距ユニット
6 リモコン受光部
7 レンズユニット
8 AFLED
9 ストロボLED
10 LCDモニタ
11 光学ファインダ
12 ズームボタンTELE(SW4)
13 電源スイッチ(SW13)
14 ズームボタンWIDE(SW3)
15 セルフタイマ/削除スイッチ(SW5)
16 メニュースイッチ(SW6)
17 OKスイッチ(SW12)
18 左/画像確認スイッチ(SW11)
19 下/マクロスイッチ(SW10)
20 上/ストロボスイッチ(SW7)
21 右スイッチ(SW8)
22 ディスプレイスイッチ(SW9)
23 メモリカードスロットル
30 ROM
31 操作部
32 モータドライバ
33 SDRAM
34 メモリカード
110 信号処理IC
111 CPU
112 CCD I/F
113 リサイズ処理部
115 メモリコントローラ
116 表示出力制御部
117 圧縮伸長部
118 メディアI/F
119 YUV変換部
120 F/E
121 CCD
122 CDS
123 AGC
124 A/D変換機
125 タイミングジェネレータ
201 ブロック分割手段
202 RGB積算手段
203 ホワイトバランス評価値取得手段
204 白抽出手段
205 ホワイトバランス補正係数算出手段(1)
206 緑評価値判定手段
207 蛍光灯評価値判定手段
208 上位エリア判定手段
209 屋外加重率算出手段
210 ホワイトバランス補正係数算出手段(2)
211 緑エリア設定手段
212 蛍光灯エリア設定手段
213 重み付け手段
214 ホワイトバランス補正手段
c 黒体輻射カーブ
A 緑エリア
B 白色蛍光灯エリア
C 昼白色蛍光灯エリア
1 Sub LCD
2 Release shutter (SW1)
3 Flash unit 4 Mode dial (SW2)
5 Distance measuring unit 6 Remote control light receiving unit 7 Lens unit 8 AFLED
9 Strobe LED
10 LCD Monitor 11 Optical Finder 12 Zoom Button TELE (SW4)
13 Power switch (SW13)
14 Zoom button WIDE (SW3)
15 Self-timer / deletion switch (SW5)
16 Menu switch (SW6)
17 OK switch (SW12)
18 Left / image confirmation switch (SW11)
19 Lower / Macro switch (SW10)
20 Up / Strobe switch (SW7)
21 Right switch (SW8)
22 Display switch (SW9)
23 Memory card throttle 30 ROM
31 Operation unit 32 Motor driver 33 SDRAM
34 Memory Card 110 Signal Processing IC
111 CPU
112 CCD I / F
113 Resize processing unit 115 Memory controller 116 Display output control unit 117 Compression / decompression unit 118 Media I / F
119 YUV converter 120 F / E
121 CCD
122 CDS
123 AGC
124 A / D converter 125 Timing generator 201 Block division means 202 RGB integration means 203 White balance evaluation value acquisition means 204 White extraction means 205 White balance correction coefficient calculation means (1)
206 Green evaluation value determination means 207 Fluorescent lamp evaluation value determination means 208 Upper area determination means 209 Outdoor weight ratio calculation means 210 White balance correction coefficient calculation means (2)
211 Green area setting means 212 Fluorescent lamp area setting means 213 Weighting means 214 White balance correction means c Black body radiation curve A Green area B White fluorescent lamp area C Daylight white fluorescent lamp area

特開2008−301279号公報JP 2008-301279 A 特開2006−174281号公報JP 2006-174281 A 特開2004−274367号公報JP 2004-274367 A

Claims (8)

デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲外のエリアを含む第1のエリアを予め設定する第1のエリア設定手段と、
デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲に相当する第2のエリアを予め複数設定する第2のエリア設定手段と、
デジタル画像からホワイトバランス評価値を取得するホワイトバランス評価値取得手段と、
前記ホワイトバランス評価値取得手段により取得したホワイトバランス評価値が白抽出範囲内か否かを判定し、前記白抽出範囲内であると判定されたホワイトバランス評価値を基に第1のホワイトバランス補正係数を算出する第1のホワイトバランス補正係数算出手段と、
前記ホワイトバランス評価値取得手段により取得したホワイトバランス評価値が前記第1のエリアに分布するか否かを判定し、前記第1のエリアに分布するホワイトバランス評価値の個数を取得する第1のエリア判定手段と、
前記ホワイトバランス評価値が複数の前記第2のエリアのいずれかに分布するか否かを判定し、前記複数の第2のエリアの各第2のエリアに分布するホワイトバランス評価値の個数をそれぞれ取得する第2のエリア判定手段と、
前記第1のエリアと前記複数の第2のエリアのうち、前記第1のエリア判定手段と前記第2のエリア判定手段によって取得されたホワイトバランス評価値の個数が多い上位複数のエリアを求める上位エリア判定手段と、
前記上位エリア判定手段により求められた上位複数のエリアに分布するホワイトバランス評価値と、前記第1のホワイトバランス補正係数を基に、第2のホワイトバランス補正係数を算出する第2のホワイトバランス補正係数算出手段と、を備え、
前記上位エリア判定手段により求められた上位複数のエリアの各エリアに分布するホワイトバランス評価値の個数を基に、前記デジタル画像が屋外のシーンに対応するか否かに関する屋外情報を求めることを特徴とする画像処理装置。
First area setting means for presetting a first area including an area outside the white extraction range in which a white balance evaluation value corresponding to an outdoor green subject on a digital image is distributed;
Second area setting means for setting in advance a plurality of second areas corresponding to white extraction ranges in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed;
White balance evaluation value acquisition means for acquiring a white balance evaluation value from a digital image;
It is determined whether the white balance evaluation value acquired by the white balance evaluation value acquisition means is within a white extraction range, and a first white balance correction is performed based on the white balance evaluation value determined to be within the white extraction range First white balance correction coefficient calculating means for calculating a coefficient;
It is determined whether or not the white balance evaluation value acquired by the white balance evaluation value acquisition means is distributed in the first area, and the number of white balance evaluation values distributed in the first area is acquired. Area determination means;
It is determined whether the white balance evaluation value is distributed in any of the plurality of second areas, and the number of white balance evaluation values distributed in each second area of the plurality of second areas is determined respectively. Second area determination means for acquiring;
Of the first area and the plurality of second areas, an upper area for obtaining a plurality of upper areas having a large number of white balance evaluation values acquired by the first area determination means and the second area determination means. Area determination means;
Second white balance correction for calculating a second white balance correction coefficient based on white balance evaluation values distributed in a plurality of upper areas obtained by the upper area determination means and the first white balance correction coefficient Coefficient calculating means ,
Outdoor information on whether or not the digital image corresponds to an outdoor scene is obtained based on the number of white balance evaluation values distributed in each of the plurality of upper areas obtained by the upper area determination means. An image processing apparatus.
前記屋外情報として屋外加重率を求める屋外加重率算出手段を更に備え、
前記第2のホワイトバランス補正係数算出手段は、高色温度光源に対応したホワイトバランス係数と前記第1のホワイトバランス補正係数との前記屋外加重率に基づく加重平均により前記第2のホワイトバランス補正係数を算出することを特徴とする請求項に記載の画像処理装置。
An outdoor weight ratio calculating means for determining an outdoor weight ratio as the outdoor information;
The second white balance correction coefficient calculating means calculates the second white balance correction coefficient by a weighted average based on the outdoor weight ratio between a white balance coefficient corresponding to a high color temperature light source and the first white balance correction coefficient. The image processing apparatus according to claim 1 , wherein:
前記第2のエリア判定手段によって取得されたホワイトバランス評価値の個数それぞれに対して重み付けを下げる処理を行う重み付け手段を更に備え、
前記上位エリア判定手段は、前記第1のエリア判定手段によって取得されたホワイトバランス評価値の個数と、前記重み付け手段により重み付けされたホワイトバランス評価値の個数とを用いて、前記第1のエリアと前記複数の第2のエリアのうち、ホワイトバランス評価値の個数が多い上位複数のエリアを求め、
前記屋外加重率算出手段は、前記第1のエリア判定手段によって取得されたホワイトバランス評価値の個数と、前記重み付け手段により重み付けされたホワイトバランス評価値の個数とを用いて、前記上位エリア判定手段により求められた上位複数のエリアの各エリアに分布するホワイトバランス評価値の個数を基に前記屋外加重率を求めることを特徴とする請求項に記載の画像処理装置。
Weighting means for performing a process of reducing weighting for each of the number of white balance evaluation values acquired by the second area determination means;
The upper area determination unit uses the number of white balance evaluation values acquired by the first area determination unit and the number of white balance evaluation values weighted by the weighting unit to determine the first area and Of the plurality of second areas, a plurality of upper areas having a large number of white balance evaluation values are obtained,
The outdoor weight ratio calculation means uses the number of white balance evaluation values acquired by the first area determination means and the number of white balance evaluation values weighted by the weighting means, to determine the upper area determination means. The image processing apparatus according to claim 2 , wherein the outdoor weighting rate is obtained based on the number of white balance evaluation values distributed in each of a plurality of upper areas obtained by the step.
前記第2のエリア判定手段は、前記ホワイトバランス評価値が白色蛍光灯エリア及び昼白色蛍光灯エリアのいずれかに分布するか否かを判定することを特徴とする請求項1からのいずれか1項に記載の画像処理装置。 The said 2nd area determination means determines whether the said white balance evaluation value distributes in either a white fluorescent lamp area or a daylight white fluorescent lamp area, The any one of Claim 1 to 3 characterized by the above-mentioned. The image processing apparatus according to item 1. 光学系から入射した光を電気信号に変換して前記デジタル画像として出力する撮像手段を更に備え、
前記画像処理装置はデジタルカメラであることを特徴とする請求項1からのいずれか1項に記載の画像処理装置。
Further comprising imaging means for converting the light incident from the optical system into an electrical signal and outputting it as the digital image,
The image processing apparatus according to any one of 4 claims 1, wherein said image processing apparatus is a digital camera.
デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲外のエリアを含む第1のエリアを予め設定する第1のエリア設定処理と、
デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲に相当する第2のエリアを予め複数設定する第2のエリア設定処理と、
デジタル画像からホワイトバランス評価値を取得するホワイトバランス評価値取得処理と、
前記ホワイトバランス評価値取得処理により取得したホワイトバランス評価値が白抽出範囲内か否かを判定し、前記白抽出範囲内であると判定されたホワイトバランス評価値を基に第1のホワイトバランス補正係数を算出する第1のホワイトバランス補正係数算出処理と、
前記ホワイトバランス評価値取得処理により取得したホワイトバランス評価値が前記第1のエリアに分布するか否かを判定し、前記第1のエリアに分布するホワイトバランス評価値の個数を取得する第1のエリア判定処理と、
前記ホワイトバランス評価値が複数の前記第2のエリアのいずれかに分布するか否かを判定し、前記複数の第2のエリアの各第2のエリアに分布するホワイトバランス評価値の個数をそれぞれ取得する第2のエリア判定処理と、
前記第1のエリアと前記複数の第2のエリアのうち、前記第1のエリア判定処理と前記第2のエリア判定処理によって取得されたホワイトバランス評価値の個数が多い上位複数のエリアを求める上位エリア判定処理と、
前記上位エリア判定処理により求められた上位複数のエリアの各エリアに分布するホワイトバランス評価値の個数を基に、前記デジタル画像が屋外のシーンに対応するか否かに関する屋外情報を求める処理と、
前記上位エリア判定処理により求められた上位複数のエリアに分布するホワイトバランス評価値と、前記第1のホワイトバランス補正係数を基に、第2のホワイトバランス補正係数を算出する第2のホワイトバランス補正係数算出処理と、を行うことを特徴とする画像処理方法。
A first area setting process for presetting a first area including an area outside the white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed;
A second area setting process in which a plurality of second areas corresponding to a white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed are set;
White balance evaluation value acquisition processing for acquiring a white balance evaluation value from a digital image;
It is determined whether the white balance evaluation value acquired by the white balance evaluation value acquisition process is within a white extraction range, and the first white balance correction is performed based on the white balance evaluation value determined to be within the white extraction range A first white balance correction coefficient calculation process for calculating a coefficient;
It is determined whether the white balance evaluation value acquired by the white balance evaluation value acquisition process is distributed in the first area, and the number of white balance evaluation values distributed in the first area is acquired. Area determination processing;
It is determined whether the white balance evaluation value is distributed in any of the plurality of second areas, and the number of white balance evaluation values distributed in each second area of the plurality of second areas is determined respectively. A second area determination process to be acquired;
Of the first area and the plurality of second areas, an upper area for obtaining a plurality of upper areas having a large number of white balance evaluation values acquired by the first area determination process and the second area determination process. Area determination processing;
Based on the number of white balance evaluation values distributed in each area of a plurality of upper areas obtained by the upper area determination process, a process for obtaining outdoor information regarding whether or not the digital image corresponds to an outdoor scene;
Second white balance correction for calculating a second white balance correction coefficient based on white balance evaluation values distributed in a plurality of upper areas obtained by the upper area determination process and the first white balance correction coefficient And a coefficient calculation process .
デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲外のエリアを含む第1のエリアを予め設定する第1のエリア設定処理と、
デジタル画像上の屋外の緑の被写体に対応するホワイトバランス評価値が分布する、白抽出範囲に相当する第2のエリアを予め複数設定する第2のエリア設定処理と、
デジタル画像からホワイトバランス評価値を取得するホワイトバランス評価値取得処理と、
前記ホワイトバランス評価値取得処理により取得したホワイトバランス評価値が白抽出範囲内か否かを判定し、前記白抽出範囲内であると判定されたホワイトバランス評価値を基に第1のホワイトバランス補正係数を算出する第1のホワイトバランス補正係数算出処理と、
前記ホワイトバランス評価値取得処理により取得したホワイトバランス評価値が前記第1のエリアに分布するか否かを判定し、前記第1のエリアに分布するホワイトバランス評価値の個数を取得する第1のエリア判定処理と、
前記ホワイトバランス評価値が複数の前記第2のエリアのいずれかに分布するか否かを判定し、前記複数の第2のエリアの各第2のエリアに分布するホワイトバランス評価値の個数をそれぞれ取得する第2のエリア判定処理と、
前記第1のエリアと前記複数の第2のエリアのうち、前記第1のエリア判定処理と前記第2のエリア判定処理によって取得されたホワイトバランス評価値の個数が多い上位複数のエリアを求める上位エリア判定処理と、
前記上位エリア判定処理により求められた上位複数のエリアの各エリアに分布するホワイトバランス評価値の個数を基に、前記デジタル画像が屋外のシーンに対応するか否かに関する屋外情報を求める処理と、
前記上位エリア判定処理により求められた上位複数のエリアに分布するホワイトバランス評価値と、前記第1のホワイトバランス補正係数を基に、第2のホワイトバランス補正係数を算出する第2のホワイトバランス補正係数算出処理と、をコンピュータに実行させることを特徴とする画像処理プログラム。
A first area setting process for presetting a first area including an area outside the white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed;
A second area setting process in which a plurality of second areas corresponding to a white extraction range in which white balance evaluation values corresponding to outdoor green subjects on a digital image are distributed are set;
White balance evaluation value acquisition processing for acquiring a white balance evaluation value from a digital image;
It is determined whether the white balance evaluation value acquired by the white balance evaluation value acquisition process is within a white extraction range, and the first white balance correction is performed based on the white balance evaluation value determined to be within the white extraction range A first white balance correction coefficient calculation process for calculating a coefficient;
It is determined whether the white balance evaluation value acquired by the white balance evaluation value acquisition process is distributed in the first area, and the number of white balance evaluation values distributed in the first area is acquired. Area determination processing;
It is determined whether the white balance evaluation value is distributed in any of the plurality of second areas, and the number of white balance evaluation values distributed in each second area of the plurality of second areas is determined respectively. A second area determination process to be acquired;
Of the first area and the plurality of second areas, an upper area for obtaining a plurality of upper areas having a large number of white balance evaluation values acquired by the first area determination process and the second area determination process. Area determination processing;
Based on the number of white balance evaluation values distributed in each area of a plurality of upper areas obtained by the upper area determination process, a process for obtaining outdoor information regarding whether or not the digital image corresponds to an outdoor scene;
Second white balance correction for calculating a second white balance correction coefficient based on white balance evaluation values distributed in a plurality of upper areas obtained by the upper area determination process and the first white balance correction coefficient An image processing program that causes a computer to execute coefficient calculation processing .
請求項に記載の画像処理プログラムをコンピュータに実行可能に記録した記録媒体。 A recording medium on which the image processing program according to claim 7 is recorded so as to be executable on a computer.
JP2012035077A 2012-02-21 2012-02-21 Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer Active JP5915242B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012035077A JP5915242B2 (en) 2012-02-21 2012-02-21 Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012035077A JP5915242B2 (en) 2012-02-21 2012-02-21 Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer

Publications (2)

Publication Number Publication Date
JP2013172308A JP2013172308A (en) 2013-09-02
JP5915242B2 true JP5915242B2 (en) 2016-05-11

Family

ID=49265982

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012035077A Active JP5915242B2 (en) 2012-02-21 2012-02-21 Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer

Country Status (1)

Country Link
JP (1) JP5915242B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08251620A (en) * 1995-03-07 1996-09-27 Eastman Kodak Japan Kk Automatic white balance device
JP4063418B2 (en) * 1998-09-11 2008-03-19 イーストマン コダック カンパニー Auto white balance device
JP4029206B2 (en) * 2001-01-15 2008-01-09 株式会社ニコン Imaging device
JP3821729B2 (en) * 2002-03-07 2006-09-13 富士写真フイルム株式会社 Digital camera

Also Published As

Publication number Publication date
JP2013172308A (en) 2013-09-02

Similar Documents

Publication Publication Date Title
JP5321163B2 (en) Imaging apparatus and imaging method
JP5660341B2 (en) Imaging apparatus and imaging method
JP5553230B2 (en) Imaging apparatus and imaging processing method
US8319864B2 (en) Imaging apparatus and imaging method
JP5458937B2 (en) IMAGING DEVICE, IMAGING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM CONTAINING PROGRAM FOR EXECUTING THE IMAGING METHOD
JP4999871B2 (en) Imaging apparatus and control method thereof
JP5256947B2 (en) IMAGING DEVICE, IMAGING METHOD, AND COMPUTER-READABLE RECORDING MEDIUM RECORDING PROGRAM FOR EXECUTING THE METHOD
JP5211926B2 (en) Digital camera, image processing apparatus, and image processing program
JP2015005927A (en) Image processing apparatus and control method of the same
JP5048599B2 (en) Imaging device
JP5948997B2 (en) Imaging apparatus and imaging method
JP5146015B2 (en) Imaging apparatus and imaging method
JP2008017198A (en) Device and method for calculating light source color, and photographing device
JP5335964B2 (en) Imaging apparatus and control method thereof
JP5310331B2 (en) Imaging apparatus and imaging method
JP5673137B2 (en) Imaging apparatus and imaging method
JP4714561B2 (en) Imaging apparatus and imaging method
JP2005244423A (en) Photographing apparatus
JP5915242B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium recording the image processing program on a computer
JP5123010B2 (en) Imaging apparatus, imaging method, and program for causing computer included in imaging apparatus to execute imaging method
JP5799550B2 (en) Imaging apparatus, imaging method, and imaging program
JP5807378B2 (en) Imaging apparatus, imaging method, and imaging program
JP6573392B2 (en) Video signal processing apparatus, video signal processing method, and program
JP5849532B2 (en) Imaging apparatus and imaging method
JP5742237B2 (en) Imaging apparatus and imaging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150119

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20151118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160205

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160321

R151 Written notification of patent or utility model registration

Ref document number: 5915242

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151