[go: up one dir, main page]

JP2008283364A - Imaging apparatus, and white balance correcting method - Google Patents

Imaging apparatus, and white balance correcting method Download PDF

Info

Publication number
JP2008283364A
JP2008283364A JP2007124503A JP2007124503A JP2008283364A JP 2008283364 A JP2008283364 A JP 2008283364A JP 2007124503 A JP2007124503 A JP 2007124503A JP 2007124503 A JP2007124503 A JP 2007124503A JP 2008283364 A JP2008283364 A JP 2008283364A
Authority
JP
Japan
Prior art keywords
white balance
correction value
correction
image
value
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
JP2007124503A
Other languages
Japanese (ja)
Inventor
Tatsuya Kino
達哉 木野
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.)
Olympus Imaging Corp
Original Assignee
Olympus Imaging Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Imaging Corp filed Critical Olympus Imaging Corp
Priority to JP2007124503A priority Critical patent/JP2008283364A/en
Publication of JP2008283364A publication Critical patent/JP2008283364A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

<P>PROBLEM TO BE SOLVED: To provide an imaging apparatus capable of efficiently reducing color tone irregularity on a specific position in an image, which occurs correspondingly to a photographing distance, and to provide a white balance correcting method in the imaging apparatus. <P>SOLUTION: About image data obtained by photography wherein a white LED light source 117 is emitted, an in-face irregularity correction value for correcting color tone irregularity generated on a specific position is previously calculated for every photographing distance and stored in a flash ROM 103. In the case of white balance correction, white balance correction is applied to the image data obtained by the photography wherein the white LED light source 117 is emitted by correcting a white balance correction value about a block in which the in-face correction value is set, and about a block in which the in-face correction value is not set, white balance correction is applied to the image data without correcting the white balance correction value. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、白色光を投光するLEDを備えた撮像装置及びそのような撮像装置におけるホワイトバランス補正方法に関し、特に白色光の投光時の画像の色ムラを低減させることを可能とした撮像装置及びそのような撮像装置におけるホワイトバランス補正方法に関する。   The present invention relates to an imaging device including an LED that projects white light and a white balance correction method in such an imaging device, and in particular, imaging capable of reducing color unevenness in an image when white light is projected. The present invention relates to an apparatus and a white balance correction method in such an imaging apparatus.

一般に暗所での撮影においては、キセノン管を用いた閃光発光装置(以下、フラッシュ装置という)が用いられている。このキセノン管を用いたフラッシュ装置による発光は極短時間の閃光発光である。したがって、至近撮影では発光量制御が追いつかず発光量が大きくなり、全体的に白っぽくなる(このような現象は白とびと呼ばれる)という問題があった。そうした背景を踏まえ、近年、白色発光ダイオード(以下、白色LED)を用いたフラッシュ装置を備えたカメラが開発されている。   Generally, a flash light emitting device using a xenon tube (hereinafter referred to as a flash device) is used for photographing in a dark place. The light emitted from the flash device using the xenon tube is flash light emission for a very short time. Therefore, in close-up photography, there is a problem that the light emission amount control cannot catch up and the light emission amount increases, and the whole becomes whitish (this phenomenon is called overexposure). In view of such a background, in recent years, a camera having a flash device using a white light emitting diode (hereinafter, white LED) has been developed.

白色LEDを用いることでフラッシュ光の連続投射が可能となり、至近撮影の際も自動露出機能(以下、AEという)により適正な明るさで撮影を行えるようになってきている。このような白色LEDを用いた撮影によって得られた画像内の色味の補正に関する提案として、例えば、特許文献1では、実際にフラッシュ装置から照射される光の色温度に応じてホワイトバランス(以下、WBという)補正情報と、個々のフラッシュ装置を構成する白色LEDの製品毎のバラツキを低減するための修正情報とを利用して、より正確なホワイトバランス補正情報を算出することで白色LEDの色味の個体差を吸収する手法が提案されている。   By using the white LED, it is possible to continuously project flash light, and it has become possible to shoot at an appropriate brightness by an automatic exposure function (hereinafter referred to as AE) at the time of close-up shooting. As a proposal regarding correction of color in an image obtained by photographing using such a white LED, for example, in Patent Document 1, white balance (hereinafter referred to as a white balance) according to the color temperature of light actually emitted from a flash device is described. WB)) and correction information for reducing the variation of each white LED that constitutes each flash device for each product to calculate more accurate white balance correction information. A method for absorbing individual differences in color has been proposed.

また、特許文献2では、基準距離における白色LEDのWB補正情報を持たせておき、基準距離におけるWB補正情報を基に被写体までの距離(以下、撮影距離という)に応じたWB補正情報を推定することで、撮影距離毎の色味の差を吸収する手法が提案されている。
特開2004−228723号公報 特開2006−108970号公報
Further, in Patent Document 2, WB correction information for white LEDs at a reference distance is provided, and WB correction information corresponding to a distance to a subject (hereinafter referred to as a shooting distance) is estimated based on the WB correction information at the reference distance. Thus, a technique for absorbing a difference in color for each shooting distance has been proposed.
JP 2004-228723 A JP 2006-108970 A

ここで、一般的な白色LEDは、大きく分けて赤・青・緑の3色LEDを組み合わせて白色光を得るものと、青色に発光するLEDとこの青色LEDからの青色光を波長変換する蛍光体とを組み合わせて白色光を得るものとの2種類がある。特に、青色LEDと蛍光体とを使用して白色光を得る白色LEDに関しては、白色LEDを構成する複数の青色LED素子の配置や各青色LED素子の発光比率に起因して、フラッシュ撮影を行った場合に、画像内の、撮影距離に対応した特定の位置に色味のムラ(以下、面内ムラという)が発生する。   Here, a general white LED is roughly divided into a combination of a red, blue, and green color LED to obtain white light, a blue light emitting LED, and a fluorescent light for converting the wavelength of the blue light from the blue LED. There are two types, one that obtains white light by combining with the body. In particular, with respect to a white LED that obtains white light using a blue LED and a phosphor, flash photography is performed due to the arrangement of a plurality of blue LED elements constituting the white LED and the light emission ratio of each blue LED element. In such a case, color unevenness (hereinafter referred to as in-plane unevenness) occurs at a specific position in the image corresponding to the shooting distance.

特許文献1及び2はともに白色LEDを構成するLED素子1個体毎に対する画像内の面内ムラに関しての対策法ではないため、上述したような画像内の面内ムラが発生してもその影響を修正することができない。   Since both Patent Documents 1 and 2 are not countermeasures for in-plane unevenness in an image for each LED element constituting a white LED, even if in-plane unevenness in the image as described above occurs, the influence thereof is affected. It cannot be corrected.

本発明は、上記の事情に鑑みてなされたものであり、撮影距離に対応して発生する、画像内の特定の位置における色味のムラを効率良く低減することを可能とする撮像装置及びそのような撮像装置におけるホワイトバランス補正方法を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an imaging apparatus capable of efficiently reducing unevenness in color at a specific position in an image, which occurs in response to a shooting distance, and the imaging apparatus An object of the present invention is to provide a white balance correction method in such an imaging apparatus.

上記の目的を達成するために、本発明の第1の態様の撮像装置は、白色光を投光するLEDを備えた撮像装置において、前記LEDを発光させた撮影により撮像信号を得る撮像部と、前記撮像信号から生成される画像における色味のムラの撮影距離毎の発生位置と該発生位置における画像のホワイトバランス補正を行うためのホワイトバランス補正値を修正するための修正値とを修正情報として記憶する記憶部と、前記撮影時の撮影距離を得る測距部と、前記得られた撮影距離に対応する修正情報を前記記憶部から読み出し、該修正情報を用いて前記ホワイト補正値を修正する修正部と、前記修正されたホワイトバランス補正値を用いて前記画像のホワイトバランス補正を行うホワイトバランス補正部とを具備することを特徴とする。   In order to achieve the above object, an imaging device according to a first aspect of the present invention is an imaging device including an LED that projects white light, and an imaging unit that obtains an imaging signal by imaging using the LED. The correction information includes the generation position of the color unevenness in the image generated from the imaging signal for each shooting distance and the correction value for correcting the white balance correction value for performing the white balance correction of the image at the generation position. As a storage unit, a distance measuring unit for obtaining a shooting distance at the time of shooting, and correction information corresponding to the obtained shooting distance is read from the storage unit, and the white correction value is corrected using the correction information. And a white balance correction unit that performs white balance correction of the image using the corrected white balance correction value.

また、上記の目的を達成するために、本発明の第2の態様のホワイトバランス補正方法は、白色光を投光するLEDを備えた撮像装置によって得られる画像のホワイトバランス補正を行うホワイトバランス補正方法であって、前記LEDを発光させた撮影により撮像信号を得て、前記撮影時の撮影距離を得て、前記撮像信号から生成される画像における色味のムラの前記撮影距離毎の発生位置と該発生位置における画像のホワイトバランス補正を行うためのホワイトバランス補正値を修正するための修正値とを修正情報として算出して記憶部に記憶させ、前記撮影距離に対応する修正情報を前記記憶部から読み出し、該修正情報を用いて前記ホワイトバランス補正値を修正し、前記修正されたホワイトバランス補正値を用いて前記画像のホワイトバランス補正を行うことを特徴とする。   In order to achieve the above object, the white balance correction method according to the second aspect of the present invention is a white balance correction that performs white balance correction of an image obtained by an imaging device including an LED that projects white light. A method of obtaining an imaging signal by photographing with the LED emitting light, obtaining a photographing distance at the time of photographing, and occurrence position of uneven coloring in an image generated from the imaging signal for each photographing distance And a correction value for correcting the white balance correction value for correcting the white balance of the image at the generation position are calculated and stored in the storage unit, and the correction information corresponding to the shooting distance is stored in the storage unit. The white balance correction value is corrected using the correction information, and the white of the image is corrected using the corrected white balance correction value. And performing Balance correction.

撮影距離に対応して発生する、画像内の特定の位置における色味のムラを効率良く低減することを可能とする撮像装置及びそのような撮像装置におけるホワイトバランス補正方法を提供することができる。   It is possible to provide an imaging apparatus capable of efficiently reducing unevenness in color at a specific position in an image, which occurs in accordance with the shooting distance, and a white balance correction method in such an imaging apparatus.

以下、図面を参照して本発明の実施形態について説明する。
まず、本実施形態の撮像装置の一例としてのデジタルカメラの内部回路の構成について説明する。図1は、本実施形態に係るデジタルカメラの内部構成を示すブロック図である。図1に示すデジタルカメラは、マイクロコンピュータ101と、操作部102と、Flashメモリ103と、レンズ104と、撮像素子105と、CDS/AGC回路106と、A/D変換回路107と、バス108と、SDRAM109と、画像信号処理回路110と、JPEG処理部111と、メモリインターフェース(I/F)112と、記録媒体113と、LCDドライバ114と、LCD115と、LED発光回路116と、白色LED光源117とを有して構成されている。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
First, the configuration of an internal circuit of a digital camera as an example of the imaging apparatus of the present embodiment will be described. FIG. 1 is a block diagram showing an internal configuration of the digital camera according to the present embodiment. A digital camera shown in FIG. 1 includes a microcomputer 101, an operation unit 102, a flash memory 103, a lens 104, an image sensor 105, a CDS / AGC circuit 106, an A / D conversion circuit 107, and a bus 108. SDRAM 109, image signal processing circuit 110, JPEG processing unit 111, memory interface (I / F) 112, recording medium 113, LCD driver 114, LCD 115, LED light emitting circuit 116, and white LED light source 117. And is configured.

マイクロコンピュータ101は、デジタルカメラの各種シーケンスを統括的に制御する。マイクロコンピュータ101には、操作部102と、Flashメモリ103とが接続されている。操作部102は、電源ボタン、レリーズボタン、各種入力キー等の操作部材である。ユーザによって操作部102が操作されることにより、マイクロコンピュータ101は、操作部102の操作に応じた各種シーケンスを実行する。Flashメモリ103は、ホワイトバランス補正の際に用いられる修正情報やこの修正情報を求めるための各種の情報等の各種パラメータを記憶する記憶部としての機能を有する。マイクロコンピュータ101は、Flashメモリ103から各種シーケンスに必要なパラメータを読み込み、図1の各部に対して指示を出す。   The microcomputer 101 comprehensively controls various sequences of the digital camera. An operation unit 102 and a flash memory 103 are connected to the microcomputer 101. The operation unit 102 is an operation member such as a power button, a release button, and various input keys. When the operation unit 102 is operated by the user, the microcomputer 101 executes various sequences according to the operation of the operation unit 102. The flash memory 103 has a function as a storage unit that stores various parameters such as correction information used in white balance correction and various information for obtaining the correction information. The microcomputer 101 reads parameters necessary for various sequences from the flash memory 103 and issues instructions to each unit in FIG.

レンズ104は、図示しない被写体からの光学像を集光して撮像素子105に入射させるための光学系と、撮像素子105への光の入射量を調節するための絞りとを有して構成されている。レンズ104の各部は、マイクロコンピュータ101からの指示により、図示しない絞り駆動機構、レンズ駆動機構によって駆動される。   The lens 104 is configured to include an optical system for condensing an optical image from a subject (not shown) so as to be incident on the image sensor 105, and a diaphragm for adjusting the amount of light incident on the image sensor 105. ing. Each part of the lens 104 is driven by an aperture driving mechanism and a lens driving mechanism (not shown) according to instructions from the microcomputer 101.

撮像部の機能を有する撮像素子105は、ベイヤ配列のカラーフィルタが画素を構成するフォトダイオードの前面に配置されて構成された撮像素子であり、レンズ104により集光された光を、各画素を構成するフォトダイオードで受光し、光電変換を行うことで、光の量を電荷量としてCDS/AGC回路106に出力する。ここで、ベイヤ配列は、水平方向にR画素とG画素とが交互に配置されるラインと、水平方向にG画素とB画素とが交互に配置されるラインとを垂直方向に交互に配置することで構成される画素配列である。なお、撮像素子105は、CMOS方式でもCCD方式でも良い。   The image sensor 105 having the function of the image capturing unit is an image sensor in which a Bayer array color filter is disposed in front of a photodiode constituting a pixel, and the light collected by the lens 104 is converted into each pixel. Light is received by a constituent photodiode and subjected to photoelectric conversion, whereby the amount of light is output to the CDS / AGC circuit 106 as a charge amount. Here, in the Bayer array, lines in which R pixels and G pixels are alternately arranged in the horizontal direction and lines in which G pixels and B pixels are alternately arranged in the horizontal direction are alternately arranged in the vertical direction. This is a pixel array. Note that the image sensor 105 may be a CMOS method or a CCD method.

CDS(相関2重サンプリング)/AGC(オートゲインコントロール)回路106は、撮像素子105から読み出される電気信号(アナログ撮像信号)に対し、リセットノイズ等を低減した上で波形整形を行い、更に画像の明るさが目的の明るさとなるようにゲインアップを行う。A/D変換回路107は、CDS/AGC回路106において前処理されたアナログ撮像信号をデジタル撮像信号(以下、RAW画像データという)に変換する。   A CDS (correlated double sampling) / AGC (auto gain control) circuit 106 performs waveform shaping on an electric signal (analog image signal) read from the image sensor 105 while reducing reset noise and the like, and further performs image shaping. Gain is increased so that the brightness becomes the target brightness. The A / D conversion circuit 107 converts the analog imaging signal preprocessed by the CDS / AGC circuit 106 into a digital imaging signal (hereinafter referred to as RAW image data).

バス108は、デジタルカメラ内部で発生した各種データをカメラ内の各部に転送するための転送路であり、マイクロコンピュータ101と、A/D変換回路107と、SDRAM109と、画像信号処理回路110と、JPEG処理部111と、メモリI/F112と、LCDドライバ114とに接続されている。A/D変換回路107で得られた画像データは、バス108を介して一旦SDRAM109に記憶される。SDRAM109は、A/D変換回路107において得られたRAW画像データや、画像信号処理回路110、JPEG処理部111において処理される画像データ等の各種データが一時的に記憶される。   A bus 108 is a transfer path for transferring various data generated inside the digital camera to each unit in the camera. The microcomputer 101, the A / D conversion circuit 107, the SDRAM 109, the image signal processing circuit 110, The JPEG processing unit 111, the memory I / F 112, and the LCD driver 114 are connected. The image data obtained by the A / D conversion circuit 107 is temporarily stored in the SDRAM 109 via the bus 108. The SDRAM 109 temporarily stores various data such as RAW image data obtained by the A / D conversion circuit 107 and image data processed by the image signal processing circuit 110 and the JPEG processing unit 111.

画像信号処理回路110は、SDRAM109に記憶されたRAW画像データを読み出して画像処理を施す。この画像信号処理回路110は、ホワイトバランス(WB)補正回路110aと、同時化回路110bと、色変換回路110cと、ガンマ変換回路110dと、自動合焦(AF)処理回路110eとを有している。   The image signal processing circuit 110 reads out RAW image data stored in the SDRAM 109 and performs image processing. The image signal processing circuit 110 includes a white balance (WB) correction circuit 110a, a synchronization circuit 110b, a color conversion circuit 110c, a gamma conversion circuit 110d, and an automatic focusing (AF) processing circuit 110e. Yes.

ホワイトバランス補正部としての機能を有するWB補正回路110aは、SDRAM109から読み出されたRAW画像データのうちのRデータおよびBデータに対し、修正部としての機能を有するマイクロコンピュータ101から指示されるホワイトバランス補正値を掛け合わせることでホワイトバランス補正を行う。同時化回路110bは、WB補正回路110aから出力される画像データから、R、G、Bの3色を1画素成分とする画像データを生成する。色変換回路110cは、同時化回路110bから出力される画像データに対し、マイクロコンピュータ101から指示されるカラーマトリクスを掛け合わせる線形変換を行って画像データの色を補正し、またマイクロコンピュータ101から指示される彩度・色相係数を用いて演算により画像の色味を変化させる。ガンマ変換回路110dは、色変換回路110cから出力される画像データに対してガンマ変換(階調変換)処理を施し、画像データの階調を表示や印刷に適するように補正する。   The WB correction circuit 110a having a function as a white balance correction unit is a white instruction designated by the microcomputer 101 having a function as a correction unit for R data and B data in the RAW image data read from the SDRAM 109. White balance correction is performed by multiplying the balance correction value. The synchronization circuit 110b generates image data having the three colors R, G, and B as one pixel component from the image data output from the WB correction circuit 110a. The color conversion circuit 110c corrects the color of the image data by performing a linear conversion by multiplying the image data output from the synchronization circuit 110b by the color matrix specified by the microcomputer 101, and also instructs the image data from the microcomputer 101. The color of the image is changed by calculation using the saturation and hue coefficients. The gamma conversion circuit 110d performs gamma conversion (gradation conversion) processing on the image data output from the color conversion circuit 110c, and corrects the gradation of the image data so as to be suitable for display and printing.

測距部としての機能を有するAF処理回路110eは、SDRAM109に記憶された画像データの所定領域毎に輝度信号を生成し、この所定領域毎に生成した輝度信号を累積してAF評価値を求め、求めたAF評価値をマイクロコンピュータ101に送る。マイクロコンピュータ101は、AF処理回路110eにおいて求められたAF評価値に基づいてレンズ104のAF調整を行う。また、AF処理回路110eは、合焦時のレンズ104の位置から撮影時の被写体までの距離(撮影距離)を求めることも行う。   The AF processing circuit 110e having a function as a distance measuring unit generates a luminance signal for each predetermined area of the image data stored in the SDRAM 109, and accumulates the luminance signals generated for each predetermined area to obtain an AF evaluation value. The obtained AF evaluation value is sent to the microcomputer 101. The microcomputer 101 performs AF adjustment of the lens 104 based on the AF evaluation value obtained by the AF processing circuit 110e. The AF processing circuit 110e also obtains the distance (shooting distance) from the position of the lens 104 at the time of focusing to the subject at the time of shooting.

画像信号処理回路110のガンマ変換回路110dにおいて、画像処理が施された画像データは、再度SDRAM109に記憶される。   Image data that has been subjected to image processing in the gamma conversion circuit 110d of the image signal processing circuit 110 is stored in the SDRAM 109 again.

JPEG処理部111は、SDRAM109から画像処理がなされた画像データを読み出し、JPEG方式などに従って圧縮を行う。また、JPEG処理部111は、記録媒体113に記録されるJPEG圧縮画像データを読み出して、伸張処理を施す機能も有している。JPEG処理部111により圧縮された画像データはSDRAM109に記憶された後、メモリI/F112を介して記録媒体113に記録される。ここで、記録媒体113は、例えばデジタルカメラ本体に着脱可能なメモリカードからなる記録媒体であるが、特に限定されるものではない。   The JPEG processing unit 111 reads out image data that has been subjected to image processing from the SDRAM 109, and performs compression according to the JPEG method or the like. The JPEG processing unit 111 also has a function of reading JPEG compressed image data recorded on the recording medium 113 and performing expansion processing. The image data compressed by the JPEG processing unit 111 is stored in the SDRAM 109 and then recorded on the recording medium 113 via the memory I / F 112. Here, the recording medium 113 is, for example, a recording medium including a memory card that can be attached to and detached from the digital camera body, but is not particularly limited.

LCDドライバ114は、LCD115への画像の表示を行うものである。記録媒体113に記録されたJPEG圧縮画像データを表示する場合には、JPEG処理部111により、記録媒体113に記録されているJPEG圧縮画像データが読み出され、伸張処理が施された後で一旦SDRAM109に記憶される。LCDドライバ114は、その画像データをSDRAM109から読み出し、映像信号へ変換した後、この映像信号に基づいてLCD115に画像表示を行う。   The LCD driver 114 displays an image on the LCD 115. When displaying the JPEG compressed image data recorded on the recording medium 113, the JPEG processing unit 111 reads out the JPEG compressed image data recorded on the recording medium 113, and after performing decompression processing, Stored in the SDRAM 109. The LCD driver 114 reads the image data from the SDRAM 109, converts it into a video signal, and then displays an image on the LCD 115 based on the video signal.

LED発光回路116は、白色LED光源117を構成する各青色LED素子を発光駆動させる。白色LED光源117は、図2に示すように、青色光を発する青色LED素子117aと、青色光が当たると黄色光を発する蛍光体117bとを有し、青色LED素子117aにより発せられる青色光と蛍光体117bから発せられる黄色光とを混色させることによって白色光を照射する。この白色LED光源117は、例えばフラッシュ装置として利用することができる。   The LED light emitting circuit 116 drives each blue LED element constituting the white LED light source 117 to emit light. As shown in FIG. 2, the white LED light source 117 includes a blue LED element 117a that emits blue light, and a phosphor 117b that emits yellow light when the blue light strikes, and the blue light emitted by the blue LED element 117a and White light is irradiated by mixing yellow light emitted from the phosphor 117b. The white LED light source 117 can be used as a flash device, for example.

ここで、白色LED光源117をフラッシュ装置として用いたフラッシュ撮影時に、マイクロコンピュータ101は、AF処理回路110eから得られた撮影距離に基づいてFlashメモリ103内に記憶されている修正情報を読み出して、ホワイトバランス補正の際に用いられるホワイトバランス補正値を修正し、修正したホワイトバランス補正値をWB補正回路110aに出力する。ここで、Flashメモリ103に記憶されている修正情報は、撮影距離に対応した面内ムラの補正値(詳細は後述する)である。   Here, at the time of flash photographing using the white LED light source 117 as a flash device, the microcomputer 101 reads the correction information stored in the flash memory 103 based on the photographing distance obtained from the AF processing circuit 110e, The white balance correction value used in white balance correction is corrected, and the corrected white balance correction value is output to the WB correction circuit 110a. Here, the correction information stored in the flash memory 103 is an in-plane unevenness correction value (details will be described later) corresponding to the shooting distance.

一般に、図2に示すような青色LED素子と蛍光体とを使用して白色光を得る白色LED光源の面内ムラは、撮影距離に対応して画像内の特定の位置に発生する。また、その面内ムラは、白色(R=G=B)に対して黄色味(R=G>B)を帯びた形となる。本実施形態では、面内ムラを補正するために、撮影距離毎に、面内ムラの発生位置とその位置における面内ムラの補正値とを予め測定しておき、それらをFlashメモリ103に記憶させておく。   In general, in-plane unevenness of a white LED light source that obtains white light using a blue LED element and a phosphor as shown in FIG. 2 occurs at a specific position in the image corresponding to the shooting distance. In addition, the in-plane unevenness takes a yellowish color (R = G> B) with respect to white color (R = G = B). In this embodiment, in order to correct the in-plane unevenness, the position where the in-plane unevenness is generated and the correction value of the in-plane unevenness at that position are measured in advance for each shooting distance, and are stored in the flash memory 103. Let me.

以下、修正情報としての面内ムラ補正値の算出手法について説明する。
面内ムラ補正値は、画像を(m×n)のブロックに分割し、この分割したブロック毎に算出する。図3は、ある撮影距離での画像を10×10のブロックに分割した場合の例を表している。このようにして分割した各ブロックにおいて、R,G,Bの各成分の平均値を求め、この求めた平均値のR、G、Bに対してG/B値(第1の比率)を算出する。そして、全ブロックの中で最小のG/B値を基準値G/B_ijとして検出する。さらに、各ブロックにおけるG/B値G/B_mnと基準値G/B_ijとの比率(第2の比率)を求め、この第2の比率が、所定のスレッシュ値以上であるか否かを判定して、所定のスレッシュ値以上である場合に、そのブロックに対する面内ムラ補正値を第2の比率である(G/B_mn)/(G/B_ij)に設定する。なお、青色LED素子と蛍光体とを使用して白色光を得る白色LED光源の面内ムラは、撮影距離が近い場合に狭い範囲に濃い色味を持ち、撮影距離が遠い場合には広い範囲に薄い色味を持つ傾向がある。そこで、撮影距離毎の色味の濃さの違いを考慮して、そのブロックに面内ムラ補正値を設定するか否かを判定するための所定のスレッシュ値の大きさを変更する。即ち、撮影距離が近い場合には、遠い場合に対して大きなスレッシュ値に変更する。その結果、図4(a)や図4(b)に示すような、撮影距離に対応した特定位置のブロックに対してのみ面内ムラ補正値W_mnが設定される。図4(a)は近距離の撮影距離1(例えば、10cm)での面内ムラ補正値を示し、図4(b)は遠距離の撮影距離2(例えば、20cm)での面内ムラ補正値を示す。なお、面内ムラは白色LEDを構成する青色LED素子の配置によっても異なるものとなるが、図4(a)及び図4(b)は青色LED素子の配置は同じで距離だけを変えた場合を示している。図4(a)及び図4(b)からも分かるように、遠距離の撮影距離の場合にはスレッシュ値が小さくなるので、面内ムラ補正値が設定されるブロックの数が近距離の撮影距離に対して多くなる。
Hereinafter, a method for calculating the in-plane unevenness correction value as correction information will be described.
The in-plane unevenness correction value is calculated for each divided block obtained by dividing the image into (m × n) blocks. FIG. 3 shows an example in which an image at a certain shooting distance is divided into 10 × 10 blocks. In each block divided in this way, an average value of each component of R, G, B is obtained, and a G / B value (first ratio) is calculated for R, G, B of the obtained average value. To do. Then, the smallest G / B value in all blocks is detected as the reference value G / B_ij. Further, a ratio (second ratio) between the G / B value G / B_mn and the reference value G / B_ij in each block is obtained, and it is determined whether or not the second ratio is equal to or greater than a predetermined threshold value. Thus, when the threshold value is equal to or greater than the predetermined threshold value, the in-plane unevenness correction value for the block is set to the second ratio (G / B_mn) / (G / B_ij). In-plane unevenness of a white LED light source that obtains white light using a blue LED element and a phosphor has a deep color in a narrow range when the shooting distance is short, and a wide range when the shooting distance is long. Tend to have a light color. Therefore, in consideration of the difference in color intensity at each shooting distance, the size of a predetermined threshold value for determining whether or not to set an in-plane unevenness correction value for the block is changed. That is, when the shooting distance is short, the threshold value is changed to a larger threshold value than when the shooting distance is long. As a result, the in-plane unevenness correction value W_mn is set only for a block at a specific position corresponding to the shooting distance, as shown in FIGS. 4 (a) and 4 (b). FIG. 4A shows the in-plane unevenness correction value at a short shooting distance 1 (for example, 10 cm), and FIG. 4B shows the in-plane unevenness correction at a long distance shooting distance 2 (for example, 20 cm). Indicates the value. The in-plane unevenness varies depending on the arrangement of the blue LED elements constituting the white LED, but in FIGS. 4A and 4B, the arrangement of the blue LED elements is the same and only the distance is changed. Is shown. As can be seen from FIG. 4A and FIG. 4B, the threshold value is small in the case of a long-distance shooting distance, so that the number of blocks for which in-plane unevenness correction values are set is short-distance shooting. Increase with distance.

図5は、修正情報としての面内ムラの補正値算出処理の流れについて示すフローチャートである。この処理はデジタルカメラの製造時や調整時等で行われる処理である。なお、図5の例は、無彩色の被写体(例えば白色や灰色のチャート)に対して白色LED光源117を発光させた状態で撮影を行って画像データを得る場合を想定している。   FIG. 5 is a flowchart showing a flow of correction value calculation processing for in-plane unevenness as correction information. This processing is performed at the time of manufacturing or adjusting the digital camera. Note that the example in FIG. 5 assumes a case where image data is obtained by shooting an achromatic subject (for example, a white or gray chart) while the white LED light source 117 is illuminated.

まず、調整時においては、デジタルカメラが図示しない調整機に設置され、デジタルカメラと被写体との距離がある撮影距離(Dk=D1)に設定されると(ステップS501)、その状態で撮影が行われる(ステップS502)。撮影の実行により、撮像素子105、CDS/AGC回路106、A/D変換回路107を介して得られるRAW画像データがSDRAM109に記憶される(ステップS503)。   First, at the time of adjustment, when the digital camera is installed on an adjusting machine (not shown) and the distance between the digital camera and the subject is set to a certain shooting distance (Dk = D1) (step S501), shooting is performed in that state. (Step S502). By executing the shooting, RAW image data obtained through the image sensor 105, the CDS / AGC circuit 106, and the A / D conversion circuit 107 is stored in the SDRAM 109 (step S503).

次に、面内ムラ補正値算出に用いられる各種パラメータの初期値の設定がマイクロコンピュータ101によって行われる(ステップS504)。具体的には、G/B値の基準となるブロックの行数を示すパラメータiが0に、列数を示すパラメータjが0に、G/B値の最小値を示すパラメータG/B_minが0に設定される。その後、Flashメモリ103に記憶されている分割ブロック数(m×n)がマイクロコンピュータ101によって読み出され、分割ブロック数が設定される(ステップS505)。例えば、図2の例では(m×n)=10×10である。分割ブロック数が設定された後、マイクロコンピュータ101によって、SDRAM109に記憶されているRAW画像データが読み出され、読み出されたRAW画像データが(m×n)のブロックに分割される(ステップS506)。RAW画像データが(m×n)のブロックに分割された後、分割されたブロック毎に、G成分及びB成分の平均値が演算され、演算された平均値に対してG/B値G/B_mnが演算される(ステップS507)。   Next, initial values of various parameters used for calculating in-plane unevenness correction values are set by the microcomputer 101 (step S504). Specifically, the parameter i indicating the number of rows of the block serving as a reference for the G / B value is 0, the parameter j indicating the number of columns is 0, and the parameter G / B_min indicating the minimum G / B value is 0. Set to Thereafter, the number of divided blocks (m × n) stored in the flash memory 103 is read by the microcomputer 101, and the number of divided blocks is set (step S505). For example, in the example of FIG. 2, (m × n) = 10 × 10. After the division block number is set, the microcomputer 101 reads out the RAW image data stored in the SDRAM 109 and divides the read out RAW image data into (m × n) blocks (step S506). ). After the RAW image data is divided into (m × n) blocks, an average value of the G component and the B component is calculated for each of the divided blocks, and a G / B value G / is calculated with respect to the calculated average value. B_mn is calculated (step S507).

ブロック毎のG/B_mnが算出された後、全ブロックの中からG/B_mnの基準値G/B_ijを検出するための面内ムラ補正基準値算出演算が行われる。この面内ムラ補正基準値算出演算においては、まずブロックの行数を示すパラメータmが1に、列数を示すパラメータnが1に、G/B_minがG/B_11に設定される(ステップS508)。ここで、図2の例では(m,n)=(1,1)は1行1列目である画面内左上端のブロックを示すものとなる。   After G / B_mn for each block is calculated, an in-plane unevenness correction reference value calculation operation for detecting the reference value G / B_ij of G / B_mn from all blocks is performed. In this in-plane unevenness correction reference value calculation calculation, first, the parameter m indicating the number of rows in the block is set to 1, the parameter n indicating the number of columns is set to 1, and G / B_min is set to G / B_11 (step S508). . Here, in the example of FIG. 2, (m, n) = (1, 1) indicates the upper left block in the screen which is the first row and the first column.

次に、G/B_mnがG/B_minよりも大きいか否かが判定される(ステップS509)。ステップS509の判定において、G/B_mnがG/B_min以下である場合には、iがmに、jがnに、G/B_minがG/B_mnに設定される(ステップS510)。なお、初回はG/B_mnとG/B_minとがともにG/B_11であるのでG/B_mnとG/B_minとが等しくなり、必ずステップS510の処理が行われる。一方、ステップS509の判定において、G/B_mnがG/B_minよりも大きい場合には、ステップS510の処理が行われない。   Next, it is determined whether G / B_mn is larger than G / B_min (step S509). If it is determined in step S509 that G / B_mn is equal to or smaller than G / B_min, i is set to m, j is set to n, and G / B_min is set to G / B_mn (step S510). Since G / B_mn and G / B_min are both G / B_11 for the first time, G / B_mn and G / B_min are equal, and the process of step S510 is always performed. On the other hand, if it is determined in step S509 that G / B_mn is larger than G / B_min, the process in step S510 is not performed.

次に、nが10未満であるか否かが判定される(ステップS511)。ステップS511の判定において、nが10未満である場合にはnに1が加算された後(ステップS512)、次の列のブロックに対してステップS509の判定が再び行われる。一方、ステップS511の判定において、nが10になった場合には、1行分のブロックに対する最小値の検出が終了したとして、mが10未満であるか否かが判定される(ステップS513)。ステップS513の判定において、mが10未満である場合にはmに1が加算され、nが1に設定された後(ステップS514)、次の行の1列目のブロックに対してステップS509の判定が再び行われる。一方、ステップS513の判定において、mが10になった場合には、画像内の全ブロックに対する最小値の検出が終了したとして、次の面内ムラ補正値の算出処理が行われる。即ち、その時点のG/B_minが基準値G/B_ijとなる。この基準値G/B_ijのブロックは画像内で最も白色に近いブロックとなっている。   Next, it is determined whether n is less than 10 (step S511). If n is less than 10 in the determination in step S511, 1 is added to n (step S512), and then the determination in step S509 is performed again for the block in the next column. On the other hand, if n is 10 in the determination in step S511, it is determined whether or not m is less than 10 assuming that the detection of the minimum value for the block for one row is completed (step S513). . In the determination in step S513, when m is less than 10, 1 is added to m, and after n is set to 1 (step S514), the block of the first column in the next row is set in step S509. The determination is made again. On the other hand, if m is 10 in the determination in step S513, it is determined that the detection of the minimum value for all blocks in the image has been completed, and the next in-plane unevenness correction value calculation process is performed. That is, G / B_min at that time becomes the reference value G / B_ij. The block of the reference value G / B_ij is the block closest to white in the image.

面内ムラ補正値の算出演算では、まず撮影距離Dkに対応したスレッシュ値G/B_TH_DkがFlashメモリ103から読み出される(ステップS515)。次に、mが1に、nが1に設定される(ステップS516)。その後、撮影距離に応じたスレッシュ値G/B_TH_Dkと、各ブロックにおけるG/B値G/B_mnと基準値G/B_ijとの比率(G/B_mn)/(G/B_ij)とが比較され、この比率(第2の比率)がスレッシュ値を超えているか否かが判定される(ステップS517)。ステップS517の判定において、(G/B_mn)/(G/B_ij)がスレッシュ値を超えている場合には、基準のブロックに対してそのブロックの色味が異なっている(具体的には基準のブロックに対して黄色味を帯びている)ので、ブロック(m,n)における面内ムラ補正値W_mnがステップS517において算出された第2の比率である(G/B_mn)/(G/B_ij)に設定される(ステップS518)。一方、ステップS517の判定において、(G/B_mn)/(G/B_ij)がスレッシュ値以下の場合には、ステップS518の処理が行われない。この場合には、例えばW_mnを0としておく。   In the calculation for calculating the in-plane unevenness correction value, the threshold value G / B_TH_Dk corresponding to the shooting distance Dk is first read from the flash memory 103 (step S515). Next, m is set to 1 and n is set to 1 (step S516). Thereafter, the threshold value G / B_TH_Dk corresponding to the shooting distance is compared with the ratio (G / B_mn) / (G / B_ij) between the G / B value G / B_mn and the reference value G / B_ij in each block. It is determined whether or not the ratio (second ratio) exceeds the threshold value (step S517). If it is determined in step S517 that (G / B_mn) / (G / B_ij) exceeds the threshold value, the color of the block is different from the reference block (specifically, the reference The in-plane unevenness correction value W_mn in the block (m, n) is the second ratio calculated in step S517 (G / B_mn) / (G / B_ij). (Step S518). On the other hand, if it is determined in step S517 that (G / B_mn) / (G / B_ij) is less than or equal to the threshold value, the process in step S518 is not performed. In this case, for example, W_mn is set to 0.

次に、nが10未満であるか否かが判定される(ステップS519)。ステップS519の判定において、nが10未満である場合にはnに1が加算された後(ステップS520)、次の列のブロックに対してステップS517の判定が再び行われる。一方、ステップS519の判定において、nが10になった場合には、1行分のブロックに対する面内ムラ補正値の算出が終了したとして、mが10未満であるか否かが判定される(ステップS521)。ステップS521の判定において、mが10未満である場合にはmに1が加算され、nが1に設定された後(ステップS522)、次の行の1列目のブロックに対してステップS517の判定が再び行われる。一方、ステップS521の判定において、mが10になった場合には、画像内の全ブロックに対する面内ムラ補正値の算出が終了したとして、処理がステップS523に移行する。   Next, it is determined whether n is less than 10 (step S519). If n is less than 10 in the determination in step S519, 1 is added to n (step S520), and then the determination in step S517 is performed again on the next column block. On the other hand, if n is 10 in the determination in step S519, it is determined whether or not m is less than 10 assuming that the calculation of the in-plane unevenness correction value for the block for one row is completed. Step S521). In the determination in step S521, when m is less than 10, 1 is added to m, and after n is set to 1 (step S522), the block of the first column in the next row is set in step S517. The determination is made again. On the other hand, if it is determined in step S521 that m is 10, the calculation shifts to step S523, assuming that the calculation of in-plane unevenness correction values for all blocks in the image is completed.

ある撮影距離Dkに対する面内ムラ補正値の算出が終了した後、撮影距離Dkが所定距離De(例えば、最至近に相当する値)よりも近いか否かが判定される(ステップS523)。ステップS523の判定において、DkがDeを超えている場合には、Dkに1が加算された後(ステップS524)、別の撮影距離に対してステップS501以後の処理が行われる。なお、図5の例では、Dkに1が加算されると、前の撮影距離よりも1ステップ分近距離の撮影距離に設定される。このようにして図5の例では、遠距離側から面内ムラ補正値が算出される。もちろん、近距離側から面内ムラ補正値を算出するようにしても良い。   After the calculation of the in-plane unevenness correction value for a certain shooting distance Dk is completed, it is determined whether or not the shooting distance Dk is closer than a predetermined distance De (for example, a value corresponding to the closest distance) (step S523). If it is determined in step S523 that Dk exceeds De, 1 is added to Dk (step S524), and then the processing from step S501 is performed on another shooting distance. In the example of FIG. 5, when 1 is added to Dk, the shooting distance is set to a short distance by one step from the previous shooting distance. In this way, in the example of FIG. 5, the in-plane unevenness correction value is calculated from the far side. Of course, the in-plane unevenness correction value may be calculated from the short distance side.

また、ステップS523の判定において、DkがDeに達した場合には、全ての撮影距離に対応した面内ムラ補正値の算出が終了したとして、図5の処理が終了する。   Further, in the determination of step S523, when Dk reaches De, calculation of in-plane unevenness correction values corresponding to all shooting distances is completed, and the processing in FIG. 5 ends.

次に、図5のようにして算出した面内ムラ補正値を用いたホワイトバランス補正について説明する。図6は、撮影開始からWB補正までの流れを示したフローチャートである。   Next, white balance correction using the in-plane unevenness correction value calculated as shown in FIG. 5 will be described. FIG. 6 is a flowchart showing a flow from the start of photographing to WB correction.

デジタルカメラによる撮影開始前にはスルー画表示が行われる。スルー画表示においては、撮像素子105が連続動作され、この連続動作により撮像素子105を介して得られるRAW画像データが画像信号処理回路110において処理された後、逐次、LCD115に表示される。スルー画表示がなされているときに、ユーザによる操作部102のレリーズボタンの操作によって1stレリーズスイッチがオンされると、AE処理及びAF処理が行われる(ステップS601)。AE処理は、例えば、スルー画表示時に撮像素子105を介して得られるRAW画像データを所定領域毎に累積してAE評価値を求め、この求めたAE評価値によって画面内の明るさを評価して撮影時の露光量(絞り量と露光時間)を算出することによって行われる。また、AF処理は、AF処理回路110eにおいて求められたAF評価値に基づいてマイクロコンピュータ101によりレンズ104を駆動させることによって行われる。また、AF調整がなされた時には合焦時のレンズ104の位置から撮影時の被写体までの距離(撮影距離)Dが算出され、この撮影距離Dがマイクロコンピュータ101の図示しないレジスタ等に保持される。   A through image is displayed before the digital camera starts shooting. In the through image display, the image sensor 105 is continuously operated, and RAW image data obtained through the image sensor 105 by this continuous operation is processed by the image signal processing circuit 110 and then displayed on the LCD 115 sequentially. If the 1st release switch is turned on by the user operating the release button of the operation unit 102 while the through image is being displayed, AE processing and AF processing are performed (step S601). In the AE process, for example, RAW image data obtained via the image sensor 105 during live view display is accumulated for each predetermined area to obtain an AE evaluation value, and the brightness in the screen is evaluated based on the obtained AE evaluation value. This is done by calculating the exposure amount (aperture amount and exposure time) at the time of photographing. The AF process is performed by driving the lens 104 by the microcomputer 101 based on the AF evaluation value obtained by the AF processing circuit 110e. When AF adjustment is performed, a distance (shooting distance) D from the position of the lens 104 at the time of focusing to the subject at the time of shooting is calculated, and this shooting distance D is held in a register or the like (not shown) of the microcomputer 101. .

その後、ユーザによる操作部102のレリーズボタンの操作によって2ndレリーズスイッチがオンされると、撮影動作が行われる(ステップS602)。撮影動作においては、ステップS601のAE処理によって算出された露光量で撮像素子105が露光されるように絞り量や露光時間が調整されて撮像素子105による撮像動作が行われる。撮像素子105を介して得られるRAW画像データはSDRAM109に記憶される。   Thereafter, when the 2nd release switch is turned on by the user operating the release button of the operation unit 102, a shooting operation is performed (step S602). In the shooting operation, the aperture amount and the exposure time are adjusted so that the imaging device 105 is exposed with the exposure amount calculated by the AE process in step S601, and the imaging operation by the imaging device 105 is performed. Raw image data obtained via the image sensor 105 is stored in the SDRAM 109.

撮影動作の後、画像信号処理回路110のWB補正回路110aによってSDRAM109に記憶されたRAW画像データが読み出される(ステップS603)。続いて、ホワイトバランスの設定がオートホワイトバランス(AWB)モードであるか否かがマイクロコンピュータ101によって判定される(ステップS604)。ここで、オートホワイトバランスモードは、撮影時に得られる画像データ(RAW画像データ)からホワイトバランス補正値を算出し、算出したホワイトバランス補正値に基づいてホワイトバランス補正を行うモードである。このほかにホワイトバランスの設定としては、例えば代表的な光源に対するホワイトバランス補正値を予め算出してFlashメモリ103に記憶させておき、この予め記憶されたホワイトバランス補正値に従ってホワイトバランスを行うマニュアルホワイトバランス(MWB)モードがある。このようなホワイトバランスの設定は、撮影者が操作部102を操作することで行うことができる。   After the photographing operation, the RAW image data stored in the SDRAM 109 is read by the WB correction circuit 110a of the image signal processing circuit 110 (step S603). Subsequently, the microcomputer 101 determines whether or not the white balance setting is an auto white balance (AWB) mode (step S604). Here, the auto white balance mode is a mode in which a white balance correction value is calculated from image data (RAW image data) obtained at the time of shooting, and white balance correction is performed based on the calculated white balance correction value. In addition to this, as a white balance setting, for example, a white balance correction value for a typical light source is calculated in advance and stored in the flash memory 103, and manual white is performed in which white balance is performed in accordance with the stored white balance correction value. There is a balance (MWB) mode. Such white balance setting can be performed by the photographer operating the operation unit 102.

ステップS604の判定において、ホワイトバランスの設定がオートホワイトバランスモードに設定されている場合には、マイクロコンピュータ101によって、SDRAM109に記憶されたRAW画像データからオートホワイトバランス用のホワイトバランス補正値Waが算出され(ステップS605)、このホワイトバランス補正値Waが撮影時におけるホワイトバランス補正の基準となるホワイトバランス補正値W1に設定される(ステップS606)。なお、ホワイトバランス補正値Waを算出するための手法としては、従来周知の手法をそのまま適用することができるので、ここではその詳細については説明を省略する。また、ステップS604の判定において、ホワイトバランスの設定がオートホワイトバランスモードではなく、マニュアルホワイトバランスモードに設定されている場合には、撮影者によって選択された光源に対応したホワイトバランス補正値Wmがマイクロコンピュータ101によってFlashメモリ103から読み出され(ステップS607)、このホワイトバランス補正値Wmが基準のホワイトバランス補正値W1に設定される(ステップS608)。なお、ステップS606又はステップS608において設定されたホワイトバランス補正値W1はマイクロコンピュータ101の図示しないレジスタ等に保持される。   If it is determined in step S604 that the white balance setting is set to the auto white balance mode, the microcomputer 101 calculates the white balance correction value Wa for auto white balance from the RAW image data stored in the SDRAM 109. Then, the white balance correction value Wa is set to the white balance correction value W1 that serves as a reference for white balance correction at the time of shooting (step S606). In addition, as a method for calculating the white balance correction value Wa, a conventionally known method can be applied as it is, and therefore, detailed description thereof is omitted here. If the white balance setting is set to the manual white balance mode instead of the auto white balance mode in the determination in step S604, the white balance correction value Wm corresponding to the light source selected by the photographer is microscopic. The computer 101 reads the data from the flash memory 103 (step S607), and the white balance correction value Wm is set to the reference white balance correction value W1 (step S608). The white balance correction value W1 set in step S606 or step S608 is held in a register (not shown) of the microcomputer 101.

ホワイトバランス補正値W1が設定された後、マイクロコンピュータ101の図示しないレジスタ等に保持された撮影距離Dが読み込まれる(ステップS609)。そして、読み込まれた撮影距離Dに対応した面内ムラ補正値がFlashメモリ103から読み出される(ステップS610)。次に、修正ホワイトバランス補正値算出処理が行われる(ステップS611)。このステップS611においては、面内ムラ補正値W_mnが設定されているブロックに対してはホワイトバランス補正値W1を、面内ムラ補正値W_mnを用いて修正したものが最終的なホワイトバランス補正値として設定される。一方、面内ムラ補正値W_mnが設定されていないブロックに対してはホワイトバランス補正値W1が最終的なホワイトバランス補正値として設定される。なお、ステップS611の処理の詳細については後述する。   After the white balance correction value W1 is set, the shooting distance D held in a register (not shown) of the microcomputer 101 is read (step S609). Then, the in-plane unevenness correction value corresponding to the read photographing distance D is read from the flash memory 103 (step S610). Next, a corrected white balance correction value calculation process is performed (step S611). In step S611, for the block in which the in-plane unevenness correction value W_mn is set, the white balance correction value W1 corrected by using the in-plane unevenness correction value W_mn is used as the final white balance correction value. Is set. On the other hand, the white balance correction value W1 is set as the final white balance correction value for the blocks for which the in-plane unevenness correction value W_mn is not set. Details of the processing in step S611 will be described later.

ステップS611のホワイトバランス補正値の修正後、WB補正回路110aにホワイトバランス補正値が送られ、WB補正回路110aにおいてホワイトバランス補正が行われる(ステップS612)。   After the correction of the white balance correction value in step S611, the white balance correction value is sent to the WB correction circuit 110a, and the white balance correction is performed in the WB correction circuit 110a (step S612).

以下、図6のステップS611における修正ホワイトバランス補正値算出処理について説明する。図7は、修正ホワイトバランス補正値算出処理の流れについて示すフローチャートである。   Hereinafter, the corrected white balance correction value calculation process in step S611 in FIG. 6 will be described. FIG. 7 is a flowchart showing the flow of the corrected white balance correction value calculation process.

図7の処理において、まず図6のステップS606又はステップS608で設定されたホワイトバランス補正値W1がマイクロコンピュータ101のレジスタ等から読み込まれる(ステップS701)。続いて、Flashメモリ103に記憶されている画像データのブロック分割数(m×n)が読み出される(ステップS702)。次に、mが1に、nが1に設定される(ステップS703)。   In the process of FIG. 7, first, the white balance correction value W1 set in step S606 or step S608 of FIG. 6 is read from the register or the like of the microcomputer 101 (step S701). Subsequently, the block division number (m × n) of the image data stored in the flash memory 103 is read (step S702). Next, m is set to 1 and n is set to 1 (step S703).

その後、Flashメモリ103から読み出された面内ムラ補正値のうち、ブロック(m,n)に対応した面内ムラ補正値W_mnが読み出される(ステップS704)。続いて、ブロック(m,n)に対してW_mnが設定されているか否か、即ち読み出したW_mnが0でないか否かが判定される(ステップS705)。ステップS705の判定において、W_mnが設定されていない場合には、修正ホワイトバランス補正値W_MNがW1に設定される(ステップS706)。一方、ステップS705の判定において、W_mnが設定されている場合には、修正ホワイトバランス補正値W_MNが、W1にW_mnを乗じた値に設定される(ステップS707)。   Thereafter, among the in-plane unevenness correction values read out from the flash memory 103, the in-plane unevenness correction value W_mn corresponding to the block (m, n) is read out (step S704). Subsequently, it is determined whether W_mn is set for the block (m, n), that is, whether the read W_mn is not 0 (step S705). If it is determined in step S705 that W_mn is not set, the corrected white balance correction value W_MN is set to W1 (step S706). On the other hand, if it is determined in step S705 that W_mn is set, the corrected white balance correction value W_MN is set to a value obtained by multiplying W1 by W_mn (step S707).

ステップS706又はステップS707の後、nが10未満であるか否かが判定される(ステップS708)。ステップS708の判定において、nが10未満である場合にはnに1が加算された後(ステップS710)、次の列のブロックに対してステップS704以後の処理が再び行われる。一方、ステップS708の判定において、nが10になった場合には、1行分のブロックに対するホワイトバランス補正値の修正が終了したとして、mが10未満であるか否かが判定される(ステップS709)。ステップS709の判定において、mが10未満である場合にはmに1が加算され、nが1に設定された後(ステップS711)、次の行の1列目のブロックに対してステップS704以後の処理が再び行われる。一方、ステップS709の判定において、mが10になった場合には、画像内の全ブロックに対するホワイトバランス補正値の修正が終了したとして、図7の処理が終了する。このような処理により、最終的に得られるホワイトバランス補正値は図8に示すものとなる。ここで、図8は、面内ムラ補正値が図4(a)に示すようにして記憶されていた場合の修正ホワイトバランス補正値の例である。図8に示すように、面内ムラ補正値が設定されているブロックに対してのみ修正が行われる。なお、ステップS705においては、W_mnが設定されているか否かを判定することによって、ホワイトバランス補正値を修正するか否かを判定しているが、修正しないブロックにおける面内ムラ補正値W_mnを1として、すべてのブロックについてステップS707の演算を行うようにしても良い。   After step S706 or step S707, it is determined whether n is less than 10 (step S708). If n is less than 10 in the determination in step S708, 1 is added to n (step S710), and then the processing in step S704 and subsequent steps is performed again on the next column block. On the other hand, if n is 10 in the determination in step S708, it is determined whether m is less than 10 on the assumption that the correction of the white balance correction value for the block for one row is completed (step S708). S709). In the determination in step S709, if m is less than 10, 1 is added to m, and after n is set to 1 (step S711), step S704 and subsequent steps are performed for the first column block in the next row. The process is performed again. On the other hand, if m is 10 in the determination in step S709, it is determined that the correction of the white balance correction value for all the blocks in the image has been completed, and the processing in FIG. The white balance correction value finally obtained by such processing is as shown in FIG. Here, FIG. 8 is an example of the corrected white balance correction value when the in-plane unevenness correction value is stored as shown in FIG. As shown in FIG. 8, the correction is performed only on the block in which the in-plane unevenness correction value is set. In step S705, it is determined whether or not the white balance correction value is to be corrected by determining whether or not W_mn is set, but the in-plane unevenness correction value W_mn in the block that is not corrected is set to 1. As described above, the calculation in step S707 may be performed for all blocks.

以上説明したように、本実施形態によれば、カメラの調整時等において、白色LED光源による投光をした撮影を行い、この撮影によって得られる画像内で最も適切に色が再現されているブロックを基準として検出し、検出した基準のブロックに対する他のブロックの色味の違いを補正する係数を求めることで、白色LEDを構成する複数の青色LED素子の配置や各青色LED素子の発光比率に起因して、フラッシュ撮影時に、撮影距離に対応した特定の位置に発生する色味のムラを効率的に補正し、画像の色味を均一なものとすることができる。ここで、白色LEDを構成する複数の青色LED素子の配置や各青色LED素子の発光比率に起因して発生する面内ムラは、撮影時の光源や被写体の種類等には影響されないので、撮影毎に面内ムラ補正値を求める必要がなく、予め求めておくことができる。このため、撮影時においてホワイトバランス補正に係る処理時間は修正を行わない場合と殆ど変わらず、効率的な面内ムラ補正を行うことが可能である。   As described above, according to the present embodiment, when adjusting the camera or the like, the block in which the image is projected with the white LED light source and the color is most appropriately reproduced in the image obtained by this shooting. Is detected as a reference, and the coefficient for correcting the difference in color of the other blocks with respect to the detected reference block is obtained, so that the arrangement of the plurality of blue LED elements constituting the white LED and the light emission ratio of each blue LED element are determined. As a result, it is possible to efficiently correct unevenness in color that occurs at a specific position corresponding to the shooting distance during flash shooting, and to make the color of the image uniform. Here, the in-plane unevenness caused by the arrangement of the plurality of blue LED elements constituting the white LED and the light emission ratio of each blue LED element is not affected by the light source at the time of shooting, the type of subject, etc. It is not necessary to obtain the in-plane unevenness correction value every time, and can be obtained in advance. For this reason, the processing time for white balance correction at the time of shooting is almost the same as when correction is not performed, and efficient in-plane unevenness correction can be performed.

また、白色LEDとして青色LED素子と蛍光体とを用いた場合には、面内ムラ補正値の算出の際に、R成分の影響を考慮する必要がないため、その分、面内ムラ補正値の演算が簡略化される。   In addition, when a blue LED element and a phosphor are used as the white LED, it is not necessary to consider the influence of the R component when calculating the in-plane unevenness correction value. Is simplified.

以上実施形態に基づいて本発明を説明したが、本発明は上述した実施形態に限定されるものではなく、本発明の要旨の範囲内で種々の変形や応用が可能なことは勿論である。例えば、上述した実施形態では面内ムラ補正値を算出する際に、G/B値を演算しているが、B/G値を演算して面内ムラ補正値を算出するようにしても良い。ただし、この場合には、基準となるブロックがB/G値が最大となるブロックであり、また各種判定における不等号の関係も逆向きとなる。   Although the present invention has been described above based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications and applications are naturally possible within the scope of the gist of the present invention. For example, in the above-described embodiment, the G / B value is calculated when calculating the in-plane unevenness correction value. However, the in-plane unevenness correction value may be calculated by calculating the B / G value. . However, in this case, the reference block is the block with the maximum B / G value, and the relationship of inequality signs in various determinations is also reversed.

さらに、上記した実施形態には種々の段階の発明が含まれており、開示される複数の構成要件の適当な組合せにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件からいくつかの構成要件が削除されても、上述したような課題を解決でき、上述したような効果が得られる場合には、この構成要件が削除された構成も発明として抽出され得る。   Further, the above-described embodiments include various stages of the invention, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some configuration requirements are deleted from all the configuration requirements shown in the embodiment, the above-described problem can be solved, and this configuration requirement is deleted when the above-described effects can be obtained. The configuration can also be extracted as an invention.

本発明の実施形態に係るデジタルカメラの内部構成を示すブロック図である。It is a block diagram which shows the internal structure of the digital camera which concerns on embodiment of this invention. 白色LED光源の構成例を示す図である。It is a figure which shows the structural example of a white LED light source. ある撮影距離に対して得られたベイヤ配列の画像データを10×10のブロックに分割した場合の例を表した図である。It is a figure showing the example at the time of dividing | segmenting the image data of a Bayer arrangement | sequence obtained with respect to a certain imaging distance into a 10x10 block. 面内ムラ補正値の例を示す図である。It is a figure which shows the example of an in-plane nonuniformity correction value. 面内ムラの補正値算出処理の流れについて示すフローチャートである。It is a flowchart shown about the flow of the correction value calculation process of an in-plane nonuniformity. 撮影開始からWB補正までの流れを示したフローチャートである。It is the flowchart which showed the flow from imaging | photography start to WB correction | amendment. 修正ホワイトバランス補正値算出処理の流れについて示すフローチャートである。It is a flowchart shown about the flow of a correction white balance correction value calculation process. 修正がなされた後のホワイトバランス補正値の例を示す図である。It is a figure which shows the example of the white balance correction value after correction | amendment was made.

符号の説明Explanation of symbols

101…マイクロコンピュータ、102…操作部、103…Flashメモリ、104…レンズ、105…撮像素子、106…CDS/ADC回路、107…A/D変換回路、108…バス、109…SDRAM、110…画像信号処理回路、110a…ホワイトバランス(WB)補正回路、110b…同時化回路、110c…色変換回路、110d…ガンマ変換回路、110e…自動合焦(AF)処理回路補正回路、111…JPEG処理部、112…メモリインターフェース(I/F)、113…記録媒体、114…LCDドライバ、115…LCD、116…LED発光回路、117…白色LED光源   DESCRIPTION OF SYMBOLS 101 ... Microcomputer, 102 ... Operation part, 103 ... Flash memory, 104 ... Lens, 105 ... Imaging device, 106 ... CDS / ADC circuit, 107 ... A / D conversion circuit, 108 ... Bus, 109 ... SDRAM, 110 ... Image Signal processing circuit, 110a ... white balance (WB) correction circuit, 110b ... synchronization circuit, 110c ... color conversion circuit, 110d ... gamma conversion circuit, 110e ... automatic focus (AF) processing circuit correction circuit, 111 ... JPEG processing unit 112 ... Memory interface (I / F), 113 ... Recording medium, 114 ... LCD driver, 115 ... LCD, 116 ... LED light emitting circuit, 117 ... White LED light source

Claims (9)

白色光を投光するLEDを備えた撮像装置において、
前記LEDを発光させた撮影により撮像信号を得る撮像部と、
前記撮像信号から生成される画像における色味のムラの撮影距離毎の発生位置と該発生位置における前記画像のホワイトバランス補正を行うためのホワイトバランス補正値を修正するための修正値とを修正情報として記憶する記憶部と、
前記撮影時の撮影距離を得る測距部と、
前記得られた撮影距離に対応する修正情報を前記記憶部から読み出し、該修正情報を用いて前記ホワイトバランス補正値を修正する修正部と、
前記修正されたホワイトバランス補正値を用いて前記画像のホワイトバランス補正を行うホワイトバランス補正部と、
を具備することを特徴とする撮像装置。
In an imaging device including an LED that projects white light,
An imaging unit that obtains an imaging signal by photographing with the LED emitting light;
Correction information including the generation position of the unevenness of color in the image generated from the imaging signal for each shooting distance and the correction value for correcting the white balance correction value for correcting the white balance of the image at the generation position A storage unit for storing as,
A distance measuring unit for obtaining a shooting distance at the time of shooting;
A correction unit that reads correction information corresponding to the obtained shooting distance from the storage unit, and corrects the white balance correction value using the correction information;
A white balance correction unit that performs white balance correction of the image using the corrected white balance correction value;
An imaging apparatus comprising:
前記修正情報は、前記画像を複数のブロックに分割したブロック毎に算出されることを特徴とする請求項1の撮像装置。   The imaging apparatus according to claim 1, wherein the correction information is calculated for each block obtained by dividing the image into a plurality of blocks. 前記修正情報は、前記ブロック毎のG成分とB成分とを用いて算出されることを特徴とする請求項2の撮像装置。   The imaging apparatus according to claim 2, wherein the correction information is calculated using a G component and a B component for each block. 前記修正情報は、前記ブロック毎に前記G成分に対する前記B成分との比率である第1の比率を算出し、前記ブロック毎の第1の比率と前記第1の比率の最小値との比率である第2の比率を算出し、該第2の比率に基づいて算出されることを特徴とする請求項3に記載の撮像装置。   The correction information calculates a first ratio that is a ratio of the B component to the G component for each block, and is a ratio between the first ratio for each block and the minimum value of the first ratio. The imaging apparatus according to claim 3, wherein a certain second ratio is calculated and calculated based on the second ratio. 前記修正情報は、前記ブロック毎に、前記第2の比率と撮影距離に応じて設定されたスレッシュ値とを比較した結果、前記第2の比率が前記スレッシュ値よりも大きいブロックに対する前記修正値を前記第2の比率に設定し、前記第2の比率が前記スレッシュ値以下のブロックに対する前記修正値をゼロに設定することにより算出されることを特徴とする請求項4に記載の撮像装置。   As a result of comparing the second ratio and the threshold value set according to the shooting distance for each block, the correction information indicates the correction value for the block in which the second ratio is larger than the threshold value. The imaging apparatus according to claim 4, wherein the imaging apparatus is set to the second ratio, and the second ratio is calculated by setting the correction value for a block equal to or less than the threshold value to zero. 前記修正部は、前記修正値が前記第2の比率に設定されているブロックに対してのみ前記修正を行うことを特徴とする請求項5に記載の撮像装置。   The imaging apparatus according to claim 5, wherein the correction unit performs the correction only on a block in which the correction value is set to the second ratio. 前記ホワイトバランス補正値は、オートホワイトバランスモードにおいては、前記撮像部によって得られた撮像信号から算出することにより得られることを特徴とする請求項1乃至6の何れかに記載の撮像装置。   The image pickup apparatus according to claim 1, wherein the white balance correction value is obtained by calculating from an image pickup signal obtained by the image pickup unit in an auto white balance mode. 前記ホワイトバランス補正値は、マニュアルホワイトバランスモードにおいては、特定の光源毎に予め記憶部に記憶されたデータを読み出すことにより得られることを特徴とする請求項1乃至6の何れかに記載の撮像装置。   The imaging according to claim 1, wherein the white balance correction value is obtained by reading data stored in advance in a storage unit for each specific light source in the manual white balance mode. apparatus. 白色光を投光するLEDを備えた撮像装置によって得られる画像のホワイトバランス補正を行うホワイトバランス補正方法であって、
前記LEDを発光させた撮影により撮像信号を得て、
前記撮影時の撮影距離を得て、
前記撮像信号から生成される画像における色味のムラの前記撮影距離毎の発生位置と該発生位置における画像のホワイトバランス補正を行うためのホワイトバランス補正値を修正するための修正値とを修正情報として算出して記憶部に記憶させ、
前記撮影距離に対応する修正情報を前記記憶部から読み出し、該修正情報を用いて前記ホワイトバランス補正値を修正し、
前記修正されたホワイトバランス補正値を用いて前記画像のホワイトバランス補正を行う、
ことを特徴とするホワイトバランス補正方法。
A white balance correction method for correcting white balance of an image obtained by an imaging device including an LED that projects white light,
An imaging signal is obtained by shooting with the LED emitting light,
Get the shooting distance at the time of shooting,
Correction information including a generation position of unevenness of color in the image generated from the imaging signal at each shooting distance and a correction value for correcting a white balance correction value for performing white balance correction of the image at the generation position Is calculated and stored in the storage unit,
Read correction information corresponding to the shooting distance from the storage unit, correct the white balance correction value using the correction information,
The image is subjected to white balance correction using the corrected white balance correction value.
A white balance correction method characterized by the above.
JP2007124503A 2007-05-09 2007-05-09 Imaging apparatus, and white balance correcting method Pending JP2008283364A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007124503A JP2008283364A (en) 2007-05-09 2007-05-09 Imaging apparatus, and white balance correcting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007124503A JP2008283364A (en) 2007-05-09 2007-05-09 Imaging apparatus, and white balance correcting method

Publications (1)

Publication Number Publication Date
JP2008283364A true JP2008283364A (en) 2008-11-20

Family

ID=40143826

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007124503A Pending JP2008283364A (en) 2007-05-09 2007-05-09 Imaging apparatus, and white balance correcting method

Country Status (1)

Country Link
JP (1) JP2008283364A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012115514A (en) * 2010-12-01 2012-06-21 Fujifilm Corp Endoscope unit
JP2012115513A (en) * 2010-12-01 2012-06-21 Fujifilm Corp Endoscope unit

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012115514A (en) * 2010-12-01 2012-06-21 Fujifilm Corp Endoscope unit
JP2012115513A (en) * 2010-12-01 2012-06-21 Fujifilm Corp Endoscope unit

Similar Documents

Publication Publication Date Title
US9456144B2 (en) Imaging apparatus and control method
JP5425424B2 (en) Flash light emitting method and apparatus
CN102769760A (en) Image processing apparatus and image processing method
JP2017022610A (en) Image processing apparatus and image processing method
US8223258B2 (en) Backlight photographing method
JP2008079143A (en) White balance correction method and imaging apparatus
JP5219268B2 (en) Imaging apparatus and flash control method
US7813631B2 (en) Image-taking apparatus
JP5304295B2 (en) Imaging device and white balance bracketing shooting program
US8154620B2 (en) Imaging apparatus and imaging method
JP2008092175A (en) Imaging apparatus and exposure control method
JP6778602B2 (en) Image pickup device, image data generation method and image data generation program
JP5042453B2 (en) Strobe control device, strobe control program, strobe control method
JP4300936B2 (en) Imaging device
JP4680753B2 (en) Image processing method, image processing apparatus, and imaging apparatus
JP6971794B2 (en) Lighting equipment and its control method
JP2009055077A (en) Imaging apparatus
JP4407485B2 (en) Imaging apparatus, image processing apparatus, and image processing program
JP2008283364A (en) Imaging apparatus, and white balance correcting method
JP4705146B2 (en) Imaging apparatus and imaging method
JP2007335985A (en) Electronic imaging apparatus and electronic imaging method
JP6300514B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP2014120813A (en) Image pickup device and image pickup method
JP4636393B2 (en) Imaging system, artificial light source and camera
JP2008145583A (en) Camera and flash output calculation program