JP2008076903A - Digital camera and control method therefor - Google Patents

Digital camera and control method therefor Download PDF

Info

Publication number
JP2008076903A
JP2008076903A JP2006257974A JP2006257974A JP2008076903A JP 2008076903 A JP2008076903 A JP 2008076903A JP 2006257974 A JP2006257974 A JP 2006257974A JP 2006257974 A JP2006257974 A JP 2006257974A JP 2008076903 A JP2008076903 A JP 2008076903A
Authority
JP
Japan
Prior art keywords
face
light emission
value
flash
emission 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.)
Granted
Application number
JP2006257974A
Other languages
Japanese (ja)
Other versions
JP4782649B2 (en
Inventor
Kazunori Tamura
一紀 田村
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.)
Fujifilm Corp
Original Assignee
Fujifilm Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2006257974A priority Critical patent/JP4782649B2/en
Publication of JP2008076903A publication Critical patent/JP2008076903A/en
Application granted granted Critical
Publication of JP4782649B2 publication Critical patent/JP4782649B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To enable a digital camera capable of controlling the emitted light amount of a flash by using the detected result of the face to always perform flash photographing, utilizing a proper emitted light amount, regardless of the number of faces detected. <P>SOLUTION: The flash control means 19 of the digital camera 1 regards only the region, corresponding to each of N (N is integer) detected faces as a region corresponding to the face and performs calculation, taking into consideration the face, for determining the temporary proper value Cfi (1≤i≤N) of the light amount emitted (S201 to S209). The proper emitted light amount Ch of the flash is determined, by performing an adjustment for setting the temporary proper values Cf1 to CfN as reference values. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、被写体に含まれる顔の情報を利用してフラッシュの発光量を制御する機能を備えたデジタルカメラと、その発光量の制御方法に関する。   The present invention relates to a digital camera having a function of controlling the amount of flash emission using face information included in a subject, and a method for controlling the amount of light emission.

デジタルカメラは、通常、シャッタレリーズボタンが押される以前から画像の撮影を行っており、その段階で撮影された画像は、露出調整や焦点調節のほか、フラッシュの適正発光量を求める調光にも利用されている。フラッシュの発光量の求め方としては、撮影された画像全体の明るさに基づいて適正発光量を求める方法が一般的であったが、近年、撮影された画像から人物の顔を検出し、顔の有無や顔が占める割合によってフラッシュの発光量を異ならせる方法が提案されている。   Digital cameras usually take images before the shutter release button is pressed, and the images taken at that stage are used for exposure adjustment and focus adjustment, as well as dimming to determine the appropriate flash output. It's being used. As a method of obtaining the flash emission amount, a method of obtaining an appropriate emission amount based on the brightness of the entire photographed image is generally used. However, in recent years, a human face is detected from the photographed image, and the face is detected. There has been proposed a method of varying the amount of flash emission depending on the presence or absence and the proportion of the face.

例えば特許文献1には、人物の顔が検出され、画像中の顔が占める割合が所定値以上のときに、発光量を弱めにする方法が示されている。また、特許文献2には、顔に相当する領域のデータのみを利用して発光量を求める形態や、顔に相当する領域の重み付けを他の領域よりも高く設定した画像データを利用して発光量を求める方法が示されている。
特開2003−107567号公報 特開2006−074164号公報
For example, Patent Document 1 discloses a method of reducing the amount of light emission when a human face is detected and the ratio of the face in the image is equal to or greater than a predetermined value. Japanese Patent Laid-Open No. 2004-228561 uses a form in which the amount of light emission is obtained using only data of the area corresponding to the face, or light emission using image data in which the weight of the area corresponding to the face is set higher than other areas. A method for determining the quantity is shown.
JP 2003-107567 A JP 2006-074164 A

しかし、特許文献1、2は、撮影範囲に含まれる顔が1つの場合の発光量の制御方法を例示しているに過ぎず、複数の顔が検出された場合の発光量の制御方法については具体的な記載がない。例えば、顔と判定された複数の領域の面積の合計が所定の割合を超えているときに発光量を弱めるなど、複数の領域をまとめて1つの領域として取り扱うことは可能であるが、そのような方法では、各顔からの反射光量がそれほど強くなくても顔の合計面積が所定割合を超えれば発光量が弱めに設定されてしまうなどの不都合がある。また、中央に最も近い位置にある顔など、複数の顔の中からいずれか1つの顔を選択し、その顔に対し特許文献1や2の方法を適用する方法も考えられるが、そのような方法でも、中央の顔が小さく両脇の顔が大きかった場合、あるいは中央の人物が色黒で両脇の人物が色白だった場合に、両脇の顔が白とびしてしまうなどの不都合がある。このように、顔が1つしかない場合と同じ方法を、顔が複数ある場合に単純に適用しただけでは、すべての顔について白とびを防ぐことはできない。   However, Patent Documents 1 and 2 merely exemplify a method for controlling the light emission amount in the case where one face is included in the shooting range, and a method for controlling the light emission amount when a plurality of faces are detected. There is no specific description. For example, it is possible to treat a plurality of areas as a single area by reducing the amount of light emission when the total area of the plurality of areas determined as faces exceeds a predetermined ratio. This method has a disadvantage that even if the amount of light reflected from each face is not so strong, if the total area of the face exceeds a predetermined ratio, the light emission amount is set to be weak. Further, a method of selecting any one face from a plurality of faces, such as a face closest to the center, and applying the methods of Patent Documents 1 and 2 to the face can be considered. In the case of the method, if the face in the center is small and the faces on both sides are large, or if the person in the center is dark black and the people on both sides are fair, there are inconveniences such as the faces on both sides are overexposed. is there. As described above, if the same method as that when there is only one face is simply applied when there are a plurality of faces, overexposure cannot be prevented for all the faces.

本発明は、この問題に鑑みて、検出された顔の数によらず、常に適正な発光量でフラッシュ撮影を行うことができるデジタルカメラを提供することを課題とする。   In view of this problem, an object of the present invention is to provide a digital camera that can always perform flash photography with an appropriate light emission amount regardless of the number of detected faces.

本発明のデジタルカメラは、被写体を表す画像データを生成する撮像手段と、フラッシュを発光する発光手段と、前記撮像手段により生成された画像データを対象として顔検出処理を実行する顔検出手段とを備えたデジタルカメラであり、顔検出手段が出力する検出結果を利用してフラッシュの発光量を制御するための演算手段および発光量決定手段を備えることを特徴とするものである。   The digital camera of the present invention includes an imaging unit that generates image data representing a subject, a light emitting unit that emits a flash, and a face detection unit that performs face detection processing on the image data generated by the imaging unit. The digital camera includes a calculation unit and a light emission amount determination unit for controlling the light emission amount of the flash using the detection result output from the face detection unit.

演算手段は、顔領域抽出手段が検出したN(Nは整数)個の顔について、それぞれ、その顔のみを前記画像データに含まれる顔とみなして顔を考慮した演算を行うことにより前記発光量の仮適正値Cfi(1≦i≦N)を求める。ここで、顔を考慮した演算とは、調光のための演算に顔の検出結果を何らの形で利用する処理を意味する。例えば、演算手段は、画像データのうちi番目に検出された顔に相当する領域内のデータのみを利用して仮適正値Cfiを求める。あるいは、i番目に検出された顔に相当する領域内のデータに対し他の領域のデータよりも高い重み付けを与えた上で、画像データ全体を利用して発光量を求める。これにより、検出された顔と同数の、すなわちN個の仮適正値Cf1〜CfNが求められる。   The calculation means, for each of N (N is an integer) faces detected by the face area extraction means, considers only the faces as faces included in the image data, and performs the calculation considering the faces, thereby calculating the light emission amount. Is determined as a temporary appropriate value Cfi (1 ≦ i ≦ N). Here, the calculation considering the face means a process of using the detection result of the face in any form for the calculation for dimming. For example, the calculation means obtains the temporary appropriate value Cfi by using only data in an area corresponding to the i-th detected face in the image data. Alternatively, the data in the area corresponding to the i-th detected face is given higher weight than the data in other areas, and the light emission amount is obtained using the entire image data. As a result, the same number of the detected faces, that is, N provisional appropriate values Cf1 to CfN are obtained.

発光量決定手段は、演算手段から供給されるN個の仮適正値Cf1〜CfNを基準値とする調整を行うことにより、フラッシュの適正発光量Chを決定する。仮適正値Cf1〜CfNを基準値とする調整を行うとは、その基準値から推定して不都合がないと思われる範囲内の値に、発光量を設定するということである。各顔にとって不都合がない発光量の範囲は、その顔について求められた仮適正値から推定することができる。よって、いずれの基準値からみても不都合がない範囲の値に、発光量を設定すれば、すべての顔について白とびを防止することができる。   The light emission amount determination means determines the appropriate light emission amount Ch of the flash by performing adjustment using the N temporary appropriate values Cf1 to CfN supplied from the calculation means as reference values. The adjustment using the temporary appropriate values Cf1 to CfN as the reference value means that the light emission amount is set to a value within a range that is estimated to be inconvenient from the reference value. The range of the light emission amount that is not inconvenient for each face can be estimated from the provisional appropriate value obtained for the face. Therefore, overexposure can be prevented for all faces if the light emission amount is set to a value that is inconvenient in any reference value.

本発明の一実施形態では、演算手段から供給される仮適正値Cfi(1≦i≦N)の中から値が最小の仮適正値Cfminを選択し、その最小の仮適正値Cfminを基準値として調整を行うことにより適正発光量Chを決定する。求められた仮適正値が最小の値となる顔は、検出された複数の顔の中で最も白とびしやすい顔であるので、仮適正値Cfminを大きく外れないようにフラッシュ発光量を決定すれば、確実に白とびを防止することができる。   In one embodiment of the present invention, the temporary appropriate value Cfmin having the smallest value is selected from the temporary appropriate values Cfi (1 ≦ i ≦ N) supplied from the calculation means, and the minimum temporary appropriate value Cfmin is selected as the reference value. As a result, the appropriate light emission amount Ch is determined. The face whose calculated temporary appropriate value is the smallest is the face that is most likely to be out of the plurality of detected faces. Therefore, the flash light emission amount is determined so as not to greatly deviate from the temporary appropriate value Cfmin. If so, overexposure can be surely prevented.

本発明の方法は、上記構成のデジタルカメラによりフラッシュの発光量を制御する方法であって、顔検出手段が検出したN(Nは整数)個の顔について、それぞれ、その顔のみを前記画像データに含まれる顔とみなして顔を考慮した演算を行うことにより発光量の仮適正値Cfi(1≦i≦N)を求める演算ステップと、その演算ステップにおいて求められたN個の仮適正値Cf1〜CfNを基準値とする調整を行うことにより、フラッシュの適正発光量Chを決定する発光量決定ステップとを有することを特徴とするものである。   The method of the present invention is a method for controlling the amount of light emitted from the flash by the digital camera having the above-described configuration, and for each of N (N is an integer) faces detected by the face detection means, only the faces are used as the image data. A calculation step for obtaining a temporary appropriate value Cfi (1 ≦ i ≦ N) of the light emission amount by performing a calculation in consideration of the face as a face included in the face, and N temporary proper values Cf1 obtained in the calculation step A light emission amount determining step for determining an appropriate light emission amount Ch of the flash by performing adjustment using .about.CfN as a reference value.

以下、本発明の実施形態として、フラッシュ撮影機能を備えた一眼レフのデジタルカメラと、そのデジタルカメラのフラッシュの発光量の制御方法を示す。   Hereinafter, as an embodiment of the present invention, a single-lens reflex digital camera having a flash photographing function and a method of controlling the flash emission amount of the digital camera will be described.

[ 実施形態1 ]
図1A、図1Bおよび図1Cは、本発明の一実施形態におけるデジタルカメラ1の外観を示す図である。図1Aに示すように、このデジタルカメラ1の上部には、シャッタレリーズボタン2、撮影モードの設定に利用されるモードダイヤル3、内蔵フラッシュ4および付属品の取付口であるホットシュー5が備えられている。
[Embodiment 1]
1A, 1B, and 1C are views showing an external appearance of a digital camera 1 according to an embodiment of the present invention. As shown in FIG. 1A, a shutter release button 2, a mode dial 3 used for setting a shooting mode, a built-in flash 4, and a hot shoe 5 serving as an attachment port for accessories are provided on the top of the digital camera 1. ing.

シャッタレリーズボタン2は、2段階の押下により2種類の動作を指示できる構造となっている。例えば、自動露出調整機能(AE:Auto Exposure)、自動焦点調節機能(AF:Auto Focus)を利用した撮影では、デジタルカメラ1は、シャッタレリーズボタン2が軽く押下(半押しともいう)されたときに、露出調整、焦点合わせなどの撮影準備を行う。その状態で、シャッタレリーズボタン2が強く押下(全押しともいう)されると、デジタルカメラ1は露光を開始し、露光により得られた1画面分の画像データをメモリカードに記録する。   The shutter release button 2 has a structure in which two types of operations can be instructed by pressing in two steps. For example, in shooting using an automatic exposure adjustment function (AE: Auto Exposure) and an automatic focus adjustment function (AF: Auto Focus), the digital camera 1 has the shutter release button 2 lightly pressed (also referred to as half-press). Next, prepare for shooting such as exposure adjustment and focusing. In this state, when the shutter release button 2 is pressed down (also referred to as full pressing), the digital camera 1 starts exposure and records image data for one screen obtained by exposure on the memory card.

内蔵フラッシュ4は、脇にあるフラッシュポップアップボタン6を押すことにより、図1Bに示すようにカメラ上部方向に開く(以下、ポップアップと称する)。また、一部の撮影モードでは、自動的にポップアップすることもある。ポップアップ状態の内蔵フラッシュ4は、シャッタレリーズボタン2の2段階目の押下操作と連動して2回発光する。1回目の発光は被写体からの反射光量を測定するための予備発光であり、通常の発光に比べれば発光量は微小である。予備発光には反射光量の測定のほか、赤目を予防する目的もある。2回目の発光は十分な露光量を得るための本発光であり、本発光の発光量が適正であれば、適当な明るさの画像を得ることができる。   The built-in flash 4 opens in the upper direction of the camera as shown in FIG. 1B by pressing a flash pop-up button 6 on the side (hereinafter referred to as a pop-up). Also, in some shooting modes, it may pop up automatically. The built-in flash 4 in the pop-up state emits light twice in conjunction with the second-stage pressing operation of the shutter release button 2. The first light emission is preliminary light emission for measuring the amount of reflected light from the subject, and the light emission amount is very small compared to normal light emission. In addition to measuring the amount of reflected light, preliminary light emission has the purpose of preventing red eyes. The second light emission is a main light emission for obtaining a sufficient exposure amount. If the light emission amount of the main light emission is appropriate, an image with appropriate brightness can be obtained.

内蔵フラッシュ4の動作は、シャッタレリーズボタン2の操作のみならず、モードダイヤル3により設定された撮影モードにも依存する。撮影モードとしては、撮影に係る全設定をカメラが自動で行う「AUTO」、撮影に係る全設定をユーザが手動で行う「マニュアル」のほか、「プログラムオート」、「シャッタ優先オート」、「絞り優先オート」、「ブレ軽減」、「ナチュラルフォト」、「人物」、「風景」、「夜景」など、撮影シーンごとのモードが用意されている。「AUTO」モードに設定されたデジタルカメラ1は、フラッシュ撮影が必要と判断すれば、自動的に内蔵フラッシュ4をポップアップし、シャッタレリーズボタン2の操作と連動してフラッシュを発光させる。一方、「ナチュラルフォト」はフラッシュレス撮影を行うモードであるため、このモードに設定されたデジタルカメラ1では、シャッタレリーズボタン2を操作しても内蔵フラッシュ4は動作しない。他のモードについても、それぞれ、そのモードの目的に適う内蔵フラッシュ4の動作が定められている。   The operation of the built-in flash 4 depends not only on the operation of the shutter release button 2 but also on the photographing mode set by the mode dial 3. Shooting modes include “AUTO” in which the camera automatically performs all settings related to shooting, “Manual” in which all settings related to shooting are manually performed by the user, “Program auto”, “Shutter priority auto”, “Aperture” Modes are provided for each shooting scene, such as “priority auto”, “blur reduction”, “natural photo”, “person”, “landscape”, “night view”. The digital camera 1 set to the “AUTO” mode automatically pops up the built-in flash 4 when it is determined that flash photography is necessary, and causes the flash to emit light in conjunction with the operation of the shutter release button 2. On the other hand, since “natural photo” is a mode for performing flashless shooting, the built-in flash 4 does not operate in the digital camera 1 set to this mode even if the shutter release button 2 is operated. In other modes, the operation of the built-in flash 4 is determined in accordance with the purpose of the mode.

なお、このデジタルカメラ1は、図1Cに示すようにホットシュー5に外付フラッシュ6を取り付けて使用することもできる。外付フラッシュ7は、ホットシュー5に取付けられることで機械的・電気的にデジタルカメラ1に接続され、これにより、内蔵フラッシュ4と同様、モードダイヤル3によるモード設定に応じて、シャッタレリーズボタン2の2段階目の押下操作と連動した発光動作を行うようになる。以下、図1Aおよび図1Bに例示した形態を中心に説明するが、本発明はフラッシュが内蔵か外付けかによらず適用可能な発明である。   The digital camera 1 can also be used with an external flash 6 attached to a hot shoe 5 as shown in FIG. 1C. The external flash 7 is mechanically and electrically connected to the digital camera 1 by being attached to the hot shoe 5, so that, like the built-in flash 4, the shutter release button 2 according to the mode setting by the mode dial 3. The light emission operation is performed in conjunction with the second-stage pressing operation. In the following, the embodiment illustrated in FIGS. 1A and 1B will be mainly described. However, the present invention is applicable regardless of whether the flash is built-in or external.

続いて、図2を参照して、デジタルカメラ1の内部構成について、概要を説明する。図2に示すように、デジタルカメラ1は、レンズ12、レンズ駆動部16、絞り13、絞り駆動部17、CCD14およびタイミングジェネレータ(TG)18からなる撮像系を備える。レンズ12は、被写体にピントを合わせるためのフォーカスレンズ、ズーム機能を実現するためのズームレンズなど複数の機能別レンズにより構成される。レンズ駆動部16はステッピングモータなど小型のモータで、CCD14から各機能別レンズのまでの距離が目的に適った距離となるように各機能別レンズの位置を調整する。絞り13は複数の絞り羽根からなる。絞り駆動部17は、ステッピングモータなど小型のモータで、絞りの開口サイズが目的に適ったサイズになるように絞り羽根の位置を調整する。CCD14は原色カラーフィルタを伴う500〜1200万画素のCCDで、タイミングジェネレータ18からの指示信号に応じて蓄積された電荷を放出する。タイミングジェネレータ18は、CCD14に所望の時間のみ電荷が蓄積されるようにCCD14に対して信号を送り、これによりシャッタ速度を調整する。   Next, an outline of the internal configuration of the digital camera 1 will be described with reference to FIG. As shown in FIG. 2, the digital camera 1 includes an imaging system including a lens 12, a lens driving unit 16, a diaphragm 13, a diaphragm driving unit 17, a CCD 14, and a timing generator (TG) 18. The lens 12 includes a plurality of functional lenses such as a focus lens for focusing on a subject and a zoom lens for realizing a zoom function. The lens driving unit 16 is a small motor such as a stepping motor, and adjusts the position of each functional lens so that the distance from the CCD 14 to each functional lens is a suitable distance for the purpose. The diaphragm 13 is composed of a plurality of diaphragm blades. The aperture drive unit 17 is a small motor such as a stepping motor, and adjusts the position of the aperture blades so that the aperture size of the aperture becomes a size suitable for the purpose. The CCD 14 is a CCD having 5 to 12 million pixels with a primary color filter, and discharges accumulated charges in response to an instruction signal from the timing generator 18. The timing generator 18 sends a signal to the CCD 14 so that charges are accumulated in the CCD 14 only for a desired time, thereby adjusting the shutter speed.

また、デジタルカメラ1は、CCD14の出力信号をデジタル信号に変換するA/D変換部15と、A/D変換部15が出力した画像データをシステムバス34を介して他の処理部に転送する画像入力制御部23と、画像入力制御部23から転送された画像データを一時記憶するSDRAM22を備える。SDRAM22に記憶される画像データはRAWデータである。   The digital camera 1 also transfers an A / D converter 15 that converts the output signal of the CCD 14 into a digital signal, and image data output from the A / D converter 15 to another processing unit via the system bus 34. An image input control unit 23 and an SDRAM 22 for temporarily storing image data transferred from the image input control unit 23 are provided. The image data stored in the SDRAM 22 is RAW data.

また、デジタルカメラ1は、フラッシュ11と、フラッシュ11の発光タイミングや発光量を制御するフラッシュ制御部19と、レンズ駆動部16にレンズの移動を指示して焦点合わせを行う焦点調節部20と、絞り値とシャッタ速度を決定し、絞り駆動部17とタイミングジェネレータ18に指示信号を送出する露出調整部21と、SDRAM22に記憶されている画像データを対象として顔の検出処理を実行し、顔の有無を示す値、さらに顔が有る場合には検出された顔に相当する領域を示す情報(以下、領域情報)を出力する顔領域抽出部(顔検出部)24を備える。フラッシュ制御部19、焦点調節部20および露出調整部21は、SDRAM22に記憶されている画像データのほか、顔領域抽出部24が実行した検出処理の結果を参照して処理を行うこともある。顔の検出結果を参照して露出調整を行う方法としては、例えば特開2001−215404号公報、特開2003−107555号公報などに開示されている方法を用いることができる。また、顔の検出結果を参照して焦点調節を行う方法としては、例えば特開2006−145629号公報に開示されている方法を用いることができる。フラッシュ制御部19、焦点調節部20および露出調整部21が、顔領域抽出部24から出力される検出結果を参照するか否かは、撮影モードその他の設定値によって決まる。   Further, the digital camera 1 includes a flash 11, a flash control unit 19 that controls the light emission timing and the light emission amount of the flash 11, a focus adjustment unit 20 that instructs the lens driving unit 16 to move the lens, and performs focusing. An aperture value and a shutter speed are determined, an exposure adjustment unit 21 that sends an instruction signal to the aperture drive unit 17 and the timing generator 18, and face detection processing is executed on the image data stored in the SDRAM 22. A face region extraction unit (face detection unit) 24 that outputs a value indicating presence / absence, and information (hereinafter, region information) indicating a region corresponding to the detected face when there is a face is provided. The flash control unit 19, the focus adjustment unit 20, and the exposure adjustment unit 21 may perform processing with reference to the result of detection processing executed by the face area extraction unit 24 in addition to the image data stored in the SDRAM 22. As a method for performing exposure adjustment with reference to the face detection result, for example, methods disclosed in Japanese Patent Laid-Open Nos. 2001-215404 and 2003-107555 can be used. As a method for performing focus adjustment with reference to the face detection result, for example, a method disclosed in Japanese Patent Application Laid-Open No. 2006-145629 can be used. Whether or not the flash control unit 19, the focus adjustment unit 20, and the exposure adjustment unit 21 refer to the detection result output from the face area extraction unit 24 depends on the shooting mode and other setting values.

デジタルカメラ1は、この他、SDRAM22に記憶されている画像データに対して画像処理を施す画像処理部25を備える。画像処理部25は、画像を自然な色合い、明るさにするための色階調補正や明るさ補正、また画像データが赤目を含むものであるときに赤目を黒目に修正する処理など、画像の見栄えを良くするための各種仕上げ処理を行った後、処理済画像データを再度SDRAM22に格納する。   In addition, the digital camera 1 includes an image processing unit 25 that performs image processing on image data stored in the SDRAM 22. The image processing unit 25 enhances the appearance of the image, such as color tone correction and brightness correction for natural color and brightness of the image, and processing for correcting red eyes to black eyes when the image data includes red eyes. After various finishing processes for improving the quality, the processed image data is stored in the SDRAM 22 again.

また、デジタルカメラ1は、SDRAM22に記憶されている画像データの液晶モニタ(LCD:Liquid Crystal Display)27への出力を制御する表示制御部26を備える。表示制御部26は、SDRAM22に記憶されている画像データの画素数を、表示に適した大きさとなるように間引きしてから液晶モニタ27に出力する。   The digital camera 1 also includes a display control unit 26 that controls the output of image data stored in the SDRAM 22 to a liquid crystal monitor (LCD) 27. The display control unit 26 thins out the number of pixels of the image data stored in the SDRAM 22 so as to have a size suitable for display, and then outputs it to the liquid crystal monitor 27.

また、デジタルカメラ1は、SDRAM22に記憶されている画像データのメモリカード29への書込み、およびメモリカード29に記録されている画像データのSDRAM22へのロードを制御する記録読出制御部28を備える。記録読出制御部28は、ユーザの設定に応じてRAWデータをそのまま、もしくは圧縮符号化によりJPEGデータに変換してからメモリカード29に記録する。JPEGデータをロードするときは、その逆の変換を行ってからデータをSDRAM22にロードする。   The digital camera 1 also includes a recording / reading control unit 28 that controls writing of image data stored in the SDRAM 22 to the memory card 29 and loading of the image data recorded on the memory card 29 to the SDRAM 22. The recording / reading control unit 28 records the RAW data as it is or converted into JPEG data by compression encoding according to the setting of the user and then recorded on the memory card 29. When loading JPEG data, the reverse conversion is performed before loading the data into the SDRAM 22.

また、デジタルカメラ1は、ジャイロセンサなどにより構成される手ブレ検出部35を備える。手ぶれ検出部35は撮影時の手ブレを検出すると、フラッシュ制御部19、露出調整部21、画像処理部25に検出されたブレ量の情報を供給する。露出調整部21は、手ブレが検出されたときには手ブレが検出されないときよりもシャッタ速度を短く設定し、取得画像に対する手ブレの影響を軽減する。また、画像処理部25は、手ブレが検出されたとき、取得後の画像データに対しブレを補正する画像処理を施す。   The digital camera 1 also includes a camera shake detection unit 35 configured by a gyro sensor or the like. When the camera shake detection unit 35 detects a camera shake at the time of photographing, the camera shake detection unit 35 supplies information on the detected blur amount to the flash control unit 19, the exposure adjustment unit 21, and the image processing unit 25. The exposure adjustment unit 21 sets the shutter speed shorter when the camera shake is detected than when the camera shake is not detected, thereby reducing the influence of the camera shake on the acquired image. In addition, when camera shake is detected, the image processing unit 25 performs image processing for correcting the shake on the acquired image data.

デジタルカメラ1は、この他、CPU(Central Processor Unit)31、操作/制御プログラムが格納されたRAM(Random Access Memory)32、各種設定値が記憶されているEEPROM(Electronically Erasable and Programmable Read Only Memory)33からなる全体制御部30を備える。全体制御部30は、モードダイヤルによる撮影モードの設定をはじめユーザが行う各種設定操作を検出し、設定された内容をEEPROM33に記憶せしめる。そして、その設定操作が行われたとき、もしくは撮影操作が行われたときに、EEPROMに記憶された設定値にしたがって、前述したフラッシュ制御部19、焦点調節部20、露出調整部21、画像入力制御部23、顔領域抽出部24、画像処理部25、表示制御部26、記録読出制御部29に対し、システムバス34を介して、実行すべき処理や、その処理の実行タイミングを指示する信号を送出する。   In addition, the digital camera 1 includes a CPU (Central Processor Unit) 31, a RAM (Random Access Memory) 32 in which an operation / control program is stored, and an EEPROM (Electronically Erasable and Programmable Read Only Memory) in which various setting values are stored. An overall control unit 30 is provided. The overall control unit 30 detects various setting operations performed by the user including the setting of the shooting mode by the mode dial, and stores the set contents in the EEPROM 33. Then, when the setting operation is performed or when the photographing operation is performed, the flash control unit 19, the focus adjustment unit 20, the exposure adjustment unit 21, and the image input described above according to the setting values stored in the EEPROM. A signal for instructing the control unit 23, the face area extraction unit 24, the image processing unit 25, the display control unit 26, and the recording / reading control unit 29 via the system bus 34 and the execution timing of the processing. Is sent out.

図3に、フラッシュ制御部19の構成とフラッシュ制御部19の入出力データを示す。フラッシュ制御部19は、図に示すように、第1演算手段41、第2演算手段42、パラメータ記憶手段43および発光量決定手段44を備える。第1演算手段41、第2演算手段42および発光量決定手段44は、後述する演算を実行する演算回路であり、パラメータ記憶手段43はEEPROMである。但し、パラメータ記憶手段43は、必ずしもフラッシュ制御部19の構成要素でなくてもよい。例えば、全体制御部30が備えるEEPROM33をパラメータ記憶手段43として利用してもよい。   FIG. 3 shows the configuration of the flash control unit 19 and the input / output data of the flash control unit 19. As shown in the figure, the flash control unit 19 includes first calculation means 41, second calculation means 42, parameter storage means 43, and light emission amount determination means 44. The first calculation means 41, the second calculation means 42, and the light emission amount determination means 44 are calculation circuits that execute calculations described later, and the parameter storage means 43 is an EEPROM. However, the parameter storage unit 43 is not necessarily a component of the flash control unit 19. For example, the EEPROM 33 provided in the overall control unit 30 may be used as the parameter storage unit 43.

第1演算手段41は、全体制御部30の制御の下、画像入力制御部23から、非発光時画像データと予備発光時画像データの供給を受ける。予備発光時画像データは、撮像部が、全体制御部30の制御の下で、フラッシュ11による予備発光と同期して撮影した画像データである。非発光時画像データは、その予備発光の直前または直後に、撮像部により撮影された画像データである。第1演算手段は、これら2種類の画像を用いて、後述する演算処理を実行することにより、顔を考慮しない場合のフラッシュ発光量の仮適正値Cnを求め、出力する。   The first calculation means 41 receives supply of non-light emission image data and preliminary light emission image data from the image input control unit 23 under the control of the overall control unit 30. Preliminary light emission image data is image data taken by the imaging unit in synchronization with preliminary light emission by the flash 11 under the control of the overall control unit 30. The non-light emitting image data is image data taken by the imaging unit immediately before or after the preliminary light emission. The first calculation means obtains and outputs a temporary appropriate value Cn of the flash light emission amount when the face is not taken into consideration by executing calculation processing described later using these two types of images.

第2演算手段42は、第1演算手段と同様、全体制御部30の制御の下、画像入力制御部23から、非発光時画像データと予備発光時画像データの供給を受ける。第2演算手段42は、この他、顔領域抽出部24から、顔に相当する領域を示す領域情報の供給を受ける。顔領域抽出部24により複数の顔が検出されていた場合には、検出された顔の数と同数の領域情報の供給を受ける。そして、2種類の画像と領域情報とを用いて、顔ごとに、後述する演算処理を実行することにより、顔を考慮した場合のフラッシュ発光量の仮適正値Cf1〜CfNを求め、出力する。   Similar to the first calculation means, the second calculation means 42 receives the non-light emission image data and the preliminary light emission image data from the image input control section 23 under the control of the overall control section 30. In addition, the second calculation means 42 receives supply of area information indicating an area corresponding to the face from the face area extracting unit 24. When a plurality of faces are detected by the face area extraction unit 24, the same number of area information as the number of detected faces is supplied. Then, by using the two types of images and area information, a calculation process described later is executed for each face to obtain and output temporary appropriate values Cf1 to CfN of the flash emission amount when the face is considered.

パラメータ記憶手段43が記憶するパラメータαは設定により可変なパラメータであり、顔領域抽出部24や手ブレ検出部35によって設定される。あるいは全体制御部30が、顔領域抽出部24や手ブレ検出部35の出力を受けて、パラメータαを設定する。顔領域抽出部24がパラメータを設定するときは、抽出した領域ごとに1つの値を設定する。手ブレ検出部35や焦点調節部20は、顔領域抽出部24が抽出した領域の数に関係なく、1つの値を設定する。   The parameter α stored in the parameter storage unit 43 is a parameter that can be changed by setting, and is set by the face area extraction unit 24 and the camera shake detection unit 35. Alternatively, the overall control unit 30 receives the outputs of the face area extraction unit 24 and the camera shake detection unit 35 and sets the parameter α. When the face area extracting unit 24 sets parameters, one value is set for each extracted area. The camera shake detection unit 35 and the focus adjustment unit 20 set one value regardless of the number of regions extracted by the face region extraction unit 24.

発光量決定手段44は、第1演算手段41から出力された仮適正値Cnと、第2演算手段から出力された仮適正値Cf1〜CfNと、パラメータ記憶手段43から読み出したパラメータαとを利用して本発光の発光量を決定し、その決定に基づいてフラッシュ11の発光量を制御する。   The light emission amount determination means 44 uses the temporary appropriate value Cn output from the first calculation means 41, the temporary appropriate values Cf1 to CfN output from the second calculation means, and the parameter α read from the parameter storage means 43. Thus, the light emission amount of the main light emission is determined, and the light emission amount of the flash 11 is controlled based on the determination.

以下、第1演算手段41、第2演算手段42および発光量決定手段44が行う処理について、さらに説明する。第1演算手段41と第2演算手段42は、入力された非発光時画像データおよび予備発光時画像データを、複数の領域ブロックに分割する。図4は、領域ブロックへの分割の一例を示す図であり、画像データ45(非発光時画像データまたは予備発光時画像データ)を、n×m個の領域ブロックに分割したところを示している。以下の説明では、図に例示している(1,1)、(n,m)といった符号により、位置が異なる領域ブロックを区別するものとする。   Hereinafter, the processing performed by the first calculation unit 41, the second calculation unit 42, and the light emission amount determination unit 44 will be further described. The first calculating means 41 and the second calculating means 42 divide the inputted non-light emitting image data and preliminary light emitting image data into a plurality of area blocks. FIG. 4 is a diagram showing an example of division into area blocks, and shows that image data 45 (non-light emission image data or preliminary light emission image data) is divided into n × m area blocks. . In the following description, region blocks having different positions are distinguished by reference numerals (1, 1) and (n, m) illustrated in the drawings.

図5は、第1演算手段の処理を示すフローチャートである。第1演算手段41は、非発光時画像データの領域ブロックごとの輝度情報Ya(1,1)〜Ya(n,m)を取得する(S101)。例えば、非発光時画像データをRGB−YCC変換し、各画素の輝度値を求め、その画素輝度値の領域ごとの平均値を求め、輝度情報Yaとする。予備発光時画像データについても、同様の手順により、各領域ブロックの輝度情報Yb(1,1)〜Yb(n,m)を取得する(S102)。   FIG. 5 is a flowchart showing the processing of the first calculation means. The first calculation means 41 acquires luminance information Ya (1, 1) to Ya (n, m) for each area block of the non-light emitting image data (S101). For example, RGB-YCC conversion is performed on non-light-emitting image data, the luminance value of each pixel is obtained, and the average value of each pixel luminance value for each region is obtained as luminance information Ya. With respect to the image data at the time of preliminary light emission, the luminance information Yb (1, 1) to Yb (n, m) of each area block is acquired in the same procedure (S102).

続いて第1演算手段41は、領域ブロック(x、y)ごとに、ステップS102で取得した輝度情報Yb(x、y)とステップS101で取得した輝度情報Ya(x、y)との差分Ydを計算する(S103)。そして、全領域ブロックの差分Yd(1,1)〜Yd(n,m)に基づいて、顔を考慮しない場合のフラッシュ発光量の適正値(仮適正値Cn)を決定し、出力する(S104)。例えば、差分Yd(1,1)〜Yd(n,m)の単純平均あるいは加重平均などから被写体からの単位発光量あたりの反射光量を推定し、そこから最適な露出が得られる反射光量となる発光量を求め、これを仮適正値Cnとする。差分Yd(1,1)〜Yd(n,m)の加重平均を求めるときは、例えば画像の中央に近い領域ブロックの重み付けを大きくするなど、顔に依存しない重み付けを行う。   Subsequently, the first calculation unit 41 calculates, for each region block (x, y), the difference Yd between the luminance information Yb (x, y) acquired in step S102 and the luminance information Ya (x, y) acquired in step S101. Is calculated (S103). Then, based on the differences Yd (1,1) to Yd (n, m) of all area blocks, an appropriate value (temporary appropriate value Cn) of the flash emission amount when the face is not considered is determined and output (S104). ). For example, the amount of reflected light per unit light emission amount from the subject is estimated from the simple average or weighted average of the differences Yd (1,1) to Yd (n, m), and the amount of reflected light from which optimal exposure can be obtained. The amount of light emission is obtained and this is set as a temporary appropriate value Cn. When calculating the weighted average of the differences Yd (1,1) to Yd (n, m), weighting that does not depend on the face is performed, for example, by increasing the weight of the area block near the center of the image.

図6は、第2演算手段の処理を示すフローチャートである。以下、図4に例示したように、顔領域抽出部24により3つの領域46a、46bおよび46cが抽出された場合を例示しながら説明する。第2演算手段は、まずカウンタiの値を1に初期化する(S201)。そして、顔領域抽出部24から供給されたi番目(ここでは1番目)の領域情報が示す領域46aに対応する領域ブロック群47aを選択する(S202)。例えば、各領域ブロックについて領域46aと重なる範囲の面積を計算し、面積の半分以上が領域46aと重なっているブロック群47aを選択する。   FIG. 6 is a flowchart showing the processing of the second calculation means. Hereinafter, as illustrated in FIG. 4, the case where three areas 46 a, 46 b, and 46 c are extracted by the face area extracting unit 24 will be described. The second calculation means first initializes the value of the counter i to 1 (S201). Then, the area block group 47a corresponding to the area 46a indicated by the i-th (here, first) area information supplied from the face area extracting unit 24 is selected (S202). For example, the area of a range that overlaps the region 46a is calculated for each region block, and the block group 47a in which half or more of the area overlaps the region 46a is selected.

続いて、第2演算手段は、非発光時画像データについて、選択された領域ブロックの輝度情報Ya(p、q)を取得する(S203)。さらに、予備発光時画像データについても、選択された領域ブロックの輝度情報Yb(p、q)を取得する(S204)。図4の例であれば、領域46aについて選択されたブロック群47aは12個の領域ブロックを含んでいるので、ブロック12個分の輝度情報Ya(p1、q1)〜Ya(p12、q12)とYb(p1、q1)〜Yb(p12、q12)を取得する。   Subsequently, the second calculation means obtains the luminance information Ya (p, q) of the selected area block for the non-light emitting image data (S203). Further, the luminance information Yb (p, q) of the selected area block is also acquired for the preliminary light emission image data (S204). In the example of FIG. 4, since the block group 47a selected for the region 46a includes 12 region blocks, luminance information Ya (p1, q1) to Ya (p12, q12) for 12 blocks and Yb (p1, q1) to Yb (p12, q12) are acquired.

続いて、選択された領域ブロックごとに、ステップS204で取得した輝度情報Yb(p,q)とステップS203で取得した輝度情報Ya(p,q)との差分Yd(p,q)を計算し(S205)、選択された領域ブロックについて求められた差分Yd(p,q)に基づいて、顔を考慮する場合のフラッシュ発光量の適正値(仮適正値Cf1)を決定する(S206)。図4の例であれば、ブロック12個分の差分Yd(p1,q1)〜Yd(p12、q12)を求め、これらの差分に基づいて仮適正値Cf1を決定する。例えば、差分Yd(p1,q1)〜Yd(p12、q12)の単純平均から被写体からの単位発光量あたりの反射光量を推定し、最適な露出が得られる反射光量となる発光量を求め、これを仮適正値Cf1とする。   Subsequently, for each selected area block, the difference Yd (p, q) between the luminance information Yb (p, q) acquired in step S204 and the luminance information Ya (p, q) acquired in step S203 is calculated. (S205) Based on the difference Yd (p, q) obtained for the selected area block, an appropriate value (temporary appropriate value Cf1) of the flash emission amount when considering the face is determined (S206). In the example of FIG. 4, differences Yd (p1, q1) to Yd (p12, q12) for 12 blocks are obtained, and a provisional appropriate value Cf1 is determined based on these differences. For example, the amount of reflected light per unit light emission amount from the subject is estimated from the simple average of the differences Yd (p1, q1) to Yd (p12, q12), and the light emission amount to obtain the reflected light amount that provides the optimum exposure is obtained. Is a temporary appropriate value Cf1.

第2演算手段42は、上記ステップS202〜S206までの処理を、カウンタ値iが検出された顔の数Nと一致するまで繰り返す(S207)。図4の例では、検出された顔は3つあるので、カウンタをカウントアップし(S208)、領域46bとブロック群47b、領域46cとブロック群47cについて、それぞれ、ステップS202〜S206までの処理を実行する。N個の領域について上記処理が完了すると(S207)、第2演算手段42は、ステップS206において求められた仮適正値Cf1〜CfNを出力する(S209)。図4の例では、3個の仮適正値Cf1、Cf2およびCf3が出力される。   The second calculating means 42 repeats the processing from step S202 to S206 until the counter value i matches the number N of detected faces (S207). In the example of FIG. 4, since there are three detected faces, the counter is counted up (S208), and the processing from steps S202 to S206 is performed for the region 46b and the block group 47b, and the region 46c and the block group 47c, respectively. Execute. When the above processing is completed for N regions (S207), the second calculation means 42 outputs the temporary appropriate values Cf1 to CfN obtained in step S206 (S209). In the example of FIG. 4, three provisional appropriate values Cf1, Cf2, and Cf3 are output.

発光量決定手段44は、第1演算手段41が出力した仮適正値Cnと、第2演算手段42が出力した仮適正値Cf1〜CfNを基準値とする調整を行うことにより、フラッシュ11の適正発光量Chを決定する。本実施形態ではパラメータ記憶手段43に記憶されているパラメータαに基づいて発光量の調整を行う。具体的には、発光量決定手段44は、次式(1)、(2)に基づく演算を行うことにより、適正発光量Chを決定する。   The light emission amount determining means 44 performs adjustment using the temporary appropriate value Cn output from the first calculating means 41 and the temporary appropriate values Cf1 to CfN output from the second calculating means 42 as reference values, thereby adjusting the appropriateness of the flash 11. The light emission amount Ch is determined. In the present embodiment, the light emission amount is adjusted based on the parameter α stored in the parameter storage unit 43. Specifically, the light emission amount determining means 44 determines the appropriate light emission amount Ch by performing calculations based on the following equations (1) and (2).

Cf = minimum(Cf1,Cf2・・・CfN) … (1)
適正発光量Ch=Cn×(1−α)+Cf×α …(2)
つまり、複数の顔について、それぞれ求められた仮適正値の中から、値が最小のものを選択し((1)式)、その値Cf(Cfmin)と、仮適正値Cnとを基準とした調整を行うことにより、適正発光量Chを求める((2)式)。値が最小の仮適正値を調整の基準とするのは、適正発光量が最小となる顔は、最も反射が強く白とびしやすい顔であるので、この顔について白とびが発生しないように発光量を調整しておけば、すべての顔について白とびを防止することができるからである。例えば図4の例であれば、最も大きな顔について求められた発光量の仮適正値Cf1が最小値となるので、Cf=Cf1となる。
Cf = minimum (Cf1, Cf2... CfN) (1)
Appropriate light emission amount Ch = Cn × (1−α) + Cf × α (2)
That is, for a plurality of faces, the one with the smallest value is selected from the calculated temporary appropriate values (Equation (1)), and the value Cf (Cfmin) and the temporary appropriate value Cn are used as a reference. By performing the adjustment, an appropriate light emission amount Ch is obtained (Equation (2)). The minimum appropriate value is used as the reference for adjustment because the face with the smallest appropriate amount of light emission is the face that is the most reflective and prone to overexposure. This is because if the amount is adjusted, overexposure can be prevented for all faces. For example, in the example of FIG. 4, the provisional appropriate value Cf1 of the light emission amount obtained for the largest face is the minimum value, so Cf = Cf1.

パラメータαは前述したとおり、顔領域抽出部24、手ブレ検出部35あるいは焦点調節部20により設定され、顔領域抽出部24により設定される場合には、顔ごとの値が設定される。パラメータの値が顔ごとに記憶されている場合、(2)式において用いる値αとしては、(1)式において選択された仮適正値に対応する顔について設定された値が選択される。図4の例では、3つのパラメータα1、α2およびα3がパラメータ記憶手段43に記憶されているが、(2)式において用いられる値αはα1となる。   As described above, the parameter α is set by the face area extraction unit 24, the camera shake detection unit 35, or the focus adjustment unit 20, and when set by the face area extraction unit 24, a value for each face is set. When parameter values are stored for each face, a value set for the face corresponding to the temporary appropriate value selected in equation (1) is selected as the value α used in equation (2). In the example of FIG. 4, three parameters α1, α2 and α3 are stored in the parameter storage means 43, but the value α used in the equation (2) is α1.

以下、顔領域抽出部24によるパラメータαの設定処理について説明する。顔を考慮した調光は、顔の検出に用いられる画像データと調光に用いられる画像データが同じであることを前提としている。しかし実際の撮影では、顔の検出から非発光時画像データの取得までの間、あるいは非発光時画像データの取得から予備発光時画像データの取得までの間に、数十ミリ秒以上のタイムラグがあるため、この間に被写体が動いたり、手ブレが生じたりすると、各処理に用いられる画像データが互いに異なるものとなってしまうことがある。   Hereinafter, the parameter α setting process performed by the face area extraction unit 24 will be described. The dimming considering the face is based on the premise that the image data used for face detection and the image data used for dimming are the same. However, in actual shooting, there is a time lag of several tens of milliseconds between the detection of the face and the acquisition of image data at the time of non-light emission, or the acquisition of image data at the time of non-light emission and the acquisition of image data at the time of preliminary light emission. Therefore, if the subject moves during this time or if camera shake occurs, the image data used for each process may be different from each other.

図7A、図7B、図8Aおよび図8Bは、画像データと領域情報が示す領域と図6のステップS202において選択される領域ブロックの関係を示す図である。画像データ48は顔領域抽出部24が顔の検出処理に用いた画像データで、画像データ45はフラッシュ制御部19が調光に用いた画像データ(非発光時画像データあるいは予備発光時画像データ)である。図7Bおよび図8Bの楕円49は、調光時の顔の位置を示している。   FIG. 7A, FIG. 7B, FIG. 8A, and FIG. 8B are diagrams showing the relationship between the region indicated by the image data and the region information and the region block selected in step S202 of FIG. The image data 48 is image data used by the face area extraction unit 24 for face detection processing, and the image data 45 is image data used for light control by the flash control unit 19 (image data when no light is emitted or image data when preliminary light is emitted). It is. An ellipse 49 in FIGS. 7B and 8B indicates the position of the face during dimming.

図7Aおよび図7Bに示すように、画像に占める顔の割合が比較的大きい場合には、顔の位置が顔検出時と多少ずれていても、選択されたブロック群47dの大半は、ずれた後の顔(楕円49)に対応している。よって、ずれが生じてしまったとしても、選択されたブロック群47dの輝度情報は、調光を行う上で参照に値する。しかし、図8Aおよび図8Bに示すように、画像に占める顔の割合が小さく、顔領域46eに対応するブロックが1つしか無いような場合には、顔の位置がずれてしまったことにより、ブロック47eは顔領域46eと対応しなくなる。この場合、ブロック47eの輝度情報は、顔を考慮した調光処理では、もはや参照に値しない。これは、第2演算手段により求められる仮適正値Cfiの信頼度が、画像に占める顔の割合が大きいほど高く、顔の割合が小さいほど低いことを意味する。   As shown in FIGS. 7A and 7B, when the proportion of the face in the image is relatively large, even if the position of the face is slightly deviated from the time of face detection, most of the selected block group 47d is deviated. It corresponds to the back face (ellipse 49). Therefore, even if a deviation occurs, the luminance information of the selected block group 47d is worth reference when performing dimming. However, as shown in FIG. 8A and FIG. 8B, when the ratio of the face to the image is small and there is only one block corresponding to the face area 46e, the position of the face has shifted, The block 47e does not correspond to the face area 46e. In this case, the luminance information of the block 47e is no longer worth reference in the dimming process considering the face. This means that the reliability of the temporary appropriate value Cfi obtained by the second calculation means is higher as the ratio of the face in the image is larger, and lower as the ratio of the face is smaller.

そこで、本実施形態では、顔領域抽出部24は、顔の抽出処理が完了した後、検出された顔ごとに、その顔に相当する領域として抽出された領域の、画像の横幅に対する割合を計算する。そして、顔の割合とパラメータαとの対応付けを定義したルックアップテーブル(LUT)を参照することにより、検出された顔ごとにパラメータαの値を決定する。顔領域抽出部24は、N個の顔が検出された場合には、N個のパラメータ値α1〜αNを決定し、フラッシュ制御部19のパラメータ記憶手段43に、それらの値を記憶せしめる。図4の例では、前述のとおり3つのパラメータα1、α2およびα3がパラメータ記憶手段43に記憶される。ここで、LUTの参照に代えて、LUTと同等の変換を行う回路あるいはプログラムを採用してもよいことは言うまでもない。   Therefore, in the present embodiment, the face area extraction unit 24 calculates, for each detected face, the ratio of the area extracted as the area corresponding to the face to the width of the image after the face extraction process is completed. To do. Then, the value of the parameter α is determined for each detected face by referring to a look-up table (LUT) that defines the correspondence between the face ratio and the parameter α. When N faces are detected, the face area extraction unit 24 determines N parameter values α1 to αN, and stores these values in the parameter storage unit 43 of the flash control unit 19. In the example of FIG. 4, the three parameters α1, α2, and α3 are stored in the parameter storage unit 43 as described above. Here, it goes without saying that instead of referring to the LUT, a circuit or program for performing conversion equivalent to the LUT may be adopted.

図9に、LUTの一例を示す。このLUTによれば、顔の割合が所定の閾値Th1を下回るときには、パラメータαは、ゼロではない所定の下限値αLに設定される。また、顔の割合が所定の閾値Th2を上回るときには、パラメータαは、1ではない所定の上限値αUに設定される。そして、顔の割合が閾値Th1以上閾値Th2以下であるときは、パラメータαは、下限値αLから上限値αUまでの範囲で、顔の割合が小さいほど小さく、大きいほど大きな値に設定される。このLUTを使って設定された値を用いて(2)の演算処理を行えば、画像に占める顔の割合が小さいときには発光量調整における仮適正値Cfの影響力が弱まり、被写体が動いたり手ブレが生じたりしても、演算により求まる発光量が適正範囲を大きく外れることはなくなる。   FIG. 9 shows an example of the LUT. According to this LUT, when the face ratio falls below a predetermined threshold value Th1, the parameter α is set to a predetermined lower limit value αL that is not zero. When the face ratio exceeds the predetermined threshold Th2, the parameter α is set to a predetermined upper limit value αU that is not 1. When the face ratio is greater than or equal to the threshold Th1 and less than or equal to the threshold Th2, the parameter α is set to a smaller value as the face ratio is smaller and larger as the face ratio is smaller in the range from the lower limit value αL to the upper limit value αU. If the calculation process (2) is performed using the value set using this LUT, the influence of the temporary appropriate value Cf in the light emission amount adjustment is weakened when the proportion of the face in the image is small, and the subject moves or moves. Even if blurring occurs, the amount of light emission obtained by calculation does not greatly deviate from the appropriate range.

なお、上記処理では、画像の横幅に対する顔の横幅の割合を計算しているが、画像に占める顔の割合の指標となる値であれば、計算する値はどのような値であってもよい。例えば、抽出された領域の面積や画素数、画像全体の面積に対する顔の面積比などを計算してもよい。あるいは、顔の横幅と2つの目の間隔とは相関関係があるので、目を検出して目と目の間隔を求め、これを画像に占める顔の割合を示す指標値として演算に利用してもよい。すなわち、LUTの横軸として設定されるパラメータは、上記処理の目的に適うものであれば特に限定されない。また、上記LUTでは、閾値Th1以上閾値Th2以下の範囲においてパラメータの値が線形的に増加するが、非線形に増加する(LUTが非線形カーブを描く)ようにしてもよい。また、閾値Th1、Th2も、設計方針に応じて任意に定めることができるので、上記例のように閾値で区切られた一部の範囲においてのみαの値が単調増加するLUTのほか、閾値を設けずαの値が全範囲にわたって単調増加するようなLUTも採用し得る。   In the above processing, the ratio of the width of the face to the width of the image is calculated. However, any value may be used as long as the value is an index of the ratio of the face to the image. . For example, the area of the extracted region, the number of pixels, the area ratio of the face to the area of the entire image, and the like may be calculated. Alternatively, since the width of the face and the interval between the two eyes are correlated, the eyes are detected to determine the interval between the eyes, and this is used as an index value indicating the ratio of the face in the image. Also good. That is, the parameter set as the horizontal axis of the LUT is not particularly limited as long as it meets the purpose of the above processing. In the LUT, the parameter value increases linearly in the range from the threshold Th1 to the threshold Th2, but may increase nonlinearly (the LUT draws a nonlinear curve). Further, since the threshold values Th1 and Th2 can be arbitrarily determined according to the design policy, in addition to the LUT in which the value of α increases monotonously only in a part of the range delimited by the threshold values as in the above example, the threshold values are set. An LUT in which the value of α is monotonically increased over the entire range without being provided may also be employed.

パラメータαの決定方針とパラメータの決定に使用するLUTとしては、他にも種々考えられる。例えば、人物の顔が画像の端で検出された場合には、その人物は撮影対象ではない可能性がある。よって、図10に例示するLUTは、抽出された領域の位置が、画像の左端からの距離にしてTh3以上、Th4以下であれば、パラメータαの値を上限値αUとし、抽出された領域の位置がそれ以外、すなわち画像の端に近い位置にあるときはパラメータαの値を下限値αLとするものである。このLUTを使って設定された値を用いて(2)の演算処理を行えば、検出された顔が中央付近に位置するときには発光量調整における仮適正値Cfの影響力が強まり、反対に端に位置するときには発光量調整における仮適正値Cfの影響力が弱まる。   There are various other LUTs used for determining the parameter α and for determining the parameter. For example, when a person's face is detected at the edge of the image, the person may not be a subject to be photographed. Therefore, in the LUT illustrated in FIG. 10, if the position of the extracted region is greater than or equal to Th3 and less than or equal to Th4 as the distance from the left end of the image, the value of the parameter α is set to the upper limit value αU, and When the position is other than that, that is, near the end of the image, the value of the parameter α is set to the lower limit value αL. If the calculation process (2) is performed using the value set using this LUT, when the detected face is located near the center, the influence of the temporary appropriate value Cf in the light emission amount adjustment is increased. When the position is located, the influence of the temporary appropriate value Cf in the light emission amount adjustment is weakened.

また、検出された顔の傾き(首の傾げ具合)や顔の向き(正面顔、横顔)によって、パラメータαの値を決める方法も考えられる。顔領域抽出部24が行う顔検出処理では、学習のしかたにもよるが、首を傾げた顔や横向きの顔は、垂直な正面顔に比べれば誤検出が発生する確率が高い。すなわち、顔領域の情報を利用して求められた仮適正値Cfの信頼度は、検出された顔の傾きが垂直であるほど高く、また正面に近い向きであるほど高い。そこで、図11に示すように、横軸を顔の傾きとし、顔が垂直もしくは垂直に順ずる傾きのときには、パラメータαの値が上限値αUに設定され、顔の傾きが所定の閾値Th6あるいはTh7を超えたときは傾きが大きいほどパラメータαの値が小さく設定され、傾きが次の閾値Th5およびTh8を超えて水平もしくは水平に近くなったときには、パラメータαの値が下限値αLに設定されるようにLUTを定義する。もしくは、横軸を顔の向きとした同様のLUTを定義する。これらのLUTを使って設定された値を用いて(2)の演算処理を行えば、仮適正値Cfの信頼度が高いときには発光量調整における仮適正値Cfの影響力が強まり、反対に、仮適正値Cfの信頼度が低いときには発光量調整における仮適正値Cfの影響力が弱まることとなる。   Also, a method of determining the value of the parameter α depending on the detected face inclination (degree of neck tilt) and face orientation (front face, side face) is conceivable. In the face detection processing performed by the face area extraction unit 24, although depending on how it is learned, a face with a tilted neck or a face facing sideways has a higher probability of erroneous detection than a vertical front face. That is, the reliability of the temporary appropriate value Cf obtained by using the information on the face area is higher as the detected face inclination is vertical and closer to the front. Therefore, as shown in FIG. 11, when the horizontal axis is a face inclination and the face is inclined vertically or vertically, the value of the parameter α is set to the upper limit value αU, and the face inclination is set to a predetermined threshold Th6 or When Th7 is exceeded, the value of the parameter α is set to be smaller as the inclination is larger. When the inclination exceeds the next threshold values Th5 and Th8 and becomes horizontal or nearly horizontal, the value of the parameter α is set to the lower limit value αL. The LUT is defined as follows. Alternatively, a similar LUT is defined with the horizontal axis as the face orientation. If the calculation process (2) is performed using the values set using these LUTs, when the reliability of the temporary appropriate value Cf is high, the influence of the temporary appropriate value Cf in the light emission amount adjustment increases. When the reliability of the temporary appropriate value Cf is low, the influence of the temporary appropriate value Cf in the light emission amount adjustment is weakened.

なお、前述したとおりパラメータαは手ブレのブレ量や、焦点距離に応じた値を設定してもよい。例えば、検出された手ブレのブレ量が所定の閾値を越えているときに、パラメータαの値を下限値αLに設定する。あるいは、焦点距離が長いときには手ブレの影響が強く出やすいので、焦点距離が所定の閾値以上となったときに、パラメータαの値を下限値αLに設定する。ブレ量や焦点距離は、検出された顔とは無関係であるため、ブレ量や焦点距離に基づいてパラメータαが設定された場合には、仮適正値Cfとして顔別適正値Cf1〜CfNのいずれが選択されたかに拘わらず、パラメータ記憶手段43に記憶されている値が演算に用いられることとなる。   As described above, the parameter α may be set to a value corresponding to the amount of camera shake or the focal length. For example, when the detected camera shake amount exceeds a predetermined threshold, the value of the parameter α is set to the lower limit value αL. Alternatively, when the focal length is long, the effect of camera shake is likely to be strong, so when the focal length exceeds a predetermined threshold value, the value of the parameter α is set to the lower limit value αL. Since the amount of blur and the focal length are irrelevant to the detected face, when the parameter α is set based on the amount of blur or the focal length, any of the face-specific appropriate values Cf1 to CfN is set as the temporary appropriate value Cf. Regardless of whether or not is selected, the value stored in the parameter storage means 43 is used for the calculation.

なお、パラメータαの設定をどの処理部が行うか、あるいはどのようなLUTを利用するかは、撮影モードなどの設定に応じて切り替えてもよいが、単にパラメータを記憶するだけのパラメータ記憶手段43に代えて、複数の処理部からの設定入力を受け付けて、入力された複数の値を使って、新たに最適なパラメータ値を求める手段を設けてもよい。   Note that which processing unit performs the setting of the parameter α or which LUT is used may be switched according to the setting of the shooting mode or the like, but the parameter storage unit 43 that simply stores the parameter. Instead of this, there may be provided means for receiving setting inputs from a plurality of processing units and newly obtaining an optimum parameter value using a plurality of input values.

また、上記構成によれば、顔の検出結果を利用して調光を行うことに問題があることを察知もしくは予測できたときに、発光量調整における仮適正値Cfの影響力を抑えることができるが、実際の撮影では、デジタルカメラが事前に察知もしくは予測できないような問題(例えば、顔の誤検出)も起こり得る。よって、上記構成に対しさらに、上記問題が発生した場合でも、発光量決定手段44により決定された発光量が、適正値を大きく外れないようにする機能を備えてもよい。   Further, according to the above configuration, when it is detected or predicted that there is a problem in performing dimming using the face detection result, it is possible to suppress the influence of the temporary appropriate value Cf in the light emission amount adjustment. However, in actual shooting, a problem that the digital camera cannot detect or predict in advance (for example, erroneous detection of a face) may occur. Therefore, a function for preventing the light emission amount determined by the light emission amount determination unit 44 from greatly deviating from the appropriate value may be provided even when the above problem occurs in the above configuration.

例えば、発光量決定手段44により、顔を考慮せずに調光を行った場合に求められる適正値、すなわち第1演算手段41が出力する仮適正値Cnを基準とし、その仮適正値Cnの値から判断して妥当と思われる範囲に、適正発光量Chを制限する。つまり、適正発光量Chを、固定された範囲に制限するのではなく、仮適正値Cnに基づいて定められた範囲に制限する。   For example, an appropriate value obtained when the light emission amount determining unit 44 performs dimming without considering the face, that is, the temporary appropriate value Cn output by the first calculating unit 41 is used as a reference, and the temporary appropriate value Cn is calculated. The appropriate light emission amount Ch is limited to a range that is considered appropriate based on the value. That is, the appropriate light emission amount Ch is not limited to a fixed range, but is limited to a range determined based on the temporary appropriate value Cn.

具体的には、発光量決定手段44に、上記(2)式に代えて、次式(3)および(4)に基づく処理を実行させる。   Specifically, the light emission amount determination means 44 is caused to execute processing based on the following equations (3) and (4) instead of the above equation (2).

Ck=Cn×(1−α)+Cf×α … (3)

Figure 2008076903
Ck = Cn × (1−α) + Cf × α (3)
Figure 2008076903

ここで、Ckは仮の適正発光量である。また、ULは、正常な顔検出が行われた場合であって適正値Cfが適正値Cnよりも大きくなる場合に、適正値Cfと適正値Cnの差分が取り得る値の最大値である。またLLは、正常な顔検出が行われた場合であって適正値Cfが適正値Cnよりも小さくなる場合に、適正値Cfと適正値Cnの差分が取り得る値の最大値である。ULおよびLLの値は、顔を含む被写体の調光を繰り返すことにより経験的に取得された値とする。   Here, Ck is a provisional appropriate light emission amount. UL is the maximum value that can be taken by the difference between the appropriate value Cf and the appropriate value Cn when the normal face detection is performed and the appropriate value Cf is larger than the appropriate value Cn. Further, LL is the maximum value that can be taken by the difference between the appropriate value Cf and the appropriate value Cn when the normal face detection is performed and the appropriate value Cf is smaller than the appropriate value Cn. The values of UL and LL are values obtained empirically by repeating dimming of a subject including a face.

上記(3)式により求められる仮の適正発光量は、予期せぬ状況が発生した場合には、極端に大きな値あるいは極端に小さな値となる場合もある。しかし、そのような極端な値となったときでも、上記(4)式に基づく演算により、適正発光量Chは、Cn―LLからCn+ULまでの範囲に制限される。このCn―LLという下限値およびCn+ULという上限値は、適正値Cnを基準として決定される値であるため、発光量がこの範囲である限り、フラッシュ撮影により取得される画像が極端な失敗画像となることはない。すなわち、予期せぬ状況が発生した場合でも撮影が全く無駄になることはない。   The provisional appropriate light emission amount obtained by the above equation (3) may be an extremely large value or an extremely small value when an unexpected situation occurs. However, even when such an extreme value is obtained, the appropriate light emission amount Ch is limited to a range from Cn−LL to Cn + UL by the calculation based on the above equation (4). Since the lower limit value of Cn−LL and the upper limit value of Cn + UL are values determined based on the appropriate value Cn, as long as the light emission amount is within this range, an image acquired by flash photography is an extremely failed image. Never become. In other words, even when an unexpected situation occurs, shooting is not wasted at all.

なお、以上に説明した例は、適正発光量Chについて上限値と下限値を定めた例であるが、上限値のみ、あるいは下限値のみを定め、極端に大きな値となってしまった場合のみ、あるいは極端に小さな値となってしまった場合のみ、値を制限するようにしてもよい。   The example described above is an example in which an upper limit value and a lower limit value are determined for the appropriate light emission amount Ch, but only an upper limit value or only a lower limit value is determined, and only when an extremely large value is obtained. Alternatively, the value may be limited only when the value becomes extremely small.

以上に説明したように、本実施形態のデジタルカメラでは、発光量決定手段44が、第2演算手段42から供給されるN個の仮適正値Cf1〜CfNを基準値として、その基準値から推定して不都合がないと思われる範囲内の値に、発光量を設定するので、いずれの顔にとっても不都合がない値に、発光量が決定される。これにより、複数の顔が検出され、しかも顔の大きさや明るさ(肌色)が顔ごとに異なっているような場合でも、適切な発光量でフラッシュ撮影が行われ、白とびのない画像を得ることができる。   As described above, in the digital camera according to the present embodiment, the light emission amount determination unit 44 uses the N temporary appropriate values Cf1 to CfN supplied from the second calculation unit 42 as reference values, and estimates from the reference values. Thus, since the light emission amount is set to a value within a range that is considered to be inconvenient, the light emission amount is determined to a value that is not inconvenient for any face. As a result, even when multiple faces are detected and the face size and brightness (skin color) are different for each face, flash photography is performed with an appropriate amount of light emission, and an image with no overexposure is obtained. be able to.

また、本実施形態では、(2)式や(3)式に示したように、顔を考慮しない調光により求められた仮適正値Cnと、顔を考慮した調光により求められた仮適正値Cfとの加重平均を計算することにより、適正発光量Ch(もしくは仮の適正発光量Ck)を求めているので、発光量調整における仮適正値Cfの影響力を、パラメータαの設定ひとつで簡単に、強めたり弱めたりすることができる。第1演算手段41と第2演算手段42は、常時同じ演算式に基づく演算を行っていればよいので、複数の演算式を調光方針に応じて使い分けるものに比べ、第1演算手段41と第2演算手段42の回路構造あるいはプログラムを、シンプルなものとすることができる。   In the present embodiment, as shown in the equations (2) and (3), the provisional appropriate value Cn obtained by the dimming without considering the face and the provisional appropriateness obtained by the dimming considering the face. Since the appropriate light emission amount Ch (or temporary appropriate light emission amount Ck) is obtained by calculating the weighted average with the value Cf, the influence of the temporary appropriate value Cf in the light emission amount adjustment can be determined with one setting of the parameter α. It can easily be strengthened or weakened. Since the 1st calculating means 41 and the 2nd calculating means 42 should just always perform the calculation based on the same calculating formula, compared with what uses a several calculating formula properly according to a light control policy, the 1st calculating means 41 and The circuit structure or program of the second calculation means 42 can be simplified.

なお、発光量の調整方法、すなわち発光量決定手段44の処理は、上記(1)〜(4)式に基づく処理に限らず、他の演算式を採用してもよい。例えば、(2)式や(3)式は、加重平均ではなく、二乗平均、対数平均などを求めてもよい。また、例えば、2つの基準値の中間の値よりも何%Cf寄りにする、というように基準値からの調整分を固定的に決めておいてもよい。さらには、加重平均などを求めた後に決まった調整値を加算あるいは減算するなどしてもよい。   Note that the light emission amount adjustment method, that is, the processing of the light emission amount determination unit 44 is not limited to the processing based on the above equations (1) to (4), and other arithmetic expressions may be adopted. For example, the formulas (2) and (3) may calculate a mean square, a logarithmic average, etc. instead of a weighted average. Further, for example, the adjustment amount from the reference value may be fixedly determined such that the value is closer to what percentage Cf than the intermediate value between the two reference values. Furthermore, an adjustment value determined after obtaining a weighted average or the like may be added or subtracted.

[ 実施形態2 ]
次に説明するデジタルカメラは、外観、内部構成は実施形態1のデジタルカメラと同じであるが、フラッシュ制御部19が行う処理が実施形態1と異なる。図12に、本実施形態におけるフラッシュ制御部19の構成と入出力データを示す。フラッシュ制御部19は、図に示すように、演算手段50と、発光量決定手段51と、重み付けパラメータ設定手段52とを備える。
[Embodiment 2]
The digital camera to be described next has the same appearance and internal configuration as the digital camera of the first embodiment, but the processing performed by the flash control unit 19 is different from that of the first embodiment. FIG. 12 shows the configuration and input / output data of the flash controller 19 in this embodiment. As shown in the figure, the flash control unit 19 includes a calculation unit 50, a light emission amount determination unit 51, and a weighting parameter setting unit 52.

演算手段50は、全体制御部30の制御の下、画像入力制御部23から、非発光時画像データと予備発光時画像データの供給を受け、実施形態1の説明において仮適正値Cnを求めるための処理として説明した図5の処理と同様の処理を行う。但し、演算手段50は、実施形態1の第1演算手段41と異なり、ステップS104において検出された複数の顔のうち1つの顔に対応する領域ブロックに重み付けをおいた演算を行って仮適正値Cf1〜CfNを求める。各領域ブロックの重み付けは、重み付けパラメータ設定手段52により設定される。   The arithmetic unit 50 receives the non-light emission image data and the preliminary light emission image data from the image input control unit 23 under the control of the overall control unit 30, and obtains the temporary appropriate value Cn in the description of the first embodiment. The same process as the process of FIG. However, unlike the first calculation unit 41 of the first embodiment, the calculation unit 50 performs a calculation by assigning a weight to an area block corresponding to one face among the plurality of faces detected in step S104, and thereby calculating a temporary appropriate value. Cf1 to CfN are obtained. The weighting of each area block is set by the weighting parameter setting means 52.

重み付けパラメータ設定手段52は、全体制御部30の制御の下、顔領域抽出部24から領域情報の供給を受ける。そして、各領域に対応する領域ブロックに対し、顔がない領域に対応する領域ブロックよりも高い重み付けを設定する。この際、重み付けパラメータ設定手段51は、顔が抽出された領域に対応する領域ブロックの重み付けを一律に高く設定するのではなく、顔が大きいときほど重み付けを高く設定する。例えば、顔がない領域の重み付けを1とした場合、顔に対応するブロック数が3個未満であれば重み付けを3に、3個〜6個であれば重み付けを4に、7個〜10個であれば重み付けを5に、11個以上であれば重み付けを6に設定する。   The weighting parameter setting unit 52 is supplied with region information from the face region extraction unit 24 under the control of the overall control unit 30. Then, a higher weight is set for the area block corresponding to each area than for the area block corresponding to the area having no face. At this time, the weighting parameter setting means 51 does not uniformly set the weighting of the area block corresponding to the area from which the face is extracted, but sets the weighting higher as the face is larger. For example, when the weight of an area having no face is set to 1, the weight is 3 if the number of blocks corresponding to the face is less than 3, the weight is 4 if the number of blocks is 3 to 6, and 7 to 10 If so, the weight is set to 5. If 11 or more, the weight is set to 6.

例えば、図4に示した例では、演算手段50は、まず領域46aに対応するブロック群47aの重み付けを高くし、領域46bと領域46cに対応するブロック群は顔がない領域と同等の重み付けにして図5に示した演算処理を実行し、仮適正値Cf1を求める。領域46aに対応するブロック群47aは12個の領域ブロックを含むので、このときのブロックの重み付けは図13A示すようなものとなる。次に、演算手段50は、領域46bに対応するブロック群47bの重み付けを高くし、領域46aと領域46cに対応するブロック群は顔がない領域と同等の重み付けにして図5に示した演算処理を実行し、仮適正値Cf2を求める。領域46bに対応するブロック群47bは2個の領域ブロックを含むので、このときのブロックの重み付けは図13B示すようなものとなる。続いて、演算手段50は、領域46cに対応するブロック群47cの重み付けを高くし、領域46aと領域46bに対応するブロック群は顔がない領域と同等の重み付けにして図5に示した演算処理を実行し、仮適正値Cf3を求める。領域46cに対応するブロック群47cは2個の領域ブロックを含むので、このときのブロックの重み付けは図13Cに示すようなものとなる。   For example, in the example shown in FIG. 4, the computing means 50 first increases the weight of the block group 47a corresponding to the area 46a, and sets the block groups corresponding to the area 46b and the area 46c to the same weight as the area having no face. Then, the arithmetic processing shown in FIG. 5 is executed to obtain a temporary appropriate value Cf1. Since the block group 47a corresponding to the area 46a includes 12 area blocks, the weights of the blocks at this time are as shown in FIG. 13A. Next, the calculation means 50 increases the weight of the block group 47b corresponding to the area 46b, and the block group corresponding to the area 46a and the area 46c has the same weight as the area having no face. To obtain a provisional appropriate value Cf2. Since the block group 47b corresponding to the area 46b includes two area blocks, the weights of the blocks at this time are as shown in FIG. 13B. Subsequently, the calculation means 50 increases the weight of the block group 47c corresponding to the region 46c, and the block group corresponding to the region 46a and the region 46b is weighted to the same weight as the region having no face, as shown in FIG. To obtain a provisional appropriate value Cf3. Since the block group 47c corresponding to the area 46c includes two area blocks, the weights of the blocks at this time are as shown in FIG. 13C.

発光量決定手段51は、演算手段が求めた仮適正値Cf1〜CfNの中から、値が最小のものを選択し、フラッシュの適正発光量Chをその最小の仮適正値に決定する。もしくはフラッシュの適正発光量Chを、最小の仮適正値に所定値を加算もしくは減算した値に決定する。これにより、複数の顔が検出され、顔の大きさや明るさ(肌色)が顔ごとに異なっているような場合でも、適切な発光量でフラッシュ撮影が行われ、白とびのない画像を得ることができる。   The light emission amount determining means 51 selects the one with the smallest value from the temporary appropriate values Cf1 to CfN obtained by the calculation means, and determines the appropriate light emission amount Ch of the flash to the minimum temporary appropriate value. Alternatively, the appropriate flash light emission amount Ch is determined to be a value obtained by adding or subtracting a predetermined value to the minimum provisional appropriate value. As a result, even when multiple faces are detected and the size and brightness (skin color) of the faces differ from face to face, flash photography is performed with an appropriate amount of light emission, and an image with no overexposure is obtained. Can do.

以上、2つの実施形態を例示しながら説明したが、本発明はこれらの実施形態に限定されるものではない。例えば、仮適正値Cf1〜CfNの中の最小値のみを基準値として調整を行うのではなく、最小値と最大値とを基準値として調整を行えば、白とびを防止できるだけでなく、明るさ不足の顔がなくなるように発光量を決めることができる。この他、複数の顔が検出されたときに各顔について個別に適正発光量が求めておき、発光量の調整を、顔ごとの適正発光量を基準値として行う方法およびデジタルカメラは、すべて本発明の技術的範囲に属する。   Although the two embodiments have been described above as examples, the present invention is not limited to these embodiments. For example, if adjustment is performed using only the minimum value and the maximum value as reference values instead of adjusting only the minimum value among the temporary appropriate values Cf1 to CfN, it is possible not only to prevent overexposure but also brightness. The amount of light emission can be determined so that the insufficient face disappears. In addition to this, all methods and digital cameras that determine the appropriate amount of light for each face when multiple faces are detected and adjust the amount of light emitted using the appropriate amount of light for each face as a reference value are all available. It belongs to the technical scope of the invention.

本発明の一実施形態におけるデジタルカメラの概観図(通常状態)Overview of digital camera according to an embodiment of the present invention (normal state) 本発明の一実施形態におけるデジタルカメラの概観図(内蔵フラッシュをポップアップした状態)1 is a schematic view of a digital camera according to an embodiment of the present invention (with a built-in flash popped up). 本発明の一実施形態におけるデジタルカメラの概観図(外付フラッシュを取り付けた状態)1 is a schematic view of a digital camera according to an embodiment of the present invention (with an external flash attached). デジタルカメラの内部構成を示す図Diagram showing the internal configuration of the digital camera フラッシュ制御部の構成と入出力データを示す図Diagram showing configuration of flash controller and input / output data 画像データを領域ブロックに分割した例を示す図The figure which shows the example which divided | segmented image data into the area block 第1演算手段の処理を示すフローチャートThe flowchart which shows the process of a 1st calculating means 第2演算手段の処理を示すフローチャートThe flowchart which shows the process of a 2nd calculating means 画像データと顔領域と領域ブロックの関係を示す図(顔が占める割合が大きい場合:顔検出処理時)Diagram showing the relationship between image data, face area, and area block (when face occupies a large percentage: during face detection processing) 画像データと顔領域と領域ブロックの関係を示す図(顔が占める割合が大きい場合:調光処理時)Diagram showing the relationship between image data, face area, and area block (when face occupies a large percentage: during dimming process) 画像データと顔領域と領域ブロックの関係を示す図(顔が占める割合が小さい場合:顔検出処理時)Diagram showing the relationship between image data, face area, and area block (when face ratio is small: during face detection processing) 画像データと顔領域と領域ブロックの関係を示す図(顔が占める割合が小さい場合:調光処理時)Diagram showing the relationship between image data, face area, and area block (when face ratio is small: during dimming process) パラメータαの決定に用いられるLUTの一例を示す図The figure which shows an example of LUT used for determination of parameter (alpha) パラメータαの決定に用いられるLUTの他の例を示す図The figure which shows the other example of LUT used for determination of parameter (alpha) パラメータαの決定に用いられるLUTのさらに他の例を示す図FIG. 10 is a diagram showing still another example of the LUT used for determining the parameter α. 本発明の他の実施形態におけるフラッシュ制御部の構成と入出力データを示す図The figure which shows the structure and input / output data of the flash control part in other embodiment of this invention. 重み付けパラメータの設定例を示す図Diagram showing examples of weighting parameter settings 重み付けパラメータの設定例を示す図Diagram showing examples of weighting parameter settings 重み付けパラメータの設定例を示す図Diagram showing examples of weighting parameter settings

符号の説明Explanation of symbols

1 デジタルカメラ、2 シャッタレリーズボタン、 3 モードダイヤル、
4 内蔵フラッシュ、 5 ホットシュー、 6フラッシュポップアップボタン、
7 外付フラッシュ、 34 システムバス、
45 調光用の画像データ、 46a〜46e 領域情報が示す領域、
47a〜47e 領域情報が示す領域に対応する領域ブロック、
48 顔検出用の画像データ、 49 調光時の実際の顔の位置
1 Digital camera 2 Shutter release button 3 Mode dial
4 built-in flash, 5 hot shoe, 6 flash pop-up button,
7 External flash, 34 System bus,
45 image data for dimming, 46a to 46e area indicated by area information,
47a to 47e area blocks corresponding to the area indicated by the area information,
48 Image data for face detection, 49 Actual face position during dimming

Claims (4)

被写体を表す画像データを生成する撮像手段と、フラッシュを発光する発光手段と、前記撮像手段により生成された画像データを対象として顔検出処理を実行する顔検出手段とを備え、前記顔検出手段が出力する検出結果を利用して前記フラッシュの発光量を制御するデジタルカメラであって、
前記顔検出手段が検出したN(Nは整数)個の顔について、それぞれ、当該顔のみを前記画像データに含まれる顔とみなして該顔を考慮した演算を行うことにより、前記発光量の仮適正値Cfi(1≦i≦N)を求める演算手段と、
前記演算手段から供給されるN個の仮適正値Cf1〜CfNを基準値とする調整を行うことにより、前記フラッシュの適正発光量Chを決定する発光量決定手段とを備えることを特徴とするデジタルカメラ。
An imaging unit that generates image data representing a subject; a light emitting unit that emits flash; and a face detection unit that performs face detection processing on the image data generated by the imaging unit. A digital camera that controls the amount of light emitted from the flash using a detection result to be output,
For each of N (N is an integer) faces detected by the face detection means, only the face is regarded as a face included in the image data, and calculation is performed in consideration of the face. Arithmetic means for obtaining an appropriate value Cfi (1 ≦ i ≦ N);
And a light emission amount determining means for determining the appropriate light emission amount Ch of the flash by performing adjustment using the N provisional appropriate values Cf1 to CfN supplied from the arithmetic means as reference values. camera.
前記発光量決定手段が、前記演算手段から供給される前記N個の仮適正値Cf1〜CfNの中から値が最小の仮適正値を選択し、該最小の仮適正値Cfminを基準値とする調整を行うことにより、前記フラッシュの適正発光量Chを決定することを特徴とする請求項1記載のデジタルカメラ。   The light emission amount determining means selects a temporary appropriate value having a minimum value from the N temporary appropriate values Cf1 to CfN supplied from the calculating means, and uses the minimum temporary appropriate value Cfmin as a reference value. The digital camera according to claim 1, wherein an appropriate light emission amount Ch of the flash is determined by performing adjustment. 被写体を表す画像データを生成する撮像手段と、フラッシュを発光する発光手段と、前記撮像手段により生成された画像データを対象として顔検出処理を実行する顔検出手段とを備えたデジタルカメラにおいて、前記顔検出手段が出力する検出結果を利用して前記フラッシュの発光量を制御する方法であって、
前記顔領域抽出手段が検出したN(Nは整数)個の顔について、それぞれ、当該顔のみを前記画像データに含まれる顔とみなして該顔を考慮した演算を行うことにより、前記発光量の仮適正値Cfi(1≦i≦N)を求める演算ステップと、
前記演算ステップにおいて求められたN個の仮適正値Cf1〜CfNを基準値とする調整を行うことにより、前記フラッシュの適正発光量Chを決定する発光量決定ステップとを有することを特徴とするデジタルカメラの制御方法。
In a digital camera comprising an imaging unit that generates image data representing a subject, a light emitting unit that emits a flash, and a face detection unit that performs face detection processing on the image data generated by the imaging unit. A method for controlling the amount of light emitted from the flash using a detection result output by a face detection means,
For each of the N faces (N is an integer) detected by the face area extraction unit, only the face is regarded as a face included in the image data, and the calculation considering the face is performed. A calculation step for obtaining a temporary appropriate value Cfi (1 ≦ i ≦ N);
And a light emission amount determining step for determining an appropriate light emission amount Ch of the flash by performing adjustment using the N temporary appropriate values Cf1 to CfN obtained in the calculation step as reference values. Camera control method.
前記発光量決定ステップにおいて、前記演算ステップにおいて求められた前記N個の仮適正値Cf1〜CfNの中から値が最小の仮適正値を選択し、該最小の仮適正値Cfminを基準値とする調整を行うことにより、前記フラッシュの適正発光量Chを決定することを特徴とする請求項3記載のデジタルカメラの制御方法。   In the light emission amount determining step, a temporary appropriate value having a minimum value is selected from the N temporary appropriate values Cf1 to CfN obtained in the calculating step, and the minimum temporary appropriate value Cfmin is used as a reference value. 4. The method of controlling a digital camera according to claim 3, wherein an appropriate light emission amount Ch of the flash is determined by performing adjustment.
JP2006257974A 2006-09-22 2006-09-22 Digital camera and control method thereof Expired - Fee Related JP4782649B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006257974A JP4782649B2 (en) 2006-09-22 2006-09-22 Digital camera and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006257974A JP4782649B2 (en) 2006-09-22 2006-09-22 Digital camera and control method thereof

Publications (2)

Publication Number Publication Date
JP2008076903A true JP2008076903A (en) 2008-04-03
JP4782649B2 JP4782649B2 (en) 2011-09-28

Family

ID=39349000

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006257974A Expired - Fee Related JP4782649B2 (en) 2006-09-22 2006-09-22 Digital camera and control method thereof

Country Status (1)

Country Link
JP (1) JP4782649B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012078666A (en) * 2010-10-04 2012-04-19 Canon Inc Imaging system, light emitting apparatus and imaging apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012078666A (en) * 2010-10-04 2012-04-19 Canon Inc Imaging system, light emitting apparatus and imaging apparatus
CN102572259A (en) * 2010-10-04 2012-07-11 佳能株式会社 Image capturing apparatus, light-emitting device and image capturing system

Also Published As

Publication number Publication date
JP4782649B2 (en) 2011-09-28

Similar Documents

Publication Publication Date Title
JP4808578B2 (en) Digital camera and control method thereof
CN108200354B (en) Control method and apparatus, imaging device, computer device, and readable storage medium
US8208804B2 (en) Imaging apparatus and control method therefor
JP4269699B2 (en) Electronic camera
JP2008005081A (en) Authentication apparatus
JP2017112462A (en) Imaging device and control method, program therefor and storage medium
JP5316070B2 (en) Imaging device
JP2010072619A (en) Exposure operation device and camera
JP5407373B2 (en) Imaging apparatus and program
CN111434104A (en) Image processing device, imaging device, image processing method, and program
JP4658015B2 (en) Digital camera and control method thereof
JP2009017427A (en) Imaging device
JP5316923B2 (en) Imaging apparatus and program thereof
JP4879840B2 (en) Digital camera and control method thereof
JP4782649B2 (en) Digital camera and control method thereof
JP5849515B2 (en) Exposure calculation device and camera
JP5387645B2 (en) Imaging apparatus and program thereof
JP4663607B2 (en) Digital camera and control method thereof
JP4789776B2 (en) Imaging apparatus and imaging method
JP4915272B2 (en) Imaging apparatus and program thereof
JP5943682B2 (en) Imaging apparatus, control method thereof, and program
JP5393189B2 (en) Imaging apparatus and image processing method
JP5137196B2 (en) Imaging apparatus, control method therefor, and program
JP2010271507A (en) Imaging device, exposure adjustment method, and program
JP4874750B2 (en) Digital camera and control method thereof

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110609

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110707

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140715

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4782649

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees