JP2016005105A - Imaging apparatus - Google Patents

Imaging apparatus Download PDF

Info

Publication number
JP2016005105A
JP2016005105A JP2014123875A JP2014123875A JP2016005105A JP 2016005105 A JP2016005105 A JP 2016005105A JP 2014123875 A JP2014123875 A JP 2014123875A JP 2014123875 A JP2014123875 A JP 2014123875A JP 2016005105 A JP2016005105 A JP 2016005105A
Authority
JP
Japan
Prior art keywords
image
white balance
strobe
balance control
control value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2014123875A
Other languages
Japanese (ja)
Inventor
福井 貴明
Takaaki Fukui
貴明 福井
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2014123875A priority Critical patent/JP2016005105A/en
Publication of JP2016005105A publication Critical patent/JP2016005105A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To turn both a main subject and a background to a proper hue in image combination processing, the main subject and the background being irradiated by another light source different from a stroboscopic light during stroboscope emission.SOLUTION: An imaging apparatus is configured to image a subject and to process an obtained image signal. The imaging apparatus includes: means for calculating a first white balance correction value corresponding to a stroboscopic light from a main exposure image during stroboscope emission; means for calculating a second white balance correction value corresponding to an external light from an image during non-stroboscope-emission; means for dividing an image into plural blocks; means for calculating a stroboscope component and an external light component of each block from luminance values of the main exposure image and a non-stroboscope-emission image; means for calculating a combination ratio of blocks on the basis of the stroboscope components and the external light components of blocks; and means for combining image data which are obtained by performing development using the first white balance correction value and the second white balance correction value, on the basis of the combination ratio.

Description

本発明は、撮像装置、特に色温度を可変できるストロボを搭載し、ホワイトバランス制御を用いて画像生成する撮像装置に関する。   The present invention relates to an imaging apparatus, and more particularly to an imaging apparatus that includes a strobe capable of changing a color temperature and generates an image using white balance control.

デジタルカメラやデジタルビデオカメラなどの、撮像素子を用いる撮像装置においては、撮像によって得られた画像の色調を調整するホワイトバランス制御機能を備えている。
ホワイトバランス制御には、あらかじめ白色被写体を撮像してホワイトバランス係数を求めておき、算出したホワイトバランス係数を画面全体に適用するマニュアルホワイトバランス制御と、撮像した画像から白色と思われる部分を自動検出し、画面全体の各色成分の平均値からホワイトバランス係数を求め、算出したホワイトバランス係数を画面全体に適用するオートホワイトバランス制御とがある。
An imaging apparatus using an imaging device such as a digital camera or a digital video camera has a white balance control function for adjusting the color tone of an image obtained by imaging.
For white balance control, a white object is imaged in advance to obtain the white balance coefficient, and the manual white balance control that applies the calculated white balance coefficient to the entire screen and the part that appears white from the captured image are automatically detected. Then, there is auto white balance control in which a white balance coefficient is obtained from an average value of each color component of the entire screen and the calculated white balance coefficient is applied to the entire screen.

ここで、従来のオートホワイトバランス制御について説明する。撮像素子から出力された信号はA/D変換によってデジタル化され、図2に示すように複数のブロックに分割される。各ブロックはR、G、Bの色画素で構成されており、ブロック毎に、例えば以下の算出式(1)により、色評価値(Cx[i]、Cy[i])を求める。
Cx[i]=(R[i]−B[i])/Y[i]×1024
Cy[i]=(R[i]+B[i]−2G[i])/Y[i]×1024 ・・・(1)
(ただし、iはブロックの番号、R[i],G[i],B[i]はブロックiに含まれるRGB画素の平均値、Y[i]=(R[i]+2G[i]+B[i]/4))
予め設定した白検出範囲に色評価値(Cx[i]、Cy[i])が含まれる場合は、そのブロックが白であると判定する。そして、そのブロックに含まれる色画素の積分値SumR、SumG、SumBを算出して、以下(2)式のようにホワイトバランス係数(WBCo_R,WBCo_G,WBCo_B)を算出する。
WBCo_R=SumY×1024/sumR
WBCo_G=SumY×1024/sumG ・・・(2)
WBCo_B=SumY×1024/sumB
ただし、SumY=(sumR+2×sumG+SumB)/4
しかし、このようなホワイトバランス制御においては、次のような問題があった。ストロボ発光シーンにおいて画像内にストロボ光と異なる光源が存在する場合、上記で算出したホワイトバランス係数を画面全体に適用してホワイトバランス制御を行うため、各光源を共に適正な色味とするホワイトバランス制御を行うことが困難であった。例えば、ストロボを発光しているシーンで環境光に電球色光源のような低色温度光源が存在する場合、ストロボ光が高色温度光源であるため、ストロボ光にホワイトバランスを合わせると低色温度光源にホワイトバランスが合わなくなってしまう。
Here, conventional auto white balance control will be described. The signal output from the image sensor is digitized by A / D conversion and divided into a plurality of blocks as shown in FIG. Each block is composed of R, G, and B color pixels, and color evaluation values (Cx [i], Cy [i]) are obtained for each block, for example, by the following calculation formula (1).
Cx [i] = (R [i] −B [i]) / Y [i] × 1024
Cy [i] = (R [i] + B [i] -2G [i]) / Y [i] × 1024 (1)
(Where i is a block number, R [i], G [i], and B [i] are average values of RGB pixels included in the block i, Y [i] = (R [i] + 2G [i] + B [I] / 4))
When the color evaluation value (Cx [i], Cy [i]) is included in the preset white detection range, it is determined that the block is white. Then, integral values SumR, SumG, and SumB of the color pixels included in the block are calculated, and white balance coefficients (WBCo_R, WBCo_G, and WBCo_B) are calculated as shown in the following equation (2).
WBCo_R = SumY × 1024 / sumR
WBCo_G = SumY × 1024 / sumG (2)
WBCo_B = SumY × 1024 / sumB
However, SumY = (sumR + 2 × sumG + SumB) / 4
However, such white balance control has the following problems. When there is a light source different from the flash light in the image in the flash lighting scene, the white balance coefficient calculated above is applied to the entire screen for white balance control. It was difficult to control. For example, if there is a low color temperature light source such as a light bulb color light source in the ambient light in a scene that is emitting a strobe light, the strobe light is a high color temperature light source. The white balance does not match the light source.

一方、低色温度光源にホワイトバランスを合わせた場合には、ストロボ光にホワイトバランスが合わなくなってしまう。また、両方の光源の中間にホワイトバランスを合わせてホワイトバランス制御を行ったとしても、両方の光源にホワイトバランスが合わず、ストロボ光で照射されている領域は青みを帯び、低色温度光源で照射されている領域は赤味を帯びるような色味となってしまう。   On the other hand, when the white balance is matched with the low color temperature light source, the white balance is not matched with the strobe light. Even if white balance control is performed by adjusting the white balance in the middle of both light sources, the white balance does not match both light sources, the area illuminated by the strobe light is bluish, and the low color temperature light source is used. The irradiated area has a reddish color.

このような課題に対して、特許文献1では、ストロボ発光画像とストロボ非発光画像を、任意の被写体領域ごとに比較してデータの比を求め、比の値によりストロボ光の寄与度を判定し、寄与度に応じてストロボ発光して露光させたときの映像データに対して領域ごとにホワイトバランス制御値を選択して、ホワイトバランス制御を行うとしている。特許文献2では、周囲の色温度を検出する色温度検出手段からの信号により発光色温度を制御することを特徴とするストロボ発光色温度制御方法が開示されている。   In order to deal with such a problem, in Patent Document 1, a strobe light emission image and a strobe non-light emission image are compared for each arbitrary subject area to obtain a data ratio, and the contribution of strobe light is determined based on the ratio value. The white balance control is performed by selecting a white balance control value for each region of the video data when the flash is emitted and exposed according to the contribution. Patent Document 2 discloses a strobe light emission color temperature control method characterized in that the light emission color temperature is controlled by a signal from color temperature detection means for detecting the ambient color temperature.

特許第3540485号公報Japanese Patent No. 3540485 特開昭63−261331号公報JP-A-63-261331

しかしながら、上述の特許文献1に開示された従来技術では、色温度の大きく異なる光源に対して処理を適応させると、WB係数の切り替わり部分に色味のトーンジャンプが発生する。また動いている被写体にはストロボ照射量の計算が複雑になるため正確に求めることができない。それらの場合には部分WBでの良好な画像取得が難しい。   However, in the conventional technique disclosed in Patent Document 1 described above, when processing is applied to light sources having greatly different color temperatures, a tone tone jump occurs at the WB coefficient switching portion. Moreover, since the calculation of the strobe irradiation amount is complicated for a moving subject, it cannot be obtained accurately. In those cases, it is difficult to obtain a good image in the partial WB.

また、特許文献2の色温度可変ストロボを使用する手法は、外光の色温度がストロボの色温度可変範囲外の場合、ストロボの照射された領域とそうでない領域でホワイトバランスが最適にならないという問題があった。   Further, in the technique using the color temperature variable strobe of Patent Document 2, when the color temperature of the external light is outside the color temperature variable range of the strobe, the white balance is not optimal in the area where the strobe is irradiated and the area where it is not. There was a problem.

上記目的を達成するために、本発明は、色温度を可変させて発光可能なストロボ制御手段と、前記ストロボ制御手段の発光した色温度に相当する制御情報から、ストロボ用のホワイトバランス制御値の算出を行う第1のホワイトバランス制御値算出手段と、周囲の色温度を検出することにより、外光用のホワイトバランス制御値の算出を行う、第2のホワイトバランス制御値算出手段と、前記ストロボ制御手段によるストロボの照射量を画像の領域毎に判定するストロボ照射量判定手段と、前記画像領域毎のストロボ照射量に応じて、前記第1のホワイトバランス制御値算出手段と前記第2のホワイトバランス制御値算出手段の結果から、画像領域毎に第3のホワイトバランス制御値の算出を行う第3のホワイトバランス制御値算出手段を有し、前記第3のホワイトバランス制御値を用いて画像生成することを特徴とする。   In order to achieve the above object, according to the present invention, a strobe control unit capable of emitting light with a variable color temperature and control information corresponding to the color temperature emitted by the strobe control unit are used to determine a white balance control value for the strobe. A first white balance control value calculating means for calculating; a second white balance control value calculating means for calculating a white balance control value for external light by detecting an ambient color temperature; and the strobe. Strobe irradiation amount determining means for determining the amount of strobe irradiation by the control means for each image area, the first white balance control value calculating means, and the second white according to the strobe irradiation amount for each image area. From the result of the balance control value calculation means, there is a third white balance control value calculation means for calculating the third white balance control value for each image area. , Characterized in that the image generated using the third white balance control value.

その際、外光用のホワイトバランス制御値とストロボ用ホワイトバランス制御値とを比較して、ホワイトバランス制御値の差分が所定の範囲にある場合には、画像領域毎にホワイトバランス制御を行い、前記差分が所定の範囲内にある場合には、画面内で共通のホワイトバランス処理を行い、その場合、外光用のホワイトバランス制御値またはストロボ用のホワイトバランス制御値のどちらか、またはそれらから求まる1つのホワイトバランス制御値を用いてホワイトバランス補正処理を行う。   At that time, the white balance control value for external light and the white balance control value for strobe are compared, and if the difference of the white balance control value is within a predetermined range, white balance control is performed for each image area, When the difference is within a predetermined range, common white balance processing is performed in the screen. In this case, either the white balance control value for external light or the white balance control value for strobe, or from them White balance correction processing is performed using one obtained white balance control value.

また、前記第3のホワイトバランス制御値算出手段は、被写体が動いている被写体である場合には、画像領域毎のホワイトバランス制御は実施しない。被写体が動いた領域に生じるストロボ照射量の推定誤差によって生じる、ホワイトバランスの補正間違いを起こさないようにでき、良好な画像を得ることができる。   Further, the third white balance control value calculation means does not perform white balance control for each image area when the subject is a moving subject. It is possible to prevent a white balance correction error caused by an estimation error of a strobe irradiation amount generated in an area where the subject has moved, and to obtain a good image.

また、ホワイトバランス制御値そのものを合成する方法以外にも、ストロボ用のホワイトバランス制御を行い画像生成する第1の画像生成手段と、周囲の色温度でのホワイトバランス係数算出し画像生成する第2の画像生成手段と、画像領域毎のストロボ照射量に応じて、前記第1の画像生成手段と前記第2の画像生成手段によって生成された画像から、画像領域毎に前記第1と第2の画像を合成する画像合成してもよい。   In addition to the method of synthesizing the white balance control value itself, a first image generating means for generating an image by performing white balance control for strobe, and a second image generating a white balance coefficient at the surrounding color temperature. The first and second image generation units for each image region from the images generated by the first image generation unit and the second image generation unit according to the image generation unit and the strobe irradiation amount for each image region. You may combine the image which synthesize | combines an image.

本発明によれば、ストロボ光を発光したシーンにおいて、主被写体と背景を共に適正な色味とする画像を生成し、ユーザーに好ましい画像を提供することが可能となる。   According to the present invention, it is possible to generate an image in which both the main subject and the background have appropriate colors in a scene that emits strobe light, and provide a preferable image to the user.

画像合成処理を示すフローチャートFlow chart showing image composition processing ブロック分割の例を示す図Diagram showing an example of block division 本発明の実施形態における撮像装置のブロック図The block diagram of the imaging device in the embodiment of the present invention 白検出範囲を示す図Diagram showing white detection range WB補正算出処理を示すフローチャートFlow chart showing WB correction calculation processing 撮影における時系列を示す図Diagram showing time series in shooting 駆動モードによる分光差分の補正例を示す図The figure which shows the example of correction | amendment of the spectral difference by a drive mode 被写体位置情報の切り出し算出例Example of cutout calculation of subject position information 色味残し処理を示すグラフGraph showing color-remaining processing 色温度と色評価値CxCyとの関係を明示した図A diagram clearly showing the relationship between the color temperature and the color evaluation value CxCy ストロボ色温度可変と部分ホワイトバランスの切り替えを示したブロック図Block diagram showing switching of strobe color temperature and partial white balance 画像合成処理のデータのフローを示したブロック図Block diagram showing the data flow of image composition processing ホワイトバランス係数の合成処理を行うデータのフローを示したブロック図Block diagram showing the flow of data for white balance coefficient composition processing ストロボの発光テーブルの一例を示した図Figure showing an example of the flash table ストロボの発光量と色温度との関係の一例を示した図Diagram showing an example of the relationship between the flash output and color temperature ストロボの制御フローを示したフローチャートFlow chart showing strobe control flow ストロボ色温度と発光量を決定するフローチャートFlow chart for determining strobe color temperature and light emission 画像相関による被写体動きを検出処理を行うフローチャートFlowchart for performing subject motion detection processing based on image correlation

以下に、本発明の好ましい実施の形態を、添付の図面に基づいて詳細に説明する。   Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

(実施例1)
図3は、本実施例の概略図である。図3において、301はCCDやCMOS等からなる固体撮像素子であり、その表面は例えばベイヤー配列のようなRGBカラーフィルタにより覆われ、カラー撮影が可能な構成となっている。
(Example 1)
FIG. 3 is a schematic diagram of this embodiment. In FIG. 3, reference numeral 301 denotes a solid-state imaging device made of a CCD, a CMOS, or the like, and its surface is covered with an RGB color filter such as a Bayer array so that color photography can be performed.

CPU314は画像全体が所定の輝度になるようなシャッター速度、絞り値を計算すると共に、合焦領域内にある被写体に合焦するようにフォーカスレンズの駆動量を計算し、CPU314で計算された露出値(シャッター速度、絞り値)およびフォーカスレンズの駆動量は鏡筒制御回路313に送られ、各値に基づいてそれぞれ鏡筒装置315が制御される。また、ストロボ発光制御を行う場合にも同様に、ストロボ発光量をCUP314にて計算をして、ストロボ発光装置316を所定の光量で発光させる。   The CPU 314 calculates the shutter speed and aperture value so that the entire image has a predetermined luminance, calculates the driving amount of the focus lens so as to focus on the subject in the focus area, and the exposure calculated by the CPU 314. The value (shutter speed, aperture value) and the driving amount of the focus lens are sent to the lens barrel control circuit 313, and the lens barrel device 315 is controlled based on each value. Similarly, when performing strobe light emission control, the strobe light emission amount is calculated by the CUP 314, and the strobe light emission device 316 emits light with a predetermined light amount.

303はホワイトバランス(WB)制御部であり、メモリ302に記憶された画像信号からの情報に基づいてWB補正値を算出し、算出したWB補正値を用いて、メモリ302に記憶された画像信号に対してWB補正を行う。なお、このWB制御部303の詳細構成およびWB補正値の算出方法については、後述する。   A white balance (WB) control unit 303 calculates a WB correction value based on information from the image signal stored in the memory 302, and uses the calculated WB correction value to store the image signal stored in the memory 302. WB correction is performed on. A detailed configuration of the WB control unit 303 and a method for calculating the WB correction value will be described later.

304はWB制御部303によりWB補正された画像信号が最適な色で再現されるように色ゲインをかけて色差信号R−Y、B−Yに変換する色マトリックス回路、305は色差信号R−Y、B−Yの帯域を制限するローパスフィルタ(LPF)回路、306はLPF回路305で帯域制限された画像信号の内、飽和部分の偽色信号を抑圧するCSUP(Chroma Supress)回路である。一方、WB制御部303によりWB補正された画像信号は輝度信号(Y)生成回路311にも出力されて輝度信号Yが生成され、生成された輝度信号Yに対してエッジ強調回路312にてエッジ強調処理が施される。   Reference numeral 304 denotes a color matrix circuit that converts the color difference signals RY and BY by applying color gain so that the image signal corrected by the WB control unit 303 by WB correction is reproduced in an optimum color. Reference numeral 305 denotes a color difference signal R-. A low-pass filter (LPF) circuit that limits the Y and BY bands, and 306 is a CSUP (Chroma Suppress) circuit that suppresses a false color signal in a saturated portion of the image signal band-limited by the LPF circuit 305. On the other hand, the image signal WB corrected by the WB control unit 303 is also output to the luminance signal (Y) generation circuit 311 to generate the luminance signal Y, and the edge enhancement circuit 312 performs edge processing on the generated luminance signal Y. Emphasis processing is performed.

CSUP回路306から出力される色差信号R−Y、B−Yと、エッジ強調回路312から出力される輝度信号Yは、RGB変換回路307にてRGB信号に変換され、ガンマ補正回路308にて階調補正が施される。その後、色輝度変換回路309にてYUV信号に変換され、さらに圧縮回路310にて圧縮されて、外部記録媒体または内部記録媒体に画像信号として記録される。   The color difference signals RY and BY output from the CSUP circuit 306 and the luminance signal Y output from the edge enhancement circuit 312 are converted into RGB signals by the RGB conversion circuit 307, and the gamma correction circuit 308 converts the gradation signals to RGB signals. Tone correction is applied. Thereafter, it is converted into a YUV signal by the color luminance conversion circuit 309, further compressed by the compression circuit 310, and recorded as an image signal on an external recording medium or an internal recording medium.

本実施例におけるストロボは、たとえばLEDストロボであり、RGBのフィルターをそれぞれのLEDの前部照射されるように配置しておき、それぞれのLEDを制御することで色温度を自由にコントロール可能である。またそれ以外の色温度の制御方法としては、高色温度と低色温度の光源に、それぞれのコンデンサーを有し、そのコンデンサーに充電する充電容量をコントロールすることで光源の色温度をコントロールすることでも可能であるし、それぞれの光源に対して電流や電圧の配分による色温度制御を行う方法や、発光時間そのものの時間量でコントロールすることも可能である。   The strobe in this embodiment is, for example, an LED strobe, and the color temperature can be freely controlled by controlling each LED by arranging RGB filters so that the front part of each LED is irradiated. . Another method of controlling the color temperature is to control the color temperature of the light source by having each capacitor in the light source of high color temperature and low color temperature and controlling the charging capacity charged to that capacitor. However, it is also possible to control the color temperature by the distribution of current and voltage for each light source, or by the amount of time of the light emission time itself.

どちらの手法においても、LEDを用いた光源では、複数の光源の色温度の範囲までは色温度の制御が可能であるが、その範囲外の色温度の光源を発光することはできない。   In both methods, a light source using an LED can control the color temperature up to a range of color temperatures of a plurality of light sources, but cannot emit a light source having a color temperature outside that range.

次に図3のWB制御部303におけるWB補正値算出方法について詳細に述べる。
まずはストロボ発光したときの第1のWB補正値算出方法について図5を用いて説明する。メモリ302に記憶された画像信号を読み出し、その画面を任意のm個のブロックに分割する(ステップS101)。そして、各ブロック(1〜m)毎に、画素値を各色に加算平均して色平均値(R[i]、G[i]、B[i]、)を算出し、式(1)を用いて色評価値(Cx[i]、Cy[i])を算出する(ステップS102)。
Cx[i]=(R[i]−B[i])/Y[i]×1024
Cy[i]=(R[i]+B[i]−2G[i])/Y[i]×1024
ただし、Y[i]=(R[i]+2G[i]+B[i])/4
次に、図4のような座標軸を持つグラフを用いて白検出を行う(ステップS103)。x座標(Cx)の負方向が高色温度被写体の白を撮影したときの色評価値を表し、正方向が低色温度被写体の白を撮影したときの色評価値を表す。またy座標(Cy)は光源の緑成分の度合いを意味しており、負方向になるにつれGreen成分が大きくなり、つまり蛍光灯であることを示している。
Next, a WB correction value calculation method in the WB control unit 303 in FIG. 3 will be described in detail.
First, a first WB correction value calculation method when strobe light is emitted will be described with reference to FIG. The image signal stored in the memory 302 is read, and the screen is divided into arbitrary m blocks (step S101). Then, for each block (1 to m), the pixel value is added and averaged to each color to calculate a color average value (R [i], G [i], B [i],). The color evaluation values (Cx [i], Cy [i]) are calculated by using them (step S102).
Cx [i] = (R [i] −B [i]) / Y [i] × 1024
Cy [i] = (R [i] + B [i] -2G [i]) / Y [i] × 1024
However, Y [i] = (R [i] + 2G [i] + B [i]) / 4
Next, white detection is performed using a graph having coordinate axes as shown in FIG. 4 (step S103). The negative direction of the x coordinate (Cx) represents a color evaluation value when white of a high color temperature subject is photographed, and the positive direction represents a color evaluation value when white of a low color temperature subject is photographed. Further, the y coordinate (Cy) means the degree of the green component of the light source, and the green component increases as it goes in the negative direction, that is, it indicates a fluorescent lamp.

図10に示したグラフおよび表は、黒体放射軸(以降、白軸と称する)であり、色温度とCxCy値との関係を示したものである。あらかじめ黒体放射軸上の既知の色温度光源にてカメラで画像データを取得し、CxCyを算出することで色温度とCxCy値との対応関係を明確にすることができる。もちろん色温度方向だでけではなく、前述の白色蛍光灯のグレーン方向やマゼンタ方向の光源に対しても同様にCxCy値との対応関係を明確にすることが可能である。また、前述したストロボの発光色温度に対応したCxCy値も取得しておくことで、ストロボの発光色温度がわかれば、そのストロボ光源に対するWB補正値を算出が可能である。   The graph and table shown in FIG. 10 are blackbody radiation axes (hereinafter referred to as white axes), and show the relationship between color temperature and CxCy value. The correspondence between the color temperature and the CxCy value can be clarified by acquiring image data with a camera with a known color temperature light source on the blackbody radiation axis in advance and calculating CxCy. Of course, not only the color temperature direction but also the light source in the grain direction and magenta direction of the above-described white fluorescent lamp can similarly clarify the correspondence relationship with the CxCy value. Further, by acquiring the CxCy value corresponding to the above-described flash emission color temperature, if the flash emission color temperature is known, the WB correction value for the flash light source can be calculated.

ステップS103では、ステップS102で算出したi番目のブロックの色評価値(Cx[i]、Cy[i])が、図4に示す予め設定した白検出範囲401に含まれるかどうかを判断する(ステップS103)。白検出範囲401は、ストロボ光が既知の光源であるため検出範囲を限定している。算出した色評価値(Cx[i]、Cy[i])がこの白検出範囲401に含まれる場合には(ステップS103でYES)そのブロックが白色であると判断して、そのブロックの色平均値(R[i]、G[i]、B[i])を積算していき(ステップS104)、含まれない場合には加算せずにステップS105に進む。このステップS103及びステップS104の処理は、式(3)により表すことができる。   In step S103, it is determined whether the color evaluation value (Cx [i], Cy [i]) of the i-th block calculated in step S102 is included in the preset white detection range 401 shown in FIG. Step S103). The white detection range 401 limits the detection range because the strobe light is a known light source. If the calculated color evaluation values (Cx [i], Cy [i]) are included in the white detection range 401 (YES in step S103), it is determined that the block is white, and the color average of the block is determined. The values (R [i], G [i], B [i]) are accumulated (step S104), and if not included, the process proceeds to step S105 without adding. The processing of step S103 and step S104 can be expressed by equation (3).

ここで、式(3)において、色評価値(Cx[i]、Cy[i])が白検出範囲(図4の401)に含まれる場合はSw[i]を1に、含まれない場合にはSw[i]を0とすることにより、ステップS103の判断により色評価値(R[i]、G[i]、B[i])加算を行うか、行わないかの処理を実質的に行っている。ステップS105では、すべてのブロックについて上記処理を行ったかどうかを判断し、未処理のブロックがあればステップS102に戻って上記処理を繰り返し、すべてのブロックの処理が終了していればステップS106に進む。   Here, in Expression (3), when the color evaluation value (Cx [i], Cy [i]) is included in the white detection range (401 in FIG. 4), Sw [i] is not included in 1. In this case, by setting Sw [i] to 0, the process of adding or not adding color evaluation values (R [i], G [i], B [i]) according to the determination in step S103 is substantially performed. Is going to. In step S105, it is determined whether or not the above process has been performed for all blocks. If there is an unprocessed block, the process returns to step S102 to repeat the above process, and if all the blocks have been processed, the process proceeds to step S106. .

ステップS106では、得られた色評価値の積分値(sumR1、SumG1、SumB1)から、以下の式(4)式を用いて、第1のWB補正値(WBCol_R1、WBCol_G1、WBCol_B1)を算出する。
WBCol_R1=sumY1×1024/sumR1
WBCol_G1=sumY1×1024/sumG1 ・・・(4)
WBCol_B1=sumY1×1024/sumB1
ただし、sumY1=(sumR1+2×sumG1+sumB1)/4
または、第1のWB補正値としてストロボ光のWB補正値を既知のものとしてあらかじめ設定してもよい。
In step S106, the first WB correction values (WBCol_R1, WBCol_G1, WBCol_B1) are calculated from the integrated values (sumR1, SumG1, SumB1) of the obtained color evaluation values using the following equation (4).
WBCol_R1 = sumY1 × 1024 / sumR1
WBCol_G1 = sumY1 × 1024 / sumG1 (4)
WBCol_B1 = sumY1 × 1024 / sumB1
However, sumY1 = (sumR1 + 2 × sumG1 + sumB1) / 4
Alternatively, the strobe light WB correction value may be set in advance as a known WB correction value.

次に、ストロボ非発光時の第2のWB補正値の算出方法について説明する。第2のWB補正値はストロボ非発光画像データより算出する。図6は撮影制御を時系列に並べた図を示すが、SW1前ではライブビュー画像を定期的に撮影し、SW1時にAFロックとAEロックを行う。SW2後にはテスト発光と本露光を行うが、テスト発光前に撮像される「外光」と表記されている時間に露光した画像データを、ここではストロボ非発光時の画像データとする。ストロボ非発光時の画像データは本露光後に露光した撮影画像データを用いてもよい。   Next, a method for calculating the second WB correction value when the flash is not emitted will be described. The second WB correction value is calculated from the non-flash image data. FIG. 6 is a diagram in which shooting control is arranged in time series. A live view image is periodically shot before SW1, and AF lock and AE lock are performed at SW1. Test light emission and main exposure are performed after SW2, and image data exposed before “test light” captured before the test light emission is image data when no strobe light is emitted. Image data that has been exposed after the main exposure may be used as image data when the flash is not emitted.

算出処理は上述の第1のWB補正値算出と同様に行う。第1のWB補正値算出処理と異なる点は、図4の白検出範囲402のように外光用の白検出範囲で処理する点である。これはストロボ光が既知の光源であるのに対し、外光は既知の光源ではないため、ストロボ発光時の白検出範囲401のように限定できないからである。白検出範囲402は、予め異なる光源下で白を撮影し、算出した色評価値をプロットしたものである。   The calculation process is performed in the same manner as the first WB correction value calculation described above. The difference from the first WB correction value calculation processing is that processing is performed in a white detection range for external light as in the white detection range 402 in FIG. This is because strobe light is a known light source, whereas external light is not a known light source, and thus cannot be limited to the white detection range 401 during strobe light emission. The white detection range 402 is obtained by photographing white under different light sources in advance and plotting the calculated color evaluation values.

この白検出範囲は撮影モードによって別設定できるものとする。第2のWB補正値は撮像駆動モードが異なる場合にも適応でき、例えば、過去に算出されたEVF(Electronic View Finder)のWB補正値を使用することができる。ただし、駆動モードにより分光差分が生じる場合は図7のようにΔCx、ΔCyを補正してWB補正値を算出する。   This white detection range can be set separately depending on the shooting mode. The second WB correction value can be applied even when the imaging drive mode is different. For example, an EVF (Electronic View Finder) WB correction value calculated in the past can be used. However, when a spectral difference occurs depending on the drive mode, ΔCx and ΔCy are corrected as shown in FIG. 7 to calculate a WB correction value.

ここでは、背景が電球色光源のような低色温度光源の場合に、シーンの雰囲気を考慮し色味を残すように第2のWB補正値を算出してもよい。例えば、図9に示すような処理を用い、第2のWB補正値の色温度が低い場合に色味を残すように制御することで電球色光源の赤味を残すような画像を生成することができる。   Here, when the background is a low color temperature light source such as a light bulb color light source, the second WB correction value may be calculated so as to leave the color in consideration of the atmosphere of the scene. For example, by using a process as shown in FIG. 9 and controlling the color tone to remain when the color temperature of the second WB correction value is low, an image that retains the red color of the light bulb color light source is generated. Can do.

続いて、画像合成処理について図1のフローチャートを用いて説明する。図1に示すように、第1のWB補正値と第2のWB補正値との差分が小さい場合や被写体の動きがある場合、撮像装置と被写体との距離が離れている場合には画像合成処理を行わず、通常のホワイトバランス制御を行う。なお、通常のホワイトバランス制御方法については後述する。これらの条件以外の場合には画像合成処理を行う。画像合成処理では、まず図1のステップS204で本露光時のストロボ発光画像から上記第1のWB補正値を用いて現像画像Yuv1を現像する。   Next, the image composition process will be described with reference to the flowchart of FIG. As shown in FIG. 1, image synthesis is performed when the difference between the first WB correction value and the second WB correction value is small, when there is movement of the subject, or when the distance between the imaging device and the subject is large. Normal white balance control is performed without processing. A normal white balance control method will be described later. In cases other than these conditions, image composition processing is performed. In the image composition process, first, in step S204 in FIG. 1, the developed image Yuv1 is developed from the strobe light emission image at the time of the main exposure using the first WB correction value.

次に、ステップS205で本露光時のストロボ発光画像から上記第2のWB補正値を用いて現像画像Yuv2を現像する。ステップS206では、本露光時のストロボ発光画像、ストロボ非発光画像、現像したYuv1、そして現像したYuv2をそれぞれnブロックに分割する。ステップS207では、ストロボ非発光画像から、ブロック(1〜n)ごとに画素値を各色に加算平均して色平均値(R2[i]、G2[i]、B2[i]、)を算出し、各ブロックの輝度値a[i]を算出する。各ブロックの輝度値a[i]の算出式は(6)式のようになる。   Next, in step S205, the developed image Yuv2 is developed using the second WB correction value from the strobe light emission image at the time of the main exposure. In step S206, the strobe light emission image, the strobe non-light emission image, the developed Yuv1 and the developed Yuv2 at the time of main exposure are each divided into n blocks. In step S207, the pixel values are added and averaged for each color for each block (1 to n) from the non-flash image to calculate a color average value (R2 [i], G2 [i], B2 [i],). The luminance value a [i] of each block is calculated. The formula for calculating the luminance value a [i] of each block is as shown in equation (6).

