JP6423669B2 - Imaging apparatus and control method thereof - Google Patents
Imaging apparatus and control method thereof Download PDFInfo
- Publication number
- JP6423669B2 JP6423669B2 JP2014194297A JP2014194297A JP6423669B2 JP 6423669 B2 JP6423669 B2 JP 6423669B2 JP 2014194297 A JP2014194297 A JP 2014194297A JP 2014194297 A JP2014194297 A JP 2014194297A JP 6423669 B2 JP6423669 B2 JP 6423669B2
- Authority
- JP
- Japan
- Prior art keywords
- amount
- image
- light emission
- gain
- area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
Landscapes
- Exposure Control For Cameras (AREA)
- Stroboscope Apparatuses (AREA)
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
- Studio Devices (AREA)
Description
本発明は、撮像装置及びその制御方法に関し、特に、階調特性を制御する撮像装置及びその制御方法に関する。 The present invention relates to an imaging apparatus and a control method thereof, and more particularly, to an imaging apparatus that controls gradation characteristics and a control method thereof.
従来より、逆光シーン等に代表されるダイナミックレンジの広いシーンに対し、白飛びや黒つぶれを抑え、撮影者の見た目に近づくように階調制御を行う技術が提案されている。逆光条件の下で人物を撮影する場合、通常の撮影では図15(a)に示すように、人物が非常に暗く撮影されてしまう。これに対し、暗くなった人物領域にゲインをかけることで、出力画像において人物が暗くなることを低減する処理が提案されている。しかし、そのような処理を行った場合、特に逆光の度合いが強いシーンにおいては暗い人物部分にかけるゲインが大きくなるため、図15(b)に示すように、ノイズが増幅されてしまい、画質が低下するという問題がある。 2. Description of the Related Art Conventionally, a technique has been proposed in which gradation control is performed on a scene with a wide dynamic range represented by a backlight scene or the like so as to suppress overexposure and blackout and approach the photographer's appearance. When a person is photographed under backlight conditions, the person is photographed very darkly as shown in FIG. 15A in normal photographing. On the other hand, a process has been proposed for reducing the darkness of a person in an output image by applying a gain to the darkened person region. However, when such processing is performed, the gain applied to the dark person portion increases particularly in a scene where the degree of backlight is strong, so that noise is amplified as shown in FIG. There is a problem of lowering.
別の手段として、人物にフラッシュ光を照射することで明るさを補い、出力画像において人物が暗くなることを低減する処理が提案されている。しかし、このような処理を行った場合、特に逆光の度合いが強いシーンにおいてはフラッシュの発光量が大きくなり、図15(c)に示すように、人物の顔などにフラッシュの反射光である「テカり」が現れ、画質が低下するという問題がある。 As another means, there has been proposed a process that compensates for brightness by irradiating a person with flash light and reduces the darkness of the person in the output image. However, when such a process is performed, the amount of flash emission increases particularly in a scene where the degree of backlight is strong, and as shown in FIG. There is a problem that the image quality deteriorates.
上述したような問題に対し、特許文献1及び2では、暗部にかかるゲイン量及びフラッシュ発光量を制御して、撮影者の見た目に近い自然な出力画像を得る階調制御技術が提案されている。 To deal with the above-described problems, Patent Documents 1 and 2 propose a gradation control technique for obtaining a natural output image close to a photographer's appearance by controlling a gain amount and a flash emission amount applied to a dark part. .
特許文献1では、顔領域等の所定領域の輝度値から、階調補正特性とそれに伴った露出低下量を設定すると共に、フラッシュ発光時には、階調補正前後における所定領域の白とび度合いに応じて、白とびが大きくなる場合は発光量を弱めることが開示されている。 In Patent Document 1, the gradation correction characteristic and the exposure reduction amount associated therewith are set from the luminance value of a predetermined area such as the face area, and at the time of flash emission, according to the degree of overexposure of the predetermined area before and after gradation correction. It is disclosed that the amount of light emission is reduced when the overexposure increases.
特許文献2では、暗部補正モードの際に、センサーを中央部、周辺部に分け、得られた複数領域の輝度情報から、暗部補正の補正度合いを算出することが開示されている。また、補正量に応じて、補正量が大きくなるほど発光量が小さくなるようにフラッシュ発光量を調整することが開示されている。 Japanese Patent Application Laid-Open No. 2004-228561 discloses that in the dark part correction mode, the sensor is divided into a central part and a peripheral part, and the correction degree of dark part correction is calculated from the obtained luminance information of a plurality of regions. Further, it is disclosed that the flash light emission amount is adjusted so that the light emission amount decreases as the correction amount increases in accordance with the correction amount.
しかしながら、特許文献1及び2に記載された技術には、フラッシュ発光量の算出時に、上述したテカりに代表される発光撮影(フラッシュ撮影)による不自然さを軽減する対策について言及されていない。従って、シーンによってはテカりなどのフラッシュによる不自然さが生じる可能性がある。 However, the techniques described in Patent Documents 1 and 2 do not mention measures for reducing the unnaturalness caused by the above-described flash photography (flash photography) when calculating the flash emission amount. Therefore, depending on the scene, there is a possibility that unnaturalness due to flash, such as shine, may occur.
また、特許文献1及び2に記載の技術では、画像内の特定の領域や、中央部と周辺部などの所定のエリアに分割された領域の信号値から階調特性を算出している。そのため、撮影シーン内に存在する意味のあるオブジェクト(例えば、人物、背景、空など)に最適な階調特性の算出が行えず、撮影者の見た目とは異なる階調制御を行う可能性がある。 In the techniques described in Patent Documents 1 and 2, tone characteristics are calculated from signal values of a specific area in an image and areas divided into predetermined areas such as a central part and a peripheral part. For this reason, it is not possible to calculate the optimum gradation characteristics for a meaningful object (for example, a person, background, sky, etc.) present in the shooting scene, and there is a possibility of performing gradation control different from the appearance of the photographer. .
本発明は上記問題点を鑑みてなされたものであり、発光撮影において、より自然な画像を得ることを目的とする。 The present invention has been made in view of the above problems, and an object thereof is to obtain a more natural image in flash photography.
上記目的を達成するために、本発明の撮像装置は、被写体を撮影して、画像を出力する撮像手段と、前記画像から、予め決められた条件を満たす被写体領域を抽出し、抽出した被写体領域の情報を取得する抽出手段と、前記被写体領域の情報に基づいて、照明装置の発光の有無及び、前記照明装置を発光させる場合に、前記画像に基づいて予め決められた発光上限量を上限として、発光量を決定する決定手段と、前記決定手段により決定された条件で前記照明装置を制御して撮影された画像に対して、階調変換を行う階調変換手段と、前記被写体領域の情報及び前記決定手段により決定された条件に基づいて、前記階調変換に用いるゲイン量を算出する算出手段とを有する。 In order to achieve the above object, an imaging apparatus according to the present invention extracts an object region that satisfies a predetermined condition from an image capturing unit that captures an image of a subject and outputs the image, and extracts the subject region that satisfies a predetermined condition from the image. Based on the information on the subject area and the extraction means for acquiring the information on the presence or absence of light emission of the illuminating device and when the illuminating device emits light, the light emission upper limit amount determined in advance based on the image is set as the upper limit. and determining means for determining a light emission amount, the image taken by controlling the lighting device in determined conditions by the determination means, a gradation conversion unit that performs gradation conversion, information of the object area And calculating means for calculating a gain amount used for the gradation conversion based on the condition determined by the determining means.
本発明によれば、発光撮影において、より自然な画像を得ることができる。 According to the present invention, a more natural image can be obtained in flash photography.
以下、添付図面を参照して本発明を実施するための形態を詳細に説明する。 DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described in detail with reference to the accompanying drawings.
<第1の実施形態>
図1は本発明の実施の形態における撮像装置の一例として、カメラの概略構成を示したものである。図1において、第1レンズ群101は結像光学系の先端に配置され、光軸方向に進退可能に保持される。絞り102は、その開口径を調節することで撮影時の光量調節を行うほか、静止画撮影時には露光秒時調節用シャッタとしての機能も備える。第2レンズ群103は、絞り兼用シャッタ102と一体となって光軸方向に進退し、第1レンズ群101の進退動作との連動により、変倍作用(ズーム機能)を実現することができる。
<First Embodiment>
FIG. 1 shows a schematic configuration of a camera as an example of an imaging apparatus according to an embodiment of the present invention. In FIG. 1, the first lens group 101 is disposed at the tip of the imaging optical system and is held so as to be able to advance and retract in the optical axis direction. The aperture 102 adjusts the aperture diameter to adjust the amount of light during shooting, and also has a function as an exposure time adjustment shutter when shooting a still image. The second lens group 103 moves forward and backward in the optical axis direction integrally with the diaphragm / shutter 102, and a zooming function (zoom function) can be realized in conjunction with the forward / backward movement of the first lens group 101.
第3レンズ群105(フォーカスレンズ)は、光軸方向の進退により焦点調節を行う。光学的ローパスフィルタ106は、撮影画像の偽色やモアレを軽減するための光学素子である。撮像素子107は2次元CMOSフォトセンサとその周辺回路からなり、結像光学系の結像面に配置される。 The third lens group 105 (focus lens) performs focus adjustment by advancing and retreating in the optical axis direction. The optical low-pass filter 106 is an optical element for reducing false colors and moire in the captured image. The image sensor 107 is composed of a two-dimensional CMOS photosensor and its peripheral circuit, and is disposed on the imaging surface of the imaging optical system.
ズームアクチュエータ111は、不図示のカム筒を回動することで、第1レンズ群101ないし第3レンズ群103を光軸方向に進退駆動し、変倍操作を行う。絞りシャッタアクチュエータ112は、絞り102の開口径を制御して撮影光量を調節すると共に、静止画撮影時の露光時間制御を行う。フォーカスアクチュエータ114は、第3レンズ群105を光軸方向に進退駆動して焦点調節を行う。 The zoom actuator 111 rotates a cam cylinder (not shown) to drive the first lens group 101 to the third lens group 103 forward and backward in the optical axis direction, and performs a zooming operation. The aperture shutter actuator 112 controls the aperture diameter of the aperture 102 to adjust the amount of photographing light and controls the exposure time during still image photographing. The focus actuator 114 adjusts the focus by driving the third lens group 105 back and forth in the optical axis direction.
撮影時の被写体照明用のフラッシュ115は、キセノン管を用いた閃光照明装置が好適だが、連続発光(継続発光)可能なLEDを備えた照明装置を用いても良い。AF補助光発光部116は、所定の開口パターンを有したマスクの像を、投光レンズを介して被写界に投影し、暗い被写体あるいは低コントラスト被写体に対する焦点検出能力を向上させる。 The flash 115 for illuminating the subject at the time of photographing is preferably a flash illumination device using a xenon tube, but an illumination device including an LED capable of continuous light emission (continuous light emission) may be used. The AF auxiliary light emitting unit 116 projects a mask image having a predetermined opening pattern onto the object field via the projection lens, and improves the focus detection capability for a dark subject or a low-contrast subject.
カメラ内CPU121は、カメラ本体の種々の制御を司り、演算部、ROM、RAM、A/Dコンバータ、D/Aコンバータ、通信インターフェイス回路等を有する。CPU121は、ROMに記憶された所定のプログラムに基づいて、カメラが有する各種回路を駆動し、AF、撮影、画像処理と記録等の一連の動作を実行する。また、所定のプログラムを実行することにより、主要被写体情報算出部203及び撮像条件設定部204として機能する。なお、主要被写体情報算出部203及び撮像条件設定部204の動作については、詳細に後述する。 The in-camera CPU 121 manages various controls of the camera body, and includes a calculation unit, ROM, RAM, A / D converter, D / A converter, communication interface circuit, and the like. The CPU 121 drives various circuits included in the camera based on a predetermined program stored in the ROM, and executes a series of operations such as AF, photographing, image processing, and recording. Further, by executing a predetermined program, it functions as a main subject information calculation unit 203 and an imaging condition setting unit 204. The operations of the main subject information calculation unit 203 and the imaging condition setting unit 204 will be described later in detail.
フラッシュ制御回路122は、後述する処理によりCPU121が決定した条件で、撮影動作に同期してフラッシュ115を点灯制御する。補助光駆動回路123は、焦点検出動作に同期してAF補助光発光部116を点灯制御する。撮像素子駆動回路124は、撮像素子107の撮像動作を制御するとともに、取得した画像信号をA/D変換してCPU121に送信する。画像処理回路125は、撮像素子107が取得した画像のγ変換、カラー補間、JPEG圧縮等の処理を行う。 The flash control circuit 122 controls lighting of the flash 115 in synchronism with the photographing operation under the condition determined by the CPU 121 by processing to be described later. The auxiliary light driving circuit 123 controls the lighting of the AF auxiliary light emitting unit 116 in synchronization with the focus detection operation. The image sensor driving circuit 124 controls the image capturing operation of the image sensor 107, A / D converts the acquired image signal, and transmits it to the CPU 121. The image processing circuit 125 performs processing such as γ conversion, color interpolation, and JPEG compression of the image acquired by the image sensor 107.
フォーカス駆動回路126は、焦点検出結果に基づいてフォーカスアクチュエータ114を駆動制御し、第3レンズ群105を光軸方向に進退駆動して焦点調節を行う。絞りシャッタ駆動回路128は、絞りシャッタアクチュエータ112を駆動制御して絞り兼用シャッタ102の開口を制御する。ズーム駆動回路129は、撮影者のズーム操作に応じてズームアクチュエータ111を駆動する。 The focus drive circuit 126 controls the focus actuator 114 based on the focus detection result, and adjusts the focus by driving the third lens group 105 back and forth in the optical axis direction. The aperture shutter drive circuit 128 controls the aperture of the aperture / shutter 102 by drivingly controlling the aperture shutter actuator 112. The zoom drive circuit 129 drives the zoom actuator 111 according to the zoom operation of the photographer.
LCD等の表示器131は、カメラの撮影モードに関する情報、撮影前のプレビュー画像と撮影後の確認用画像、焦点検出時の合焦状態表示画像等を表示する。操作スイッチ群132は、電源スイッチ、レリーズ(撮影トリガ)スイッチ、ズーム操作スイッチ、撮影モード選択スイッチ等で構成される。着脱可能なフラッシュメモリ133は、撮影済み画像を記録する。 A display 131 such as an LCD displays information on the shooting mode of the camera, a preview image before shooting and a confirmation image after shooting, a focus state display image at the time of focus detection, and the like. The operation switch group 132 includes a power switch, a release (shooting trigger) switch, a zoom operation switch, a shooting mode selection switch, and the like. The detachable flash memory 133 records captured images.
次に、図2のフローチャートを参照しながら、上記構成を有する撮像装置における処理について説明する。なお、第1の実施形態では逆光シーンの補正を想定するため、第1の実施形態で想定する逆光シーンの例を図3に示す。図3に示すように、逆光シーンとは、主要被写体201(人物)の明るさに対し、主要被写体201以外の領域(背景や空など)が著しく明るいシーンである。 Next, processing in the imaging apparatus having the above configuration will be described with reference to the flowchart of FIG. In addition, in order to assume correction | amendment of a backlight scene in 1st Embodiment, the example of the backlight scene assumed in 1st Embodiment is shown in FIG. As shown in FIG. 3, the backlight scene is a scene where the area (background, sky, etc.) other than the main subject 201 is extremely bright with respect to the brightness of the main subject 201 (person).
まず、S101においてプレ撮影を行う。プレ撮影では、後述する本撮影に先立ち、撮像素子107及びフラッシュ115を制御して、特に本撮影時のフラッシュ発光条件、及び露光条件を決定するためのプレ撮影画像を取得する。プレ撮影画像としては、フラッシュ発光を伴わない非発光画像と、フラッシュ発光を伴う発光画像を1枚ずつ取得する。以降、非発光画像を非発光プレ画像、発光画像を発光プレ画像と呼ぶ。なお、発光プレ画像は、非発光プレ画像に対し、露光条件を変えずに、フラッシュ115を所定の発光量Delta_EF_PREだけ発光させて撮影する。 First, pre-photographing is performed in S101. In pre-photographing, prior to main photographing described later, the image sensor 107 and the flash 115 are controlled to acquire a pre-photographed image for determining flash emission conditions and exposure conditions particularly during main photographing. As the pre-photographed image, a non-light-emitting image without flash emission and a light-emission image with flash emission are acquired one by one. Hereinafter, the non-light-emitting image is referred to as a non-light-emitting pre-image, and the light-emitting image is referred to as a light-emitting pre-image. Note that the pre-emission image is captured by causing the flash 115 to emit light by a predetermined emission amount Delta_EF_PRE without changing the exposure conditions with respect to the non-emission pre-image.
次に、S102において、S101で撮影された非発光プレ画像及び発光プレ画像に対し、画像処理回路125において所定の信号処理を施す。所定の信号処理の一例としては、撮像素子107の欠陥画素補正や周辺光量落ち補正、及びノイズリダクション処理などが挙げられる。 Next, in S102, the image processing circuit 125 performs predetermined signal processing on the non-light emitting pre-image and the light emitting pre-image captured in S101. As an example of the predetermined signal processing, defective pixel correction of the image sensor 107, peripheral light amount drop correction, noise reduction processing, and the like can be given.
そして、S103において、主要被写体情報算出部203は、S102で所定の信号処理が施された非発光プレ画像を、予め決められた条件に基づいて主要被写体領域とそれ以外の領域に分割し、主要被写体情報を取得する。以下、第1の実施形態では主要被写体を人物とし、主要被写体以外の領域を非主要領域と呼ぶ。また、主要被写体情報は、主要被写体領域(人物領域)の代表輝度値とする。ここで、S103で行われる主要被写体情報算出部203の処理について詳しく説明する。 In step S103, the main subject information calculation unit 203 divides the non-light-emitting pre-image that has been subjected to the predetermined signal processing in step S102 into a main subject region and other regions based on predetermined conditions. Get subject information. Hereinafter, in the first embodiment, a main subject is a person, and a region other than the main subject is called a non-main region. The main subject information is a representative luminance value of the main subject area (person area). Here, the process of the main subject information calculation unit 203 performed in S103 will be described in detail.
まず、非発光プレ画像を人物領域及び非主要領域に分割する。この処理において、主要被写体情報算出部203はまず、図4(a)に示すように、所定の大きさのブロックBlock[i][j]に分割する。そして、各ブロックBlock[i][j]が、人物領域、非主要領域のいずれに含まれるかを判定する、領域判定処理を行う。なお、領域判定処理の手法は問わないが、例えば、各ブロックBlock[i][j]の代表輝度値や代表色情報などに基づいて領域判定処理を行うことができる。また、ブロックBlock[i][j]の大きさに関しても特に限定はせず、例えば画素単位で領域判定処理を行ってもよい。 First, the non-light emitting pre-image is divided into a person area and a non-main area. In this process, the main subject information calculation unit 203 first divides the block into blocks [i] [j] having a predetermined size as shown in FIG. Then, an area determination process is performed to determine whether each block Block [i] [j] is included in a person area or a non-main area. The method of region determination processing is not limited, but the region determination processing can be performed based on, for example, the representative luminance value or representative color information of each block Block [i] [j]. Further, the size of the block Block [i] [j] is not particularly limited, and for example, the area determination process may be performed on a pixel basis.
そして、ブロックBlock[i][j]毎に人物領域と非主要領域のいずれに含まれるかを判定すると、判定結果に応じて、例えば、図4(b)に示すように0〜2を割り当てる。ここでは、ブロックBlock[i][j]の判定結果、人物だった場合はそのブロックのBlock_id[i][j]に0を、非主要被写体だった場合はBlock_id[i][j]に1を、いずれの領域でもない(該当なし)場合にはBlock_id[i][j]に2を割り当てる。ここで、該当なしとは、例えば各領域の境界部分など、領域の判別が困難な部分を指す。そして、同じ値が割り当てられたブロックをまとめることで、人物領域と非主要領域に分けることができる。つまり、0が割り当てられたブロックをまとめて人物領域、1が割り当てられたブロックをまとめて非主要被写体とする。なお、本実施形態では、2が割り当てられたブロックは用いない。 When it is determined whether each block Block [i] [j] is included in the person area or the non-main area, 0-2 are assigned according to the determination result, for example, as shown in FIG. . Here, if the determination result of the block Block [i] [j] is a person, Block_id [i] [j] of the block is 0, and if it is a non-main subject, Block_id [i] [j] is 1 Is not any area (not applicable), 2 is assigned to Block_id [i] [j]. Here, “not applicable” refers to a portion where it is difficult to discriminate the region, such as a boundary portion of each region. Then, the blocks assigned with the same value can be grouped into a person area and a non-main area. That is, the blocks to which 0 is assigned are collectively set as the person area, and the blocks to which 1 is assigned are collectively set as the non-main subject. In the present embodiment, a block to which 2 is assigned is not used.
次に、人物領域の代表輝度値を算出する。代表輝度値は、領域分割処理において人物領域と判定された分割ブロックの集合の輝度平均値である。非発光プレ画像における人物領域の代表輝度値をY_HUMAN_PREとした時、Y_HUMAN_PREは以下の式(1)で算出される。
Y_HUMAN_PRE = Σ( W_HUMAN[i][j] × Block_Y[i][j] )/ ΣW_HUMAN[i][j]
(Block_id[i][j]=0のブロックのみ) …(1)
ここで、Block_Y[i][j]は各ブロックの平均輝度値、W_HUMAN[i][j]は各ブロックに対する重み係数であり、任意に設定可能とする。ただし、ここでは人物領域と判定された全ブロックの平均輝度を算出するため、W_HUMAN[i][j]はすべての(i, j)について1とする。
Next, the representative luminance value of the person area is calculated. The representative luminance value is an average luminance value of a set of divided blocks determined as a person area in the area dividing process. Y_HUMAN_PRE is calculated by the following equation (1), where Y_HUMAN_PRE is the representative luminance value of the person area in the non-light emitting pre-image.
Y_HUMAN_PRE = Σ (W_HUMAN [i] [j] × Block_Y [i] [j]) / ΣW_HUMAN [i] [j]
(Only blocks with Block_id [i] [j] = 0) (1)
Here, Block_Y [i] [j] is an average luminance value of each block, and W_HUMAN [i] [j] is a weighting coefficient for each block, and can be arbitrarily set. However, here, W_HUMAN [i] [j] is set to 1 for all (i, j) in order to calculate the average luminance of all blocks determined to be a human area.
以上の処理により、主要被写体情報算出部203の出力として、非発光プレ画像における人物領域の代表輝度値Y_HUMAN_PREが得られる。 With the above processing, the representative luminance value Y_HUMAN_PRE of the person area in the non-light emitting pre-image is obtained as the output of the main subject information calculation unit 203.
次にS104において、撮像条件設定部204では、主要被写体情報算出部203から得られた非発光プレ画像における人物の代表輝度値Y_HUMAN_PREを基に、本撮影における撮像条件を決定する。ここで、撮像条件とは、本撮影時の露光条件、人物領域にかけるゲイン量、フラッシュ発光の有無、フラッシュ発光有りの場合におけるフラッシュ発光量を含む。 In step S <b> 104, the imaging condition setting unit 204 determines the imaging conditions for the main shooting based on the representative luminance value Y_HUMAN_PRE of the person in the non-light emitting pre-image obtained from the main subject information calculation unit 203. Here, the imaging conditions include exposure conditions at the time of actual photographing, a gain amount applied to a person area, presence / absence of flash emission, and flash emission amount in the case of flash emission.
ここで、図5に示す撮像条件設定処理のフローチャートを用いて、撮像条件設定部204の動作について説明する。なお、本第1の実施形態では逆光シーンを想定しているため、以降の説明では、逆光時の典型的な明るさの関係として、人物領域が非主要領域よりも暗いと仮定する。 Here, the operation of the imaging condition setting unit 204 will be described using the flowchart of the imaging condition setting process shown in FIG. Since the backlight scene is assumed in the first embodiment, in the following description, it is assumed that the person area is darker than the non-main area as a typical brightness relationship at the time of backlight.
まず、S201において、本撮影時に、図3に示すように逆光状態で暗くなった人物領域の明るさを補うゲイン(以下、「人物ゲイン」と呼ぶ。)を求める。なお、本撮影における露光条件は、予め設定されているものとする。 First, in S201, a gain (hereinafter referred to as “person gain”) that compensates for the brightness of a person area that has been darkened in a backlight state as shown in FIG. It should be noted that the exposure conditions in the main photographing are set in advance.
図6は、人物ゲインGAIN_HUMANの算出方法を示す概念図である。人物ゲインGAIN_HUMANは、本撮影における人物領域の代表輝度値Y_HUMAN_HONを、所定の目標輝度値Y_HUMAN_OUTに持ち上げるためのゲインである。図6から分かるように、プレ撮影と本撮影の露出差をdBvとすると、非発光プレ画像における人物領域の代表輝度値Y_HUMAN_PREから、Y_HUMAN_HON及びGAIN_HUMANは次式(2)、(3)により算出することができる。
Y_HUMAN_HON = Y_HUMAN_PRE × 2^(dBv) …(2)
GAIN_HUMAN = Y_HUMAN_OUT / Y_HUMAN_HON …(3)
FIG. 6 is a conceptual diagram showing a method for calculating the person gain GAIN_HUMAN. The person gain GAIN_HUMAN is a gain for raising the representative brightness value Y_HUMAN_HON of the person area in the actual shooting to a predetermined target brightness value Y_HUMAN_OUT. As can be seen from FIG. 6, assuming that the exposure difference between pre-photographing and main-photographing is dBv, Y_HUMAN_HON and GAIN_HUMAN are calculated by the following equations (2) and (3) from the representative luminance value Y_HUMAN_PRE of the person area in the non-light-emitting preimage. be able to.
Y_HUMAN_HON = Y_HUMAN_PRE × 2 ^ (dBv)… (2)
GAIN_HUMAN = Y_HUMAN_OUT / Y_HUMAN_HON (3)
以上説明したようにしてS201において本撮影時における人物ゲインGAIN_HUMANが決定されると、次に、S202において、フラッシュ発光量の算出を行う。ここでは、本撮影時のフラッシュ115のON/OFFの設定及び、フラッシュ115のON時の発光量Delta_EFを算出する。ここで、図7のフローチャートを参照しながら、フラッシュ発光量の算出処理について説明する。 As described above, when the person gain GAIN_HUMAN at the time of actual photographing is determined in S201, the flash light emission amount is calculated in S202. Here, the setting of ON / OFF of the flash 115 at the time of actual photographing and the light emission amount Delta_EF when the flash 115 is ON are calculated. Here, the flash light emission amount calculation processing will be described with reference to the flowchart of FIG.
まず、S301において、人物ゲインGAIN_HUMANと最大ゲイン量GAIN_MAXとの大小比較を行う。ここで、最大ゲイン量GAIN_MAXとは、増幅されるノイズ量が視覚的に許容できるかどうかの限界値にあたるゲイン量を示し、撮像素子107の性能等から予め設定された値である。 First, in S301, the person gain GAIN_HUMAN is compared with the maximum gain amount GAIN_MAX. Here, the maximum gain amount GAIN_MAX indicates a gain amount corresponding to a limit value as to whether or not the amount of noise to be amplified is visually acceptable, and is a value set in advance from the performance of the image sensor 107 or the like.
人物ゲインGAIN_HUMANが最大ゲイン量GAIN_MAX以下の場合は、本撮影においてゲインによる所望の階調変換処理をした際に、出力画像のノイズ量が許容レベルに収まることを示しており、フラッシュ発光は不要である。従って、S302においてフラッシュ発光無しと判定し、本処理は終了する。一方、人物ゲインGAIN_HUMANが最大ゲイン量GAIN_MAXよりも大きい場合は、そのままでは出力画像のノイズ量が許容レベルを超えてしまう。そのため、フラッシュ発光により人物領域の明るさを補い、人物ゲインGAIN_HUMANの値を小さくすることで、ノイズ量を抑制する。即ち、S301においてGAIN_HUMAN>GAIN_MAXの場合のみ、フラッシュ115を発光すると判定し、フラッシュ115を発光すると判定された場合のみ、S303以降の処理を行う。 If the human gain GAIN_HUMAN is less than or equal to the maximum gain amount GAIN_MAX, this indicates that the noise level of the output image will be within the allowable level when the desired tone conversion processing using the gain is performed in actual shooting, and flash emission is not required. is there. Therefore, it is determined that there is no flash emission in S302, and this process ends. On the other hand, when the person gain GAIN_HUMAN is larger than the maximum gain amount GAIN_MAX, the noise amount of the output image exceeds the allowable level as it is. Therefore, the amount of noise is suppressed by supplementing the brightness of the person area with flash emission and reducing the value of the person gain GAIN_HUMAN. That is, only when GAIN_HUMAN> GAIN_MAX in S301, it is determined that the flash 115 is emitted, and only when it is determined that the flash 115 is emitted, the processing after S303 is performed.
ただし、フラッシュ115を必要以上の発光量で発光した場合、フラッシュ光が人物から反射することによる白とび、いわゆる「テカり」が発生し、画質劣化を引き起こしてしまう。以上を踏まえ、テカりを最小限に抑えながら、ノイズ量が許容レベルに収まるような出力画像を得る制御が必要である。 However, when the flash 115 emits light with an amount of light more than necessary, overexposure occurs due to reflection of the flash light from a person, so-called “shininess” occurs, and image quality is deteriorated. Based on the above, it is necessary to control to obtain an output image in which the amount of noise falls within an allowable level while minimizing the amount of gloss.
S303では、本撮影時のフラッシュ発光量を算出する。フラッシュ発光量の算出に関しては、発光プレ画像と非発光プレ画像から、被写体の反射光成分を算出し、反射光成分と被写体の目標輝度値からフラッシュ発光量を算出する従来のEF処理が知られている。第1の実施形態においても基本的には従来のEF処理と同様の処理を行う。ここで、フラッシュ発光量の算出時の被写体の目標輝度値を、フラッシュ光によるテカりを最小限に抑えるよう、適切に設定する必要がある。 In S303, the flash emission amount at the time of actual photographing is calculated. Regarding the calculation of the flash emission amount, a conventional EF process is known in which the reflected light component of the subject is calculated from the emission pre-image and the non-emission pre-image, and the flash emission amount is calculated from the reflected light component and the target luminance value of the subject. ing. Also in the first embodiment, basically the same processing as the conventional EF processing is performed. Here, it is necessary to appropriately set the target luminance value of the subject at the time of calculating the flash emission amount so as to minimize the flash caused by the flash light.
図8は、フラッシュ発光量の算出方法を示す概念図である。図8に示すように、フラッシュ光により人物の明るさは補われ、フラッシュ発光時における人物領域の代表輝度値Y_HUMAN_HON_FLは、非発光時よりも明るくなる。従って、人物領域のゲインを再計算する。本実施形態では、再計算後の人物ゲインGAIN_HUMANが、最大ゲイン量GAIN_MAXと等しくなるように発光量を設定する。即ち、再計算前の人物ゲインGAIN_HUMANと最大ゲイン量GAIN_MAXとの差を補償できる発光量を設定する。上記の場合、図8から分かるように、Y_HUMAN_HON_FLは、以下の式(4)により求めることができる。
Y_HUMAN_HON_FL = Y_HUMAN_OUT / GAIN_MAX …(4)
本撮影画像における人物領域の代表輝度値が、式(4)で表されるY_HUMAN_HON_FLとなるように、EF処理によってフラッシュ発光量Delta_EFを決定する。
FIG. 8 is a conceptual diagram showing a method for calculating the flash emission amount. As shown in FIG. 8, the brightness of the person is compensated by the flash light, and the representative luminance value Y_HUMAN_HON_FL of the person area at the time of flash emission becomes brighter than that at the time of non-light emission. Therefore, the gain of the person area is recalculated. In the present embodiment, the light emission amount is set so that the recalculated person gain GAIN_HUMAN is equal to the maximum gain amount GAIN_MAX. That is, the light emission amount that can compensate for the difference between the human gain GAIN_HUMAN before recalculation and the maximum gain amount GAIN_MAX is set. In the above case, as can be seen from FIG. 8, Y_HUMAN_HON_FL can be obtained by the following equation (4).
Y_HUMAN_HON_FL = Y_HUMAN_OUT / GAIN_MAX (4)
The flash emission amount Delta_EF is determined by EF processing so that the representative luminance value of the person area in the actual captured image is Y_HUMAN_HON_FL expressed by Expression (4).
以上の処理によりS303でフラッシュ発光量Delta_EFを決定すると、次にS304において、発光上限量Delta_EF_MAXの算出を行う。ここで、発光上限量とは、フラッシュ光によるテカりが許容レベルに収まる最大のフラッシュ発光量のことである。S303では最大ゲイン量GAIN_MAXからフラッシュ発光量を算出したため、算出したフラッシュ発光量で被写体を撮影した場合、被写体のテカりが許容レベルを超え画質劣化を招く恐れがある。従って、被写体のテカりの観点から、フラッシュ発光量の上限値を見積もっておく必要がある。 When the flash light emission amount Delta_EF is determined in S303 by the above processing, the light emission upper limit amount Delta_EF_MAX is calculated in S304. Here, the light emission upper limit amount is the maximum flash light emission amount that allows the flash light to fall within an allowable level. In S303, since the flash emission amount is calculated from the maximum gain amount GAIN_MAX, when the subject is photographed with the calculated flash emission amount, the subject may exceed the permissible level and may cause image quality degradation. Therefore, it is necessary to estimate the upper limit value of the flash light emission amount from the viewpoint of subject shine.
図9〜図11は、S304における処理内容を示す図である。ここでは、図9(a)に示す非発光プレ画像と、図9(b)に示す発光プレ画像を用いて、テカりが許容できる最大の発光量であるDelta_EF_MAXを算出する。なお、上述したように、発光プレ画像は、非発光プレ画像に対し、露光条件を変えずに、フラッシュ115を所定の発光量Delta_EF_PREだけ発光させて撮影したものである。 9 to 11 are diagrams showing the processing contents in S304. Here, using the non-emission pre-image shown in FIG. 9 (a) and the emission pre-image shown in FIG. 9 (b), Delta_EF_MAX that is the maximum light emission amount that can be tolerated is calculated. Note that, as described above, the light emission pre-image is a non-light emission pre-image captured by causing the flash 115 to emit light by a predetermined light emission amount Delta_EF_PRE without changing the exposure conditions.
さらに、フラッシュ光が照射されている領域(主に人物領域)に着目し、この領域をフラッシュ照射領域と呼ぶ(図9(c))。フラッシュ照射領域は、フラッシュ照射により輝度値が大きく変化している領域であり、非発光プレ画像と発光プレ画像の位置(i, j)における画素値をそれぞれN_nfl[i][j]、N_flpre[i][j]とおくと、
(N_flpre[i][j] - N_nfl[i][j])/N_nfl[i][j] > TH …(5)
を満たす位置(i, j)の画素の集合である。ここで、式(5)のTHは所定の閾値であり、あらかじめ設定されているものとする。また、非発光プレ画像の画素値N_nfl[i][j]で正規化を行っている理由は、元の画素値が大きいほど、画素値の変動量として差分が大きく出ると考えられるからである。
Further, paying attention to an area irradiated with flash light (mainly a person area), this area is called a flash irradiation area (FIG. 9C). The flash irradiation area is an area where the luminance value is greatly changed by the flash irradiation, and the pixel values at the positions (i, j) of the non-light emitting pre-image and the light emitting pre-image are respectively set to N_nfl [i] [j] and N_flpre [ i] [j]
(N_flpre [i] [j]-N_nfl [i] [j]) / N_nfl [i] [j]> TH (5)
This is a set of pixels at a position (i, j) that satisfies. Here, TH in Equation (5) is a predetermined threshold value and is set in advance. The reason why normalization is performed with the pixel value N_nfl [i] [j] of the non-light-emitting pre-image is that the larger the original pixel value, the greater the difference in the pixel value. .
次に、発光プレ画像におけるテカり画素の画素数N_TEKARI_PREを算出する。ここで、テカり画素とは、発光画像のフラッシュ照射領域において、画素値が所定レベルTH_TEKARIを上回っている画素とする。テカり画素数N_TEKARI_PREは、フラッシュ照射領域に含まれる全画素に対して上述した閾値処理を行い、テカり画素と判定された画素の画素数である。 Next, the number of pixels N_TEKARI_PRE in the light emission pre-image is calculated. Here, the bright pixel is a pixel whose pixel value exceeds a predetermined level TH_TEKARI in the flash irradiation region of the luminescent image. The number of pixels to be taken N_TEKARI_PRE is the number of pixels that are determined to be taken pixels by performing the above threshold processing on all the pixels included in the flash irradiation region.
次に、フラッシュ発光量を大きくしていった場合のテカり画素数N_TEKARI_PREを算出する。フラッシュ発光量を大きくした場合、定性的には図10に示すように、テカり画素数は増加していくと考えられる。従って、テカり画素数N_TEKARI_PREが所定の最大許容数N_TEKARI_MAXに達する場合のフラッシュ発光量Delta_EF_MAXが、被写体のテカりの観点から見積もったフラッシュ発光量の上限(以下、「発光上限量」と呼ぶ。)となる。なお、発光プレ画像におけるテカり画素数N_TEKARI_PREが最大許容数N_TEKARI_MAXよりも大きい場合は、プレ発光の発光量が大きすぎることを意味しており、発光量Delta_EF_PREを小さくして再度発光プレ画像及び非発光プレ画像を取得する。このようにして、発光プレ画像におけるテカり画素数N_TEKARI_PREが最大許容数N_TEKARI_MAXよりも小さくなるようにする。 Next, the number of pixels N_TEKARI_PRE when the flash emission amount is increased is calculated. When the flash light emission amount is increased, qualitatively, it is considered that the number of leading pixels increases as shown in FIG. Therefore, the flash emission amount Delta_EF_MAX when the number of pixels N_TEKARI_PRE reaches the predetermined maximum allowable number N_TEKARI_MAX is the upper limit of the flash emission amount estimated from the viewpoint of subject lighting (hereinafter referred to as “emission upper limit amount”). It becomes. Note that when the number of pixels N_TEKARI_PRE in the light emission pre-image is larger than the maximum allowable number N_TEKARI_MAX, it means that the light emission amount of the pre-light emission is too large. A luminescent pre-image is acquired. In this manner, the number of pixels N_TEKARI_PRE in the light emission pre-image is made smaller than the maximum allowable number N_TEKARI_MAX.
図11は、発光上限量Delta_EF_MAXを算出する処理のフローチャートである。まず、S401において、フラッシュ発光量Delta_EF_tmpの初期値を発光プレ画像の撮影に用いた所定の発光量Delta_EF_PREとする。次に、S402において、Delta_EF_tmpに所定のインクリメント量dFLを加算し、S403において、発光量がDelta_EF_tmp時のテカり画素数N_TEKARIを算出する。 FIG. 11 is a flowchart of a process for calculating the light emission upper limit amount Delta_EF_MAX. First, in S401, the initial value of the flash light emission amount Delta_EF_tmp is set to a predetermined light emission amount Delta_EF_PRE used for photographing the light emission pre-image. Next, in S402, a predetermined increment dFL is added to Delta_EF_tmp, and in S403, the number N_TEKARI of estimated pixels when the light emission amount is Delta_EF_tmp is calculated.
テカり画素数N_TEKARI_PREの算出は、式(5)で表されるフラッシュ照射領域における画素値の変化率が、フラッシュ発光量に比例するという仮定の下で行う。その場合、フラッシュ発光量Delta_EF_tmp時の座標(i, j)における画素値をN_fl[i][j]とすると、プレ発光時との比例関係から、以下の式が成立する。 The number of leading pixels N_TEKARI_PRE is calculated under the assumption that the rate of change of the pixel value in the flash irradiation area represented by Expression (5) is proportional to the flash emission amount. In this case, if the pixel value at the coordinates (i, j) at the time of flash emission amount Delta_EF_tmp is N_fl [i] [j], the following equation is established from the proportional relationship with pre-emission.
Delta_EF_tmp : Delta_EF_PRE
=(N_fl[i][j]-N_nfl[i][j])/N_nfl[i][j] : (N_flpre[i][j]-N_nfl[i][j])/N_nfl[i][j] …(6)
式(6)をN_fl[i][j]について解くと、
N_fl[i][j] = N_nfl[i][j] + (Delta_EF_tmp/Delta_EF_PRE)*(N_flpre[i][j] -N_nfl[i][j]) …(7)
となる。次に、式(7)から算出した画素値N_fl[i][j]を所定レベルTH_TEKARIと比較し、テカり画素であるかの判定を行う。
Delta_EF_tmp: Delta_EF_PRE
= (N_fl [i] [j] -N_nfl [i] [j]) / N_nfl [i] [j]: (N_flpre [i] [j] -N_nfl [i] [j]) / N_nfl [i] [ j] ... (6)
Solving Equation (6) for N_fl [i] [j]
N_fl [i] [j] = N_nfl [i] [j] + (Delta_EF_tmp / Delta_EF_PRE) * (N_flpre [i] [j] -N_nfl [i] [j])… (7)
It becomes. Next, the pixel value N_fl [i] [j] calculated from Expression (7) is compared with a predetermined level TH_TEKARI to determine whether it is a dead pixel.
上述した処理を、フラッシュ照射領域に含まれる全画素に対して行い、画素値N_fl[i][j]が所定レベルTH_TEKARIを超え、テカり画素と判別された画素数を、テカり画素数N_TEKARIとする。次に、S404において、テカり画素数N_TEKARIと所定の最大許容数N_TEKARI_MAXとの比較処理を行う。テカり画素数N_TEKARIが最大許容数N_TEKARI_MAX以下である場合は、S402〜S404の処理を繰り返す。一方、テカり画素数N_TEKARIが最大許容数N_TEKARI_MAXよりも大きい場合は、S405において、テカり画素数N_TEKARIが最大許容数N_TEKARI_MAXよりも大きくなる直前の発光量であるDelta_EF_tmp - dFLを発光上限量Delta_EF_MAXとする。 The above-described processing is performed on all the pixels included in the flash irradiation area, and the pixel value N_fl [i] [j] exceeds the predetermined level TH_TEKARI, and the number of pixels determined to be a defective pixel is determined as the number of detected pixels N_TEKARI. And Next, in S404, a comparison process between the number of pixels N_TEKARI and a predetermined maximum allowable number N_TEKARI_MAX is performed. When the number of pixels N_TEKARI is less than or equal to the maximum allowable number N_TEKARI_MAX, the processes of S402 to S404 are repeated. On the other hand, when the number of detected pixels N_TEKARI is larger than the maximum allowable number N_TEKARI_MAX, in S405, Delta_EF_tmp-dFL, which is the light emission amount immediately before the number of detected pixels N_TEKARI becomes larger than the maximum allowable number N_TEKARI_MAX, is set as the emission upper limit amount Delta_EF_MAX. To do.
以上の処理により、S304において、被写体のテカりが許容できるフラッシュ115の発光上限量Delta_EF_MAXが得られる。 With the above processing, in S304, the light emission upper limit amount Delta_EF_MAX of the flash 115 that allows the subject to be lit is obtained.
次に、S305において、発光量調整係数k_EFの算出を行う。ここで、S303で求めたフラッシュ発光量Delta_EFを調整する理由は以下のとおりである。図12(a)に示すように、人物領域だけでなく、非主要領域にも暗部が多く存在するようなシーンでは、フラッシュ115を発光しても、図12(b)に示すように、非主要領域にはフラッシュ光が届かない可能性が高い。従って、非主要領域1201はフラッシュ光で明るさを補うことができず、所望の効果を得ることができない。そのため、非主要領域に、人物領域と同等の暗部が多く存在するようなシーンでは、フラッシュ発光量を弱める制御が必要と考えられる。 Next, in S305, the light emission amount adjustment coefficient k_EF is calculated. Here, the reason for adjusting the flash emission amount Delta_EF obtained in S303 is as follows. As shown in FIG. 12 (a), in a scene where there are many dark areas not only in the person area but also in non-main areas, even if the flash 115 is emitted, as shown in FIG. There is a high possibility that the flash will not reach the main area. Therefore, the brightness of the non-main area 1201 cannot be supplemented with flash light, and a desired effect cannot be obtained. For this reason, in a scene where there are many dark areas equivalent to the person area in the non-main area, it is considered necessary to control to reduce the flash emission amount.
図13(a)は、非主要領域の輝度ヒストグラムである。図13(a)に示すように、輝度値が閾値TH0以下の輝度領域を暗部領域と定義し、非主要領域全体の画素数に対する暗部領域の画素数の比率を算出する。算出した比率を、暗部画素比率と呼ぶ。図13(b)は、暗部画素比率と発光量調整係数k_EFとの関係を示すグラフである。横軸は暗部画素比率であり、暗部画素比率が小さいほど非主要領域内に暗部画素が存在しないことを示し、暗部画素比率が大きいほど非主要領域内に暗部画素が存在することを示している。上述のとおり、暗部画素数が多い場合ほど発光量を小さくすることが好ましいと考えられるため、暗部画素比率が大きいほど発光量調整係数k_EFが小さくなるように設定する。 FIG. 13A is a luminance histogram of a non-main area. As shown in FIG. 13A, a luminance area having a luminance value equal to or lower than a threshold TH0 is defined as a dark area, and the ratio of the number of pixels in the dark area to the number of pixels in the entire non-main area is calculated. The calculated ratio is called a dark pixel ratio. FIG. 13B is a graph showing the relationship between the dark portion pixel ratio and the light emission amount adjustment coefficient k_EF. The abscissa represents the dark pixel ratio, and the smaller the dark pixel ratio, the more dark pixels are not present in the non-major region, and the larger the dark pixel ratio is, the dark pixels are present in the non-main region. . As described above, it is considered that it is preferable to decrease the light emission amount as the number of dark portion pixels is larger. Therefore, the light emission amount adjustment coefficient k_EF is set to be smaller as the dark portion pixel ratio is larger.
次に、発光上限量Delta_EF_MAX及び発光量調整係数k_EFを用いて、S306において、フラッシュ発光量の調整を行う。調整は、まず、S303で求めたフラッシュ発光量Delta_EFが発光上限量Delta_EF_MAXよりも大きい場合には、フラッシュ発光量Delta_EFを発光上限量Delta_EF_MAXにクリップ処理する。次に、クリップ処理後のフラッシュ発光量Delta_EFに対し、発光量調整係数k_EFを乗算する。以上の処理により算出された値k_EF*Delta_EFを、被写体のテカり及び、非主要領域に暗部が多く存在する場合の影響を考慮した最終的なフラッシュ発光量Delta_EF_FIXとして出力する。 Next, in step S306, the flash light emission amount is adjusted using the light emission upper limit amount Delta_EF_MAX and the light emission amount adjustment coefficient k_EF. In the adjustment, when the flash light emission amount Delta_EF obtained in S303 is larger than the light emission upper limit amount Delta_EF_MAX, the flash light emission amount Delta_EF is clipped to the light emission upper limit amount Delta_EF_MAX. Next, the flash emission amount Delta_EF after the clipping process is multiplied by the emission amount adjustment coefficient k_EF. The value k_EF * Delta_EF calculated by the above processing is output as the final flash emission amount Delta_EF_FIX that takes into account the effect of subject lighting and the presence of many dark areas in non-main areas.
S302またはS306の処理を終えると、図4のS202における処理が終了し、S203に進む。 When the process of S302 or S306 is completed, the process in S202 of FIG. 4 ends, and the process proceeds to S203.
次に、S203において、本撮影時における露光条件の調整を行う。ここで、露光条件の調整が必要な理由は以下のとおりである。本撮影時における露光条件はあらかじめ算出されているが、S202においてフラッシュ発光量を調整し、Delta_EF_FIXはDelta_EFよりも発光量が小さくなる場合がある。従って、人物領域に最大ゲインのGAIN_MAXをかけても、目標の輝度まで達しない場合があり、その場合は露光条件を当初の設定よりオーバー露出に設定し、不足する輝度を補償するように、明るめに撮影する。従って、露光条件の調整量をDelta_Bv_FLとすると、
Delta_Bv_FL = Delta_EF - Delta_EF_FIX …(8)
となる。式(8)で表されるDelta_Bv_FLの分だけ、本撮影時の露光条件がオーバーになるように調整する。
Next, in S203, the exposure condition during the main photographing is adjusted. Here, the reason why the exposure conditions need to be adjusted is as follows. Although the exposure conditions at the time of actual photographing are calculated in advance, the flash light emission amount may be adjusted in S202, and the light emission amount of Delta_EF_FIX may be smaller than Delta_EF. Therefore, even if the maximum gain GAIN_MAX is applied to the human area, the target brightness may not be reached.In this case, the exposure condition is set to overexposure from the initial setting, and the brightness is increased to compensate for the insufficient brightness. Take a picture. Therefore, if the exposure condition adjustment amount is Delta_Bv_FL,
Delta_Bv_FL = Delta_EF-Delta_EF_FIX (8)
It becomes. Adjustment is made so that the exposure condition during the actual photographing is over by the amount of Delta_Bv_FL represented by Expression (8).
上述した処理により、S104において、撮像条件設定部204により、本撮影時の露光条件、人物領域にかけるゲイン量、フラッシュ発光の有無、及びフラッシュ発光有りの場合におけるフラッシュ発光量を含む撮影条件が決定される。 With the above-described processing, in S104, the imaging condition setting unit 204 determines the shooting conditions including the exposure conditions at the time of actual shooting, the gain amount applied to the person area, the presence or absence of flash emission, and the flash emission amount in the case of flash emission. Is done.
次に、S105において、S104において撮像条件設定部204で決定された撮像条件に従い、本撮影を行う。以下、本撮影で得られた画像を、本撮影画像と呼ぶ。次に、S106において、S105で撮影された本撮影画像に対し、画像処理回路125は所定の信号処理を施す。ここで、所定の信号処理の一例としては、撮像素子107の欠陥画素補正や周辺光量落ち補正、及びノイズリダクション処理などが挙げられる。 Next, in S105, actual shooting is performed according to the imaging conditions determined by the imaging condition setting unit 204 in S104. Hereinafter, an image obtained by actual photographing is referred to as an actual photographed image. Next, in S106, the image processing circuit 125 performs predetermined signal processing on the actual captured image captured in S105. Here, examples of the predetermined signal processing include defective pixel correction, peripheral light amount drop correction, noise reduction processing, and the like of the image sensor 107.
次に、S107において、主要被写体情報算出部203により、本撮影画像の主要被写体情報を算出する。なお主要被写体情報は、S103で非発光プレ画像から得られた情報と同様に、被写体領域の分割情報、人物領域の代表輝度値及び、人物領域のゲイン値である。ここで、主要被写体情報の算出を再度行う理由は、主に以下の2点である。1点目は、プレ撮影と本撮影で撮像タイミングにズレがあるため、被写体の動きや撮影者の手振れによって、撮像される画像が変化することである。2点目は、S103における主要被写体情報算出処理では、人物領域のゲイン値を算出するために領域分割を行ったが、S107における主要被写体情報算出処理では、本撮影画像に階調変換処理を施すことまで考慮して領域分割を行う必要があることである。そのため、例えば、領域分割の精度を上げることが考えられる。一例として、画素単位としたり、S103で領域分割したブロックよりも小さいブロックで領域分割する。なお、S107における主要被写体情報算出処理において、S103における主要被写体情報算出処理の結果をそのまま用いてもよい。 In step S107, the main subject information calculation unit 203 calculates main subject information of the actual captured image. The main subject information is subject region division information, a representative luminance value of the person region, and a gain value of the person region, similar to the information obtained from the non-light-emitting pre-image in S103. Here, the reason why the main subject information is calculated again is mainly the following two points. The first point is that the image to be captured changes due to the movement of the subject and the camera shake of the photographer because there is a shift in the imaging timing between the pre-photographing and the main photographing. Secondly, in the main subject information calculation process in S103, region division is performed to calculate the gain value of the person region, but in the main subject information calculation process in S107, gradation conversion processing is performed on the main photographed image. It is necessary to divide the region in consideration of the above. Therefore, for example, it is conceivable to improve the accuracy of area division. As an example, the area is divided by a pixel unit or a block smaller than the block obtained by dividing the area in S103. In the main subject information calculation process in S107, the result of the main subject information calculation process in S103 may be used as it is.
次に、S108において、本撮影画像に所定の階調変換処理を行う。階調変換処理は、本撮影画像における各被写体領域が、所定の明るさになるように制御する処理である。ここで、所定の明るさとは、図6に示すように、人物領域の目標輝度値Y_HUMAN_OUTである。第1の実施形態における階調変換処理では、本撮影画像における人物領域に対し、一律に人物ゲイン量GAIN_HUMAN(非発光時)もしくはGAIN_MAX(発光時)を乗じる。 Next, in S108, predetermined gradation conversion processing is performed on the actual captured image. The gradation conversion process is a process for controlling each subject area in the actual captured image to have a predetermined brightness. Here, the predetermined brightness is the target luminance value Y_HUMAN_OUT of the person area as shown in FIG. In the gradation conversion processing in the first embodiment, the human gain amount GAIN_HUMAN (during non-light emission) or GAIN_MAX (during light emission) is uniformly multiplied with respect to the human region in the actual captured image.
最後に、S108において生成された出力画像が、表示器131及び、またはフラッシュメモリ133に送られ、表示及び、または記録が行われる。 Finally, the output image generated in S108 is sent to the display 131 and / or the flash memory 133 for display and / or recording.
以上説明したように第1の実施形態によれば、フラッシュ発光量を適切に制御しながら、入力画像に応じて適応的な階調制御を行い、より自然な出力画像を得ることができる。 As described above, according to the first embodiment, adaptive gradation control is performed according to the input image while appropriately controlling the flash light emission amount, and a more natural output image can be obtained.
<第2の実施形態>
次に、本発明の第2の実施形態について説明する。第2の実施形態では、第1の実施形態と比較して、S108における階調変換処理の処理内容が異なる。第1の実施形態における階調変換処理では、人物領域に対して一律のゲインを乗じていた。しかしながら、このような処理では、非主要領域にゲインを乗じないように、人物領域を正確に抽出する必要がある。これに対し、本第2の実施形態では、精密な人物領域の抽出を必要とせず、より簡易に階調変換処理を行う。具体的には、従来のデジタル覆い焼き処理と同様に、輝度別ゲイン処理を行う。
<Second Embodiment>
Next, a second embodiment of the present invention will be described. In the second embodiment, the processing content of the gradation conversion processing in S108 is different from that in the first embodiment. In the gradation conversion process in the first embodiment, a uniform gain is multiplied to the person area. However, in such processing, it is necessary to accurately extract the person area so as not to multiply the non-main area by a gain. On the other hand, in the second embodiment, gradation conversion processing is performed more simply without requiring precise person region extraction. Specifically, similarly to the conventional digital dodging process, the brightness-specific gain process is performed.
即ち、第2の実施形態においては、図2におけるS107の主被写体情報算出処理において、本撮影画像に対してS103と同様の人物領域の抽出を行い、人物領域の代表輝度値を算出し、輝度別ゲイン特性を生成する処理を行う。 In other words, in the second embodiment, in the main subject information calculation process of S107 in FIG. 2, the person area extraction similar to S103 is performed on the main captured image, the representative brightness value of the person area is calculated, and the brightness Processing for generating another gain characteristic is performed.
図14は、輝度別ゲイン特性算出の一例を示す図である。図14に示すように、入力画像から算出した人物ゲインと人物の代表輝度値をもとに、輝度別ゲイン特性を生成する。本第2の実施形態においても図3に示すような逆光シーンを想定しており、典型的な逆光シーンでは、人物領域の輝度は周囲と比較して小さくなる傾向にある。一方、人物領域に対しては、人物の顔の陰影等を残してコントラストを保つため、なるべく一律のゲインをかけた方が良いと考えられる。従って、図14に示すように、人物領域の代表輝度値であるY_HUMAN_HON_FL以下の輝度を持つ領域には、一様にGAIN_HUMANを乗じる。一方、Y_HUMAN_HON_FL以上の輝度を持つ領域には、輝度の増加とともにゲインが1.0に漸近するような特性をもつ輝度別ゲインを生成する。このような手法で生成した輝度別ゲインを本撮影画像に乗じ、所望の出力画像を得る。 FIG. 14 is a diagram illustrating an example of calculation of luminance-specific gain characteristics. As shown in FIG. 14, the gain-specific gain characteristic is generated based on the person gain calculated from the input image and the representative brightness value of the person. Also in the second embodiment, a backlight scene as shown in FIG. 3 is assumed. In a typical backlight scene, the brightness of the person region tends to be smaller than the surroundings. On the other hand, it is considered that a uniform gain should be applied to the person area as much as possible in order to maintain the contrast by leaving the shadow of the person's face. Therefore, as shown in FIG. 14, an area having a luminance equal to or lower than Y_HUMAN_HON_FL, which is the representative luminance value of the person area, is uniformly multiplied by GAIN_HUMAN. On the other hand, in a region having a luminance equal to or higher than Y_HUMAN_HON_FL, a luminance-specific gain having characteristics such that the gain gradually approaches 1.0 as the luminance increases is generated. The actual captured image is multiplied by the luminance-specific gain generated by such a method to obtain a desired output image.
以上説明したように、第2の実施形態に示す処理によれば、輝度別ゲインを用いて階調変換処理を行うことによって、第1の実施形態と比較して、より簡易に所望の出力画像を得ることができる。 As described above, according to the processing shown in the second embodiment, the desired output image can be more easily compared with the first embodiment by performing the gradation conversion processing using the gain for each luminance. Can be obtained.
107:撮像素子、115:フラッシュ、121:CPU、122:フラッシュ制御回路、125:画像処理回路 107: Image sensor, 115: Flash, 121: CPU, 122: Flash control circuit, 125: Image processing circuit
Claims (12)
前記画像から、予め決められた条件を満たす被写体領域を抽出し、抽出した被写体領域の情報を取得する抽出手段と、
前記被写体領域の情報に基づいて、照明装置の発光の有無及び、前記照明装置を発光させる場合に、前記画像に基づいて予め決められた発光上限量を上限として、発光量を決定する決定手段と、
前記決定手段により決定された条件で前記照明装置を制御して撮影された画像に対して、階調変換を行う階調変換手段と、
前記被写体領域の情報及び前記決定手段により決定された条件に基づいて、前記階調変換に用いるゲイン量を算出する算出手段と
を有することを特徴とする撮像装置。 Imaging means for photographing a subject and outputting an image;
Extraction means for extracting a subject area that satisfies a predetermined condition from the image and acquiring information of the extracted subject area;
Based on the information of the object area, the presence or absence of light emission of the lighting device and, in case of emitting the illumination device, the light emission limit amount as an upper limit determined in advance based on the image, determining means for determining the light emission amount ,
Gradation conversion means for performing gradation conversion on an image captured by controlling the illumination device under the conditions determined by the determination means;
An imaging apparatus comprising: a calculation unit that calculates a gain amount used for the gradation conversion based on the information on the subject region and the condition determined by the determination unit.
抽出手段が、前記画像から、予め決められた条件を満たす被写体領域を抽出し、抽出した被写体領域の情報を取得する抽出工程と、
決定手段が、前記被写体領域の情報に基づいて、照明装置の発光の有無及び、前記照明装置を発光させる場合に、前記画像に基づいて予め決められた発光上限量を上限として、発光量を決定する決定工程と、
階調変換手段が、前記決定工程により決定された条件で前記照明装置を制御して撮影された画像に対して、階調変換を行う階調変換工程と、
算出手段が、前記被写体領域の情報及び前記決定工程により決定された条件に基づいて、前記階調変換に用いるゲイン量を算出する算出工程と
を有することを特徴とする撮像装置の制御方法。 An imaging process in which an imaging unit images a subject and outputs an image;
An extracting step of extracting a subject area that satisfies a predetermined condition from the image and obtaining information of the extracted subject area;
Determining means, based on information of the object area, the presence or absence of light emission of the lighting device and, in case of emitting the illumination device, the light emission limit amount as an upper limit determined in advance based on the image, determining a light emission amount A decision process to
A gradation conversion step in which gradation conversion means performs gradation conversion on an image captured by controlling the illumination device under the conditions determined in the determination step;
And a calculation step of calculating a gain amount used for the gradation conversion based on the information on the subject region and the condition determined by the determination step.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014194297A JP6423669B2 (en) | 2014-09-24 | 2014-09-24 | Imaging apparatus and control method thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014194297A JP6423669B2 (en) | 2014-09-24 | 2014-09-24 | Imaging apparatus and control method thereof |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2016066893A JP2016066893A (en) | 2016-04-28 |
| JP6423669B2 true JP6423669B2 (en) | 2018-11-14 |
Family
ID=55804294
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014194297A Expired - Fee Related JP6423669B2 (en) | 2014-09-24 | 2014-09-24 | Imaging apparatus and control method thereof |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6423669B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111368596B (en) * | 2018-12-26 | 2023-08-04 | 北京眼神智能科技有限公司 | Face recognition backlight compensation method and device, readable storage medium and equipment |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4315708B2 (en) * | 2003-03-07 | 2009-08-19 | オリンパス株式会社 | camera |
| JP2008268361A (en) * | 2007-04-17 | 2008-11-06 | Fujifilm Corp | Imaging device |
| JP2009124309A (en) * | 2007-11-13 | 2009-06-04 | Nikon Corp | Imaging device |
| JP5821480B2 (en) * | 2011-09-29 | 2015-11-24 | カシオ計算機株式会社 | Digital camera, and photographing method and program thereof |
| JP2014098859A (en) * | 2012-11-15 | 2014-05-29 | Samsung R&D Institute Japan Co Ltd | Imaging apparatus and imaging method |
| JP6097588B2 (en) * | 2013-02-13 | 2017-03-15 | キヤノン株式会社 | Image processing apparatus and image processing method |
-
2014
- 2014-09-24 JP JP2014194297A patent/JP6423669B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2016066893A (en) | 2016-04-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10574961B2 (en) | Image processing apparatus and image processing method thereof | |
| KR101102150B1 (en) | An image processing method, and an image processing apparatus | |
| JP6445844B2 (en) | Imaging device and method performed in imaging device | |
| JP5743696B2 (en) | Image processing apparatus, image processing method, and program | |
| JP6218389B2 (en) | Image processing apparatus and image processing method | |
| TWI407780B (en) | Method for image exposure correction | |
| JP2014179756A (en) | Image processing device, control method therefor and control program | |
| WO2012093519A1 (en) | Imaging device and light emission amount control method | |
| JP5029195B2 (en) | Exposure control device and imaging device | |
| JP5149055B2 (en) | Imaging device | |
| JP6047686B2 (en) | Imaging device | |
| JP5371719B2 (en) | Imaging apparatus and control method thereof | |
| JP4300936B2 (en) | Imaging device | |
| JP6423669B2 (en) | Imaging apparatus and control method thereof | |
| JP6397261B2 (en) | Image processing apparatus and method | |
| JP2013179485A (en) | Image processing apparatus and control method thereof | |
| JP6300514B2 (en) | IMAGING DEVICE AND IMAGING DEVICE CONTROL METHOD | |
| KR100978675B1 (en) | How to adjust the white balance when shooting with the flash | |
| JP6570311B2 (en) | Image processing apparatus and image processing method | |
| JP2014098859A (en) | Imaging apparatus and imaging method | |
| JP2011135379A (en) | Imaging apparatus, imaging method and program | |
| JP7682954B2 (en) | Imaging device, control method and program thereof | |
| JP2017139560A (en) | Imaging apparatus, imaging system, and imaging method | |
| JP2011259226A (en) | Imaging apparatus and control method thereof | |
| JP6021885B2 (en) | Image processing apparatus, image processing method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170922 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20180611 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20180615 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180808 |
|
| 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: 20180921 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20181019 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 6423669 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |