JP5459178B2 - Imaging apparatus, white balance adjustment method, and white balance adjustment program - Google Patents

Imaging apparatus, white balance adjustment method, and white balance adjustment program Download PDF

Info

Publication number
JP5459178B2
JP5459178B2 JP2010248677A JP2010248677A JP5459178B2 JP 5459178 B2 JP5459178 B2 JP 5459178B2 JP 2010248677 A JP2010248677 A JP 2010248677A JP 2010248677 A JP2010248677 A JP 2010248677A JP 5459178 B2 JP5459178 B2 JP 5459178B2
Authority
JP
Japan
Prior art keywords
image
value
unit
luminance
white balance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2010248677A
Other languages
Japanese (ja)
Other versions
JP2012100223A (en
JP2012100223A5 (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2010248677A priority Critical patent/JP5459178B2/en
Priority to KR1020110113664A priority patent/KR101317552B1/en
Priority to CN201110343843.8A priority patent/CN102469243B/en
Priority to US13/288,137 priority patent/US20120113295A1/en
Publication of JP2012100223A publication Critical patent/JP2012100223A/en
Publication of JP2012100223A5 publication Critical patent/JP2012100223A5/ja
Application granted granted Critical
Publication of JP5459178B2 publication Critical patent/JP5459178B2/en
Priority to US14/306,880 priority patent/US20140293089A1/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Description

本発明は、撮像装置、ホワイトバランス調整方法及びホワイトバランス調整プログラムに関し、特に、ストロボの発光時に撮像された画像について、画像全体の色味を向上させる技術に関する。   The present invention relates to an imaging apparatus, a white balance adjustment method, and a white balance adjustment program, and more particularly to a technique for improving the color of an entire image taken at the time of flash emission.

従来より、ストロボの発光時に色温度の違いにより生じる不自然なホワイトバランスを、より自然なものになるように補正するために、様々なホワイトバランスの調整方法が考案されている。
このようなホワイトバランスの調整手法としては、例えば、ストロボの発光時の画像とストロボの非発光時の画像をそれぞれ複数の領域に分割し、それぞれに対応する領域の輝度差に基づいて、分割された領域毎にホワイトバランスをそれぞれ設定する、といった手法が知られている(特許文献1参照)。
Conventionally, various white balance adjustment methods have been devised in order to correct an unnatural white balance caused by a difference in color temperature at the time of flash light emission so that it becomes more natural.
As such a white balance adjustment method, for example, an image when the flash is fired and an image when the flash is not fired are divided into a plurality of regions, and the image is divided based on the luminance difference between the corresponding regions. A method is known in which white balance is set for each region (see Patent Document 1).

特開平8−51632号公報JP-A-8-51632

しかしながら、上述の特許文献1に記載される手法が適用されると、分割された領域についてそれぞれ独立してホワイトバランスが設定されるために、画像全体の色味が不自然になる虞があった。   However, when the method described in Patent Document 1 described above is applied, since the white balance is set independently for each of the divided areas, the color of the entire image may be unnatural. .

特に、上記の手法では、ストロボが照射されていないと判断された領域は、一律にホワイトバランスが設定されていた。換言すると、ストロボが照射されていないと判断された領域以外の領域はホワイトバランスの設定上何ら考慮する必要はないという思想の下、ホワイトバランスが設定されていた。
しかしながら、現実問題として、ストロボが全く照射されていないと判断された領域でも実際には多少のストロボの影響を受けていることが多い。従って、ストロボが照射されていないと判断された領域についても、ストロボの照射を考慮したホワイトバランスの設定がなされないと、結果として、画像全体の色味が不自然になる。
In particular, in the above method, the white balance is uniformly set in the area determined not to be irradiated with the strobe. In other words, the white balance is set based on the idea that there is no need to consider any area other than the area determined not to be irradiated with the strobe in setting the white balance.
However, as a practical problem, even in a region where it is determined that the strobe is not irradiated at all, it is often affected by some strobe. Therefore, even if it is determined that the strobe is not irradiated, if the white balance is not set in consideration of the strobe irradiation, the color of the entire image becomes unnatural as a result.

本発明は、このような状況に鑑みてなされたものであり、ストロボの発光時に撮像された画像について、画像全体の色味を向上させることを目的とする。   The present invention has been made in view of such a situation, and an object of the present invention is to improve the color of the entire image taken at the time of flash emission.

上記目的を達成するため、請求項1に記載の発明は、撮像手段と、発光手段と、前記発光手段による発光により明るくされた時の画像である第1の画像と当該第1の画像よりも明るさの低い第2の画像とを前記撮像手段に撮像するように制御する撮像制御手段と、前記第1の画像及び前記第2の画像の撮像の際に設定されたホワイトバランスを調整するための各色成分のゲイン値を夫々取得する第1の取得手段と、前記撮像手段により撮像された画像を複数の領域に分割する分割手段と、前記第1の画像と前記第2の画像とについて、前記複数の領域の輝度値を夫々取得する第2の取得手段と、前記複数の領域の各々について、前記第2の取得手段により算出された前記第1の画像の領域の輝度値と当該第1の画像の領域に対応する前記第2の画像の領域の輝度値との相対値算出する算出手段と、前記算出手段により算出された複数の相対値の中から、所定数の相対値を選択する選択手段と、前記第1の取得手段により取得された前記第1の画像及び前記第2の画像の各色成分のゲイン値と前記選択手段により選択された所定数の相対値に基づいて、前記第1の画像の少なくとも一部の領域の各色成分のゲイン値を補正する補正手段とを備えた撮像装置であることを特徴とする。
また、上記目的を達成するために、請求項2に記載の発明は、前記補正手段は、前記第1の画像のうち、前記相対値が所定値以上又は所定値以下の領域の各色成分のゲイン値を補正することを特徴とする。
また、上記目的を達成するために、請求項3に記載の発明は、前記選択手段は、前記算出手段により夫々算出された相対値が所定値以上又は所定値以下である前記第1の画像の領域を特定する特定手段を有し、前記特定手段により特定された所定値以上又は所定値以下の所定数の相対値を選択することを特徴とする。
また、上記目的を達成するために、請求項4に記載の発明は、前記算出手段は、前記第1の画像の領域の輝度値を当該第1の画像の領域に対応する前記第2の画像の領域の輝度値で除した値を前記相対値として算出し、前記特定手段は、前記算出手段により夫々算出された相対値の中から、値の高い順又は値の低い順に所定数の相対値を特定することを特徴とする。
In order to achieve the above-mentioned object, the invention described in claim 1 includes an imaging unit, a light emitting unit, a first image that is brightened by light emission by the light emitting unit, and the first image. An imaging control unit that controls the imaging unit to capture a second image with low brightness, and a white balance that is set when the first image and the second image are captured. A first acquisition unit that acquires a gain value of each color component, a dividing unit that divides an image captured by the imaging unit into a plurality of regions, the first image, and the second image, second acquisition means for respectively acquiring the luminance values of the plurality of regions, for each of the plurality of regions, the luminance value of the region of the second said calculated by obtaining means of the first image and the first the second corresponding to a region of the image A calculating means for calculating a relative value of the luminance value of the region of the image, from among a plurality of relative values calculated by the calculation means, selection means for selecting a predetermined number of relative values, said first obtaining means on the basis of the predetermined number of relative values selected by the selecting means and the gain value of each color component of the acquired first image and the second image by, at least a partial area of the first image It is an imaging device provided with the correction | amendment means which correct | amends the gain value of each color component of this.
In order to achieve the above object, the invention according to claim 2 is characterized in that, in the first image, the correction means is a gain of each color component in a region where the relative value is greater than or equal to a predetermined value or less. It is characterized by correcting the value.
In order to achieve the above object, the invention according to claim 3 is characterized in that the selection unit includes the first image of which the relative value calculated by the calculation unit is greater than or equal to a predetermined value or less. A specifying means for specifying an area is provided, and a predetermined number of relative values greater than or less than a predetermined value specified by the specifying means are selected.
In order to achieve the above object, according to a fourth aspect of the present invention, the calculation means includes: the second image corresponding to a region of the first image having a luminance value of the region of the first image. The value divided by the luminance value of the area is calculated as the relative value, and the specifying unit calculates a predetermined number of relative values from the relative value calculated by the calculating unit in order of increasing value or decreasing value. It is characterized by specifying.

また、上記目的を達成するために、請求項に記載の発明は、前記第1の取得手段により取得された画像の各色成分を他の色空間における少なくとも輝度情報を含む画素のパラメータの組に変換する変換手段をさらに備え、前記補正手段は、さらに、前記変換手段により変換された画素のパラメータの組に基づいて、前記各色成分のゲイン値を補正する撮像装置であることを特徴とする。 In order to achieve the above object, according to a fifth aspect of the present invention, each color component of the image acquired by the first acquisition unit is converted into a set of pixel parameters including at least luminance information in another color space. The image processing apparatus further includes conversion means for converting, and the correction means is an imaging apparatus that corrects the gain value of each color component based on a set of pixel parameters converted by the conversion means.

また、上記目的を達成するために、請求項に記載の発明は、発光により明るくされた時の画像である第1の画像と当該第1の画像よりも明るさの低い第2の画像とを撮像手段に撮像させるよう制御する撮像制御ステップと、前記第1の画像及び前記第2の画像の撮像の際に設定されたホワイトバランスを調整するための各色成分のゲイン値を夫々取得する第の取得ステップと、前記第1の取得ステップの処理により取得された画像を複数の領域に分割する分割ステップと、前記第1の画像と前記第2の画像とについて、前記複数の領域の輝度値を夫々取得する第の取得ステップと、前記複数の領域の各々について、前記第の取得ステップにて取得された前記第1の画像の領域の輝度値と当該第1の画像の領域に対応する前記第2の画像の領域の輝度値との相対値算出する算出ステップと、前記算出ステップにて算出された複数の相対値の中から、所定数の相対値を選択する選択ステップと、前記第1の取得ステップにより取得された前記第1の画像及び前記第2の画像の各色成分のゲイン値と前記選択ステップにて選択された所定数の相対値に基づいて、前記第1の画像の少なくとも一部の領域の各色成分のゲイン値を補正する補正ステップとを含むホワイトバランス調整方法であることを特徴とする。 In order to achieve the above object, the invention according to claim 6 is a first image that is an image when brightened by light emission, and a second image that is lower in brightness than the first image. An imaging control step for controlling the imaging means to capture an image, and a gain value for each color component for adjusting a white balance set at the time of capturing the first image and the second image. and one of the acquisition step, a division step of dividing an image obtained by the processing of the first acquisition step into a plurality of regions, for the first image and the second image, the luminance of the plurality of regions a second acquisition step of acquiring each a value, for each of the plurality of regions, a region of the luminance value and the first image region of the second said acquired in the step of obtaining the first image corresponding second image , Selection steps and, the first acquisition step of selecting a predetermined number of relative value among the calculation step, a plurality of relative values calculated in the calculation step of calculating a relative value of the luminance values of the regions on the basis of the predetermined number of relative values selected by said selecting step between the gain value of each color component of the acquired first image and the second image by, at least a portion of said first image And a white balance adjustment method including a correction step of correcting the gain value of each color component in the region.

また、上記目的を達成するために、請求項に記載の発明は、コンピュータを、発光により明るくされた時の画像である第1の画像と当該第1の画像よりも明るさの低い第2の画像とを撮像手段に撮像させる撮像制御手段、前記第1の画像及び前記第2の画像のホワイトバランスを調整するための各色成分のゲイン値を夫々取得する第の取得手段、前記撮像手段により撮像された画像を複数の領域に分割する分割手段、前記第1の画像と前記第2の画像とについて、前記複数の領域の輝度値を夫々取得する第の取得手段、前記複数の領域の各々について、前記第の取得手段により取得された前記第1の画像の領域の輝度値と当該第1の画像の領域に対応する前記第2の画像の領域の輝度値との相対値夫々算出する算出手段、前記算出手段により算出された複数の相対値の中から、所定数の相対値を選択する選択手段、前記第1の取得手段により取得された前記第1の画像及び前記第2の画像の各色成分のゲイン値と前記選択手段により選択された所定数の相対値に基づいて、前記第1の画像の少なくとも一部の領域の各色成分のゲイン値を補正する補正手段として機能させるホワイトバランス調整プログラムであることを特徴とする。 In order to achieve the above object, according to a seventh aspect of the present invention, there is provided a first image that is an image when the computer is brightened by light emission, and a second image that is lower in brightness than the first image . Imaging control means for causing the imaging means to image the first image, first acquisition means for acquiring gain values of the respective color components for adjusting white balance of the first image and the second image, and the imaging means dividing means for dividing an image captured in a plurality of regions, the above for the first image and the second image, the second acquisition unit configured to respectively obtain the luminance values of the plurality of regions, said plurality of areas for each of the relative value of the luminance value of the region of the second image corresponding to a second region of the luminance value and the first image region of the acquired by the acquisition means and the first image each calculation means for calculating, the calculating From among the plurality of relative values calculated by the step, selecting means for selecting a predetermined number of relative values, the gain of each color component of the first said acquired by the acquisition means in the first image and the second image based on the value and a predetermined number of relative values selected by the selecting means is the white balance adjusting program which functions as a correction means for correcting the gain value of each color component of at least a partial area of the first image It is characterized by that.

本発明によれば、ストロボの発光時に撮像された画像について、画像全体の色味を向上させることができる。   ADVANTAGE OF THE INVENTION According to this invention, the color of the whole image can be improved about the image imaged at the time of flash emission.

本発明に係る撮像装置の一実施形態におけるハードウェアの構成を示す領域図である。It is an area figure showing the composition of the hardware in one embodiment of the imaging device concerning the present invention. 図1のハードウェアの構成を有する撮像装置が実行するストロボ撮像処理の流れを説明するフローチャートである。3 is a flowchart for explaining a flow of strobe imaging processing executed by an imaging apparatus having the hardware configuration of FIG. 1. 非発光時スルー画像又は発光時撮像画像から8×8の64の分割領域が得られた状態を示す模式図である。It is a schematic diagram which shows the state from which the division area of 8x8 64 was obtained from the through image at the time of non-light emission or the captured image at the time of light emission. 発光時スルー画像及び非発光時撮像画像の各分割領域の輝度比率を格納するテーブルの一例を示す図である。It is a figure which shows an example of the table which stores the luminance ratio of each division area of the through image at the time of light emission, and the captured image at the time of non-light emission. 図1のハードウェアの構成を有する撮像装置が実行するホワイトバランス処理の流れを説明するフローチャートである。2 is a flowchart illustrating a flow of white balance processing executed by an imaging apparatus having the hardware configuration of FIG. 1.

以下、本発明の実施形態について、図を用いて説明する。
図1は、本発明に係る撮像装置1の一実施形態におけるハードウェアの構成を示すブロック図である。
図1に示す撮像装置1は、例えばデジタルカメラにより構成することができる。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a hardware configuration in an embodiment of an imaging apparatus 1 according to the present invention.
The imaging apparatus 1 shown in FIG. 1 can be configured by a digital camera, for example.

撮像装置1は、CPU(Central Processing Unit)11と、ROM(Read Only Memory)12と、RAM(Random Access Memory)13と、画像処理部14と、画像分割部15と、ホワイトバランスゲイン算出部16と、輝度取得部17と、バス18と、入出力インターフェース19と、撮像部20と、発光部21と、操作部22と、表示部23と、記憶部24、通信部25と、ドライブ26と、を備えている。   The imaging apparatus 1 includes a CPU (Central Processing Unit) 11, a ROM (Read Only Memory) 12, a RAM (Random Access Memory) 13, an image processing unit 14, an image dividing unit 15, and a white balance gain calculating unit 16. The luminance acquisition unit 17, the bus 18, the input / output interface 19, the imaging unit 20, the light emitting unit 21, the operation unit 22, the display unit 23, the storage unit 24, the communication unit 25, and the drive 26. It is equipped with.

CPU11は、ROM12に記録されているプログラム、又は、記憶部24からRAM13にロードされたプログラムに従って各種の処理を実行する。   The CPU 11 executes various processes according to a program recorded in the ROM 12 or a program loaded from the storage unit 24 to the RAM 13.

RAM13には、CPU11が各種の処理を実行する上において必要なデータ等も適宜記憶される。   The RAM 13 appropriately stores data necessary for the CPU 11 to execute various processes.

画像処理部14は、DSP(Digital Signal Processor)や、VRAM(Video Random Access Memory)等から構成されており、CPU11と協働して、画像のデータに対して各種画像処理を施す。
例えば、画像処理部14は、後述する撮像部20から出力される撮像画像のデータに対して、ノイズ低減、ホワイトバランスの調整、手ぶれ補正等の画像処理を施す。
The image processing unit 14 is configured by a DSP (Digital Signal Processor), a VRAM (Video Random Access Memory), and the like, and performs various image processing on image data in cooperation with the CPU 11.
For example, the image processing unit 14 performs image processing such as noise reduction, white balance adjustment, and camera shake correction on captured image data output from the imaging unit 20 described later.

画像分割部15は、画像処理部14において行われる画像処理のうち、ホワイトバランスの調整に用いる画像のデータを、空間方向に幾つかの領域のデータに分割する。なお、画像分割部15のさらなる詳細については、後述する。   The image dividing unit 15 divides image data used for white balance adjustment in the image processing performed in the image processing unit 14 into data of several regions in the spatial direction. Further details of the image dividing unit 15 will be described later.

ホワイトバランスゲイン算出部16は、画像処理部14において行われる画像処理のうち、ホワイトバランスの調整に用いるホワイトバランスゲインを算出する。なお、ホワイトバランスゲイン算出部16のさらなる詳細については、後述する。   The white balance gain calculation unit 16 calculates a white balance gain used for white balance adjustment in the image processing performed in the image processing unit 14. Further details of the white balance gain calculator 16 will be described later.

輝度取得部17は、画像処理部14において行われる画像処理のうち、ホワイトバランスの調整に用いる画像のデータから、輝度値等を取得する。なお、輝度取得部17のさらなる詳細については、輝度比較部41も含めて後述する。   The luminance acquisition unit 17 acquires a luminance value or the like from image data used for white balance adjustment in the image processing performed in the image processing unit 14. Further details of the luminance acquisition unit 17 will be described later including the luminance comparison unit 41.

CPU11、ROM12、RAM13、画像処理部14、画像分割部15、ホワイトバランスゲイン算出部16、及び輝度取得部17は、バス18を介して相互に接続されている。このバス18にはまた、入出力インターフェース19も接続されている。入出力インターフェース19には、撮像部20、発光部21、操作部22、表示部23、記憶部24、通信部25及びドライブ26が接続されている。   The CPU 11, ROM 12, RAM 13, image processing unit 14, image division unit 15, white balance gain calculation unit 16, and luminance acquisition unit 17 are connected to each other via a bus 18. An input / output interface 19 is also connected to the bus 18. An imaging unit 20, a light emitting unit 21, an operation unit 22, a display unit 23, a storage unit 24, a communication unit 25, and a drive 26 are connected to the input / output interface 19.

撮像部20は、図示はしないが、光学レンズ部と、イメージセンサと、を備えている。   Although not shown, the imaging unit 20 includes an optical lens unit and an image sensor.

光学レンズ部は、被写体を撮影するために、光を集光するレンズ、例えばフォーカスレンズやズームレンズ等で構成される。
フォーカスレンズは、イメージセンサの受光面に被写体像を結像させるレンズである。ズームレンズは、焦点距離を一定の範囲で自在に変化させるレンズである。
光学レンズ部にはまた、必要に応じて、焦点、露出、ホワイトバランス等の設定パラメータを調整する周辺回路が設けられる。
The optical lens unit is configured by a lens that collects light, for example, a focus lens or a zoom lens, in order to photograph a subject.
The focus lens is a lens that forms a subject image on the light receiving surface of the image sensor. The zoom lens is a lens that freely changes the focal length within a certain range.
The optical lens unit is also provided with a peripheral circuit for adjusting setting parameters such as focus, exposure, and white balance as necessary.

イメージセンサは、光電変換素子や、AFE(Analog Front End)等から構成される。
光電変換素子は、例えばCMOS(Complementary Metal Oxide Semiconductor)型の光電変換素子等から構成される。光電変換素子には、光学レンズ部から被写体像が入射される。そこで、光電変換素子は、被写体像を光電変換(撮像)して画像信号を一定時間蓄積し、蓄積した画像信号をアナログ信号としてAFEに順次供給する。
AFEは、このアナログの画像信号に対して、A/D(Analog/Digital)変換処理等の各種信号処理を実行する。各種信号処理によって、ディジタル信号が生成され、撮像部20の出力信号として出力される。
なお、以下、撮像部20の出力信号を、「撮像画像のデータ」と呼ぶ。従って、撮像部20からは撮像画像のデータが出力されて、CPU11、画像処理部14、画像分割部15、ホワイトバランスゲイン算出部16等に適宜供給される。
The image sensor includes a photoelectric conversion element, AFE (Analog Front End), and the like.
The photoelectric conversion element is composed of, for example, a CMOS (Complementary Metal Oxide Semiconductor) type photoelectric conversion element or the like. A subject image is incident on the photoelectric conversion element from the optical lens unit. Therefore, the photoelectric conversion element photoelectrically converts (captures) the subject image, accumulates the image signal for a predetermined time, and sequentially supplies the accumulated image signal as an analog signal to the AFE.
The AFE performs various signal processing such as A / D (Analog / Digital) conversion processing on the analog image signal. By various signal processing, a digital signal is generated and output as an output signal of the imaging unit 20.
Hereinafter, the output signal of the imaging unit 20 is referred to as “captured image data”. Accordingly, captured image data is output from the imaging unit 20 and is appropriately supplied to the CPU 11, the image processing unit 14, the image dividing unit 15, the white balance gain calculating unit 16, and the like.

発光部21は、ストロボを有し、CPU11の制御に従って、ストロボを発光させる。本実施形態においては、ユーザが操作部22に対する撮像画像の記録指示の操作、例えば操作部22のうち図示せぬレリーズ釦の押下操作をしたことを契機として、ストロボが発光される。   The light emitting unit 21 has a strobe, and causes the strobe to emit light according to the control of the CPU 11. In the present embodiment, the strobe light is triggered when the user performs an operation of recording an image to be recorded on the operation unit 22, for example, pressing a release button (not shown) of the operation unit 22.

操作部22は、例えば、図示せぬレリーズ釦等の各種釦により構成され、ユーザの指示操作を受け付ける。   The operation unit 22 includes, for example, various buttons such as a release button (not shown), and receives a user instruction operation.

表示部23は、各種画像を表示可能なディスプレイ等により構成される。   The display unit 23 includes a display that can display various images.

記憶部24は、DRAM(Dynamic Random Access Memory)等で構成され、後述するスルー画像、表示対象の原画像、当該原画像に合成され得る画像等の各種画像のデータを記憶する。   The storage unit 24 is configured by a DRAM (Dynamic Random Access Memory) or the like, and stores data of various images such as a through image described later, an original image to be displayed, and an image that can be combined with the original image.

通信部25は、インターネットを含むネットワークを介して他の装置(図示せず)との間で行う通信を制御する。   The communication unit 25 controls communication performed with another device (not shown) via a network including the Internet.

ドライブ26には、磁気ディスク、光ディスク、光磁気ディスク、或いは半導体メモリ等よりなる、リムーバブルメディア31が適宜装着される。ドライブ26によってリムーバブルメディア31から読み出されたプログラムは、必要に応じて記憶部24にインストールされる。また、リムーバブルメディア31は、記憶部24に記憶されている画像のデータ等の各種データも、記憶部24と同様に記憶することができる。   A removable medium 31 made of a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is appropriately attached to the drive 26. The program read from the removable medium 31 by the drive 26 is installed in the storage unit 24 as necessary. The removable medium 31 can also store various data such as image data stored in the storage unit 24 in the same manner as the storage unit 24.

以上、図1を参照して、本実施形態の撮像装置1のハードウェアの構成について説明した。
次に、このようなハードウェアの構成を有する撮像装置1が実行するストロボ撮像処理の流れについて説明する。ストロボ撮像処理とは、ストロボを発光させて被写体を撮像し、その結果得られる撮像画像のデータに対して、ホワイトバランスの調整を行った後に、リムーバブルメディア31等に記録するまでの一連の処理をいう。
図2は、図1のハードウェアの構成を有する撮像装置1が実行するストロボ撮像処理の流れを説明するフローチャートである。
The hardware configuration of the imaging apparatus 1 according to the present embodiment has been described above with reference to FIG.
Next, the flow of strobe imaging processing executed by the imaging apparatus 1 having such a hardware configuration will be described. The strobe imaging process is a series of processes from shooting the subject by emitting a strobe and adjusting the white balance to the captured image data obtained as a result, and then recording it on the removable media 31 or the like. Say.
FIG. 2 is a flowchart for explaining the flow of strobe imaging processing executed by the imaging apparatus 1 having the hardware configuration of FIG.

先ず、撮像装置1の動作モードとして、本実施形態では、ストロボを発光せずに被写体を撮像する通常モードと、ストロボを発光して被写体を撮像するストロボモードとが設けられているとする。そして、ユーザは、操作部22に対する所定の操作をすることで、動作モードとして、通常モード又はストロボモードを選択的に指示することができるものとする。
この場合、ストロボモードの選択が指示されると、ストロボ撮像処理は開始する。
First, as an operation mode of the imaging apparatus 1, in the present embodiment, it is assumed that a normal mode in which a subject is imaged without emitting a strobe light and a strobe mode in which the strobe light is emitted and a subject is imaged are provided. The user can selectively instruct the normal mode or the strobe mode as the operation mode by performing a predetermined operation on the operation unit 22.
In this case, when the selection of the strobe mode is instructed, the strobe imaging process starts.

ステップS1において、CPU11は、スルー撮像処理及びスルー表示処理を実行する。
即ち、CPU11は、撮像部20や画像処理部14を制御して、撮像部20による撮像動作を継続させる。そして、CPU11は、撮像部20による撮像動作が継続されている間、当該撮像部20から順次出力される撮像画像のデータを、メモリ(本実施形態では記憶部24)に一時的に記憶させる。このような一連の処理が、ここでいう「スルー撮像処理」である。
また、CPU11は、スルー撮像処理時にメモリ(本実施形態では記憶部24)に一時的に記録された各データを順次読み出して、各々に対応する撮像画像を表示部23に順次表示させる。このような一連の処理が、ここでいう「スルー表示処理」である。なお、スルー表示処理により表示部23に表示されている撮像画像を、以下、「スルー画像」と呼ぶ。
In step S1, the CPU 11 executes through imaging processing and through display processing.
That is, the CPU 11 controls the imaging unit 20 and the image processing unit 14 to continue the imaging operation by the imaging unit 20. Then, while the imaging operation by the imaging unit 20 is continued, the CPU 11 temporarily stores the captured image data sequentially output from the imaging unit 20 in the memory (the storage unit 24 in the present embodiment). Such a series of processes is the “through imaging process” referred to herein.
Further, the CPU 11 sequentially reads out each data temporarily recorded in the memory (the storage unit 24 in the present embodiment) during the through imaging process, and causes the display unit 23 to sequentially display the corresponding captured images. Such a series of processes is the “through display process” here. The captured image displayed on the display unit 23 by the through display process is hereinafter referred to as a “through image”.

ステップS2において、CPU11は、撮像画像の記録指示があったか否かを判断する。
本実施形態においては、上述したように、ユーザは、操作部22のうちレリーズ釦を押下操作することによって、撮像画像の記録指示をすることができる。
従って、レリーズ釦が押下操作されていない場合には、ステップS2においてNOであると判定されて、処理はステップS1に戻される。即ち、レリーズ釦が押下操作されるまでの間、ステップS1及びS2のループ処理が繰り返し実行されることによって、スルー撮像処理及びスルー表示処理が繰り返し実行され、被写体のスルー画像がリアルタイムに表示部23に表示され続ける。
なお、図示はしないが、所定時間経過しても未だレリーズ釦が押下操作されない場合には、CPU11等は、ストロボ撮像処理を強制終了するようにしてもよい。
In step S <b> 2, the CPU 11 determines whether there is an instruction to record a captured image.
In the present embodiment, as described above, the user can issue an instruction to record a captured image by pressing the release button of the operation unit 22.
Therefore, if the release button has not been pressed, it is determined NO in step S2, and the process returns to step S1. That is, until the release button is pressed, the loop processing in steps S1 and S2 is repeatedly executed, so that the through imaging process and the through display process are repeatedly executed, and the through image of the subject is displayed in real time on the display unit 23. Will continue to be displayed.
Although not shown, if the release button is not pressed even after a predetermined time has elapsed, the CPU 11 or the like may forcibly terminate the strobe imaging process.

その後、レリーズ釦が押下操作された場合には、ステップS2においてYESであると判定されて、処理はステップS3に進む。   Thereafter, when the release button is pressed, it is determined as YES in Step S2, and the process proceeds to Step S3.

ステップS3において、CPU11は、発光とともに被写体を撮像することを制御する。詳細には、CPU11は、発光部21を制御して、ストロボを発光させるとともに、撮像部20を制御して、被写体を撮像させる。
本実施形態では、このときに撮像部20から出力された撮像画像のデータが、記録対象のデータとして記憶部24に一時的に記憶される。
In step S <b> 3, the CPU 11 controls imaging of the subject together with light emission. Specifically, the CPU 11 controls the light emitting unit 21 to emit a strobe light, and controls the imaging unit 20 to image the subject.
In this embodiment, the captured image data output from the imaging unit 20 at this time is temporarily stored in the storage unit 24 as data to be recorded.

ステップS4において、CPU11は、ステップS1のスルー撮像処理でストロボ非発光時に被写体が撮像されたスルー画像のデータと、ステップS3の処理でストロボ発光時に被写体が撮像された撮像画像のデータとを用いて、記録対象の撮像画像のホワイトバランスを調整する処理を実行する。
このようなステップS4の処理を、図2の記載にあわせて、以下、「ホワイトバランス処理」と呼ぶ。また、ステップS1のスルー撮像処理でストロボ非発光時に被写体が撮像されたスルー画像のデータを、以下、「非発光時スルー画像のデータ」と呼ぶ。一方、ステップS3の処理でストロボ発光時に被写体が撮像された撮像画像のデータを、以下、「発光時撮像画像のデータ」と呼ぶ。
ここで、記録対象の撮像画像のデータは、本実施形態では、発光時撮像画像のデータが採用されるものとする。ただし、発光時撮像画像のデータとは別に、ホワイトバランスの設定後、もう1度ストロボを発光させて撮像部20が被写体を撮像した結果得られる撮像画像のデータを記録対象として採用してもよい。この場合、当該記録対象の撮像画像のデータは、設定されたホワイトバランスで調整される。
なお、ホワイトバランス処理のさらなる詳細については、後述する。
In step S4, the CPU 11 uses the data of the through image in which the subject is imaged when the flash is not emitted in the through imaging process of step S1 and the data of the captured image in which the subject is imaged when the flash is emitted in the process of step S3. Then, processing for adjusting the white balance of the captured image to be recorded is executed.
Such processing in step S4 is hereinafter referred to as “white balance processing” in accordance with the description in FIG. Further, the data of the through image in which the subject is imaged when the flash is not emitted in the through imaging process in step S1 is hereinafter referred to as “data of the through image when no light is emitted”. On the other hand, the data of the captured image in which the subject is imaged at the time of flash emission in the process of step S3 is hereinafter referred to as “data of the captured image at the time of light emission”.
Here, in the present embodiment, the data of the captured image to be recorded is adopted as the data of the captured image to be recorded. However, separately from the captured image data at the time of light emission, after the white balance is set, the captured image data obtained as a result of the image capturing unit 20 capturing the subject again by emitting the strobe light may be adopted as the recording target. . In this case, the data of the captured image to be recorded is adjusted with the set white balance.
Further details of the white balance process will be described later.

ステップS5において、CPU11は、ステップS4の処理でホワイトバランス処理が施された、記録対象の撮像画像のデータをリムーバブルメディア31に記録する。
これにより、ストロボ撮像処理は終了となる。
In step S <b> 5, the CPU 11 records the captured image data to be recorded, which has been subjected to the white balance process in step S <b> 4, on the removable medium 31.
Thereby, the strobe imaging process is completed.

以上、ストロボ撮像処理について説明した。
次に、ストロボ撮像処理のうち、ステップS4で実行されるホワイトバランス処理について説明する。
ここでは、まず、ホワイトバランス処理を実行するための機能的構成について説明し、次に、その機能的構成に基づいて実行されるホワイトバランス処理の流れについて説明する。
The strobe imaging process has been described above.
Next, the white balance process executed in step S4 in the strobe imaging process will be described.
Here, first, a functional configuration for executing the white balance processing will be described, and then a flow of white balance processing executed based on the functional configuration will be described.

ホワイトバランス処理が実行される場合、図1の撮像装置1のうち、画像分割部15と、ホワイトバランスゲイン算出部16と、輝度取得部17と、が機能する。   When the white balance process is executed, the image dividing unit 15, the white balance gain calculating unit 16, and the luminance acquiring unit 17 of the imaging device 1 in FIG. 1 function.

画像分割部15は、非発光時スルー画像及び発光時撮像画像の各データを、複数の領域、本実施形態においては、図3に示すように8×8の64の領域の各データにそれぞれ分割する。
なお、本明細書では、このように画像分割部15により分割された領域を、以下、「分割領域」と呼ぶ。
図3は、非発光時スルー画像又は発光時撮像画像から8×8の64の分割領域が得られた状態を示す模式図である。
同図に示すように、本実施形態では、各分割領域に対して、一意に特定する固有の番号、具体的には左上端の分割領域から、水平方向は右方向に、垂直方向は下方向に向けた順序で、1、2、3、4、5、6、7、8、9、10、・・・、63、64という番号が付されている。なお、以下、分割領域に付される番号を、「分割番号」と呼ぶ。
分割番号の付し方は、非発光時スルー画像及び発光時撮像画像で統一されているため、非発光時スルー画像と発光時撮像画像とのそれぞれの同一番号の分割領域は、画像全体における、位置、大きさ、及び範囲は同一となっている。
なお、各分割領域のデータは、例えば、付された番号と対応付けられてテーブル方式で記憶部に記憶されて、管理される。
The image dividing unit 15 divides each data of the non-light-emitting through image and the light-emitting captured image into a plurality of areas, in this embodiment, 8 × 8 64 areas as shown in FIG. To do.
In the present specification, the region divided by the image dividing unit 15 in this way is hereinafter referred to as “divided region”.
FIG. 3 is a schematic diagram showing a state in which 64 divided regions of 8 × 8 are obtained from the through image at the time of non-light emission or the captured image at the time of light emission.
As shown in the figure, in this embodiment, a unique number that uniquely identifies each divided region, specifically, from the divided region at the upper left corner, the horizontal direction is the right direction, and the vertical direction is the downward direction. The numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,. Hereinafter, the numbers assigned to the divided areas are referred to as “division numbers”.
Since the division numbering method is unified for the non-light-emitting through image and the light-emitting captured image, the divided areas of the same number of the non-light-emitting through image and the light-emitting captured image are the same in the entire image, The position, size, and range are the same.
Note that the data of each divided area is stored and managed in the storage unit in a table format in association with, for example, a number assigned thereto.

ホワイトバランスゲイン算出部16は、画像分割部15により分割された分割領域毎に、非発光時スルー画像についてのホワイトバランスゲインと、発光時撮像画像についてのホワイトバランスゲインとを、それぞれ算出する。
詳細には、本実施形態では、非発光時スルー画像と発光時撮像画像の各データは、RGB(R:Red,G:Green,B:Blue)成分により構成されているものとする。
この場合、ホワイトバランスゲイン算出部16は、非発光時スルー画像の分割領域毎のホワイトバランスゲインとして、R成分のゲイン(以下、「SRG」と呼ぶ)と、G成分のゲイン(以下、「SGG」と呼ぶ)と、B成分のゲイン(以下、「SBG」と呼ぶ)と、をそれぞれ算出する。なお、SRG,SGG,SBGを併せて、以下、「非発光時スルー画像のRGB成分のゲイン値」と呼ぶ。即ち、非発光時スルー画像について、分割領域毎のRGB成分のゲイン値がそれぞれ算出される。
また、ホワイトバランスゲイン算出部16は、発光時撮像画像の分割領域毎のホワイトバランスゲインとして、R成分のゲイン(以下、「LRG」と呼ぶ)と、G成分のゲイン(以下、「LGG」と呼ぶ)と、B成分のゲイン(以下、LBGと呼ぶ)と、をそれぞれ算出する。SRG,SGG,SBGを併せて、以下、「発光時撮像画像のRGB成分のゲイン値」と呼ぶ。即ち、発光時撮像画像について、分割領域毎のRGB成分のゲイン値がそれぞれ算出される。
The white balance gain calculation unit 16 calculates a white balance gain for the non-light-emitting through image and a white balance gain for the light-emitting captured image for each of the divided regions divided by the image dividing unit 15.
Specifically, in the present embodiment, it is assumed that each data of the through image at the time of non-light emission and the captured image at the time of light emission is composed of RGB (R: Red, G: Green, B: Blue) components.
In this case, the white balance gain calculation unit 16 uses an R component gain (hereinafter referred to as “SRG”) and a G component gain (hereinafter referred to as “SGG”) as the white balance gain for each divided region of the non-light-emitting through image. And the gain of the B component (hereinafter referred to as “SBG”). Hereinafter, SRG, SGG, and SBG are collectively referred to as “gain values of RGB components of the through image during non-light emission”. That is, the gain value of the RGB component for each divided region is calculated for the non-light-emitting through image.
Further, the white balance gain calculation unit 16 uses a gain of an R component (hereinafter referred to as “LRG”) and a gain of a G component (hereinafter referred to as “LGG”) as the white balance gain for each divided region of the captured image during light emission. And the gain of the B component (hereinafter referred to as LBG). Hereinafter, SRG, SGG, and SBG are collectively referred to as “gain values of RGB components of the captured image during light emission”. That is, the gain value of the RGB component for each divided region is calculated for the captured image during light emission.

次に、ホワイトバランスゲイン算出部16は、複数の分割領域毎に、発光時撮像画像のRGB成分のゲイン値をそれぞれ補正する。
ここで、本実施形態では、複数の分割領域は、ストロボの光がしっかりと照射されていると推定される分割領域(以下、「照射領域」と呼ぶ)、又は、それ以外の分割領域(以下、「非照射領域」と呼ぶ)に分類される。なお、照射領域と非照射領域との分類手法については、後述する。
このため、本実施形態では、発光時撮像画像のRGB成分のゲイン値の補正手法が、照射領域と非照射領域とでは異なる。
Next, the white balance gain calculation unit 16 corrects the RGB component gain values of the captured image during light emission for each of the plurality of divided regions.
Here, in the present embodiment, the plurality of divided areas are divided areas (hereinafter referred to as “irradiated areas”) that are presumed that the strobe light is firmly irradiated, or other divided areas (hereinafter referred to as “irradiated areas”). , Called “non-irradiated region”). In addition, the classification method of an irradiation area | region and a non-irradiation area | region is mentioned later.
For this reason, in this embodiment, the correction method of the gain value of the RGB component of the captured image at the time of light emission differs between the irradiation region and the non-irradiation region.

そこで、以下、発光時撮像画像のうち、非照射領域のRGB成分のゲイン値の補正手法について説明する。
非照射領域であっても、ストロボ光が全く照射されていないことは稀であり、ストロボ光の照射具合を考慮したホワイトバランスの調整が必要になる。このような調整を可能にすべく、発光時撮像画像のうち、非照射領域のRGB成分のゲイン値は、次のようにして補正される。
Therefore, a method for correcting the gain value of the RGB component of the non-irradiated area in the captured image during light emission will be described below.
Even in the non-irradiated region, it is rare that no strobe light is irradiated, and it is necessary to adjust the white balance in consideration of the degree of strobe light irradiation. In order to enable such adjustment, the gain value of the RGB component in the non-irradiated region in the captured image during light emission is corrected as follows.

ホワイトバランスゲイン算出部16は、非発光時スルー画像及び発光時撮像画像の非照射領域のRGB成分の各ゲイン値を、YUV(Y:輝度,U:輝度と青成分の色差,V:輝度と赤成分の色差)成分のゲイン値に変換する。
なお、以下、非発光時スルー画像及び発光時撮像画像のRGB成分の各ゲイン値から変換されたYUV成分の各ゲイン値を、「YUV変換値」と呼ぶ。
The white balance gain calculation unit 16 calculates the gain values of the RGB components of the non-irradiated areas of the non-light-emitting through image and the light-emitting captured image as YUV (Y: luminance, U: color difference between luminance and blue components, V: luminance). Converts to the red component color difference component gain value.
Hereinafter, the YUV component gain values converted from the RGB component gain values of the non-light-emitting through image and the light-emitting captured image are referred to as “YUV converted values”.

ここで、非発光時スルー画像の非照射領域のYUV変換値は、Y成分のゲイン(以下、SYと呼ぶ)と、U成分のゲイン(以下、SUと呼ぶ)と、V成分のゲイン(以下、SVと呼ぶ)と、から構成される。
この場合、非発光時スルー画像のYUV変換値は、次の式(1)から演算される。

Figure 0005459178
なお、式(1)の左辺の左から掛けられている3行3列の行列は、即ち、i行j列(i,jは、相互に独立した、1乃至3の範囲内の整数値)の要素がaijとなっている行列は、RGB成分をYUV成分に変換する変換行列である。 Here, the YUV conversion value of the non-irradiation region of the through image during non-light emission includes a Y component gain (hereinafter referred to as SY), a U component gain (hereinafter referred to as SU), and a V component gain (hereinafter referred to as SU). , Referred to as SV).
In this case, the YUV conversion value of the through image when not emitting light is calculated from the following equation (1).
Figure 0005459178
Note that the matrix of 3 rows and 3 columns multiplied from the left of the left side of Equation (1) is i rows and j columns (i and j are integer values in the range of 1 to 3 that are independent of each other). The matrix whose element is aij is a conversion matrix for converting RGB components into YUV components.

一方、発光時撮像画像の非照射領域のYUV変換値は、Y成分のゲイン(以下、LYと呼ぶ)と、U成分のゲイン(以下、LUと呼ぶ)と、V成分のゲイン(以下、LVと呼ぶ)と、から構成される。
この場合、発光時スルー画像の非照射領域のYUV変換値は、次の式(2)から演算される。

Figure 0005459178
On the other hand, the YUV conversion value of the non-irradiated region of the captured image at the time of light emission includes a Y component gain (hereinafter referred to as LY), a U component gain (hereinafter referred to as LU), and a V component gain (hereinafter referred to as LV). Called).
In this case, the YUV conversion value of the non-irradiated region of the live view through image is calculated from the following equation (2).
Figure 0005459178

次に、ホワイトバランスゲイン算出部16は、非発光時スルー画像と発光時撮像画像との各非照射領域の輝度比率(輝度比率は後述する)を総合的に考慮して、発光時撮像画像の非照射領域のYUV変換値のうち、Y成分のゲインLYを補正する。
ここで、発光時撮像画像の非照射領域のYUV変換値のうち、補正後のY成分のゲインを、以下、「LY’」と呼ぶ。換言すると、LYに対して、非発光時スルー画像と発光時撮像画像との各非照射領域の輝度比率を総合的に考慮した重み付けがなされた値が、LY’である。
LY’は、例えば次の式(3)により求められる。

Figure 0005459178
式(3)において、Cは、非発光時スルー画像と発光時撮像画像との各非照射領域の輝度比率を総合的に考慮した重み付けを行うための可変係数であって、後述する輝度比較部41で演算される平均輝度比率である。 Next, the white balance gain calculation unit 16 comprehensively considers the luminance ratio of each non-irradiated region between the non-light-emitting through image and the light-emitting captured image (the luminance ratio will be described later). Of the YUV conversion values in the non-irradiated region, the Y component gain LY is corrected.
Here, among the YUV conversion values of the non-irradiated area of the captured image during light emission, the corrected Y component gain is hereinafter referred to as “LY ′”. In other words, LY ′ is a value obtained by weighting LY in consideration of the luminance ratio of each non-irradiated area between the non-light-emitting through image and the light-emitting captured image.
For example, LY ′ is obtained by the following equation (3).
Figure 0005459178
In Equation (3), C is a variable coefficient for weighting that comprehensively considers the luminance ratio of each non-irradiated region between the non-light-emitting through image and the light-emitting captured image, and is a luminance comparison unit described later 41 is an average luminance ratio calculated by 41.

次に、ホワイトバランスゲイン算出部16は、式(3)によりY成分が補正(重み付け)された発光時撮像画像の非照射領域のYUV変換値を、RGB成分のゲイン値に逆変換する。具体的には、ホワイトバランスゲイン算出部16は、次の式(4)に従って、逆変換後の発光時撮像画像の非照射領域のRGB成分のゲイン値を求める。

Figure 0005459178
なお、式(4)の右辺の列ベクトルが、逆変換後の発光時撮像画像の非照射領域のRGB成分のゲイン値を示している。逆変換後の発光時撮像画像の非照射領域のRGB成分のゲイン値は、逆変換後のR成分のゲイン(以下、式(4)の記載に併せて「LRα」と呼ぶ)と、逆変換後のG成分のゲイン(以下、式(4)の記載に併せて「LGα」と呼ぶ)と、逆変換後のB成分のゲイン(以下、式(4)の記載に併せて「LBα」と呼ぶ)と、から構成される。
また、式(4)の左辺において、左から掛けられている行列は、式(1)や式(2)で用いられている変換行列の逆行列である。 Next, the white balance gain calculation unit 16 inversely converts the YUV conversion value of the non-irradiation region of the captured image at the time of emission in which the Y component is corrected (weighted) by Expression (3) into the gain value of the RGB component. Specifically, the white balance gain calculation unit 16 obtains the gain value of the RGB component of the non-irradiation region of the captured image at the time of light emission after inverse conversion according to the following equation (4).
Figure 0005459178
Note that the column vector on the right side of Equation (4) indicates the gain value of the RGB component of the non-irradiated region of the captured image during light emission after inverse transformation. The RGB component gain values of the non-irradiated region of the captured image at the time of light emission after inverse conversion are the inverse R component gain (hereinafter referred to as “LRα” in conjunction with the description of equation (4)) and inverse conversion. The gain of the later G component (hereinafter referred to as “LGα” in conjunction with the description of equation (4)) and the gain of the B component after inverse transformation (hereinafter referred to as “LBα” in conjunction with the description of equation (4)) Call).
On the left side of Equation (4), the matrix multiplied from the left is an inverse matrix of the transformation matrix used in Equation (1) or Equation (2).

このようにして、発光時撮像画像のうち、非照射領域のRGB成分のゲイン値が補正される。   In this way, the gain value of the RGB component of the non-irradiation area in the captured image during light emission is corrected.

以上、発光時撮像画像のうち、非照射領域のRGB成分のゲイン値の補正手法について説明した。
なお、発光時撮像画像のうち、照射領域のRGB成分のゲイン値の補正手法については、特に限定されず、例えば本実施形態では、後述する輝度比率に基づく補正手法が採用されているものとする。
In the above, the correction method of the gain value of the RGB component of a non-irradiation area among the captured images during light emission has been described.
In addition, the correction method of the gain value of the RGB component of the irradiation region in the captured image at the time of emission is not particularly limited. For example, in the present embodiment, a correction method based on a luminance ratio described later is adopted. .