・・・(6)
算出した各ブロックの輝度値a[i]を各ブロックの外光成分とする。
ステップS208では、ストロボ非発光画像から各ブロックの輝度値a[i]を算出する処理と同様に、本露光時のストロボ発光画像から、ブロック(1〜n)ごとに、ブロック(1〜n)ごとに画素値を各色に加算平均して色平均値(R1[i]、G1[i]、B1[i]、)を算出し、各ブロックの輝度値b[i]を算出する。算出した各ブロックの輝度値b[i]から、対応するストロボ非発光画像の各ブロックの輝度値a[i]を引くことで、ブロックごとのストロボ成分c[i]を算出する。
c[i] = b[i] - a[i]
ステップS209では、それぞれ対応するブロックごとのストロボ成分c[i]と外光成分a[i]の比率を基に、Yuv1とYuv2を合成する際のブロックごとのMix率α[i]を算出する。
... (6)
The calculated luminance value a [i] of each block is used as the external light component of each block.
In step S208, as in the process of calculating the luminance value a [i] of each block from the non-flash image, blocks (1 to n) are obtained for each block (1 to n) from the flash image during the main exposure. For each pixel, the pixel value is added and averaged to each color to calculate the color average value (R1 [i], G1 [i], B1 [i]), and the luminance value b [i] of each block is calculated. By subtracting the luminance value a [i] of each block of the corresponding non-flash image from the calculated luminance value b [i] of each block, the strobe component c [i] for each block is calculated.
c [i] = b [i]-a [i]
In step S209, based on the ratio of the strobe component c [i] and the external light component a [i] for each corresponding block, the Mix rate α [i] for each block when combining Yuv1 and Yuv2 is calculated. .

ステップS210では、ブロックごとのMix率α[i]を用いてYuv1とYuv2を合成し、Yuv3を生成する。Yuv3における色評価値(Y3[i], u3[i], v3[i])はYuv1における色評価値(Y1[i], u1[i], v1[i])Yuv2における色評価値(Y2[i], u2[i], v2[i])を用いて(7)式のように算出する。   In step S210, Yuv1 and Yuv2 are synthesized using the mix rate α [i] for each block to generate Yuv3. The color evaluation values (Y3 [i], u3 [i], v3 [i]) in Yuv3 are the color evaluation values (Y1 [i], u1 [i], v1 [i]) in Yuv2, and the color evaluation values (Y2 in Yuv2) [I], u2 [i], v2 [i]) are used to calculate as in equation (7).

・・・(7)         ... (7)

ブロック境界部分の色味ずれを緩和するため、ステップS209で画素補間処理を行うことによりブロックごとのMix率α[i]から画素ごとのMix率α’[j]を算出してもよい。例えば、画素補間処理としてバイリニア補間を用い、ブロックごとのMix率α[i]から画素ごとのMix率α’[j]を算出する。このとき、ステップS210では、画素ごとのMix率α’[j]を用いてYuv1とYuv2を合成し、Yuv3を生成する。   In order to alleviate the color shift at the block boundary part, the pixel interpolation process may be performed in step S209 to calculate the mix rate α ′ [j] for each pixel from the mix rate α [i] for each block. For example, bilinear interpolation is used as the pixel interpolation process, and the Mix rate α ′ [j] for each pixel is calculated from the Mix rate α [i] for each block. At this time, in step S210, Yuv1 and Yuv2 are synthesized using the mix rate α ′ [j] for each pixel to generate Yuv3.

Yuv3における色評価値(Y3[j], u3[j], v3[j])はYuv1における色評価値(Y1[j], u1[j], v1[j])Yuv2における色評価値(Y2[j], u2[j], v2[j])を用いて(8)式のように算出する。   The color evaluation values (Y3 [j], u3 [j], v3 [j]) in Yuv3 are the color evaluation values in Yuv1 (Y1 [j], u1 [j], v1 [j]). The color evaluation values in Yuv2 (Y2 [J], u2 [j], v2 [j]) are used to calculate as in equation (8).

・・・(8)         ... (8)

また、ステップS210では、本露光時のストロボ発光画像におけるブロック輝度値に応じて、ブロックごとに画像合成処理を行うか行わないかの判断を行うことにより処理を可変にしてもよい。当該ブロックのブロック輝度値が低い場合や高い場合は当該ブロックに対して画像合成処理を行わず、後述する通常のホワイトバランス制御で算出するWB補正値を用いて画像現像処理を行う。当該ブロックのブロック輝度値がそれ以外の場合には、前述した画像合成処理と同様の処理を行う。   Further, in step S210, the processing may be made variable by determining whether or not to perform image composition processing for each block according to the block luminance value in the strobe light emission image at the time of main exposure. When the block luminance value of the block is low or high, image synthesis processing is not performed on the block, and image development processing is performed using a WB correction value calculated by normal white balance control described later. When the block luminance value of the block is other than that, the same processing as the image composition processing described above is performed.

続いて、通常のホワイトバランス制御方法について詳細に説明する。まず、前述のWB補正値を算出する処理と同様にして、第1、第2のWB補正値を算出する。続いて第1、第2のWB補正値のMix(加重加算)処理を行う。Mix(加重加算)処理は被写体に照射されている外光とストロボ光の照射比率によって加重加算を行う。   Next, a normal white balance control method will be described in detail. First, the first and second WB correction values are calculated in the same manner as the processing for calculating the WB correction value described above. Subsequently, Mix (weighted addition) processing of the first and second WB correction values is performed. In the Mix (weighted addition) process, weighted addition is performed according to the irradiation ratio of external light and strobe light applied to the subject.

照射比率を演算するための被写体領域切り出しについて説明する。テスト発光する前の画像データを取得し、このテスト発光前画像データか図8(b)に示すm×nのマトリックスで構成される輝度ブロックaを算出する。次にテスト発光前と同じ条件で、フラッシュのテスト発光を行い、テスト発光時データを取得し、同様にm×nのマトリックスで構成される輝度ブロックbを取得する。   The subject area cutout for calculating the irradiation ratio will be described. Image data before test light emission is acquired, and a luminance block a composed of this pre-light emission image data or an m × n matrix shown in FIG. 8B is calculated. Next, flash test light emission is performed under the same conditions as before the test light emission, data at the time of test light emission is acquired, and similarly, a luminance block b configured by an m × n matrix is acquired.

これら、輝度ブロックa及びbは、撮像装置に備えるRAM等に一時的に格納される。被写体画像の背景画像は、テスト発光前画像データと、テスト発光時データで略変化がないものとする。したがって、この2つの輝度ブロックaと輝度ブロックbの差分データは、フラッシュのテスト発光時における被写体領域の反射光となり、その差分データより被写体位置情報cを取得することができる。   The luminance blocks a and b are temporarily stored in a RAM or the like provided in the imaging device. The background image of the subject image is assumed to be substantially unchanged between the pre-test light emission image data and the test light emission data. Therefore, the difference data between the two luminance blocks a and b becomes the reflected light of the subject area during the flash test light emission, and the subject position information c can be obtained from the difference data.

このように算出された被写体位置情報から被写体位置ブロックを取得し、取得したブロックの本露光時輝度(Y1)とストロボ非発光時輝度(Y2)を算出する。ここで本露光時と非発光時の露光条件が異なる場合は露光条件を揃えてY1、Y2を算出する。このように算出されたY1,Y2の比を被写体に照射された光量比として、第1、第2のWB補正値を用いて光量比によるMix処理(加重加算)を行う。このように得られたWB補正値をWB制御部303でWB処理に使用するWB補正値と決定し、画像現像手段により画像を現像し最終画像データとする。 図12は本実施例における合成処理のフローを示したブロック図である。撮影指示がなされると、SW2押下直前のEVF画像102と本露光画像100も保存する。保存された本露光時の画像は、リサイズ処理ブロック101にてEVF画像相当のサイズにリサイズされ、その後ブロック積分を算出する。同様にEVF画像もブロック積分値を算出する。その際、ブロックの積分領域はEVFと本露光画像では画角に対して同一の設定とする。   The subject position block is acquired from the subject position information thus calculated, and the main exposure brightness (Y1) and strobe non-flash brightness (Y2) of the acquired block are calculated. If the exposure conditions at the time of main exposure and non-light emission are different, Y1 and Y2 are calculated by aligning the exposure conditions. Mix processing (weighted addition) based on the light amount ratio is performed using the first and second WB correction values with the ratio of Y1 and Y2 calculated in this way as the light amount ratio irradiated to the subject. The WB correction value obtained in this way is determined as the WB correction value to be used for the WB processing by the WB control unit 303, and the image is developed by the image developing unit to obtain final image data. FIG. 12 is a block diagram showing the flow of the synthesis process in this embodiment. When a shooting instruction is given, the EVF image 102 and the main exposure image 100 immediately before the SW2 is pressed are also saved. The stored image at the time of the main exposure is resized to a size equivalent to the EVF image in the resizing processing block 101, and then the block integration is calculated. Similarly, the block integral value is calculated for the EVF image. At that time, the integration area of the block is set to be the same with respect to the angle of view in the EVF and the main exposure image.

103にて、本露光時とEVF時の感度・絞り値・シャッター速度との関係から本露光とEVF撮影時の露光量差分を計算し、ブロック積分値が同一の露光量になるようにEVF画像のブロック積分値の換算処理を行う。104では画像領域毎にストロボ照射量の演算を行う。105ではストロボ照射量に応じた画像合成比率の決定を行い、106ではブロック毎の合成比率を本露光画像と同じサイズまで拡大される。   At 103, an exposure amount difference between main exposure and EVF shooting is calculated from the relationship between sensitivity, aperture value, and shutter speed during main exposure and EVF, and an EVF image is obtained so that the block integration value becomes the same exposure amount. The conversion processing of the block integral value is performed. At 104, the strobe irradiation amount is calculated for each image area. In 105, the image composition ratio is determined in accordance with the strobe irradiation amount. In 106, the composition ratio for each block is enlarged to the same size as the main exposure image.

また、外光WB係数算出処理107ではEVF時の画像から外光WB係数の算出を行い、本露光画像に対してWB処理ブロック109にてWB乗算が行われ、現像処理ブロック113にて現像処理がおこなわれて外光用のYUV画像が出力される。   In the external light WB coefficient calculation processing 107, the external light WB coefficient is calculated from the EVF image, the WB multiplication is performed in the WB processing block 109 on the main exposure image, and the development processing is performed in the development processing block 113. And a YUV image for external light is output.

また、ストロボWB係数算出処理111では、ストロボの発光量情報110よりストロボ用WB係数を算出する。WB演算処理109にて、本露光画像に対してストロボWB処理が行われ、現像処理ブロック113で現像処理が行われ、ストロボ用YUV画像が出力される。   Also, in the strobe WB coefficient calculation process 111, a strobe WB coefficient is calculated from the strobe emission amount information 110. In the WB calculation process 109, a strobe WB process is performed on the main exposure image, a development process is performed in the development processing block 113, and a strobe YUV image is output.

これらのストロボ用YUV画像と外光用YUV画像を画像合成比率に従って画像合成処理114にて画像合成処理がなされる。   The strobe YUV image and the external light YUV image are subjected to image combining processing in the image combining processing 114 according to the image combining ratio.

図13は、図12とほぼ同様であるが、図12が現像処理後に画像を合成するに対して、図13では外光とストロボのWB係数を合成される点で異なり、画像合成処理114に変わって、画像領域毎に外光用WB係数とストロボようWB係数を合成する、WB係数合成処理201がなされ、そのWB係数を用いてWB処理119にてWB乗算されて現像処理113にて現像処理がなされる。   FIG. 13 is almost the same as FIG. 12, but differs from FIG. 12 in that the image is synthesized after the development processing, whereas FIG. 13 differs in that the external light and the WB coefficient of the strobe are synthesized. Instead, a WB coefficient synthesis process 201 is performed for synthesizing the external light WB coefficient and strobe WB coefficient for each image area. The WB coefficient is used for WB multiplication in the WB process 119 and developed in the development process 113. Processing is done.

図12のほうが各光源に最適な色処理パラメータを設定できる、色再現も含めた良好な画像が生成可能である。一方、図13では現像処理が2回行う必要がないため、演算時間や画像をためておくためのメモリの確保しておく必要がなく、システムリソースの節約が可能な手法である。   In FIG. 12, it is possible to generate a good image including color reproduction in which the optimum color processing parameter can be set for each light source. On the other hand, in FIG. 13, since the development process does not need to be performed twice, it is not necessary to secure a calculation time and a memory for storing images, and this is a technique that can save system resources.

図11は本実施例における、画像合成処理のフローを示したフローチャートである。撮影指示であるSW2が押下されるとS301では、最終ライブビュー時のホワイトバランス結果CxCyから、色温度を算出する。CxCy値が白軸上に位置しない場合には、Cxの値と色温度との関係で簡易的に算出することが可能である。それ以外にも白軸上へ垂線を引き白軸交点のCxCy値の値から色温度を算出してもよい。   FIG. 11 is a flowchart showing the flow of image composition processing in this embodiment. When the photographing instruction SW2 is pressed, in S301, the color temperature is calculated from the white balance result CxCy at the time of the final live view. When the CxCy value is not located on the white axis, it can be simply calculated based on the relationship between the Cx value and the color temperature. In addition, a perpendicular may be drawn on the white axis to calculate the color temperature from the value of the CxCy value at the intersection of the white axes.

S302では、露出値およびストロボの発光量および発光色温度を決定する。詳細は後述する。S303では、撮影動作を実施する。S304では、S303で決定されたストロボ発光色温度が外光の色温度と比較し、所定の範囲内に含まれているかを判定する。所定の範囲内に含まれる場合には、S306では通常のWB処理を行う。   In S302, the exposure value, the flash emission amount, and the emission color temperature are determined. Details will be described later. In S303, a photographing operation is performed. In S304, the strobe emission color temperature determined in S303 is compared with the color temperature of the external light to determine whether it is included in a predetermined range. If it falls within the predetermined range, a normal WB process is performed in S306.

S304で、所定の範囲内に含まれない場合には、S304の画像合成処理を実施する。ここでいう画像合成処理とは前述した被写体中のストロボ照射量に応じた画像合成処理である。S307では生成した画像を保存して終了する。   If it is not included in the predetermined range in S304, the image composition processing in S304 is performed. The image composition processing here is the image composition processing according to the strobe irradiation amount in the subject described above. In step S307, the generated image is saved and the process ends.

図16は本実施例における撮影露出条件の決定方法について詳細に説明を行ったブロック図である。S400でAE動作により、Tv値(AE_Tv)を決定する。具体的にはEVF動作中に、所定の撮影条件で撮像を行い、CCDRAWのデータをメモリに蓄える。その画像データを複数のブロックに分割し、そのブロックごとに平均輝度値を算出する。   FIG. 16 is a block diagram illustrating in detail a method for determining a shooting exposure condition in the present embodiment. In S400, the Tv value (AE_Tv) is determined by the AE operation. Specifically, during EVF operation, imaging is performed under predetermined imaging conditions, and CCD RAW data is stored in a memory. The image data is divided into a plurality of blocks, and an average luminance value is calculated for each block.

その後、各ブロックごとに加重加算平均値(Y_Ave)を算出する。その場合、中央重点の重みを付けて画面平均値を算出する中央重点測光を行ってもよいし、顔検出の結果に応じて被写体領域に重点的に重みを付けるなど、被写体に応じた評価測光をしてもよいし、単純に画面平均値を算出する平均測光を行ってもよいし、画面の一部のスポット領域のみAEを行うスポット測光を行ってもよい。その画面平均値とAEターゲット値(AETargetとの差分を段数換算し(DeltaAE)、下式に従ってBv値を決定する。
Bv=Av+Tv−Sv+DeltaAE・・・・・・・・(9)
ここで、DeltaAE=Log(Y_Ave/AETarget)/Log
次にBv値から、プログラム線図およびユーザー設定値に従って、絞りとシャッター速度と撮影感度を決定する。
Thereafter, a weighted average value (Y_Ave) is calculated for each block. In that case, you may perform center-weighted metering to calculate the screen average value with weighting of the center weight, or evaluation metering according to the subject, such as weighting the subject area according to the result of face detection. Alternatively, average photometry for simply calculating the screen average value may be performed, or spot photometry for performing AE only on a part of the spot area on the screen may be performed. The difference between the screen average value and the AE target value (AETarget) is converted into the number of stages (DeltaAE), and the Bv value is determined according to the following equation.
Bv = Av + Tv-Sv + DeltaAE (9)
Here, DeltaAE = Log (Y_Ave / AETarget) / Log
Next, from the Bv value, the aperture, shutter speed, and photographing sensitivity are determined according to the program diagram and the user setting value.

S401では、前記Bv値と逆光判定の結果からストロボを発光するか否かを決定する。たとえば、シャッター速度が1/40以下になった場合にストロボを発光してもよいし画面解析の結果、顔領域が暗いなど、逆光シーンと判別された場合にストロボを発光することを決定してもよい。ストロボが発光されない場合には、EF処理が終了となる。   In S401, it is determined whether or not to emit the strobe from the Bv value and the result of the backlight determination. For example, a strobe may be emitted when the shutter speed becomes 1/40 or less, and it is determined that a strobe is emitted when it is determined that the scene is backlit, such as when the face area is dark as a result of screen analysis. Also good. If the flash is not emitted, the EF process ends.

ストロボが発光されると判断されると、S402ではストロボ発光用の露出条件を決定する。AEで決定されたシャッター速度が、ストロボ同調速度外の場合には、ストロボ同調速度内にシャッター速度の制限を行ってもよいし、AEで決定した露出時間としてもよい。露出が変更になる場合には、式(9)が満たすようにAv値およびSv値を可変させプログラムシフトが行われる。   If it is determined that the strobe light is emitted, an exposure condition for strobe light emission is determined in S402. When the shutter speed determined by AE is outside the flash synchronization speed, the shutter speed may be limited within the flash synchronization speed, or the exposure time determined by AE may be used. When the exposure is changed, the program shift is performed by varying the Av value and the Sv value so that the expression (9) is satisfied.

S403では、S402で決定されたAv/Tv・Sv値からプリ発光用の露出条件を決定する。一般的なCCDの場合、プリ発光用の画像には、読み出し速度が速いセンサー駆動を行うため、画素加算および間引き率が大きい駆動を用いることがある。そのため本露光と追従できる感度が変わる場合も存在するため、感度変化分だけ露出を変更する必要がある。   In S403, the pre-flash exposure condition is determined from the Av / Tv · Sv value determined in S402. In the case of a general CCD, an image for pre-emission may be driven with a high pixel addition and thinning rate in order to perform sensor driving with a high readout speed. For this reason, there may be a case where the sensitivity that can follow the main exposure may change. Therefore, it is necessary to change the exposure by the sensitivity change.

またプリ発光を行う際の発光量の決定は、Bv値毎にあらかじめ決められている所定の発光量でもよいし、顔の大きさやAFの結果から、被写体距離を推定し、その被写体距離に応じたプリ発光量を決定してもよい。もちろんプリ発光の露出時間に収まる範囲で決定しなければならないことは言うまでもない。また、色温度可変可能なストロボの場合は、外光の色温度に応じて、ストロボの色温度を外光の色温度に近い色温度に設定を行う。   The pre-flash emission may be determined by using a predetermined flash amount determined in advance for each Bv value, or by estimating the subject distance from the face size or AF result, and depending on the subject distance. The pre-emission amount may be determined. Of course, it is needless to say that it must be determined within the range of the pre-flash exposure time. In the case of a strobe with variable color temperature, the color temperature of the strobe is set to a color temperature close to the color temperature of the external light according to the color temperature of the external light.

S404では、S403で決定された撮影条件でストロボ非発光状態で画像データを取得する。S405では、プリ発光を実際に行い画像を取得する。S406では、S404のストロボ発光を行った画像とS405ストロボ発光を行っていない画像のそれぞれブロック平均値の算出を行う。   In S404, image data is acquired in a non-flashing state under the shooting conditions determined in S403. In S405, pre-flash is actually performed to acquire an image. In S406, the block average value of each of the image that has been subjected to the strobe light emission in S404 and the image that has not been subjected to the S405 strobe light emission is calculated.

ストロボの発光の有無の2枚の画像の差分から、ストロボが到達したリターン値をブロックごとに算出し、画面内の測光方式に応じた重みを加重加算された輝度値(PreY)を算出する。同様にストロボ非発光の画像に足しても同様に加重加算平均した輝度値の算出を行う(NoFlash_Y)。S407ではストロボの発光量(DeltaEF)の算出を行う。より具体的には、S406のストロボの非発光の画像のブロックごとの輝度値に対して、
AETarget=α×PreY×ExpCrtGain_PreFlash+NoFlash_Y×ExpCrtGain_NoFlash・・・・・(10)
を満たすα値を算出する。
The return value reached by the strobe is calculated for each block from the difference between the two images indicating whether or not the strobe emits light, and the luminance value (PreY) obtained by weighting and adding the weight corresponding to the photometric method in the screen is calculated. Similarly, the luminance value obtained by adding the weighted average is similarly calculated even when the image is added to the non-flash image (NoFlash_Y). In step S407, the amount of light emitted from the strobe (Delta EF) is calculated. More specifically, with respect to the luminance value for each block of the non-light-emitting image of the strobe in S406,
AETarget = α × PreY × ExpCrtGain_PreFlash + NoFlash_Y × ExpCrtGain_NoFlash (10)
Α value satisfying the above is calculated.

ただし、
ExpCrtGain_PreFlash:本露光露出とプリ発光時の絞りと感度の差異を補正する補正値
ExpCrtGain_NoFlash:本露光露出と非発光撮影時の絞り・感度・シャッター速度との差を補正する補正値
式(10)を満たすαから段数換算を行い、その値をDeltaEFとして算出する。図14はDeltaEFの値に対するストロボの発光時間を算出する様子を示したグラフおよび表である。グラフの縦軸がプリ発光時の光量に対するDeltaEF値であり、横軸はストロボの発光時間(単位はμSec)である。
However,
ExpCrtGain_PreFlash: Correction value for correcting the difference between the aperture and sensitivity at the time of main exposure and pre-flash ExpCrtGain_NoFlash: The correction value for correcting the difference between the aperture, sensitivity and shutter speed at the time of main exposure and non-flash photography The number of stages is converted from α to satisfy, and the value is calculated as DeltaEF. FIG. 14 is a graph and a table showing how to calculate the flash emission time with respect to the value of DeltaEF. The vertical axis of the graph is the DeltaEF value with respect to the amount of light at the time of pre-emission, and the horizontal axis is the flash emission time (unit: μSec).

本発明において、ストロボのプリ発光を行った結果、所望の画像が得られないと判定された場合、露出条件の変更を許可するモードを有し、その設定をSafetyEFと称している。   In the present invention, when it is determined that a desired image cannot be obtained as a result of performing pre-flash of the strobe, a mode for permitting the change of the exposure condition is provided, and the setting is referred to as “Safety EF”.

S408で、SafetyEFが無効の場合には、S407で決定した露出条件で撮影を行う。S408で、SafetyEFがONの場合には、S409でストロボ発光時間(FlashDuration)を算出する。   If SafetyEF is invalid in S408, shooting is performed under the exposure conditions determined in S407. If SafetyEF is ON in S408, the flash emission time (Flash Duration) is calculated in S409.

一般的なストロボではキセノン管が使われる。キセノン管の発光特性は、電流制御することで発光時間を制御するが、電流ストップしても残光が生じている。そのためS409ではストロボの電流制御時間と予想される残光時間も含めてストロボ発光時間とする。例えば、ストロボ発光時間を1200μSec,残光時間を200μSecとすると、ストロボ発光時間は1400μSecとなる。S409ではS409で算出されたストロボ発光時間から、ストロボが同調可能となる最長のTv(FlashMaxTv)を算出する。   A typical strobe uses a xenon tube. The light emission characteristic of the xenon tube controls the light emission time by controlling the current, but afterglow occurs even when the current is stopped. Therefore, in S409, the strobe light emission time is included including the strobe current control time and the expected afterglow time. For example, if the strobe light emission time is 1200 μSec and the afterglow time is 200 μSec, the strobe light emission time is 1400 μSec. In S409, the longest Tv (FlashMaxTv) at which the strobe can be tuned is calculated from the strobe light emission time calculated in S409.

もちろんストロボの発光・終了時間にも個体ばらつきが生じているのでその分もマージンとして有してもよい。S411ではストロボ発光時間とS403で決定した露出時間との比較を行う。本露光用のシャッター速度の方が低速の場合には、そのままEFの撮影条件処理を終了する。本露光用のシャッター速度の方が高速の場合には、S412で露出時間をFlashMaxTv以下に設定し、式1および式2を満たすように撮影条件を再計算する。   Of course, individual variations are also caused in the light emission / end time of the strobe, so that portion may be included as a margin. In S411, the strobe light emission time is compared with the exposure time determined in S403. If the shutter speed for the main exposure is lower, the EF shooting condition process is terminated as it is. If the shutter speed for the main exposure is faster, the exposure time is set to FlashMaxTv or less in S412 and the photographing conditions are recalculated so as to satisfy Equations 1 and 2.

この場合は露出時間が短くなるため絞り値が小さくなるように動作するため、S413で絞り値の再設定がなされる。S414絞りが変更になった分だけストロボの発光量を式(10)に従って再設定する。この場合絞りが開放側にシフトするためストロボの発光量は少なめに制御させることになるため、S412で設定したTv値よりもストロボ発光時間が長くなることはない。そのうえでS409に戻り、露出条件を再設定することになる。   In this case, since the exposure time is shortened and the aperture value is decreased, the aperture value is reset in S413. In step S414, the flash emission amount is reset according to equation (10) by the amount changed. In this case, since the aperture is shifted to the open side, the amount of light emitted from the strobe is controlled to be small, so that the strobe light emission time does not become longer than the Tv value set in S412. After that, the process returns to S409 to reset the exposure conditions.

前述したとおり、撮影時には、プリ発光前の被写体輝度とプリ発光時の被写体輝度を算出し、その差分からストロボ発光による明るくなった度合いを計算し、その値をもとに被写体輝度が適正レベルとなるような段数差分を算出する。その段数差分をプリ発光の発光量からの発光テーブルを参照することでストロボ発光量を算出することができる。   As described above, at the time of shooting, the subject brightness before pre-flash and the subject brightness at pre-flash are calculated, the degree of brightening due to strobe flashing is calculated from the difference, and the subject brightness is set to an appropriate level based on these values. The difference in the number of stages is calculated as follows. The strobe light emission amount can be calculated by referring to the light emission table from the pre-light emission amount for the difference in the number of stages.

S403で、プリ発光時の色温度は外光色温度と近い色温度であることが望ましいとした理由としては、本発光時の色温度とプリ発光時の色温度が同じであるほうが、本露光時の発光量の計算をより正確に行うことができるためである。その計算を行う際には、図14で示した発光テーブルを色温度毎に算出しておくことで、色温度が変わっても本撮影時の発光量を算出することができる。もちろん、色温度毎の発光テーブルが、撮影時の色温度と異なる場合には、撮影時の色温度を含むテーブル間で線形補間等をして算出を行ってもよいし、より近い色温度の発光テーブルで代用してもよい。   In S403, it is desirable that the color temperature at the time of pre-emission is close to the color temperature of outside light. The reason why the color temperature at the time of main emission and the color temperature at the time of pre-emission are the same is the main exposure. This is because the amount of light emission at the time can be calculated more accurately. When performing the calculation, the light emission table shown in FIG. 14 is calculated for each color temperature, so that the light emission amount at the time of actual photographing can be calculated even if the color temperature changes. Of course, if the light emission table for each color temperature is different from the color temperature at the time of shooting, calculation may be performed by linear interpolation between the tables including the color temperature at the time of shooting, or A light emitting table may be substituted.

以下、S302の露出値およびストロボの発光量および発光色温度を決定方法の詳細について説明を行う。ここではストロボの発光量とストロボの色温度との関係からストロボの色温度および発光量を決定する。   Hereinafter, the details of the method for determining the exposure value of S302, the light emission amount of the strobe light, and the light emission color temperature will be described. Here, the color temperature and light emission amount of the strobe are determined from the relationship between the light emission amount of the strobe and the color temperature of the strobe.

図17はストロボの発光量と色温度を決定する処理ブロックを表したブロック図である。S501では前述した露出条件やストロボ発光判定などの撮影条件を決定する。S502では、DeltaEFと所定の色温度での発光テーブルでの最大のDeltaEF値であるMaxDeltaEF_Tempとの比較を行う。   FIG. 17 is a block diagram showing processing blocks for determining the flash emission amount and the color temperature. In S501, shooting conditions such as the above-described exposure conditions and flash emission determination are determined. In S502, DeltaEF is compared with MaxDeltaEF_Temp which is the maximum DeltaEF value in the light emission table at a predetermined color temperature.

DeltaEFとMaxDeltaEF_Tempとの差分が所定の閾値以下の場合には、設定された色温度およびDuration値で発光を行う。一方、DeltaEFとMaxDeltaEF_Tempとの差分が所定の閾値以上にDeltaEFの値が大きい場合には、S503の色温度可変処理を行う。   When the difference between DeltaEF and MaxDeltaEF_Temp is equal to or smaller than a predetermined threshold, light emission is performed at the set color temperature and Duration value. On the other hand, if the difference between DeltaEF and MaxDeltaEF_Temp is greater than or equal to a predetermined threshold and the value of DeltaEF is large, the color temperature variable processing in S503 is performed.

図15は発光色温度と発光量との段差の一例を示したグラフである。プリ発光の発光色温度と本発光の発光色温度が異なる場合は、あらかじめ色温度毎にプリ発光で用いる発光量を算出しておき、その色温度毎の発光量の差分と前述した発光テーブルの差分を加算させることで発光量を決定できる。   FIG. 15 is a graph showing an example of a step between the emission color temperature and the emission amount. If the pre-emission color temperature differs from the main emission color temperature, the emission amount used for pre-emission is calculated in advance for each color temperature, and the difference between the emission amounts for each color temperature and the emission table described above are calculated. The amount of light emission can be determined by adding the difference.

同様にMaxDeltaEF_Tempにおいても色温度毎に最大発光量の差分をテーブル化しておいてよい。ただし色温度毎の発光量の差分はLED前部にかけられている色フィルターの分光透過率の差異によって生じる明るさの差異であるため、最大発光量と通常発光領域での色温度での発光段数差分は同一になる。
ただし色フィルター毎のLED数や電力値が異なる場合にはその限りでなく、前述したように色温度毎に最大発光量を算出しておく必要がある。
Similarly, in MaxDeltaEF_Temp, the difference in the maximum light emission amount may be tabulated for each color temperature. However, the difference in light emission amount for each color temperature is a difference in brightness caused by the difference in spectral transmittance of the color filter applied to the front part of the LED, so the number of light emission stages at the maximum light emission amount and the color temperature in the normal light emission region The difference is the same.
However, this is not the case when the number of LEDs and the power value are different for each color filter, and it is necessary to calculate the maximum light emission amount for each color temperature as described above.

これら色温度毎の最大発光テーブルにより、色温度を可変させることによる明るさの変化を算出することができ、DeltaEFとMaxDeltaEF_Tempとの差分が所定の閾値に含まれ、なるべく外光の色温度に近くなるようなストロボの色温度が選択される。色温度を変えても所定の範囲に入らない場合には、最大発光量となる色温度が選択されることになる。   By using the maximum light emission table for each color temperature, it is possible to calculate a change in brightness caused by changing the color temperature. The difference between DeltaEF and MaxDeltaEF_Temp is included in a predetermined threshold, and is as close to the color temperature of the external light as possible. The strobe color temperature is selected. If the color temperature does not fall within the predetermined range even when the color temperature is changed, the color temperature that provides the maximum light emission amount is selected.

S504では、S503で色温度が可変された場合に、ストロボ発光時間が変化したか否かを判定する。ストロボ発光時間が延びた場合には、S505で、S501でS409−S414の再計算を行い、露出が再決定される。   In S504, it is determined whether or not the strobe light emission time has changed when the color temperature is changed in S503. If the flash light emission time is extended, the exposure is re-determined in S505 by performing recalculation of S409-S414 in S501.

一般的に、3原色の色を重ね合わせるタイプのLED光源の場合、低色温度の光源は、赤色のフィルター部分のLEDが主に発光し、昼白色程度の色温度光源のLED光源では赤・緑・青のすべてのLED光源を発光させることで色温度をコントロールされる。そのため、低色温度光源のほうが発光される光源数が少なくなり光量が下がる。もちろんその分の電流や電圧をかけることで光量を上げることも可能であるが、基本的には3色すべてのLEDを均等に発光できる中色温度での発光が最大発光量になる。   In general, in the case of an LED light source that superimposes the three primary colors, the low color temperature light source mainly emits light from the red filter part LED, and the LED light source of a daylight white color temperature light source uses red / The color temperature is controlled by emitting light from all green and blue LED light sources. For this reason, the number of light sources emitted from the low color temperature light source is reduced, and the amount of light is reduced. Of course, it is possible to increase the amount of light by applying the corresponding current or voltage, but basically, the maximum light emission is the light emission at a medium color temperature at which all three LEDs can emit light uniformly.

つまり、ストロボの色温度毎に最大に発光可能な光量が異なり、そのため撮影できる発光色温度と所望の発光量との関係が異なる。そのような場合、発光量の未達量に応じて発光色温度が可変されることで発光量不足を補うことになる。   That is, the maximum amount of light that can be emitted differs depending on the color temperature of the strobe, and therefore the relationship between the emission color temperature that can be photographed and the desired amount of light emission differs. In such a case, the shortage of the light emission amount is compensated by changing the light emission color temperature according to the unachieved light emission amount.

また、ストロボの発光可能な時間、つまりシャッター速度にも依存させてもよい。図14からもわかるように、シャッター速度が十分に長い場合には、ストロボの発光量を上げるために発光時間を延ばすことも可能であるが、シャッター速度が短い場合にはストロボ照射時間も制限されるため、十分な発光量を得ることができない。そのような場合には、短時間のうちに大光量を得ることができる中色温度の発光時間にすることで所望の光量を得ることができるが、外光の色温度と異なってしまうことがある。   Further, it may depend on the time during which the strobe can emit light, that is, the shutter speed. As can be seen from FIG. 14, when the shutter speed is sufficiently long, it is possible to extend the light emission time in order to increase the light emission amount of the flash, but when the shutter speed is short, the flash irradiation time is also limited. Therefore, a sufficient amount of light emission cannot be obtained. In such a case, a desired light amount can be obtained by setting a light emission time of medium color temperature that can obtain a large amount of light within a short time, but it may be different from the color temperature of external light. is there.

次に被写体追尾方法について説明を行う。被写体の相関性および動きベクトルを検出する方法は多数提案されており、ここではもっとも単純な方法について説明を行う。   Next, the subject tracking method will be described. Many methods for detecting the correlation and motion vector of an object have been proposed, and the simplest method will be described here.

図18は、画像相関を算出するフローチャートである。S201で、相関をとる元となる画像データを取得する。S202で、画像相関をとる対象フレーム画像を取得する。S203で、対象フレームの画像領域を垂直、水平、斜め方向に位置をシフトさせる。ここで位置をずらす量は、ベクトル移動量検出範囲まで動かす。もちろん広範囲を見るためには比較対象が増えることで、検出に時間がかかり、対象領域を狭くすると検出能力が下がることは言うまでもない。   FIG. 18 is a flowchart for calculating the image correlation. In S201, image data from which correlation is obtained is acquired. In step S202, a target frame image for obtaining image correlation is acquired. In step S203, the position of the image area of the target frame is shifted in the vertical, horizontal, and diagonal directions. Here, the position shift amount is moved to the vector movement amount detection range. Of course, in order to see a wide range, it takes a long time for detection because the number of comparison targets increases, and it goes without saying that the detection capability decreases when the target region is narrowed.

S204では、前記画素ずらしを行った画像と基準フレームとの画像差分を算出する。S205では、S204での画像差分の絶対値の積分値を取得する。もちろん画像差分の積分値の絶対値が少ないほど画像相関性が高いことは言うまでもない。S206では前記相関値が高い場合には、相関値および画素をずらした量を保存する。S208では、画素ずらしを全方位で終了したか判断を行い、終了していない場合には、S203に戻る。全方位算出されていた場合には、S209にてもっとも相関性が高かった方位および相関値を算出する。   In S204, an image difference between the pixel-shifted image and the reference frame is calculated. In S205, the integral value of the absolute value of the image difference in S204 is acquired. Needless to say, the smaller the absolute value of the integral value of the image difference, the higher the image correlation. In S206, when the correlation value is high, the correlation value and the amount of pixel shift are stored. In S208, it is determined whether or not the pixel shift has been completed in all directions, and if not completed, the process returns to S203. If all directions have been calculated, the direction and correlation value having the highest correlation are calculated in S209.

このような手法により動きベクトルの算出をおこない、これらを複数の画像領域ごとに実施し、その動きベクトル量の積分値を算出することで被写体の動きの検出が可能である。
動きベクトルを算出する方法は様々あり、本手法を限定されるものではない。たとえば、人物や主要被写体の検出を行い、その検出位置座標の差分などにより動き判別をしてもよい。これらの判別をSW2撮影直前に行い、動き量の判別を行うことで、撮影時の動き量の推測を行うことが可能である。
It is possible to detect the motion of the subject by calculating a motion vector by such a method, performing these for each of a plurality of image areas, and calculating an integral value of the motion vector amount.
There are various methods for calculating the motion vector, and this method is not limited. For example, a person or a main subject may be detected, and the motion may be determined based on the difference between the detected position coordinates. By performing these determinations immediately before SW2 shooting and determining the amount of movement, it is possible to estimate the amount of movement during shooting.

動き判別において、動きベクトルの検出する以外の方法について述べる。EVFを使った動き判別方法では、EVF画像では静止していても、露光中の人物の揺れなどの被写体ブレや、撮影者による手ぶれを起こしていた場合において、そのぶれ領域において、実際の被写体のストロボ照射領域とWB制御領域の微妙な領域の差分により、被写体と背景領域の境界部分にホワイトバランスの制御誤差が生じてしまい、色味の縁取が発生してしまう。   A method other than motion vector detection in motion discrimination will be described. In the motion discrimination method using EVF, even if the EVF image is stationary, subject blurring such as shaking of the person being exposed or camera shake caused by the photographer may occur. Due to the subtle difference between the strobe illumination area and the WB control area, a white balance control error occurs at the boundary between the subject and the background area, resulting in a color fringing.

それらを回避する手法として、本露光とEVFの画像間での動き判別方法について詳細に説明を行う。
1.SW2直前のEVF画像からにブロック毎に色の評価値CxCy値を取得する。
2.ストロボ発光画像とストロボ非発光画像から露光量換算し、ブロック毎にストロボ照射量を算出する。
3.色味の変化度合を、ストロボ非発光時のホワイトバランス係数とストロボ発光時のホワイトバランス係数の差分から光量比に応じて算出する。
4.2のストロボ照射量に応じて領域毎にストロボと外光の光量比を算出し、3で算出した色味の変化度合から、ストロボ非発光画像の色評価値に加算することで、ストロボ発光画像の色推定評価値を算出する。
本露光画像の色評価値の取得を行う。
6.4と5の比較結果であらかじめ定められた所定の閾値以下の場合には、その領域が動いていないと判断し、所定の閾値以上の場合には、その領域が動いている領域として判断する。
7.6の結果から動いていたとする領域のブロック数をカウントして所定のブロック数以上の場合に動きシーンとして判断する。
As a technique for avoiding these problems, a method for determining the motion between the main exposure and the EVF image will be described in detail.
1. A color evaluation value CxCy value is acquired for each block from the EVF image immediately before SW2.
2. The exposure amount is converted from the strobe light emission image and the strobe non-light emission image, and the strobe irradiation amount is calculated for each block.
3. The degree of color change is calculated according to the light amount ratio from the difference between the white balance coefficient when the flash is not emitted and the white balance coefficient when the flash is emitted.
By calculating the light intensity ratio between the strobe and the outside light for each area according to the strobe irradiation amount of 4.2, and adding it to the color evaluation value of the strobe non-emission image from the color change degree calculated in 3. A color estimation evaluation value of the luminescent image is calculated.
The color evaluation value of the main exposure image is acquired.
If the comparison result of 6.4 and 5 is equal to or smaller than a predetermined threshold value, it is determined that the area is not moving, and if it is equal to or higher than the predetermined threshold value, the area is determined to be moving. To do.
From the result of 7.6, the number of blocks in the area that has been moved is counted, and when the number of blocks is greater than or equal to a predetermined number, it is determined as a moving scene.

上記例は動きブロック数で動き判別を行ったが、色温度の変化度合を表す本露光時の色推定値と色評価値との差分の大きさに応じて決定してもよいし、それらの組み合わせによって決定してもよい。このようにすることで、ストロボ発光画像とストロボ非発光画像との間で動き判別を行うことができる。   In the above example, the motion is determined based on the number of motion blocks. It may be determined by a combination. By doing so, it is possible to perform motion discrimination between the strobe light emission image and the strobe non-light emission image.

(他の実施形態)
本発明は、複数の機器(例えばホストコンピュータ、インターフェイス機器、カメラヘッドなど)から構成されるシステムを適用しても、一つの機器からなる装置(例えば、デジタルスチルカメラ、デジタルビデオカメラなど)に適用してもよい。
(Other embodiments)
The present invention can be applied to an apparatus (for example, a digital still camera, a digital video camera, etc.) composed of a single device even if a system composed of a plurality of devices (for example, a host computer, an interface device, a camera head, etc.) is applied. May be.

また、本発明の目的は、以下のようにして達成することも可能である。まず、前述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体(または記録媒体)を、システムあるいは装置に供給する。そして、そのシステムあるいは装置のコンピュータ(またはCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行する。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。   The object of the present invention can also be achieved as follows. First, a storage medium (or recording medium) that records a program code of software that implements the functions of the above-described embodiments is supplied to a system or apparatus. Then, the computer (or CPU or MPU) of the system or apparatus reads and executes the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した実施形態の機能が実現されるだけでなく、以下のようにして達成することも可能である。即ち、読み出したプログラムコードの指示に基づき、コンピュータ上で稼動しているオペレーティングシステム(OS)などが実際の処理の一部または全部を行い、その処理によって前述した実施形態の機能が実現される場合である。   Further, by executing the program code read by the computer, not only the functions of the above-described embodiments are realized, but also the following can be achieved. That is, when the operating system (OS) running on the computer performs part or all of the actual processing based on the instruction of the read program code, the functions of the above-described embodiments are realized by the processing. It is.

ここでプログラムコードを記憶する記録媒体としては、例えば、フレキシブルディスク、ハードディスク、ROM、RAM、磁気テープ、不揮発性のメモリカード、CD−ROM、CD−R、DVD、光ディスク、光磁気ディスク、MOなどが考えられる。また、LAN(ローカル・エリア・ネットワーク)やWAN(ワイド・エリア・ネットワーク)などのコンピュータネットワークを、プログラムコードを供給するために用いることができる。   As the recording medium for storing the program code, for example, a flexible disk, hard disk, ROM, RAM, magnetic tape, nonvolatile memory card, CD-ROM, CD-R, DVD, optical disk, magneto-optical disk, MO, etc. Can be considered. Also, a computer network such as a LAN (Local Area Network) or a WAN (Wide Area Network) can be used to supply the program code.

100 本露光画像、101 リサイズ処理、102 EVF画像、
103 露光量演算処理、104 領域毎ストロボ発光量演算処理、
105 画像合成比率決定処理、106 リサイズ処理、
107 外光WB係数算出処理、109 WB処理、110 発光量情報、
111 ストロボWB係数算出処理、113 現像処理、114 画像合成処理、
201 WB係数合成処理、301 CCD撮像素子、302 メモリ、
303 WB回路、304 色変換MTX回路、305 LPF回路、
306 CSUP回路、307 RGB変換回路、308 ガンマ補正回路、
309 色輝度変換回路、310 圧縮回路、311 Y生成回路、
312 エッジ強調回路、313 鏡筒制御回路、314 CPU、
315 鏡筒装置、316 ストロボ発光装置
100 exposure images, 101 resize processing, 102 EVF images,
103 exposure amount calculation processing, 104 strobe emission amount calculation processing for each area,
105 image composition ratio determination processing, 106 resizing processing,
107 external light WB coefficient calculation processing, 109 WB processing, 110 emission amount information,
111 Strobe WB coefficient calculation processing, 113 development processing, 114 image composition processing,
201 WB coefficient composition processing, 301 CCD image sensor, 302 memory,
303 WB circuit, 304 color conversion MTX circuit, 305 LPF circuit,
306 CSUP circuit, 307 RGB conversion circuit, 308 gamma correction circuit,
309 color luminance conversion circuit, 310 compression circuit, 311 Y generation circuit,
312 edge enhancement circuit, 313 lens barrel control circuit, 314 CPU,
315 Lens barrel device, 316 Strobe light emitting device

Claims (10)

撮像装置であって、
色温度を可変させて発光可能なストロボ制御手段と、
前記ストロボ制御手段の発光した色温度に相当する制御情報から、ストロボ用のホワイトバランス制御値の算出を行う、第1のホワイトバランス制御値算出手段と、
周囲の色温度を検出することにより、外光用のホワイトバランス制御値の算出を行う、第2のホワイトバランス制御値算出手段と、
画像データを複数のブロックに分割する画像分割手段と
前記ストロボ制御手段によるストロボの照射量を画像の領域毎に判定するストロボ照射量判定手段と、
前記画像領域毎のストロボ照射量に応じて、前記第1のホワイトバランス制御値算出手段と前記第2のホワイトバランス制御値算出手段の結果から、画像領域毎に第3のホワイトバランス制御値の算出を行う第3のホワイトバランス制御値算出手段と、
を有し、
前記第3のホワイトバランス制御値を用いて画像生成することを特徴とする撮像装置。
An imaging device,
Strobe control means that can emit light with variable color temperature;
First white balance control value calculating means for calculating a white balance control value for a strobe from control information corresponding to a color temperature emitted by the strobe control means;
Second white balance control value calculation means for calculating a white balance control value for external light by detecting the ambient color temperature;
Image dividing means for dividing the image data into a plurality of blocks; strobe irradiation amount determining means for determining the amount of strobe irradiation by the strobe control means for each area of the image;
A third white balance control value is calculated for each image area from the results of the first white balance control value calculation means and the second white balance control value calculation means in accordance with the strobe irradiation amount for each image area. Third white balance control value calculating means for performing
Have
An image pickup apparatus that generates an image using the third white balance control value.
外光用のホワイトバランス制御値とストロボ用ホワイトバランス制御値とを比較して、ホワイトバランス制御値の差分が所定の範囲にある場合には、画像領域毎にホワイトバランス制御を行い、前記差分が所定の範囲内にある場合には、画面内で共通のホワイトバランス処理を行うことを特徴とする請求項1に記載の撮像装置。   When the white balance control value for external light and the white balance control value for strobe are compared, and the difference of the white balance control value is within a predetermined range, white balance control is performed for each image area, and the difference is The image pickup apparatus according to claim 1, wherein a common white balance process is performed in a screen when the image is within a predetermined range. 前記画面内で共通のホワイトバランス処理を行う場合、外光用のホワイトバランス制御値またはストロボ用のホワイトバランス制御値のどちらか、またはそれらから求まる1つのホワイトバランス制御値を用いてホワイトバランス補正処理を行うことを特徴とする請求項2に記載の撮像装置。   When common white balance processing is performed in the screen, white balance correction processing is performed using either a white balance control value for external light or a white balance control value for strobe, or one white balance control value obtained from the white balance control value. The imaging apparatus according to claim 2, wherein: 前記ホワイトバランス制御値の差分が所定の範囲とは、ホワイトバランス制御値が、画像領域毎に求まる色評価値の色評価領域毎に定められることを特徴とする請求項2又は請求項3に記載の撮像装置。   The difference in the white balance control value is within a predetermined range, wherein the white balance control value is determined for each color evaluation region of a color evaluation value obtained for each image region. Imaging device. 撮像装置であって、
色温度を可変させて発光可能なストロボ制御手段と
前記ストロボ制御手段の発光した色温度に相当する制御情報から、ストロボ用のホワイトバランス制御を行う、第1のホワイトバランス制御値算出手段と、
前記第1のホワイトバランス制御値を用いて画像生成する第1の画像生成手段と
周囲の色温度を推定することにより、外光用のホワイト制御を行い、第2のホワイトバランス制御値算出し画像生成する第2の画像生成手段と、
前記ストロボ制御手段によるストロボの照射量を画像の領域毎に判定するストロボ照射量判定手段と、
前記画像領域毎のストロボ照射量に応じて、前記第1の画像生成手段と前記第2の画像生成手段によって生成された画像から、画像領域毎に前記第1と第2の画像を合成する画像合成手段と、
を有することを特徴とする撮像装置。
An imaging device,
Strobe control means capable of emitting light with variable color temperature; first white balance control value calculating means for performing white balance control for strobe light from control information corresponding to the color temperature emitted by the strobe control means;
The first image generation means for generating an image using the first white balance control value and the surrounding color temperature are estimated to perform white control for external light and calculate a second white balance control value to obtain an image. Second image generating means for generating;
A strobe amount determining means for determining a strobe amount by the strobe control means for each area of the image;
An image that combines the first and second images for each image region from the images generated by the first image generation unit and the second image generation unit in accordance with the strobe irradiation amount for each image region. Combining means;
An imaging device comprising:
外光用のホワイトバランス制御値とストロボ用ホワイトバランス制御値とを比較して、ホワイトバランス制御値の差分が所定の範囲に範囲内に含まれない場合には、画像領域毎に合成比率を決定して画像合成を行い、
前記差分が所定の範囲内ある場合には、外光用のホワイトバランス制御またはストロボ用ホワイトバランスの制御値のどちらか一方の制御値を用いて、またはその両方から算出される合成比率に基づき画像合成をおこなうことで、画像生成を行うことを特徴とする請求項5に記載の撮像装置。
Compare the white balance control value for external light and the white balance control value for strobe, and if the difference of the white balance control value is not within the specified range, determine the composition ratio for each image area Image composition,
When the difference is within a predetermined range, the image is based on a combination ratio calculated using one of the control values of the white balance control for external light or the control value of the white balance for strobe, or both. The imaging apparatus according to claim 5, wherein the image generation is performed by combining the images.
前記ホワイトバランス制御値の差分が所定の範囲は、ホワイトバランス制御値が、画像領域毎に求まる色評価値の色評価領域毎に定められることを特徴とする請求項5又は請求項6に記載の撮像装置。   The difference in the white balance control value is within a predetermined range, and the white balance control value is determined for each color evaluation region of a color evaluation value obtained for each image region. Imaging device. 前記第3のホワイトバランス制御値算出手段は、被写体が動いている被写体であるかを判定する動き判定手段の判定結果に応じて前記画像領域毎のホワイトバランス制御および合成処理の合成比率を決定することを特徴とする請求項1乃至請求項7の何れか一項に記載の撮像装置。   The third white balance control value calculating means determines the white balance control and the composition ratio of the composition processing for each image area according to the determination result of the motion determining means for determining whether the subject is a moving subject. The imaging apparatus according to any one of claims 1 to 7, wherein the imaging apparatus is characterized in that 前記動き判定手段は、静止画撮影指示の直前の複数の画像を用いて動き判定処理を行うことを特徴とする請求項8に記載の撮像装置。   The imaging apparatus according to claim 8, wherein the movement determination unit performs a movement determination process using a plurality of images immediately before a still image shooting instruction. 前記動き判定手段は、前記静止画撮影指示直前の画像と、静止画撮影画像を用いて、画像領域毎にストロボ照射量を判定するとともに、前記前記ストロボ照射量の判定結果よりストロボ発光画像の色味を推定するともに、静止画撮影画像と比較して、推定値から所定の範囲にある場合には、静止領域と判断し、所定の範囲外の場合には動き領域と判断し、その領域毎の動き判断結果より、動き判断を行うことを特徴とする請求項8に記載の撮像装置。   The motion determination means determines a strobe irradiation amount for each image region using an image immediately before the still image shooting instruction and a still image shooting image, and determines a color of the strobe light emission image based on the determination result of the strobe irradiation amount. In addition to estimating the taste, it is determined as a still area when it is within a predetermined range from the estimated value compared to a still image, and is determined as a moving area when it is outside the predetermined range. The image pickup apparatus according to claim 8, wherein a motion determination is performed based on the motion determination result of the image.
JP2014123875A 2014-06-17 2014-06-17 Imaging apparatus Pending JP2016005105A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014123875A JP2016005105A (en) 2014-06-17 2014-06-17 Imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014123875A JP2016005105A (en) 2014-06-17 2014-06-17 Imaging apparatus

Publications (1)

Publication Number Publication Date
JP2016005105A true JP2016005105A (en) 2016-01-12

Family

ID=55224101

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014123875A Pending JP2016005105A (en) 2014-06-17 2014-06-17 Imaging apparatus

Country Status (1)

Country Link
JP (1) JP2016005105A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021136662A (en) * 2020-02-28 2021-09-13 キヤノン株式会社 Image processing apparatus and image processing method
CN114697558A (en) * 2020-12-28 2022-07-01 合肥君正科技有限公司 Method for inhibiting wide dynamic range image stroboflash

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021136662A (en) * 2020-02-28 2021-09-13 キヤノン株式会社 Image processing apparatus and image processing method
JP7515271B2 (en) 2020-02-28 2024-07-12 キヤノン株式会社 Image processing device and image processing method
CN114697558A (en) * 2020-12-28 2022-07-01 合肥君正科技有限公司 Method for inhibiting wide dynamic range image stroboflash
CN114697558B (en) * 2020-12-28 2023-10-31 合肥君正科技有限公司 A method to suppress flicker in wide dynamic range images

Similar Documents

Publication Publication Date Title
JP5665436B2 (en) Image processing apparatus, image processing method, and program
JP5761946B2 (en) Image processing apparatus, image processing method, and storage medium
JP6049343B2 (en) Image processing apparatus, image processing method, and program
KR101609556B1 (en) Imaging apparatus and control method
JP5808142B2 (en) Image processing apparatus, image processing method, and program
JP5743696B2 (en) Image processing apparatus, image processing method, and program
WO2004010711A1 (en) Imaging data processing method, imaging data processing device, and computer program
US11838648B2 (en) Image processing device, imaging apparatus, image processing method, and program for determining a condition for high dynamic range processing
JP5804856B2 (en) Image processing apparatus, image processing method, and program
US9036046B2 (en) Image processing apparatus and method with white balance correction
JP7515271B2 (en) Image processing device and image processing method
JP5225137B2 (en) Imaging apparatus, image processing method, and program
JP5854716B2 (en) Image processing apparatus, image processing method, and program
JP4412109B2 (en) Electronic camera having color balance adjustment function and program
JP6570311B2 (en) Image processing apparatus and image processing method
JP2014120813A (en) Image pickup device and image pickup method
JP6053501B2 (en) IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD
JP6021885B2 (en) Image processing apparatus, image processing method, and program
JP2013132065A (en) Imaging apparatus and flash control method
JP2017034536A (en) Image processing apparatus, image processing method, and program