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

Imaging apparatus, control method therefor, and program Download PDF

Info

Publication number
JP2020065157A
JP2020065157A JP2018195756A JP2018195756A JP2020065157A JP 2020065157 A JP2020065157 A JP 2020065157A JP 2018195756 A JP2018195756 A JP 2018195756A JP 2018195756 A JP2018195756 A JP 2018195756A JP 2020065157 A JP2020065157 A JP 2020065157A
Authority
JP
Japan
Prior art keywords
image
difficulty level
shutter speed
image pickup
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018195756A
Other languages
Japanese (ja)
Inventor
小林 正明
Masaaki Kobayashi
正明 小林
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 JP2018195756A priority Critical patent/JP2020065157A/en
Publication of JP2020065157A publication Critical patent/JP2020065157A/en
Pending legal-status Critical Current

Links

Images

Landscapes

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

Abstract

To provide an imaging apparatus capable of electronically applying a motion blur to a picked-up image, thereby achieving a moving image with high quality.SOLUTION: The imaging apparatus includes a sensor executing imaging at a preset shutter speed and calculates a difficulty degree involved in application of a motion blur to a picked-up image on the basis of the information concerning the movement between images acquired from continuously picked-up images and when the calculated difficulty degree is low against a preset determination reference, makes the sensor execute imaging at a high shutter speed and when the calculated difficulty degree is high, makes the sensor execute imaging at a low shutter speed.SELECTED DRAWING: Figure 2

Description

本発明は、撮像装置、撮像装置の制御方法、及びプログラムに関する。   The present invention relates to an imaging device, a method for controlling the imaging device, and a program.

運動選手や自動車等の高速で動く被写体を静止画として撮影する場合、モーションブラーと呼ばれるボケを抑制するために、(1/8000)秒〜(1/500)秒といった比較的高速なシャッタースピードで撮像することが多い。一方で、毎秒60フレームで撮像される動画を例えば(1/8000)秒の高速なシャッタースピードで撮像して視聴した場合、被写体の像が鮮明になりすぎて、ジャーキネスと呼ばれる動き不連続性が知覚できてしまう。   When shooting a fast-moving subject such as an athlete or car as a still image, a relatively high shutter speed of (1/8000) seconds to (1/500) seconds is used to suppress blurring called motion blur. Often imaged. On the other hand, when a moving image captured at 60 frames per second is captured and viewed at a high shutter speed of (1/8000) seconds, for example, the image of the subject becomes too sharp and motion discontinuity called jerkiness occurs. I can perceive it.

そのため、毎秒60フレームで撮像される動画は、モーションブラーを画像中に残して視覚的に違和感がない滑らかな動画として撮影するために、(1/60)秒〜(1/125)秒といった比較的低速なシャッタースピードで撮像することが多い。つまり、通常の動画撮影方法である低速なシャッタースピードで撮像した動画の1フレームを切り出した画像は、モーションブラーが発生していて、静止画として視聴するには適さない。   Therefore, in order to capture a moving image captured at 60 frames per second as a smooth moving image with motion blur left in the image, a comparison of (1/60) seconds to (1/125) seconds is made. Images are often taken at extremely low shutter speeds. That is, an image obtained by cutting out one frame of a moving image captured at a low shutter speed which is a normal moving image capturing method has motion blur and is not suitable for viewing as a still image.

この問題を解決する1つの方法として、動画であっても高速なシャッタースピードで撮像し、画素毎にオプティカルフローを使って、撮像した画像に後処理として電子的にモーションブラーを付与する技術が提案されている(特許文献1参照)。つまり、擬似的に低速なシャッタースピードによる撮像を再現し、ジャーキネスの少ない滑らかな動画を生成する。これによれば、ユーザーは、静止画用の高速なシャッタースピードでの撮像に相当する画像と動画用の低速なシャッタースピードでの撮像に相当する画像との、両方の画像を視聴可能となる。   As one method to solve this problem, we propose a technology that electronically gives motion blur as post-processing to the captured image by capturing an image with a high shutter speed even for a moving image and using an optical flow for each pixel. (See Patent Document 1). In other words, a pseudo moving image with a low shutter speed is reproduced to generate a smooth moving image with less jerkiness. According to this, the user can view both the image corresponding to the image capturing at the high shutter speed for the still image and the image corresponding to the image capturing at the low shutter speed for the moving image.

オプティカルフローは、被写体の動きを表す高密度の動きベクトル情報であり、例えば、画素毎に動きベクトルのマップとして表現される。オプティカルフローは、連続する画像から算出することができる。オプティカルフローの算出方法としては、例えば非特許文献1に記載のLucas Kanade法(以下、「LK法」とも称す。)がある。   The optical flow is high-density motion vector information representing the motion of the subject, and is represented as a motion vector map for each pixel, for example. Optical flow can be calculated from successive images. As a method for calculating the optical flow, there is, for example, the Lucas Kanade method (hereinafter, also referred to as “LK method”) described in Non-Patent Document 1.

特開2010−28524号公報JP, 2010-28524, A

B.D.Lucas and T.Kanade,(1981),“An iterative image registration technique with an application to stereo vision”,Proceedings of Imaging Understanding Workshop,pages 121−130B. D. Lucas and T.L. Kanade, (1981), "An iterative image registration technique with an application to stereo vision," Processings of Imaging Understanding, 130-121.

動画と静止画の品質を両立するために、オプティカルフローを使って後処理で電子的にモーションブラーを付与するシステムにおいて、撮像するシーン内での被写体の動きが複雑であると、検出したオプティカルフローに誤りが生じることがある。誤ったオプティカルフローを使って、撮像した画像にモーションブラーを付与すると、同一シーンを低速なシャッタースピードで撮像した場合には発生しないアーティファクトが、モーションブラー付与後の画像に発生することがある。本発明は、このような事情に鑑みてなされたものであり、撮像した画像に電子的にモーションブラーを付与可能な撮像装置にて、品質が良好な動画を得られるようにすることを目的とする。   In a system that uses an optical flow to electronically add motion blur in order to achieve both moving image and still image quality, the optical flow detected when the movement of the subject in the captured scene is complicated May be incorrect. When motion blur is added to a captured image using an incorrect optical flow, an artifact that does not occur when the same scene is captured at a low shutter speed may occur in the image after the motion blur is added. The present invention has been made in view of such circumstances, and an object of the present invention is to provide a moving image of good quality in an imaging device capable of electronically adding motion blur to a captured image. To do.

本発明に係る撮像装置は、設定されるシャッタースピードで撮像する第1の撮像手段と、連続的に撮像された画像から画像間の動きに係る情報を取得する取得手段と、取得された前記動きに係る情報に基づいて、撮像された画像へのモーションブラー付与に係る難易度を算出する難易度算出手段と、予め設定される判断基準に対し、算出された前記難易度が低い場合には第1のシャッタースピードで前記第1の撮像手段に撮像させ、前記難易度が高い場合には前記第1のシャッタースピードよりも低速な第2のシャッタースピードで前記第1の撮像手段に撮像させる制御手段とを有することを特徴とする。   An image pickup apparatus according to the present invention includes a first image pickup unit that takes an image at a set shutter speed, an acquisition unit that obtains information regarding movement between images from continuously picked-up images, and the obtained movement. Based on the information related to, the difficulty calculation means for calculating the difficulty of motion blur addition to the captured image, and a preset judgment criterion, if the calculated difficulty is low, A control unit that causes the first image capturing unit to capture an image at a shutter speed of 1 and causes the first image capturing unit to capture an image at a second shutter speed that is slower than the first shutter speed when the difficulty level is high. And having.

本発明によれば、撮像した画像に電子的にモーションブラーを付与可能な撮像装置にて、アーティファクトの発生が抑制された良好な品質の動画を得ることが可能となる。   According to the present invention, it is possible to obtain a moving image of good quality in which the occurrence of artifacts is suppressed in an imaging device that can electronically add motion blur to a captured image.

第1の実施形態における撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device in 1st Embodiment. 第1の実施形態における撮像装置の制御例を示すフローチャートである。6 is a flowchart showing an example of control of the image pickup apparatus in the first embodiment. 第2の実施形態における撮像装置の構成例を示す図である。It is a figure which shows the structural example of the imaging device in 2nd Embodiment. 第2の実施形態におけるマップ生成処理の例を示すフローチャートである。It is a flow chart which shows the example of map generation processing in a 2nd embodiment. 第3の実施形態における撮像装置の制御例を示すフローチャートである。9 is a flowchart showing an example of control of the image pickup apparatus according to the third embodiment.

以下、本発明の実施形態を図面に基づいて説明する。以下に説明する各実施形態における撮像装置は、連続的に撮像された画像から取得した画像間の動きに係る情報に基づいて、撮像した画像に電子的にモーションブラーを付与する機能を有する。なお、以下では画像間の動きに係る情報としてオプティカルフローを一例に説明するが、これに限定されるものではなく、モーションブラーの付与に使用できる画像間の動きを示す任意の情報が適用可能である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. The image capturing apparatus in each of the embodiments described below has a function of electronically adding motion blur to captured images based on information about movement between images acquired from continuously captured images. In the following, an optical flow will be described as an example of information related to movement between images, but the present invention is not limited to this, and any information indicating movement between images that can be used to add motion blur can be applied. is there.

(第1の実施形態)
本発明の第1の実施形態について説明する。図1は、第1の実施形態における撮像装置の構成例を示すブロック図である。本実施形態における撮像装置は、CPU102、メモリ103、不揮発メモリ104、GUI部105、及び画像処理エンジン106を有する。また、本実施形態における撮像装置は、レンズユニット108とセンサー109とを有するセンサーユニット107、オプティカルフロー生成部110、難易度算出部111、モーションブラー付与部112、及び情報記憶部113を有する。撮像装置が有する各モジュール102〜113は、バス101を介して接続され、各モジュール間のデータの入出力はバス101を介して行われる。
(First embodiment)
A first embodiment of the present invention will be described. FIG. 1 is a block diagram showing a configuration example of an image pickup apparatus according to the first embodiment. The image pickup apparatus according to this embodiment includes a CPU 102, a memory 103, a non-volatile memory 104, a GUI unit 105, and an image processing engine 106. Further, the imaging device according to the present embodiment includes a sensor unit 107 having a lens unit 108 and a sensor 109, an optical flow generation unit 110, a difficulty level calculation unit 111, a motion blur adding unit 112, and an information storage unit 113. The modules 102 to 113 included in the image pickup apparatus are connected via a bus 101, and input / output of data between the modules is performed via the bus 101.

CPU(Central Processing Unit:中央演算処理装置)102は、撮像装置が有するそれぞれのモジュールを制御する。CPU102は、制御手段の一例である。メモリ103は、例えばCPU102の主記憶装置として使用されるメモリである。不揮発メモリ104には、例えばOS(オペレーティングシステム)やアプリケーション等のプログラム及び画像データ等の各種データが格納される。本実施形態では、例えば不揮発メモリ104に格納されたプログラムをメモリ103へと読み込み、読み込んだプログラムをCPU102が実行することで、各種処理が実行される。   A CPU (Central Processing Unit) 102 controls each module included in the imaging device. The CPU 102 is an example of a control unit. The memory 103 is a memory used as a main storage device of the CPU 102, for example. The nonvolatile memory 104 stores, for example, programs such as an OS (operating system) and applications, and various data such as image data. In the present embodiment, for example, a program stored in the non-volatile memory 104 is read into the memory 103, and the CPU 102 executes the read program to execute various processes.

GUI(Graphical User Interface:グラフィカルユーザーインターフェース)部105は、ユーザーからの撮像装置に対する操作を受け付けたり、ユーザーに撮像装置の情報等を提供したりするためのインターフェース部である。例えば、ユーザーはGUI部105を使って後述のモードを設定する。GUI部105は、例えばタッチパネル付ディスプレイである。しかし、GUI部105は、これに限定されず、例えば十字キー、ダイアル、ボタン等で設定を行うGUIであってもよい。   A GUI (Graphical User Interface) unit 105 is an interface unit for receiving an operation of the imaging device from the user and providing information of the imaging device to the user. For example, the user uses the GUI unit 105 to set a mode described later. The GUI unit 105 is, for example, a display with a touch panel. However, the GUI unit 105 is not limited to this, and may be, for example, a GUI for making settings using a cross key, a dial, a button, or the like.

画像処理エンジン106は、センサーユニット107から出力されるデジタル画像信号を画像データに変換してメモリ103に記憶する。また、画像処理エンジン106は、画像データを符号化データに変換して不揮発メモリ104に記録する。本実施形態では、画像データは、横1920画素及び縦1080画素のRGB各8ビットのデータであるものとするが、これに限定されるものではない。また、符号化データは、画像データをHEVC(High Efficiency Video Coding)方式により変換されたものとするが、符号化方式に限定はなく、また非圧縮データであっても本実施形態での動作を実行することは可能である。   The image processing engine 106 converts the digital image signal output from the sensor unit 107 into image data and stores the image data in the memory 103. The image processing engine 106 also converts the image data into encoded data and records the encoded data in the non-volatile memory 104. In the present embodiment, the image data is assumed to be 8-bit RGB data of 1920 horizontal pixels and 1080 vertical pixels, but is not limited to this. Further, the encoded data is assumed to be image data converted by the HEVC (High Efficiency Video Coding) system, but the encoding system is not limited, and the operation in the present embodiment is not limited to non-compressed data. It is possible to carry out.

センサーユニット107は、被写体に係る光学像を電気信号に変換してデジタル画像信号を出力する。センサーユニット107は、レンズ及び絞りを含むレンズユニット108と、CMOSイメージセンサーやCCDイメージセンサー等のセンサー(撮像素子)109とを有する。レンズユニット108を通して取り込まれた光は、センサー109によってデジタル画像信号に変換される。なお、図1には、撮像装置がレンズユニット108及びセンサー109を有する例を示しているが、レンズユニット108が撮像装置とは別体で着脱可能(交換可能)に構成されていてもよい。   The sensor unit 107 converts an optical image of a subject into an electric signal and outputs a digital image signal. The sensor unit 107 has a lens unit 108 including a lens and a diaphragm, and a sensor (image pickup element) 109 such as a CMOS image sensor or a CCD image sensor. The light captured through the lens unit 108 is converted into a digital image signal by the sensor 109. Note that FIG. 1 shows an example in which the image pickup apparatus has the lens unit 108 and the sensor 109, but the lens unit 108 may be detachably (replaceable) separately from the image pickup apparatus.

撮像装置による撮像では、最適な露出になるように、シャッタースピードを示すTv(Time Value)値、絞りを示すAv(Aperture Value)値、及び感度を制御する。本実施形態では、はじめにTv値を決定し、それに応じたAv値と感度を決定するものとする。Tv値の決定方法については後述する。また、Av値と感度の決定方法については、広く知られる技術であるため、説明を省略する。撮像においては、決定したAv値に応じてレンズユニット108の絞りが制御され、Tv値に応じてセンサー109の電子シャッターが制御され、感度に応じてセンサー109のアナログゲインが制御される。本実施形態では、撮像から、画像データの記憶、符号化データの記録、Tv値の制御、Av値の制御、及び感度の制御は、毎秒60フレームのレートで連続的に行われるものとする。   In image pickup by an image pickup apparatus, a Tv (Time Value) value indicating a shutter speed, an Av (Aperture Value) value indicating a diaphragm, and a sensitivity are controlled so as to obtain an optimum exposure. In this embodiment, the Tv value is first determined, and the Av value and the sensitivity are determined accordingly. The method of determining the Tv value will be described later. Further, the method of determining the Av value and the sensitivity is a well-known technique, and thus the description thereof will be omitted. In imaging, the aperture of the lens unit 108 is controlled according to the determined Av value, the electronic shutter of the sensor 109 is controlled according to the Tv value, and the analog gain of the sensor 109 is controlled according to the sensitivity. In the present embodiment, image pickup, image data storage, coded data recording, Tv value control, Av value control, and sensitivity control are performed continuously at a rate of 60 frames per second.

オプティカルフロー生成部110は、メモリ103に記憶された画像データが連続的に入力され、入力される画像データに基づいて画素毎に連続する画像間の動きを表すオプティカルフローを生成する。オプティカルフロー生成部110は、取得手段の一例である。本実施形態において、オプティカルフロー生成部110は、LK法によりオプティカルフローを生成するものとするが、オプティカルフローの生成方法はLK法に限定されるものではない。難易度算出部111は、オプティカルフロー生成部110により生成されたオプティカルフローを使って、撮像した画像に電子的にモーションブラーを付与する際のモーションブラー付与の難易度を算出する。   The optical flow generation unit 110 is continuously input with the image data stored in the memory 103, and generates an optical flow representing a movement between continuous images for each pixel based on the input image data. The optical flow generation unit 110 is an example of an acquisition unit. In the present embodiment, the optical flow generation unit 110 is assumed to generate an optical flow by the LK method, but the optical flow generation method is not limited to the LK method. The difficulty level calculation unit 111 uses the optical flow generated by the optical flow generation unit 110 to calculate the difficulty level of motion blur addition when electronically adding motion blur to a captured image.

モーションブラー付与部112は、撮像した画像に電子的にモーションブラーを付与する。モーションブラー付与部112は、大きなTv値、すなわち高速なシャッタースピードで撮像した画像に対して、オプティカルフロー生成部110により生成されたオプティカルフローを使って、電子的にモーションブラーを付与する。情報記憶部113は、撮像装置のユーザーによりGUI部105を介して設定されるユーザー設定情報等を記憶する。情報記憶部113は、例えばユーザーにより設定された撮像装置のモードを示す情報を記憶する。   The motion blur adding unit 112 electronically adds motion blur to the captured image. The motion blur imparting unit 112 electronically imparts motion blur to a large Tv value, that is, an image captured at a high shutter speed, using the optical flow generated by the optical flow generating unit 110. The information storage unit 113 stores user setting information and the like set by the user of the imaging device via the GUI unit 105. The information storage unit 113 stores, for example, information indicating a mode of the imaging device set by the user.

以下、本実施形態におけるTv値の決定方法について、図2を参照して説明する。図2は、第1の実施形態における撮像装置でのセンサー109のTv値の決定に係る制御例を示すフローチャートである。図2に示すフローチャートにおける各ステップでの動作は、撮像装置のCPU102が実行するものとする。   Hereinafter, a method of determining the Tv value in this embodiment will be described with reference to FIG. FIG. 2 is a flowchart showing a control example relating to determination of the Tv value of the sensor 109 in the image pickup apparatus according to the first embodiment. It is assumed that the operation of each step in the flowchart shown in FIG. 2 is executed by the CPU 102 of the image pickup apparatus.

まず、ステップS201にて、CPU102は、シャッタースピードが高速なTv値(以下、「高速Tv値」とも称す。)、及びシャッタースピードが低速なTv値(以下、「低速Tv値」とも称す。)を情報記憶部113から取得する。本実施形態では、一例として、高速Tv値は(1/1000)秒のシャッタースピードを示す値であるとし、低速Tv値は(1/120)秒のシャッタースピードを示す値であるとする。なお、高速Tv値及び低速Tv値は、これに限定されるものではない。高速Tv値は、スポーツシーン等を静止画で撮影する場合のTv値が設定されればよく、一般には(1/500)秒以下のシャッタースピードを示す値であればよい。また、低速Tv値は、一般にシャッタースピードがフレームレートの逆数又はその半分となる値が用いられることが多いため、その程度の値が設定されればよい。   First, in step S201, the CPU 102 has a high shutter speed Tv value (hereinafter, also referred to as “high speed Tv value”) and a low shutter speed Tv value (hereinafter, also referred to as “low speed Tv value”). From the information storage unit 113. In the present embodiment, as an example, the high speed Tv value is a value indicating a shutter speed of (1/1000) seconds, and the low speed Tv value is a value indicating a shutter speed of (1/120) seconds. The high speed Tv value and the low speed Tv value are not limited to this. As the high-speed Tv value, a Tv value for shooting a sports scene or the like as a still image may be set, and in general, may be a value indicating a shutter speed of (1/500) seconds or less. Further, as the low-speed Tv value, a value at which the shutter speed is the reciprocal of the frame rate or a half thereof is generally used, and therefore, a value of that level may be set.

次に、ステップS202にて、CPU102は、後述するようにして難易度算出部111により算出されたモーションブラー付与に係る難易度情報を取得する。CPU102は、撮像した画像に電子的にモーションブラーを付与する際のモーションブラー付与の難易度を難易度算出部111から取得する。   Next, in step S202, the CPU 102 acquires the difficulty level information regarding motion blur addition calculated by the difficulty level calculation unit 111 as described below. The CPU 102 acquires the difficulty level of motion blur addition when electronically adding motion blur to a captured image from the difficulty level calculation unit 111.

次に、ステップS203にて、CPU102は、ステップS202において取得したモーションブラー付与の難易度と予め定めた判断基準(しきい値)とを比較して、モーションブラー付与の難易度が低いか否かを判定する。モーションブラー付与の難易度が低いとCPU102が判定した場合、ステップS204にて、CPU102は、センサー109のシャッタースピードを高速Tv値に設定する。また、モーションブラー付与の難易度が高いとCPU102が判定した場合、ステップS205にて、CPU102は、センサー109のシャッタースピードを低速Tv値に設定する。センサーユニット107は、CPU102により設定されたTv値等に従って撮像を行う。   Next, in step S203, the CPU 102 compares the difficulty level of motion blur addition acquired in step S202 with a predetermined criterion (threshold value) to determine whether the difficulty level of motion blur addition is low. To judge. When the CPU 102 determines that the degree of difficulty in adding motion blur is low, the CPU 102 sets the shutter speed of the sensor 109 to the high-speed Tv value in step S204. When the CPU 102 determines that the degree of difficulty in adding motion blur is high, the CPU 102 sets the shutter speed of the sensor 109 to the low speed Tv value in step S205. The sensor unit 107 captures an image according to the Tv value set by the CPU 102.

続いて、撮像した画像に対するモーションブラー付与の難易度の算出方法について説明する。モーションブラー付与の難易度は、難易度算出部111によって算出される。なお、難易度算出部111は、回路であってもCPU(プログラマブルな回路)がソフトウェア処理を行う構成のどちらであってもよい。ソフトウェア処理により実現する場合、CPU102が演算することも可能である。   Next, a method of calculating the degree of difficulty of adding motion blur to a captured image will be described. The difficulty level of adding motion blur is calculated by the difficulty level calculation unit 111. The difficulty level calculation unit 111 may be a circuit or a configuration in which a CPU (programmable circuit) performs software processing. When it is realized by software processing, the CPU 102 can also perform calculation.

オプティカルフローは、2枚の画像間の動きを表すため、連続する2つの入力画像を第1フレームと第2フレームとし、第1フレームの画素が第2フレームでどのように動いたかを2次元のベクトルで表現するものとして説明する。第1フレーム、第2フレームにおける座標(x,y)の画素の輝度を、それぞれI1(x,y)、I2(x,y)と表現する。輝度は、事前に輝度画像を作っておいても、RGBからその都度計算してもよい。 Since the optical flow represents a motion between two images, two consecutive input images are used as a first frame and a second frame, and a two-dimensional method is used to determine how the pixels of the first frame move in the second frame. It will be described as being expressed by a vector. The brightness of the pixel at the coordinates (x, y) in the first frame and the second frame is expressed as I 1 (x, y) and I 2 (x, y), respectively. The brightness may be calculated in advance from RGB, or a brightness image may be created in advance.

第1フレームの座標(x,y)において、第1フレームから第2フレームへの動きを表現する動きベクトルを(u(x,y),v(x,y))とする。このとき、第1フレームの画像と、第1フレームの画素をオプティカルフローでワーピングして生成した画像(ワーピング画像)との画素値の平均二乗誤差(MSE:Mean Square Error)は、下記式(1)により算出される。   At the coordinates (x, y) of the first frame, the motion vector expressing the motion from the first frame to the second frame is (u (x, y), v (x, y)). At this time, the mean square error (MSE: Mean Square Error) of the pixel value between the image of the first frame and the image generated by warping the pixels of the first frame by the optical flow (warping image) is expressed by the following equation (1) ).

Figure 2020065157
Figure 2020065157

ただし、式(2)に示す{要素|条件}という表現は、条件を満足する要素の集合を表現するものとする。また、式(2)において、w及びhは画像の幅及び高さであり、関数round(a)は、実数aを四捨五入した値を返す関数である。   However, the expression {element | condition} shown in Expression (2) represents a set of elements that satisfy the condition. Further, in Expression (2), w and h are the width and height of the image, and the function round (a) is a function that returns a value obtained by rounding the real number a.

式(1)により算出される画素値の平均二乗誤差(MSE)は、2つの画像間の相関を示しており、難易度算出部111は、この画素値の平均二乗誤差(MSE)をモーションブラー付与の難易度として算出する。画素値の平均二乗誤差(MSE)が小さいほど、画像の相関が高く、オプティカルフローが高い精度で算出できている、つまりモーションブラー付与の難易度が低いことを示す。そこで、本実施形態では、図2に示したステップS203において、CPU102は、例えば画素値の平均二乗誤差(MSE)が8未満である場合、オプティカルフローの精度が高く、モーションブラー付与の難易度が低いと判定する。   The mean squared error (MSE) of the pixel values calculated by the equation (1) indicates the correlation between the two images, and the difficulty level calculation unit 111 calculates the mean squared error (MSE) of the pixel values as motion blur. It is calculated as the degree of difficulty of grant. The smaller the mean square error (MSE) of the pixel values, the higher the correlation of the images, and the more accurate the optical flow can be calculated, that is, the lower the difficulty of adding motion blur. Therefore, in the present embodiment, in step S203 shown in FIG. 2, the CPU 102 has high optical flow accuracy and difficulty of motion blur addition when the mean square error (MSE) of pixel values is less than 8, for example. Judge as low.

なお、前述した例では、モーションブラー付与の難易度として、画素値の平均二乗誤差(MSE)を算出しているが、画像の相関を示す他の指標を用いてもよい。例えば、下記式(3)に示すように、ピーク信号対雑音比(PSNR:Peak Signal Noise Ratio)をモーションブラー付与の難易度として算出するようにしてもよい。   In the example described above, the mean squared error (MSE) of pixel values is calculated as the degree of difficulty of motion blur addition, but another index indicating the correlation of images may be used. For example, as shown in the following formula (3), a peak signal-to-noise ratio (PSNR: Peak Signal Noise Ratio) may be calculated as the degree of difficulty of adding motion blur.

Figure 2020065157
Figure 2020065157

式(3)により算出されるピーク信号対雑音比(PSNR)を用いる場合、図2に示したステップS203において、CPU102は、例えばピーク信号対雑音比(PSNR)が30以上であるときにモーションブラー付与の難易度が低いと判定する。   When the peak signal-to-noise ratio (PSNR) calculated by the equation (3) is used, in step S203 shown in FIG. 2, the CPU 102 performs motion blur when the peak signal-to-noise ratio (PSNR) is 30 or more, for example. It is determined that the degree of difficulty of grant is low.

また、他にも、構造的類似性(SSIM:structual similarity)をモーションブラー付与の難易度として用いるようにしてもよい。構造的類似性(SSIM)を用いる場合、図2に示したステップS203において、CPU102は、例えば構造的類似性(SSIM)が0.95以上であるときにモーションブラー付与の難易度が低いと判定する。   In addition, structural similarity (SSIM) may be used as the degree of difficulty in providing motion blur. When structural similarity (SSIM) is used, in step S203 shown in FIG. 2, the CPU 102 determines that the degree of difficulty of motion blur addition is low when the structural similarity (SSIM) is 0.95 or more, for example. To do.

なお、本実施形態では、前述した式(1)においてround関数を利用している。これは、動きベクトルに従って移動した位置でのニアレストネイバー(その位置の最近傍の画素)における画素値の参照を表している。しかし、これに限定されるものではなく、演算量の増加を許容できるのであれば、例えば、バイリニア補間やバイキュービック補間法で移動した座標位置での仮想の画素値を算出してもよい。また、本実施形態では、全画素の比較結果の積分値から相関値を算出するようにしているが、必ずしも全画素を処理する必要はない。例えば、縦横10画素ずつでサンプリングし、全体の1%の画素を用いて相関値を算出するようにしてもよい。   In addition, in this embodiment, the round function is used in the above-mentioned formula (1). This represents the reference of the pixel value at the nearest neighbor (the pixel closest to the position) at the position moved according to the motion vector. However, the present invention is not limited to this, and if an increase in the amount of calculation can be allowed, for example, a virtual pixel value at the coordinate position moved by the bilinear interpolation or the bicubic interpolation method may be calculated. Further, in the present embodiment, the correlation value is calculated from the integrated value of the comparison result of all pixels, but it is not always necessary to process all pixels. For example, the vertical and horizontal 10 pixels may be sampled, and the correlation value may be calculated using 1% of the pixels.

本実施形態では、センサー109のシャッタースピードはTv値が即座に反映されるものとして説明したが、実際のセンサー109が撮像するシャッタースピードは徐々に変化するようにしてもよい。また、本実施形態では、センサー109のTv値を制御して、撮影、記録する装置として説明したが、撮像時にリアルタイムで電子的にモーションブラーを画像に付与する構成であってもよい。この場合、撮像時にリアルタイムでオプティカルフローを生成し、モーションブラー付与部112が、そのオプティカルフローに従って画像データにモーションブラーを付与することになる。モーションブラーが付与された画像は、符号化されて不揮発メモリ104に記録される。静止画と動画の両立という点から、不揮発メモリ104には、静止画用の高速なシャッタースピード(高速Tv値)で撮像した画像の符号化データと、動画用の低速なシャッタースピードを再現した画像の符号化データが記録されることになる。   In the present embodiment, the shutter speed of the sensor 109 is described as the Tv value being reflected immediately, but the shutter speed actually captured by the sensor 109 may be gradually changed. Further, in the present embodiment, the device for capturing and recording by controlling the Tv value of the sensor 109 has been described, but it may be configured to electronically add motion blur to an image at the time of capturing. In this case, an optical flow is generated in real time at the time of image capturing, and the motion blur adding unit 112 adds motion blur to image data according to the optical flow. The image to which the motion blur has been added is encoded and recorded in the non-volatile memory 104. From the viewpoint of compatibility between still images and moving images, the non-volatile memory 104 reproduces coded data of images captured at high shutter speeds (high-speed Tv values) for still images and low-speed shutter speeds for moving images. Will be recorded.

第1の実施形態における撮像装置は、高速なシャッタースピードで撮像しつつ、フレーム毎にモーションブラー付与の難易度を算出し、難易度が高い場合にはシャッタースピードを低速化する機能を有している。これにより、モーションブラーの少ない動画を記録しつつ、後に電子的なモーションブラー付与を施して低速なシャッタースピードによる撮像を再現することが難しいと判断される場合、動画用として低速なシャッタースピードで画像を撮影、記録できる。そのため、ユーザーは、アーティファクトの発生が抑制され、ジャーキネスの少ない滑らかな動画を視聴することが可能となる。   The image capturing apparatus according to the first embodiment has a function of calculating the difficulty level of motion blur addition for each frame while capturing an image at a high shutter speed, and reducing the shutter speed when the difficulty level is high. There is. As a result, when it is determined that it is difficult to add electronic motion blur and reproduce the shooting with a low shutter speed while recording a video with little motion blur, the image is shot with a slow shutter speed for the video. You can shoot and record. Therefore, the user can watch the smooth moving image with less jerkiness while suppressing the occurrence of artifacts.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。第2の実施形態においては、センサーユニットとは異なるサブセンサーユニットから出力される信号を用いて、センサーユニットが有するセンサーのシャッタースピードを制御する。以下では、第2の実施形態における撮像装置において、前述した第1の実施形態と異なる点について説明する。
(Second embodiment)
Next, a second embodiment of the present invention will be described. In the second embodiment, the shutter speed of the sensor included in the sensor unit is controlled using the signal output from the sub sensor unit different from the sensor unit. Below, in the imaging device according to the second embodiment, the points different from the above-described first embodiment will be described.

図3(a)は、第2の実施形態における撮像装置の構成例を示すブロック図である。図3(a)において、図1に示した構成要素と同一の機能を有する構成要素には同一の符号を付し、重複する説明は省略する。本実施形態における撮像装置は、CPU102、メモリ103、不揮発メモリ104、GUI部105、及び画像処理エンジン106を有する。また、本実施形態における撮像装置は、センサーユニット107、オプティカルフロー生成部110、難易度算出部111、モーションブラー付与部112、及び情報記憶部113に加え、さらにサブセンサーユニット301を有する。撮像装置が有する各モジュール102〜113、301は、バス101を介して接続され、各モジュール間のデータの入出力はバス101を介して行われる。   FIG. 3A is a block diagram showing a configuration example of the image pickup apparatus according to the second embodiment. In FIG. 3A, components having the same functions as those of the components shown in FIG. 1 are designated by the same reference numerals, and duplicated description will be omitted. The image pickup apparatus according to this embodiment includes a CPU 102, a memory 103, a non-volatile memory 104, a GUI unit 105, and an image processing engine 106. Further, the image pickup apparatus according to the present embodiment further includes a sub sensor unit 301 in addition to the sensor unit 107, the optical flow generation unit 110, the difficulty level calculation unit 111, the motion blur adding unit 112, and the information storage unit 113. The modules 102 to 113 and 301 included in the image pickup apparatus are connected via a bus 101, and input / output of data between the modules is performed via the bus 101.

サブセンサーユニット301は、レンズと画像を撮像するセンサーとを有し、センサーユニット107とは独立した撮影条件で撮像する。つまり、サブセンサーユニット301は、センサーユニット107に依存しない撮影条件で撮像を行う。サブセンサーユニット301が有するセンサーは、例えば(1/1000)秒の高速なシャッタースピードで撮像を行う。本実施形態においても、図2に示したフローチャートに従って処理を行い、メインセンサーであるセンサーユニット107が有するセンサー109のシャッタースピードが決定される。ただし、オプティカルフロー生成部110は、センサー109が撮像した画像からではなく、サブセンサーユニット301が撮像した画像からオプティカルフローを生成する。   The sub sensor unit 301 has a lens and a sensor that captures an image, and captures an image under a shooting condition that is independent of the sensor unit 107. That is, the sub sensor unit 301 performs imaging under imaging conditions that do not depend on the sensor unit 107. The sensor included in the sub sensor unit 301 captures an image at a high shutter speed of (1/1000) seconds, for example. Also in this embodiment, the shutter speed of the sensor 109 of the sensor unit 107, which is the main sensor, is determined by performing the process according to the flowchart shown in FIG. However, the optical flow generation unit 110 generates the optical flow from the image captured by the sub sensor unit 301, not from the image captured by the sensor 109.

第2の実施形態では、モーションブラー付与の難易度の判定にオクルージョンマップを用いる。オクルージョンマップは、入力画像サイズと同じ解像度を持ちオクルージョン領域であるか否かを示すマップである。ここで、オクルージョン領域とは、動きベクトルの算出において終点位置にあるべき被写体(画素)が、前景の被写体に隠れて、動きベクトルの算出ができない領域のことである。以下の説明では、オクルージョンマップにおいて、“0”がオクルージョンを示し、“1”以上が非オクルージョンを示すものとする。   In the second embodiment, an occlusion map is used to determine the degree of difficulty of adding motion blur. The occlusion map is a map having the same resolution as the input image size and indicating whether or not it is an occlusion area. Here, the occlusion area is an area in which the motion vector cannot be calculated because the object (pixel) that should be at the end position in the motion vector calculation is hidden by the foreground object. In the following description, in the occlusion map, “0” indicates occlusion and “1” or more indicates non-occlusion.

オクルージョンマップの生成は、難易度算出部111が行う。本実施形態では、難易度算出部111は、CPU(プログラマブルな回路)として説明するが、同様の処理を行う回路であってもよい。図4は、オクルージョンマップを生成するマップ生成処理の例を示すフローチャートである。前述したように、オクルージョンマップは、入力画像サイズと同じ解像度を有する。第1フレームの座標(x,y)において、第2フレームから第1フレームへの動きを表現する動きベクトルを(u’(x,y),v’(x,y))とする。   The occlusion map is generated by the difficulty level calculation unit 111. In the present embodiment, the difficulty level calculation unit 111 is described as a CPU (programmable circuit), but it may be a circuit that performs similar processing. FIG. 4 is a flowchart showing an example of map generation processing for generating an occlusion map. As mentioned above, the occlusion map has the same resolution as the input image size. At the coordinates (x, y) of the first frame, the motion vector expressing the motion from the second frame to the first frame is (u '(x, y), v' (x, y)).

まず、ステップS401にて、難易度算出部111は、オクルージョンマップOcのすべての値を“0”で初期化する。次に、ステップS402にて、難易度算出部111は、画像を走査しながら、着目画素の座標(x,y)を取得する。難易度算出部111は、例えば画像の左上から、ステップS402の処理が実行される毎に右へ1画素分シフトし、1ラインの右端に達したら1つ下のラインの左端から、再度、走査を始めるようにして着目画素を設定する。   First, in step S401, the difficulty level calculation unit 111 initializes all values of the occlusion map Oc to “0”. Next, in step S402, the difficulty level calculation unit 111 acquires the coordinates (x, y) of the pixel of interest while scanning the image. For example, the difficulty level calculation unit 111 shifts from the upper left of the image to the right by one pixel each time the process of step S402 is executed, and when the right end of one line is reached, scans again from the left end of the line immediately below. The target pixel is set by starting.

ステップS403にて、難易度算出部111は、ステップS402において取得した着目画素の座標(x,y)に係る動きベクトル(u’(x,y),v’(x,y))を取得する。次に、ステップS404にて、難易度算出部111は、オクルージョンマップの座標(round(x+u’(x,y)),round(y+v’(x,y)))の値を1だけインクリメントする。すなわち、難易度算出部111は、動きベクトル(u’(x,y),v’(x,y))が算出された画素に対応するオクルージョンマップの座標の値を1増加させる。   In step S403, the difficulty level calculation unit 111 acquires the motion vector (u ′ (x, y), v ′ (x, y)) related to the coordinates (x, y) of the pixel of interest acquired in step S402. . Next, in step S404, the difficulty level calculation unit 111 increments the value of the coordinates (round (x + u '(x, y)), round (y + v' (x, y))) of the occlusion map by one. That is, the difficulty level calculation unit 111 increments the coordinate value of the occlusion map corresponding to the pixel for which the motion vector (u '(x, y), v' (x, y)) has been calculated by one.

ステップS405にて、難易度算出部111は、画像の全画素の走査が終了したか否かを判定する。例えば画像の左上から、右方向にシフトし、1ラインの右端に達したら1つ下のラインの左端から右方向に再度走査するように走査した場合には、難易度算出部111は、画像の右下の画素を着目画素とした処理が終了したか否かを判定する。難易度算出部111は、画像の全画素の走査が終了したと判定した場合にはマップ生成処理を終了し、画像の全画素の走査が終了していないと判定した場合にはステップS402へ遷移して、ステップS402以降の処理を実行する。   In step S405, the difficulty level calculation unit 111 determines whether or not scanning of all the pixels of the image has been completed. For example, when scanning is performed from the upper left of the image to the right, and when the right end of one line is reached and scanning is performed again from the left end of the line below to the right, scanning is performed by the difficulty calculation unit 111. It is determined whether or not the process of setting the lower right pixel as the pixel of interest has been completed. The difficulty level calculation unit 111 ends the map generation process when it is determined that the scanning of all the pixels of the image is completed, and transitions to step S402 when it is determined that the scanning of all the pixels of the image is not completed. Then, the processing from step S402 onward is executed.

前述したようにオクルージョン領域とは、動きベクトルの算出において終点位置にあるべき被写体(画素)が、前景被写体に隠れて、動きベクトルの算出ができない領域のことである。図4に示したようにして生成したオクルージョンマップは、値“0”が多いほど、オクルージョンが多い、つまり、正しい動きベクトルを算出できないことを示す。したがって、オクルージョンマップにおいて値“0”が多いほど、モーションブラー付与の難易度が高いと判断できる。本実施形態では、図2に示したステップS203にて、CPU102は、オクルージョンマップにおいて値“0”の数が全体の5%を超えた場合に、モーションブラー付与の難易度が高いと判断する。   As described above, the occlusion area is an area in which the motion vector cannot be calculated because the object (pixel) that should be at the end point in the motion vector calculation is hidden by the foreground object. In the occlusion map generated as shown in FIG. 4, the larger the value “0”, the more occlusion, that is, the correct motion vector cannot be calculated. Therefore, it can be determined that the greater the value “0” in the occlusion map, the higher the degree of difficulty in adding motion blur. In the present embodiment, in step S203 shown in FIG. 2, the CPU 102 determines that the degree of difficulty in providing motion blur is high when the number of values “0” in the occlusion map exceeds 5% of the whole.

前述した説明では、サブセンサーにより画像が撮像されるものとして説明したが、これに限定されるものではない。例えば、図3(b)に示すように、光信号から直接オプティカルフローを生成可能なオプティカルフローセンサー302を用いるようにしてもよい。この場合、オプティカルフロー生成部は不要となり、オプティカルフローセンサー302が生成し出力したオプティカルフローを使って、難易度算出部111は、モーションブラー付与の難易度を算出する。   In the above description, the image is captured by the sub sensor, but the present invention is not limited to this. For example, as shown in FIG. 3B, an optical flow sensor 302 that can directly generate an optical flow from an optical signal may be used. In this case, the optical flow generation unit is unnecessary, and the difficulty level calculation unit 111 calculates the difficulty level of motion blur addition using the optical flow generated and output by the optical flow sensor 302.

以上のように、オクルージョン領域の割合をモーションブラー付与の難易度とみなすことによっても、第1の実施形態と同様の効果が得られ、ユーザーは、アーティファクトの発生が抑制され、ジャーキネスの少ない滑らかな動画を視聴することが可能となる。   As described above, even when the ratio of the occlusion area is regarded as the degree of difficulty of adding motion blur, the same effect as that of the first embodiment can be obtained, and the user can suppress the occurrence of artifacts and smooth the jerkiness. It becomes possible to watch the video.

なお、サブセンサーユニット301の出力結果を利用して、第1の実施形態のように画像の相関からモーションブラー付与の難易度を算出する構成としてもよい。この場合も第1の実施形態と同様に、ユーザーは、アーティファクトの発生が抑制され、ジャーキネスの少ない滑らかな動画を視聴可能となる効果を得ることができる。このとき、サブセンサーユニット301におけるTv値は固定であるため、センサー109のTv値に依存せず、同じ画質の画像からオプティカルフローを生成することができる。そのため、センサー109のTv値が高速Tv値から低速Tv値へ切り替わる場合も、低速Tv値から高速Tv値へ切り替わる場合も、同一の撮像条件で算出したモーションブラー付与の難易度を使っての判定が可能となり、判定の安定性が高まる。   Note that the output result of the sub-sensor unit 301 may be used to calculate the difficulty level of adding motion blur from the correlation of images as in the first embodiment. Also in this case, similarly to the first embodiment, the user can obtain the effect of suppressing the occurrence of artifacts and being able to view smooth moving images with less jerkiness. At this time, since the Tv value in the sub sensor unit 301 is fixed, the optical flow can be generated from the image of the same image quality without depending on the Tv value of the sensor 109. Therefore, whether the Tv value of the sensor 109 is switched from the high-speed Tv value to the low-speed Tv value or when the low-speed Tv value is switched to the high-speed Tv value, determination using the difficulty level of motion blur addition calculated under the same imaging condition is performed. It is possible to improve the stability of the judgment.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。第3の実施形態における撮像装置の構成は、前述した第1の実施形態における撮像装置と同様であるので、その説明は省略する。以下では、第3の実施形態における撮像装置の制御において、前述した第1の実施形態と異なる点について説明する。図5は、第3の実施形態における撮像装置でのセンサー109のTv値の決定に係る制御例を示すフローチャートである。図5に示すフローチャートにおける各ステップでの動作は、撮像装置のCPU102が実行するものとする。
(Third Embodiment)
Next, a third embodiment of the present invention will be described. The configuration of the image pickup apparatus according to the third embodiment is similar to that of the image pickup apparatus according to the first embodiment described above, and thus the description thereof will be omitted. In the following, in the control of the image pickup apparatus according to the third embodiment, points different from the above-described first embodiment will be described. FIG. 5 is a flowchart showing a control example relating to determination of the Tv value of the sensor 109 in the image pickup apparatus according to the third embodiment. The operation of each step in the flowchart shown in FIG. 5 is assumed to be executed by the CPU 102 of the image pickup apparatus.

まず、ステップS501にて、CPU102は、図2に示したステップS201と同様にして、シャッタースピードが高速なTv値(高速Tv値)、及びシャッタースピードが低速なTv値(低速Tv値)を情報記憶部113から取得する。次に、ステップS502にて、CPU102は、撮像装置に設定されたモードの情報を情報記憶部113から取得する。本実施形態では、設定されたモードが、低ジャーキネス優先モード、又は鮮鋭度優先モードのいずれかのモードであるかを示す情報を取得する。なお、ステップS501、S502の処理は順不同であり、ステップS502に示す処理を行った後にステップS501に示す処理を行ってもよいし、ステップS501、S502の処理を並行して行ってもよい。   First, in step S501, the CPU 102, similar to step S201 shown in FIG. 2, obtains a Tv value with a high shutter speed (high speed Tv value) and a Tv value with a low shutter speed (low speed Tv value). It is acquired from the storage unit 113. Next, in step S502, the CPU 102 acquires information on the mode set in the imaging device from the information storage unit 113. In the present embodiment, the information indicating whether the set mode is the low jerkiness priority mode or the sharpness priority mode is acquired. Note that the processes of steps S501 and S502 are in no particular order, and the process of step S501 may be performed after the process of step S502, or the processes of steps S501 and S502 may be performed in parallel.

ここで、低ジャーキネス優先モードは、動画向けの低速なシャッタースピードで撮像を行う、ジャーキネスを抑制する低速シャッターのモードである。また、鮮鋭度優先モードは、静止画向けの高速なシャッタースピードで撮像を行う、画像の鮮鋭度を優先させる高速シャッターのモードである。モードは、予めユーザーがGUI部105を使って指定しておき、指定されたモードを示す情報が情報記憶部113に記憶されている。   Here, the low jerkiness priority mode is a mode of a low speed shutter that suppresses jerkiness by capturing an image at a low shutter speed for moving images. The sharpness priority mode is a high-speed shutter mode in which image sharpness is prioritized by capturing an image at a high shutter speed for still images. The mode is previously specified by the user using the GUI unit 105, and information indicating the specified mode is stored in the information storage unit 113.

次に、ステップS503にて、CPU102は、難易度算出部111により算出された、撮像した画像に電子的にモーションブラーを付与する際のモーションブラー付与の難易度を取得する。次に、ステップS504にて、CPU102は、ステップS503において取得したモーションブラー付与の難易度と予め定めた判断基準(しきい値)とを比較して、モーションブラー付与の難易度が低いか否かを判定する。モーションブラー付与の難易度が低いとCPU102が判定した場合にはステップS506に遷移し、モーションブラー付与の難易度が高いとCPU102が判定した場合にはステップS505に遷移する。   Next, in step S <b> 503, the CPU 102 acquires the difficulty level of motion blur addition, which is calculated by the difficulty level calculation unit 111 when electronically adding motion blur to a captured image. Next, in step S504, the CPU 102 compares the degree of difficulty of motion blur addition acquired in step S503 with a predetermined criterion (threshold value) to determine whether or not the degree of difficulty of motion blur addition is low. To judge. If the CPU 102 determines that the degree of difficulty of adding motion blur is low, the process proceeds to step S506, and if the degree of difficulty of applying motion blur is high, the process proceeds to step S505.

モーションブラー付与の難易度が高いとCPU102が判定した場合に遷移するステップS505にて、CPU102は、ステップS502において取得した情報に基づいて、モード判定を行う。設定されたモードが鮮鋭度優先モードであるとCPU102が判定した場合にはステップS506に遷移し、設定されたモードが低ジャーキネスモードであるとCPU102が判定した場合にはステップS507に遷移する。   When the CPU 102 determines that the degree of difficulty of adding motion blur is high, the CPU 102 makes a mode determination in step S505, based on the information acquired in step S502. When the CPU 102 determines that the set mode is the sharpness priority mode, the process proceeds to step S506, and when the CPU 102 determines that the set mode is the low jerkiness mode, the process proceeds to step S507.

モーションブラー付与の難易度が低い、又は設定されたモードが鮮鋭度優先モードであるとCPU102が判定した場合に遷移するステップS506にて、CPU102は、センサー109のシャッタースピードを高速Tv値に設定する。また、モーションブラー付与の難易度が高く、かつ設定されたモードが低ジャーキネスモードであるとCPU102が判定した場合に遷移するステップS507にて、CPU102は、センサー109のシャッタースピードを低速Tv値に設定する。   When the CPU 102 determines that the degree of difficulty of adding motion blur is low or the set mode is the sharpness priority mode, the CPU 102 sets the shutter speed of the sensor 109 to the high-speed Tv value in step S506. . In addition, in step S507 transitioning when the CPU 102 determines that the degree of difficulty in providing motion blur is high and the set mode is the low jerkiness mode, the CPU 102 sets the shutter speed of the sensor 109 to the low speed Tv value. Set.

前述した説明では、後処理で電子的にモーションブラーを付与することを前提に、低ジャーキネス優先モード、又は鮮鋭度優先モードをユーザーに選ばせる構成としているが、ユーザーが選択するモードは、これに限定されるものではない。例えば、さらにTv値固定モード及びAv値固定モードを加えた4つのモードから選択される構成としてもよい。Tv値固定モードは、Tv値を固定してAv値と感度が変わるモードであり、Av値固定モードは、Av値を固定してTv値と感度が変わるモードである。Tv値固定モード及びAv値固定モードが選択された場合、図5に示したフローチャートの処理は実行せず、露出の自動計算式により算出される各値を設定する。   In the above description, on the assumption that the motion blur is electronically added in the post-processing, the low jerkiness priority mode or the sharpness priority mode is configured to be selected by the user, but the mode selected by the user is It is not limited. For example, the configuration may be selected from four modes including a Tv value fixed mode and an Av value fixed mode. The Tv value fixing mode is a mode in which the Tv value is fixed and the Av value and the sensitivity are changed, and the Av value fixing mode is a mode in which the Av value is fixed and the Tv value and the sensitivity are changed. When the Tv value fixing mode and the Av value fixing mode are selected, the process of the flowchart shown in FIG. 5 is not executed and each value calculated by the automatic exposure calculation formula is set.

第3の実施形態では、難易度算出部111は、以下に示す式を利用して、モーションブラー付与の難易度を算出する。難易度算出部111は、以下の式を計算できる機能を有する回路として説明するが、CPU(プログラマブルな回路)がソフトウェア処理を行う構成のどちらであってもよい。ソフトウェア処理により実現する場合、CPU102が実行することも可能である。   In the third embodiment, the difficulty level calculation unit 111 calculates the degree of difficulty of adding motion blur using the formula shown below. The difficulty level calculation unit 111 will be described as a circuit having a function of calculating the following formula, but the CPU (programmable circuit) may perform any software processing. When it is realized by software processing, the CPU 102 can also execute it.

Figure 2020065157
Figure 2020065157

式(4)に示す関数は、2つの変数の差を比較して、差の絶対値がしきい値thより大きい場合は差の二乗を返し、そうでない場合には0を返す関数である。本実施形態では、しきい値thは3とするがこれに限定されない。ただし、入力画像の幅の0.1%〜0.5%程度が好ましい。   The function shown in Expression (4) is a function that compares the difference between two variables and returns the square of the difference when the absolute value of the difference is larger than the threshold value th, and returns 0 otherwise. In this embodiment, the threshold value th is set to 3, but is not limited to this. However, it is preferably about 0.1% to 0.5% of the width of the input image.

式(5)は、隣接画素に対応する動きベクトルの差の大きさを式(4)に示した関数を用いて算出し、それを積算して正規化する式である。式(5)における変数及び記号は、第1の実施形態での説明と同様である。式(5)によって算出される、動きベクトルの差の大きさの積算値Pが大きい場合、隣接する動きベクトルの差が大きいことを示す。一般に、オプティカルフローでは隣接する画素に対応する動きベクトルは似る(差が小さい)傾向にあるため、積算値Pが大きい場合には、画像において動きの検出に失敗している可能性が高く、被写体の動きベクトルが複雑にバラついて動きの検出が難しい。そこで、本実施形態では、ステップS504において、CPU102は、例えば積算値Pが2以下である場合、モーションブラー付与の難易度が低いと判定する。   Expression (5) is an expression in which the magnitude of the difference between motion vectors corresponding to adjacent pixels is calculated using the function shown in Expression (4), and the results are integrated and normalized. The variables and symbols in Expression (5) are the same as those described in the first embodiment. A large integrated value P of the magnitudes of the motion vector differences calculated by the equation (5) indicates that the difference between the adjacent motion vectors is large. Generally, in the optical flow, the motion vectors corresponding to adjacent pixels tend to be similar (small difference). Therefore, when the integrated value P is large, it is highly likely that motion detection in the image has failed, and It is difficult to detect the motion because the motion vector of V is complicated and varies. Therefore, in the present embodiment, in step S504, the CPU 102 determines that the degree of difficulty in adding motion blur is low, for example, when the integrated value P is 2 or less.

本実施形態のように、オプティカルフローに含まれる動きベクトルの差の大きさを計算することでも、動きのばらつき、つまり、モーションブラー付与の難易度を算出することができる。なお、動きベクトルの差の大きさを計算して、モーションブラー付与の難易度を算出する方法は、前述した例に限定されない。例えば、以下に示すような式を用いて、動きベクトルの差の大きさの積算値P’を、モーションブラー付与の難易度として算出するようにしてもよい。   By calculating the magnitude of the difference between the motion vectors included in the optical flow as in the present embodiment, it is possible to calculate the variation in motion, that is, the difficulty level of motion blur addition. The method of calculating the magnitude of the difference between the motion vectors and calculating the difficulty level of motion blur addition is not limited to the example described above. For example, the integrated value P ′ of the magnitude of the difference between the motion vectors may be calculated as the degree of difficulty of adding motion blur, using the following formula.

Figure 2020065157
Figure 2020065157

本実施形態において重要な点は、着目画素に対応する動きベクトルに対して、近傍の動きベクトルとの差の大きさを積算していることである。ただし、ここでの差の大きさとは、ノルムやノルムの累乗を示す。
また、以下に示すような式を用いてモーションブラー付与の難易度を算出するようにしてもよい。
An important point in this embodiment is that the magnitude of the difference between the motion vector corresponding to the pixel of interest and the neighboring motion vector is integrated. However, the magnitude of the difference here indicates a norm or a power of the norm.
Further, the difficulty level of adding motion blur may be calculated using the following formula.

Figure 2020065157
Figure 2020065157

式(8)では、画像全体の動きベクトルの分散、つまり、動きベクトルのばらつき具合を直接、算出する。動きベクトルのばらつきが大きい場合にも、動きの検出が難しく、モーションブラー付与の難易度が高いと判定できる。例えば、式(8)により算出される分散varが400を超えた場合には、モーションブラー付与の難易度が高いと判定できる。   In Expression (8), the variance of the motion vector of the entire image, that is, the degree of variation of the motion vector is directly calculated. Even if the variation of the motion vector is large, it is possible to determine that the motion is difficult to detect and the motion blur is difficult to apply. For example, when the variance var calculated by the equation (8) exceeds 400, it can be determined that the degree of difficulty in adding motion blur is high.

前述した第1の実施形態や第2の実施形態では、モーションブラー付与の難易度が高い場合、動画用にセンサーのシャッタースピードとして低速Tv値を設定した。しかし、ユーザーが、動画よりも静止画を優先して記録したいこともある。そこで、第3の実施形態では、ユーザーがモードを設定しておき、Tv値を決定する処理においてモード判定をする。これによって、ユーザーの判断に応じて、モーションブラー付与の難易度が高い場合に高速Tv値と低速Tv値のどちらを設定するかを選択できるようにして、利便性を高めている。この場合、第1の実施形態や第2の実施形態のように、画像の相関やオクルージョン領域の割合をモーションブラー付与の難易度とみなして、処理を行っても同様の効果を得ることができる。   In the above-described first and second embodiments, when the degree of difficulty in adding motion blur is high, the low speed Tv value is set as the shutter speed of the sensor for moving images. However, there are times when the user wants to prioritize recording of still images over moving images. Therefore, in the third embodiment, the user sets the mode in advance, and the mode is determined in the process of determining the Tv value. This makes it possible to select which of the high speed Tv value and the low speed Tv value to set when the degree of difficulty in adding motion blur is high, according to the user's judgment, thereby enhancing convenience. In this case, similar to the first and second embodiments, the same effect can be obtained even if the processing is performed by regarding the image correlation and the occlusion area ratio as the difficulty level of the motion blur addition. .

また、第3の実施形態では、動きのばらつきを計算しているが、このように動きの情報を直接解析することでも、モーションブラー付与の難易度を算出することができる。よって、ユーザーにより設定された情報を利用しなければ第1の実施形態と同様の効果を得ることができ、ユーザーが設定したモードを示す情報を利用することで、さらにユーザーの利便性も高まる。   Further, in the third embodiment, the variation in motion is calculated, but the difficulty level of motion blur can also be calculated by directly analyzing the motion information in this way. Therefore, if the information set by the user is not used, the same effect as that of the first embodiment can be obtained, and by using the information indicating the mode set by the user, the convenience for the user is further enhanced.

(本発明の他の実施形態)
本発明は、前述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサがプログラムを読み出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Embodiments of the Present Invention)
The present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program. It can also be realized by the processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

なお、前記実施形態は、何れも本発明を実施するにあたっての具体化のほんの一例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、又はその主要な特徴から逸脱することなく、様々な形で実施することができる。   It should be noted that each of the above-described embodiments is merely an example of the embodiment in carrying out the present invention, and the technical scope of the present invention should not be limitedly interpreted by these. That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

101:バス 102:CPU 103:メモリ 104:不揮発メモリ 105:GUI部 107:センサーユニット 109:センサー 110:オプティカルフロー生成部 111:難易度算出部 112:モーションブラー付与部 113:情報記憶部 301:サブセンサーユニット 302:オプティカルフローセンサー 101: bus 102: CPU 103: memory 104: non-volatile memory 105: GUI unit 107: sensor unit 109: sensor 110: optical flow generation unit 111: difficulty calculation unit 112: motion blur addition unit 113: information storage unit 301: sub Sensor unit 302: Optical flow sensor

Claims (14)

設定されるシャッタースピードで撮像する第1の撮像手段と、
連続的に撮像された画像から画像間の動きに係る情報を取得する取得手段と、
取得された前記動きに係る情報に基づいて、撮像された画像へのモーションブラー付与に係る難易度を算出する難易度算出手段と、
予め設定される判断基準に対し、算出された前記難易度が低い場合には第1のシャッタースピードで前記第1の撮像手段に撮像させ、前記難易度が高い場合には前記第1のシャッタースピードよりも低速な第2のシャッタースピードで前記第1の撮像手段に撮像させる制御手段とを有することを特徴とする撮像装置。
A first imaging means for imaging at a set shutter speed;
An acquisition unit that acquires information regarding movement between images from continuously captured images;
A difficulty level calculating means for calculating a level of difficulty related to adding motion blur to a captured image based on the acquired information related to the movement;
When the calculated difficulty level is low with respect to a preset judgment criterion, the first image pickup means takes an image at the first shutter speed, and when the calculated difficulty level is high, the first shutter speed is reached. An image pickup apparatus comprising: a control unit that causes the first image pickup unit to take an image at a second shutter speed that is slower than the above.
前記動きに係る情報は、前記連続的に撮像された画像から取得したオプティカルフローであることを特徴とする請求項1記載の撮像装置。   The image pickup apparatus according to claim 1, wherein the information related to the movement is an optical flow acquired from the continuously picked-up images. 前記制御手段は、前記判断基準に対して前記難易度が高い場合には、前記撮像装置に設定されたモードに応じたシャッタースピードで前記第1の撮像手段に撮像させることを特徴とする請求項1又は2記載の撮像装置。   The control means causes the first image capturing means to capture an image at a shutter speed according to a mode set in the image capturing device when the degree of difficulty is high with respect to the criterion. The imaging device according to 1 or 2. 前記制御手段は、設定された前記モードが低速シャッターのモードである場合には前記第2のシャッタースピードで前記第1の撮像手段に撮像させ、設定された前記モードが高速シャッターのモードである場合には前記第2のシャッタースピードよりも高速な第3のシャッタースピードで前記第1の撮像手段に撮像させることを特徴とする請求項3記載の撮像装置。   When the set mode is a low-speed shutter mode, the control unit causes the first imaging unit to capture an image at the second shutter speed, and the set mode is a high-speed shutter mode. 4. The image pickup apparatus according to claim 3, wherein the first image pickup unit takes an image at a third shutter speed that is faster than the second shutter speed. 前記難易度算出手段は、前記動きに係る情報及び撮像された画像を用いて生成された画像と対応する画像との相関を前記難易度として算出し、
前記制御手段は、算出された前記相関が前記判断基準より高い場合に前記難易度が低いと判定することを特徴とする請求項1〜4の何れか1項に記載の撮像装置。
The difficulty level calculation means calculates, as the difficulty level, a correlation between an image generated by using the information related to the movement and a captured image and a corresponding image,
The image pickup apparatus according to claim 1, wherein the control unit determines that the difficulty level is low when the calculated correlation is higher than the determination criterion.
前記難易度算出手段は、撮像された画像におけるオクルージョン領域の割合を前記難易度として算出し、
前記制御手段は、算出された前記オクルージョン領域の割合が前記判断基準より低い場合に前記難易度が低いと判定することを特徴とする請求項1〜4の何れか1項に記載の撮像装置。
The difficulty level calculation means calculates a ratio of an occlusion area in a captured image as the difficulty level,
The imaging device according to claim 1, wherein the control unit determines that the difficulty level is low when the calculated proportion of the occlusion area is lower than the determination criterion.
前記動きに係る情報は、前記連続的に撮像された画像から取得したオプティカルフローであり、
前記難易度算出手段は、前記オプティカルフローを構成する動きベクトルの差の大きさの積算値を前記難易度として算出し、
前記制御手段は、算出された前記積算値が前記判断基準より小さい場合に前記難易度が低いと判定することを特徴とする請求項1〜4の何れか1項に記載の撮像装置。
The information related to the movement is an optical flow acquired from the continuously captured images,
The difficulty level calculation means calculates, as the difficulty level, an integrated value of the magnitude of the difference between motion vectors forming the optical flow,
The image pickup apparatus according to claim 1, wherein the control unit determines that the degree of difficulty is low when the calculated integrated value is smaller than the determination criterion.
前記動きに係る情報は、前記連続的に撮像された画像から取得したオプティカルフローであり、
前記難易度算出手段は、前記オプティカルフローを構成する動きベクトルのばらつきを前記難易度として算出し、
前記制御手段は、算出された前記ばらつきが前記判断基準より小さい場合に前記難易度が低いと判定することを特徴とする請求項1〜4の何れか1項に記載の撮像装置。
The information related to the movement is an optical flow acquired from the continuously captured images,
The difficulty level calculation means calculates a variation in motion vectors forming the optical flow as the difficulty level,
The image pickup apparatus according to claim 1, wherein the control unit determines that the degree of difficulty is low when the calculated variation is smaller than the determination criterion.
前記第1のシャッタースピードで連続的に撮像された画像に、画像間の前記動きに係る情報に基づいてモーションブラーを付与する付与手段を有することを特徴とする請求項1〜8の何れか1項に記載の撮像装置。   9. The image forming apparatus according to claim 1, further comprising an adding unit that adds motion blur to images captured continuously at the first shutter speed based on information about the movement between the images. The imaging device according to the item. 前記第1の撮像手段とは独立した撮影条件で撮像する第2の撮像手段を有し、
前記取得手段は、前記第2の撮像手段により撮像された画像から画像間の動きに係る情報を取得することを特徴とする請求項1〜9の何れか1項に記載の撮像装置。
And a second image pickup unit that picks up an image under a shooting condition independent of the first image pickup unit,
The image capturing apparatus according to claim 1, wherein the acquisition unit acquires information regarding movement between images from the image captured by the second image capturing unit.
光信号から前記オプティカルフローを生成し出力するセンサーを有し、
前記難易度算出手段は、前記センサーが出力した前記オプティカルフローを用いて、前記難易度を算出することを特徴とする請求項2記載の撮像装置。
A sensor for generating and outputting the optical flow from an optical signal,
The imaging apparatus according to claim 2, wherein the difficulty level calculation means calculates the difficulty level by using the optical flow output by the sensor.
前記高速シャッターのモードは画像の鮮鋭度を優先させるモードであり、前記低速シャッターのモードは、ジャーキネスを抑制するモードであることを特徴とする請求項4記載の撮像装置。   The image pickup apparatus according to claim 4, wherein the high-speed shutter mode is a mode in which the sharpness of an image is prioritized, and the low-speed shutter mode is a mode in which jerkiness is suppressed. 設定されるシャッタースピードで撮像する撮像手段を有する撮像装置の制御方法であって、
連続的に撮像された画像から画像間の動きに係る情報を取得する取得工程と、
取得された前記動きに係る情報に基づいて、撮像された画像へのモーションブラー付与に係る難易度を算出する難易度算出工程と、
予め設定される判断基準に対し、算出された前記難易度が低い場合には第1のシャッタースピードで前記撮像手段に撮像させ、前記難易度が高い場合には前記第1のシャッタースピードよりも低速な第2のシャッタースピードで前記撮像手段に撮像させる制御工程とを有することを特徴とする撮像装置の制御方法。
A control method for an image pickup apparatus having an image pickup means for picking up an image at a set shutter speed,
An acquisition step of acquiring information relating to movement between images from continuously captured images;
A difficulty level calculating step of calculating a difficulty level related to motion blur addition to a captured image based on the acquired information related to the movement;
When the calculated difficulty level is lower than a preset criterion, the image pickup means takes an image at the first shutter speed, and when the calculated difficulty level is higher, the speed is lower than the first shutter speed. And a control step of causing the image capturing unit to capture an image at a second shutter speed.
設定されるシャッタースピードで撮像する撮像手段を有する撮像装置のコンピュータに、
連続的に撮像された画像から画像間の動きに係る情報を取得する取得ステップと、
取得された前記動きに係る情報に基づいて、撮像された画像へのモーションブラー付与に係る難易度を算出する難易度算出ステップと、
予め設定される判断基準に対し、算出された前記難易度が低い場合には第1のシャッタースピードで前記撮像手段に撮像させ、前記難易度が高い場合には前記第1のシャッタースピードよりも低速な第2のシャッタースピードで前記撮像手段に撮像させる制御ステップとを実行させるためのプログラム。
In a computer of an image pickup device having an image pickup means for picking up an image at a set shutter speed,
An acquisition step of acquiring information related to movement between images from continuously captured images;
A difficulty level calculating step of calculating a difficulty level of motion blur addition to the captured image based on the acquired information on the movement;
When the calculated difficulty level is lower than a preset criterion, the image pickup means takes an image at the first shutter speed, and when the calculated difficulty level is higher, the speed is lower than the first shutter speed. And a control step of causing the image capturing unit to capture an image at a second shutter speed.
JP2018195756A 2018-10-17 2018-10-17 Imaging apparatus, control method therefor, and program Pending JP2020065157A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018195756A JP2020065157A (en) 2018-10-17 2018-10-17 Imaging apparatus, control method therefor, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018195756A JP2020065157A (en) 2018-10-17 2018-10-17 Imaging apparatus, control method therefor, and program

Publications (1)

Publication Number Publication Date
JP2020065157A true JP2020065157A (en) 2020-04-23

Family

ID=70388438

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018195756A Pending JP2020065157A (en) 2018-10-17 2018-10-17 Imaging apparatus, control method therefor, and program

Country Status (1)

Country Link
JP (1) JP2020065157A (en)

Similar Documents

Publication Publication Date Title
JP4898761B2 (en) Apparatus and method for correcting image blur of digital image using object tracking
JP6271990B2 (en) Image processing apparatus and image processing method
JP4703710B2 (en) Apparatus and method for correcting image blur of digital image using object tracking
JP5725953B2 (en) Imaging apparatus, control method therefor, and information processing apparatus
JP6355454B2 (en) Imaging apparatus, control method therefor, program, and storage medium
KR101521441B1 (en) Image pickup apparatus, control method for image pickup apparatus, and storage medium
US9674441B2 (en) Image processing apparatus, image processing method, and storage medium
JPWO2012063449A1 (en) Imaging apparatus, imaging method, program, and integrated circuit
JP6494587B2 (en) Image processing apparatus, image processing apparatus control method, imaging apparatus, and program
JP7285791B2 (en) Image processing device, output information control method, and program
JP2018174502A (en) Imaging apparatus, image processing apparatus, control method of imaging apparatus, and program
JP2013165487A (en) Image processing apparatus, image capturing apparatus, and program
JP6037224B2 (en) Image processing apparatus, imaging apparatus, and program
JP6282133B2 (en) Imaging device, control method thereof, and control program
JP2019047336A (en) Image processing apparatus, imaging device, image processing method, and program
JP6486453B2 (en) Image processing apparatus, image processing method, and program
JP2023033355A (en) Image processing device and control method therefor
JP2018142983A (en) Image processing device and method of controlling the same, program, and storage medium
JP2020065157A (en) Imaging apparatus, control method therefor, and program
JP2015079329A (en) Image processor, image processing method and program
JP6218520B2 (en) Image processing apparatus, image processing method, and program
JP2019083407A (en) Image blur correction device and control method therefor, and imaging device
JP7409604B2 (en) Image processing device, imaging device, image processing method, program and recording medium
JP7170452B2 (en) Imaging device and its control method
JP2009049457A (en) Imaging device and program