JP2012134678A - Imaging apparatus and imaging method - Google Patents

Imaging apparatus and imaging method Download PDF

Info

Publication number
JP2012134678A
JP2012134678A JP2010283826A JP2010283826A JP2012134678A JP 2012134678 A JP2012134678 A JP 2012134678A JP 2010283826 A JP2010283826 A JP 2010283826A JP 2010283826 A JP2010283826 A JP 2010283826A JP 2012134678 A JP2012134678 A JP 2012134678A
Authority
JP
Japan
Prior art keywords
value
flash
captured image
signal
reflection amount
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
JP2010283826A
Other languages
Japanese (ja)
Inventor
Takahiko Yoshida
崇彦 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung R&D Institute Japan Co Ltd
Original Assignee
Samsung Yokohama Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Samsung Yokohama Research Institute filed Critical Samsung Yokohama Research Institute
Priority to JP2010283826A priority Critical patent/JP2012134678A/en
Publication of JP2012134678A publication Critical patent/JP2012134678A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Color Television Image Signal Generators (AREA)
  • Studio Devices (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an imaging apparatus and an imaging method capable of precisely calculating a white balance gain even if a subject whose white balance gain may change smoothly or luminance value may change rapidly.SOLUTION: An imaging apparatus of the present invention includes: an image reduction section for preparing a third picked-up image by reducing the size of a second picked-up image with flash light so that the size of a first picked-up image without flash light becomes equal to that of the second picked-up image; an exposure differential value calculation section for calculating an exposure differential value based on exposure control values for the first and the second picked-up images; a first flash reflection amount calculation section for calculating a first flash reflection amount based on a signal value of the third picked-up image to which the first picked-up image and the exposure differential value are multiplied; a flash reflection amount interpolation section for selecting either a color balance-based or a luminance value-based linear interpolation processing, and calculating the second reflection amount depending on the linear interpolation processing selected; and a white balance gain calculation section for calculating a white balance gain based on the second flash reflection amount.

Description

本発明は、撮像装置及び撮像方法に関する。   The present invention relates to an imaging apparatus and an imaging method.

デジタルスチルカメラ等のデジタル撮像装置(電子的撮像装置)において、様々な色温度の光源のもとであっても白色を正確に映し出すようにするために、ホワイトバランス補正処理と呼ばれる補正処理が実施される。従来のホワイトバランス補正処理では、画像を構成する全ての画素に対して、同一のホワイトバランスゲインを一律に適用することが行われる。   In a digital imaging device (electronic imaging device) such as a digital still camera, correction processing called white balance correction processing is performed in order to accurately display white color even under light sources with various color temperatures. Is done. In the conventional white balance correction processing, the same white balance gain is uniformly applied to all the pixels constituting the image.

例えば定常光(環境光)が暗い状況下では、露光不足を解消するためにフラッシュを発光させて撮影を行う。かかる際において、定常光とフラッシュ光とが混合されている状況下でのホワイトバランスゲインは、フラッシュの発光量等に応じて算出される。   For example, in a situation where the steady light (environment light) is dark, shooting is performed with a flash emitted in order to eliminate insufficient exposure. In such a case, the white balance gain under the situation where the steady light and the flash light are mixed is calculated according to the flash emission amount and the like.

このような状況下において、デジタルスチルカメラに近い距離にある被写体は、適切なホワイトバランスへと補正することが可能であるが、デジタルスチルカメラから遠い距離にある被写体は、フラッシュ光よりも定常光の依存度が高くなる。そのため、定常光が蛍光灯などの場合、定常光とフラッシュ光との色温度差が大きくなる。その結果、白い被写体が黄色く映し出されるといった、不適切なホワイトバランス補正処理が実施されてしまうという問題が発生することとなる。   Under such circumstances, subjects close to the digital still camera can be corrected to an appropriate white balance, but subjects far away from the digital still camera are more stationary than flash light. The degree of dependence increases. Therefore, when the steady light is a fluorescent lamp or the like, the color temperature difference between the steady light and the flash light becomes large. As a result, there arises a problem that an inappropriate white balance correction process is performed such that a white subject is displayed in yellow.

かかる問題を解決して画像全体を適切なホワイトバランスとするために、フラッシュ発光画像とフラッシュ非発光画像とを比較することでフラッシュ反射量を算出し、算出したフラッシュ反射量から最適なホワイトバランスゲインを画素単位で算出することが行われている。   In order to solve this problem and achieve an appropriate white balance for the entire image, the flash reflection amount is calculated by comparing the flash emission image with the flash non-emission image, and the optimal white balance gain is calculated from the calculated flash reflection amount. Is calculated in units of pixels.

例えば、以下の特許文献1では、フラッシュ発光画像とフラッシュ非発光画像の画像サイズが異なる場合に、フラッシュ発光画像及びフラッシュ非発光画像の輝度値を比較し、補間対象画素の輝度値に近い画素の色温度条件に基づいてホワイトバランスゲインを算出する技術が開示されている。   For example, in Patent Document 1 below, when the image sizes of the flash emission image and the flash non-emission image are different, the luminance values of the flash emission image and the flash non-emission image are compared, and the pixel values close to the luminance value of the interpolation target pixel are compared. A technique for calculating a white balance gain based on a color temperature condition is disclosed.

特開2002−369211号公報JP 2002-369111 A

しかしながら、上記特許文献1に開示されている方法では、ホワイトバランスゲインが滑らかに変化するような被写体や輝度値が急激に変化する被写体では画素間で色の変化が大きくなり、不自然な画像となってしまうという問題があった。   However, in the method disclosed in Patent Document 1, the color change between the pixels becomes large in a subject in which the white balance gain changes smoothly and a subject in which the brightness value changes abruptly, resulting in an unnatural image. There was a problem of becoming.

そこで、本発明は、上記問題に鑑みてなされたものであり、本発明の目的とするところは、ホワイトバランスゲインが滑らかに変化するような被写体や輝度値が急激に変化する被写体であっても、正確にホワイトバランスゲインを算出することが可能な、撮像装置及び撮像方法を提供することにある。   Therefore, the present invention has been made in view of the above problems, and the object of the present invention is to apply to a subject whose white balance gain changes smoothly or a subject whose luminance value changes abruptly. An object of the present invention is to provide an imaging apparatus and an imaging method capable of accurately calculating a white balance gain.

上記課題を解決するために、本発明のある観点によれば、フラッシュ非発光時に撮像された第1の撮像画像と、当該第1の撮像画像よりも画素数が多く、フラッシュ発光時に撮像された第2の撮像画像と、を生成する撮像部と、前記第1の撮像画像と前記第2の撮像画像とが同一の画像サイズとなるように前記第2の撮像画像を縮小して、第3の撮像画像を生成する画像縮小部と、前記第1の撮像画像の露光制御値及び前記第2の撮像画像の露光制御値に基づいて、第1の撮像画像と第2の撮像画像との間の露光差分値を算出する露光差分値算出部と、前記第1の撮像画像の信号値と、前記露光差分値を乗算した前記第3の撮像画像の信号値とに基づいて、画素単位で第1のフラッシュ反射量を算出する第1フラッシュ反射量算出部と、色信号値から算出したカラーバランスに基づく線形補間処理、又は、輝度値に基づく線形補間処理の何れか一方を選択するとともに、選択した前記線形補間処理により前記第1のフラッシュ反射量を補間拡大し、第2のフラッシュ反射量を算出するフラッシュ反射量補間部と、算出された前記第2のフラッシュ反射量に基づいて、前記第2の撮像画像に対してホワイトバランス補正処理を実施する際に用いられるホワイトバランスゲインを画素単位で算出するホワイトバランスゲイン算出部と、を備える撮像装置が提供される。   In order to solve the above-described problem, according to an aspect of the present invention, the first captured image captured when the flash is not emitted, and the number of pixels is larger than that of the first captured image, and the image is captured when the flash is emitted. A second captured image, a second captured image, and the second captured image is reduced so that the first captured image and the second captured image have the same image size. Between the first captured image and the second captured image based on the exposure control value of the first captured image and the exposure control value of the second captured image. Based on the exposure difference value calculation unit for calculating the exposure difference value of the first captured image, the signal value of the first captured image, and the signal value of the third captured image multiplied by the exposure difference value. A first flash reflection amount calculation unit that calculates the flash reflection amount of one; Selecting either linear interpolation processing based on the color balance calculated from the values or linear interpolation processing based on the luminance value, and interpolating and expanding the first flash reflection amount by the selected linear interpolation processing, A flash reflection amount interpolation unit that calculates the flash reflection amount of 2, and white used when white balance correction processing is performed on the second captured image based on the calculated second flash reflection amount An imaging apparatus is provided that includes a white balance gain calculation unit that calculates a balance gain in units of pixels.

かかる構成によれば、輝度値だけでなくカラーバランスを使用することによりフラッシュ反射量を適切に補間することが可能となる。その結果、ホワイトバランスゲインが滑らかに変化するような被写体や輝度値が急激に変化する被写体であっても、正確にホワイトバランスゲインを算出することができる。   According to such a configuration, it is possible to appropriately interpolate the flash reflection amount by using not only the luminance value but also the color balance. As a result, the white balance gain can be accurately calculated even for a subject whose white balance gain changes smoothly and a subject whose luminance value changes abruptly.

前記撮像装置は、算出された前記ホワイトバランスゲインを前記第2の撮像画像の全画素に対して適用し、前記第2の撮像画像のホワイトバランスを補正するホワイトバランス制御部を更に備えることが好ましい。これにより、適切に算出されたホワイトバランスゲインを用いて、ホワイトバランス補正処理を正確に実施することが可能となる。   Preferably, the imaging apparatus further includes a white balance control unit that applies the calculated white balance gain to all the pixels of the second captured image and corrects the white balance of the second captured image. . Accordingly, it is possible to accurately perform the white balance correction process using the appropriately calculated white balance gain.

前記フラッシュ反射量補間部は、前記第2の撮像画像を構成する各画素の輝度値の差分を算出する輝度差分算出部と、前記第2の撮像画像を構成する各画素の色信号値の差分を算出するカラーバランス算出部と、前記輝度差分算出部により算出された前記輝度値の差分と、前記カラーバランス算出部により算出された前記色信号値の差分とに基づいて、各画素の信号値の類似度合いを所定の閾値に基づいて判断し、前記第1のフラッシュ反射量の補間拡大に利用する信号を選択する補間信号選択部と、前記補間信号選択部により選択された前記補間拡大に利用する信号に基づいて前記第1のフラッシュ反射量を線形補間により補間拡大して、第2のフラッシュ反射量を算出する第2フラッシュ反射量算出部と、を更に備えることが好ましい。これにより、ホワイトバランスゲインを算出する際に利用される第2のフラッシュ反射量をより適切に算出することが可能となる。   The flash reflection amount interpolating unit includes a luminance difference calculating unit that calculates a difference between luminance values of pixels included in the second captured image, and a difference between color signal values of pixels included in the second captured image. A signal value of each pixel based on the difference between the luminance values calculated by the color balance calculation unit, the luminance difference calculation unit, and the color signal value difference calculated by the color balance calculation unit Is determined based on a predetermined threshold, and is used for the interpolation enlargement selected by the interpolation signal selection unit and an interpolation signal selection unit that selects a signal used for the interpolation enlargement of the first flash reflection amount. It is preferable to further include a second flash reflection amount calculation unit that calculates the second flash reflection amount by interpolating and expanding the first flash reflection amount by linear interpolation based on the signal to be transmitted. This makes it possible to more appropriately calculate the second flash reflection amount used when calculating the white balance gain.

前記補間信号選択部は、前記輝度値の差分が第1の閾値以上である場合には、前記補間拡大に利用する信号として前記輝度値を選択し、前記輝度値の差分が前記第1の閾値未満である場合には、前記補間拡大に利用する信号として前記色信号値を選択することが好ましい。これにより、輝度値が類似した値となっている場合であっても、色信号値を利用することで正確にホワイトバランスゲインを算出することができる。   When the difference between the luminance values is equal to or greater than a first threshold, the interpolation signal selection unit selects the luminance value as a signal used for the interpolation expansion, and the difference between the luminance values is the first threshold. If it is less, it is preferable to select the color signal value as a signal used for the interpolation enlargement. Thereby, even when the luminance values are similar, the white balance gain can be accurately calculated by using the color signal value.

前記補間信号選択部は、前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出されたR信号値の差分が第2の閾値以上である場合には、前記補間拡大に利用する信号として前記R信号値を選択し、前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出されたB信号値の差分が前記第2の閾値以上である場合には、前記補間拡大に利用する信号として前記B信号値を選択し、前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出された前記R信号値及び前記B信号値の差分がそれぞれ前記第2の閾値以上である場合には、前記補間拡大に利用する信号として前記R信号値及び前記B信号値の双方を選択し、前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出された前記R信号値及び前記B信号値の差分がそれぞれ前記第2の閾値未満である場合には、前記補間拡大に利用する信号として前記輝度値を選択することが好ましい。これにより、輝度値が類似した値となっている場合であっても、色信号値を利用することで正確にホワイトバランスゲインを算出することができる。   When the difference between the luminance values is less than the first threshold and the difference between the R signal values calculated by the color balance calculation unit is equal to or greater than a second threshold, The R signal value is selected as a signal to be used for the interpolation enlargement, the luminance value difference is less than the first threshold value, and the B signal value difference calculated by the color balance calculation unit is the first value. When the threshold value is 2 or more, the B signal value is selected as a signal used for the interpolation enlargement, the difference between the luminance values is less than the first threshold value, and is calculated by the color balance calculation unit. When the difference between the R signal value and the B signal value is equal to or greater than the second threshold value, both the R signal value and the B signal value are selected as signals used for the interpolation expansion, Difference of the brightness value When the difference between the R signal value and the B signal value calculated by the color balance calculation unit is less than the second threshold value and is less than the second threshold value, it is used for the interpolation enlargement. The luminance value is preferably selected as a signal to be transmitted. Thereby, even when the luminance values are similar, the white balance gain can be accurately calculated by using the color signal value.

前記第2フラッシュ反射量算出部は、前記補間信号選択部により前記R信号値及び前記B信号値の双方が選択された場合に、それぞれの信号値に基づく補間拡大結果の平均値を算出し、当該平均値を前記第2のフラッシュ反射量とすることが好ましい。これにより、より正確にホワイトバランスゲインを算出することが可能となる。   The second flash reflection amount calculation unit calculates an average value of interpolation expansion results based on respective signal values when both the R signal value and the B signal value are selected by the interpolation signal selection unit, The average value is preferably the second flash reflection amount. As a result, the white balance gain can be calculated more accurately.

前記第1のフラッシュ反射量及び前記第2のフラッシュ反射量は、ベイヤ画像におけるR,G,G,Bの4画素を一つの画素とみなして算出されてもよく、ベイヤ色補間処理により周辺画素を補間して一つの画素(R,G,B)として算出されてもよい。   The first flash reflection amount and the second flash reflection amount may be calculated by regarding R, G, G, and B pixels in a Bayer image as one pixel, and peripheral pixels are obtained by Bayer color interpolation processing. May be calculated as one pixel (R, G, B).

また、上記課題を解決するために、本発明の別の観点によれば、フラッシュ非発光時に撮像された第1の撮像画像と、当該第1の撮像画像よりも画素数が多く、フラッシュ発光時に撮像された第2の撮像画像と、を生成する撮像ステップと、前記第1の撮像画像と前記第2の撮像画像とが同一の画像サイズとなるように前記第2の撮像画像を縮小して、第3の撮像画像を生成する画像縮小ステップと、前記第1の撮像画像の露光制御値及び前記第2の撮像画像の露光制御値に基づいて、第1の撮像画像と第2の撮像画像との間の露光差分値を算出する露光差分値算出ステップと、前記第1の撮像画像の信号値と、前記露光差分値を乗算した前記第3の撮像画像の信号値とに基づいて、画素単位で第1のフラッシュ反射量を算出する第1フラッシュ反射量算出ステップと、色信号値から算出したカラーバランスに基づく線形補間処理、又は、輝度値に基づく線形補間処理の何れか一方を選択するとともに、選択した前記線形補間処理により前記第1のフラッシュ反射量を補間拡大し、第2のフラッシュ反射量を算出するフラッシュ反射量補間ステップと、算出された前記第2のフラッシュ反射量に基づいて、前記第2の撮像画像に対してホワイトバランス補正処理を実施する際に用いられるホワイトバランスゲインを画素単位で算出するホワイトバランスゲイン算出ステップと、
を含む撮像方法が提供される。
In order to solve the above-described problem, according to another aspect of the present invention, the first captured image captured when the flash does not emit light and the number of pixels is larger than that of the first captured image, and the flash captured light is emitted. An imaging step for generating a captured second captured image, and reducing the second captured image so that the first captured image and the second captured image have the same image size. Based on the image reduction step for generating the third captured image, the exposure control value for the first captured image, and the exposure control value for the second captured image, the first captured image and the second captured image Based on an exposure difference value calculating step for calculating an exposure difference value between the first captured image, a signal value of the first captured image, and a signal value of the third captured image multiplied by the exposure difference value. The first flash that calculates the first flash reflection amount in units. A reflection amount calculating step, a linear interpolation process based on a color balance calculated from a color signal value, or a linear interpolation process based on a luminance value, and the first linear interpolation process selects the first A flash reflection amount interpolation step for calculating the second flash reflection amount by interpolating and enlarging the flash reflection amount, and white balance correction for the second captured image based on the calculated second flash reflection amount A white balance gain calculating step for calculating a white balance gain used for performing processing in units of pixels;
An imaging method is provided.

かかる構成によれば、輝度値だけでなくカラーバランスを使用することによりフラッシュ反射量を適切に補間することが可能となる。その結果、ホワイトバランスゲインが滑らかに変化するような被写体や輝度値が急激に変化する被写体であっても、正確にホワイトバランスゲインを算出することができる。   According to such a configuration, it is possible to appropriately interpolate the flash reflection amount by using not only the luminance value but also the color balance. As a result, the white balance gain can be accurately calculated even for a subject whose white balance gain changes smoothly and a subject whose luminance value changes abruptly.

以上説明したように本発明によれば、輝度値だけでなくカラーバランスを使用することによりフラッシュ反射量を適切に補間することが可能となり、ホワイトバランスゲインが滑らかに変化するような被写体や輝度値が急激に変化する被写体であっても、正確にホワイトバランスゲインを算出することができる。   As described above, according to the present invention, it is possible to appropriately interpolate the flash reflection amount by using not only the luminance value but also the color balance, and the subject and the luminance value in which the white balance gain changes smoothly. Even if the subject changes rapidly, the white balance gain can be calculated accurately.

本発明の第1の実施形態に係る撮像装置の構成を示したブロック図である。1 is a block diagram illustrating a configuration of an imaging apparatus according to a first embodiment of the present invention. フラッシュ非発光撮影により撮像される画像を示した説明図である。It is explanatory drawing which showed the image imaged by flash non-light-emission photography. フラッシュ発光撮影により撮像される画像を示した説明図である。It is explanatory drawing which showed the image imaged by flash light emission imaging | photography. ベイヤ型配列を有する撮像素子を示した説明図である。It is explanatory drawing which showed the image pick-up element which has a Bayer type | mold arrangement | sequence. 撮像画像縮小処理の一例を示した説明図である。It is explanatory drawing which showed an example of the captured image reduction process. 同実施形態に係る補間参照画素について説明するための説明図である。It is explanatory drawing for demonstrating the interpolation reference pixel which concerns on the same embodiment. 同実施形態に係る補間対象画素について説明するための説明図である。It is explanatory drawing for demonstrating the interpolation object pixel which concerns on the same embodiment. 同実施形態に係る補間参照画素について説明するための説明図である。It is explanatory drawing for demonstrating the interpolation reference pixel which concerns on the same embodiment. 同実施形態に係る補間信号選択処理について説明するための説明図である。It is explanatory drawing for demonstrating the interpolation signal selection process which concerns on the same embodiment. 同実施形態に係る補間信号選択処理について説明するための説明図である。It is explanatory drawing for demonstrating the interpolation signal selection process which concerns on the same embodiment. 同実施形態に係るフラッシュ反射量補間拡大処理について説明するための説明図である。It is explanatory drawing for demonstrating the flash reflection amount interpolation expansion process which concerns on the same embodiment. 同実施形態に係るフラッシュ反射量補間拡大処理について説明するための説明図である。It is explanatory drawing for demonstrating the flash reflection amount interpolation expansion process which concerns on the same embodiment. 同実施形態に係るフラッシュ反射量補間拡大処理について説明するための説明図である。It is explanatory drawing for demonstrating the flash reflection amount interpolation expansion process which concerns on the same embodiment. 同実施形態に係るフラッシュ反射量補間拡大処理について説明するための説明図である。It is explanatory drawing for demonstrating the flash reflection amount interpolation expansion process which concerns on the same embodiment. 同実施形態に係る撮像方法の流れの一例を示した流れ図である。It is the flowchart which showed an example of the flow of the imaging method which concerns on the embodiment. 同実施形態に係る撮像方法の流れの一例を示した流れ図である。It is the flowchart which showed an example of the flow of the imaging method which concerns on the embodiment.

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。   Exemplary embodiments of the present invention will be described below in detail with reference to the accompanying drawings. In addition, in this specification and drawing, about the component which has the substantially same function structure, duplication description is abbreviate | omitted by attaching | subjecting the same code | symbol.

(第1の実施形態)
<撮像装置の画像処理パイプラインについて>
以下の実施形態では、撮像装置の一例としてデジタルスチルカメラを例にとって、本実施形態に係る撮像装置で実施される画像処理パイプラインについて、図1を参照しながら簡単に説明する。図1は、本実施形態に係る撮像装置の画像処理パイプラインの構成を示したブロック図である。
(First embodiment)
<Image processing pipeline of imaging device>
In the following embodiments, a digital still camera is taken as an example of an imaging apparatus, and an image processing pipeline implemented by the imaging apparatus according to the present embodiment will be briefly described with reference to FIG. FIG. 1 is a block diagram illustrating a configuration of an image processing pipeline of the imaging apparatus according to the present embodiment.

本実施形態に係る撮像装置10は、図1に示したように、撮像部101、信号処理部102、前処理部103、画像メモリ104、適正AE算出部105、マルチAWB処理部106、後処理部107、RGB−YCC変換部108、データ圧縮部109、メモリカードインタフェース110及びメモリカード111を主に備える。   As illustrated in FIG. 1, the imaging apparatus 10 according to the present embodiment includes an imaging unit 101, a signal processing unit 102, a preprocessing unit 103, an image memory 104, an appropriate AE calculation unit 105, a multi-AWB processing unit 106, and post processing. Unit 107, RGB-YCC conversion unit 108, data compression unit 109, memory card interface 110, and memory card 111.

撮像部101は、図1に示したように、被写体からの光を集光するレンズ121と、絞り122と、シャッター123と、CCDイメージセンサやCMOSイメージセンサ等の撮像素子124と、露光制御部125と、フラッシュ126と、を主に備える。   As shown in FIG. 1, the imaging unit 101 includes a lens 121 that collects light from a subject, a diaphragm 122, a shutter 123, an imaging element 124 such as a CCD image sensor or a CMOS image sensor, and an exposure control unit. 125 and a flash 126 are mainly provided.

レンズ121を透過した光は、絞り122及びシャッター123の動作タイミングに合わせて撮像素子124に結像し、撮像素子124の各画素から、結像した光に関する出力信号が出力される。また、露光制御部125は、絞り122、シャッター123、撮像素子124及びフラッシュ126の動作タイミングを制御しており、フラッシュ126を発光させながら被写体を撮像したり、フラッシュ126を発光させないで被写体を撮像したりする制御を行っている。   The light transmitted through the lens 121 forms an image on the image sensor 124 in accordance with the operation timing of the diaphragm 122 and the shutter 123, and an output signal related to the imaged light is output from each pixel of the image sensor 124. The exposure control unit 125 controls the operation timing of the aperture 122, the shutter 123, the image sensor 124, and the flash 126. The exposure control unit 125 images the subject while the flash 126 is emitted, or the subject is captured without causing the flash 126 to emit light. Control is performed.

信号処理部102は、撮像部101の撮像素子124から出力された出力信号に対して信号処理を行う処理部である。この信号処理部102は、出力信号に対して色分離処理を行う色分離部131と、出力信号に対してA/D変換処理を行うA/D変換部132と、を主に備える。色分離部131とA/D変換部132とは、互いに連携しながら、出力信号に対して信号処理を実施する。これらの処理が行われることで、撮像素子124から出力された出力信号はRGB画像信号となる。   The signal processing unit 102 is a processing unit that performs signal processing on the output signal output from the imaging element 124 of the imaging unit 101. The signal processing unit 102 mainly includes a color separation unit 131 that performs color separation processing on the output signal, and an A / D conversion unit 132 that performs A / D conversion processing on the output signal. The color separation unit 131 and the A / D conversion unit 132 perform signal processing on the output signal in cooperation with each other. By performing these processes, the output signal output from the image sensor 124 becomes an RGB image signal.

前処置部103は、信号処理部102から出力されたRGB画像信号に対して、前処理を施す処理部である。この前処理部103は、図1に示したように、黒レベル補正部141、欠陥画素補正部142、シェーディング補正部143及びAE評価値算出部144を主に備える。信号処理部102から出力されたRGB画像信号は、黒レベル補正部141による黒レベル補正処理により黒レベルが一定となるように補正され、欠陥画素補正部142により、画素欠陥がRGB画像信号中に存在する場合に画素欠陥周辺の情報に基づいて情報が補間される。また、信号処理部102から出力されたRGB画像信号は、シェーディング補正部143により、画像の周辺等に発生する輝度落ち等に起因する画像の輝度差が補正される。AE評価値算出部144は、これらの補正が行われたRGB画像信号に基づいて、AE評価値を算出する。AE評価値算出部144により算出されたAE評価値は、適正AE算出部105に出力される。また、上述の補正が行われたRGB画像信号は、画像メモリ104及び後処理部107に出力される。   The pretreatment unit 103 is a processing unit that performs preprocessing on the RGB image signal output from the signal processing unit 102. As shown in FIG. 1, the preprocessing unit 103 mainly includes a black level correction unit 141, a defective pixel correction unit 142, a shading correction unit 143, and an AE evaluation value calculation unit 144. The RGB image signal output from the signal processing unit 102 is corrected so that the black level becomes constant by the black level correction processing by the black level correction unit 141, and the defective pixel correction unit 142 corrects the pixel defect in the RGB image signal. If present, the information is interpolated based on information around the pixel defect. In addition, the RGB image signal output from the signal processing unit 102 is corrected by the shading correction unit 143 for an image luminance difference caused by a luminance drop or the like generated around the image. The AE evaluation value calculation unit 144 calculates an AE evaluation value based on the RGB image signal subjected to these corrections. The AE evaluation value calculated by the AE evaluation value calculation unit 144 is output to the appropriate AE calculation unit 105. In addition, the RGB image signal subjected to the above correction is output to the image memory 104 and the post-processing unit 107.

画像メモリ104は、前処理部103による各種の前処理が施されたRGB信号を記憶部する記憶部の一例である。この画像メモリ104は、フラッシュ非発光時に撮像された撮像画像を記憶する第1撮像記憶部151と、フラッシュ発光時に撮像された撮像画像を記憶する第2撮像記憶部152と、を有している。後述するマルチAWB(オートホワイトバランス)処理部106及び後処理部107は、かかる画像メモリ104が記憶している各撮像画像を利用して、それぞれの処理部における処理を実施することが可能である。   The image memory 104 is an example of a storage unit that stores RGB signals that have been subjected to various types of preprocessing by the preprocessing unit 103. The image memory 104 includes a first imaging storage unit 151 that stores a captured image captured when the flash is not emitted, and a second imaging storage unit 152 that stores a captured image captured when the flash is emitted. . A multi-AWB (auto white balance) processing unit 106 and a post-processing unit 107, which will be described later, can perform processing in each processing unit using each captured image stored in the image memory 104. .

適正AE算出部105は、前処理部103のAE評価値算出部144から出力されたAE評価値に基づいて、撮像条件に適したAE値を算出する。適正AE算出部105は、算出したAE値を、撮像部101の露光制御部125及びマルチAWB処理部106に出力する。これにより、露光制御部125は、取得したAE値に基づいて絞り122、シャッター123、撮像素子124及びフラッシュ126の露光制御を行うことが可能となる。   The appropriate AE calculation unit 105 calculates an AE value suitable for the imaging condition based on the AE evaluation value output from the AE evaluation value calculation unit 144 of the preprocessing unit 103. The appropriate AE calculation unit 105 outputs the calculated AE value to the exposure control unit 125 and the multi-AWB processing unit 106 of the imaging unit 101. Thereby, the exposure control unit 125 can perform exposure control of the aperture 122, the shutter 123, the image sensor 124, and the flash 126 based on the acquired AE value.

マルチAWB処理部106は、適正AE算出部105が算出したAE値と、画像メモリ104に記憶されているフラッシュ非発光時に撮像された撮像画像及びフラッシュ発光時に撮像された撮像画像と、を利用して、ホワイトバランス補正処理に用いられるホワイトバランスゲインを算出する処理部である。マルチAWB処理部106は、算出したホワイトバランスゲインを、後述する後処理部107のホワイトバランス制御部176に出力する。   The multi-AWB processing unit 106 uses the AE value calculated by the appropriate AE calculation unit 105, the captured image captured when the flash is not emitted and the captured image captured when the flash is emitted, stored in the image memory 104. And a processing unit for calculating a white balance gain used in the white balance correction process. The multi-AWB processing unit 106 outputs the calculated white balance gain to the white balance control unit 176 of the post-processing unit 107 described later.

このマルチAWB処理部106は、図1に示したように、画像縮小部161、露光差分値算出部162、第1フラッシュ反射量算出部163、フラッシュ反射量補間部164、推定光源色算出部169及びホワイトバランスゲイン算出部170を有している。また、フラッシュ反射量補間部164は、更に、輝度差分算出部165、カラーバランス算出部166、補間信号選択部167及び第2フラッシュ反射量算出部168を有している。   As shown in FIG. 1, the multi-AWB processing unit 106 includes an image reduction unit 161, an exposure difference value calculation unit 162, a first flash reflection amount calculation unit 163, a flash reflection amount interpolation unit 164, and an estimated light source color calculation unit 169. And a white balance gain calculation unit 170. The flash reflection amount interpolation unit 164 further includes a luminance difference calculation unit 165, a color balance calculation unit 166, an interpolation signal selection unit 167, and a second flash reflection amount calculation unit 168.

マルチAWB処理部106で実施されるホワイトバランスゲインの算出処理については、以下で改めて詳細に説明する。   The white balance gain calculation process performed by the multi-AWB processing unit 106 will be described in detail later.

後処理部107は、前処理部103により前処理が施されたRGB画像信号に対して、各種の後処理を実施する処理部である。この後処理部107は、RGB画像信号に対してデモザイク処理(ベイヤ色補間処理)を実施するデモザイク処理部171と、RGB画像信号に対してエッジ強調処理を実施するエッジ強調処理部172と、RGB画像信号に対して色補正処理を実施する色補正処理部173と、RGB画像信号に対してガンマ補正を実施するガンマ補正処理部174と、RGB画像信号のノイズリダクション処理(ノイズ低減処理)を実施するノイズリダクション処理部175と、RGB画像信号に対してホワイトバランス補正処理を実施するホワイトバランス制御部176と、を更に備える。ここで、ホワイトバランス制御部176には、本実施形態に係るマルチAWB処理部106により算出されたホワイトバランスゲインが入力され、ホワイトバランス制御部176は、算出されたホワイトバランスゲインを用いて、RGB画像信号に対してホワイトバランス補正処理を実施する。   The post-processing unit 107 is a processing unit that performs various types of post-processing on the RGB image signal that has been pre-processed by the pre-processing unit 103. The post-processing unit 107 includes a demosaic processing unit 171 that performs demosaic processing (Bayer color interpolation processing) on the RGB image signal, an edge enhancement processing unit 172 that performs edge enhancement processing on the RGB image signal, and RGB A color correction processing unit 173 that performs color correction processing on the image signal, a gamma correction processing unit 174 that performs gamma correction on the RGB image signal, and noise reduction processing (noise reduction processing) of the RGB image signal are performed. And a noise reduction processing unit 175 that performs white balance correction processing on the RGB image signal. Here, the white balance control unit 176 receives the white balance gain calculated by the multi-AWB processing unit 106 according to the present embodiment, and the white balance control unit 176 uses the calculated white balance gain to perform RGB White balance correction processing is performed on the image signal.

これらの処理部により各種の後処理を施されたRGB画像信号は、RGB−YCC変換部108に出力される。RGB−YCC変換部108は、RGB画像信号をYCC画像信号へと変換する処理部である。かかる変換処理により、撮像された画像の色空間がRGB色空間からYCC(YCrCb)色空間へと変換されることとなる。変換後のYCC画像信号は、データ圧縮部109へと出力される。   The RGB image signals subjected to various post-processing by these processing units are output to the RGB-YCC conversion unit 108. The RGB-YCC conversion unit 108 is a processing unit that converts an RGB image signal into a YCC image signal. With this conversion process, the color space of the captured image is converted from the RGB color space to the YCC (YCrCb) color space. The converted YCC image signal is output to the data compression unit 109.

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

以上、図1を参照しながら、本実施形態に係る撮像装置10の画像処理パイプラインについて、簡単に説明した。   The image processing pipeline of the imaging apparatus 10 according to the present embodiment has been briefly described above with reference to FIG.

<ホワイトバランスゲインの算出処理について>
続いて、図1〜図13を参照しながら、本実施形態に係るマルチAWB処理部106で実施されるホワイトバランスゲインの算出処理について、詳細に説明する。本実施形態に係るマルチAWB処理部106は、以下で説明するような処理を実施することで、ホワイトバランスゲインが滑らかに変化するような被写体、輝度値が急激に変化する被写体、エッジなどの境界が存在する被写体、輝度値が滑らかに変化しており、輝度値がほぼ同じ値にも関わらず色温度が変化している被写体、といった各種の被写体について、フラッシュ発光時のホワイトバランス補正処理に利用される適切なホワイトバランスゲインを、正確に算出することができる。
<About white balance gain calculation processing>
Next, the white balance gain calculation process performed by the multi-AWB processing unit 106 according to the present embodiment will be described in detail with reference to FIGS. The multi-AWB processing unit 106 according to the present embodiment performs processing as described below, so that a subject such as a subject whose white balance gain changes smoothly, a subject whose luminance value changes abruptly, and a boundary such as an edge Used for white balance correction processing during flash firing of various subjects, such as subjects that have a brightness value that changes smoothly, and subjects whose color temperature changes even though the luminance value is almost the same. The appropriate white balance gain can be accurately calculated.

まず、図2A、図2B及び図3を参照しながら、マルチAWB処理部106に入力される撮像画像及び当該撮像画像における画素の取り扱いについて、簡単に説明する。図2Aは、フラッシュ非発光撮影により撮像される画像を示した説明図であり、図2Bは、フラッシュ発光撮影により撮像される画像を示した説明図である。図3は、ベイヤ型配列を有する撮像素子を示した説明図である。   First, a captured image input to the multi-AWB processing unit 106 and handling of pixels in the captured image will be briefly described with reference to FIGS. 2A, 2B, and 3. FIG. FIG. 2A is an explanatory diagram illustrating an image captured by flash non-flash shooting, and FIG. 2B is an explanatory diagram illustrating an image captured by flash flash shooting. FIG. 3 is an explanatory diagram showing an image sensor having a Bayer array.

本実施形態に係るマルチAWB処理部106には、入力信号として、第1の撮像画像の一例であるフラッシュ非発光時に撮像された撮像画像(以下、フラッシュ非発光撮像画像とも称する。)と、第2の撮像画像の一例であるフラッシュ発光時に撮像された撮像画像(以下、フラッシュ発光撮像画像とも称する。)と、が入力される。ここで、図2Aに示したようなフラッシュ非発光撮像画像は、ライブビュー画像のように間引き処理等によって、図2Bに示したようなフラッシュ発光撮像画像よりも画像サイズが小さい画像となっている。   In the multi-AWB processing unit 106 according to the present embodiment, as an input signal, a captured image (hereinafter also referred to as a flash non-light-emitting captured image) captured as a non-flash light, which is an example of a first captured image, and a first image. The captured image captured at the time of flash emission (hereinafter also referred to as a flash emission captured image), which is an example of the second captured image, is input. Here, the non-flash captured image as shown in FIG. 2A is an image having a smaller image size than the flash emitted captured image as shown in FIG. .

また、マルチAWB処理部106は、後述するように、入力された撮像画像の画像信号から推定光源色を算出するが、マルチAWB処理部106は、かかる処理において、フラッシュ非発光撮像画像のRGB画像信号を、RGB別(色別)に全画面分積分し、フラッシュが発光していない定常光のみの場合の推定光源色(R/G、B/G)を算出する。また、マルチAWB処理部106は、定常光がなくフラッシュ光のみで撮像した場合の推定光源色を既知の値としてROM等の各種メモリに保持しており、適宜各種メモリから読みだして処理に利用することができる。   Further, as will be described later, the multi-AWB processing unit 106 calculates the estimated light source color from the image signal of the input captured image. The multi-AWB processing unit 106 performs RGB processing of the flash non-light-emitting captured image in this processing. The signals are integrated for each screen in RGB (by color), and the estimated light source colors (R / G, B / G) in the case of only the steady light that is not emitted by the flash are calculated. In addition, the multi-AWB processing unit 106 holds the estimated light source color in a case where there is no stationary light and only the flash light is stored as a known value in various memories such as a ROM, and is appropriately read from various memories and used for processing. can do.

ここで、本実施形態に係るマルチAWB処理部106では、画素単位ごとにホワイトバランスゲインが算出されることとなる。この際、マルチAWB処理部106は、フラッシュ発光撮像画像及びフラッシュ非発光撮像画像において、図3に示したように、R,G,G,Bの四つの画素21を一組としたベイヤユニット23を1画素とみなしたり、ベイヤ色補間(デモザイク)処理によって、ベイヤ画像におけるR,G,G,Bの四つの画素から各色(R,G,B)一つずつの画素を生成したりする。   Here, the multi-AWB processing unit 106 according to the present embodiment calculates a white balance gain for each pixel unit. At this time, the multi-AWB processing unit 106, as shown in FIG. 3, in the flash emission captured image and the flash non-emission captured image, the Bayer unit 23 including a set of four pixels 21 of R, G, G, and B. Or one pixel of each color (R, G, B) is generated from four pixels of R, G, G, B in the Bayer image by Bayer color interpolation (demosaic) processing.

以下では、図1及び図4〜図13を参照しながら、本実施形態に係るマルチAWB処理部106で実施されるホワイトバランスゲインの算出処理について、詳細に説明する。   Hereinafter, the white balance gain calculation process performed by the multi-AWB processing unit 106 according to the present embodiment will be described in detail with reference to FIGS. 1 and 4 to 13.

マルチAWB処理部106にフラッシュ非発光撮像画像(第1の撮像画像)及びフラッシュ発光撮像画像(第2の撮像画像)が入力されると、画像縮小部161は、まず、フラッシュ発光撮像画像に対して縮小処理を施して、第三の撮像画像(以下、フラッシュ発光縮小画像とも称する。)を生成する。この縮小処理は、フラッシュ発光縮小画像の画像サイズが、フラッシュ非発光撮像画像の画像サイズと同一となるように行われる。   When the flash non-light emission captured image (first captured image) and the flash light emission captured image (second captured image) are input to the multi-AWB processing unit 106, the image reduction unit 161 first applies the flash light emission captured image to the flash light emission captured image. The reduction process is performed to generate a third captured image (hereinafter also referred to as a flash emission reduced image). This reduction process is performed so that the image size of the flash emission reduced image is the same as the image size of the flash non-emission captured image.

フラッシュ発光縮小画像の生成に利用される画像縮小処理は、適宜公知の方法を選択することが可能であるが、例えば図4に示したような間引き処理を利用する。図4は、間引き処理を説明するための説明図である。図4では、縮小前の画像(図4の左側の画像)を2分の1に間引く場合について図示している。画像縮小部161は、間引き前の画像を縦横2分の1に間引く場合、図4において太線枠内の4つの画素のうち、ある1画素(図4の場合は、4つの画素のうち左上に位置する画素)のみを抜き出して、抜き出した画素を順に配列していく。これにより、図4の右側に示したような、縦横が2分の1に縮小された画像が生成されることとなる。図4では、2分の1に間引く場合について説明したが、間引き前の画像を縦横3分の1、4分の1に間引く場合であっても、同様に処理を行うことが可能である。   As the image reduction process used for generating the flash emission reduced image, a known method can be selected as appropriate. For example, a thinning process as shown in FIG. 4 is used. FIG. 4 is an explanatory diagram for explaining the thinning process. FIG. 4 illustrates a case in which the image before reduction (the image on the left side in FIG. 4) is thinned out by half. When the image reduction unit 161 thins out an image before thinning out in half in the vertical and horizontal directions, one pixel out of four pixels in the thick line frame in FIG. 4 (in the case of FIG. 4, in the upper left of the four pixels). Only the pixels located) are extracted, and the extracted pixels are arranged in order. As a result, an image reduced in length and width by half as shown on the right side of FIG. 4 is generated. In FIG. 4, the case of thinning out by half has been described, but the same processing can be performed even when the image before thinning out is thinned down by 1/3 vertical and horizontal.

画像縮小部161は、フラッシュ発光撮像画像に対して間引き処理する際に、フラッシュ非発光撮像画像がどのように間引かれているかに応じて、間引き方法を変更する。図4では、太線枠内の左上画素(C11,C13,C15・・・)を残すような間引きを行ったが、フラッシュ非発光撮像画像の間引き方法が図4の太線枠内の画素すべての平均値とするような間引きである場合には、フラッシュ発光縮小画像も同様に平均値を算出するように間引きを行う必要がある。   When the thinning process is performed on the flash emission captured image, the image reduction unit 161 changes the thinning method according to how the flash non-emission captured image is thinned. In FIG. 4, thinning is performed so as to leave the upper left pixels (C11, C13, C15...) In the thick line frame. However, the thinning method of the non-flashed captured image is an average of all the pixels in the thick line frame in FIG. In the case of thinning such as a value, it is necessary to perform thinning so that an average value is similarly calculated for the flash emission reduced image.

画像縮小部161は、このようにしてフラッシュ発光撮像画像を縮小してフラッシュ発光縮小画像を生成すると、得られた結果を、露光差分値算出部162に出力する。   When the image reduction unit 161 reduces the flash emission captured image in this way to generate a flash emission reduction image, the image reduction unit 161 outputs the obtained result to the exposure difference value calculation unit 162.

このとき、図2Aに示したようなフラッシュ非発光撮像画像を撮像するときの露光制御値と、図2Bに示すようなフラッシュ発光撮像画像を撮像するときの露光制御値が一致していない場合には、露光差分値算出部162は、各露光制御値の差分を考慮する。ここで、露光制御値には、以下の式101に示す関係があることが知られている。ここで、以下の式101において、TVはシャッタースピードを表し、AVは絞り値を表し、SVは感度を表し、BVは被写体輝度を表している。また、下記式101のそれぞれの値は、APEX値で表現されている。   At this time, when the exposure control value for capturing the non-flash image captured as shown in FIG. 2A does not match the exposure control value for capturing the flash image captured as illustrated in FIG. 2B. The exposure difference value calculation unit 162 considers the difference between the exposure control values. Here, it is known that the exposure control value has a relationship represented by the following expression 101. Here, in the following expression 101, TV represents the shutter speed, AV represents the aperture value, SV represents the sensitivity, and BV represents the subject brightness. In addition, each value of the following expression 101 is expressed by an APEX value.

Figure 2012134678
・・・(式101)
Figure 2012134678
... (Formula 101)

そこで、露光差分値算出部162は、各撮像画像の露光制御値が異なる場合には、以下の式102及び式103を用いて、被写体輝度を算出する。ここで、以下に示した式102は、フラッシュ非発光撮像画像の被写体輝度値BVを算出するための式であり、以下に示した式103は、フラッシュ発光縮小画像の被写体輝度値BVを算出するための式である。 Therefore, the exposure difference value calculation unit 162 calculates the subject luminance using the following formulas 102 and 103 when the exposure control values of the captured images are different. Here, the equation 102 shown below is an equation for calculating the subject luminance value BV 1 of the flash non-light-emitting captured image, and the equation 103 shown below represents the subject luminance value BV S of the flash emission reduced image. It is a formula for calculating.

Figure 2012134678
・・・(式102)
Figure 2012134678
・・・(式103)
Figure 2012134678
... (Formula 102)
Figure 2012134678
... (Formula 103)

露光差分値算出部162は、式102及び式103に基づく被写体輝度値の算出を終了すると、得られた算出結果を利用して、以下の式104に基づいて差分BVdiffを算出する。このとき、フラッシュ非発光撮像画像の露光制御値とフラッシュ発光撮像画像の露光制御値とが一致している場合には、以下の式104に示す差分BVdiffの値は0となる。 When the calculation of the subject luminance value based on Expression 102 and Expression 103 ends, the exposure difference value calculation unit 162 calculates a difference BV diff based on the following Expression 104 using the obtained calculation result. At this time, if the exposure control value of the flash non-light-emitting captured image matches the exposure control value of the flash light-emission captured image, the value of the difference BV diff shown in the following equation 104 is zero.

Figure 2012134678
・・・(式104)
Figure 2012134678
... (Formula 104)

露光差分値算出部162は、差分BVdiffを算出すると、続いて以下の式105を利用して、露光差分値Lfを算出する。 After calculating the difference BV diff , the exposure difference value calculation unit 162 subsequently calculates the exposure difference value Lf using the following equation 105.

Figure 2012134678
・・・(式105)
Figure 2012134678
... (Formula 105)

露光差分値算出部162は、露光差分値Lfを算出すると、得られた算出結果を第1フラッシュ反射量算出部163に出力する。   After calculating the exposure difference value Lf, the exposure difference value calculation unit 162 outputs the obtained calculation result to the first flash reflection amount calculation unit 163.

第1フラッシュ反射量算出部163は、フラッシュ非発光撮像画像の信号値と、露光差分値を乗算したフラッシュ発光縮小画像の信号値とに基づいて、画素単位で第1のフラッシュ反射量Ratioを算出する。この第1のフラッシュ反射量Ratioは、フラッシュ非発光撮像画像における定常光量を1としたときの相対値として算出されるものであり、信号値として輝度値を利用した場合には以下の式106で表される。   The first flash reflection amount calculation unit 163 calculates the first flash reflection amount Ratio in units of pixels based on the signal value of the flash non-emission captured image and the signal value of the flash emission reduced image multiplied by the exposure difference value. To do. The first flash reflection ratio Ratio is calculated as a relative value when the steady light amount in the flash non-light-emitting captured image is 1, and when a luminance value is used as a signal value, the following formula 106 is used. expressed.

Figure 2012134678
・・・(式106)
Figure 2012134678
... (Formula 106)

ここで、以下の式106において、Yは、フラッシュ非発光撮像画像における各画素の輝度値であり、Yは、フラッシュ発光縮小画像における各画素の輝度値である。 Here, in the following formula 106, Y l is the luminance value of each pixel in the flash non-light-emitting captured image, and Y S is the luminance value of each pixel in the flash emission reduced image.

また、色信号値の一つであるG(グリーン)信号値は輝度値Yとほぼ同じ値となるため、第1フラッシュ反射量算出部163は、上記式106において輝度値Yの代わりにG信号値を利用して、第1のフラッシュ反射量を算出してもよい。   Further, since the G (green) signal value, which is one of the color signal values, is substantially the same value as the luminance value Y, the first flash reflection amount calculation unit 163 uses the G signal instead of the luminance value Y in the above equation 106. The first flash reflection amount may be calculated using the value.

第1フラッシュ反射量算出部163は、第1のフラッシュ反射量を算出すると、得られた算出結果を、フラッシュ反射量補間部164に出力する。   When the first flash reflection amount calculation unit 163 calculates the first flash reflection amount, the first flash reflection amount calculation unit 163 outputs the obtained calculation result to the flash reflection amount interpolation unit 164.

フラッシュ反射量補間部164は、色信号値から算出したカラーバランスに基づく線形補間処理、又は、輝度値に基づく線形補間処理の何れか一方を選択するとともに、選択した線形補間処理により第1のフラッシュ反射量を補間拡大し、第2のフラッシュ反射量を算出する。   The flash reflection amount interpolation unit 164 selects either the linear interpolation process based on the color balance calculated from the color signal value or the linear interpolation process based on the luminance value, and the first flash is performed by the selected linear interpolation process. The reflection amount is interpolated and enlarged, and the second flash reflection amount is calculated.

すなわち、フラッシュ反射量補間部164は、フラッシュ発光縮小画像の画像サイズからフラッシュ発光撮像画像の画像サイズへと画像拡大を行う。この画像拡大処理の際に、フラッシュ反射量補間部164は、フラッシュ発光縮小画像の輝度値及びカラーバランスと、第1フラッシュ反射量算出部163により算出された第1のフラッシュ反射量と、に基づいて、第1のフラッシュ反射量を補間拡大し、各画素の輝度値及びカラーバランスに基づいた第2のフラッシュ反射量を算出する。   That is, the flash reflection amount interpolation unit 164 performs image enlargement from the image size of the flash emission reduced image to the image size of the flash emission captured image. During the image enlargement process, the flash reflection amount interpolation unit 164 is based on the luminance value and color balance of the flash emission reduced image and the first flash reflection amount calculated by the first flash reflection amount calculation unit 163. Then, the first flash reflection amount is interpolated and enlarged, and the second flash reflection amount based on the luminance value and color balance of each pixel is calculated.

ここで、図5〜図7を参照しながら、フラッシュ発光縮小画像の画素と、フラッシュ発光撮像画像の画素との関係について、具体的に説明する。   Here, the relationship between the pixels of the flash emission reduced image and the pixels of the flash emission captured image will be specifically described with reference to FIGS.

図5では、フラッシュ発光縮小画像(第3の撮像画像)における補間参照画素を白く表している。フラッシュ発光縮小画像は、フラッシュ発光撮像画像を縮小した画像であるため、フラッシュ発光縮小画像の画像サイズをフラッシュ発光撮像画像の画像サイズへと拡大するためには、画素を補間しなくてはならない。ここで、図5で示したフラッシュ発光縮小画像を、図6に示したフラッシュ発光撮像画像へと拡大する際には、図6において斜線で示した画素については、第1のフラッシュ反射量が算出されていない。そのため、図6において斜線で示した画素が、補間対象となる画素(補間対象画素)となる。   In FIG. 5, the interpolation reference pixel in the flash emission reduced image (third captured image) is shown in white. Since the flash emission reduced image is an image obtained by reducing the flash emission captured image, in order to enlarge the image size of the flash emission reduced image to the image size of the flash emission captured image, pixels must be interpolated. Here, when the flash emission reduced image shown in FIG. 5 is enlarged to the flash emission captured image shown in FIG. 6, the first flash reflection amount is calculated for the pixels indicated by hatching in FIG. It has not been. For this reason, pixels indicated by diagonal lines in FIG. 6 are pixels to be interpolated (interpolation target pixels).

そこで、フラッシュ反射量補間部164は、フラッシュ発光縮小画像のある画素に着目し、着目した画素の上下左右及び斜め方向に隣り合う画素を、補間参照画素として取り扱う。すなわち、図7に示したフラッシュ発光縮小画像においては、図中で(1)、(2)及び(3)で示した位置関係にある画素を、補間参照画素として取り扱う。ここで、図7において(1)の位置関係にある補間参照画素が、着目している画素の斜め方向で隣接する補間参照画素に対応しており、(2)の位置関係にある補間参照画素が、着目している画素の左右方向で隣接している補間参照画素に対応しており、(3)の位置関係にある補間参照画素が、着目している画素の上下方向で隣接している補間参照画素に対応している。この際、図7では、補間参照画素を着目している画素に隣り合う画素としたが、補間参照画素は、着目している画素と1画素以上離隔している画素であってもよい。   Therefore, the flash reflection amount interpolation unit 164 pays attention to a certain pixel in the flash emission reduction image, and treats pixels adjacent in the up / down / left / right and diagonal directions as the interpolation reference pixel. That is, in the flash emission reduced image shown in FIG. 7, the pixels having the positional relationship shown in (1), (2), and (3) in the figure are handled as interpolation reference pixels. Here, in FIG. 7, the interpolation reference pixel in the positional relationship of (1) corresponds to the interpolation reference pixel adjacent in the diagonal direction of the pixel of interest, and the interpolation reference pixel in the positional relationship of (2). Corresponds to the interpolation reference pixel adjacent in the horizontal direction of the pixel of interest, and the interpolation reference pixel in the positional relationship of (3) is adjacent in the vertical direction of the pixel of interest. It corresponds to the interpolation reference pixel. At this time, in FIG. 7, the interpolation reference pixel is a pixel adjacent to the pixel of interest, but the interpolation reference pixel may be a pixel that is one pixel or more apart from the pixel of interest.

以下では、フラッシュ反射量補間部164が備える各処理部の機能について、詳細に説明する。   Hereinafter, functions of the respective processing units included in the flash reflection amount interpolation unit 164 will be described in detail.

まず、フラッシュ反射量補間部164が備える輝度差分算出部165は、フラッシュ発光縮小画素において、第1のフラッシュ反射量が算出されている画素を選択し、選択した画素に対して、図7において(1)、(2)、(3)の位置関係に存在している画素(すなわち、補間参照画素)について、以下の式107で表される輝度差分Ydiffを算出する。このような輝度差分Ydiffの算出は、フラッシュ発光縮小画像を構成する各画素に対して実施される。ここで、下記式107において、Yが着目している画素の輝度値であり、Yが補間参照画素の輝度値である。 First, the luminance difference calculation unit 165 included in the flash reflection amount interpolation unit 164 selects a pixel for which the first flash reflection amount is calculated from the flash emission reduction pixels, and the selected pixel in FIG. The luminance difference Y diff represented by the following Expression 107 is calculated for the pixels (that is, the interpolation reference pixels) existing in the positional relationship of 1), (2), and (3). Such calculation of the luminance difference Y diff is performed for each pixel constituting the flash emission reduced image. Here, in the following formulas 107, the luminance values of the pixels Y 1 is focused, Y 2 is a luminance value of the interpolation reference pixels.

Figure 2012134678
・・・(式107)
Figure 2012134678
... (Formula 107)

その後、輝度差分算出部165は、算出した2画素間での輝度値の差分のうち、差分の値が一番大きくなった2画素を選択する。輝度差分算出部165は、選択した2つの画素に関する情報を、後述するカラーバランス算出部166及び補間信号選択部167に出力するとともに、選択した2画素間の輝度値の差分Ydiffの値を補間信号選択部167に出力する。 Thereafter, the luminance difference calculation unit 165 selects two pixels having the largest difference value among the calculated luminance value differences between the two pixels. The luminance difference calculation unit 165 outputs information on the selected two pixels to a color balance calculation unit 166 and an interpolation signal selection unit 167, which will be described later, and interpolates the value of the difference Y diff of the luminance value between the two selected pixels. The signal is output to the signal selection unit 167.

なお、先述のように、色信号値の一つであるG(グリーン)信号値は輝度値Yとほぼ同じ値となるため、輝度差分算出部165は、下記式108に示したように、輝度値Yの代わりにG信号値を利用して輝度差分Ydiffに対応する値であるGdiffを算出し、画素の選択を行っても良い。 As described above, since the G (green) signal value, which is one of the color signal values, is substantially the same as the luminance value Y, the luminance difference calculation unit 165 calculates the luminance as shown in the following formula 108. Instead of the value Y, the G signal value may be used to calculate G diff , which is a value corresponding to the luminance difference Y diff , and the pixel may be selected.

Figure 2012134678
・・・(式108)
Figure 2012134678
... (Formula 108)

カラーバランス算出部166は、輝度差分算出部165によって選択された2つの画素間におけるカラーバランスを算出する。ここで、本実施形態に係るカラーバランス算出部166は、色信号値の一種であるR(レッド)信号値及びB(ブルー)信号値を利用して、以下の式109及び式110によりカラーバランスRdiff及びBdiffを算出する。以下の式109及び式110から明らかなように、カラーバランスRdiffは、R信号値の差分の絶対値であり、カラーバランスBdiffは、B信号値の差分の絶対値である。 The color balance calculation unit 166 calculates the color balance between the two pixels selected by the luminance difference calculation unit 165. Here, the color balance calculation unit 166 according to the present embodiment uses the R (red) signal value and the B (blue) signal value, which are one type of color signal value, to calculate the color balance according to the following equations 109 and 110. R diff and B diff are calculated. As apparent from the following equations 109 and 110, the color balance R diff is the absolute value of the difference between the R signal values, and the color balance B diff is the absolute value of the difference between the B signal values.

Figure 2012134678
・・・(式109)
Figure 2012134678
・・・(式110)
Figure 2012134678
... (Formula 109)
Figure 2012134678
... (Formula 110)

カラーバランス算出部166は、式109及び式110に基づいてカラーバランスを算出すると、算出したカラーバランスを、補間信号選択部167に出力する。   After calculating the color balance based on Expression 109 and Expression 110, the color balance calculation unit 166 outputs the calculated color balance to the interpolation signal selection unit 167.

なお、上記説明では、カラーバランス算出部166は、輝度差分算出部165により選択された2画素についてカラーバランスの算出処理を行ったが、輝度差分算出部165における輝度差分の算出処理と同様にして、フラッシュ発光縮小画像を構成する各画素について式109及び式110で表されるカラーバランスを算出し、カラーバランス(差分値)の値が一番大きくなる上記2つのカラーバランスの組み合わせを選択してもよい。   In the above description, the color balance calculation unit 166 has performed the color balance calculation processing for the two pixels selected by the luminance difference calculation unit 165, but in the same manner as the luminance difference calculation processing in the luminance difference calculation unit 165. Then, the color balance represented by Expression 109 and Expression 110 is calculated for each pixel constituting the flash emission reduced image, and the combination of the two color balances having the largest color balance (difference value) is selected. Also good.

補間信号選択部167は、輝度差分算出部165により算出された輝度値の差分と、カラーバランス算出部166により算出された色信号値の差分(R信号値の差分、B信号値の差分)とに基づいて、各画素の信号値の類似度合いを所定の閾値に基づいて判断し、第1のフラッシュ反射量の補間拡大に利用する信号を選択する。   The interpolation signal selection unit 167 includes the difference between the luminance values calculated by the luminance difference calculation unit 165 and the difference between the color signal values calculated by the color balance calculation unit 166 (difference between the R signal value and the difference between the B signal values). Based on the above, the degree of similarity of the signal value of each pixel is determined based on a predetermined threshold value, and a signal used for interpolation expansion of the first flash reflection amount is selected.

以下、補間信号選択部167が実施する補間信号の選択処理について、図8及び図9を参照しながら、具体的に説明する。   Hereinafter, the interpolation signal selection processing performed by the interpolation signal selection unit 167 will be described in detail with reference to FIGS. 8 and 9.

補間信号選択部167は、輝度値の差分と、色信号値の差分とを利用して、輝度差分算出部165やカラーバランス算出部166で選択された2つの画素の信号値の類似度合い(すなわち、信号値が近い値か否か)を、まず判断する。   The interpolation signal selection unit 167 uses the luminance value difference and the color signal value difference to determine the degree of similarity between the signal values of the two pixels selected by the luminance difference calculation unit 165 and the color balance calculation unit 166 (that is, First, it is determined whether or not the signal value is a close value.

以下では、まず、輝度値の差分に着目した判断方法について説明する。
図8の左側に示した図のように、輝度値の差分が0に近い値であれば、選択された2画素の輝度値は互いに近い値を有しており、図8の右側に示した図のように、輝度値の差分が大きい値であれば、選択された2画素の輝度値は、離れた値であることが分かる。そこで、ノイズ等の影響を考慮してある程度の幅を持たせた閾値(第1の閾値)を予め調整によって定めておいた上で、補間信号選択部167は、この第1の閾値と輝度値の差分とを比較する。
In the following, a determination method focusing on the difference in luminance values will be described first.
If the difference between the luminance values is a value close to 0 as shown in the left side of FIG. 8, the luminance values of the two selected pixels are close to each other, and are shown on the right side of FIG. As shown in the figure, if the difference between the luminance values is a large value, it can be understood that the luminance values of the two selected pixels are separated from each other. Therefore, the interpolation signal selection unit 167 determines the threshold value (first threshold value) having a certain width in consideration of the influence of noise and the like by adjustment, and the interpolation signal selection unit 167 then determines the first threshold value and the luminance value. Compare the difference of.

補間信号選択部167は、第1の閾値より輝度値の差分が大きい場合(輝度値の差分が第1の閾値以上である場合)には、選択した各画素の輝度値が離れていると判断できるため、輝度値を、第1のフラッシュ反射量の補間に用いる信号として選択する。   The interpolation signal selection unit 167 determines that the luminance value of each selected pixel is separated when the difference in luminance value is larger than the first threshold value (when the difference in luminance value is greater than or equal to the first threshold value). Therefore, the luminance value is selected as a signal used for interpolation of the first flash reflection amount.

他方、補間信号選択部167は、輝度値の差分が第1の閾値よりも小さい(輝度値の差分が第1の閾値未満である場合)には、選択した各画素の輝度値が近い値となっていると判断できる。そのため、補間信号選択部167は、色信号値の差分を利用して、以下のような判定処理を実施する。すなわち、ノイズ等の影響を考慮してある程度の幅を持たせた閾値(第2の閾値)を予め調整によって定めておいた上で、補間信号選択部167は、この第2の閾値と、色信号値の差分(R信号値の差分及びB信号値の差分)とを比較する。   On the other hand, when the difference in luminance value is smaller than the first threshold value (when the difference in luminance value is less than the first threshold value), the interpolation signal selection unit 167 determines that the luminance value of each selected pixel is a close value. It can be judged that Therefore, the interpolation signal selection unit 167 performs the following determination process using the difference between the color signal values. In other words, the interpolation signal selection unit 167 determines the threshold value (second threshold value) having a certain width in consideration of the influence of noise or the like by adjustment, and then the interpolation signal selection unit 167 determines the second threshold value, the color The difference between the signal values (the difference between the R signal value and the difference between the B signal values) is compared.

この際、図9に示したように、補間参照画素1と補間参照画素2の輝度値の差分が第1の閾値未満であり、B信号値の差分が第2の閾値未満であり、R信号値の差分が第2の閾値以上であった場合には、補間信号選択部167は、R信号値を、第1のフラッシュ反射量の補間に用いる信号として選択する。   At this time, as shown in FIG. 9, the difference between the luminance values of the interpolation reference pixel 1 and the interpolation reference pixel 2 is less than the first threshold, the difference between the B signal values is less than the second threshold, and the R signal When the value difference is equal to or larger than the second threshold value, the interpolation signal selection unit 167 selects the R signal value as a signal used for interpolation of the first flash reflection amount.

また、図9とは逆に、補間参照画素1と補間参照画素2の輝度値の差分が第1の閾値未満であり、B信号値の差分が第2の閾値以上であり、R信号値の差分が第2の閾値未満であった場合には、補間信号選択部167は、B信号値を、第1のフラッシュ反射量の補間に用いる信号として選択する。   Contrary to FIG. 9, the difference between the luminance values of the interpolation reference pixel 1 and the interpolation reference pixel 2 is less than the first threshold, the difference between the B signal values is greater than or equal to the second threshold, and the R signal value When the difference is less than the second threshold, the interpolation signal selection unit 167 selects the B signal value as a signal used for interpolation of the first flash reflection amount.

また、補間参照画素1と補間参照画素2の輝度値の差分が第1の閾値未満であり、B信号値の差分及びR信号値の差分がそれぞれ第2の閾値以上であった場合には、補間信号選択部167は、R信号値及びB信号値の双方を、第1のフラッシュ反射量の補間に用いる信号として選択する。   Further, when the difference between the luminance values of the interpolation reference pixel 1 and the interpolation reference pixel 2 is less than the first threshold, and the difference between the B signal value and the difference between the R signal values is equal to or greater than the second threshold, The interpolation signal selection unit 167 selects both the R signal value and the B signal value as signals used for interpolation of the first flash reflection amount.

また、補間参照画素1と補間参照画素2の輝度値の差分が第1の閾値未満であり、B信号値の差分及びR信号値の差分がそれぞれ第2の閾値未満であった場合には、補間信号選択部167は、輝度値を、第1のフラッシュ反射量の補間に用いる信号として選択する。   Further, when the difference between the luminance values of the interpolation reference pixel 1 and the interpolation reference pixel 2 is less than the first threshold, and the difference between the B signal value and the difference between the R signal values is less than the second threshold, The interpolation signal selection unit 167 selects the luminance value as a signal used for interpolation of the first flash reflection amount.

補間信号選択部167は、このようにして選択した拡大補間に用いる信号に関する選択結果を、第2フラッシュ反射量算出部168に出力する。   The interpolation signal selection unit 167 outputs the selection result regarding the signal used for the enlarged interpolation selected in this way to the second flash reflection amount calculation unit 168.

第2フラッシュ反射量算出部168は、補間信号選択部167により選択された補間信号に基づいて第1のフラッシュ反射量を線形補間により補間拡大して、第2のフラッシュ反射量を算出する。以下、図10〜図12を参照しながら、第2フラッシュ反射量の算出処理について、具体的に説明する。   The second flash reflection amount calculation unit 168 calculates the second flash reflection amount by interpolating and expanding the first flash reflection amount by linear interpolation based on the interpolation signal selected by the interpolation signal selection unit 167. Hereinafter, the calculation process of the second flash reflection amount will be specifically described with reference to FIGS.

まず、図10を参照しながら、輝度値に基づいて第2のフラッシュ反射量を算出する方法について説明する。
2つの補間参照画素の輝度値及び補間対象画素の輝度値は、フラッシュ発光撮像画像の画像データを参照することで把握することが可能であり、2つの補間参照画素の第1のフラッシュ反射量は、上記式106により算出されている。そこで、第2フラッシュ反射量算出部168は、図10に示したように、補間対象画素の輝度値Yと補間参照画素1の輝度値Yとの差分αと、補間参照画素1と補間参照画素2との輝度値の差分(α+β)と、を利用して線形補間処理を行うことで、補間対象画素のフラッシュ反射量(すなわち、第2のフラッシュ反射量)を算出する。具体的には、第2フラッシュ反射量算出部168は、以下の式111を利用して、補間対象画素の第2のフラッシュ反射量を算出する。
First, a method for calculating the second flash reflection amount based on the luminance value will be described with reference to FIG.
The luminance value of the two interpolation reference pixels and the luminance value of the interpolation target pixel can be grasped by referring to the image data of the flash emission captured image, and the first flash reflection amount of the two interpolation reference pixels is , Calculated by the above equation 106. Therefore, the second reflected flash amount calculating section 168, as shown in FIG. 10, the interpolated reference brightness value Y of the interpolation target pixel and the difference α between the luminance value Y 1 of the interpolation reference pixels 1, an interpolation reference pixel 1 A flash interpolation amount (that is, a second flash reflection amount) of the interpolation target pixel is calculated by performing a linear interpolation process using a difference (α + β) in luminance value with respect to the pixel 2. Specifically, the second flash reflection amount calculation unit 168 calculates the second flash reflection amount of the interpolation target pixel using the following formula 111.

Figure 2012134678
・・・(式111)
Figure 2012134678
... (Formula 111)

ここで、上記式111の左辺に示した値Ratioが補間対象画素の第2のフラッシュ反射量であり、上記式111の右辺に示した輝度値Yが補間対象画素の輝度値である。また、Y及びRatioは、それぞれ補間参照画素1の輝度値及び第1のフラッシュ反射量であり、Y及びRatioは、それぞれ補間参照画素2の輝度値及び第1のフラッシュ反射量である。 Here, the value Ratio shown on the left side of the equation 111 is the second flash reflection amount of the interpolation target pixel, and the luminance value Y shown on the right side of the equation 111 is the luminance value of the interpolation target pixel. Y 1 and Ratio 1 are the luminance value of the interpolation reference pixel 1 and the first flash reflection amount, respectively. Y 2 and Ratio 2 are the luminance value of the interpolation reference pixel 2 and the first flash reflection amount, respectively. is there.

図11は、R信号値を利用して第2のフラッシュ反射量を算出する方法について示している。かかる場合においても、輝度値に基づく第2のフラッシュ反射量の算出方法と同様にして、以下の式112に基づき補間対象画素の第2のフラッシュ反射量を算出する。   FIG. 11 shows a method for calculating the second flash reflection amount using the R signal value. Even in such a case, the second flash reflection amount of the interpolation target pixel is calculated based on the following expression 112 in the same manner as the second flash reflection amount calculation method based on the luminance value.

Figure 2012134678
・・・(式112)
Figure 2012134678
... (Formula 112)

ここで、上記式112の左辺に示した値Ratioが補間対象画素の第2のフラッシュ反射量であり、上記式112の右辺に示したRが補間対象画素のR信号値である。また、R及びRatioは、それぞれ補間参照画素1のR信号値及び第1のフラッシュ反射量であり、R及びRatioは、それぞれ補間参照画素2のR信号値及び第1のフラッシュ反射量である。 Here, the value Ratio shown on the left side of the equation 112 is the second flash reflection amount of the interpolation target pixel, and R shown on the right side of the equation 112 is the R signal value of the interpolation target pixel. R 1 and Ratio 1 are the R signal value and the first flash reflection amount of the interpolation reference pixel 1, respectively. R 2 and Ratio 2 are the R signal value of the interpolation reference pixel 2 and the first flash reflection amount, respectively. Amount.

図12は、B信号値を利用して第2のフラッシュ反射量を算出する方法について示している。かかる場合においても、輝度値に基づく第2のフラッシュ反射量の算出方法と同様にして、以下の式113に基づき補間対象画素の第2のフラッシュ反射量を算出する。   FIG. 12 shows a method for calculating the second flash reflection amount using the B signal value. Even in such a case, the second flash reflection amount of the pixel to be interpolated is calculated based on the following Expression 113 in the same manner as the second flash reflection amount calculation method based on the luminance value.

Figure 2012134678
・・・(式113)
Figure 2012134678
... (Formula 113)

ここで、上記式113の左辺に示した値Ratioが補間対象画素の第2のフラッシュ反射量であり、上記式113の右辺に示したBが補間対象画素のB信号値である。また、B及びRatioは、それぞれ補間参照画素1のB信号値及び第1のフラッシュ反射量であり、B及びRatioは、それぞれ補間参照画素2のB信号値及び第1のフラッシュ反射量である。 Here, the value Ratio shown on the left side of Expression 113 is the second flash reflection amount of the interpolation target pixel, and B shown on the right side of Expression 113 is the B signal value of the interpolation target pixel. B 1 and Ratio 1 are the B signal value of the interpolation reference pixel 1 and the first flash reflection amount, respectively. B 2 and Ratio 2 are the B signal value of the interpolation reference pixel 2 and the first flash reflection amount, respectively. Amount.

また、R信号値及びB信号値をともに利用して第2のフラッシュ反射量を算出する場合、第2フラッシュ反射量算出部168は、式112及び式113を利用してそれぞれ第2のフラッシュ反射量を算出した後に、得られた算出結果の平均値を算出し、得られた平均値を、補間対象画素の第2のフラッシュ反射量とする。   When calculating the second flash reflection amount using both the R signal value and the B signal value, the second flash reflection amount calculation unit 168 uses the formula 112 and the formula 113, respectively, to calculate the second flash reflection amount. After calculating the amount, an average value of the obtained calculation results is calculated, and the obtained average value is set as the second flash reflection amount of the interpolation target pixel.

第2フラッシュ反射量算出部168は、このようにして、フラッシュ発光撮像画像の画像サイズの全画素についてフラッシュ反射量を算出すると、得られた算出結果を、推定光源色算出部169に出力する。   When the second flash reflection amount calculation unit 168 calculates the flash reflection amount for all the pixels having the image size of the flash emission captured image in this way, the second flash reflection amount calculation unit 168 outputs the obtained calculation result to the estimated light source color calculation unit 169.

このように、本実施形態に係るフラッシュ反射量補間部164では、色温度が大きく変わっているにもかかわらず輝度値が変化しない場合においては、画素の各輝度値がほぼ同じ値かどうかを判定することで、輝度値を用いた補間により間違った第2のフラッシュ反射量を算出してしまうことを防止することができる。また、本実施形態に係るフラッシュ反射量補間部164は、色温度が大きく変わっているにもかかわらず輝度値が変化しない場合であっても、輝度値の代わりにカラーバランスを使用することで、正確な第2のフラッシュ反射量を算出することができる。   As described above, the flash reflection amount interpolating unit 164 according to the present embodiment determines whether or not the luminance values of the pixels are almost the same value when the luminance value does not change even though the color temperature is largely changed. By doing so, it is possible to prevent the wrong second flash reflection amount from being calculated by interpolation using the luminance value. Further, the flash reflection amount interpolating unit 164 according to the present embodiment uses the color balance instead of the luminance value even when the luminance value does not change even though the color temperature is greatly changed. An accurate second flash reflection amount can be calculated.

また、以上説明したような算出方法を用いることで、例えば図13のように補間対象画素が補間参照画素間に複数存在し、輝度値が滑らかに推移する場合、被写体にエッジがあるような色温度差の大きい境界が発生する場合、及び、光源の境界であるにもかかわらず輝度に差がない場合においても、適切な補間処理を実施し、正確にフラッシュ反射率を算出することが可能となる。   Further, by using the calculation method as described above, for example, when there are a plurality of interpolation target pixels between the interpolation reference pixels and the luminance value smoothly changes as shown in FIG. Appropriate interpolation processing can be performed to accurately calculate the flash reflectivity even when a boundary with a large temperature difference occurs and when there is no difference in brightness despite the boundary of the light source Become.

再び図1に戻って、マルチAWB処理部106が有する推定光源色算出部169について説明する。
推定光源色算出部169は、第2フラッシュ反射量算出部168が算出した第2のフラッシュ反射量を利用して、フラッシュ光の推定光源色(CB)と、定常光(環境光)の推定光源色(CB)とを線形補間して、対象画素の推定光源色(CB)を算出する。この際、推定光源色算出部169は、下記の式114及び式115に示したように、R画像信号の推定光源色CBと、B画像信号の推定光源色CBとを、それぞれ個別に算出する。なお、下記式114及び式115において、Ratioは第2のフラッシュ反射量を表している。
Returning to FIG. 1 again, the estimated light source color calculation unit 169 of the multi-AWB processing unit 106 will be described.
The estimated light source color calculation unit 169 uses the second flash reflection amount calculated by the second flash reflection amount calculation unit 168 to estimate the estimated light source color (CB f ) of the flash light and the steady light (environment light). The estimated light source color (CB) of the target pixel is calculated by linearly interpolating the light source color (CB s ). At this time, the estimated light source color calculation unit 169, as shown in Equation 114 and Equation 115 below, and the estimated light source color CB R of the R image signals, and B image signals and the estimated light source color CB B, respectively separately calculate. In the following formulas 114 and 115, Ratio represents the second flash reflection amount.

Figure 2012134678
・・・(式114)
Figure 2012134678
・・・(式115)
Figure 2012134678
... (Formula 114)
Figure 2012134678
... (Formula 115)

推定光源色算出部169は、上記式114及び式115に基づく推定光源色の算出処理を全画素に対して実施し、得られた結果をホワイトバランスゲイン算出部170に出力する。   The estimated light source color calculation unit 169 performs the process of calculating the estimated light source color based on the above formulas 114 and 115 for all pixels, and outputs the obtained result to the white balance gain calculation unit 170.

ホワイトバランスゲイン算出部170は、第2のフラッシュ反射量に基づいて算出された推定光源色を利用して、フラッシュ発光撮像画像に対してホワイトバランス補正処理を実施する際に用いられるホワイトバランスゲインを、画素単位で算出する。   The white balance gain calculation unit 170 uses the estimated light source color calculated based on the second flash reflection amount to calculate the white balance gain used when performing the white balance correction process on the flash emission captured image. Calculated in pixel units.

具体的には、ホワイトバランスゲイン算出部170は、上記式114及び式115に基づいて算出した推定光源色CBR及びCBBを利用し、下記式116及び式117に基づいて、対象画素のホワイトバランスゲイン(WBGain,WBGain)を算出する。 Specifically, the white balance gain calculation unit 170 uses the estimated light source colors CBR and CBB calculated based on the above formulas 114 and 115, and based on the following formulas 116 and 117, the white balance gain of the target pixel. (WBGain R , WBGain B ) is calculated.

Figure 2012134678
・・・(式116)
Figure 2012134678
・・・(式117)
Figure 2012134678
... (Formula 116)
Figure 2012134678
... (Formula 117)

ホワイトバランスゲイン算出部170は、上記式116及び式117に基づくホワイトバランスゲインの算出処理を全画素に対して実施し、得られた結果を、後処理部107のホワイトバランス制御部176に出力する。   The white balance gain calculation unit 170 performs the white balance gain calculation processing based on the above formulas 116 and 117 for all pixels, and outputs the obtained result to the white balance control unit 176 of the post-processing unit 107. .

本実施形態に係るマルチAWB処理部106は、以上説明したような処理を実施することで、フラッシュ非発光撮像画像とフラッシュ発光撮像画像の画像サイズが異なる場合であっても、フラッシュ光と定常光とが混在している状況下において、適切なホワイトバランスゲインを、画素単位で算出することが可能となる。   The multi-AWB processing unit 106 according to the present embodiment performs the processing as described above, so that the flash light and the steady light can be obtained even when the image size of the flash non-light-emitting captured image and the flash light-emitting captured image are different. Thus, an appropriate white balance gain can be calculated for each pixel.

後処理部107のホワイトバランス制御部176は、フラッシュ発光撮像画像の各画素値に対して、以下の式118及び式119に基づいて、ホワイトバランスゲインを乗算する。これにより、ホワイトバランス制御部176は、フラッシュ光と定常光とが混在している撮像環境下で撮像された撮像画像に対しても、適切なホワイトバランス補正処理を実施することが可能となる。   The white balance control unit 176 of the post-processing unit 107 multiplies each pixel value of the flash emission captured image by a white balance gain based on the following Expression 118 and Expression 119. As a result, the white balance control unit 176 can perform an appropriate white balance correction process even on a captured image captured in an imaging environment in which flash light and steady light are mixed.

Figure 2012134678
・・・(式118)
Figure 2012134678
・・・(式119)
Figure 2012134678
... (Formula 118)
Figure 2012134678
... (Formula 119)

以上説明したように、本実施形態に係る撮像装置10では、フラッシュ非発光撮像画像とフラッシュ発光撮像画像の画像サイズが異なる場合であっても、画素の輝度値及びカラーバランスに基づいて拡大補間処理を実施することにより、定常光とフラッシュ光とが混在する状況下に対しても適切なホワイトバランスゲインを算出することができる。   As described above, in the imaging apparatus 10 according to the present embodiment, even when the image sizes of the flash non-light-emitting captured image and the flash light-emitting captured image are different, the enlargement interpolation process is performed based on the pixel luminance value and the color balance. By performing the above, it is possible to calculate an appropriate white balance gain even under a situation where stationary light and flash light are mixed.

<撮像方法の流れについて>
続いて、図14A及び図14Bを参照しながら、本実施形態に係る撮像装置10で実施される撮像方法の流れについて、その一例を簡単に説明する。図14A及び図14Bは、本実施形態に係る撮像方法の流れの一例を示した流れ図である。
<Flow of imaging method>
Next, an example of the flow of the imaging method performed by the imaging apparatus 10 according to the present embodiment will be briefly described with reference to FIGS. 14A and 14B. 14A and 14B are flowcharts showing an example of the flow of the imaging method according to the present embodiment.

まず、撮像装置10の撮像部101は、フラッシュを発光させない状態で被写体を撮像し、フラッシュ非発光撮像画像を取得する(ステップS101)。生成されたフラッシュ非発光撮像画像は、信号処理部102による各種の信号処理及び前処理部103による各種の前処理を施された後に、そのRGB画像信号が、画像メモリ104の第1撮像記憶部151に保存される(ステップS103)。   First, the imaging unit 101 of the imaging device 10 captures an image of a subject in a state where the flash is not emitted, and acquires a flash non-emission captured image (step S101). The generated flash non-light-emitting captured image is subjected to various types of signal processing by the signal processing unit 102 and various types of preprocessing by the preprocessing unit 103, and then the RGB image signal is converted into the first imaging storage unit of the image memory 104. 151 (step S103).

次に、撮像装置10の撮像部101は、フラッシュを発光させた状態で被写体を撮像し、フラッシュ発光撮像画像を取得する(ステップS105)。生成されたフラッシュ発光撮像画像は、信号処理部102による各種の信号処理及び前処理部103による各種の前処理を施された後に、そのRGB画像信号が、画像メモリ104の第2撮像記憶部152に保存される(ステップS107)。   Next, the imaging unit 101 of the imaging apparatus 10 captures the subject in a state where the flash is emitted, and acquires a flash emission captured image (step S105). The generated flash emission captured image is subjected to various signal processing by the signal processing unit 102 and various preprocessing by the preprocessing unit 103, and then the RGB image signal is converted into the second imaging storage unit 152 of the image memory 104. (Step S107).

続いて、マルチAWB処理部106は、第1撮像記憶部151からフラッシュ非発光撮像画像を取得するとともに、第2撮像記憶部152からフラッシュ発光撮像画像を取得する。その後、マルチAWB処理部106の画像縮小部161は、フラッシュ発光撮像画像をフラッシュ非発光撮像画像の画像サイズに縮小して(ステップS109)、フラッシュ発光縮小画像を生成する。   Subsequently, the multi-AWB processing unit 106 acquires a flash non-emission captured image from the first imaging storage unit 151 and also acquires a flash emission captured image from the second imaging storage unit 152. Thereafter, the image reduction unit 161 of the multi-AWB processing unit 106 reduces the flash emission captured image to the image size of the flash non-emission captured image (step S109), and generates a flash emission reduced image.

その後、マルチAWB処理部106は、露光差分値算出部162により露光差分値を算出した後に、第1フラッシュ反射量算出部163によりフラッシュ反射量(第1のフラッシュ反射量)を算出する(ステップS111)。マルチAWB処理部106は、全ての画像に対して第1のフラッシュ反射量の算出処理が終了したか否かを判断し(ステップS113)、処理が終了していない場合には、ステップS111を再実施する。   Thereafter, the multi-AWB processing unit 106 calculates the exposure difference value by the exposure difference value calculation unit 162, and then calculates the flash reflection amount (first flash reflection amount) by the first flash reflection amount calculation unit 163 (step S111). ). The multi-AWB processing unit 106 determines whether or not the first flash reflection amount calculation process has been completed for all images (step S113). If the process has not been completed, the multi-AWB processing unit 106 re-executes step S111. carry out.

次に、マルチAWB処理部106の輝度差分算出部165及びカラーバランス算出部166は、補間対象画素を選択し、差分絶対値(すなわち、輝度値の差分、並びに、色信号値(R信号値及びB信号値)の差分)を算出し(ステップS115)、補間信号選択部167に出力する。補間信号選択部167は、輝度値の差分絶対値が第1の閾値未満か否かを判断する(ステップS117)。   Next, the luminance difference calculation unit 165 and the color balance calculation unit 166 of the multi-AWB processing unit 106 select the interpolation target pixel, and calculate the absolute difference value (that is, the difference between the luminance values and the color signal value (the R signal value and the R signal value). Difference (B signal value)) is calculated (step S115) and output to the interpolation signal selection unit 167. The interpolation signal selection unit 167 determines whether or not the absolute value of the luminance value difference is less than the first threshold value (step S117).

ここで、輝度値の差分絶対値が第1の閾値未満であった場合には、補間信号選択部167は、拡大補間のために利用する信号として色信号値を選択し、第2フラッシュ反射量算出部168は、色信号値(画像のカラーバランス)を基に対象画素のフラッシュ反射量(第2フラッシュ反射量)の補間を行う(ステップS119)。その後、マルチAWB処理部106は、後述するステップS123を実施する。   Here, when the difference absolute value of the luminance values is less than the first threshold value, the interpolation signal selection unit 167 selects a color signal value as a signal used for enlargement interpolation, and the second flash reflection amount The calculation unit 168 performs interpolation of the flash reflection amount (second flash reflection amount) of the target pixel based on the color signal value (color balance of the image) (step S119). Thereafter, the multi-AWB processing unit 106 performs step S123 described later.

また、輝度値の差分絶対値が第1の閾値以上であった場合には、補間信号選択部167は、拡大補間のために利用する信号として輝度値を選択し、第2フラッシュ反射量算出部168は、画像の輝度値(又は、G信号値)を基に対象画素のフラッシュ反射量(第2フラッシュ反射量)の補間を行う(ステップS121)。その後、マルチAWB処理部106は、後述するステップS123を実施する。   When the absolute difference value of the luminance values is greater than or equal to the first threshold value, the interpolation signal selection unit 167 selects the luminance value as a signal used for enlargement interpolation, and the second flash reflection amount calculation unit In 168, the flash reflection amount (second flash reflection amount) of the target pixel is interpolated based on the luminance value (or G signal value) of the image (step S121). Thereafter, the multi-AWB processing unit 106 performs step S123 described later.

続いて、マルチAWB処理部106は、全ての画素に対して補間処理が終了したか否かを判断する(ステップS123)。補間処理が終了している場合には、マルチAWB処理部106は、後述するステップS125を実施する。また、補間処理が終了していない場合には、マルチAWB処理部106は、再びステップS115に戻って処理を継続する。   Subsequently, the multi-AWB processing unit 106 determines whether or not the interpolation processing has been completed for all pixels (step S123). If the interpolation process has been completed, the multi-AWB processing unit 106 performs step S125 described later. If the interpolation process has not been completed, the multi-AWB processing unit 106 returns to step S115 again and continues the process.

全ての画素に対して補間処理が終了すると、マルチAWB処理部106の推定光源色算出部169は、算出された第2のフラッシュ反射量に基づいて、フラッシュ光と定常光の推定光源色を線形補間により算出する(ステップS125)。その後、マルチAWB処理部106のホワイトバランスゲイン算出部170は、算出された推定光源色に基づいて、ホワイトバランスゲインを算出する(ステップS127)。   When the interpolation processing is completed for all the pixels, the estimated light source color calculation unit 169 of the multi-AWB processing unit 106 linearly calculates the estimated light source colors of the flash light and the steady light based on the calculated second flash reflection amount. Calculation is performed by interpolation (step S125). Thereafter, the white balance gain calculation unit 170 of the multi-AWB processing unit 106 calculates a white balance gain based on the calculated estimated light source color (step S127).

その後、マルチAWB処理部106は、全ての画素に対してホワイトバランスゲインの算出処理が終了したか否かを判断する(ステップS129)。算出処理が終了している場合には、マルチAWB処理部106は、算出した全てのホワイトバランスゲインを、後処理部107のホワイトバランス制御部176に出力して、処理を終了する。他方、ホワイトバランスゲインの算出処理が終了していない場合には、マルチAWB処理部106は、再びステップS125に戻って処理を継続する。   Thereafter, the multi-AWB processing unit 106 determines whether or not the white balance gain calculation processing has been completed for all the pixels (step S129). If the calculation process has been completed, the multi-AWB processing unit 106 outputs all the calculated white balance gains to the white balance control unit 176 of the post-processing unit 107, and ends the process. On the other hand, if the white balance gain calculation process has not been completed, the multi-AWB processing unit 106 returns to step S125 again and continues the process.

以上、図14A及び図14Bを参照しながら、本実施形態に係る撮像装置10で実施される撮像方法の流れの一例について、簡単に説明した。   Heretofore, an example of the flow of the imaging method performed by the imaging apparatus 10 according to the present embodiment has been briefly described with reference to FIGS. 14A and 14B.

以上説明したように、本発明の実施形態に係る撮像装置及び撮像方法によれば、フラッシュ発光撮像画像の輝度値だけでなく、カラーバランスを使用することにより、フラッシュ反射量を適切に補間することが可能となる。これにより、輝度値がほぼ同じ値になっていて、色温度が大きく変化する境界であっても、フラッシュ反射量を適切に補間することができる。   As described above, according to the imaging apparatus and the imaging method according to the embodiment of the present invention, the flash reflection amount is appropriately interpolated by using not only the luminance value of the flash emission captured image but also the color balance. Is possible. As a result, the flash reflection amount can be appropriately interpolated even at a boundary where the luminance values are substantially the same and the color temperature changes greatly.

その結果、輝度値や距離によらず適切なホワイトバランスゲインを算出することができ、不適切なホワイトバランスゲインによる被写体のエッジ周辺の色つきを低減することができるため、画素単位に行うホワイトバランス補正処理を、従来技術より好適に行うことができる撮像装置及び撮像方法を提供することができる。   As a result, an appropriate white balance gain can be calculated regardless of the luminance value and distance, and coloring around the edge of the subject due to an inappropriate white balance gain can be reduced. It is possible to provide an imaging apparatus and an imaging method that can perform the correction process more suitably than in the related art.

以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。   The preferred embodiments of the present invention have been described in detail above with reference to the accompanying drawings, but the present invention is not limited to such examples. It is obvious that a person having ordinary knowledge in the technical field to which the present invention pertains can come up with various changes or modifications within the scope of the technical idea described in the claims. Of course, it is understood that these also belong to the technical scope of the present invention.

10 撮像装置
101 撮像部
102 信号処理部
103 前処理部
104 画像メモリ
105 適正AE算出部
106 マルチAWB処理部
107 後処理部
108 RGB−YCC変換部
109 データ圧縮部
110 メモリカードインタフェース
111 メモリカード
121 レンズ
122 絞り
123 シャッター
124 撮像素子
125 露光制御部
126 フラッシュ
131 色分離部
132 A/D変換部
141 黒レベル補正部
142 欠陥画素補正部
143 シェーディング補正部
144 AE評価値算出部
151 第1撮像記憶部
152 第2撮像記憶部
161 画像縮小部
162 露光差分値算出部
163 第1フラッシュ反射量算出部
164 フラッシュ反射量補間部
165 輝度差分算出部
166 カラーバランス算出部
167 補間信号選択部
168 第2フラッシュ反射量算出部
169 推定光源色算出部
170 ホワイトバランスゲイン算出部
171 デモザイク処理部
172 エッジ強調処理部
173 色補正処理部
174 ガンマ補正処理部
175 ノイズリダクション処理部
176 ホワイトバランス制御部
DESCRIPTION OF SYMBOLS 10 Imaging device 101 Imaging part 102 Signal processing part 103 Pre-processing part 104 Image memory 105 Proper AE calculation part 106 Multi-AWB processing part 107 Post-processing part 108 RGB-YCC conversion part 109 Data compression part 110 Memory card interface 111 Memory card 121 Lens 122 Aperture 123 Shutter 124 Image sensor 125 Exposure control unit 126 Flash 131 Color separation unit 132 A / D conversion unit 141 Black level correction unit 142 Defective pixel correction unit 143 Shading correction unit 144 AE evaluation value calculation unit 151 First imaging storage unit 152 Second imaging storage unit 161 Image reduction unit 162 Exposure difference value calculation unit 163 First flash reflection amount calculation unit 164 Flash reflection amount interpolation unit 165 Brightness difference calculation unit 166 Color balance calculation unit 167 Interpolation signal Selection unit 168 Second flash reflection amount calculation unit 169 Estimated light source color calculation unit 170 White balance gain calculation unit 171 Demosaic processing unit 172 Edge enhancement processing unit 173 Color correction processing unit 174 Gamma correction processing unit 175 Noise reduction processing unit 176 White balance control Part

Claims (9)

フラッシュ非発光時に撮像された第1の撮像画像と、当該第1の撮像画像よりも画素数が多く、フラッシュ発光時に撮像された第2の撮像画像と、を生成する撮像部と、
前記第1の撮像画像と前記第2の撮像画像とが同一の画像サイズとなるように前記第2の撮像画像を縮小して、第3の撮像画像を生成する画像縮小部と、
前記第1の撮像画像の露光制御値及び前記第2の撮像画像の露光制御値に基づいて、第1の撮像画像と第2の撮像画像との間の露光差分値を算出する露光差分値算出部と、
前記第1の撮像画像の信号値と、前記露光差分値を乗算した前記第3の撮像画像の信号値とに基づいて、画素単位で第1のフラッシュ反射量を算出する第1フラッシュ反射量算出部と、
色信号値から算出したカラーバランスに基づく線形補間処理、又は、輝度値に基づく線形補間処理の何れか一方を選択するとともに、選択した前記線形補間処理により前記第1のフラッシュ反射量を補間拡大し、第2のフラッシュ反射量を算出するフラッシュ反射量補間部と、
算出された前記第2のフラッシュ反射量に基づいて、前記第2の撮像画像に対してホワイトバランス補正処理を実施する際に用いられるホワイトバランスゲインを画素単位で算出するホワイトバランスゲイン算出部と、
を備えることを特徴とする、撮像装置。
An imaging unit that generates a first captured image captured at the time of flash non-emission and a second captured image that has a larger number of pixels than the first captured image and is captured at the time of flash emission;
An image reduction unit that reduces the second captured image to generate a third captured image so that the first captured image and the second captured image have the same image size;
An exposure difference value calculation that calculates an exposure difference value between the first captured image and the second captured image based on the exposure control value of the first captured image and the exposure control value of the second captured image. And
Based on the signal value of the first captured image and the signal value of the third captured image multiplied by the exposure difference value, the first flash reflection amount calculation that calculates the first flash reflection amount in units of pixels. And
Either linear interpolation processing based on the color balance calculated from the color signal value or linear interpolation processing based on the luminance value is selected, and the first flash reflection amount is interpolated and enlarged by the selected linear interpolation processing. A flash reflection amount interpolation unit for calculating the second flash reflection amount;
Based on the calculated second flash reflection amount, a white balance gain calculation unit that calculates a white balance gain to be used for performing a white balance correction process on the second captured image in units of pixels;
An imaging apparatus comprising:
前記撮像装置は、算出された前記ホワイトバランスゲインを前記第2の撮像画像の全画素に対して適用し、前記第2の撮像画像のホワイトバランスを補正するホワイトバランス制御部を更に備えることを特徴とする、請求項1に記載の撮像装置。   The imaging apparatus further includes a white balance control unit that applies the calculated white balance gain to all pixels of the second captured image and corrects the white balance of the second captured image. The imaging apparatus according to claim 1. 前記フラッシュ反射量補間部は、
前記第2の撮像画像を構成する各画素の輝度値の差分を算出する輝度差分算出部と、
前記第2の撮像画像を構成する各画素の色信号値の差分を算出するカラーバランス算出部と、
前記輝度差分算出部により算出された前記輝度値の差分と、前記カラーバランス算出部により算出された前記色信号値の差分とに基づいて、各画素の信号値の類似度合いを所定の閾値に基づいて判断し、前記第1のフラッシュ反射量の補間拡大に利用する信号を選択する補間信号選択部と、
前記補間信号選択部により選択された前記補間拡大に利用する信号に基づいて前記第1のフラッシュ反射量を線形補間により補間拡大して、第2のフラッシュ反射量を算出する第2フラッシュ反射量算出部と、
を更に備えることを特徴とする、請求項1又は2に記載の撮像装置。
The flash reflection amount interpolation unit
A luminance difference calculation unit for calculating a difference between luminance values of the pixels constituting the second captured image;
A color balance calculation unit for calculating a difference between color signal values of pixels constituting the second captured image;
Based on the difference between the luminance values calculated by the luminance difference calculation unit and the difference between the color signal values calculated by the color balance calculation unit, the degree of similarity of the signal value of each pixel is based on a predetermined threshold. An interpolation signal selection unit that selects a signal to be used for the interpolation expansion of the first flash reflection amount,
Second flash reflection amount calculation for calculating a second flash reflection amount by interpolating and expanding the first flash reflection amount by linear interpolation based on the signal used for the interpolation expansion selected by the interpolation signal selection unit. And
The imaging apparatus according to claim 1, further comprising:
前記補間信号選択部は、
前記輝度値の差分が第1の閾値以上である場合には、前記補間拡大に利用する信号として前記輝度値を選択し、
前記輝度値の差分が前記第1の閾値未満である場合には、前記補間拡大に利用する信号として前記色信号値を選択することを特徴とする、請求項3に記載の撮像装置。
The interpolation signal selection unit includes:
When the difference between the luminance values is equal to or greater than a first threshold, the luminance value is selected as a signal used for the interpolation expansion,
The imaging apparatus according to claim 3, wherein when the difference between the luminance values is less than the first threshold, the color signal value is selected as a signal used for the interpolation enlargement.
前記補間信号選択部は、
前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出されたR信号値の差分が第2の閾値以上である場合には、前記補間拡大に利用する信号として前記R信号値を選択し、
前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出されたB信号値の差分が前記第2の閾値以上である場合には、前記補間拡大に利用する信号として前記B信号値を選択し、
前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出された前記R信号値及び前記B信号値の差分がそれぞれ前記第2の閾値以上である場合には、前記補間拡大に利用する信号として前記R信号値及び前記B信号値の双方を選択し、
前記輝度値の差分が前記第1の閾値未満であり、かつ、前記カラーバランス算出部により算出された前記R信号値及び前記B信号値の差分がそれぞれ前記第2の閾値未満である場合には、前記補間拡大に利用する信号として前記輝度値を選択することを特徴とする、請求項4に記載の撮像装置。
The interpolation signal selection unit includes:
When the difference between the luminance values is less than the first threshold and the difference between the R signal values calculated by the color balance calculation unit is greater than or equal to a second threshold, a signal used for the interpolation enlargement Select the R signal value as
When the difference between the luminance values is less than the first threshold and the difference between the B signal values calculated by the color balance calculation unit is greater than or equal to the second threshold, the difference is used for the interpolation expansion. Select the B signal value as the signal,
When the difference between the luminance values is less than the first threshold value, and the difference between the R signal value and the B signal value calculated by the color balance calculation unit is equal to or greater than the second threshold value, respectively. , Selecting both the R signal value and the B signal value as signals used for the interpolation expansion,
When the difference between the luminance values is less than the first threshold value and the difference between the R signal value and the B signal value calculated by the color balance calculation unit is less than the second threshold value, respectively. The imaging apparatus according to claim 4, wherein the luminance value is selected as a signal used for the interpolation enlargement.
前記第2フラッシュ反射量算出部は、前記補間信号選択部により前記R信号値及び前記B信号値の双方が選択された場合に、それぞれの信号値に基づく補間拡大結果の平均値を算出し、当該平均値を前記第2のフラッシュ反射量とすることを特徴とする、請求項5に記載の撮像装置。   The second flash reflection amount calculation unit calculates an average value of interpolation expansion results based on respective signal values when both the R signal value and the B signal value are selected by the interpolation signal selection unit, The imaging apparatus according to claim 5, wherein the average value is the second flash reflection amount. 前記第1のフラッシュ反射量及び前記第2のフラッシュ反射量は、ベイヤ画像におけるR,G,G,Bの4画素を一つの画素とみなして算出されることを特徴とする、請求項1に記載の撮像装置。   The first flash reflection amount and the second flash reflection amount are calculated by regarding four pixels of R, G, G, and B in a Bayer image as one pixel. The imaging device described. 前記第1のフラッシュ反射量及び前記第2のフラッシュ反射量は、ベイヤ色補間処理により周辺画素を補間して一つの画素(R,G,B)として算出されることを特徴とする、請求項1に記載の撮像装置。   The first flash reflection amount and the second flash reflection amount are calculated as one pixel (R, G, B) by interpolating surrounding pixels by Bayer color interpolation processing. The imaging apparatus according to 1. フラッシュ非発光時に撮像された第1の撮像画像と、当該第1の撮像画像よりも画素数が多く、フラッシュ発光時に撮像された第2の撮像画像と、を生成する撮像ステップと、
前記第1の撮像画像と前記第2の撮像画像とが同一の画像サイズとなるように前記第2の撮像画像を縮小して、第3の撮像画像を生成する画像縮小ステップと、
前記第1の撮像画像の露光制御値及び前記第2の撮像画像の露光制御値に基づいて、第1の撮像画像と第2の撮像画像との間の露光差分値を算出する露光差分値算出ステップと、
前記第1の撮像画像の信号値と、前記露光差分値を乗算した前記第3の撮像画像の信号値とに基づいて、画素単位で第1のフラッシュ反射量を算出する第1フラッシュ反射量算出ステップと、
色信号値から算出したカラーバランスに基づく線形補間処理、又は、輝度値に基づく線形補間処理の何れか一方を選択するとともに、選択した前記線形補間処理により前記第1のフラッシュ反射量を補間拡大し、第2のフラッシュ反射量を算出するフラッシュ反射量補間ステップと、
算出された前記第2のフラッシュ反射量に基づいて、前記第2の撮像画像に対してホワイトバランス補正処理を実施する際に用いられるホワイトバランスゲインを画素単位で算出するホワイトバランスゲイン算出ステップと、
を含むことを特徴とする、撮像方法。
An imaging step for generating a first captured image captured at the time of flash non-emission, and a second captured image having more pixels than the first captured image and captured at the time of flash emission;
An image reduction step of generating a third captured image by reducing the second captured image so that the first captured image and the second captured image have the same image size;
An exposure difference value calculation that calculates an exposure difference value between the first captured image and the second captured image based on the exposure control value of the first captured image and the exposure control value of the second captured image. Steps,
Based on the signal value of the first captured image and the signal value of the third captured image multiplied by the exposure difference value, the first flash reflection amount calculation that calculates the first flash reflection amount in units of pixels. Steps,
Either linear interpolation processing based on the color balance calculated from the color signal value or linear interpolation processing based on the luminance value is selected, and the first flash reflection amount is interpolated and enlarged by the selected linear interpolation processing. A flash reflection amount interpolation step for calculating a second flash reflection amount;
A white balance gain calculating step for calculating a white balance gain used for performing a white balance correction process on the second captured image on a pixel basis based on the calculated second flash reflection amount;
The imaging method characterized by including.
JP2010283826A 2010-12-20 2010-12-20 Imaging apparatus and imaging method Pending JP2012134678A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010283826A JP2012134678A (en) 2010-12-20 2010-12-20 Imaging apparatus and imaging method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010283826A JP2012134678A (en) 2010-12-20 2010-12-20 Imaging apparatus and imaging method

Publications (1)

Publication Number Publication Date
JP2012134678A true JP2012134678A (en) 2012-07-12

Family

ID=46649769

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010283826A Pending JP2012134678A (en) 2010-12-20 2010-12-20 Imaging apparatus and imaging method

Country Status (1)

Country Link
JP (1) JP2012134678A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9025047B2 (en) 2012-12-13 2015-05-05 Samsung Electronics Co., Ltd. Photographing apparatus and method
CN112907701A (en) * 2019-11-19 2021-06-04 杭州海康威视数字技术股份有限公司 Method and device for acquiring image, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005102116A (en) * 2003-09-04 2005-04-14 Sony Corp Image processing method, image processing device, and computer program
JP2009060586A (en) * 2007-08-06 2009-03-19 Panasonic Corp White balance adjustment device, image capture device, white balance adjustment method, program and integrated circuit
JP2009094997A (en) * 2007-09-18 2009-04-30 Ricoh Co Ltd Imaging apparatus, imaging method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005102116A (en) * 2003-09-04 2005-04-14 Sony Corp Image processing method, image processing device, and computer program
JP2009060586A (en) * 2007-08-06 2009-03-19 Panasonic Corp White balance adjustment device, image capture device, white balance adjustment method, program and integrated circuit
JP2009094997A (en) * 2007-09-18 2009-04-30 Ricoh Co Ltd Imaging apparatus, imaging method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9025047B2 (en) 2012-12-13 2015-05-05 Samsung Electronics Co., Ltd. Photographing apparatus and method
CN112907701A (en) * 2019-11-19 2021-06-04 杭州海康威视数字技术股份有限公司 Method and device for acquiring image, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
JP5761946B2 (en) Image processing apparatus, image processing method, and storage medium
JP5743696B2 (en) Image processing apparatus, image processing method, and program
JP6049343B2 (en) Image processing apparatus, image processing method, and program
JP5808142B2 (en) Image processing apparatus, image processing method, and program
US20050169555A1 (en) Image processing apparatus and method, and computer program
US8243164B2 (en) Method, apparatus, and system for selecting pixels for automatic white balance processing
JP2008079143A (en) White balance correction method and imaging apparatus
JP2007173933A (en) Digital camera, gain calculation apparatus, and gain calculation method
US9036046B2 (en) Image processing apparatus and method with white balance correction
JP2012054811A (en) Image processor, image processing method and program
JP2010026284A (en) Flash emission method and device
CN113691795A (en) Image processing apparatus, image processing method, and storage medium
JP5225137B2 (en) Imaging apparatus, image processing method, and program
JP2007329619A (en) Video signal processor, video signal processing method and video signal processing program
JP5854716B2 (en) Image processing apparatus, image processing method, and program
KR102068747B1 (en) Photographing apparatus and method
JP2019179463A (en) Image processing device, control method thereof, program, and recording medium
JP5566680B2 (en) Imaging apparatus and imaging method
JP2012134678A (en) Imaging apparatus and imaging method
JP6570311B2 (en) Image processing apparatus and image processing method
KR101710629B1 (en) Image pickup apparatus and image pickup method
JP4389671B2 (en) Image processing apparatus, image processing method, and computer program
JP2009239772A (en) Imaging device, image processing device, image processing method, and program
JP2013090238A (en) Imaging device and white balance adjustment method
JP6616674B2 (en) Image processing apparatus and method, and imaging apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20131220

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140808

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140909

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20150120