そして、ホワイトバランスゲイン算出部16は、発光時撮像画像の分割領域毎におけるRGB成分の補正後のゲイン値に基づいて、記録対象の撮像画像のホワイトバランス設定を分割領域毎に行う。   Then, the white balance gain calculation unit 16 sets the white balance of the captured image to be recorded for each divided region based on the gain value after correction of the RGB components for each divided region of the captured image during light emission.

以上説明したように、ホワイトバランスゲイン算出部16の処理では、分割領域毎の輝度比率が必要になる。このような輝度比率の演算等を行うべく、輝度取得部17が設けられている。
即ち、輝度取得部17は、非発光時スルー画像及び発光時撮像画像のデータから、輝度値を分割領域単位で取得する。
ここで、分割領域は複数の画素から構成されるため、分割領域の輝度とは、当該分割領域を構成する各画素の輝度に基づいて演算された値、例えば、各画素の輝度の平均値を意味するものとする。
As described above, the processing of the white balance gain calculation unit 16 requires a luminance ratio for each divided region. In order to perform such a luminance ratio calculation, a luminance acquisition unit 17 is provided.
That is, the luminance acquisition unit 17 acquires a luminance value for each divided area from the data of the non-light-emitting through image and the light-emitting captured image.
Here, since the divided area is composed of a plurality of pixels, the luminance of the divided area is a value calculated based on the luminance of each pixel constituting the divided area, for example, an average value of the luminance of each pixel. Shall mean.

輝度取得部17には、輝度比較部41が設けられている。
輝度比較部41は、発光時スルー画像及び非発光時撮像画像の各分割領域の輝度比率を算出する。
領域番号i(iは、分割総数以下の正の整数値であり、本実施形態では64以下の正の整数値)の輝度比率Piは、次の式(5)により求められる。

Figure 0005459178
式(5)において、Yi’は、発光時撮像画像のi番目の分割領域の輝度を示している。Yiは、非発光時スルー画像のi番目の分割領域の輝度を示している。
本実施形態では、このような式(5)による輝度比較部41の演算結果は、例えば図4に示すテーブル形式で記憶部24に記憶されて、管理される。 The luminance acquisition unit 17 is provided with a luminance comparison unit 41.
The luminance comparison unit 41 calculates the luminance ratio of each divided region of the through image during light emission and the captured image during non-light emission.
The luminance ratio Pi of the region number i (i is a positive integer value equal to or less than the total number of divisions, and in the present embodiment, a positive integer value equal to or less than 64) is obtained by the following equation (5).
Figure 0005459178
In Expression (5), Yi ′ represents the luminance of the i-th divided area of the captured image during light emission. Yi represents the luminance of the i-th divided area of the through image when no light is emitted.
In this embodiment, the calculation result of the brightness | luminance comparison part 41 by such Formula (5) is memorize | stored in the memory | storage part 24, for example in the table format shown in FIG. 4, and is managed.

図4は、発光時スルー画像及び非発光時撮像画像の各分割領域の輝度比率を格納するテーブルの一例を示している。
本実施形態において、図4のテーブルは行列構造を有しているため、以下、図4中横方向の項目の集合体を「行」と称し、同図中縦方向の項目の集合体を「列」と称する。所定の行には、所定の領域番号が対応付けられている。即ち、所定の行には、当該行に対応する領域番号についての、「領域番号」、「非発光時の輝度」、「発光時の輝度」、及び「輝度比率」という項目がそれぞれ配置されている。
上から第i行目(ただし、図4の項目名が記載された一番上の行は除外する。以下同じ)。の「領域番号」には、領域番号iが格納される。
上から第i行目の「非発光時の輝度」には、非発光時スルー画像のi番目の分割領域の輝度Yiが格納される。
上から第i行目の「発光時の輝度」には、発光時撮像画像のi番目の分割領域の輝度Yi’が格納される。
上から第i行目の「輝度比率」には、i番目の輝度比率Pi、即ち式(5)の演算結果が格納される。
FIG. 4 shows an example of a table that stores the luminance ratio of each divided region of the through image during light emission and the captured image during non-light emission.
In the present embodiment, since the table of FIG. 4 has a matrix structure, the collection of items in the horizontal direction in FIG. 4 is hereinafter referred to as “row”, and the collection of items in the vertical direction in FIG. Referred to as a column. A predetermined area number is associated with the predetermined line. In other words, items of “area number”, “brightness at non-light emission”, “brightness at light emission”, and “brightness ratio” for the area number corresponding to the row are arranged in a predetermined line, respectively. Yes.
The i-th line from the top (however, the top line in which the item names in FIG. 4 are described is excluded. The same applies hereinafter). The “region number” stores the region number i.
In the “illuminance at the time of non-light emission” on the i-th row from the top, the luminance Yi of the i-th divided area of the through image at the time of non-light emission is stored.
In the “iluminance at the time of light emission” on the i-th row from the top, the luminance Yi ′ of the i-th divided region of the captured image at the time of light emission is stored.
In the “brightness ratio” in the i-th row from the top, the i-th brightness ratio Pi, that is, the calculation result of Expression (5) is stored.

本実施形態では、このように求められた分割領域毎の輝度比率に基づいて、各分割領域が、非照射領域又は照射領域に分類される。具体的には例えば本実施形態では、ストロボの光がしっかりと当たっているときの輝度比率のうち最低値として適切な値が、閾値として予め設定されている。この場合、輝度比率Piが閾値以下ならば、i番目の分割領域は非照射領域に分類され、一方、輝度比率Piが閾値を越えているならば、i番目の分割領域は照射領域に分類される。   In the present embodiment, each divided area is classified into a non-irradiated area or an irradiated area based on the luminance ratio for each divided area thus obtained. Specifically, for example, in this embodiment, an appropriate value as a minimum value is preset as a threshold value among the luminance ratios when the strobe light is shining firmly. In this case, if the luminance ratio Pi is equal to or smaller than the threshold value, the i-th divided area is classified as a non-irradiated area, while if the luminance ratio Pi exceeds the threshold value, the i-th divided area is classified as an irradiated area. The

次に、輝度比較部41は、全分割領域毎の輝度比率を比率の低い順番にソートする。
そして、輝度比較部41は、輝度の低い順番にソートされた各分割領域の輝度比率のうち、下位2乃至4番目の輝度比率の平均値を、上述した平均輝度比率Cとして求める。
具体的には、輝度比較部41は、次の式(6)を演算することにより、平均輝度比率Cを求める。

Figure 0005459178
式(6)において、Ct2乃至Ct4の各々は、下位2乃至4番目の各々の輝度比率を示している。
例えば、全分割領域の輝度比率(C1=Y1’/Y1,C2=Y2’/Y2,C3=Y3’/Y3,・・・,C8=Y8’/Y8,・・・,C22=Y22’/Y22,・・・,C64=Y64’/Y64)のうち、下位4番目までの輝度比率が次の通りであったとする。即ち、64番目(下から1番目):Ct1=C1=Y1’/Y1、63番目(下から2番目):Ct2=C2=Y2’/Y2、62番目(下から3番目):Ct3=C8=Y8’/Y8、61番目(下から4番目):Ct4=C22=Y22’/Y22であったものとする、この場合、平均輝度比率Cは、次の式(7)により算出される。
Figure 0005459178
このようにして求められた平均輝度比率Cは、上述した式(3)に係数として代入されて用いられる。 Next, the luminance comparison unit 41 sorts the luminance ratios for all the divided regions in ascending order of ratio.
The luminance comparison unit 41 obtains the average value of the lower to second to fourth luminance ratios as the above-described average luminance ratio C among the luminance ratios of the divided areas sorted in the order of decreasing luminance.
Specifically, the luminance comparison unit 41 calculates the average luminance ratio C by calculating the following equation (6).
Figure 0005459178
In Expression (6), Ct2 to Ct4 indicate the luminance ratios of the second to fourth lower levels.
For example, the luminance ratio (C1 = Y1 ′ / Y1, C2 = Y2 ′ / Y2, C3 = Y3 ′ / Y3,..., C8 = Y8 ′ / Y8,..., C22 = Y22 ′ / Y22,..., C64 = Y64 ′ / Y64), the luminance ratio up to the fourth lower order is as follows. That is, 64th (first from the bottom): Ct1 = C1 = Y1 ′ / Y1, 63rd (second from the bottom): Ct2 = C2 = Y2 ′ / Y2, 62nd (third from the bottom): Ct3 = C8 = Y8 ′ / Y8, 61st (fourth from the bottom): Assume that Ct4 = C22 = Y22 ′ / Y22. In this case, the average luminance ratio C is calculated by the following equation (7).
Figure 0005459178
The average luminance ratio C obtained in this way is used by being substituted as a coefficient in the above-described equation (3).

以上、図3及び図4を参照して、本実施形態の図1の撮像装置1の機能的構成のうち、図2のステップS4のホワイトバランス処理を実行するための機能的構成について説明した。   The functional configuration for executing the white balance process in step S4 in FIG. 2 among the functional configurations of the imaging apparatus 1 in FIG. 1 according to the present embodiment has been described above with reference to FIGS. 3 and 4.

次に、このような機能的構成を有する撮像装置1が実行するステップS4のホワイトバランス処理の詳細な流れについて説明する。
ホワイトバランス処理においては、CPU11の制御の下、ホワイトバランスゲイン算出部16乃至輝度取得部17の何れかが各ステップの処理を実行する。ただし、以下の説明においては、CPU11の制御についての説明は省略する。
図5は、図1の撮像装置1が実行する図2のストロボ撮像処理のうち、ステップS4のホワイトバランス処理の流れの詳細を説明するフローチャートである。
Next, a detailed flow of the white balance process in step S4 executed by the imaging apparatus 1 having such a functional configuration will be described.
In the white balance process, under the control of the CPU 11, any one of the white balance gain calculation unit 16 to the luminance acquisition unit 17 executes the process of each step. However, in the following explanation, explanation about control of CPU11 is omitted.
FIG. 5 is a flowchart for explaining the details of the flow of the white balance process in step S4 in the strobe imaging process of FIG. 2 executed by the imaging apparatus 1 of FIG.

ステップS21において、画像分割部15は、非発光時スルー画像と発光時撮像画像の各データを8×8の分割領域にそれぞれ分割し、輝度取得部17は、各分割領域の輝度値を取得する。   In step S21, the image dividing unit 15 divides each data of the non-light-emitting through image and the light-emitting captured image into 8 × 8 divided regions, and the luminance acquisition unit 17 acquires the luminance value of each divided region. .

ステップS22において、輝度比較部41は、非発光時スルー画像の輝度値と発光時撮像画像の輝度値との輝度比率を分割領域毎にそれぞれ算出する。
詳細には、輝度比較部41は、上述した式(5)を演算することにより、i番の分割領域についての輝度比率Piを算出する。このような式(5)の演算が、1乃至64番の各々に対して実行され、輝度比率P1乃至P64が算出される。
本実施形態では、このような式(5)による輝度比較部41の演算結果は、例えば図4に示すテーブル形式で記憶部に分割領域毎に記憶されて、管理される。
In step S <b> 22, the luminance comparison unit 41 calculates a luminance ratio between the luminance value of the through image when not emitting light and the luminance value of the captured image when emitting light for each divided region.
Specifically, the luminance comparison unit 41 calculates the luminance ratio Pi for the i-th divided region by calculating the above-described equation (5). Such an operation of Expression (5) is executed for each of Nos. 1 to 64, and the luminance ratios P1 to P64 are calculated.
In this embodiment, the calculation result of the brightness | luminance comparison part 41 by such Formula (5) is memorize | stored for every division area in the memory | storage part, for example in the table format shown in FIG. 4, and is managed.

ステップS23において、ホワイトバランスゲイン算出部16は、非発光時スルー画像と発光時撮像画像の各データについて、分割領域毎のRGB成分のゲイン値を設定する。   In step S23, the white balance gain calculation unit 16 sets the gain value of the RGB component for each divided region for each data of the non-light-emitting through image and the light-emitting captured image.

ステップS24において、ホワイトバランスゲイン算出部16は、処理対象の領域番号iとして「1」を設定する(i=1)。即ち、本実施形態では、後述するステップS25乃至ステップS30までの処理の対象となる分割領域が、分割番号の順番で順次設定される。このため、処理対象の分割番号iとして、先ず「1」が設定される。   In step S24, the white balance gain calculation unit 16 sets “1” as the region number i to be processed (i = 1). That is, in the present embodiment, the divided areas to be processed in steps S25 to S30 described later are sequentially set in the order of the divided numbers. Therefore, “1” is first set as the division number i to be processed.

ステップS25において、ホワイトバランスゲイン算出部16は、輝度比率Piが閾値を超えているか否かを判定する(Pi>しきい値)。   In step S25, the white balance gain calculation unit 16 determines whether or not the luminance ratio Pi exceeds the threshold (Pi> threshold).

輝度比率Piが閾値よりも高い場合とは、上述したように、処理対象の領域番号iの分割領域が照射領域である場合を意味する。このような場合、ステップS25の処理でYESであると判定されて、処理はステップS26に進む。
ステップS26において、ホワイトバランスゲイン算出部16は、輝度比率Piに基づいて、領域番号iの分割領域(照射領域)のRGB成分のゲイン値を補正する。
これにより、処理はステップS31に進む。ただし、ステップS31以降の処理については後述する。
The case where the luminance ratio Pi is higher than the threshold means a case where the divided area of the area number i to be processed is an irradiation area as described above. In such a case, it is determined as YES in the process of step S25, and the process proceeds to step S26.
In step S <b> 26, the white balance gain calculation unit 16 corrects the gain value of the RGB component of the divided area (irradiation area) with the area number i based on the luminance ratio Pi.
Thereby, a process progresses to step S31. However, the processing after step S31 will be described later.

これに対して、輝度比率Piが閾値以下の場合とは、上述したように、処理対象の領域番号iの分割領域が非照射領域である場合を意味する。このような場合、ステップS25の処理でNOであると判定されて、処理はステップS27に進む。
そして、次のようなステップS27乃至S30の処理が実行されて、領域番号iの分割領域のRGB成分のゲイン値が補正される。
On the other hand, the case where the luminance ratio Pi is equal to or smaller than the threshold means a case where the divided region of the region number i to be processed is a non-irradiation region as described above. In such a case, it is determined as NO in the process of step S25, and the process proceeds to step S27.
Then, the following processing of steps S27 to S30 is executed to correct the RGB component gain values of the divided region of region number i.

即ち、ステップS27において、輝度比較部41は、ステップS22の処理で演算された全輝度比率P1乃至P64のうち、低位2乃至4番目の輝度比率に基づいて、平均輝度比率Cを算出する。
具体的には、上述した式(6)に従って、平均輝度比率Cが演算される。
なお、ステップS27の処理は、ステップS25の処理で初回にNOと判定された後に1回だけ実行すれば足り、それ以降、省略しても構わない。
That is, in step S27, the luminance comparing unit 41 calculates the average luminance ratio C based on the second to fourth luminance ratios among the total luminance ratios P1 to P64 calculated in the process of step S22.
Specifically, the average luminance ratio C is calculated according to the above-described equation (6).
Note that the process of step S27 need only be executed once after it is determined NO in the process of step S25 for the first time, and may be omitted thereafter.

ステップS28において、ホワイトバランスゲイン算出部16は、ステップS23の処理で設定されたゲイン値のうち、番号iの分割領域(照射領域)のRGB成分のゲイン値をYUV変換値に変換する。
詳細には、ホワイトバランスゲイン算出部16は、上述した式(1)に従って、領域番号iの分割領域(非照射領域)のYUV変換値が求められる。
In step S28, the white balance gain calculation unit 16 converts the gain value of the RGB component of the divided area (irradiation area) of number i into the YUV conversion value among the gain values set in the process of step S23.
Specifically, the white balance gain calculation unit 16 obtains the YUV conversion value of the divided area (non-irradiation area) having the area number i according to the above-described equation (1).

ステップS29において、ホワイトバランスゲイン算出部16は、ステップS27の処理で求めた平均輝度比率Cに基づいて、発光時撮像画像の領域番号iの分割領域(非照射領域)のYUV変換値のうち、Y成分の値を補正することによって、重み付けしたY成分の値を算出する。
詳細には、ホワイトバランスゲイン算出部16は、ステップS24の処理で算出した平均輝度比率Cを係数として用いる上述した式(3)に従って、発光時撮像画像の領域番号iの分割領域(非照射領域)のYUV変換値のうち、Y成分のゲインLYを、ゲインLY’に補正する。
このように、非発光時スルー画像と発光時撮像画像との各分割領域のうち、非照射領域の輝度比率を総合的に考慮して、発光時撮像画像の領域番号iの分割領域(非照射領域)のYUV変換値のうち、Y成分のゲインLYが補正されて、補正後のY成分のゲインLY’となる。
In step S29, the white balance gain calculation unit 16 determines, based on the average luminance ratio C obtained in the process of step S27, among the YUV converted values of the divided area (non-irradiation area) of the area number i of the captured image during emission. A weighted Y component value is calculated by correcting the Y component value.
Specifically, the white balance gain calculation unit 16 uses the average luminance ratio C calculated in the process of step S24 as a coefficient, and the divided area (non-irradiation area) of the area number i of the captured image at the time of emission according to the above equation (3). ) Y component gain LY is corrected to gain LY ′.
In this way, among the divided regions of the non-light-emitting through image and the light-emitting captured image, the luminance ratio of the non-irradiated region is comprehensively considered and the divided region (i.e., non-irradiated) The Y component gain LY is corrected among the YUV conversion values in the region), and the corrected Y component gain LY ′ is obtained.

ステップS30において、ホワイトバランスゲイン算出部16は、領域番号iの分割領域(非照射領域)についての、重み付けが加味されたYUV変換値をRGB成分のゲイン値に逆変換する。
詳細には、ホワイトバランスゲイン算出部16は、上述した式(4)に従って、発光時撮像画像の領域番号iの分割領域(非照射領域)領域におけるRGB成分の逆変換後のゲイン値を求める。
即ち、ホワイトバランスゲイン算出部16は、ステップS29の処理で重み付けが付加された、発光時撮像画像の番号iの分割領域(非照射領域)のYUV変換値(LY’,LU,LV)を、R成分のゲイン(LRα)と、G成分のゲイン(LGα)と、B成分のゲイン(LBα)と、にそれぞれ逆変換する。
In step S <b> 30, the white balance gain calculation unit 16 inversely converts the weighted YUV conversion value for the division area (non-irradiation area) with the area number i into the RGB component gain values.
Specifically, the white balance gain calculation unit 16 obtains a gain value after inverse conversion of the RGB components in the divided area (non-irradiation area) area of the area number i of the captured image at the time of emission according to the above-described equation (4).
That is, the white balance gain calculation unit 16 calculates the YUV converted value (LY ′, LU, LV) of the divided area (non-irradiation area) of the number i of the captured image at the time of emission, to which weighting is added in the process of step S29. The R component gain (LRα), the G component gain (LGα), and the B component gain (LBα) are respectively inversely transformed.

このようにして、発光時撮像画像の領域番号iの分割領域のRGB成分のゲイン値は、当該分割領域が照射領域の場合(ステップS25の処理でYESであると判定された場合)にはステップS26の処理により、当該分割領域が非照射領域の場合(ステップS25の処理でNOであると判定された場合)にはステップS27乃至S30の処理により、それぞれ補正される。
これにより、処理はステップS31に進む。
In this way, the gain value of the RGB component of the divided area of area number i of the captured image at the time of light emission is a step when the divided area is an irradiation area (when it is determined YES in the process of step S25). If the divided area is a non-irradiated area by the process of S26 (if it is determined NO in the process of step S25), the process is corrected by the processes of steps S27 to S30.
Thereby, a process progresses to step S31.

ステップS31において、ホワイトバランスゲイン算出部16は、領域番号iを1だけインクリメントする(i=i+1)。   In step S31, the white balance gain calculation unit 16 increments the region number i by 1 (i = i + 1).

ステップS32において、ホワイトバランスゲイン算出部16は、領域番号iが64を超えたか否かを判定する。
領域番号iが64を超えていない場合、即ち、発光時撮像画像のRGB成分のゲイン値が補正されていない分割領域が存在する場合、ステップS32においてNOであると判定されて、処理はステップS25に戻され、それ以降の処理が繰り返される。
即ち、領域番号1乃至64の分割領域のそれぞれに対して、ステップS25乃至S32のループ処理がその都度実施される。この場合、照射領域に分類される分割領域(ステップS25の処理でYESであると判定される分割領域)については、ステップS26の処理により、発光時撮像画像のRGB成分のゲイン値が補正される。これに対して、非照射領域に分類される分割領域(ステップS25の処理でNOであると判定される分割領域)については、ステップS27乃至S30の処理により、発光時撮像画像のRGB成分のゲイン値が補正される。
そして、最後の分割領域、即ち領域番号64の分割領域についてのステップS31の処理が実行されると、領域番号iは、65となり、64を超える。従って、次のステップS32においてYESであると判定されて、処理はステップS33に進む。
In step S <b> 32, the white balance gain calculation unit 16 determines whether or not the region number i exceeds 64.
If the area number i does not exceed 64, that is, if there is a divided area in which the gain value of the RGB component of the captured image during light emission is not corrected, it is determined NO in step S32, and the process proceeds to step S25. And the subsequent processing is repeated.
That is, the loop process of steps S25 to S32 is performed for each of the divided areas of area numbers 1 to 64 each time. In this case, the gain value of the RGB component of the captured image during light emission is corrected by the process of step S26 for the divided area classified as the irradiation area (the divided area determined as YES in the process of step S25). . On the other hand, for the divided regions classified as non-irradiated regions (divided regions determined to be NO in the process of step S25), the gains of the RGB components of the captured image during light emission are processed by the processes of steps S27 to S30. The value is corrected.
When the process of step S31 is executed for the last divided area, that is, the divided area having the area number 64, the area number i becomes 65 and exceeds 64. Therefore, it is determined as YES in the next step S32, and the process proceeds to step S33.

ステップS33において、ホワイトバランスゲイン算出部16は、分割領域毎に、照射領域についてはステップS26の処理で補正されたRGB成分のゲイン値に基づいて、非照射領域についてはステップS27乃至S30の処理で補正されたRGB成分のゲイン値に基づいて、発光時撮像画像のホワイトバランスを設定する。
これにより、ホワイトバランス処理は終了する。即ち、図2のステップS4の処理は終了して、処理はステップS5に進む。
In step S33, the white balance gain calculation unit 16 performs the processing in steps S27 to S30 for the non-irradiation region based on the gain value of the RGB component corrected in step S26 for the irradiation region for each divided region. Based on the corrected RGB component gain values, the white balance of the captured image during light emission is set.
As a result, the white balance process ends. That is, the process of step S4 in FIG. 2 ends, and the process proceeds to step S5.

以上説明したように、撮像装置1は、発光部21と、撮像部20と、CPU11と、ホワイトバランスゲイン算出部16と、画像分割部15と、輝度算出部と、輝度比較部41と、を備える。   As described above, the imaging device 1 includes the light emitting unit 21, the imaging unit 20, the CPU 11, the white balance gain calculating unit 16, the image dividing unit 15, the luminance calculating unit, and the luminance comparing unit 41. Prepare.

CPU11は、ユーザの操作により、発光部21による発光により明るくされた時の画像である発光時撮像画像と当該発光部21による発光がなされていない時の画像である非発光時スルー画像とを撮像部20に撮像するように制御する。
ホワイトバランスゲイン算出部16は、撮像の際に設定された発光時撮像画像及び非発光時スルー画像のホワイトバランスを調整するための各色成分のゲイン値を夫々算出する。
画像分割部15は、撮像部20により撮像された撮像領域を複数の領域に分割する。
輝度取得部17は、画像分割部15により夫々分割された領域の発光時撮像画像と非発光時スルー画像とについて、画像分割部15により分割された複数の領域の輝度値を夫々算出する。
輝度比較部41は、輝度取得部17により算出された発光時撮像画像の領域の輝度値を非発光時スルー画像の領域の輝度値で除した値を相対値として夫々算出する。
ホワイトバランスゲイン算出部16は、輝度比較部41により夫々算出された相対値が所定値以下の領域を特定する。
輝度比較部41は、夫々算出された相対値の中から、値の低い相対値を優先して複数選択する。
ホワイトバランスゲイン算出部16は、算出された発光時撮像画像及び非発光時スルー画像の各色成分の値と輝度比較部41により選択された複数の相対値とに基づいて、発光時撮像画像の各色成分のゲイン値を補正する。
The CPU 11 captures, by a user's operation, a captured image at the time of light emission that is brightened by light emission by the light emitting unit 21 and a through image at the time of non-light emission that is an image when light emission by the light emitting unit 21 is not performed. The unit 20 is controlled so as to capture an image.
The white balance gain calculation unit 16 calculates the gain value of each color component for adjusting the white balance of the captured image during light emission and the through image during non-light emission set at the time of imaging.
The image dividing unit 15 divides the imaging area captured by the imaging unit 20 into a plurality of areas.
The luminance acquisition unit 17 calculates the luminance values of the plurality of regions divided by the image dividing unit 15 for the captured image at the time of light emission and the through image at the time of non-light emission of the regions divided by the image dividing unit 15, respectively.
The luminance comparison unit 41 calculates, as relative values, values obtained by dividing the luminance value of the captured image area during emission calculated by the luminance acquisition unit 17 by the luminance value of the through image area during non-emission.
The white balance gain calculation unit 16 identifies regions where the relative values calculated by the luminance comparison unit 41 are equal to or less than a predetermined value.
The luminance comparison unit 41 selects a plurality of relative values having priority from among the calculated relative values.
The white balance gain calculation unit 16 determines each color of the captured image during light emission based on the calculated values of the color components of the captured image during emission and the through image during non-emission and the plurality of relative values selected by the luminance comparison unit 41. Correct the gain value of the component.

このように構成される撮像装置1においては、ストロボの発光時に撮像された画像において、画像の自然な色再現性を向上させることができる。   In the imaging apparatus 1 configured as described above, natural color reproducibility of an image can be improved in an image captured when the strobe emits light.

また、ホワイトバランスゲイン算出部16は、取得された発光時撮像画像及び非発光時スルー画像のRGB成分を他の色空間である少なくとも輝度情報を含む画素のパラメータの組(YUV変換値)に変換する。
また、ホワイトバランスゲイン算出部16は、さらに、変換された画素のパラメータの組(YUV変換値)に基づいて、RGB成分のゲイン値を補正する。
Further, the white balance gain calculation unit 16 converts the RGB components of the acquired captured image at the time of emission and the through image at the time of non-light emission into a set of pixel parameters (YUV conversion value) including at least luminance information which is another color space. To do.
Further, the white balance gain calculation unit 16 further corrects the RGB component gain values based on the converted pixel parameter set (YUV conversion value).

このように構成される撮像装置1においては、YUV変換値に変換することにより、グレーバランスレベルで輝度の調整を行うために、ストロボの発光時に撮像された画像の各色成分の毎の輝度を個別に調整する場合に生じ得る特定の色の変化が生じなくなり、画像の自然な色再現性をより向上させることができる。   In the imaging apparatus 1 configured as described above, the luminance for each color component of the image captured at the time of flash emission is individually set in order to adjust the luminance at the gray balance level by converting the YUV conversion value. Therefore, a specific color change that may occur in the case of adjustment is not generated, and the natural color reproducibility of the image can be further improved.

なお、本発明は、上述の実施形態に限定されるものではなく、本発明の目的を達成できる範囲での変形、改良等は本発明に含まれるものである。   In addition, this invention is not limited to the above-mentioned embodiment, The deformation | transformation in the range which can achieve the objective of this invention, improvement, etc. are included in this invention.

また、上述の実施形態では、輝度比率Piを、上述した式(5)により求めたがこれに限られない。例えば輝度比率Piは、次の式(8)により求めることができる。この場合には、平均輝度比率Cには、上位2乃至4番目の各輝度比率Piが用いられる。

Figure 0005459178
In the above-described embodiment, the luminance ratio Pi is obtained by the above-described equation (5), but is not limited thereto. For example, the luminance ratio Pi can be obtained by the following equation (8). In this case, as the average luminance ratio C, the second to fourth luminance ratios Pi are used.
Figure 0005459178

また、上述の実施形態では、平均輝度比率を下位2から4番目の輝度比率を用いたがこれに限られない。平均輝度比率に用いる輝度比率は、少なくとも、全輝度比率において、相対的に低い値となっているものであればよい。   In the above-described embodiment, the average luminance ratio is the second to fourth luminance ratio, but the present invention is not limited to this. The luminance ratio used for the average luminance ratio only needs to be a relatively low value at least in the entire luminance ratio.

また、上述の実施形態では、最下位の輝度比率を用いないように構成したが、これに限られない。最下位の輝度比率が他の輝度比率に比べて飛び抜けて低い値である等の不安定な値でなければ、最下位の輝度比率を用いるように構成してもよい。   In the above-described embodiment, the lowest luminance ratio is not used. However, the present invention is not limited to this. If the lowest luminance ratio is not an unstable value such as a low value compared with other luminance ratios, the lowest luminance ratio may be used.

また、上述の実施形態では、画像の分割は、非発光時スルー画像及び発光時撮像画像の各データを、複数の領域、本実施形態においては、図3に示すように8×8の64の分割領域の各データにそれぞれ分割したがこれに限られない。画像の分割は、複数の領域に分割すればよく、分割数や分割領域の決定は、適宜決定可能である。   In the above-described embodiment, the image is divided into each of the non-light-emitting through image and the light-emitting captured image data in a plurality of areas, in this embodiment, 8 × 8 64 as shown in FIG. Although it divided | segmented into each data of the division area, it is not restricted to this. The image may be divided into a plurality of regions, and the number of divisions and the divided regions can be determined as appropriate.

また、上述の実施形態では、撮像部20により撮像した発光時撮像画像及び非発光時スルー画像を用いてホワイトバランス処理を実行したが、これに限られない。ホワイトバランス処理は、例えば、CPU11や画像処理部14により外部から取得した撮像画像及びスルー画像を用いてもよい。また、上述の実施形態では、発光時撮像画像と非発光時スルー画像とを用いてホワイトバランス処理を実行したがこれに限られない、例えば、発光時撮像画像と非発光時撮像画像を用いてホワイトバランス処理を実行してもよい。   In the above-described embodiment, the white balance processing is performed using the captured image at the time of light emission and the through image at the time of non-light emission captured by the imaging unit 20, but the present invention is not limited to this. For the white balance processing, for example, a captured image and a through image acquired from the outside by the CPU 11 or the image processing unit 14 may be used. In the above-described embodiment, the white balance processing is executed using the captured image when emitting light and the through image when not emitting light. However, the present invention is not limited to this. For example, the captured image when emitting light and the captured image when not emitting light are used. White balance processing may be executed.

また、上述の実施形態では、本発明が適用される電子装置は、デジタルカメラ等の撮像装置1を例として説明したが、特にこれに限定されない。本発明は、上述のホワイトバランス処理を実行可能な電子機器一般に適用することができる。具体的には、例えば、本発明は、ノート型のパーソナルコンピュータ、ビデオカメラ、携帯型ナビゲーション装置、携帯電話装置、ポータブルゲーム機、WEBカメラ等に適用可能である。   In the above-described embodiment, the electronic apparatus to which the present invention is applied has been described by taking the imaging apparatus 1 such as a digital camera as an example, but is not particularly limited thereto. The present invention can be applied to general electronic devices capable of executing the above-described white balance processing. Specifically, for example, the present invention can be applied to a notebook personal computer, a video camera, a portable navigation device, a mobile phone device, a portable game machine, a WEB camera, and the like.

上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。また例えば、上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。換言すると、図1のハードウェアの構成は例示に過ぎず、特に限定されない。即ち、上述した一連の処理を全体として実行できる機能が撮像装置1に備えられていれば足り、この機能を実現するためにどのような機能ブロックを用いるのかは特に図1の例に限定されない。また、1つの機能ブロックは、ハードウェア単体で構成してもよいし、ソフトウェア単体で構成してもよいし、それらの組み合わせで構成してもよい。   The series of processes described above can be executed by hardware or can be executed by software. For example, the series of processes described above can be executed by hardware or can be executed by software. In other words, the hardware configuration in FIG. 1 is merely an example, and is not particularly limited. That is, it is sufficient that the imaging apparatus 1 has a function capable of executing the above-described series of processing as a whole, and what functional block is used to realize this function is not particularly limited to the example of FIG. In addition, one functional block may be constituted by hardware alone, software alone, or a combination thereof.

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、コンピュータ等にネットワークや記録媒体からインストールされる。コンピュータは、専用のハードウェアに組み込まれているコンピュータであってもよい。また、コンピュータは、各種のプログラムをインストールすることで、各種の機能を実行することが可能なコンピュータ、例えば汎用のパーソナルコンピュータであってもよい。   When a series of processing is executed by software, a program constituting the software is installed on a computer or the like from a network or a recording medium. The computer may be a computer incorporated in dedicated hardware. The computer may be a computer capable of executing various functions by installing various programs, for example, a general-purpose personal computer.

このようなプログラムを含む記録媒体は、ユーザにプログラムを提供するために装置本体とは別に配布される図1のリムーバブルメディア31により構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される記録媒体等で構成される。リムーバブルメディア31は、例えば、磁気ディスク(フロッピディスクを含む)、光ディスク、又は光磁気ディスク等により構成される。光ディスクは、例えば、CD−ROM(Compact Disk−Read Only Memory),DVD(Digital Versatile Disk)等により構成される。光磁気ディスクは、MD(Mini−Disk)等により構成される。また、装置本体に予め組み込まれた状態でユーザに提供される記録媒体は、例えば、プログラムが記録されている図1のROM12や、図1の記憶部24に含まれるハードディスク等で構成される。   The recording medium including such a program is not only constituted by the removable medium 31 of FIG. 1 distributed separately from the apparatus main body in order to provide the program to the user, but also in a state of being incorporated in the apparatus main body in advance. It is comprised with the recording medium etc. which are provided in this. The removable medium 31 is composed of, for example, a magnetic disk (including a floppy disk), an optical disk, a magneto-optical disk, or the like. The optical disk is composed of, for example, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versatile Disk), or the like. The magneto-optical disk is configured by an MD (Mini-Disk) or the like. In addition, the recording medium provided to the user in a state of being preliminarily incorporated in the apparatus main body includes, for example, the ROM 12 in FIG. 1 in which the program is recorded, the hard disk included in the storage unit 24 in FIG.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的或いは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in time series along the order, but is not necessarily performed in time series, either in parallel or individually. The process to be executed is also included.

1・・・撮像装置、11・・・CPU、12・・・ROM、13・・・RAM、14・・・画像処理部、15・・・ホワイトバランスゲイン算出部、16・・・画像分割部、17・・・輝度取得部、18・・・バス、19・・・入出力インターフェース、20・・・撮像部、21・・・発光部、22・・・操作部、23・・・表示部、24・・・記憶部、25・・・通信部、26・・・ドライブ、31・・・リムーバブルメディア、41・・・輝度比較部   DESCRIPTION OF SYMBOLS 1 ... Imaging device, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Image processing part, 15 ... White balance gain calculation part, 16 ... Image division part , 17 ... Luminance acquisition unit, 18 ... Bus, 19 ... Input / output interface, 20 ... Imaging unit, 21 ... Light emitting unit, 22 ... Operation unit, 23 ... Display unit , 24 ... storage unit, 25 ... communication unit, 26 ... drive, 31 ... removable media, 41 ... luminance comparison unit

Claims (7)

撮像手段と、
発光手段と、
前記発光手段による発光により明るくされた時の画像である第1の画像と当該第1の画像よりも明るさの低い第2の画像とを前記撮像手段に撮像するように制御する撮像制御手段と、
前記第1の画像及び前記第2の画像の撮像の際に設定されたホワイトバランスを調整するための各色成分のゲイン値を夫々取得する第1の取得手段と、
前記撮像手段により撮像された画像を複数の領域に分割する分割手段と、
前記第1の画像と前記第2の画像とについて、前記複数の領域の輝度値を夫々取得する第2の取得手段と、
前記複数の領域の各々について、前記第2の取得手段により算出された前記第1の画像の領域の輝度値と当該第1の画像の領域に対応する前記第2の画像の領域の輝度値との相対値算出する算出手段と、
前記算出手段により算出された複数の相対値の中から、所定数の相対値を選択する選択手段と、
前記第1の取得手段により取得された前記第1の画像及び前記第2の画像の各色成分のゲイン値と前記選択手段により選択された所定数の相対値に基づいて、前記第1の画像の少なくとも一部の領域の各色成分のゲイン値を補正する補正手段と
を備えたことを特徴とする撮像装置。
Imaging means;
A light emitting means;
An imaging control unit that controls the imaging unit to capture a first image that is an image brightened by light emission from the light emitting unit and a second image that is lower in brightness than the first image ; ,
First acquisition means for acquiring gain values of the respective color components for adjusting white balance set at the time of capturing the first image and the second image;
A dividing unit that divides an image captured by the imaging unit into a plurality of regions;
Second acquisition means for acquiring the luminance values of the plurality of regions for the first image and the second image, respectively.
For each of the plurality of regions, and the luminance value of the region of the second image corresponding to the region of the luminance value and the first image of the region of the calculated first image by the second acquisition unit A calculating means for calculating a relative value of
Selecting means for selecting a predetermined number of relative values from among a plurality of relative values calculated by the calculating means;
On the basis of the predetermined number of relative values selected by said selecting means and gain value for each color component of the first said acquired by the acquisition means in the first image and the second image, the first image An image pickup apparatus comprising: a correction unit that corrects a gain value of each color component in at least a part of the image area.
前記補正手段は、前記第1の画像のうち、前記相対値が所定値以上又は所定値以下の領域の各色成分のゲイン値を補正することを特徴とする請求項1に記載の撮像装置。The imaging apparatus according to claim 1, wherein the correction unit corrects a gain value of each color component in a region where the relative value is greater than or equal to a predetermined value or less than the predetermined value in the first image. 前記選択手段は、The selection means includes
前記算出手段により夫々算出された相対値が所定値以上又は所定値以下である前記第1の画像の領域を特定する特定手段を有し、A specifying unit that specifies a region of the first image in which the relative value calculated by the calculating unit is a predetermined value or more or a predetermined value or less;
前記特定手段により特定された所定値以上又は所定値以下の所定数の相対値を選択することを特徴とする請求項1又は2に記載の撮像装置。The imaging apparatus according to claim 1, wherein a predetermined number of relative values greater than or less than a predetermined value specified by the specifying unit are selected.
前記算出手段は、前記第1の画像の領域の輝度値を当該第1の画像の領域に対応する前記第2の画像の領域の輝度値で除した値を前記相対値として算出し、The calculation means calculates a value obtained by dividing the luminance value of the first image area by the luminance value of the second image area corresponding to the first image area as the relative value;
前記特定手段は、前記算出手段により夫々算出された相対値の中から、値の高い順又は値の低い順に所定数の相対値を特定することを特徴とする請求項3に記載の撮像装置。The imaging apparatus according to claim 3, wherein the specifying unit specifies a predetermined number of relative values in descending order of the value from the relative values calculated by the calculating unit.
前記第1の取得手段により取得された画像の各色成分を他の色空間における少なくとも輝度情報を含む画素のパラメータの組に変換する変換手段をさらに備え、
前記補正手段は、さらに、前記変換手段により変換された画素のパラメータの組に基づいて、前記各色成分のゲイン値を補正することを特徴とする請求項1から4の何れか1項に記載の撮像装置。
Conversion means for converting each color component of the image acquired by the first acquisition means into a set of pixel parameters including at least luminance information in another color space;
Wherein the correction means further on the basis of the set of pixels of the parameter converted by the converting means, of the according to any one of claims 1, characterized in that to correct the gain value of each color component 4 Imaging device.
発光により明るくされた時の画像である第1の画像と当該第1の画像よりも明るさの低い第2の画像とを撮像手段に撮像させるよう制御する撮像制御ステップと、
前記第1の画像及び前記第2の画像の撮像の際に設定されたホワイトバランスを調整するための各色成分のゲイン値を夫々取得する第の取得ステップと、
前記第1の取得ステップの処理により取得された画像を複数の領域に分割する分割ステップと、
前記第1の画像と前記第2の画像とについて、前記複数の領域の輝度値を夫々取得する第の取得ステップと、
前記複数の領域の各々について、前記第の取得ステップにて取得された前記第1の画像の領域の輝度値と当該第1の画像の領域に対応する前記第2の画像の領域の輝度値との相対値算出する算出ステップと、
前記算出ステップにて算出された複数の相対値の中から、所定数の相対値を選択する選択ステップと、
前記第1の取得ステップにより取得された前記第1の画像及び前記第2の画像の各色成分のゲイン値と前記選択ステップにて選択された所定数の相対値に基づいて、前記第1の画像の少なくとも一部の領域の各色成分のゲイン値を補正する補正ステップと
を含むことを特徴とするホワイトバランス調整方法。
An imaging control step for controlling the imaging means to image a first image that is an image that is brightened by light emission and a second image that is lower in brightness than the first image ;
A first acquisition step of acquiring a gain value of each color component for adjusting a white balance set at the time of capturing the first image and the second image;
A dividing step of dividing the image acquired by the processing of the first acquiring step into a plurality of regions;
A second acquisition step of acquiring the luminance values of the plurality of regions for the first image and the second image, respectively.
For each of the plurality of regions, the luminance value of the first image region acquired in the second acquiring step and the luminance value of the second image region corresponding to the first image region. a calculation step of calculating a relative value with,
A selection step of selecting a predetermined number of relative values from a plurality of relative values calculated in the calculation step;
Based on said predetermined number of relative values selected by said selecting step between the gain value of each color component of the first said acquired by the acquisition step of the first image and the second image, the first And a correction step of correcting a gain value of each color component in at least a partial area of the image .
コンピュータを、
発光により明るくされた時の画像である第1の画像と当該第1の画像よりも明るさの低い第2の画像とを撮像手段に撮像させる撮像制御手段、
前記第1の画像及び前記第2の画像のホワイトバランスを調整するための各色成分のゲイン値を夫々取得する第の取得手段、
前記撮像手段により撮像された画像を複数の領域に分割する分割手段、
前記第1の画像と前記第2の画像とについて、前記複数の領域の輝度値を夫々取得する第の取得手段、
前記複数の領域の各々について、前記第の取得手段により取得された前記第1の画像の領域の輝度値と当該第1の画像の領域に対応する前記第2の画像の領域の輝度値との相対値夫々算出する算出手段、
前記算出手段により算出された複数の相対値の中から、所定数の相対値を選択する選択手段、
前記第1の取得手段により取得された前記第1の画像及び前記第2の画像の各色成分のゲイン値と前記選択手段により選択された所定数の相対値に基づいて、前記第1の画像の少なくとも一部の領域の各色成分のゲイン値を補正する補正手段
として機能させることを特徴とするホワイトバランス調整プログラム。
Computer
An imaging control unit that causes the imaging unit to capture a first image that is an image that is brightened by light emission and a second image that is lower in brightness than the first image ;
The first image and the second first obtaining means for obtaining respective gain values of each color component for adjusting the white balance of the image,
Dividing means for dividing the image captured by the imaging unit into a plurality of regions,
Second acquisition means for acquiring the luminance values of the plurality of regions for the first image and the second image, respectively.
For each of the plurality of regions, and the luminance value of the region of the second image corresponding to the region of the luminance value and the first image region of the acquired first image by said second acquisition means Calculating means for calculating the relative values of
Selecting means for selecting a predetermined number of relative values from among a plurality of relative values calculated by the calculating means;
On the basis of the predetermined number of relative values selected by said selecting means and gain value for each color component of the first said acquired by the acquisition means in the first image and the second image, the first image A white balance adjustment program that functions as a correction unit that corrects the gain value of each color component in at least a part of the area.
JP2010248677A 2010-11-04 2010-11-05 Imaging apparatus, white balance adjustment method, and white balance adjustment program Expired - Fee Related JP5459178B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2010248677A JP5459178B2 (en) 2010-11-05 2010-11-05 Imaging apparatus, white balance adjustment method, and white balance adjustment program
KR1020110113664A KR101317552B1 (en) 2010-11-04 2011-11-03 Image capturing apparatus, method and storage medium capable of adjusting white balance
CN201110343843.8A CN102469243B (en) 2010-11-04 2011-11-03 Image capturing apparatus capable of adjusting white balance
US13/288,137 US20120113295A1 (en) 2010-11-04 2011-11-03 Image capturing apparatus capable of adjusting white balance
US14/306,880 US20140293089A1 (en) 2010-11-04 2014-06-17 Image capturing apparatus capable of adjusting white balance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010248677A JP5459178B2 (en) 2010-11-05 2010-11-05 Imaging apparatus, white balance adjustment method, and white balance adjustment program

Publications (3)

Publication Number Publication Date
JP2012100223A JP2012100223A (en) 2012-05-24
JP2012100223A5 JP2012100223A5 (en) 2013-12-12
JP5459178B2 true JP5459178B2 (en) 2014-04-02

Family

ID=46391608

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010248677A Expired - Fee Related JP5459178B2 (en) 2010-11-04 2010-11-05 Imaging apparatus, white balance adjustment method, and white balance adjustment program

Country Status (1)

Country Link
JP (1) JP5459178B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5021338B2 (en) * 2007-03-02 2012-09-05 富士フイルム株式会社 White balance correction apparatus and method
JP2009033289A (en) * 2007-07-25 2009-02-12 Sanyo Electric Co Ltd Imaging apparatus and method
JP5064312B2 (en) * 2007-08-06 2012-10-31 パナソニック株式会社 White balance adjusting device, imaging device, white balance adjusting method, program, and integrated circuit

Also Published As

Publication number Publication date
JP2012100223A (en) 2012-05-24

Similar Documents

Publication Publication Date Title
KR101317552B1 (en) Image capturing apparatus, method and storage medium capable of adjusting white balance
US8285075B2 (en) Image processing apparatus, image processing method, and program
US7548689B2 (en) Image processing method
US8553138B2 (en) Image capture apparatus and method for generating combined-image data
US8558944B2 (en) Image capture apparatus and method for generating combined-image data
US8275212B2 (en) Image processing apparatus, image processing method, and program
US8599283B2 (en) Image capture apparatus and image capturing method
US8970745B2 (en) Image processing device, image processing method and storage medium to suppress shading of images in which pixel addition processing is performed
JP5231734B2 (en) Image sensor and image brightness distribution adjusting method
JP5408053B2 (en) Image processing apparatus and image processing method
JP4894907B2 (en) Imaging apparatus, imaging processing method, and program
JP5115568B2 (en) Imaging apparatus, imaging method, and imaging program
CN1992820A (en) Digital camera with face detection function for facilitating exposure compensation
JP2017022610A (en) Image processing apparatus and image processing method
JP4539432B2 (en) Image processing apparatus and imaging apparatus
US8059904B2 (en) Image-processing device, electronic camera, image-processing program, and image-processing method
US8155472B2 (en) Image processing apparatus, camera, image processing program product and image processing method
JP5225137B2 (en) Imaging apparatus, image processing method, and program
JP6375806B2 (en) Image processing apparatus, method, and imaging apparatus
JP4935925B1 (en) Imaging apparatus, white balance adjustment method, and white balance adjustment program
JP4944639B2 (en) Image processing apparatus, image processing method, and photographing apparatus
JP2008294524A (en) Image processor and image processing method
JP5459178B2 (en) Imaging apparatus, white balance adjustment method, and white balance adjustment program
JP4960597B2 (en) White balance correction apparatus and method, and imaging apparatus
JP2009010694A (en) Exposure control circuit and imaging apparatus loaded with it

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20131024

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131024

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20131030

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20131107

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131230

R150 Certificate of patent or registration of utility model

Ref document number: 5459178

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees