JP5566679B2 - Imaging apparatus and imaging method - Google Patents

Imaging apparatus and imaging method Download PDF

Info

Publication number
JP5566679B2
JP5566679B2 JP2009293474A JP2009293474A JP5566679B2 JP 5566679 B2 JP5566679 B2 JP 5566679B2 JP 2009293474 A JP2009293474 A JP 2009293474A JP 2009293474 A JP2009293474 A JP 2009293474A JP 5566679 B2 JP5566679 B2 JP 5566679B2
Authority
JP
Japan
Prior art keywords
image
flash
pixel
pixels
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.)
Expired - Fee Related
Application number
JP2009293474A
Other languages
Japanese (ja)
Other versions
JP2011135377A (en
Inventor
崇彦 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Priority to JP2009293474A priority Critical patent/JP5566679B2/en
Priority to KR1020100127097A priority patent/KR101710629B1/en
Priority to US12/977,900 priority patent/US8717454B2/en
Publication of JP2011135377A publication Critical patent/JP2011135377A/en
Application granted granted Critical
Publication of JP5566679B2 publication Critical patent/JP5566679B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/75Circuitry for compensating brightness variation in the scene by influencing optical camera components
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B15/00Special procedures for taking photographs; Apparatus therefor
    • G03B15/02Illuminating scene
    • G03B15/03Combinations of cameras with lighting apparatus; Flash units
    • G03B15/05Combinations of cameras with electronic flash apparatus; Electronic flash units
    • GPHYSICS
    • G03PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
    • G03BAPPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
    • G03B7/00Control of exposure by setting shutters, diaphragms or filters, separately or conjointly
    • G03B7/16Control of exposure by setting shutters, diaphragms or filters, separately or conjointly in accordance with both the intensity of the flash source and the distance of the flash source from the object, e.g. in accordance with the "guide number" of the flash bulb and the focusing of the camera
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01LSEMICONDUCTOR DEVICES NOT COVERED BY CLASS H10
    • H01L27/00Devices consisting of a plurality of semiconductor or other solid-state components formed in or on a common substrate
    • H01L27/14Devices consisting of a plurality of semiconductor or other solid-state components formed in or on a common substrate including semiconductor components sensitive to infrared radiation, light, electromagnetic radiation of shorter wavelength or corpuscular radiation and specially adapted either for the conversion of the energy of such radiation into electrical energy or for the control of electrical energy by such radiation
    • H01L27/144Devices controlled by radiation
    • H01L27/146Imager structures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof
    • H04N23/84Camera processing pipelines; Components thereof for processing colour signals
    • H04N23/88Camera processing pipelines; Components thereof for processing colour signals for colour balance, e.g. white-balance circuits or colour temperature control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Description

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

デジタルスチルカメラなどの電子的撮像装置において、従来のホワイトバランス補正処理は、一つのホワイトバランスゲインを画像全体に一律に適用する処理である。   In an electronic imaging apparatus such as a digital still camera, the conventional white balance correction process is a process that uniformly applies one white balance gain to the entire image.

例えば照明光(環境光)が暗いシーンでは露光不足を解消するために、フラッシュを発光して撮影を行う。フラッシュを発光して撮影したとき、ホワイトバランスゲインは、フラッシュの発光量等に応じて算出される。その際、環境光とフラッシュ光が混合されているシーンで撮影した場合、デジタルスチルカメラに近い距離にある被写体は、適切なホワイトバランスとすることができる。しかし、遠い距離にある被写体は、フラッシュ光よりも環境光の依存度が高くなる。そのため、環境光が蛍光灯などの場合、環境光とフラッシュ光との色温度差が大きくなる。その結果、ホワイトバランス補正処理を画像全体に適用すると、遠い距離にある白い被写体が黄色くなるなど不適切なホワイトバランスとなる問題が発生する。   For example, in a scene where the illumination light (environment light) is dark, shooting is performed by emitting a flash in order to eliminate insufficient exposure. When shooting with the flash fired, the white balance gain is calculated according to the flash emission amount and the like. At that time, when shooting in a scene in which ambient light and flash light are mixed, a subject close to the digital still camera can have an appropriate white balance. However, a subject at a far distance is more dependent on ambient light than flash light. Therefore, when the environmental light is a fluorescent lamp or the like, the color temperature difference between the environmental light and the flash light becomes large. As a result, when the white balance correction process is applied to the entire image, there arises a problem that an inappropriate white balance occurs such as a white subject at a long distance becomes yellow.

このため、画像全体を適切なホワイトバランスとするために、フラッシュ発光画像とフラッシュ非発光画像を比較することでフラッシュ反射量を算出し、そのフラッシュ反射量から最適なホワイトバランスゲインを画素単位に算出し適用する技術が開示されている。   For this reason, in order to achieve an appropriate white balance for the entire image, the flash reflection amount is calculated by comparing the flash emission image and the flash non-emission image, and the optimal white balance gain is calculated for each pixel from the flash reflection amount. The technology to be applied is disclosed.

特許文献1では、フラッシュ発光画像とフラッシュ非発光画像の画像サイズが違う場合に、補間することにより最適なホワイトバランスゲインを算出する技術が開示されている。フラッシュ発光画像とフラッシュ非発光画像の全体を複数のブロックに分割し、対応するブロックの比較によりホワイトバランスゲインを求め、それを該ブロックの中心画素に対するホワイトバランスゲインとする。非中心画素のホワイトバランスゲインは、隣り合うブロックの中心画素からの距離により補間し求める   Patent Document 1 discloses a technique for calculating an optimal white balance gain by interpolation when the flash emission image and the flash non-emission image have different image sizes. The entire flash emission image and flash non-emission image are divided into a plurality of blocks, a white balance gain is obtained by comparing the corresponding blocks, and is set as the white balance gain for the central pixel of the block. The white balance gain of the non-center pixel is obtained by interpolation based on the distance from the center pixel of the adjacent block.

また、特許文献2では、特許文献1と異なる方式で補間する方法も開示されている。間引きを行って画素数を減らしたフラッシュ非発光画像と、フラッシュ発光画像を取得し、画素単位に色温度条件を算出する。フラッシュ非発光画像が間引かれた画像の場合、間引かれた画素を補間することによりホワイトバランスゲインを求めている。補間対象画素の色温度条件は、補間対象画素に近い3画素を選択し、補間対象画素の輝度値に近い画素の色温度条件を補間対象画素の色温度条件とする。この色温度条件から補間対象画素のホワイトバランスゲインを求める。   Further, Patent Document 2 discloses a method of performing interpolation using a method different from that of Patent Document 1. A flash non-emission image and a flash emission image with the number of pixels reduced by thinning are acquired, and a color temperature condition is calculated for each pixel. In the case where the flash non-light-emitting image is thinned, the white balance gain is obtained by interpolating the thinned pixels. As the color temperature condition of the interpolation target pixel, three pixels close to the interpolation target pixel are selected, and the color temperature condition of the pixel close to the luminance value of the interpolation target pixel is set as the color temperature condition of the interpolation target pixel. The white balance gain of the interpolation target pixel is obtained from this color temperature condition.

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

ところで、特許文献1では、エッジなどの境界がある被写体において、その境界で色温度が大きく変化する場合、中心画素からの距離での補間では、境界付近において不適切なホワイトバランスゲインとなるという問題がある。   By the way, in Patent Document 1, when an object having a boundary such as an edge has a large change in color temperature at the boundary, interpolation at a distance from the center pixel results in an inappropriate white balance gain near the boundary. There is.

また、特許文献2では、エッジなどの境界がある被写体においては適切に補間が行われるが、ホワイトバランスゲインが滑らかに変化するような被写体においては、段差が発生し滑らかとはならない補間となるという問題がある。   Further, in Patent Document 2, interpolation is appropriately performed for a subject having a boundary such as an edge, but in a subject whose white balance gain changes smoothly, a step is generated and the interpolation is not smooth. There's a problem.

ライブビュー画像などフラッシュ発光画像より画素数の少ないフラッシュ非発光画像を用いた場合、間引かれた画素は補間によりホワイトバランスゲインを求めなければならない。このような方法において、画素間の距離による補間、または近傍画素の値のままでは、適切なホワイトバランスゲインを求めることができないという問題がある。   When a flash non-light emitting image having a smaller number of pixels than a flash light emitting image, such as a live view image, is used, a white balance gain must be obtained by interpolation for the thinned pixels. In such a method, there is a problem that an appropriate white balance gain cannot be obtained if interpolation is performed based on the distance between pixels or the values of neighboring pixels remain unchanged.

そこで、本発明は、上記問題に鑑みてなされたものであり、本発明の目的とするところは、画素数の少ないフラッシュ非発光時の画像と、画素数が多い本撮影画像であるフラッシュ発光時の画像とを比較し、画素単位にホワイトバランスゲインを算出する方法において、間引かれている画素について適切に補間を行うことによって、画像全体を適切なホワイトバランスに調整することが可能な、新規かつ改良された撮像装置及び撮像方法を提供することにある。   Accordingly, the present invention has been made in view of the above problems, and an object of the present invention is to provide an image at the time of flash non-emission with a small number of pixels and an actual shooting image with a large number of pixels at the time of flash emission. In the method of calculating the white balance gain for each pixel by comparing with the image of the image, it is possible to adjust the entire image to an appropriate white balance by appropriately interpolating the thinned pixels. Another object of the present invention is to provide an improved imaging apparatus and imaging method.

上記課題を解決するために、本発明のある観点によれば、間引き処理によって画素数が少ないフラッシュ非発光時の第一の画像を取得し、第一の画像より画素数が多いフラッシュ発光時の第二の画像を取得する撮像部と、第二の画像が第一の画像のサイズと同一となるように第二の画像に対して間引き処理し第三の画像を取得する画像間引き部と、取得された第一の画像の全画素について第一の被写体輝度を算出し、取得された第三の画像の全画素について第二の被写体輝度を算出する被写体輝度算出部と、画素毎の第一の被写体輝度と、画素毎の第二の被写体輝度との差分である被写体輝度差分を全画素について算出する被写体輝度算出部と、被写体輝度差分から画素単位に第一のフラッシュ反射量を算出するフラッシュ反射量算出部と、第三の画像の画素単位の輝度値を使用して、画素毎の第一のフラッシュ反射量に対して、第一の画像と第三の画像の位置ずれの影響を軽減する補間処理をして第二のフラッシュ反射量を算出する第一のフラッシュ反射量補間部と、第二の画像の画素単位の輝度値を使用して、画素毎の第二のフラッシュ反射量に対して、第三の画像を第二の画像のサイズに拡大する補間処理をして第三のフラッシュ反射量を算出する第二のフラッシュ反射量補間部と、第三のフラッシュ反射量から画素単位にホワイトバランスゲインを算出するホワイトバランスゲイン算出部とを備える、撮像装置が提供される。   In order to solve the above-described problem, according to one aspect of the present invention, a first image when the flash is not emitted with a small number of pixels is acquired by thinning-out processing, and a flash emission with more pixels than the first image is obtained. An image capturing unit that acquires the second image, an image thinning unit that performs a thinning process on the second image so that the second image has the same size as the first image, and acquires a third image; A subject brightness calculation unit that calculates a first subject brightness for all pixels of the acquired first image and calculates a second subject brightness for all pixels of the acquired third image; and a first for each pixel A subject brightness calculation unit that calculates a subject brightness difference, which is a difference between the subject brightness of each pixel and a second subject brightness for each pixel, for all pixels, and a flash that calculates a first flash reflection amount for each pixel from the subject brightness difference A reflection amount calculation unit; Using the luminance value of each pixel of the third image, the first flash reflection amount for each pixel is subjected to interpolation processing to reduce the influence of the positional deviation between the first image and the third image. Using the first flash reflection amount interpolation unit for calculating the second flash reflection amount and the luminance value in pixel units of the second image, the third image with respect to the second flash reflection amount for each pixel A second flash reflection amount interpolation unit that calculates a third flash reflection amount by performing an interpolation process for enlarging the image to the size of the second image, and calculates a white balance gain in pixel units from the third flash reflection amount. An imaging apparatus is provided that includes a white balance gain calculation unit.

画素数が少ないフラッシュ非発光時の第一の画像の第一の被写体輝度が算出され、フラッシュ発光時の第二の画像が第一の画像のサイズと同一となるように間引かれた第三の画像の第二の被写体輝度が算出される。そして、画素毎の第一及び第二の被写体輝度との被写体輝度差分に基づく第一のフラッシュ反射量に対して、第三の画像の画素単位の輝度値から、第一の画像と第三の画像の位置ずれの影響を軽減する補間をして第二のフラッシュ反射量が算出される。また、第二の画像の画素単位の輝度値から、第二のフラッシュ反射量に対して、第三の画像を第二の画像のサイズに拡大する補間をして第三のフラッシュ反射量が算出される。そして、第三のフラッシュ反射量から画素単位にホワイトバランスゲインが算出される。その結果、間引かれている画素について適切に補間が行われるため、画像全体を適切なホワイトバランスに調整することができる。   The first subject luminance of the first image when the flash does not emit light with a small number of pixels is calculated, and the second image when the flash is emitted is thinned out to be the same as the size of the first image The second subject brightness of the image is calculated. Then, with respect to the first flash reflection amount based on the subject brightness difference between the first and second subject brightness for each pixel, the first image and the third image are obtained from the brightness value in pixel units of the third image. The second flash reflection amount is calculated by performing interpolation for reducing the influence of the image position shift. In addition, the third flash reflection amount is calculated by interpolating the third image to the size of the second image with respect to the second flash reflection amount from the luminance value of the pixel unit of the second image. Is done. Then, a white balance gain is calculated for each pixel from the third flash reflection amount. As a result, since interpolation is appropriately performed on the thinned pixels, the entire image can be adjusted to an appropriate white balance.

上記ホワイトバランスゲインを第二の画像の全画素に画素単位で適用して、画素単位でホワイトバランスを制御するホワイトバランス制御部を更に備える。この構成により、ホワイトバランスゲインが第二の画像の全画素に画素単位で適用されて、画素単位でホワイトバランスが制御される。   The image processing apparatus further includes a white balance control unit that applies the white balance gain to all pixels of the second image in units of pixels and controls white balance in units of pixels. With this configuration, the white balance gain is applied to all pixels of the second image in units of pixels, and the white balance is controlled in units of pixels.

被写体から受光した光に基づいて、フラッシュを発光せずに撮影して取得される第一の画像の明るさが適正となる第一の露光制御値と、フラッシュを発光して撮影して取得される第二の画像の明るさが適正となる第二の露光制御値を算出する露光制御値算出部と、第一の露光制御値と第二の露光制御値との差分である露光制御値差分を算出する露光制御値差分算出部とを更に備え、撮像部は、第一の露光制御値に基づいて撮影し第一の画像を取得し、第二の露光制御値に基づいて撮影し第二の画像を取得し、被写体輝度算出部は、露光制御値差分と、画素毎の第一の被写体輝度と、画素毎の第二の被写体輝度との差分である被写体輝度差分を全画素について算出する。   Based on the light received from the subject, the first exposure control value at which the brightness of the first image obtained by shooting without firing the flash is appropriate, and the first exposure control value obtained by shooting with the flash An exposure control value calculation unit that calculates a second exposure control value at which the brightness of the second image is appropriate, and an exposure control value difference that is a difference between the first exposure control value and the second exposure control value And an exposure control value difference calculating unit that calculates the image, and the imaging unit captures a first image by capturing based on the first exposure control value, and captures a second image by capturing based on the second exposure control value. The subject brightness calculation unit calculates a subject brightness difference that is a difference between the exposure control value difference, the first subject brightness for each pixel, and the second subject brightness for each pixel for all pixels. .

上記第一の露光制御値と第二の露光制御値は、露光制御値算出部によって個別に算出され、第一の露光制御値と第二の露光制御値が一致する必要がない。   The first exposure control value and the second exposure control value are individually calculated by the exposure control value calculation unit, and the first exposure control value and the second exposure control value do not need to match.

上記撮像部は、露光制御値算出部によって算出された第一の露光制御値のうち、絞り値を一致させた第二の露光制御値で撮影し第二の画像を取得する。   The imaging unit captures a second exposure control value obtained by matching the aperture value among the first exposure control values calculated by the exposure control value calculation unit, and acquires a second image.

上記フラッシュ反射量算出部によって算出された第一のフラッシュ反射量に基づいて、環境光のカラーバランスとフラッシュ光のカラーバランスを線形補間し、対象画素のカラーバランスを算出するカラーバランス算出部を更に備え、ホワイトバランスゲイン算出部は、カラーバランスに基づいてホワイトバランスゲインを算出する。   A color balance calculation unit that linearly interpolates the color balance of the ambient light and the color balance of the flash light based on the first flash reflection amount calculated by the flash reflection amount calculation unit, and calculates the color balance of the target pixel; The white balance gain calculating unit calculates a white balance gain based on the color balance.

上記第一のフラッシュ反射量補間部は、中心に位置する補間対象となる画素の上下左右の補間元画素の輝度値と第一のフラッシュ反射量を基に、第二のフラッシュ反射量を算出する。   The first flash reflection amount interpolating unit calculates the second flash reflection amount based on the luminance values of the upper, lower, left and right interpolation source pixels of the pixel to be interpolated at the center and the first flash reflection amount. .

上記第一のフラッシュ反射量補間部は、中心に位置する補間対象となる画素と、上下方向、左右方向それぞれの補間元画素との距離は一定である。   In the first flash reflection amount interpolating unit, the distance between the pixel to be interpolated at the center and the interpolation source pixel in the vertical direction and the horizontal direction is constant.

また、上記課題を解決するために、本発明の別の観点によれば、間引き処理によって画素数が少ないフラッシュ非発光時の第一の画像を取得し、第一の画像より画素数が多いフラッシュ発光時の第二の画像を取得するステップと、第二の画像が第一の画像のサイズと同一となるように第二の画像に対して間引き処理し第三の画像を取得するステップと、取得された第一の画像の全画素について第一の被写体輝度を算出し、取得された第三の画像の全画素について第二の被写体輝度を算出するステップと、画素毎の第一の被写体輝度と、画素毎の第二の被写体輝度との差分である被写体輝度差分を全画素について算出するステップと、被写体輝度差分から画素単位に第一のフラッシュ反射量を算出するステップと、第三の画像の画素単位の輝度値を使用して、画素毎の第一のフラッシュ反射量に対して、第一の画像と第三の画像の位置ずれの影響を軽減する補間処理をして第二のフラッシュ反射量を算出するステップと、第二の画像の画素単位の輝度値を使用して、画素毎の第二のフラッシュ反射量に対して、第三の画像を第二の画像のサイズに拡大する補間処理をして第三のフラッシュ反射量を算出するステップと、第三のフラッシュ反射量から画素単位にホワイトバランスゲインを算出するステップとを備える、撮像方法が提供される。   In order to solve the above-described problem, according to another aspect of the present invention, a first image when the flash does not emit light with a small number of pixels is acquired by thinning processing, and the flash has a larger number of pixels than the first image. Obtaining a second image at the time of light emission, obtaining a third image by thinning the second image so that the second image is the same as the size of the first image, Calculating a first subject brightness for all pixels of the acquired first image and calculating a second subject brightness for all pixels of the acquired third image; and a first subject brightness for each pixel Calculating a subject brightness difference, which is a difference between the second subject brightness for each pixel, for all pixels, calculating a first flash reflection amount in pixel units from the subject brightness difference, and a third image Brightness in pixel units Calculating the second flash reflection amount by performing an interpolation process to reduce the influence of the positional deviation between the first image and the third image on the first flash reflection amount for each pixel using And using the luminance value of each pixel of the second image, the second flash reflection amount for each pixel is subjected to an interpolation process for enlarging the third image to the size of the second image. An imaging method is provided, comprising: calculating a third flash reflection amount; and calculating a white balance gain in pixel units from the third flash reflection amount.

以上説明したように本発明によれば、画素数の少ないフラッシュ非発光時の画像と、画素数が多い本撮影画像であるフラッシュ発光時の画像とを比較し、画素単位にホワイトバランスゲインを算出する方法において、間引かれている画素について適切に補間を行うことによって、画像全体を適切なホワイトバランスに調整することができる。   As described above, according to the present invention, the image when the flash is not emitted with a small number of pixels is compared with the image when the flash is emitted, which is a main image with a large number of pixels, and the white balance gain is calculated for each pixel. In the method, the entire image can be adjusted to an appropriate white balance by appropriately interpolating the thinned pixels.

本発明の一実施形態に係る撮像装置を示すブロック図である。It is a block diagram showing an imaging device concerning one embodiment of the present invention. 同実施形態に係る撮像装置100のホワイトバランスゲインの算出動作を示すフローチャートである。4 is a flowchart showing a white balance gain calculation operation of the imaging apparatus 100 according to the embodiment. 同実施形態に係る撮像装置100のホワイトバランスゲインの算出動作を示すフローチャートである。4 is a flowchart showing a white balance gain calculation operation of the imaging apparatus 100 according to the embodiment. ベイヤユニットを示す説明図である。It is explanatory drawing which shows a Bayer unit. 間引き処理を示す説明図である。It is explanatory drawing which shows a thinning process. フラッシュ発光撮影で取得される画像を示す説明図である。It is explanatory drawing which shows the image acquired by flash light emission imaging | photography. フラッシュ非発光撮影で取得される画像を示す説明図である。It is explanatory drawing which shows the image acquired by flash non-light-emission photography. フラッシュ非発光画像に対して露光制御値差分を適用した画像を示す説明図である。It is explanatory drawing which shows the image which applied the exposure control value difference with respect to the flash non-light-emission image. 補間対象画素及び補間元画素を示す説明図である。It is explanatory drawing which shows an interpolation object pixel and an interpolation source pixel. 補間処理の概念を示す説明図である。It is explanatory drawing which shows the concept of an interpolation process. 補間処理の概念を示す説明図である。It is explanatory drawing which shows the concept of an interpolation process. 補間対象画素及び補間元画素を示す説明図である。It is explanatory drawing which shows an interpolation object pixel and an interpolation source pixel.

以下に添付図面を参照しながら、本発明の好適な実施の形態について詳細に説明する。なお、本明細書及び図面において、実質的に同一の機能構成を有する構成要素については、同一の符号を付することにより重複説明を省略する。   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は、本実施形態に係る撮像装置100においての画像処理パイプラインのブロック図を示す。図2は、本実施形態に係る撮像装置100のホワイトバランスゲインの算出動作を示すフローチャートである。   FIG. 1 is a block diagram of an image processing pipeline in the imaging apparatus 100 according to the present embodiment. FIG. 2 is a flowchart illustrating a white balance gain calculation operation of the imaging apparatus 100 according to the present embodiment.

レンズ102を通過した光は、CCDイメージセンサー108又はCMOSイメージセンサーなどの撮像素子に結像する。その結果、CCDイメージセンサー108から信号処理部110を経てRGB画像信号が得られる。信号処理部110は、CCDイメージセンサー108からの信号に対して色分離処理、A/D変換等をする。   The light that has passed through the lens 102 forms an image on an image sensor such as a CCD image sensor 108 or a CMOS image sensor. As a result, an RGB image signal is obtained from the CCD image sensor 108 via the signal processing unit 110. The signal processing unit 110 performs color separation processing, A / D conversion, and the like on the signal from the CCD image sensor 108.

信号処理部110で得られたRGB画像信号は、前処理部112による欠陥画素補正、黒レベル補正、シェーディング補正などの処理が施される。前処理部112は、AE評価値算出部124を有し、RGB画像信号に基づいて、AE評価値を算出する。AE評価値は、適正AE算出部150に送られる。実際に撮影が行われると、適正AE算出部150で算出されたAE値に基づいて、露光制御部152は、絞り104、シャッター106を調整する。   The RGB image signal obtained by the signal processing unit 110 is subjected to processing such as defective pixel correction, black level correction, and shading correction by the preprocessing unit 112. The preprocessing unit 112 includes an AE evaluation value calculation unit 124, and calculates an AE evaluation value based on the RGB image signal. The AE evaluation value is sent to the appropriate AE calculation unit 150. When shooting is actually performed, the exposure control unit 152 adjusts the aperture 104 and the shutter 106 based on the AE value calculated by the appropriate AE calculation unit 150.

また、前処理部112で処理された画像信号は、後処理部114によるホワイトバランス補正処理、ベイヤ色補間(デモザイク)処理、色補正処理、エッジ強調処理、ガンマ補正処理、ノイズ低減処理などの種々の画像処理が施される。その後、RGB→YCC変換部116において、RGB信号がYCC信号に変換され、データ圧縮部118において、JPEG等の形式で圧縮処理される。そして、インターフェースであるメモリーカード接続部120を介して、メモリーカード122に画像データが記録される。   The image signal processed by the preprocessing unit 112 is subjected to various processes such as white balance correction processing, Bayer color interpolation (demosaic) processing, color correction processing, edge enhancement processing, gamma correction processing, and noise reduction processing by the postprocessing unit 114. Image processing is performed. Thereafter, the RGB → YCC conversion unit 116 converts the RGB signal into a YCC signal, and the data compression unit 118 performs compression processing in a format such as JPEG. Then, image data is recorded on the memory card 122 via the memory card connection unit 120 serving as an interface.

本実施形態は、フラッシュ160を発光して撮影することで取得されるフラッシュ発光画像に対し、画素単位に適切なホワイトバランスゲインを算出することを特徴とする。   The present embodiment is characterized in that an appropriate white balance gain is calculated for each pixel with respect to a flash emission image acquired by shooting with the flash 160 being emitted.

以下、本実施形態に係る撮像装置100の撮影動作について説明する。ユーザーによって、シャッターボタンが押圧されることで、撮影が開始される。以下では、露光条件によってフラッシュ発光が必要な場合について説明する。フラッシュ発光が必要な露光条件の場合、1回の撮影は、フラッシュ160を発光しないフラッシュ非発光撮影とフラッシュ160を発光するフラッシュ発光撮影を行う。   Hereinafter, the shooting operation of the imaging apparatus 100 according to the present embodiment will be described. Shooting is started by the user pressing the shutter button. Hereinafter, a case where flash emission is necessary depending on exposure conditions will be described. In the case of an exposure condition that requires flash emission, in one shooting, flash non-flash shooting without flash 160 and flash flash shooting with flash 160 are performed.

まず、フラッシュ160を発光せずに撮影を行って、フラッシュ非発光時の画像を取得する(ステップS101)。この時、フラッシュ160を発光しない撮影である第一の撮像によって、図6のようなフラッシュ発光前の環境光のみのRGB画像信号からなる第一の画像が取得される。第一の画像は、第一の撮像記憶部132によって画像メモリ130などの記憶手段に保持される(ステップS102)。この第一の画像は、ライブビュー画像のように間引き処理等によって、本撮影画像のサイズと比較して画像サイズが小さい画像となる。   First, photographing is performed without the flash 160 being emitted, and an image when the flash is not emitted is acquired (step S101). At this time, a first image made up of RGB image signals of only ambient light before flash emission as shown in FIG. The first image is held in storage means such as the image memory 130 by the first imaging storage unit 132 (step S102). This first image becomes an image having a smaller image size than the size of the actual captured image by thinning-out processing or the like like a live view image.

続けて、フラッシュ160を発光する撮影である第二の撮像によって、図5のようなフラッシュ発光後のRGB画像信号からなる第二の画像が取得される(ステップS103)。第二の画像は、第二の撮像記憶部134によって画像メモリ130などの記憶手段に保持される(ステップS104)。   Subsequently, a second image made up of RGB image signals after flash emission as shown in FIG. 5 is acquired by the second imaging, which is shooting that emits light from the flash 160 (step S103). The second image is held in storage means such as the image memory 130 by the second imaging storage unit 134 (step S104).

マルチAWB処理部140のカラーバランス算出部144は、入力された画像信号からカラーバランスを算出する。カラーバランス算出部144は、フラッシュ非発光画像のRGB画像信号を色別(RGB別)に全画面分積算し、フラッシュ160が発光されていない環境光のみの場合のカラーバランスCBer(=R/G)、CBeb(=B/G)を算出する。同時に、環境光がなくフラッシュ光だけで撮像した場合のカラーバランスCBfr,CBfbを既知の値としてROMにあらかじめ保持しておいたものを、ROMから読み出す。   The color balance calculation unit 144 of the multi-AWB processing unit 140 calculates a color balance from the input image signal. The color balance calculation unit 144 integrates the RGB image signals of the flash non-emission image for each color (RGB) for the entire screen, and the color balance CBer (= R / G in the case of only the environmental light not emitted by the flash 160). ), CBeb (= B / G) is calculated. At the same time, the color balances CBfr and CBfb in the case where an image is picked up only with flash light without ambient light are previously stored in the ROM as known values and are read from the ROM.

図1は、本発明の実施形態に係る撮像装置100においての画像処理パイプラインのブロック図を示す。マルチAWB処理部140の入力値は、フラッシュ非発光時のRGB画像信号と、フラッシュ発光時のRGB画像信号になっており、出力値のホワイトバランスゲインは全画素数分のホワイトバランスゲインとなる。ホワイトバランス制御部126が、全画素において、画素単位でホワイトバランスゲインを適用する。   FIG. 1 is a block diagram of an image processing pipeline in an imaging apparatus 100 according to an embodiment of the present invention. The input values of the multi-AWB processing unit 140 are an RGB image signal when the flash is not emitted and an RGB image signal when the flash is emitted, and the white balance gain of the output value is the white balance gain corresponding to the total number of pixels. The white balance control unit 126 applies white balance gain in units of pixels in all pixels.

まずは、入力値となる画像メモリ130などの記憶手段に保持されたフラッシュ非発光時のRGB画像信号と、フラッシュ発光時のRGB画像信号を基に、画素単位の被写体輝度が算出される。画素単位の被写体輝度の算出は、図3のようにR,G,G,Bの四つの画素12を一組としたベイヤユニット14を1画素とみなすか、ベイヤ色補間(デモザイク)処理によって、ベイヤ画像におけるR,G,G,Bの四つの画素から各色(R,G,B)一つずつの画素を生成して行う。   First, the subject brightness in units of pixels is calculated based on the RGB image signal when the flash is not emitted and the RGB image signal when the flash is emitted, which is held in a storage unit such as the image memory 130 as an input value. As shown in FIG. 3, the calculation of the subject luminance in units of pixels is performed by regarding the Bayer unit 14 including the four pixels 12 of R, G, G, and B as one set, or by Bayer color interpolation (demosaic) processing. This is performed by generating one pixel of each color (R, G, B) from four pixels of R, G, G, B in the Bayer image.

次に、フラッシュ発光画像である第二の画像が、フラッシュ非発光画像である第一の画像と同一サイズに変更される(ステップS105)。第一の画像サイズへの変更は、画像間引き処理によって行われ、第三の画像が算出される。図4は、間引き処理を示す概念図である。図4の左図が間引き前の画像を示す。間引き処理とは、間引き前の画像を縦横2分の1に間引く場合、太線枠内の四つの画素のうち左上の画素22のみを抜き出し、右図のような画像とすることである。間引き処理は、間引き前の画像を縦横3分の1、4分の1に間引く場合でも同様の手順となる。   Next, the second image that is the flash emission image is changed to the same size as the first image that is the flash non-emission image (step S105). The change to the first image size is performed by the image thinning process, and the third image is calculated. FIG. 4 is a conceptual diagram showing the thinning process. The left figure of FIG. 4 shows the image before thinning. The thinning process is to extract only the upper left pixel 22 out of the four pixels in the thick line frame when thinning out the pre-thinning image in half in the vertical and horizontal directions, and to obtain an image as shown in the right figure. The thinning process is the same procedure even when thinning out the pre-thinned image by 1/3 of the vertical and horizontal directions.

第二の画像に対して間引き処理する際、フラッシュ非発光画像である第一の画像がどのように間引かれているかによって、間引き方法を変える必要がある。図4では、太線枠内の左上画素22を残すような間引きを行ったが、第一の画像の間引き方法が図4の太線枠内の画素すべての平均値とするような間引きの場合は、第三の画像も同様に平均値を算出するように間引きを行う必要がある。   When the thinning process is performed on the second image, it is necessary to change the thinning method depending on how the first image, which is a non-flash image, is thinned. In FIG. 4, thinning is performed so as to leave the upper left pixel 22 in the thick line frame. However, when the thinning method of the first image is an average value of all the pixels in the thick line frame in FIG. Similarly, the third image needs to be thinned so as to calculate the average value.

第一の画像、第三の画像の各画素について、マルチAWB処理部140が画素単位の被写体輝度値を算出する。算出式は以下の通りである。式1、式2において、Yは各画素の輝度値Yである。また、Gの信号値は、輝度値Yとほぼ同じ値になるため、輝度値Yの代わりにGの信号値を使用することも可能である。AEは、露出制御値を算出する適正AE算出部150が目標としている目標輝度信号値である。この計算で、画素単位で、第一の画像の第一の被写体輝度値BVlpと、第三の画像の第二の被写体輝度値BVspを求める。ここで、BVlpとBVspは対数で表した信号値であり、APEX値に単位系を揃えている。   For each pixel of the first image and the third image, the multi-AWB processing unit 140 calculates a subject luminance value in units of pixels. The calculation formula is as follows. In Equations 1 and 2, Y is the luminance value Y of each pixel. Further, since the G signal value is substantially the same as the luminance value Y, the G signal value can be used instead of the luminance value Y. AE is a target luminance signal value targeted by the appropriate AE calculation unit 150 that calculates the exposure control value. In this calculation, the first subject luminance value BVlp of the first image and the second subject luminance value BVsp of the third image are obtained in units of pixels. Here, BVlp and BVsp are logarithmic signal values, and the unit system is aligned with the APEX value.

Figure 0005566679
Figure 0005566679
Figure 0005566679
Figure 0005566679

この時、図6に示すような第一の画像を撮影するときの露光制御値と、図5に示すような第二の画像を撮影するときの露光制御値が一致していない場合は、各露光制御値の差分を考慮する。露光制御値には式3の関係がある。ここでTVはシャッタースピード、AVは絞り値、SVは感度、BVは被写体輝度となり、それぞれAPEX値で表現されている。   At this time, when the exposure control value when shooting the first image as shown in FIG. 6 and the exposure control value when shooting the second image as shown in FIG. Consider differences in exposure control values. The exposure control value has the relationship of Equation 3. Here, TV is the shutter speed, AV is the aperture value, SV is the sensitivity, and BV is the subject brightness, which are expressed as APEX values.

Figure 0005566679
Figure 0005566679

フラッシュ非発光時のTV、AV、SVから算出される被写体輝度値BVを第一の露光制御値BVl、フラッシュ発光時のTV、AV、SVから算出される被写体輝度値BVを第二の露光制御値BVsとし、それぞれ式3により求める。第一の画像の場合、それぞれTVl、AVl、SVlとし式4のように、第二の画像の場合、それぞれTVs、AVs、SVsとし式5のようになる。   The subject brightness value BV calculated from the TV, AV, and SV when the flash is not emitted is the first exposure control value BV1, and the subject brightness value BV calculated from the TV, AV, and SV when the flash is emitted is the second exposure control. A value BVs is obtained by Equation 3. In the case of the first image, TVl, AVl, and SVl are set as shown in Formula 4, and in the case of the second image, TVs, AVs, and SVs are set as shown in Formula 5, respectively.

Figure 0005566679
Figure 0005566679
Figure 0005566679
Figure 0005566679

式4と式5から求めたBVlとBVsの差分BVdiffを、式6により求める。この時、第一の画像と第二の画像の露光制御値が一致している場合は、差分BVdiffは0となる。   The difference BVdiff between BVl and BVs obtained from Equation 4 and Equation 5 is obtained by Equation 6. At this time, if the exposure control values of the first image and the second image match, the difference BVdiff is zero.

Figure 0005566679
Figure 0005566679

このようにして求めた画素単位の第一の画像の第一の被写体輝度値BVlpと、露光制御値の差分BVdiffを考慮して、フラッシュ非発光被写体輝度差分BVlpdiffを式7により求める。図6の適正露光で撮影されたフラッシュ非発光画像に対し、式7の計算を適用すると、図7のように画像全体に適正な明るさとなった画像となる。   In consideration of the first subject luminance value BVlp of the first image in the pixel unit thus obtained and the difference BVdiff between the exposure control values, the flash non-luminous subject luminance difference BVlpdiff is obtained by Expression 7. When the calculation of Expression 7 is applied to the flash non-light-emitting image photographed with the appropriate exposure of FIG. 6, the image has an appropriate brightness as shown in FIG.

Figure 0005566679
Figure 0005566679

画素単位の第三の画像の第二の被写体輝度値BVspと、画素単位のフラッシュ非発光被写体輝度差分BVlpdiffとの差分を、式8によって、マルチAWB処理部140がフラッシュ発光画像被写体輝度差分BVdiffpを求める。   The multi-AWB processing unit 140 calculates the flash emission image subject luminance difference BVdiffp by the difference between the second subject luminance value BVsp of the third image in pixel unit and the flash non-emission subject luminance difference BVlpdiff in pixel unit by Expression 8. Ask.

Figure 0005566679
Figure 0005566679

式8で求めたBVdiffpからフラッシュ反射量算出部141が、フラッシュ発光画像である第三の画像の各画素の第一のフラッシュ反射量を求める(ステップS106)。第三の画像の光量Lfは式9のようになる。   The flash reflection amount calculation unit 141 calculates the first flash reflection amount of each pixel of the third image, which is the flash emission image, from the BVdiffp calculated by Expression 8 (step S106). The light quantity Lf of the third image is as shown in Equation 9.

Figure 0005566679
Figure 0005566679

第三の画像の光量Lfから、フラッシュ非発光画像である第一の画像における環境光量を1とした時の第一のフラッシュ反射量(Ratio)を求めると式10のようになる。そして、第三の画像の全ての画素について第一のフラッシュ反射量を算出する(ステップS107)。   From the light amount Lf of the third image, the first flash reflection amount (Ratio) when the environmental light amount in the first image which is a flash non-light-emitting image is 1 is obtained as shown in Expression 10. Then, the first flash reflection amount is calculated for all the pixels of the third image (step S107).

Figure 0005566679
Figure 0005566679

第三の画像の各画素の輝度値と、式10で求めた第一のフラッシュ反射量に基づいて、第一のフラッシュ反射量補間部142が補間を行い、第三の画像の各画素について、第二のフラッシュ反射量を求める(ステップS108、S109)。なお、各画素のGの信号値は輝度値とほぼ同じ値になるため、輝度値の代わりにGの信号値を使用することも可能である。第一のフラッシュ反射量補間部142が補間を行って第二のフラッシュ反射量を算出する目的は、そもそも第一の画像と第三の画像は、撮像のタイミングが同時ではないためブレなどの影響により、ずれている可能性があり、そのずれによって間違った第一のフラッシュ反射量を算出している可能性があるためである。周辺画素の値から補間することによって、ずれの影響を軽減することができる。   Based on the luminance value of each pixel of the third image and the first flash reflection amount obtained by Expression 10, the first flash reflection amount interpolation unit 142 performs interpolation, and for each pixel of the third image, A second flash reflection amount is obtained (steps S108 and S109). Since the G signal value of each pixel is almost the same as the luminance value, it is also possible to use the G signal value instead of the luminance value. The purpose of the first flash reflection amount interpolation unit 142 to calculate the second flash reflection amount by performing the interpolation is that the first image and the third image are not affected by blurring because the timing of imaging is not simultaneous. This is because there is a possibility that the first flash reflection amount is erroneously calculated due to the deviation. By interpolating from the values of the surrounding pixels, the effect of deviation can be reduced.

ここで、図8において第三の画像における補間対象画素をC55とすると、上下左右の画素C15、C95、C51、C59を補間元の画素とする。この時、補間対象画素から1画素離れた画素を補間元の画素としたが、隣り合う画素でも2画素以上離れていてもいい。   Here, if the interpolation target pixel in the third image in FIG. 8 is C55, the upper, lower, left, and right pixels C15, C95, C51, and C59 are set as interpolation source pixels. At this time, a pixel that is one pixel away from the interpolation target pixel is used as an interpolation source pixel, but two or more pixels may be adjacent to each other.

式10などから補間元の画素の輝度値Y1、Y2と第一のフラッシュ反射量Ratio1、Ratio2が既知であり、また、補間対象画素Yの輝度値も既知である。この補間の概念図は図9のようになる。これらの値から式11において第三の画像の補間対象画素の第二のフラッシュ反射量を求める。   The luminance values Y1 and Y2 of the interpolation source pixel and the first flash reflection amounts Ratio1 and Ratio2 are known from the equation 10 and the like, and the luminance value of the interpolation target pixel Y is also known. A conceptual diagram of this interpolation is as shown in FIG. From these values, the second flash reflection amount of the interpolation target pixel of the third image is obtained in Expression 11.

Figure 0005566679
Figure 0005566679

式11は2点間の補間となるため、上下方向のフラッシュ反射量Ratio_vと左右方向のフラッシュ反射量Ratio_hをそれぞれ式11により求め、第二のフラッシュ反射量Ratio_resultを式12のように平均値として算出する。   Since Equation 11 is an interpolation between two points, the flash reflection amount Ratio_v in the vertical direction and the flash reflection amount Ratio_h in the left-right direction are respectively obtained by Equation 11, and the second flash reflection amount Ratio_result is obtained as an average value as shown in Equation 12. calculate.

Figure 0005566679
Figure 0005566679

また、式12のように平均値を算出するのではなく、全画素について上下方向の補間を行った後に、左右方向の補間を行うというように、上下方向と左右方向の補間を分離してもいい。   Further, instead of calculating the average value as shown in Equation 12, the vertical direction and the horizontal direction interpolation may be separated by performing the horizontal direction interpolation after performing the vertical direction interpolation for all pixels. Good.

上記のような補間計算を行えば、図10のように補間対象画素A〜Eが補間元画素1、2間に複数あり、補間対象画素の輝度値が滑らかに推移する場合でも、また被写体にエッジがあるような色温度差の大きい境界が発生する場合でも適切に補間し、フラッシュ反射量を適切に算出することができる。   If the interpolation calculation as described above is performed, even when there are a plurality of interpolation target pixels A to E between the interpolation source pixels 1 and 2 as shown in FIG. 10 and the luminance value of the interpolation target pixel changes smoothly, Even when a boundary having a large color temperature difference such as an edge occurs, it is possible to appropriately interpolate and appropriately calculate the flash reflection amount.

次に、第三の画像の画像サイズから第二の画像の画像サイズへ拡大を行う。図11のように、上下左右方向の画素を参照し、第二の画像に基づいて既知の間引かれた画素の輝度値から、式11、式12を用いて第二のフラッシュ反射量補間部143が補間を行う(ステップS110)。このようにして第二の画像の画像サイズの全画素について補間を行い、第三のフラッシュ反射量を算出する(ステップS111)。   Next, enlargement is performed from the image size of the third image to the image size of the second image. As shown in FIG. 11, the second flash reflection amount interpolating unit is referred to by using Expressions 11 and 12 from the luminance values of pixels that are thinned out based on the second image with reference to the pixels in the vertical and horizontal directions. 143 performs interpolation (step S110). In this way, interpolation is performed for all pixels of the image size of the second image, and the third flash reflection amount is calculated (step S111).

この第三のフラッシュ反射量を基にカラーバランス算出部144が、フラッシュ光のカラーバランス(CBf)と環境光のカラーバランス(CBe)を線形補間し、対象画素のカラーバランス(CB)を求める(ステップS112)。カラーバランスCBはR、Bそれぞれ個別に求める。   Based on the third flash reflection amount, the color balance calculation unit 144 linearly interpolates the color balance (CBf) of the flash light and the color balance (CBe) of the ambient light to obtain the color balance (CB) of the target pixel ( Step S112). The color balance CB is obtained separately for each of R and B.

Figure 0005566679
Figure 0005566679

式13で求めたRとBのカラーバランスから式14によって、ホワイトバランスゲイン算出部145が対象画素のホワイトバランスゲイン(WBGainR、WBGainB)を算出する(ステップS113)。   The white balance gain calculation unit 145 calculates the white balance gain (WBGainR, WBGainB) of the target pixel according to Expression 14 from the R and B color balance obtained in Expression 13 (Step S113).

Figure 0005566679
Figure 0005566679

式13、式14を全画素について行うことで(ステップS114)、フラッシュ非発光画像とフラッシュ発光画像の画像サイズが違う場合でも、フラッシュ光と環境光が混在しているシーンについて適切なホワイトバランスゲインを画素単位に求めることができる。   By performing Expression 13 and Expression 14 for all the pixels (step S114), an appropriate white balance gain is obtained for a scene in which flash light and ambient light are mixed even when the image size of the flash non-light-emitting image and the flash light-emitting image are different. Can be obtained in pixel units.

すべての画素のホワイトバランスゲインを算出した後に、ホワイトバランス制御部126によってフラッシュ発光画像の該当画素にホワイトバランスゲインを適用することで、適切なホワイトバランス処理を行うことができる。   After calculating the white balance gain of all the pixels, the white balance control unit 126 applies the white balance gain to the corresponding pixel of the flash emission image, so that an appropriate white balance process can be performed.

従来は、フラッシュ非発光画像とフラッシュ発光画像の画像サイズが違っていた場合に、適正なホワイトバランスゲインを算出できない問題があった。一方、本実施形態では、画像サイズの違うフラッシュ非発光画像でも、画素の輝度値を基に補間することで、環境光とフラッシュ光が混在されたシーンに対しても画素単位で適切なホワイトバランスゲインを算出することが可能となる。   Conventionally, there has been a problem that an appropriate white balance gain cannot be calculated when the image sizes of the non-flash image and the flash image are different. On the other hand, according to the present embodiment, even in a non-flash light image having a different image size, an appropriate white balance can be obtained for each pixel even in a scene in which ambient light and flash light are mixed by performing interpolation based on the luminance value of the pixel. The gain can be calculated.

即ち、ライブビュー画像等の画素数の少ないフラッシュ非発光時の画像と、画素数が多いフルサイズの本撮影画像であるフラッシュ発光時の画像とを比較し、画素単位に適切なホワイトバランスゲインを算出する方法において、間引かれている画素について適切に補間を行うことによって、画像全体を適切なホワイトバランスに調整することができる。   In other words, an image without flash, such as a live view image, with a small number of pixels is compared with an image with flash, which is a full-size main image with a large number of pixels, and an appropriate white balance gain is set for each pixel. In the calculation method, the entire image can be adjusted to an appropriate white balance by appropriately interpolating the thinned pixels.

以上、添付図面を参照しながら本発明の好適な実施形態について詳細に説明したが、本発明はかかる例に限定されない。本発明の属する技術の分野における通常の知識を有する者であれば、特許請求の範囲に記載された技術的思想の範疇内において、各種の変更例または修正例に想到し得ることは明らかであり、これらについても、当然に本発明の技術的範囲に属するものと了解される。   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.

100 撮像装置
102 レンズ
104 絞り
106 シャッター
108 CCDイメージセンサー
110 信号処理部
112 前処理部
114 後処理部
116 RGB→YCC変換部
118 データ圧縮部
120 メモリーカード接続部
122 メモリーカード
124 AE評価値算出部
126 ホワイトバランス制御部
130 画像メモリ
132 第一の撮像記憶部
134 第二の撮像記憶部
140 マルチAWB処理部
141 フラッシュ反射量算出部
142 第一のフラッシュ反射量補間部
143 第二のフラッシュ反射量補間部
144 カラーバランス算出部
145 ホワイトバランスゲイン算出部
150 適正AE算出部
152 露光制御部
160 フラッシュ
DESCRIPTION OF SYMBOLS 100 Imaging device 102 Lens 104 Aperture 106 Shutter 108 CCD image sensor 110 Signal processing unit 112 Preprocessing unit 114 Postprocessing unit 116 RGB → YCC conversion unit 118 Data compression unit 120 Memory card connection unit 122 Memory card 124 AE evaluation value calculation unit 126 White balance control unit 130 Image memory 132 First imaging storage unit 134 Second imaging storage unit 140 Multi-AWB processing unit 141 Flash reflection amount calculation unit 142 First flash reflection amount interpolation unit 143 Second flash reflection amount interpolation unit 144 Color balance calculation unit 145 White balance gain calculation unit 150 Proper AE calculation unit 152 Exposure control unit 160 Flash

Claims (9)

間引き処理によって画素数が少ないフラッシュ非発光時の第一の画像を取得し、前記第一の画像より画素数が多いフラッシュ発光時の第二の画像を取得する撮像部と、
前記第二の画像が前記第一の画像のサイズと同一となるように前記第二の画像に対して間引き処理し第三の画像を取得する画像間引き部と、
取得された前記第一の画像の全画素について第一の被写体輝度を算出し、取得された前記第三の画像の全画素について第二の被写体輝度を算出する被写体輝度算出部と、
画素毎の前記第一の被写体輝度と、画素毎の前記第二の被写体輝度との差分である被写体輝度差分を全画素について算出する被写体輝度算出部と、
前記被写体輝度差分から画素単位に第一のフラッシュ反射量を算出するフラッシュ反射量算出部と、
前記第三の画像の画素単位の輝度値を使用して、画素毎の前記第一のフラッシュ反射量に対して、前記第一の画像と前記第三の画像の位置ずれの影響を軽減する補間処理をして第二のフラッシュ反射量を算出する第一のフラッシュ反射量補間部と、
前記第二の画像の画素単位の輝度値を使用して、画素毎の前記第二のフラッシュ反射量に対して、前記第三の画像を前記第二の画像のサイズに拡大する補間処理をして第三のフラッシュ反射量を算出する第二のフラッシュ反射量補間部と、
前記第三のフラッシュ反射量から画素単位にホワイトバランスゲインを算出するホワイトバランスゲイン算出部と
を備える、撮像装置。
An imaging unit that acquires a first image at the time of flash non-emission with a small number of pixels by thinning processing, and acquires a second image at the time of flash emission that has more pixels than the first image;
An image thinning unit that performs a thinning process on the second image so as to obtain a third image so that the second image has the same size as the first image;
A subject brightness calculation unit that calculates a first subject brightness for all pixels of the acquired first image, and calculates a second subject brightness for all pixels of the acquired third image;
A subject brightness calculator that calculates a subject brightness difference for all pixels, which is a difference between the first subject brightness for each pixel and the second subject brightness for each pixel;
A flash reflection amount calculation unit for calculating a first flash reflection amount in pixel units from the subject luminance difference;
Interpolation that reduces the influence of misalignment between the first image and the third image with respect to the first flash reflection amount for each pixel using the luminance value of the third image in units of pixels. A first flash reflection amount interpolating unit for processing and calculating a second flash reflection amount;
Using the luminance value in pixel units of the second image, interpolation processing is performed to enlarge the third image to the size of the second image with respect to the second flash reflection amount for each pixel. A second flash reflection amount interpolation unit for calculating the third flash reflection amount,
An image pickup apparatus comprising: a white balance gain calculation unit that calculates a white balance gain for each pixel from the third flash reflection amount.
前記ホワイトバランスゲインを前記第二の画像の全画素に画素単位で適用して、画素単位でホワイトバランスを制御するホワイトバランス制御部を更に備える、請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, further comprising a white balance control unit configured to apply the white balance gain to all pixels of the second image in units of pixels and control white balance in units of pixels. 被写体から受光した光に基づいて、フラッシュを発光せずに撮影して取得される第一の画像の明るさが適正となる第一の露光制御値と、前記フラッシュを発光して撮影して取得される第二の画像の明るさが適正となる第二の露光制御値を算出する露光制御値算出部と、
前記第一の露光制御値と前記第二の露光制御値との差分である露光制御値差分を算出する露光制御値差分算出部と
を更に備え、
前記撮像部は、前記第一の露光制御値に基づいて撮影し前記第一の画像を取得し、前記第二の露光制御値に基づいて撮影し前記第二の画像を取得し、
前記被写体輝度算出部は、前記露光制御値差分と、画素毎の前記第一の被写体輝度と、画素毎の前記第二の被写体輝度との差分である被写体輝度差分を全画素について算出する、請求項1又は2に記載の撮像装置。
Based on the light received from the subject, the first exposure control value at which the brightness of the first image obtained by photographing without emitting the flash is appropriate, and obtained by photographing by emitting the flash An exposure control value calculation unit that calculates a second exposure control value at which the brightness of the second image to be set is appropriate,
An exposure control value difference calculating unit that calculates an exposure control value difference that is a difference between the first exposure control value and the second exposure control value;
The imaging unit captures the first image by capturing based on the first exposure control value, acquires the second image by capturing based on the second exposure control value,
The subject luminance calculation unit calculates, for all pixels, a subject luminance difference that is a difference between the exposure control value difference, the first subject luminance for each pixel, and the second subject luminance for each pixel. Item 3. The imaging device according to Item 1 or 2.
前記第一の露光制御値と前記第二の露光制御値は、前記露光制御値算出部によって個別に算出され、前記第一の露光制御値と前記第二の露光制御値が一致する必要がない、請求項に記載の撮像装置。 The first exposure control value and the second exposure control value are individually calculated by the exposure control value calculation unit, and the first exposure control value and the second exposure control value do not need to match. The imaging device according to claim 3 . 前記撮像部は、前記露光制御値算出部によって算出された前記第一の露光制御値のうち、絞り値を一致させた前記第二の露光制御値で撮影し前記第二の画像を取得する、請求項3または4に記載の撮像装置。 The imaging unit captures the second exposure control value obtained by matching the aperture value among the first exposure control values calculated by the exposure control value calculation unit, and acquires the second image; The imaging device according to claim 3 or 4 . 前記フラッシュ反射量算出部によって算出された前記第一のフラッシュ反射量に基づいて、環境光のカラーバランスとフラッシュ光のカラーバランスを線形補間し、対象画素のカラーバランスを算出するカラーバランス算出部を更に備え、
前記ホワイトバランスゲイン算出部は、前記カラーバランスに基づいて前記ホワイトバランスゲインを算出する、請求項1〜5のいずれか1項に記載の撮像装置。
Based on the first flash reflection amount calculated by the flash reflection amount calculation unit, a color balance calculation unit that linearly interpolates the color balance of ambient light and the color balance of flash light and calculates the color balance of the target pixel In addition,
The imaging device according to claim 1, wherein the white balance gain calculation unit calculates the white balance gain based on the color balance.
前記第一のフラッシュ反射量補間部は、中心に位置する補間対象となる画素の上下左右の補間元画素の輝度値と前記第一のフラッシュ反射量を基に、前記第二のフラッシュ反射量を算出する、請求項1〜6のいずれか1項に記載の撮像装置。   The first flash reflection amount interpolating unit calculates the second flash reflection amount based on the luminance values of the upper and lower interpolation pixels of the pixel to be interpolated at the center and the first flash reflection amount. The imaging device according to claim 1, wherein the imaging device is calculated. 前記中心に位置する補間対象となる画素と、前記上下左右の補間元画素のそれぞれとの距離は一定である、請求項7に記載の撮像装置。 The imaging apparatus according to claim 7, wherein a distance between a pixel to be interpolated located at the center and each of the upper , lower, left , and right interpolation source pixels is constant. 間引き処理によって画素数が少ないフラッシュ非発光時の第一の画像を取得し、前記第一の画像より画素数が多いフラッシュ発光時の第二の画像を取得するステップと、
前記第二の画像が前記第一の画像のサイズと同一となるように前記第二の画像に対して間引き処理し第三の画像を取得するステップと、
取得された前記第一の画像の全画素について第一の被写体輝度を算出し、取得された前記第三の画像の全画素について第二の被写体輝度を算出するステップと、
画素毎の前記第一の被写体輝度と、画素毎の前記第二の被写体輝度との差分である被写体輝度差分を全画素について算出するステップと、
前記被写体輝度差分から画素単位に第一のフラッシュ反射量を算出するステップと、
前記第三の画像の画素単位の輝度値を使用して、画素毎の前記第一のフラッシュ反射量に対して、前記第一の画像と前記第三の画像の位置ずれの影響を軽減する補間処理をして第二のフラッシュ反射量を算出するステップと、
前記第二の画像の画素単位の輝度値を使用して、画素毎の前記第二のフラッシュ反射量に対して、前記第三の画像を前記第二の画像のサイズに拡大する補間処理をして第三のフラッシュ反射量を算出するステップと、
前記第三のフラッシュ反射量から画素単位にホワイトバランスゲインを算出するステップと
を備える、撮像方法。
Acquiring a first image at the time of flash non-emission with a small number of pixels by thinning processing, and acquiring a second image at the time of flash emission having a larger number of pixels than the first image;
Thinning the second image so that the second image has the same size as the first image to obtain a third image;
Calculating a first subject brightness for all pixels of the acquired first image, and calculating a second subject brightness for all pixels of the acquired third image;
Calculating a subject brightness difference, which is a difference between the first subject brightness for each pixel and the second subject brightness for each pixel, for all pixels;
Calculating a first flash reflection amount in pixel units from the subject luminance difference;
Interpolation that reduces the influence of misalignment between the first image and the third image with respect to the first flash reflection amount for each pixel using the luminance value of the third image in units of pixels. Processing to calculate a second flash reflection amount;
Using the luminance value in pixel units of the second image, interpolation processing is performed to enlarge the third image to the size of the second image with respect to the second flash reflection amount for each pixel. Calculating a third flash reflection amount,
And a step of calculating a white balance gain in pixel units from the third flash reflection amount.
JP2009293474A 2009-12-24 2009-12-24 Imaging apparatus and imaging method Expired - Fee Related JP5566679B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2009293474A JP5566679B2 (en) 2009-12-24 2009-12-24 Imaging apparatus and imaging method
KR1020100127097A KR101710629B1 (en) 2009-12-24 2010-12-13 Image pickup apparatus and image pickup method
US12/977,900 US8717454B2 (en) 2009-12-24 2010-12-23 Image pickup apparatus and image pickup method for adjusting white balance to account for flash and external light sources

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009293474A JP5566679B2 (en) 2009-12-24 2009-12-24 Imaging apparatus and imaging method

Publications (2)

Publication Number Publication Date
JP2011135377A JP2011135377A (en) 2011-07-07
JP5566679B2 true JP5566679B2 (en) 2014-08-06

Family

ID=44347629

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009293474A Expired - Fee Related JP5566679B2 (en) 2009-12-24 2009-12-24 Imaging apparatus and imaging method

Country Status (2)

Country Link
JP (1) JP5566679B2 (en)
KR (1) KR101710629B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014120813A (en) * 2012-12-13 2014-06-30 Samsung R&D Institute Japan Co Ltd Image pickup device and image pickup method
JP2015192179A (en) * 2014-03-27 2015-11-02 リコーイメージング株式会社 White balance control device, imaging apparatus, and white balance control method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3540485B2 (en) * 1995-04-13 2004-07-07 株式会社リコー Electronic still camera
JP3838243B2 (en) * 2003-09-04 2006-10-25 ソニー株式会社 Image processing method, image processing apparatus, and computer program
JP2005167476A (en) * 2003-12-01 2005-06-23 Canon Inc White balance control apparatus
JP4735039B2 (en) * 2005-05-18 2011-07-27 カシオ計算機株式会社 White balance adjusting device, white balance adjusting method and program
JP5169318B2 (en) * 2007-09-18 2013-03-27 株式会社リコー Imaging apparatus and imaging method

Also Published As

Publication number Publication date
KR20110074440A (en) 2011-06-30
KR101710629B1 (en) 2017-02-27
JP2011135377A (en) 2011-07-07

Similar Documents

Publication Publication Date Title
EP2709355B1 (en) Imaging apparatus and control method
US8786679B2 (en) Imaging device, 3D modeling data creation method, and computer-readable recording medium storing programs
JP5743696B2 (en) Image processing apparatus, image processing method, and program
US8717454B2 (en) Image pickup apparatus and image pickup method for adjusting white balance to account for flash and external light sources
JP2009159496A (en) White balance control device, imaging apparatus using the same, and white balance control method
JP2007074163A (en) Imaging device and imaging method
JP2014033276A (en) Image processing device, image processing method and program
US8441552B2 (en) Photographing apparatus with improved white balance correction and method and recording medium
CN113691795A (en) Image processing apparatus, image processing method, and storage medium
JP6778602B2 (en) Image pickup device, image data generation method and image data generation program
JP5566680B2 (en) Imaging apparatus and imaging method
JP5566679B2 (en) Imaging apparatus and imaging method
JP2013141105A (en) Image processing device, electronic camera, and image processing program
JP5854716B2 (en) Image processing apparatus, image processing method, and program
JP6718256B2 (en) Image processing device, imaging device, control method thereof, and program
JP2005167476A (en) White balance control apparatus
KR102068747B1 (en) Photographing apparatus and method
JP6570311B2 (en) Image processing apparatus and image processing method
KR20110074417A (en) Image taking device and method and program for taking image therewith
JP2012134678A (en) Imaging apparatus and imaging method
JP6663223B2 (en) Image processing apparatus and method, and imaging apparatus
JP6616674B2 (en) Image processing apparatus and method, and imaging apparatus
JP2013090238A (en) Imaging device and white balance adjustment method
JP2017034536A (en) Image processing apparatus, image processing method, and program
JP6021885B2 (en) Image processing apparatus, image processing method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121213

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131220

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140128

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140423

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20140603

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140618

R150 Certificate of patent or registration of utility model

Ref document number: 5566679

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees