[go: up one dir, main page]

JP6333095B2 - Imaging apparatus, control method therefor, and program - Google Patents

Imaging apparatus, control method therefor, and program Download PDF

Info

Publication number
JP6333095B2
JP6333095B2 JP2014141775A JP2014141775A JP6333095B2 JP 6333095 B2 JP6333095 B2 JP 6333095B2 JP 2014141775 A JP2014141775 A JP 2014141775A JP 2014141775 A JP2014141775 A JP 2014141775A JP 6333095 B2 JP6333095 B2 JP 6333095B2
Authority
JP
Japan
Prior art keywords
exposure
imaging
image
value
frame
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.)
Active
Application number
JP2014141775A
Other languages
Japanese (ja)
Other versions
JP2016019196A (en
Inventor
洋明 梨澤
洋明 梨澤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014141775A priority Critical patent/JP6333095B2/en
Publication of JP2016019196A publication Critical patent/JP2016019196A/en
Application granted granted Critical
Publication of JP6333095B2 publication Critical patent/JP6333095B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Exposure Control For Cameras (AREA)
  • Studio Devices (AREA)

Description

本発明は、撮像装置およびその制御方法ならびにプログラムに関し、特にハイダイナミックレンジ画像の生成技術に関する。   The present invention relates to an imaging apparatus, a control method thereof, and a program, and more particularly to a technique for generating a high dynamic range image.

異なる露出(アンダー露出、オーバー露出)で撮影された複数枚の画像を合成して、画像のダイナミックレンジを拡大するハイダイナミックレンジ(HDR)合成といわれる技術が知られている。この技術では、各画像の適正露出部分を合成することで、白とびや黒つぶれを抑制し、暗部から明部まで良好な階調性を有する画像を得ることができる。   A technique called high dynamic range (HDR) composition is known in which a plurality of images taken with different exposures (underexposure and overexposure) are combined to expand the dynamic range of the images. In this technique, by combining the appropriately exposed portions of each image, it is possible to suppress overexposure and underexposure and to obtain an image having good gradation from a dark portion to a bright portion.

HDR合成技術は、静止画を撮影する場合のみならず、動画の撮影を行う場合にも適用可能な技術である。動画の撮影時にHDR合成(動画HDR撮影)を行う構成には、例えば動画の各フレームに異なる露出(アンダー露出、オーバー露出)を交互に適用して撮影する構成が知られている。このように撮影した場合、例えばフレームレートを60fpsとして動画を撮影すると、HDR合成されて記録される動画のフレームレートは半分の30fpsとなる。   The HDR synthesizing technique is a technique applicable not only when shooting a still image but also when shooting a moving image. As a configuration for performing HDR composition (moving image HDR shooting) when shooting a moving image, for example, a configuration in which different exposures (under exposure and over exposure) are alternately applied to each frame of the moving image is known. When shooting is performed in this manner, for example, when a moving image is shot at a frame rate of 60 fps, the frame rate of the moving image recorded by HDR synthesis is 30 fps, which is half.

動画の各フレームを用いてHDR撮影を行うためには、各フレームに適用する露出条件を順次制御する必要がある。特許文献1には、フレームの輝度のピーク検出を毎フレーム行って、アンダー露出を適用して撮影するフレームに対する露出時間を制御する技術が開示されている。また、特許文献2には、まず基準とする露出条件と階調変換特性を設定した撮影を行って、得られた信号レベル(即ちAEセンサの測光結果)に基づいて本撮影時に用いる各フレームの各露出と階調変換特性の組み合わせを適応的に選択する技術が開示されている。   In order to perform HDR shooting using each frame of a moving image, it is necessary to sequentially control exposure conditions applied to each frame. Japanese Patent Application Laid-Open No. H10-228688 discloses a technique for performing peak detection of the luminance of a frame every frame and controlling an exposure time for a frame to be shot by applying underexposure. Also, in Patent Document 2, first, shooting is performed with the exposure conditions and gradation conversion characteristics set as a reference, and based on the obtained signal level (that is, the photometric result of the AE sensor), each frame used at the time of actual shooting is recorded. A technique for adaptively selecting a combination of exposure and tone conversion characteristics is disclosed.

特開2009―213032号公報JP 2009-213032 A 特開2006−254279号公報JP 2006-254279 A

ところで、動画HDR撮影では、AE(自動露出制御)を動画の撮像中に行う場合がある。静止画のHDR撮影では、本撮影の前にAEによる露出制御が行われるのに対し、動画HDR撮影では、AEによる露出制御を動画の撮像中に並行して行う必要がある。露出制御の処理中には適正露出が徐々に変化するため、動画HDR撮影に用いるアンダー露出とオーバー露出の露出差が想定と異なるものになってしまう。従来であれば、現像後の露出をアンダー露出およびオーバー露出で撮影された画像で揃えるために、予めデジタルゲインやガンマなどの画像処理パラメータを決定しておくことができる。しかし、AEによる露出制御により想定と異なる露出差が生じた場合、現像後のHDR合成の際にアンダー露出およびオーバー露出で撮影された画像の間の輝度階調の連続性が低下し、例えば部分的に境界が発生するトーンジャンプが発生することが想定される。   By the way, in moving image HDR shooting, AE (automatic exposure control) may be performed during moving image shooting. In HDR shooting of still images, exposure control by AE is performed before main shooting, whereas in moving image HDR shooting, exposure control by AE needs to be performed in parallel with the shooting of moving images. Since the appropriate exposure gradually changes during the exposure control process, the exposure difference between the underexposure and overexposure used for moving image HDR shooting becomes different from the assumption. Conventionally, image processing parameters such as digital gain and gamma can be determined in advance in order to align the exposure after development with an image captured with underexposure and overexposure. However, when an exposure difference that is different from what is assumed occurs due to exposure control by AE, the luminance gradation continuity between images shot with underexposure and overexposure is reduced during HDR composition after development. It is assumed that a tone jump in which a boundary is generated occurs.

本発明は、上述の従来技術の問題点に鑑みてなされたものであり、動画によるHDR撮影において自動露出制御を行う場合に、生成画像の階調の連続性を向上させることが可能な撮像装置およびその制御方法ならびプログラムを提供することを目的とする。   The present invention has been made in view of the above-described problems of the prior art, and is an imaging apparatus capable of improving the continuity of the gradation of a generated image when automatic exposure control is performed in HDR shooting using a moving image. And its control method and program.

この課題を解決するため、例えば本発明の撮像装置は以下の構成を備える。すなわち、撮像手段と、所定のフレームレートで露出の異なる画像を繰り返し撮像するように撮像手段を制御する撮像制御手段と、撮像手段に入射させる光量を調節する露出制御手段と、撮像手段による撮像中に露出制御手段により光量が調節され、露出の異なる画像の露出差が所定の値から変動した場合、露出制御手段により調節された露出で撮像されたフレームの画像を該変動した露出差に基づいて補正する補正手段と、補正手段により補正されたフレームの画像を含む複数のフレームの画像を合成する合成手段と、を有することを特徴とする。   In order to solve this problem, for example, an imaging apparatus of the present invention has the following configuration. That is, an imaging unit, an imaging control unit that controls the imaging unit to repeatedly capture images with different exposures at a predetermined frame rate, an exposure control unit that adjusts the amount of light incident on the imaging unit, and during imaging by the imaging unit When the exposure control means adjusts the amount of light and the exposure difference of images with different exposures fluctuates from a predetermined value, the image of the frame captured with the exposure adjusted by the exposure control means is based on the changed exposure difference. The image processing apparatus includes correction means for correcting, and combining means for combining images of a plurality of frames including the image of the frame corrected by the correcting means.

本発明によれば、動画によるHDR撮影において自動露出制御を行う場合に、生成画像の階調の連続性を向上させることが可能になる。   According to the present invention, it is possible to improve the continuity of the gradation of a generated image when automatic exposure control is performed in HDR shooting using a moving image.

本発明の実施形態に係る撮像装置の一例としてのデジタルカメラ100の断面図(a)および機能構成例を示すブロック図(b)Sectional drawing (a) of the digital camera 100 as an example of the imaging device which concerns on embodiment of this invention, and the block diagram (b) which shows the function structural example 実施形態1に係る動画HDR撮影処理の一連の動作を示すフローチャート6 is a flowchart showing a series of operations of a moving image HDR shooting process according to the first embodiment. 実施形態1に係る測光用の信号取得と領域分割を示す図The figure which shows the signal acquisition for photometry and area division based on Embodiment 1 実施形態1に係る動画HDR撮影処理において露出条件を決定するために用いるプログラム線図Program diagram used to determine exposure conditions in moving picture HDR shooting processing according to Embodiment 1 実施形態1に係るシーンの輝度値および絞り値等の変化例を説明する図(a)および露出差の変化例を説明する図(b)FIG. 6A is a diagram for explaining an example of changes in the scene brightness value, aperture value, etc., and FIG. 6B is a diagram for explaining an example of exposure difference change. 実施形態1に係る信号処理装置の機能構成例を示すブロック図1 is a block diagram illustrating an example of a functional configuration of a signal processing device according to a first embodiment. 実施形態1に係るHDR合成における合成比率を示す図The figure which shows the synthetic | combination ratio in the HDR synthetic | combination which concerns on Embodiment 1. 実施形態1に係る動画HDR撮影処理の一連の動作を示すシーケンス図FIG. 6 is a sequence diagram illustrating a series of operations of the moving image HDR shooting process according to the first embodiment. 実施形態2に係るシーンの輝度値および絞り値等の変化例を説明する図(a)および露出差の変化例を説明する図(b)FIG. 6A is a diagram for explaining an example of changes in scene brightness values, aperture values, and the like, and FIG. 6B is a diagram for explaining an example of changes in exposure difference. 実施形態2に係るBv値に対する制御値を推定する処理を説明するための図The figure for demonstrating the process which estimates the control value with respect to Bv value which concerns on Embodiment 2. FIG. 実施形態2に係る信号処理装置の機能構成例を示すブロック図FIG. 3 is a block diagram illustrating an example of a functional configuration of a signal processing device according to a second embodiment. 実施形態2に係るガンマ変換によるゲイン修正を説明する図FIG. 6 is a diagram for explaining gain correction by gamma conversion according to the second embodiment. 実施形態2に係る動画HDR撮影処理の一連の動作を示すシーケンス図FIG. 10 is a sequence diagram showing a series of operations of moving image HDR shooting processing according to the second embodiment. 実施形態2の変形例に係るガンマ変換によるゲイン修正を説明する図FIG. 6 is a diagram for explaining gain correction by gamma conversion according to a modification of the second embodiment. 実施形態2に係る動画HDR撮影処理の一連の動作を示すフローチャート8 is a flowchart showing a series of operations of a moving image HDR shooting process according to the second embodiment.

(実施形態1)
以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。なお、以下では撮像装置の一例として、露出を変更して動画を取得可能な撮像機能を備えるデジタルカメラに本発明を適用した例を説明する。しかし、本発明でいう撮像装置は、デジタルカメラに限らず、このような撮像機能を備える任意の電子機器にも適用可能である。これらの電子機器には、例えば携帯電話機、ゲーム機、タブレット端末、パーソナルコンピュータ、時計型や眼鏡型の情報端末などが含まれてよい。
(Embodiment 1)
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. Hereinafter, as an example of the imaging apparatus, an example in which the present invention is applied to a digital camera having an imaging function capable of acquiring a moving image by changing exposure will be described. However, the imaging apparatus referred to in the present invention is not limited to a digital camera, and can be applied to any electronic device having such an imaging function. These electronic devices may include, for example, a mobile phone, a game machine, a tablet terminal, a personal computer, a clock-type or glasses-type information terminal.

(1 デジタルカメラの構成)
図1(a)は、実施形態の撮像装置の一例としてのデジタルカメラ100の、主として光学部材やセンサ等の配置を示す断面図である。デジタルカメラ100は、レンズ交換可能ないわゆるデジタル一眼レフカメラであり、カメラ本体1と交換レンズ2を有している。
(1 Digital camera configuration)
FIG. 1A is a cross-sectional view mainly illustrating an arrangement of optical members, sensors, and the like of a digital camera 100 as an example of an imaging apparatus of an embodiment. The digital camera 100 is a so-called digital single-lens reflex camera with interchangeable lenses, and has a camera body 1 and an interchangeable lens 2.

カメラ本体1における撮像素子10は、例えばCMOSイメージセンサやCCDイメージセンサであり、複数の画素(蓄積型光電変換素子)が配列されている。また、受光部に配置される画素以外に、画素信号の増幅回路や信号処理用の周辺回路などが形成されている。撮像素子10は、画素に対する電荷の蓄積時間や電荷の読み出しを調節することで、撮像素子による露出制御が可能な電子シャッター機能を実現する。交換レンズ2の備える撮影光学系により結像された被写体光学像を各画素で光電変換し、画素単位の画像信号を出力する。   An image sensor 10 in the camera body 1 is, for example, a CMOS image sensor or a CCD image sensor, and a plurality of pixels (storage type photoelectric conversion elements) are arranged. In addition to the pixels arranged in the light receiving section, an amplification circuit for pixel signals, a peripheral circuit for signal processing, and the like are formed. The image sensor 10 realizes an electronic shutter function that allows exposure control by the image sensor by adjusting the charge accumulation time for the pixels and the charge readout. A subject optical image formed by a photographing optical system provided in the interchangeable lens 2 is photoelectrically converted by each pixel, and an image signal in units of pixels is output.

撮像素子10の前方近傍に設けられていたメカニカルシャッター11は、撮像素子10の露出タイミングおよび露出時間を調節する。半透過性の主ミラー3と、主ミラー3の背面に配置された第1の反射ミラー7は、撮影時には上部に跳ね上がる。第2の反射ミラー8は、第1の反射ミラー7が反射した光束をさらに反射し、AFセンサ9に入射させる。AFセンサ9は、例えば画素数が撮像素子10よりも少ない撮像素子であってよい。第1の反射ミラー7、第2の反射ミラー8およびAFセンサ9は、撮影画面内の任意の位置での位相差検出方式で焦点検出を行うための構成である。なお、ライブビュー表示および動画記録時には常時主ミラー3が上部に跳ね上がった状態となるため、露出制御や焦点調節制御は撮像面の画像情報を使用して行うこととなる。   A mechanical shutter 11 provided near the front of the image sensor 10 adjusts the exposure timing and exposure time of the image sensor 10. The semi-transmissive main mirror 3 and the first reflecting mirror 7 disposed on the back surface of the main mirror 3 jump up to the top during photographing. The second reflection mirror 8 further reflects the light beam reflected by the first reflection mirror 7 and makes it incident on the AF sensor 9. The AF sensor 9 may be an image sensor having a smaller number of pixels than the image sensor 10, for example. The first reflection mirror 7, the second reflection mirror 8, and the AF sensor 9 are configured to perform focus detection by a phase difference detection method at an arbitrary position in the photographing screen. Note that, during live view display and moving image recording, the main mirror 3 is always in a state of jumping upward, so that exposure control and focus adjustment control are performed using image information on the imaging surface.

AEセンサ6は、測光用センサであり、ペンタプリズム4および第3の反射ミラー5で反射された被写体の光束を受光して測光を行う。AEセンサ6は受光部を複数の領域に分割し、領域ごとに被写体の輝度情報を出力できる。   The AE sensor 6 is a photometric sensor, and performs photometry by receiving the luminous flux of the subject reflected by the pentaprism 4 and the third reflecting mirror 5. The AE sensor 6 can divide the light receiving unit into a plurality of areas and output subject brightness information for each area.

ペンタプリズム4によってファインダー光学系が構成される。ペンタプリズム4で反射された被写体光学像は図示しないアイピースから観察可能である。またペンタプリズム4で反射された光束のうち、主ミラー3によって反射されてピント板12によって拡散された光線の光軸外の一部は、AEセンサ6に入射する。   A finder optical system is configured by the pentaprism 4. The subject optical image reflected by the pentaprism 4 can be observed from an eyepiece (not shown). Of the light beam reflected by the pentaprism 4, a part of the light beam reflected by the main mirror 3 and diffused by the focus plate 12 is incident on the AE sensor 6.

交換レンズ2は、取り外し可能なレンズであり、カメラ本体1に設けられたレンズマウントの接点を通じて、必要に応じてカメラ本体1と通信を行う。   The interchangeable lens 2 is a detachable lens, and communicates with the camera body 1 as needed through a contact point of a lens mount provided in the camera body 1.

図1(b)は、図1(a)に示したデジタルカメラ100のカメラ本体1とその交換レンズ2の機能構成例を示すブロック図である。なお、図1(b)に示す機能ブロックの1つ以上は、ASICやプログラマブルロジックアレイ(PLA)などのハードウェアによって実現されてもよいし、CPUやMPU等のプログラマブルプロセッサがソフトウェアを実行することによって実現されてもよい。また、ソフトウェアとハードウェアの組み合わせによって実現されてもよい。従って、以下の説明において、異なる機能ブロックが動作主体として記載されている場合であっても、同じハードウェアが主体として実現されうる。   FIG. 1B is a block diagram illustrating a functional configuration example of the camera body 1 and the interchangeable lens 2 of the digital camera 100 illustrated in FIG. One or more of the functional blocks shown in FIG. 1B may be realized by hardware such as an ASIC or a programmable logic array (PLA), or a programmable processor such as a CPU or MPU executes software. It may be realized by. Further, it may be realized by a combination of software and hardware. Therefore, in the following description, even when different functional blocks are described as the operation subject, the same hardware can be realized as the subject.

制御部21は、例えば内部にALU(Arithmetic and Logic Unit)33、ROM34、RAM35やA/Dコンバータ31、タイマー32、シリアル通信ポート(SPI)36等を内蔵したワンチップマイクロコンピュータである。制御部21は、例えばROM34に記憶されたプログラムを実行することにより、カメラ本体1および交換レンズ2の動作を制御する。例えば、制御部21は後述する動画HDR撮影に係る処理を実行するためカメラ本体1の各部を制御する。制御部21のA/Dコンバータ31には、AFセンサ9およびAEセンサ6の出力信号が入力される。   The control unit 21 is, for example, a one-chip microcomputer incorporating an ALU (Arithmetic and Logic Unit) 33, a ROM 34, a RAM 35, an A / D converter 31, a timer 32, a serial communication port (SPI) 36, and the like. The control unit 21 controls the operations of the camera body 1 and the interchangeable lens 2 by executing a program stored in the ROM 34, for example. For example, the control unit 21 controls each unit of the camera body 1 in order to execute processing related to moving image HDR shooting described later. Output signals of the AF sensor 9 and the AE sensor 6 are input to the A / D converter 31 of the control unit 21.

信号処理部25は、制御部21の指示に従って撮像素子10を制御し、撮像素子10によって出力された信号にA/D変換および信号処理を適用して画像信号を得る。信号処理部25は、得られた画像信号を記録する場合には、予め定められた形式で画像信号を圧縮し、記憶部26に出力する。また、後述する動画HDR撮影に必要な現像処理や合成処理を行う。   The signal processing unit 25 controls the image sensor 10 in accordance with an instruction from the control unit 21 and obtains an image signal by applying A / D conversion and signal processing to the signal output by the image sensor 10. When recording the obtained image signal, the signal processing unit 25 compresses the image signal in a predetermined format and outputs it to the storage unit 26. Further, development processing and composition processing necessary for moving picture HDR shooting described later are performed.

メモリ28は、DRAM等により構成される記憶装置である。メモリ28は、信号処理部25が種々の信号処理を行う際のワーク用メモリとして使用されるほか、後述する表示部27に画像を表示する際のVRAMとして使用される。   The memory 28 is a storage device configured by a DRAM or the like. The memory 28 is used as a work memory when the signal processing unit 25 performs various signal processing, and is also used as a VRAM when displaying an image on the display unit 27 described later.

表示部27は、液晶ディスプレイパネル等で構成され、カメラの設定値やメッセージ、メニュー画面等の情報や撮像した画像を表示する。表示部27は制御部21からの指示により制御される。記憶部26は例えばフラッシュメモリ等の不揮発性メモリであり、撮像された画像信号が信号処理部25から入力される。   The display unit 27 includes a liquid crystal display panel and displays information such as camera setting values, messages, menu screens, and captured images. The display unit 27 is controlled by an instruction from the control unit 21. The storage unit 26 is a non-volatile memory such as a flash memory, for example, and a captured image signal is input from the signal processing unit 25.

モーター22は、制御部21の制御に従い、主ミラー3および第1の反射ミラー7のアップ・ダウンやメカニカルシャッター11のチャージを行う。   The motor 22 performs up / down of the main mirror 3 and the first reflection mirror 7 and charging of the mechanical shutter 11 under the control of the control unit 21.

操作部23は、ユーザがカメラを操作するために用いるスイッチなどの入力デバイス群である。操作部23には撮影準備動作の開始および撮影開始を指示するためのレリーズスイッチや、撮影モードを選択するための撮影モード選択スイッチ、方向キー、決定キー等が含まれる。   The operation unit 23 is an input device group such as a switch used by the user to operate the camera. The operation unit 23 includes a release switch for instructing the start of shooting preparation operation and shooting start, a shooting mode selection switch for selecting a shooting mode, a direction key, a determination key, and the like.

接点部29は、交換レンズ2と通信を行うための接点であり、制御部21のシリアル通信ポートの入出力信号が接続される。シャッター駆動部24は制御部21の出力端子に接続されてメカニカルシャッター11を駆動する。   The contact part 29 is a contact for communicating with the interchangeable lens 2 and is connected to an input / output signal of the serial communication port of the control part 21. The shutter drive unit 24 is connected to the output terminal of the control unit 21 and drives the mechanical shutter 11.

交換レンズ2には、接点部29と対をなす接点部50が設けられている。接点部50には、制御部21と同様のワンチップマイクロコンピュータであるレンズ制御部51が接続され、制御部21との通信が可能である。レンズ制御部51は、例えばROMに記憶されたプログラムを実行し、制御部21からの指示に基づいて交換レンズ2の動作を制御する。また、交換レンズ2の状態などの情報を制御部21に通知する。   The interchangeable lens 2 is provided with a contact portion 50 that makes a pair with the contact portion 29. A lens control unit 51, which is a one-chip microcomputer similar to the control unit 21, is connected to the contact unit 50, and communication with the control unit 21 is possible. For example, the lens control unit 51 executes a program stored in the ROM, and controls the operation of the interchangeable lens 2 based on an instruction from the control unit 21. Further, the controller 21 is notified of information such as the state of the interchangeable lens 2.

フォーカスレンズ駆動部52は、レンズ制御部51の指示に基づいてフォーカスレンズを駆動し、ズーム駆動部53は、レンズ制御部51の指示に基づいて交換レンズの画角を変更する。   The focus lens drive unit 52 drives the focus lens based on an instruction from the lens control unit 51, and the zoom drive unit 53 changes the angle of view of the interchangeable lens based on an instruction from the lens control unit 51.

絞り駆動部54は、レンズ制御部51の指示に基づいて絞りの開口量を調節し、撮像素子10に入射する光量を調節する。   The aperture driving unit 54 adjusts the aperture amount of the aperture based on an instruction from the lens control unit 51 and adjusts the amount of light incident on the image sensor 10.

交換レンズ2がカメラ本体1に装着されると、レンズ制御部51および制御部21とは接点部29および50を介してデータ通信が可能になる。例えば、制御部21が焦点検出や露出演算を行うために必要なレンズ固有の光学的な情報や距離エンコーダに基づいた被写体距離に関する情報等が、レンズ制御部51から制御部21へデータ通信によって出力される。また、制御部21が焦点検出や露出演算により得られた焦点や絞りの制御情報をレンズへ送信すると、レンズ制御部51は、受信した制御情報に従って絞り等を制御する。また、接点部29は、レンズ側の接点部50を介して、交換レンズ2に備えられた図示しないモーターやアクチュエータに対して電力を供給する。   When the interchangeable lens 2 is attached to the camera body 1, the lens control unit 51 and the control unit 21 can perform data communication via the contact units 29 and 50. For example, lens-specific optical information necessary for the control unit 21 to perform focus detection and exposure calculation, information on the subject distance based on the distance encoder, and the like are output from the lens control unit 51 to the control unit 21 by data communication. Is done. When the control unit 21 transmits focus and aperture control information obtained by focus detection and exposure calculation to the lens, the lens control unit 51 controls the aperture and the like according to the received control information. The contact portion 29 supplies power to a motor or actuator (not shown) provided in the interchangeable lens 2 via the lens-side contact portion 50.

(2.動画HDR撮影に係る一連の動作)
次に、図2を参照して、動画HDR撮影に係る一連の動作を説明する。なお、本処理は、制御部21がROM34に記憶されたプログラムをRAM35の作業用領域に展開し、実行することにより実現される。
(2. A series of operations related to movie HDR shooting)
Next, a series of operations related to moving image HDR shooting will be described with reference to FIG. This process is realized by the control unit 21 expanding and executing the program stored in the ROM 34 in the work area of the RAM 35.

S11において制御部21は、たとえば操作部23に含まれる電源スイッチがオンされるなどにより動作が可能になると、交換レンズ2のレンズ制御部51と通信を行なって、焦点検出や測光に必要な各種レンズの情報を得るなどの初期化処理を行う。   In S11, when the control unit 21 becomes operable, for example, when a power switch included in the operation unit 23 is turned on, the control unit 21 communicates with the lens control unit 51 of the interchangeable lens 2 to perform various kinds of operations necessary for focus detection and photometry. Perform initialization processing such as obtaining lens information.

S12において制御部21は、操作部23に含まれる動画モード切り替えスイッチがオンされたことを検出すると、メモリ28の配置処理などを動画モードへと切り替えて、撮像を開始する。   In S12, when the control unit 21 detects that the moving image mode switching switch included in the operation unit 23 is turned on, the control unit 21 switches the arrangement processing of the memory 28 to the moving image mode and starts imaging.

S13において制御部21は、操作部23に含まれるスイッチにおいて動画HDR撮影に切り替えられたことを検出すると、撮影モードを動画HDR撮影モードに切り替える。   In S13, when the control unit 21 detects that the switch included in the operation unit 23 has been switched to the moving image HDR shooting, the control unit 21 switches the shooting mode to the moving image HDR shooting mode.

S14において制御部21は、適正露出条件を設定する。動画HDR撮影モードでは、予め設定された露出、例えば適正露出に対して+1EVのオーバー露出および−1EVのアンダー露出の設定で撮像を交互に繰り返す撮像制御を行う。本実施形態では、各露出を設定するための適正露出を算出する。適正露出の算出は、一度適正露出の算出を行って適正露出に制御した後であっても、シーンが変わった場合などに対応するために撮像中に定期的に実行される。   In S14, the control unit 21 sets appropriate exposure conditions. In the moving picture HDR shooting mode, imaging control is performed in which imaging is alternately repeated with a preset exposure, for example, + 1EV overexposure and -1EV underexposure for a proper exposure. In the present embodiment, an appropriate exposure for setting each exposure is calculated. The calculation of the appropriate exposure is periodically executed during imaging in order to cope with a case where the scene changes even after calculating the appropriate exposure once and controlling to the appropriate exposure.

以下に、本ステップにおける適正露出の算出処理について、より詳細に説明する。S12において開始された動画モードでは、制御部21は、いわゆるライブビュー画像(またはスルー画像)と呼ばれる、表示部27を電子ビューファインダとして機能させる動画撮影を実行する。この撮影はいわゆる電子シャッターによる撮影を連続的に実行することで行われる。この状態ではミラーアップしている状態となるため、AEセンサ6によって測光することができない。   Hereinafter, the process for calculating the appropriate exposure in this step will be described in more detail. In the moving image mode started in S12, the control unit 21 performs moving image shooting, which is a so-called live view image (or through image), that causes the display unit 27 to function as an electronic viewfinder. This photographing is performed by continuously performing photographing using a so-called electronic shutter. In this state, since the mirror is raised, photometry cannot be performed by the AE sensor 6.

制御部21は、ライブビュー画像の撮影中に定期的に撮像素子10による測光用の信号取得を行って測光を行う。例えばライブビュー画像の1フレームを測光用の画像信号として取得すればよい。制御部21は、画像信号を撮像素子10から読み出し、A/D変換を行ってRAMに格納する。制御部21は、取得した画素信号を、図3に示すように、画素領域を例えば9×7個のブロックに分割して、各ブロックに含まれる画素信号を用いてブロックごとに輝度情報を算出する。各ブロックの輝度情報は、例えばブロック内の全画素の輝度を平均することにより算出する。なお、輝度の演算は、例えばAPEX(Additive System of Photographic Exposure )表現におけるBv値(適正露出における被写体の輝度)に換算して行う。これらの輝度情報に基づいてY1〜Y7およびX1〜X9の射影データを算出する。一般にm行×n列といった2次元配列のデータから行方向や列方向に加算或いは加算平均した1次元配列のデータに変換する手法のことを2次元から1次元への投影又は射影という。また、列方向や行方向に加算した結果得られた1次元配列のデータのことを射影像或いは射影データと呼ぶ。本実施形態においては射影データY1〜Y7およびX1〜X9を以下のように算出する。
X1=Σ(x1)÷7 但し、x=1〜7
X2=Σ(x2)÷7 但し、x=1〜7
X3=Σ(x3)÷7 但し、x=1〜7
X4=Σ(x4)÷7 但し、x=1〜7
X5=Σ(x5)÷7 但し、x=1〜7
X6=Σ(x6)÷7 但し、x=1〜7
X7=Σ(x7)÷7 但し、x=1〜7
X8=Σ(x8)÷7 但し、x=1〜7
X9=Σ(x9)÷7 但し、x=1〜7
Y1=Σ(1y)÷9 但し、y=1〜9
Y2=Σ(2y)÷9 但し、y=1〜9
Y3=Σ(3y)÷9 但し、y=1〜9
Y4=Σ(4y)÷9 但し、y=1〜9
Y5=Σ(5y)÷9 但し、y=1〜9
Y6=Σ(6y)÷9 但し、y=1〜9
Y7=Σ(7y)÷9 但し、y=1〜9
制御部21は、算出された射影データY1〜Y7およびX1〜X9の中の最大値Emaxを求め、求めた最大値Emaxに基づいて第1の露出補正値γを算出する。具体的には、Emaxの値がBv値で10を超える場合に下記の式により算出する。
The control unit 21 performs photometry by periodically obtaining a signal for photometry by the image sensor 10 while capturing a live view image. For example, one frame of a live view image may be acquired as an image signal for photometry. The control unit 21 reads an image signal from the image sensor 10, performs A / D conversion, and stores it in the RAM. As shown in FIG. 3, the control unit 21 divides the pixel area into, for example, 9 × 7 blocks, and calculates luminance information for each block using the pixel signals included in each block. To do. The luminance information of each block is calculated, for example, by averaging the luminance of all the pixels in the block. Note that the calculation of the luminance is performed by converting into a Bv value (subject luminance at appropriate exposure) in, for example, APEX (Additive System of Photographic Exposure) expression. Based on these luminance information, projection data of Y1 to Y7 and X1 to X9 are calculated. In general, a method of converting data of a two-dimensional array such as m rows × n columns into data of a one-dimensional array added or averaged in the row direction or the column direction is referred to as projection or projection from two dimensions to one dimension. Further, data of a one-dimensional array obtained as a result of addition in the column direction or the row direction is referred to as a projection image or projection data. In the present embodiment, the projection data Y1 to Y7 and X1 to X9 are calculated as follows.
X1 = Σ (x1) ÷ 7 where x = 1-7
X2 = Σ (x2) ÷ 7 where x = 1-7
X3 = Σ (x3) ÷ 7 where x = 1-7
X4 = Σ (x4) ÷ 7 where x = 1-7
X5 = Σ (x5) ÷ 7 where x = 1-7
X6 = Σ (x6) ÷ 7 where x = 1-7
X7 = Σ (x7) ÷ 7 where x = 1-7
X8 = Σ (x8) ÷ 7 where x = 1-7
X9 = Σ (x9) ÷ 7 where x = 1-7
Y1 = Σ (1y) ÷ 9 where y = 1-9
Y2 = Σ (2y) ÷ 9 where y = 1-9
Y3 = Σ (3y) ÷ 9 where y = 1-9
Y4 = Σ (4y) ÷ 9 where y = 1-9
Y5 = Σ (5y) ÷ 9 where y = 1-9
Y6 = Σ (6y) ÷ 9 where y = 1-9
Y7 = Σ (7y) ÷ 9 where y = 1-9
The control unit 21 obtains the maximum value E max in the projection data Y1~Y7 and X1~X9 calculated, calculates a first exposure correction value γ on the basis of the maximum value E max determined. Specifically, when the value of E max exceeds 10 as the Bv value, it is calculated by the following formula.

γ=(Emax−10)×0.25
ここで、この第1の露出補正値γは、Bv値で10を超えるような高輝度被写体は明るく写った方が好ましい場合が多いという経験則に従い露出補正を行うものである。係数0.25はあくまで例であって、高輝度被写体をどの程度明るく写るようにするかで最適値を決めれば良い。また画像信号全体の平均Bv(AVEBv)を下記の式により算出する
AVEBv=Σ(Xx+Yy)÷(7×9)
但し、x=1〜7、y=1〜9

これによりBv値に対する制御値は、
適正露出:AVEBv+γ
となる。
γ = (E max −10) × 0.25
Here, the first exposure correction value γ performs exposure correction in accordance with an empirical rule that it is often preferable that a high-luminance subject having a Bv value exceeding 10 is bright. The coefficient 0.25 is merely an example, and an optimal value may be determined depending on how bright a high-luminance subject is to be captured. Further, the average Bv (AVEBv) of the entire image signal is calculated by the following formula: AVEBv = Σ (Xx + Yy) ÷ (7 × 9)
However, x = 1-7, y = 1-9

As a result, the control value for the Bv value is
Proper exposure: AVEBv + γ
It becomes.

制御部21は、このBv値に対する制御値に基づいて予め設定したプログラム線図を参照して露出条件を決定する。図4は、本動画HDR撮影において使用するプログラム線図の例を示している。実線は適正露出を、破線はオーバー露出を、二点鎖線はアンダー露出をそれぞれ示している。右側縦軸は絞り値Avを、左側縦軸および上部横軸はBv値を示している。また、下部横軸はTv(シャッタースピード)を示しているが、図4に示す線図では、1/30秒以上の場合についてはISO感度を用いて表示している。これは、動画撮影においてはフレームレートに応じてTv値の限界があるためである。例えば図4において適正露出が30/fpsである場合、オーバー側の最長秒設定も1/30秒となるため、これよりも露出が増大する側はISO感度を上げることで実現することを示している。制御部21は、上述したBv値に対する制御値をもとに、プログラム線図に対応したデータテーブルを参照して露出条件(ISO感度、絞り、秒時)を決定し、当該条件に合わせて露出制御を行う。   The control unit 21 determines the exposure condition with reference to a preset program diagram based on the control value for the Bv value. FIG. 4 shows an example of a program diagram used in the moving image HDR shooting. A solid line indicates proper exposure, a broken line indicates overexposure, and a two-dot chain line indicates underexposure. The right vertical axis represents the aperture value Av, and the left vertical axis and the upper horizontal axis represent the Bv value. The lower horizontal axis indicates Tv (shutter speed), but in the diagram shown in FIG. 4, the ISO sensitivity is displayed for 1/30 seconds or more. This is because in moving image shooting, there is a limit of the Tv value according to the frame rate. For example, in FIG. 4, when the proper exposure is 30 / fps, the longest second setting on the over side is also 1/30 second, so that the side where the exposure increases more than this will be realized by increasing the ISO sensitivity. Yes. Based on the control value for the Bv value described above, the control unit 21 refers to a data table corresponding to the program diagram to determine an exposure condition (ISO sensitivity, aperture, second time), and performs exposure according to the condition. Take control.

S15において制御部21は、焦点検出処理および求めた焦点位置にレンズを駆動させる。制御部21は、撮像素子10で焦点検出用の信号蓄積を行う。なお、AFセンサ9を用いた焦点検出を行わないのは、動画記録を行うために、ミラーアップして連続的な撮影を行っているためである。従って、撮像素子10で得られる画像信号から、コントラスト検出方式の焦点検出を行う。蓄積が終了すると蓄積された信号を読み出しながらA/D変換を行い、焦点検出用の画像信号としてRAM35に格納する。さらにS11で得ているレンズ情報と焦点検出用の画像信号とから、撮影画面の各部の焦点状態を演算し、合焦させる焦点検出領域を決定する。なお、焦点検出領域の位置の決定は他の方法によってもよく、例えば予め操作部23を通じてユーザから指定されている焦点検出領域に決定してもよいし、顔検出などの画像認識技術を用いて人物の顔に焦点検出領域を設定してもよい。制御部21は、決定した焦点検出領域における焦点状態とレンズ情報とに従って、焦点検出領域に合焦させるためのレンズ移動量を算出し、レンズ制御部51を通じてフォーカスレンズ駆動部52を制御する。これにより、交換レンズ2は焦点検出領域内の被写体に対して合焦状態となる。フォーカスレンズを駆動すると距離エンコーダの情報が変化するので、制御部21は交換レンズ2内の各種レンズ情報の更新も行う。   In S15, the control unit 21 drives the lens to the focus detection process and the determined focus position. The control unit 21 accumulates a focus detection signal in the image sensor 10. The reason why focus detection using the AF sensor 9 is not performed is that continuous shooting is performed with the mirror raised in order to record a moving image. Therefore, the focus detection by the contrast detection method is performed from the image signal obtained by the image sensor 10. When the accumulation is completed, A / D conversion is performed while reading the accumulated signal, and it is stored in the RAM 35 as an image signal for focus detection. Further, the focus state of each part of the shooting screen is calculated from the lens information obtained in S11 and the image signal for focus detection, and a focus detection area to be focused is determined. The position of the focus detection area may be determined by another method. For example, the focus detection area may be determined in advance as a focus detection area designated by the user through the operation unit 23, or using an image recognition technique such as face detection. A focus detection area may be set on the face of a person. The control unit 21 calculates a lens movement amount for focusing on the focus detection region according to the determined focus state and lens information in the focus detection region, and controls the focus lens driving unit 52 through the lens control unit 51. As a result, the interchangeable lens 2 is brought into focus with respect to the subject in the focus detection area. Since the information of the distance encoder changes when the focus lens is driven, the control unit 21 also updates various lens information in the interchangeable lens 2.

S16において制御部21は、オーバー露出を実現するために処理対象となるフレームにおいて絞り制御が必要かを判定する。なお、HDR合成に用いる一組のフレームのうち、オーバー露出となるフレームをオーバーフレーム、アンダー露出となるフレームをアンダーフレームという。まず、例えばあるタイミングで設定している適正露出条件がBv11であり、画像信号から取得した輝度がBv10であるとする。図4に示したプログラム線図上ではISO感度が200から400へ1EV変化しただけで絞り値Avは変化しない。この場合、制御部21は絞り制御不要と判断してS18に処理を進め、現在の露出でオーバー露出の撮像(オーバー撮像)を行う。   In S <b> 16, the control unit 21 determines whether aperture control is necessary in a frame to be processed in order to realize overexposure. Of a set of frames used for HDR synthesis, a frame that is overexposed is referred to as an overframe, and a frame that is underexposed is referred to as an underframe. First, for example, it is assumed that the proper exposure condition set at a certain timing is Bv11 and the luminance acquired from the image signal is Bv10. On the program diagram shown in FIG. 4, the aperture value Av does not change only by changing the ISO sensitivity from 200 to 400 by 1 EV. In this case, the control unit 21 determines that aperture control is not necessary, and proceeds to S18 to perform overexposure imaging (over imaging) with the current exposure.

一方、あるタイミングで設定している適正露出条件がBv8であり、画像信号から取得した輝度がBv10であるとする。プログラム線図上では絞りが2.8から5.6へ変化しており、絞り値Avは2EV変化している。この場合、制御部21は絞り制御が必要と判定して、S17に処理を進める。   On the other hand, it is assumed that the proper exposure condition set at a certain timing is Bv8, and the luminance acquired from the image signal is Bv10. On the program diagram, the aperture changes from 2.8 to 5.6, and the aperture value Av changes by 2 EV. In this case, the control unit 21 determines that aperture control is necessary, and proceeds to S17.

S17において制御部21は、オーバーフレームにおいてオーバー露出に対する露出条件を算出すると、算出結果を用いて露出制御を行う。オーバー露出の露出条件の算出には、適正露出条件の算出と同様に図4のプログラム線図例を参照する。図中では波線がオーバー露出を示している。先に求めたBv値に対する制御値は適正露出に関する値であるから、以下のように、オーバー露出に対してさらに制御値を修正してからプログラム線図を参照すればよい。制御部21は、算出した露出条件に基づいてレンズ2に対して露出制御を行わせると、S18において基準フレーム、即ちオーバー露出となるフレームにおいてオーバー撮像を行なう。

オーバー:AVEBv+γ+α 但し、αは適正露出に対する露出差

なお、詳細はS21の処理において後述するが、ここで決定したオーバー撮像の露出条件は目標値であり、実際にはあるタイミングから数フレームをかけて目標の露出条件へと近づけていく処理がなされる。
In S17, when the control unit 21 calculates the exposure condition for overexposure in the overframe, the control unit 21 performs exposure control using the calculation result. For the calculation of the overexposure exposure condition, the program diagram example of FIG. 4 is referred to in the same manner as the calculation of the proper exposure condition. In the figure, wavy lines indicate overexposure. Since the control value for the previously obtained Bv value is a value related to the proper exposure, the control value may be further corrected for overexposure and then the program diagram may be referred to as follows. When the control unit 21 controls the lens 2 to perform exposure control based on the calculated exposure condition, the control unit 21 performs over imaging in a reference frame, that is, a frame that is overexposed in S18.

Over: AVEBv + γ + α where α is the exposure difference with respect to proper exposure

Although the details will be described later in the processing of S21, the over-imaging exposure condition determined here is a target value, and in reality, a process of approaching the target exposure condition over several frames from a certain timing is performed. The

S19において制御部21は、処理対象のフレームを1フレーム進めて、アンダーフレームにおいてアンダー露出を実現するために絞り制御が必要かを判定する。アンダー露出を実現するための絞り制御が必要か否かは、S16におけるオーバー露出の絞り制御の判定と同様に行う。制御部21は、絞り制御が不要と判定した場合は、S23に処理を進めてオーバー現像の処理を行わせる。一方、制御部21は、絞り制御が必要と判定した場合、処理をS20に進めて、アンダー露出の算出および露出制御を行う。   In S19, the control unit 21 advances the frame to be processed by one frame, and determines whether aperture control is necessary to realize underexposure in the underframe. Whether or not aperture control for realizing underexposure is necessary is performed in the same manner as the determination of overexposure aperture control in S16. If the control unit 21 determines that the aperture control is not necessary, the control unit 21 advances the process to S23 to perform the over-development process. On the other hand, when it is determined that the aperture control is necessary, the control unit 21 advances the process to S20 to perform underexposure calculation and exposure control.

S20において制御部21は、図4に示したプログラム線図例を参照して適正露出と同様にアンダー露出に対する露出条件を算出し、算出結果を用いて露出制御を行う。図4においては、1点鎖線がアンダー露出を示している。先に求めたBv値に対する制御値は適正露出に関する値であるから、以下のように、アンダー露出に対してさらに制御値を修正してからプログラム線図を参照すればよい。制御部21は、処理を完了するとS21に処理を進めて、実際の露出差を取得する。

アンダー:AVEBv+γ―β 但し、βは適正露出に対する露出差

S21において制御部21は、露出制御による露出の調節後の、オーバー露出とアンダー露出における実際の露出差を取得する。以下、本ステップの詳細を図5(a)および図5(b)を参照して説明する。動画では露出の変化は滑らかにした方が視認性は良いため、直後のフレームがS17で決定した露出条件になるように制御するのではなく、複数フレームに渡って徐々に目標値に近づけてゆく。このため、目標値に向けた絞り制御の動作を継続しながら、オーバーフレームとアンダーフレームの実際の絞り値Avをフレームごとに取得してゲイン修正に反映させる。
In S20, the control unit 21 calculates an exposure condition for underexposure in the same way as appropriate exposure with reference to the program diagram example shown in FIG. 4, and performs exposure control using the calculation result. In FIG. 4, the alternate long and short dash line indicates underexposure. Since the control value for the previously obtained Bv value is a value related to the proper exposure, the control value may be further corrected for the underexposure and the program diagram may be referred to as follows. When the control unit 21 completes the process, the process proceeds to S21 to acquire the actual exposure difference.

Under: AVEBv + γ-β where β is the exposure difference from the proper exposure

In S <b> 21, the control unit 21 acquires an actual exposure difference between overexposure and underexposure after exposure adjustment by exposure control. Hereinafter, details of this step will be described with reference to FIGS. 5 (a) and 5 (b). In a moving image, the smoother the change in exposure, the better the visibility, so instead of controlling the immediately following frame to be the exposure condition determined in S17, it gradually approaches the target value over a plurality of frames. . Therefore, while continuing the aperture control operation toward the target value, the actual aperture value Av of the overframe and the underframe is acquired for each frame and reflected in the gain correction.

まず、数フレーム先までの露出条件を予め決定する。実際に変化したシーンの輝度値Bvに対し、例えば絞り値Avを何フレームかけて目標値まで変化させるかを設定し、各フレームの露出条件を設定する。図5(a)には、Bv値の変化とそれに伴うAv値を4フレームかけて変化させる例を示している。図5(a)における点線は、Bv値に対する実際の制御値を示している。   First, exposure conditions up to several frames ahead are determined in advance. For example, how many frames the aperture value Av is changed to the target value is set for the actually changed scene brightness value Bv, and the exposure condition of each frame is set. FIG. 5A shows an example of changing the Bv value and the associated Av value over 4 frames. A dotted line in FIG. 5A indicates an actual control value with respect to the Bv value.

ここで重要なのはオーバーフレームとアンダーフレームの露出差であり、図5(b)には、当該露出差をBv値に対する制御値を用いて示している。なお、Bv値に対する制御値とは、測光したシーンのBv値そのものではなく、オーバーフレームおよびアンダーフレームの露出条件を決めるためのBv値である。図5(b)の例では、絞り駆動によるAv値の変化が始まる前の状態では想定の露出差が実現できていることを示している(図5(b)中に示す「b」で表す露出差)。上述したシーンの例では、Bv値が8(暗いシーン)から10(明るいシーン)へと変わるシーンであり、b=2EVとなる。しかし、HDR合成に用いられる1組のフレームのうち、1枚目となるオーバー撮像から開始したAv値変動期間の期間中は、オーバーフレームとアンダーフレームの露出差は2a+bとなる。本来、オーバーフレームとアンダーフレームの露出差を予め定めた露出差bとなるべきであるが、同時にAvを制御することによって適正露出自体が変動しているため、誤差露出の2aが発生する。   What is important here is the exposure difference between the overframe and the underframe, and FIG. 5B shows the exposure difference using a control value for the Bv value. The control value for the Bv value is not the Bv value of the photometric scene but the Bv value for determining the overframe and underframe exposure conditions. In the example of FIG. 5 (b), it is shown that the assumed exposure difference can be realized in the state before the change of the Av value due to the aperture driving starts (represented by “b” shown in FIG. 5 (b)). Exposure difference). In the above-described example of the scene, the Bv value changes from 8 (dark scene) to 10 (bright scene), and b = 2EV. However, the exposure difference between the overframe and the underframe is 2a + b during the Av value variation period starting from the first over-imaging in one set of frames used for HDR synthesis. Originally, the exposure difference between the overframe and the underframe should be a predetermined exposure difference b. However, since the proper exposure itself is fluctuated by controlling Av at the same time, error exposure 2a occurs.

制御部21は、HDR合成に用いられるオーバーフレームとアンダーフレームの絞り値をレンズ制御部51から取得して、実際の露出差を取得する。制御部21は実際の露出差を取得すると、信号処理部25によるゲイン修正の処理に利用させるため、当該実際の露出差を信号処理部25へ出力する。   The control unit 21 acquires the overframe and underframe aperture values used for the HDR synthesis from the lens control unit 51, and acquires the actual exposure difference. When the control unit 21 acquires the actual exposure difference, the control unit 21 outputs the actual exposure difference to the signal processing unit 25 for use in gain correction processing by the signal processing unit 25.

S22において信号処理部25は、制御部21から取得した実際の露出差に基づいて、画像信号に対してゲイン修正を行うための現像パラメータを生成する。なお、本実施形態における現像パラメータは後述するホワイトバランス係数である。   In S <b> 22, the signal processing unit 25 generates a development parameter for performing gain correction on the image signal based on the actual exposure difference acquired from the control unit 21. The development parameter in the present embodiment is a white balance coefficient described later.

ゲイン修正においてはオーバーフレームかアンダーフレームのいずれかを基準にする必要があるが、本実施形態ではアンダーフレームを基準にオーバーフレームのゲインを修正する。図5(a)および図5(b)に示した例では、Av値の変動が小絞りの(絞り径が小さくなる)方向であって、Av値の制御開始フレームがオーバーフレームであるため、アンダー露出が想定よりも大きくなる。このため、Av値の制御中の誤差露出は、上述した通り2a分となる。よってゲインを修正する方向はゲインアップとなり、即ち誤差露出の影響を低下させるものとなる。ゲイン修正はデジタルゲインにより実現し、図6に示すホワイトバランス部802で生成されたホワイトバランス係数をかけることによって反映する。ホワイトバランス係数は、ホワイトバランス係数修正部809においてオーバーとアンダーのBv値に対する制御値を取得し、ホワイトバランス係数807を修正することで生成される。以下に、ホワイトバランス係数807を修正する例を示す。

Figure 0006333095

ここでWBCoefx(x=R、G1、G2、B)は、修正前のホワイトバランス係数であり、Bvtは、各フレームにおけるBv値、bは図5(b)に示す目標値である露出差である。修正前のホワイトバランス係数については、「太陽光」や「くもり」など予めカメラにプリセットされている場合は各々設定されているホワイトバランス係数を用いる。オートホワイトバランスに設定されている場合は、例えば画像信号から白っぽい領域を検出してその領域の平均R、G、Bのバランスを整えるような公知のホワイトバランス係数を算出する方法を用いて行うことができる。 In gain correction, it is necessary to use either the overframe or the underframe as a reference, but in this embodiment, the overframe gain is corrected based on the underframe. In the example shown in FIG. 5A and FIG. 5B, the variation of the Av value is in the direction of a small diaphragm (diaphragm diameter decreases), and the control start frame of the Av value is an overframe. Underexposure is greater than expected. For this reason, the error exposure during the control of the Av value is 2a as described above. Therefore, the gain correction direction is gain up, that is, the influence of error exposure is reduced. The gain correction is realized by digital gain, and is reflected by applying the white balance coefficient generated by the white balance unit 802 shown in FIG. The white balance coefficient is generated by the white balance coefficient correction unit 809 acquiring control values for the over and under Bv values and correcting the white balance coefficient 807. An example of correcting the white balance coefficient 807 will be shown below.

Figure 0006333095

Here WBCoefx (x = R, G1, G2, B) is a white balance coefficient before correction, Bv t is exposure difference Bv value in each frame, b is the target value shown in FIG. 5 (b) It is. When the white balance coefficient before correction is preset in the camera in advance, such as “sunlight” or “cloudy”, the set white balance coefficient is used. When the auto white balance is set, for example, a known white balance coefficient that detects a whitish area from the image signal and adjusts the average R, G, B balance of the area is used. Can do.

S23において、信号処理部25は現像処理を行う。即ち、修正されたホワイトバランス係数を用いてホワイトバランスを含むオーバー現像を行う。ここで、画像信号に対する現像処理の詳細について、図6を参照して説明する。各機能ブロックの処理は、オーバーフレームとアンダーフレームのそれぞれで取得された画像信号に対して行われる。   In S23, the signal processing unit 25 performs development processing. That is, over development including white balance is performed using the corrected white balance coefficient. Here, the details of the development processing for the image signal will be described with reference to FIG. The processing of each functional block is performed on the image signal acquired in each of the overframe and the underframe.

被写体像は、結像光学系(レンズ)によって撮像素子10の撮像素子上に結像されて光電変換される。撮像素子10は、例えば、一般的な原色カラーフィルタを備える単板カラー撮像素子である。原色カラーフィルタは、各々650nm、550nm、450nm近傍に透過主波長帯を持つ3種類の色フィルタからなり、各々R(赤)、G(緑)、B(青)の各バンドに対応する色プレーンを撮影する。単板カラー撮像素子では、この色フィルタは画素ごとに空間的に配列され、各画素は各々単一の色プレーンにおける光の強度を得ることしかできない。このため撮像素子からは色モザイク画像が出力される(801および810)。ホワイトバランス部802では、白くあるべき領域のR、G、B値が同じ信号値になるようなゲインをR、G、B各画素値にかける。色補間部803では色モザイク画像を補間することによって、全ての画素においてR、G、Bの色情報が揃ったカラー画像を生成する。生成されたカラー画像は、マトリクス変換部804およびガンマ変換部805を経て基本的なカラー画像が生成される。   The subject image is imaged on the image sensor of the image sensor 10 by an imaging optical system (lens) and subjected to photoelectric conversion. The image sensor 10 is, for example, a single-plate color image sensor including a general primary color filter. The primary color filter is composed of three types of color filters each having a transmission main wavelength band in the vicinity of 650 nm, 550 nm, and 450 nm, and each color plane corresponds to each band of R (red), G (green), and B (blue). Shoot. In a single-plate color imaging device, the color filters are spatially arranged for each pixel, and each pixel can only obtain the light intensity in a single color plane. For this reason, a color mosaic image is output from the image sensor (801 and 810). The white balance unit 802 multiplies the R, G, and B pixel values by gains such that the R, G, and B values of the region that should be white have the same signal value. The color interpolation unit 803 generates a color image in which R, G, and B color information are aligned in all pixels by interpolating the color mosaic image. A basic color image is generated from the generated color image through a matrix conversion unit 804 and a gamma conversion unit 805.

ハイダイナミックレンジ合成に先だって、異なる露出で撮影したオーバーフレームとアンダーフレームの各々の輝度レベルを揃えておく必要がある。ガンマ変換部805において適用されるゲインは、白飛びや黒潰れをしないように設定する必要があるため一律なゲインではなくガンマ曲線を用いて行う。これらのガンマ曲線の設計に関しては、例えば2EVの露出差によるゲイン、即ちアンダーに対して2倍のゲインやオーバーに対して1/2のゲインをかけたときに、ガンマ曲線と特性が同じになるように設計する。こうすることで、輝度域に応じて複数枚の画像を切り換えた際に、境界を滑らかにすることができる。色輝度調整部806で画像の見栄えを改善するための処理がカラー画像に対し行われ、例えば、彩度強調、色相補正、エッジ強調といった画像補正が行われる。色輝度調整部806による処理が終わると現像処理が完了する。   Prior to the high dynamic range composition, it is necessary to align the brightness levels of the overframe and underframe taken with different exposures. The gain applied in the gamma conversion unit 805 needs to be set so as not to cause overexposure or blackout, and therefore is performed using a gamma curve instead of a uniform gain. Regarding the design of these gamma curves, for example, when a gain due to an exposure difference of 2 EV, that is, a gain twice as large as an under and a gain of 1/2 as an over, the characteristics are the same as those of the gamma curve. Design as follows. By doing so, the boundary can be smoothed when a plurality of images are switched in accordance with the luminance range. The color luminance adjustment unit 806 performs processing for improving the appearance of the image on the color image, and performs image correction such as saturation enhancement, hue correction, and edge enhancement, for example. When the processing by the color luminance adjustment unit 806 is completed, the development processing is completed.

静止画のHDR合成の場合は、さらに、合成前に一方の画像を他方を基準として、手振れ等により生じた動きに対して空間的な位置合わせがなされることが一般的である。しかし、動画HDR合成の場合は、オーバーとアンダーの撮影間隔が静止画撮影と比較して格段に短く、位置合わせを行うとフレームレートが低下したような描写になること、処理の計算量などの理由により位置合わせ処理を行わなくてもよい。信号処理部25は、オーバー現像の処理を完了するとS24に処理を進める。   In the case of still image HDR synthesizing, it is general that spatial alignment is performed with respect to movement caused by camera shake or the like with one image as a reference before synthesizing. However, in the case of moving image HDR composition, the over and under shooting intervals are much shorter than still image shooting, and if the alignment is performed, the frame rate is reduced, the amount of processing calculation, etc. The alignment process may not be performed for a reason. When completing the over-development process, the signal processing unit 25 advances the process to S24.

S24において撮像素子10は、アンダーフレームにおいて、アンダー露出を設定して撮像(アンダー撮像)を行なう。そして、S25において信号処理部25は、得られた画像信号に対する現像パラメータの生成と現像処理を行う。但し、本実施形態では、ゲイン修正はオーバー撮像された画像信号にのみ適用されるため、アンダー撮像された画像信号に対する現像パラメータの修正は行わない。   In S <b> 24, the image sensor 10 sets the underexposure in the underframe and performs imaging (under imaging). In S <b> 25, the signal processing unit 25 performs development parameter generation and development processing for the obtained image signal. However, in this embodiment, since the gain correction is applied only to the over-captured image signal, the development parameter is not corrected for the under-captured image signal.

さらにS26において信号処理部25は、オーバーフレームとアンダーフレームのそれぞれの画像信号に対する現像処理が完了すると、それぞれオーバー現像画像およびアンダー現像画像を用いて、HDR合成部816にてHDR合成処理を行う。   Furthermore, in S26, when the development processing for the overframe and underframe image signals is completed, the signal processing unit 25 performs HDR synthesis processing in the HDR synthesis unit 816 using the over-developed image and the under-developed image, respectively.

HDR合成処理について図7を参照して説明する。横軸は基準輝度を、縦軸は各画像を加算合成する際の合成比率を表す。合成する際の基準輝度の閾値Y1より暗い領域はオーバー現像画像のみを使用し、基準輝度の閾値Y2より明るい領域ではアンダー現像画像のみを用いる。また、基準輝度の閾値付近の境界Y1〜Y2の中間領域では、合成比率を徐々に変化させることで画像の切り替えを滑らかにすることができる。基準輝度として用いるのは、本実施形態ではアンダーフレームとなる。以上の処理により信号処理部は、HDR画像を生成して生成したHDR画像をメモリ28に格納する。   The HDR synthesis process will be described with reference to FIG. The horizontal axis represents the reference luminance, and the vertical axis represents the composition ratio when the images are added and combined. Only an over-developed image is used for an area darker than the reference luminance threshold Y1 when combining, and only an under-developed image is used for an area brighter than the reference luminance threshold Y2. Also, in the intermediate region between the boundaries Y1 and Y2 near the reference luminance threshold, the image switching can be made smooth by gradually changing the composition ratio. In this embodiment, the underframe is used as the reference luminance. Through the above processing, the signal processing unit stores the HDR image generated by generating the HDR image in the memory 28.

S27において制御部21は、操作部23を介してREC釦等の押下による撮像終了の指示があったかを判定する。撮像終了の指示がないと判定した場合は、再び処理をS14に戻してS14〜S26までの処理を繰り返す。一方、撮像終了の指示があったと判定した場合は、生成したHDR動画を圧縮するためにS28に処理を進める。   In S <b> 27, the control unit 21 determines whether there is an instruction to end imaging by pressing the REC button or the like via the operation unit 23. If it is determined that there is no instruction to end imaging, the process returns to S14 again and the processes from S14 to S26 are repeated. On the other hand, if it is determined that there is an instruction to end imaging, the process proceeds to S28 in order to compress the generated HDR video.

S28において信号処理部は、メモリに格納していたHDR動画を所定の形式で圧縮したうえで、S29においてメモリなどの記憶部26に記録して一連の動作を終了する。   In S28, the signal processing unit compresses the HDR moving image stored in the memory in a predetermined format, records it in the storage unit 26 such as a memory in S29, and ends the series of operations.

上述した本実施形態の処理について図8に示すシーケンス図を参照して各処理のタイミング等を説明する。なお、t〜t+3フレームは、動画記録中のある一区間に着目していることを示している。このため、動画記録の開始直後に行われる初期化処理等の説明は省略している。また、当区間中は、Av値がある目標値に向かって変動している。   Regarding the processing of the present embodiment described above, the timing of each processing will be described with reference to the sequence diagram shown in FIG. Note that frames t to t + 3 indicate that attention is paid to a certain section during moving image recording. For this reason, description of initialization processing performed immediately after the start of moving image recording is omitted. Further, during this period, the Av value fluctuates toward a certain target value.

tフレームの開始前であるt−1フレームにおいて、レンズ2は、制御部21の指示に応じて所定のAv値へと制御し(1006)、そのAv値をオーバー撮像用のAv値として記憶部26が記憶する(1007)。   In the t−1 frame before the start of the t frame, the lens 2 controls to a predetermined Av value in accordance with an instruction from the control unit 21 (1006), and the Av value is stored as an Av value for over imaging. 26 stores (1007).

tフレームにおいて撮像素子10ではオーバー撮像を開始する(1008)。信号処理部25は、オーバー撮像により得られた画像信号(オーバー画像信号)を読み出して、記憶部26に格納する(1009)。オーバー撮像が終了すると、レンズ2はt+1フレーム用に絞り制御を行ったのち(1010)、記憶部26がアンダー撮像用のAv値を記憶する。記憶部26は、オーバー撮像用のAv値とアンダー撮像用Av値を出力(1011)し、信号処理部25はこれらのAv値を用いてホワイトバランスゲインの修正を行う(1012)。信号処理部25は、ホワイトバランスゲインの修正が終わるとオーバー現像を行って現像画像を記憶部26に格納する(1013)。   In the t frame, the imaging device 10 starts over imaging (1008). The signal processing unit 25 reads out an image signal (over image signal) obtained by over-imaging and stores it in the storage unit 26 (1009). When the over imaging is completed, the lens 2 performs aperture control for t + 1 frame (1010), and then the storage unit 26 stores the Av value for under imaging. The storage unit 26 outputs the Av value for over imaging and the Av value for under imaging (1011), and the signal processing unit 25 corrects the white balance gain using these Av values (1012). When the correction of the white balance gain is completed, the signal processing unit 25 performs over-development and stores the developed image in the storage unit 26 (1013).

t+1フレームの開始タイミングに入ると、撮像素子10は別途アンダー撮像を開始する(1014)。信号処理部25は、アンダー撮像によって得られた画像(アンダー画像信号)を読み出して記憶部26に格納する(1015)。信号処理部25は撮像後速やかにアンダー現像を開始する(1016)。また、t−1フレームと同様にレンズ2は、制御部21の指示に応じてオーバー撮像用に絞り制御を行い(1017)、記憶部26がそのオーバー撮像用Av値を記憶する(1018)。   When the start timing of the t + 1 frame is entered, the image sensor 10 starts under imaging separately (1014). The signal processing unit 25 reads an image (under image signal) obtained by under imaging and stores it in the storage unit 26 (1015). The signal processing unit 25 starts under development immediately after imaging (1016). Similarly to the t-1 frame, the lens 2 performs aperture control for over imaging in accordance with an instruction from the control unit 21 (1017), and the storage unit 26 stores the over imaging Av value (1018).

t+2フレーム開始のタイミングになると、tフレームと同様に、撮像素子10がオーバーフレームの撮像を開始する(1019)。信号処理部25は、同時に現像後のオーバー現像画像とアンダー現像画像を用いてHDR合成を行い(1020)、生成した画像を記憶部26に記憶させる(1022)。以降は、再び1060からの処理を撮像終了まで繰り返す。   When it is time to start the t + 2 frame, the image sensor 10 starts over-frame imaging similarly to the t frame (1019). The signal processing unit 25 simultaneously performs HDR composition using the over-developed image and the under-developed image after development (1020), and stores the generated image in the storage unit 26 (1022). Thereafter, the processing from 1060 is repeated until the end of imaging.

なお、本実施形態では、オーバーフレームとアンダーフレームの2枚の画像信号を用いる例を説明したが、3枚以上のフレームを繰り返し取得する場合についても適用可能である。例えば3枚のフレームの露出を段階的に変化させている場合、3枚のフレームで生じる露出差をフレーム枚数で平滑化して、平滑化した露出差から得られるゲイン修正を基準となるフレーム以外の画像信号に対して適用すればよい。また、連続するフレーム間で露出差があればよいので、例えば、オーバーフレームとアンダーフレームの代わりに、適正フレームとアンダーフレーム、オーバーフレームと適正フレーム、などであってもよい。   In the present embodiment, an example in which two image signals of an over frame and an under frame are used has been described. However, the present embodiment can also be applied to a case where three or more frames are repeatedly acquired. For example, when the exposure of three frames is changed in stages, the exposure difference generated in the three frames is smoothed by the number of frames, and gain correction obtained from the smoothed exposure difference is used for other than the reference frame. What is necessary is just to apply with respect to an image signal. Further, since there is only an exposure difference between consecutive frames, for example, instead of an overframe and an underframe, a proper frame and an underframe, an overframe and a proper frame, and the like may be used.

以上説明したように本実施形態では、自動露出の制御によって絞り値が変化することにより適正露出が変化する場合であっても、オーバーフレームとアンダーフレームの絞り値に基づいて実際の露出差を取得するようにした。そして取得した実際の露出差に基づいてデジタルゲインでゲイン修正を行った画像をHDR合成するようにした。このようにすることで、動画HDR撮影において自動露出制御を行う場合に、生成画像の階調の連続性を向上させることが可能になる。即ち、オーバーフレームとアンダーフレームの露出差を想定通りに制御することが可能となり、HDR合成された画像においてトーンジャンプなどの画質劣化を抑えることができる。   As described above, in the present embodiment, even when the proper exposure changes due to the change of the aperture value by the automatic exposure control, the actual exposure difference is obtained based on the overframe and underframe aperture values. I tried to do it. Then, HDR synthesis is performed on an image whose gain has been corrected with digital gain based on the acquired actual exposure difference. This makes it possible to improve the continuity of the gradation of the generated image when automatic exposure control is performed in moving image HDR shooting. That is, the exposure difference between the overframe and the underframe can be controlled as expected, and image quality degradation such as tone jump can be suppressed in the HDR synthesized image.

(実施形態2)
次に実施形態2について説明する。実施形態1では、ホワイトバランスのデジタルゲインを用いて画像信号にゲイン修正を行った。これに対して、本実施形態では、ガンマ特性を用いて画像信号にゲイン修正を行なう。また、実施形態1ではAv値の変動が開始するフレームがHDR合成に用いるオーバーフレームとアンダーフレームのうち1枚目である場合を例に説明したが、本実施形態では、Av値の変動が2枚目のフレームから開始する例を説明する。なお、本実施形態のデジタルカメラ100の構成は実施形態1と同一でよい。このため、同一の構成については同一の符号を付して重複する説明は省略し、相違点について重点的に説明する。
(Embodiment 2)
Next, Embodiment 2 will be described. In the first embodiment, the gain correction is performed on the image signal using the digital gain of the white balance. On the other hand, in the present embodiment, the gain correction is performed on the image signal using the gamma characteristic. In the first embodiment, the case where the first frame of the over frame and the under frame used for HDR synthesis is described as an example in which the Av value starts to fluctuate. However, in this embodiment, the Av value fluctuates by two. An example starting from the first frame will be described. The configuration of the digital camera 100 of the present embodiment may be the same as that of the first embodiment. For this reason, the same reference numerals are assigned to the same components, and redundant descriptions are omitted, and differences will be mainly described.

まず、本実施形態における動画HDR撮影に係る一連の動作を、図15を参照して説明する。なお、図2と共通する処理については共通の参照番号を付して説明を省略する。   First, a series of operations related to moving image HDR shooting in the present embodiment will be described with reference to FIG. Note that the processes common to those in FIG.

S150において制御部21は、実際の露出差を取得する。なお、本実施形態では、例えば、設定している露出条件がBv10で設定されたものであり、取得した輝度がBv8であるとする。この場合、図4に示すプログラム線図上では、絞り値が5.6から2.8へ2EV変化している。即ち、明るいシーンから暗いシーンへとシーンが変化するため、絞りは絞り値が小さくなる側(絞り径が大きくなる側)へと変動していく。図9(a)は、この場合のAv値と、Bv値に対する制御値の変動を示している。Bv値が低下した後にAv値の変動が開始されている。Av値の変動が開始するフレームがHDR合成に用いられるフレームの組の2枚目つまり、アンダーフレームとなっている。そのため、オーバーフレームとアンダーフレームの露出誤差がAv値の変動開始直後および終了直前と変動中とで異なってくる。Av値の変動開始ではオーバーフレームが、終了直前ではアンダーフレームがそれぞれ想定通りの露出となり、フレームの組のもう一方のフレームがAv値の変動分を含むケースである。この場合の露出差は、図9(b)のようになる。なお、想定の露出差は実施形態1と同様にbである。

Figure 0006333095

そして、制御部21は実際の露出差を取得する。実施形態1ではレンズ2との通信により実際の露出を取得する例を示したが、本実施形態では実際の露出差を推定により取得する。これは、ハード上の制約などで必ずしもレンズ通信による絞り値の取得が困難な場合やレンズとの通信に遅延が生じる場合、処理の高速化を図る場合等に有効である。露出差の推定方法について図10を参照して説明する。制御部21は、S14において算出した適正露出条件に加えて、何フレームかけて露出を変動させていくかの情報を用いて、所定のタイミングiにおけるBv値に対する制御値(Bvi)を以下の式を用いて算出する。そして、制御部21は算出したBv値に対する制御値と上述したAv値変動中のフレームにおける露出誤差とを用いて露出差を求める。

Figure 0006333095

S151において信号処理部25は、推定演算により推定した実際の露出に基づいてゲイン修正を行うための現像パラメータを生成する。ゲイン修正においてはオーバーフレームかアンダーフレームのいずれかが基準フレームとする必要があるが、本実施形態ではオーバーフレームを基準にアンダーフレームのゲインを修正することを考える。本実施形態では、Av値の変動が開放絞りの方向であり、Av値の制御開始フレームがHDR合成フレームに用いる1組のフレームの2枚目となるため、アンダー露出が想定よりも小さくなりAv値の制御中の露出誤差は上述の通りaもしくは2a分となる。よって、ゲインを修正する方向はゲインアップとなる。本実施形態におけるゲインアップはガンマ特性を用いたガンマ変換により実現し、図11に示すガンマ変換部805が修正されたガンマテーブルを用いてガンマ変換することによって反映する。ガンマテーブルによるゲイン調整を行うことで、より柔軟に階調特性を制御した現像画像を生成できる。 In S150, the control unit 21 acquires an actual exposure difference. In the present embodiment, for example, it is assumed that the set exposure condition is set to Bv10, and the acquired luminance is Bv8. In this case, the aperture value changes by 2 EV from 5.6 to 2.8 on the program diagram shown in FIG. In other words, since the scene changes from a bright scene to a dark scene, the aperture fluctuates toward the side where the aperture value becomes smaller (the side where the aperture diameter becomes larger). FIG. 9A shows the fluctuation of the control value with respect to the Av value and the Bv value in this case. After the Bv value decreases, the Av value starts to change. The frame from which the Av value starts to change is the second frame of the set of frames used for HDR synthesis, that is, the underframe. For this reason, the overframe and underframe exposure errors differ between immediately after the start of the Av value change and immediately before the end and during the change. In this case, the over frame is exposed as expected when the Av value starts to fluctuate, and the under frame is exposed as expected immediately before the end of the Av value, and the other frame in the set of frames includes the fluctuation of the Av value. The exposure difference in this case is as shown in FIG. The assumed exposure difference is b as in the first embodiment.

Figure 0006333095

And the control part 21 acquires an actual exposure difference. In the first embodiment, an example in which the actual exposure is acquired by communication with the lens 2 is shown. However, in the present embodiment, the actual exposure difference is acquired by estimation. This is effective when it is difficult to obtain an aperture value through lens communication due to hardware restrictions, when there is a delay in communication with the lens, or when processing speed is to be increased. An exposure difference estimation method will be described with reference to FIG. The control unit 21 uses the information on how many frames the exposure is changed in addition to the appropriate exposure condition calculated in S14, and sets the control value (Bv i ) for the Bv value at the predetermined timing i as follows: Calculate using the formula. And the control part 21 calculates | requires an exposure difference using the control value with respect to the computed Bv value, and the exposure error in the flame | frame in which Av value fluctuation | variation mentioned above.

Figure 0006333095

In S151, the signal processing unit 25 generates a development parameter for performing gain correction based on the actual exposure estimated by the estimation calculation. In gain correction, either the overframe or the underframe needs to be used as a reference frame, but in the present embodiment, it is considered that the gain of the underframe is corrected based on the overframe. In the present embodiment, the variation of the Av value is the direction of the wide open aperture, and the control start frame of the Av value is the second frame of the set of frames used for the HDR composite frame, so the underexposure becomes smaller than expected and Av The exposure error during the value control is a or 2a as described above. Therefore, the gain correction direction is gain up. The gain increase in this embodiment is realized by gamma conversion using the gamma characteristic, and is reflected by the gamma conversion unit 805 shown in FIG. 11 performing gamma conversion using the corrected gamma table. By performing gain adjustment using a gamma table, it is possible to generate a developed image with gradation characteristics controlled more flexibly.

ガンマテーブルの修正は、ガンマテーブル修正部1310においてガンマテーブル1307を修正することによって行う。ガンマテーブル修正部1310は、ガンマテーブル1307を修正するために必要なオーバーとアンダーのBv値に対する制御値を、制御Bv値推定部1309より取得する。また制御Bv値推定部1309は、この推定に必要な撮影情報1308として、Av変動開始フレーム、Av変動終了フレーム、Av制御フレーム数、処理対象のフレームナンバーを取得する。   The gamma table is corrected by correcting the gamma table 1307 in the gamma table correction unit 1310. The gamma table correction unit 1310 acquires from the control Bv value estimation unit 1309 control values for over and under Bv values necessary for correcting the gamma table 1307. In addition, the control Bv value estimation unit 1309 acquires the Av variation start frame, the Av variation end frame, the number of Av control frames, and the frame number to be processed as shooting information 1308 necessary for this estimation.

ガンマテーブル修正部1310におけるガンマテーブルの具体的な修正方法について、図12を参照して説明する。図12に示すグラフにおいて横軸はガンマ変換への入力信号値であるがLogスケール表示されており点線で刻まれる1刻みは1段分を示している。また実線の縦線で示されるポイントは適正露出を示している。縦軸はガンマ変換の出力信号値を示している。実線のガンマテーブルはアンダーフレーム用の変換特性を、一点鎖線のガンマテーブルはオーバーフレーム用の変換特性をそれぞれ示している。この図ではアンダーフレームとオーバーフレームはおおむね3段分の露出差がある。二点鎖線のガンマテーブルは修正後のガンマテーブルを示しており、これは元の実線の変換特性を水平方向にシフトすることで得られるガンマテーブルである。矢印で示されるシフト量は先述したaまたは2aとして求めればよい。そして、S23において信号処理部25は、修正されたガンマテーブルを用いて現像処理を行う。   A specific method for correcting the gamma table in the gamma table correcting unit 1310 will be described with reference to FIG. In the graph shown in FIG. 12, the horizontal axis represents an input signal value to gamma conversion, but is displayed in the Log scale, and one step engraved with a dotted line represents one stage. Moreover, the point shown with the continuous vertical line has shown appropriate exposure. The vertical axis represents the output signal value of gamma conversion. The solid line gamma table shows the conversion characteristics for underframes, and the dash-dot line gamma table shows the conversion characteristics for overframes. In this figure, the under frame and the over frame have an exposure difference of approximately three steps. A two-dot chain line gamma table indicates a corrected gamma table, which is obtained by shifting the conversion characteristic of the original solid line in the horizontal direction. The shift amount indicated by the arrow may be obtained as a or 2a described above. In S23, the signal processing unit 25 performs development processing using the corrected gamma table.

以上の実施形態2に係る処理について、シーケンス図を図13に示す。本実施形態では、Bv値に対する制御値を推測するため、tフレームにおいてアンダーフレーム用のBv値に対する制御値を推定して記憶部26に格納する(1601)。そして、アンダーフレーム用のゲイン即ちガンマテーブルを修正するため、t+1フレームにおいて、アンダーフレームの現像前にゲイン値(ガンマテーブル)の修正を行い(1602)、アンダー現像を行う(1016)。   A sequence diagram of the processing according to the second embodiment is shown in FIG. In this embodiment, in order to estimate the control value for the Bv value, the control value for the Bv value for the underframe is estimated at t frame and stored in the storage unit 26 (1601). Then, in order to correct the gain for the underframe, that is, the gamma table, the gain value (gamma table) is corrected before developing the underframe (1602) and the underdevelopment is performed (1016).

なお、本実施形態ではガンマテーブルを修正してゲイン修正を行うようにしたが、必ずしもガンマテーブルでなくてもよく、所定の階調補正特性を有する補正用のテーブルであれば同様の動画HDR撮影が実現できる。   In this embodiment, the gain correction is performed by correcting the gamma table. However, it is not always necessary to use the gamma table, and the same moving picture HDR shooting is possible as long as the correction table has a predetermined gradation correction characteristic. Can be realized.

以上説明したように、本実施形態では、露出差を用いてゲイン修正を行う際に、露出差を用いてガンマテーブルを修正し当該ガンマテーブルを用いてゲイン修正を行うようにした。このようにすることで、動画HDR撮影において自動露出制御を行う場合に、より柔軟に階調特性を制御した現像画像を生成して合成画像の階調の連続性を向上させることが可能になる。また、実際の露出差については、露出を複数フレームにわたって変更する制御情報に基づいて実際の露出差を推定するようにした。レンズとの通信に遅延が生じる場合や処理の高速化を図ることができる。   As described above, in the present embodiment, when the gain correction is performed using the exposure difference, the gamma table is corrected using the exposure difference, and the gain correction is performed using the gamma table. In this way, when automatic exposure control is performed in moving picture HDR shooting, it is possible to generate a developed image with more controlled gradation characteristics and improve the continuity of the gradation of the composite image. . As for the actual exposure difference, the actual exposure difference is estimated based on control information for changing the exposure over a plurality of frames. When a delay occurs in the communication with the lens, the processing speed can be increased.

(実施形態2の変形例)
さらに実施形態2の変形例について説明する。実施形態1および実施形態2では、共に修正ゲインについてゲインアップする例について説明した。本変形例では、ガンマ変換によって修正ゲインについてゲインダウンする場合について説明する。本変形例では、修正ゲインの適用において、特に高輝度領域の飽和値が変わらないようにするための修正ゲインの適用を新たに行う。
(Modification of Embodiment 2)
Further, a modification of the second embodiment will be described. In the first embodiment and the second embodiment, the example in which the gain is increased for the correction gain has been described. In this modification, a case will be described in which the correction gain is reduced by gamma conversion. In the present modification, in the application of the correction gain, the correction gain is applied anew so that the saturation value in the high luminance region does not change.

本変形例において想定している状況は、実施形態1同様に、あるタイミングで設定している露出条件がBv8に設定されたものであり、その際に取得した輝度がBv10の場合である。この場合、図4に示すプログラム線図上では絞りが2.8から5.6へ2EV変化し、絞り値Avが2EV変化している。即ち、暗いシーンから明るいシーンへとシーンが変化して、絞りは値が大きくなる側、小絞り側(絞り径が小さくなる側)へと変動していく。Av値とBv値に対する制御値の変動の様子は図5(a)に示す通りであり、この場合の露出差は実施形態1で示した通り2a+bである。   The situation assumed in this modification is the case where the exposure condition set at a certain timing is set to Bv8 and the luminance acquired at that time is Bv10, as in the first embodiment. In this case, on the program diagram shown in FIG. 4, the aperture changes by 2 EV from 2.8 to 5.6, and the aperture value Av changes by 2 EV. That is, the scene changes from a dark scene to a bright scene, and the aperture fluctuates from a larger value side to a smaller aperture side (a smaller aperture diameter side). The variation of the control value with respect to the Av value and the Bv value is as shown in FIG. 5A, and the exposure difference in this case is 2a + b as shown in the first embodiment.

上述したように、この露出差を低下させるためにゲイン修正を行う。ゲイン修正においてはオーバーフレームかアンダーフレームのいずれかが基準フレームとする必要があるが本変形例ではオーバーフレームを基準にアンダーフレームのゲインを修正することを考える。本変形例では、Av値の変動が小絞りの(絞り径が小さくなる)の方向であり、Av値の制御開始フレームがオーバーフレームとなるため、アンダー露出が想定よりも大きくなる。このためAv値の制御中の露出誤差は、実施形態1において上述した通り2a分となる。そしてゲインを修正する方向はゲインダウンとなる。ゲインダウンのゲイン修正は、実施形態2と同様にガンマ変換を用いて行う。対象フレームのBvに対する制御値は、実施形態1のようにレンズ通信を介して取得してもよいし、実施形態2のように撮影情報から推定してもよい。   As described above, gain correction is performed to reduce this exposure difference. In the gain correction, either the overframe or the underframe needs to be the reference frame, but in this modification, it is considered that the gain of the underframe is corrected based on the overframe. In the present modification, the Av value varies in the direction of small aperture (diaphragm diameter decreases), and the control start frame of the Av value is overframe. Therefore, underexposure is larger than expected. For this reason, the exposure error during the control of the Av value is 2a as described in the first embodiment. The direction of correcting the gain is gain down. Gain correction for gain reduction is performed using gamma conversion, as in the second embodiment. The control value for Bv of the target frame may be acquired through lens communication as in the first embodiment, or may be estimated from shooting information as in the second embodiment.

ガンマテーブルの具体的な修正方法を図14を参照して説明する。図14に示す二点鎖線のガンマテーブルは、修正後のガンマテーブルである。このガンマテーブルは、実線のガンマテーブルを水平方向に露出誤差2a分シフトすることで求められる。しかし、そのままシフトしただけでは、高輝度部は飽和が出なくなってしまう。そこで、基本的には元のガンマテーブルを水平方向にシフトしつつ、高輝度部は元のガンマテーブルに近づくようにテーブルを調整する。例えば、図14に示す白丸の輝度値から高輝度領域は、アンダーフレームが使用される輝度域であるため、当該領域で調整すればよい。図14に示す白丸の輝度値は、図7で示したY2に相当する輝度値である。   A specific method for correcting the gamma table will be described with reference to FIG. The two-dot chain line gamma table shown in FIG. 14 is a corrected gamma table. This gamma table is obtained by shifting the solid line gamma table in the horizontal direction by the exposure error 2a. However, if the shift is performed as it is, the high luminance portion is not saturated. Thus, basically, the original gamma table is shifted in the horizontal direction, and the table is adjusted so that the high luminance part approaches the original gamma table. For example, since the high luminance region from the luminance value of the white circle shown in FIG. 14 is a luminance region in which the under frame is used, the adjustment may be performed in the region. The brightness value of the white circle shown in FIG. 14 is a brightness value corresponding to Y2 shown in FIG.

以上説明したように、本変形例では、ゲインダウンするゲイン修正を行う場合に、飽和を維持するようにガンマテーブルの調整を行なうようにした。このようにすることで、自動露出調整に対してゲインダウンのゲイン修正を行う場合に、高輝度部の飽和を維持させたゲイン修正ができるようになる。   As described above, in this modification, the gamma table is adjusted so as to maintain the saturation when the gain correction for reducing the gain is performed. In this way, when performing gain correction for gain reduction with respect to automatic exposure adjustment, it is possible to perform gain correction while maintaining saturation of the high luminance part.

なお、上述の実施形態および変形例では、自動露出の制御中にBv値が1度しか変わらないシーンのみを例示したが、Bv値が連続的に上下に変化するシーンにも適用できる。そのようなシーンであっても、それぞれの変化に対して本実施形態で説明したゲインアップとゲインダウンによるゲイン修正の組み合わせで対応できる。   In the above-described embodiment and modification, only the scene in which the Bv value changes only once during the automatic exposure control is illustrated, but the present invention can also be applied to a scene in which the Bv value continuously changes up and down. Even in such a scene, each change can be dealt with by a combination of gain correction by gain-up and gain-down described in this embodiment.

(その他の実施形態)
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
(Other embodiments)
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

10…撮像素子、25…信号処理部、21…制御部、51…レンズ制御部、54…絞り駆動部、805…ガンマ変換部、809…ホワイトバランス係数補正部、816…HDR合成部、1309…制御Bv値推定部、1310…ガンマテーブル修正部 DESCRIPTION OF SYMBOLS 10 ... Image sensor, 25 ... Signal processing part, 21 ... Control part, 51 ... Lens control part, 54 ... Aperture drive part, 805 ... Gamma conversion part, 809 ... White balance coefficient correction part, 816 ... HDR synthetic | combination part, 1309 ... Control Bv value estimation unit, 1310... Gamma table correction unit

Claims (10)

撮像手段と、
所定のフレームレートで露出の異なる画像を繰り返し撮像するように前記撮像手段を制御する撮像制御手段と、
前記撮像手段に入射させる光量を調節する露出制御手段と、
前記撮像手段による撮像中に前記露出制御手段により前記光量が調節され、前記露出の異なる画像の露出差が所定の値から変動した場合、前記露出制御手段により調節された露出で撮像されたフレームの画像を該変動した露出差に基づいて補正する補正手段と、
前記補正手段により補正されたフレームの画像を含む複数のフレームの画像を合成する合成手段と、を有することを特徴とする撮像装置。
Imaging means;
Imaging control means for controlling the imaging means so as to repeatedly capture images with different exposures at a predetermined frame rate;
Exposure control means for adjusting the amount of light incident on the imaging means;
When the light amount is adjusted by the exposure control means during imaging by the imaging means and the exposure difference of the images with different exposures fluctuates from a predetermined value, the frame of the image captured with the exposure adjusted by the exposure control means Correction means for correcting the image based on the changed exposure difference;
An image pickup apparatus comprising: a combining unit configured to combine a plurality of frame images including a frame image corrected by the correcting unit.
前記補正手段は、前記露出制御手段の前記光量の調節により生じた前記露出差の変動を補正するような補正値を算出し、前記補正値を用いて前記光量の調節後に撮像されたフレームの画像を補正することを特徴とする請求項1に記載の撮像装置。   The correction unit calculates a correction value that corrects the fluctuation of the exposure difference caused by the adjustment of the light amount of the exposure control unit, and uses the correction value to capture an image of a frame that is captured after the adjustment of the light amount. The imaging apparatus according to claim 1, wherein the imaging device is corrected. 前記補正値は、階調特性に関する値であることを特徴とする請求項2に記載の撮像装置。   The imaging apparatus according to claim 2, wherein the correction value is a value related to a gradation characteristic. 前記補正値は、ガンマ特性またはホワイトバランスの制御に関する値であることを特徴とする請求項2または3に記載の撮像装置。   The imaging apparatus according to claim 2, wherein the correction value is a value relating to control of gamma characteristics or white balance. 前記補正手段は、前記露出制御手段による光量の調節後の露出条件に対応する設定値から前記補正値を算出することを特徴とする請求項2乃至4のいずれか1項に記載の撮像装置。   5. The imaging apparatus according to claim 2, wherein the correction unit calculates the correction value from a setting value corresponding to an exposure condition after the light amount is adjusted by the exposure control unit. 前記補正手段は、前記露出制御手段による光量の調節後の露出条件に対応する設定値を推定演算することを特徴とする請求項2乃至5のいずれか1項に記載の撮像装置。   6. The imaging apparatus according to claim 2, wherein the correction unit estimates and calculates a setting value corresponding to an exposure condition after the light amount is adjusted by the exposure control unit. 前記露出制御手段は、前記光量の調節を行う必要があるか否かを、前記光量と適正露出との差に基づいて判定することを特徴とする請求項1乃至6のいずれか1項に記載の撮像装置。   The said exposure control means determines whether it is necessary to adjust the said light quantity based on the difference of the said light quantity and appropriate exposure, The any one of Claim 1 thru | or 6 characterized by the above-mentioned. Imaging device. 前記露出の異なる画像は、適正露出に対してオーバー露出で撮像したオーバー画像と、前記適正露出に対してアンダー露出で撮像したアンダー画像であり、
前記補正手段により補正されるフレームの画像は、前記オーバー画像および前記アンダー画像の少なくともいずれかを含むことを特徴とする請求項1乃至7のいずれか1項に記載の撮像装置。
The images with different exposures are an over image captured with overexposure with respect to proper exposure and an under image captured with underexposure with respect to the appropriate exposure,
The imaging apparatus according to claim 1, wherein the image of the frame corrected by the correcting unit includes at least one of the over image and the under image.
撮像手段が撮像する撮像工程と、
撮像制御手段が、所定のフレームレートで露出の異なる画像を繰り返し撮像するように前記撮像手段を制御する撮像制御工程と、
露出制御手段が、前記撮像手段に入射させる光量を調節する露出制御工程と、
補正手段が、前記撮像手段による撮像中に前記露出制御手段により前記光量が調節され、前記露出の異なる画像の露出差が所定の値から変動した場合、前記露出制御手段により調節された露出で撮像されたフレームの画像を該変動した露出差に基づいて補正する補正工程と、
合成手段が、前記補正手段により補正されたフレームの画像を含む複数のフレームの画像を合成する合成工程と、を有することを特徴とする撮像装置の制御方法。
An imaging step of imaging by the imaging means;
An imaging control step in which the imaging control means controls the imaging means so as to repeatedly capture images with different exposures at a predetermined frame rate;
An exposure control step in which the exposure control means adjusts the amount of light incident on the imaging means;
When the light amount is adjusted by the exposure control unit during imaging by the imaging unit and the exposure difference of the images with different exposures fluctuates from a predetermined value, the correction unit performs imaging with the exposure adjusted by the exposure control unit. A correction step of correcting the image of the frame that has been corrected based on the changed exposure difference;
A method for controlling an imaging apparatus, comprising: a combining unit configured to combine a plurality of frame images including a frame image corrected by the correcting unit.
コンピュータを、請求項1乃至8のいずれか1項に記載の撮像装置の各手段として機能させるためのプログラム。   The program for functioning a computer as each means of the imaging device of any one of Claims 1 thru | or 8.
JP2014141775A 2014-07-09 2014-07-09 Imaging apparatus, control method therefor, and program Active JP6333095B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014141775A JP6333095B2 (en) 2014-07-09 2014-07-09 Imaging apparatus, control method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014141775A JP6333095B2 (en) 2014-07-09 2014-07-09 Imaging apparatus, control method therefor, and program

Publications (2)

Publication Number Publication Date
JP2016019196A JP2016019196A (en) 2016-02-01
JP6333095B2 true JP6333095B2 (en) 2018-05-30

Family

ID=55234100

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014141775A Active JP6333095B2 (en) 2014-07-09 2014-07-09 Imaging apparatus, control method therefor, and program

Country Status (1)

Country Link
JP (1) JP6333095B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10742892B1 (en) 2019-02-18 2020-08-11 Samsung Electronics Co., Ltd. Apparatus and method for capturing and blending multiple images for high-quality flash photography using mobile electronic device
US10911691B1 (en) 2019-11-19 2021-02-02 Samsung Electronics Co., Ltd. System and method for dynamic selection of reference image frame
US11062436B2 (en) 2019-05-10 2021-07-13 Samsung Electronics Co., Ltd. Techniques for combining image frames captured using different exposure settings into blended images
US11095829B2 (en) 2019-06-11 2021-08-17 Samsung Electronics Co., Ltd. Apparatus and method for high dynamic range (HDR) image creation of dynamic scenes using graph cut-based labeling
US11107205B2 (en) 2019-02-18 2021-08-31 Samsung Electronics Co., Ltd. Techniques for convolutional neural network-based multi-exposure fusion of multiple image frames and for deblurring multiple image frames
US11430094B2 (en) 2020-07-20 2022-08-30 Samsung Electronics Co., Ltd. Guided multi-exposure image fusion

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102412591B1 (en) 2017-12-21 2022-06-24 삼성전자주식회사 Method of generating composite image using a plurality of images with different exposure values and electronic device supporting the same

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3731729B2 (en) * 2000-12-20 2006-01-05 松下電器産業株式会社 Image composition circuit
JP4854581B2 (en) * 2007-04-24 2012-01-18 キヤノン株式会社 Imaging apparatus and control method thereof
JP6137792B2 (en) * 2012-07-10 2017-05-31 キヤノン株式会社 IMAGING DEVICE, CONTROL METHOD FOR IMAGING DEVICE, PROGRAM, AND STORAGE MEDIUM

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10742892B1 (en) 2019-02-18 2020-08-11 Samsung Electronics Co., Ltd. Apparatus and method for capturing and blending multiple images for high-quality flash photography using mobile electronic device
US11107205B2 (en) 2019-02-18 2021-08-31 Samsung Electronics Co., Ltd. Techniques for convolutional neural network-based multi-exposure fusion of multiple image frames and for deblurring multiple image frames
US11062436B2 (en) 2019-05-10 2021-07-13 Samsung Electronics Co., Ltd. Techniques for combining image frames captured using different exposure settings into blended images
US11095829B2 (en) 2019-06-11 2021-08-17 Samsung Electronics Co., Ltd. Apparatus and method for high dynamic range (HDR) image creation of dynamic scenes using graph cut-based labeling
US10911691B1 (en) 2019-11-19 2021-02-02 Samsung Electronics Co., Ltd. System and method for dynamic selection of reference image frame
US11430094B2 (en) 2020-07-20 2022-08-30 Samsung Electronics Co., Ltd. Guided multi-exposure image fusion

Also Published As

Publication number Publication date
JP2016019196A (en) 2016-02-01

Similar Documents

Publication Publication Date Title
JP6343200B2 (en) Imaging apparatus, control method therefor, and program
US10194091B2 (en) Image capturing apparatus, control method therefor, program, and recording medium
JP6223028B2 (en) Imaging apparatus, control method and program thereof
US9357138B2 (en) Image capture apparatus, method of controlling image capture apparatus, and electronic device
JP6333095B2 (en) Imaging apparatus, control method therefor, and program
US10986262B2 (en) Imaging apparatus, control method, and non-transitory storage medium
US10992854B2 (en) Image processing apparatus, imaging apparatus, image processing method, and storage medium
JP6028928B2 (en) Imaging apparatus and imaging method
JP6744711B2 (en) Imaging device, control method thereof, program, and storage medium
JP2017022610A (en) Image processing apparatus and image processing method
US20170318208A1 (en) Imaging device, imaging method, and image display device
JP2008131530A (en) Image pickup device, image processing apparatus and method, and computer program
US10097751B2 (en) Imaging apparatus and image compositing method
JP2010068046A (en) Imaging apparatus
US9013597B2 (en) Image pickup apparatus that carries out noise compensation, control method therefor, and storage medium
JP7361557B2 (en) Imaging device and exposure control method
JP6294607B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP2006157342A (en) The camera module
JP2013179565A (en) Image pickup device
JP7555730B2 (en) Image processing device, method and program
JP2014030146A (en) Imaging apparatus and method for controlling the same
JP2005311843A (en) Image pickup device
JP2017011762A (en) Imaging device and imaging method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170627

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180226

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180424

R151 Written notification of patent or utility model registration

Ref document number: 6333095

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151