JP2007221291A - Image processing apparatus, photographing apparatus, image processing method and control program - Google Patents

Image processing apparatus, photographing apparatus, image processing method and control program Download PDF

Info

Publication number
JP2007221291A
JP2007221291A JP2006037415A JP2006037415A JP2007221291A JP 2007221291 A JP2007221291 A JP 2007221291A JP 2006037415 A JP2006037415 A JP 2006037415A JP 2006037415 A JP2006037415 A JP 2006037415A JP 2007221291 A JP2007221291 A JP 2007221291A
Authority
JP
Japan
Prior art keywords
blur
frame
camera
amount
unit
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
JP2006037415A
Other languages
Japanese (ja)
Inventor
Kazuo Nomura
和生 野村
Jaekwan Oh
ジェクアン オー
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2006037415A priority Critical patent/JP2007221291A/en
Publication of JP2007221291A publication Critical patent/JP2007221291A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To detect the blur of a photographed image without using hardware for executing complicated arithmetic operation processing and a physical sensor etc. and to discriminate a handshake from a camera work. <P>SOLUTION: A portable video camera 1 includes a photographing unit 20 for sequentially photographing frames constituting a motion image; and a control unit 10 for acquiring a blur quantity and a blur direction for each photographed image, and determining whether the blur of the frame is caused by the handshake or by camera work in photographing. <P>COPYRIGHT: (C)2007,JPO&INPIT

Description

本発明は、画像を処理する画像処理装置、この画像処理装置の機能を具備した撮影装置、上記画像処理装置における画像処理方法、及び、制御プログラムに関する。   The present invention relates to an image processing apparatus for processing an image, a photographing apparatus having the function of the image processing apparatus, an image processing method in the image processing apparatus, and a control program.

従来、携帯型のデジタルビデオカメラや動画撮影機能が付加されたデジタルカメラ等の撮影装置においては、撮影時の手ぶれによって撮影動画に生じたぶれを補正する手ぶれ補正機能を備えたものが知られている。この手ぶれ補正機能によってぶれを補正する際にはぶれ量を検出する必要があるため、例えば、時間的に連続するフレーム間の動きベクトルを検出することでぶれ量を求める方法が採用されている(例えば、特許文献1参照)。
特開平2−117276号公報
2. Description of the Related Art Conventionally, in a photographing apparatus such as a portable digital video camera or a digital camera to which a moving image shooting function is added, there is known a device equipped with a camera shake correction function that corrects a shake generated in a moving image due to a camera shake at the time of shooting. Yes. Since it is necessary to detect the shake amount when correcting the shake by this camera shake correction function, for example, a method of obtaining the shake amount by detecting a motion vector between temporally continuous frames is adopted ( For example, see Patent Document 1).
Japanese Patent Laid-Open No. 2-117276

しかしながら、上記従来の方法では、動きベクトルを求める演算処理が非常に複雑かつ高負荷であるため、この演算処理を実行するための専用のハードウェア装置等が必要になるという問題があった。また、動きベクトルを求めることなく撮影動作のぶれの方向及びぶれ量を求めるためには、撮影装置の揺れ量を物理的に検出する物理センサを設ければ、この物理センサの検出値に基づいてぶれの方向や量を検出できる。しかしながら、この方法では物理センサを用いる必要があった。   However, the above-described conventional method has a problem in that a calculation process for obtaining a motion vector is very complicated and has a high load, so that a dedicated hardware device or the like for executing this calculation process is required. In addition, in order to obtain the blur direction and blur amount of the photographing operation without obtaining the motion vector, if a physical sensor that physically detects the shake amount of the photographing device is provided, the detection value of the physical sensor is used. The direction and amount of blur can be detected. However, this method requires the use of a physical sensor.

また、上記動画撮影時には、撮影者が撮影装置を左右に振るカメラワーク(いわゆるパニング)や撮影装置を上下にカメラワーク(いわゆるティルト)といった、撮影者が意図的に行うカメラワークが行われることがある。従って、ぶれを補正する場合に、そのぶれが手ぶれによるものか、カメラワークによるものかを切り分けることが望ましい。ところが、手ぶれとカメラワークとを切り分ける機能を実現するためには、上述した複雑な演算処理を行うハードウェア装置や、物理センサ等を用いることが必須であり、コストの低減や小型化が難しいという問題があった。   In addition, at the time of moving image shooting, camera work intentionally performed by the photographer, such as camera work (so-called panning) in which the photographer shakes the photographing apparatus left and right or camera work (so-called tilt) in which the photographing apparatus is moved up and down, may be performed. is there. Therefore, when correcting the shake, it is desirable to distinguish whether the shake is caused by camera shake or camera work. However, in order to realize the function of separating camera shake and camera work, it is essential to use the hardware device that performs the above-described complicated arithmetic processing, a physical sensor, etc., and it is difficult to reduce costs and reduce size. There was a problem.

本発明は、複雑な演算処理を実行するハードウェアや物理センサ等を用いることなく、撮影画像のぶれを検出して、手ぶれとカメラワークとを切り分けることが可能な画像処理装置、撮影装置、画像処理方法、及び、制御プログラムを提供することを目的とする。   The present invention relates to an image processing apparatus, a photographing apparatus, and an image that can detect a shake of a photographed image and separate a camera shake from a camerawork without using a hardware or a physical sensor that performs complicated arithmetic processing. It is an object to provide a processing method and a control program.

上記目的を達成するため、本発明は、動画を構成するフレームを順次取得するフレーム取得手段と、前記フレーム毎にぼけ量とぼけ方向を取得するぼけ解析手段と、前記ぼけ解析手段により取得されたぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別する判別手段と、を備えることを特徴とする画像処理装置を提供する。   To achieve the above object, the present invention provides a frame acquisition unit that sequentially acquires frames constituting a moving image, a blur analysis unit that acquires a blur amount and a blur direction for each frame, and a blur acquired by the blur analysis unit. There is provided an image processing apparatus comprising: a discriminating unit that discriminates whether the blur of the frame is caused by camera shake or camera work at the time of photographing based on the amount and the blur direction.

この構成によれば、フレーム毎にぼけ量とぼけ方向とを取得して、このぼけ量とぼけ方向とに基づいて、手ぶれによるぼけとカメラワークによるぼけとを判別するので、物理センサ等を用いることなく、手ぶれとカメラワークとを切り分けることができる。また、複数のフレーム間に跨る演算処理等の複雑で高負荷の処理を行わないため、複雑な演算処理を可能とするハードウェア装置を用いることなく実現可能である。   According to this configuration, the blur amount and the blur direction are obtained for each frame, and the blur due to the camera shake and the blur due to the camera work are discriminated based on the blur amount and the blur direction without using a physical sensor or the like. , Camera shake and camera work can be separated. In addition, since complicated and high-load processing such as arithmetic processing between a plurality of frames is not performed, the processing can be realized without using a hardware device that enables complex arithmetic processing.

本発明において、前記ぼけ解析手段は、前記フレーム中の複数の画素間における輝度の変化に基づいて、ぼけ量とぼけ方向を取得するものとしてもよい。この場合、シンプルで負荷の低い処理によって、手ぶれとカメラワークとを切り分けることができる。
また、上記構成において、前記判別手段は、前記ぼけ量が予め定められた閾値以下である場合に、前記フレームのぼけが手ぶれによるものと判別するものとしてもよい。この場合、手ぶれとカメラワークとの切り分けを、閾値を基準とした低負荷の処理によって実現できる。
さらに、上記構成において、前記判別手段は、前記ぼけ解析手段によって、予め定められた所定数以上の連続する前記フレームにおいて同一方向のぼけが検出された場合に、これらのぼけがカメラワークによるものと判別するものとしてもよい。この場合、各フレームについて取得されたぼけ量とぼけ方向に基づき、連続するフレームにおいて同一方向のぼけが検出されたか否かにより、手ぶれとカメラワークとを切り分ける。このため、シンプルで負荷の低い処理によって、複数のフレームに跨る解析を行い、的確に手ぶれとカメラワークとを切り分けることができる。
さらにまた、前記判別手段により、前記フレームのぼけが手ぶれによるものと判別された場合に、前記フレームのぼけを補正する補正手段をさらに備える構成としてもよい。この場合、手ぶれによるぼけを補正して、見やすく自然な画像を出力できる。
In the present invention, the blur analysis unit may acquire a blur amount and a blur direction based on a change in luminance between a plurality of pixels in the frame. In this case, camera shake and camera work can be separated by simple and low-load processing.
Further, in the above configuration, the determination unit may determine that the blur of the frame is caused by camera shake when the amount of blur is equal to or less than a predetermined threshold. In this case, camera shake and camera work can be separated by low-load processing based on a threshold.
Further, in the above configuration, when the blur analysis unit detects blurs in the same direction in a predetermined number of consecutive frames or more by the blur analysis unit, these blurs are caused by camera work. It may be determined. In this case, based on the blur amount and the blur direction acquired for each frame, camera shake and camera work are separated depending on whether blur in the same direction is detected in successive frames. For this reason, it is possible to perform analysis over a plurality of frames by simple and low-load processing, and to accurately distinguish between camera shake and camera work.
Still further, the image forming apparatus may further include a correcting unit that corrects the blur of the frame when the determining unit determines that the blur of the frame is caused by camera shake. In this case, it is possible to correct blur caused by camera shake and output a natural image that is easy to view.

また、上記目的を達成するために、本発明は、動画を構成するフレームを順次撮影する撮影手段と、前記フレーム毎にぼけ量とぼけ方向を取得するぼけ解析手段と、前記ぼけ解析手段により取得されたぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別する判別手段と、を備えることを特徴とする撮影装置を提供する。   In order to achieve the above object, the present invention is obtained by a photographing unit that sequentially captures frames constituting a moving image, a blur analyzing unit that acquires a blur amount and a blur direction for each frame, and the blur analyzing unit. There is provided a photographing apparatus comprising: a discriminating means for discriminating whether the blur of the frame is caused by camera shake or camera work at the time of photographing based on a blur amount and a blur direction.

また、上記目的を達成するために、本発明は、動画を構成するフレームを順次取得し、前記フレーム毎にぼけ量とぼけ方向を取得するとともに、取得したぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別すること、を特徴とする画像処理方法を提供する。   In order to achieve the above object, the present invention sequentially acquires frames constituting a moving image, acquires a blur amount and a blur direction for each frame, and based on the acquired blur amount and blur direction, Disclosed is an image processing method characterized by determining whether blur is caused by camera shake or camera work at the time of shooting.

また、上記目的を達成するために、本発明は、コンピュータを、動画を構成するフレームを順次取得するフレーム取得手段と、前記フレーム毎にぼけ量とぼけ方向を取得するぼけ解析手段と、前記ぼけ解析手段により取得されたぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別する判別手段と、して機能させることを特徴とする制御プログラムを提供する。   In order to achieve the above object, the present invention provides a computer, a frame acquisition unit that sequentially acquires frames constituting a moving image, a blur analysis unit that acquires a blur amount and a blur direction for each frame, and the blur analysis. Provided is a control program that functions as discriminating means for discriminating whether the blur of the frame is caused by camera shake or camera work at the time of shooting based on the blur amount and the blur direction acquired by the means To do.

本発明は、上述した画像処理装置、撮影装置、画像処理方法、及び制御プログラムに適用する他、上記制御プログラムを、電気通信回線を介してダウンロード可能にし、あるいは、磁気的記録媒体、光学的記録媒体、半導体記憶素子を用いた記録媒体等のコンピュータにより読み取り可能な記録媒体に記録して配布する、といった態様でも実施され得る。   In addition to being applied to the above-described image processing apparatus, photographing apparatus, image processing method, and control program, the present invention enables the control program to be downloaded via an electric communication line, or a magnetic recording medium or optical recording. The present invention can also be implemented in such a manner that the program is recorded and distributed on a computer-readable recording medium such as a recording medium using a semiconductor storage element.

上記構成によれば、物理センサ等を用いることなく、また、複雑で高負荷の演算処理を行うことなく、手ぶれとカメラワークとを切り分けることができる。   According to the above configuration, camera shake and camera work can be separated without using a physical sensor or the like and without performing complicated and high-load calculation processing.

以下、図面を参照して本発明の実施の形態について説明する。本実施の形態では、電子機器の一態様としての携帯型デジタルビデオカメラ(以下、単に「携帯型ビデオカメラ」と言う)に本発明を適用した場合について説明する。
図1は本実施の形態に係る携帯型ビデオカメラ1の構成を示すブロック図である。この携帯型ビデオカメラ1は、本発明の画像処理装置、及び撮影装置を適用したものであり、図1に示すように、制御部10、撮影部20、操作部40、リムーバブルメディア50、I/F部51及び映像出力端子52を備えている。
Embodiments of the present invention will be described below with reference to the drawings. In this embodiment, a case where the present invention is applied to a portable digital video camera (hereinafter simply referred to as a “portable video camera”) as one embodiment of an electronic device will be described.
FIG. 1 is a block diagram showing a configuration of a portable video camera 1 according to the present embodiment. This portable video camera 1 is an application of the image processing device and the photographing device of the present invention. As shown in FIG. 1, the control unit 10, the photographing unit 20, the operation unit 40, the removable media 50, the I / O An F unit 51 and a video output terminal 52 are provided.

制御部10は、携帯型ビデオカメラ1の各部を制御するフレーム取得手段、ぼけ解析手段、判別手段、及び補正手段として機能するものであり、各種プログラムの実行や演算処理をするCPU11と、このCPU11が実行する制御プログラム100や各種データを格納する書き換え可能なフラッシュROM12と、上記CPU11の演算結果や各種データを一時的に格納するためのワークエリアとして機能するRAM13と、時間をカウントするタイマ回路14とを備えている。また、上記ROM12に格納された制御プログラム100にはぶれ補正プログラム100Aが含まれており、制御部10が撮影時に当該ぶれ補正プログラム100Aを実行することで、撮影時の手ぶれの影響を排して、ぶれのない動画表示を実現する。また、ぶれ補正プログラム100Aを含む制御プログラム100を実行する制御部10は、コンピュータとして機能する。   The control unit 10 functions as a frame acquisition unit, a blur analysis unit, a determination unit, and a correction unit that control each unit of the portable video camera 1, and includes a CPU 11 that executes various programs and performs arithmetic processing, and the CPU 11 A rewritable flash ROM 12 storing various control data and various data, a RAM 13 functioning as a work area for temporarily storing calculation results and various data of the CPU 11, and a timer circuit 14 for counting time And. The control program 100 stored in the ROM 12 includes a shake correction program 100A, and the control unit 10 executes the shake correction program 100A at the time of shooting to eliminate the influence of camera shake at the time of shooting. , Realize motion-free video display. Further, the control unit 10 that executes the control program 100 including the shake correction program 100A functions as a computer.

この制御プログラム100は、例えばCD−ROM、DVD−ROM、フレキシブルディスク、半導体記憶素子を用いた可搬型メモリ等のコンピュータ読み取り可能な記録媒体60に記録して配布することが可能である。さらに、パーソナルコンピュータと携帯型ビデオカメラ1とを通信可能にケーブル等で接続し、パーソナルコンピュータで読み取られた記録媒体60の制御プログラム100を携帯型ビデオカメラ1に出力することで、フラッシュROM12に制御プログラム100を格納することも可能である。   The control program 100 can be recorded and distributed on a computer-readable recording medium 60 such as a portable memory using a CD-ROM, DVD-ROM, flexible disk, or semiconductor storage element. Further, the personal computer and the portable video camera 1 are communicably connected by a cable or the like, and the control program 100 of the recording medium 60 read by the personal computer is output to the portable video camera 1 so that the flash ROM 12 is controlled. It is also possible to store the program 100.

撮影部20は、被写体を動画として撮影する撮影手段として機能するものであり、カメラコントロール回路21、撮影カメラ22、撮影部RAM23及び表示パネル24を備えている。カメラコントロール回路21は、制御部10の制御の下、撮影部20の各部を制御する。また、撮影カメラ22は、被写体が撮像されたフレームのデータ(以下、単に「フレーム」と言う)をカメラコントロール回路21に所定のサンプリングレートで順次出力するものであり、CCDやCMOS等の光電変換素子がマトリクス状あるいはハニカム状に配置されてなるイメージセンサ、複数の光学レンズを有してなる光学レンズ系、この光学レンズ系を駆動してズーム・フォーカスや絞り等を実現するためのレンズ駆動装置、イメージセンサによって取得されたアナログ信号の画像をデジタル信号に変換して画像データを出力するA/D変換回路等を備えて構成される。ここで、撮影カメラ22が備える上記イメージセンサの受光素子数(いわゆる画素数)、及び有効画素数については任意である。撮影部20により撮影される動画は、例えば1秒あたり30フレーム(30fps)の連続する複数の静止画像の集合として記録され、フレーム毎に画像処理を施すことが可能である。   The photographing unit 20 functions as photographing means for photographing a subject as a moving image, and includes a camera control circuit 21, a photographing camera 22, a photographing unit RAM 23, and a display panel 24. The camera control circuit 21 controls each unit of the photographing unit 20 under the control of the control unit 10. The photographing camera 22 sequentially outputs frame data (hereinafter simply referred to as “frame”) in which the subject is imaged to the camera control circuit 21 at a predetermined sampling rate. An image sensor in which elements are arranged in a matrix or honeycomb, an optical lens system having a plurality of optical lenses, and a lens driving device for driving the optical lens system to achieve zooming, focusing, a diaphragm, etc. An analog signal image acquired by the image sensor is converted into a digital signal, and an A / D conversion circuit that outputs image data is provided. Here, the number of light receiving elements (so-called number of pixels) and the number of effective pixels of the image sensor included in the photographing camera 22 are arbitrary. A moving image shot by the shooting unit 20 is recorded as a set of a plurality of continuous still images of 30 frames per second (30 fps), for example, and image processing can be performed for each frame.

撮影部RAM23はフレームを一時的に格納するバッファとして機能する。また、表示パネル24は撮影された動画や設定画面等の各種情報を表示する機能を有し、例えば液晶ディスプレイパネルや有機ELパネル等のフラットディスプレイパネルにより構成される。リムーバブルメディア50は、撮影時の動画データを格納する記録メディアであり、例えばビデオテープ、記録可能な光学ディスク、リムーバブルハードディスクにより構成されている。
このような構成の下、撮影カメラ22から出力されたフレームはカメラコントロール回路21によって所定の画像処理がなされた後、撮影部RAM23に一時的に格納され、また、制御部10を介してリムーバブルメディア50に動画データとして順次格納される。撮像部RAM23に格納されたフレームは表示パネル24に表示する際に用いられ、また、リムーバブルメディア50に格納された動画データは撮影後に撮影動画を表示(再生)する際に用いられる。
The photographing unit RAM 23 functions as a buffer for temporarily storing frames. Further, the display panel 24 has a function of displaying various information such as a captured moving image and a setting screen, and is configured by a flat display panel such as a liquid crystal display panel or an organic EL panel, for example. The removable medium 50 is a recording medium for storing moving image data at the time of shooting, and includes, for example, a video tape, a recordable optical disk, and a removable hard disk.
Under such a configuration, the frame output from the photographing camera 22 is subjected to predetermined image processing by the camera control circuit 21 and then temporarily stored in the photographing unit RAM 23, and is also removable media via the control unit 10. 50 are sequentially stored as moving image data. The frame stored in the imaging unit RAM 23 is used when displayed on the display panel 24, and the moving image data stored in the removable medium 50 is used when displaying (reproducing) the captured moving image after shooting.

操作部40は、ユーザによって操作される複数の操作子を有し、例えば電源ボタンや撮影開始/終了等の各種指示を入力するための操作キーを有している。I/F部51は携帯型ビデオカメラ1をパーソナルコンピュータとケーブル等で通信可能に接続するためのインターフェースであり、リムーバブルメディア50に格納された動画データをパーソナルコンピュータに出力する際には当該動画データがI/F部51を介してパーソナルコンピュータに出力される。映像出力端子52は、テレビやプロジェクタなどの外部ディスプレイ装置に動画の映像信号を出力するための端子である。なお、携帯型ビデオカメラ1は、上述の構成要素の他にも、音声信号を取り込み記録・再生するためのオーディオ回路や、音声信号を外部スピーカや外部アンプ等に出力するための音声出力端子などを備えて構成されている。   The operation unit 40 includes a plurality of operation elements operated by the user, and includes operation keys for inputting various instructions such as a power button and shooting start / end, for example. The I / F unit 51 is an interface for connecting the portable video camera 1 to a personal computer through a cable or the like so that the video data stored in the removable medium 50 can be output to the personal computer. Is output to the personal computer via the I / F unit 51. The video output terminal 52 is a terminal for outputting a video signal of a moving image to an external display device such as a television or a projector. In addition to the above-described components, the portable video camera 1 includes an audio circuit for capturing and recording / reproducing audio signals, an audio output terminal for outputting audio signals to an external speaker, an external amplifier, and the like. It is configured with.

そして、携帯型ビデオカメラ1は、フラッシュROM12に格納されたぶれ補正プログラム100Aを実行することにより、撮影部20により撮影されたフレームからぶれのない出力用画像を作成するぶれ補正処理を実行する。   Then, the portable video camera 1 executes a shake correction process for creating a blur-free output image from the frames shot by the shooting unit 20 by executing the shake correction program 100A stored in the flash ROM 12.

図2は、携帯型ビデオカメラ1によるぶれ補正の概要を示す図である。
図2(A)に示すように、携帯型ビデオカメラ1の撮影時に手ぶれが発生すると、被写体と撮影対象範囲との相対位置が移動する。従って、撮影されたフレーム中で被写体が不自然に動くことになり、画像が見難くなる。
ここで、撮影部20により撮影されたフレーム70は、携帯型ビデオカメラ1から映像出力端子52等を介して出力される画像よりも多くの画素からなる画像となっており、制御部10は、撮影されたフレーム70の一部をトリミングした画像を生成して、この画像を出力する。このトリミングする領域を、出力部71とする。
フレーム70のうち出力部71としてトリミングする位置は移動可能であり、上記ぶれ補正処理において、制御部10は、撮影時に手ぶれが発生した場合は、ぶれの方向及び量に合わせて、出力部71の位置を変えることで、手ぶれの影響を軽減する処理を行う。
FIG. 2 is a diagram showing an outline of blur correction by the portable video camera 1.
As shown in FIG. 2A, when camera shake occurs during shooting with the portable video camera 1, the relative position of the subject and the shooting target range moves. Therefore, the subject moves unnaturally in the captured frame, making it difficult to see the image.
Here, the frame 70 photographed by the photographing unit 20 is an image having more pixels than the image output from the portable video camera 1 via the video output terminal 52 or the like. An image obtained by trimming a part of the photographed frame 70 is generated, and this image is output. The area to be trimmed is an output unit 71.
The position to be trimmed as the output unit 71 in the frame 70 is movable. In the shake correction process, the control unit 10 determines whether the output unit 71 has the direction and amount of shake in accordance with the direction and amount of the shake when the camera shake occurs. By changing the position, processing to reduce the effects of camera shake is performed.

すなわち、携帯型ビデオカメラ1は、図2(B)に示すように、撮影部20により撮影されたフレーム70から、出力部71をトリミングして出力画像とする。フレーム70における出力部71の位置は、初期状態ではフレーム70の中央位置であるが、この初期状態から任意に変更できる。このため、撮影時に手ぶれが発生してフレーム70に写る被写体が移動した場合には、図2(C)に示すように、手ぶれによる移動を補償するように、ぶれの方向と逆向きに出力部71を移動させてトリミングする。この処理により、図2(D)に示すように、被写体の位置がぶれ発生の前と変わらない補正画像72が得られる。
このように、ぶれ補正処理によれば、手ぶれによるフレーム70の移動(フレーム70中における被写体の見かけ上の移動)が、出力部71の移動によって相殺され、手ぶれの影響を解消できる。
That is, as shown in FIG. 2B, the portable video camera 1 trims the output unit 71 from the frame 70 photographed by the photographing unit 20 to obtain an output image. The position of the output unit 71 in the frame 70 is the center position of the frame 70 in the initial state, but can be arbitrarily changed from this initial state. For this reason, when camera shake occurs at the time of shooting and the subject in the frame 70 moves, as shown in FIG. 2C, the output unit reverses the direction of the camera shake so as to compensate for the movement due to camera shake. 71 is moved for trimming. By this processing, as shown in FIG. 2D, a corrected image 72 is obtained in which the position of the subject is the same as before the occurrence of blurring.
Thus, according to the shake correction process, the movement of the frame 70 due to camera shake (apparent movement of the subject in the frame 70) is canceled by the movement of the output unit 71, and the influence of camera shake can be eliminated.

図3は、ぶれによるフレームの変化の一例を示す図であり、(A)はぶれなく撮影されたフレームを、(B)は撮影時にぶれが生じたフレームを示す。
図3(A)に示すように、ぶれがないフレームでは丸く写る被写体は、ぶれが生じたフレームでは、図3(B)に示すように拡がった形状に写る。この拡がりの方向及び形状はぶれの方向によって異なり、図3(B)の被写体は図中左側に尾を引くように写っているので、この逆側、すなわち右側に携帯型ビデオカメラ1が動いたことがわかる。
FIGS. 3A and 3B are diagrams showing an example of a change in the frame due to blur. FIG. 3A shows a frame shot without blur, and FIG. 3B shows a frame where blur occurs during shooting.
As shown in FIG. 3A, a subject that appears round in a frame without blurring appears in a widened shape as shown in FIG. 3B in a frame in which blurring occurs. The direction and shape of the spread differ depending on the blur direction, and the subject of FIG. 3 (B) appears to have a tail on the left side in the figure, so the portable video camera 1 has moved to the opposite side, that is, the right side. I understand that.

図4は、ぼけのないフレームの例であり、(A)はフレームの一部を示し、(B)は図4(A)中のP−P´間における輝度の変化を模式的に示す。また、図5は、ぼけが生じたフレームの例であり、(A)はフレームの一部を示し、(B)は図5(A)中のQ−Q´間における輝度の変化を模式的に示す。   FIG. 4 is an example of a frame without blur, (A) shows a part of the frame, and (B) schematically shows a change in luminance between PP 'in FIG. 4 (A). FIG. 5 is an example of a frame in which blur occurs, (A) shows a part of the frame, and (B) schematically shows a change in luminance between Q-Q ′ in FIG. 5 (A). Shown in

図4(A)に例示するフレームでは、高輝度部分75と低輝度部分(背景)76との境界が明瞭である。この高輝度部分75と低輝度部分76との境界では、図4(B)に示すように、隣接する画素の輝度が極端に変化する。
これに対し、ぼけが生じたフレームでは、図5(A)に示すように高輝度部分75と背景76との境界が拡がってしまい、中程度の輝度の画素が複数発生する。これらの画素では、図5(B)に示すように、複数の画素に跨って輝度がゆるやかに変化している。この図5(B)中に符号Wで示す幅は、ぼけのないフレームでは画素間の境界としてしか存在しない部分であり、幅Wはぼけによって拡がった量を示す。以下、幅Wで示す拡がりの量を、ぼけ量と呼ぶ。
In the frame illustrated in FIG. 4A, the boundary between the high luminance portion 75 and the low luminance portion (background) 76 is clear. At the boundary between the high luminance portion 75 and the low luminance portion 76, as shown in FIG. 4B, the luminance of adjacent pixels changes extremely.
On the other hand, in the blurred frame, the boundary between the high luminance portion 75 and the background 76 is expanded as shown in FIG. 5A, and a plurality of pixels with medium luminance are generated. In these pixels, as shown in FIG. 5B, the luminance gradually changes across a plurality of pixels. The width indicated by the symbol W in FIG. 5B is a portion that exists only as a boundary between pixels in a non-blurred frame, and the width W indicates the amount expanded by the blur. Hereinafter, the amount of spread indicated by the width W is referred to as a blur amount.

制御部10は、撮影部20によって動画を構成するフレームが順次撮影されると、これらフレーム毎に、幅Wで示すぼけ量を求める。このぼけ量は、例えば、予め定められたフレーム中の1または複数の箇所において、隣接する画素の輝度の差を比較して、像の縁(エッジ)がぼけによって拡がった箇所を特定し、この拡がりの幅を求めることで取得できる。さらに、制御部10は、ぼけ量とともにぼけの方向を求める。ぼけの方向を求める処理は、例えば、上記のように像のエッジがぼけによって拡がった箇所を特定した後、その箇所における輝度の変化の方向、すなわち拡がりの方向を求めることで取得できる。ここで拡がりの方向を求めるにあたっては、例えば、輝度の変化のパターンを予め記憶しておき、このパターンと、フレーム中の1または複数の箇所における輝度の変化とを対照することで行ってもよい。なお、例えば処理対象のフレームについてシャープネス(先鋭度)を求め、この先鋭度に基づいてぼけ量を求めるようにしてもよい。   When the frames constituting the moving image are sequentially shot by the shooting unit 20, the control unit 10 obtains the blur amount indicated by the width W for each frame. For example, the blur amount is determined by comparing the luminance difference between adjacent pixels at one or a plurality of positions in a predetermined frame, and specifying a position where the edge (edge) of the image is expanded by blur. It can be obtained by finding the width of the spread. Further, the control unit 10 obtains the blur direction together with the blur amount. The process for obtaining the direction of blur can be obtained, for example, by identifying a location where the edge of the image has been expanded due to blur as described above and then determining the direction of change in luminance at that location, that is, the direction of expansion. Here, when the direction of expansion is obtained, for example, a pattern of change in luminance may be stored in advance, and this pattern may be compared with the change in luminance at one or more locations in the frame. . For example, the sharpness (sharpness) may be obtained for the processing target frame, and the blur amount may be obtained based on the sharpness.

図6は、携帯型ビデオカメラの動きとぼけ量との相関を示す図表であり、(A)は携帯型ビデオカメラの動作速度を示し、(B)はぼけ量を示す。
この図6(A)において、縦軸は携帯型ビデオカメラの特定方向における速度であり、縦軸で0(零)は速度ゼロ、「+」と「−」は速度の向きを示す。また、図6(B)の縦軸は撮影画像中の特定方向におけるぼけ量を示し、縦軸で0(零)はぼけ量ゼロ、「+」と「−」は、ぼけの向きを示す。また、図6(A)及び(B)の図表において横軸は時間の経過を示す。
FIG. 6 is a chart showing the correlation between the movement of the portable video camera and the amount of blur, (A) shows the operating speed of the portable video camera, and (B) shows the amount of blur.
In FIG. 6A, the vertical axis indicates the speed in a specific direction of the portable video camera, and on the vertical axis, 0 (zero) indicates zero speed, and “+” and “−” indicate the direction of the speed. In addition, the vertical axis in FIG. 6B indicates the amount of blur in a specific direction in the photographed image. On the vertical axis, 0 (zero) indicates zero blur, and “+” and “−” indicate the direction of blur. In the charts of FIGS. 6A and 6B, the horizontal axis indicates the passage of time.

撮影中の携帯型ビデオカメラ1の動きには、撮影者の手ぶれによる動きと、カメラワーク(パニング、ティルト等)による動きがある。このうち、手ぶれにより生じたぼけは補正する方が望ましいが、カメラワークにより生じたぼけは補正しないことが好ましい。
そこで、携帯型ビデオカメラ1は、フレームにおけるぼけ量とぼけの方向に基づいて、ぼけの原因を区別する。
例えば、図6(A)中に符号T1で示す期間、携帯型ビデオカメラ1の動く方向(+、−)は頻繁に変化している。これは、撮影時の手ぶれによる動きの特徴である。
これに対し、図6(A)にT2で示す期間では、同一方向(+)の動きが比較的長時間続いている。また、図6(A)にT3で示す期間においても、同一方向(−)の動きが比較的長時間続いている。さらに、期間T2、T3のいずれにおいても、期間T1に比べて速度の大きさが極めて大きい。これは、カメラワークによる携帯型ビデオカメラ1の動きの特徴である。
これに対応して、図6(B)に示す期間T1のぼけ量は、ぼけの方向(+、−)が頻繁に入れ替わっている。一方、期間T2におけるぼけ量は、同一方向(+)のぼけが連続して発生し、期間T3においても、同一方向(−)のぼけが連続して発生している。さらに、期間T2、T3のいずれにおいても、期間T1に比べてぼけ量が明らかに大きい。図6(B)に示すように、ぼけ量の大きさについて閾値TH+、TH−を設定すると、期間T1のぼけ量は閾値TH+〜TH−の間に収まり、期間T2、T3のぼけは閾値TH+又はTH−を大きく超える。
The movement of the portable video camera 1 during shooting includes movement due to camera shake of the photographer and movement due to camera work (panning, tilt, etc.). Of these, it is desirable to correct blur caused by camera shake, but it is preferable not to correct blur caused by camera work.
Therefore, the portable video camera 1 distinguishes the cause of the blur based on the blur amount and the blur direction in the frame.
For example, the moving direction (+, −) of the portable video camera 1 frequently changes during the period indicated by the symbol T1 in FIG. This is a feature of movement caused by camera shake during shooting.
On the other hand, in the period indicated by T2 in FIG. 6A, the movement in the same direction (+) continues for a relatively long time. Further, in the period indicated by T3 in FIG. 6A, the movement in the same direction (−) continues for a relatively long time. Further, in both the periods T2 and T3, the speed is extremely large as compared with the period T1. This is a feature of the movement of the portable video camera 1 by camera work.
Correspondingly, the blur amount in the period T1 shown in FIG. 6B is frequently switched in the blur direction (+, −). On the other hand, the blur amount in the period T2 is continuously blurred in the same direction (+), and the blur in the same direction (−) is continuously generated in the period T3. Furthermore, the amount of blur is clearly greater in both periods T2 and T3 than in period T1. As shown in FIG. 6B, when the threshold values TH + and TH− are set for the magnitude of the blur amount, the blur amount in the period T1 falls between the threshold values TH + to TH−, and the blur in the periods T2 and T3 is the threshold value TH +. Or greatly exceeds TH-.

まとめると、手ぶれによって生じるぼけは、カメラワークによるぼけよりもぼけ量が小さいので、例えば閾値を用いて、ぼけ量の大小を判別することで、手ぶれとカメラワークを切り分けることができる。
また、連続する複数のフレームで同一方向のぼけが発生していれば、カメラワークにより生じるぼけであるといえるので、例えば同一方向のぼけが発生したフレームの数を基準として、手ぶれとカメラワークを切り分けることができる。
つまり、手ぶれとカメラワークとを判別する基準としては、次の2つの情報を用いることができる。
I.ぼけ量の閾値
II.連続して同一方向のぼけが発生したフレームの数
In summary, the blur caused by camera shake has a smaller blur amount than the blur due to camera work. For example, by determining the magnitude of the blur amount using a threshold value, the camera shake and the camera work can be separated.
In addition, if blur in the same direction occurs in a plurality of consecutive frames, it can be said that the blur is caused by camera work.For example, camera shake and camera work are determined based on the number of frames in which blur in the same direction occurs. Can be carved.
That is, the following two pieces of information can be used as a reference for discriminating camera shake and camera work.
I. Threshold of blur amount
II. The number of frames that have consecutive blurs in the same direction

図7は、携帯型ビデオカメラ1の動きとフレームとの関係を示す説明図である。図中、αは画角[rad]を示し、Lは焦点距離を示し、βは携帯型ビデオカメラ1が動いた移動角度[rad]を示し、xはぼけ量を示す。
この図7には、携帯型ビデオカメラ1の3次元的な動作のうち、特定方向に延びる軸を中心とした動きを抽出したものであり、携帯型ビデオカメラ1の動きを、上記軸を中心とした回動として表す。ここで、携帯型ビデオカメラ1が角度βだけ回動すると、この場合のぼけ量xは、下記式(1)のように表される。
x=L{1+tan2(α/2)}β ・・・(1)
FIG. 7 is an explanatory diagram showing the relationship between the movement of the portable video camera 1 and the frame. In the figure, α indicates the angle of view [rad], L indicates the focal length, β indicates the movement angle [rad] that the portable video camera 1 has moved, and x indicates the amount of blur.
FIG. 7 shows the movement of the portable video camera 1 centered on an axis extending in a specific direction out of the three-dimensional movement of the portable video camera 1. The movement of the portable video camera 1 is centered on the axis. This is expressed as rotation. Here, when the portable video camera 1 is rotated by an angle β, the blur amount x in this case is expressed by the following equation (1).
x = L {1 + tan 2 (α / 2)} β (1)

この式(1)に基づいて、携帯型ビデオカメラ1が−θ°〜+θ°の範囲で回動した場合におけるぼけ量Xを求めると、その計算式は下記式(2)のようになる。
X=L{1+tan2(α/2)}{2θ×π/180} ・・・(2)
一般に、撮影時の手ぶれによって携帯型ビデオカメラ1が回動する角度は、±2°の範囲内であるとされている。従って、上記式(2)においてθ=2とした場合のぼけ量Xを、手ぶれとカメラワークを切り分ける基準として用いることができる。
但し、携帯型ビデオカメラ1の動く速度によっては、ぼけ量Xが、複数のフレームに跨って現れることがある。この場合、1フレームあたりのぼけ量Eは、下記式(3)により求められる。
E=X/(N×T) ・・・(3)
Tは携帯型ビデオカメラ1が動いた時間[秒]。
Nは撮影時のフレームレート[fps(フレーム/秒)]。
このように、携帯型ビデオカメラ1が、例えば±2°の範囲で動いた場合の1フレームあたりのぼけ量Eを求めて、ぼけ量の閾値とすることができる。
Based on this equation (1), when the blur amount X is obtained when the portable video camera 1 is rotated in the range of -θ ° to + θ °, the calculation equation is as shown in the following equation (2).
X = L {1 + tan 2 (α / 2)} {2θ × π / 180} (2)
Generally, the angle at which the portable video camera 1 rotates due to camera shake at the time of shooting is assumed to be within a range of ± 2 °. Therefore, the blur amount X when θ = 2 in the above formula (2) can be used as a reference for separating camera shake and camera work.
However, depending on the moving speed of the portable video camera 1, the blur amount X may appear across a plurality of frames. In this case, the blur amount E per frame is obtained by the following equation (3).
E = X / (N × T) (3)
T is the time [seconds] that the portable video camera 1 moved.
N is a frame rate [fps (frame / second)] at the time of shooting.
As described above, the blur amount E per frame when the portable video camera 1 moves in a range of ± 2 °, for example, can be obtained and used as a threshold for the blur amount.

また、連続して同一方向のぼけが発生したフレームの数は、次のように求める。
時間T[秒]あたりのフレーム数Dは、撮影時のフレームレートN[fps]に基づき、下記式(4)のように求められる。
D=N×T ・・・(4)
一般に、手ぶれによる携帯型ビデオカメラ1の同一方向の動きは0.3秒以内で収束するとされている。従って、携帯型ビデオカメラ1が動く方向が概ね0.3秒以内で変化した場合は、手ぶれによる動きであるといえる。逆に言えば、携帯型ビデオカメラ1の動く方向が、0.3秒を超えて変化しなければ、カメラワークによる携帯型ビデオカメラ1の動きであるといえる。
例えばフレームレートが15[fps]の場合、0.3秒間に撮影されるフレーム数は、上記式(4)によりD=15×0.3=4.5と求められる。従って、4.5を超える数のフレームにおいて、同一方向のぼけが発生した場合には、カメラワークによって生じたぼけであると判別できる。
このように、携帯型ビデオカメラ1が、例えば0.3秒間、同一方向に動いた場合に同一方向のぼけが発生するフレームの数Dを求めて、フレーム数の閾値とすることができる。ここで、フレーム数は常に整数であるから閾値となるフレーム数Dも整数であることが好ましい。このため、上記式(4)により求められたフレーム数Dが小数であった場合は切り上げを行い、例えば上記のようにD=4.5の場合、閾値のフレーム数は5に設定するとよい。
以上のように求められる閾値としてのぼけ量E及びフレーム数Dは、上記ぶれ補正処理を実行するにあたって、予めフラッシュROM12に格納されている。
Further, the number of frames in which blurring in the same direction has occurred continuously is obtained as follows.
The number of frames D per time T [seconds] is obtained as shown in the following equation (4) based on the frame rate N [fps] at the time of shooting.
D = N × T (4)
In general, movement in the same direction of the portable video camera 1 due to camera shake converges within 0.3 seconds. Therefore, if the direction in which the portable video camera 1 moves changes within approximately 0.3 seconds, it can be said that the movement is due to camera shake. In other words, if the moving direction of the portable video camera 1 does not change over 0.3 seconds, it can be said that the movement of the portable video camera 1 is due to camera work.
For example, when the frame rate is 15 [fps], the number of frames captured in 0.3 seconds is obtained as D = 15 × 0.3 = 4.5 by the above equation (4). Therefore, when blurs in the same direction occur in frames exceeding 4.5, it can be determined that the blur is caused by camera work.
Thus, for example, when the portable video camera 1 moves in the same direction for 0.3 seconds, the number D of frames in which blur in the same direction occurs can be obtained and used as a threshold value for the number of frames. Here, since the number of frames is always an integer, the threshold number of frames D is preferably an integer. For this reason, when the number of frames D obtained by the above equation (4) is a decimal number, rounding up is performed. For example, when D = 4.5 as described above, the threshold number of frames may be set to 5.
The blur amount E and the frame number D as threshold values obtained as described above are stored in advance in the flash ROM 12 when the blur correction process is executed.

図8は、携帯型ビデオカメラ1において実行されるぶれ補正処理を示すフローチャートである。この図8に示すぶれ補正処理は、CPU11により、フラッシュROM12に格納されたぶれ補正プログラム100Aを読み出して実行することにより、実現される。
このぶれ補正処理は、携帯型ビデオカメラ1の撮影中に、撮影されたフレームにおけるぼけの発生を検出し、このぼけが手ぶれによるものか、カメラワークによるものかを判別し、手ぶれによるぼけである場合には補正を行って補正画像を出力し、カメラワークによるぼけである場合は補正を行わずに画像を出力する処理である。
FIG. 8 is a flowchart showing a shake correction process executed in the portable video camera 1. The shake correction process shown in FIG. 8 is realized by the CPU 11 reading and executing the shake correction program 100A stored in the flash ROM 12.
This blur correction process is a blur caused by camera shake by detecting the occurrence of blur in the shot frame during shooting by the portable video camera 1 and determining whether the blur is caused by camera shake or camera work. In this case, correction is performed and a corrected image is output, and in the case of blur due to camera work, the image is output without correction.

ぶれ補正処理が開始されると(ステップS11)、CPU11は、予めフラッシュROM12に格納された閾値としてのぶれ量E及びフレーム数Dを読み出して、本処理に係る閾値として設定し、RAM13に格納する(ステップS12)。さらに、CPU11は、同一方向カウンタを設定し、このカウント値を1としてRAM13に格納する(ステップS13)。この同一方向カウンタは、連続する複数のフレームにおいて同一方向のぼけが生じた場合に、そのフレーム数をカウントするカウンタである。   When the blur correction process is started (step S11), the CPU 11 reads the blur amount E and the frame number D as the threshold values stored in advance in the flash ROM 12, sets them as the threshold values for this process, and stores them in the RAM 13. (Step S12). Furthermore, the CPU 11 sets the same direction counter, stores this count value as 1 in the RAM 13 (step S13). The same direction counter is a counter that counts the number of frames when blurring in the same direction occurs in a plurality of consecutive frames.

続いて、CPU11は、撮影部20により撮影されたフレームについて、ぼけ量とぼけ方向とを求め(ステップS14)、求めたぼけ方向が、前回撮影部20により撮影されたフレームにおけるぼけ方向と同一か否かを判別する(ステップS15)。ここで、求めたぼけ方向が前のフレームにおけるぼけ方向と同じであった場合(ステップS15;Yes)、CPU11は、RAM13に格納した同一方向カウンタのカウント値を+1する(ステップS16)。一方、ステップS14でぼけ量とぼけ方向とを求めたフレームが最初のフレームである場合、及び、前のフレームとはぼけ方向が異なっている場合(ステップS15;No)、CPU11はRAM13に格納した同一方向カウンタのカウント値を1にセットする(ステップS17)。   Subsequently, the CPU 11 obtains a blur amount and a blur direction for the frame photographed by the photographing unit 20 (step S14), and whether the obtained blur direction is the same as the blur direction in the frame photographed by the previous photographing unit 20 or not. Is determined (step S15). Here, when the obtained blur direction is the same as the blur direction in the previous frame (step S15; Yes), the CPU 11 increments the count value of the same direction counter stored in the RAM 13 by 1 (step S16). On the other hand, if the frame for which the blur amount and the blur direction are obtained in step S14 is the first frame, and if the blur direction is different from the previous frame (step S15; No), the CPU 11 stores the same stored in the RAM 13. The count value of the direction counter is set to 1 (step S17).

その後、CPU11は、ステップS12で設定した閾値としてのフレーム数Dと、RAM13に格納した同一方向カウンタのカウント値とを比較する(ステップS18)。ここで、カウント値がフレーム数Dより小さい場合(ステップS18;No)、CPU11は、ステップS14で算出したぼけ量が、ステップS12で設定した閾値としてのぼけ量E以下であるか否かを判別する(ステップS19)。そして、算出したぼけ量がぼけ量E以下であった場合には(ステップS19;Yes)、手ぶれによるぼけが発生していることになるから、CPU11は、フレームのぶれを補正する処理を行う。すなわち、フレーム70(図2)において出力部71(図2)を移動させる量(補正量)を求め(ステップS20)、この補正量に基づく位置で出力部71をトリミングして補正画像を作成し、出力する(ステップS21)。その後、CPU11はステップS23に移行する。   Thereafter, the CPU 11 compares the number of frames D as the threshold set in step S12 with the count value of the same direction counter stored in the RAM 13 (step S18). Here, when the count value is smaller than the frame number D (step S18; No), the CPU 11 determines whether or not the blur amount calculated in step S14 is equal to or less than the blur amount E as the threshold set in step S12. (Step S19). If the calculated blur amount is equal to or less than the blur amount E (step S19; Yes), blur due to camera shake has occurred, and thus the CPU 11 performs a process of correcting the blur of the frame. That is, an amount (correction amount) for moving the output unit 71 (FIG. 2) in the frame 70 (FIG. 2) is obtained (step S20), and the output unit 71 is trimmed at a position based on this correction amount to create a corrected image. Are output (step S21). Thereafter, the CPU 11 proceeds to step S23.

また、ステップS18でカウント値がフレーム数D以上である場合、すなわち、フレーム数D以上の連続するフレームにおいて、同一方向のぼけが発生している場合は、CPU11は、フレーム70上の所定の位置にある出力部71をトリミングして撮影画像として出力し(ステップS22)、ステップS23に移行する。
さらに、ステップS19でぼけ量が閾値Eを超える場合、CPU11は、上述のステップS22に移行する。
そして、ステップS23において、CPU11は、撮影終了か否かを判別し、撮影が継続される場合はステップS15に戻り、撮影が終了される場合は本処理を終了する。
If the count value is greater than or equal to the number of frames D in step S18, that is, if blurring in the same direction has occurred in consecutive frames greater than or equal to the number of frames D, the CPU 11 The output unit 71 is trimmed and output as a captured image (step S22), and the process proceeds to step S23.
Furthermore, when the amount of blur exceeds the threshold value E in step S19, the CPU 11 proceeds to step S22 described above.
In step S23, the CPU 11 determines whether or not the photographing is finished. When the photographing is continued, the process returns to step S15, and when the photographing is finished, the present process is finished.

このように、携帯型ビデオカメラ1は、動画撮影時に連続して撮影されるフレーム毎に、ぼけ量とぼけの方向とを求めるとともに、同一方向のぼけが発生したフレームが連続する数を求め、予めフラッシュROM12に格納されたぼけ量E及びフレーム数Dを閾値として、ぼけの原因が手ぶれか、或いはカメラワークかを判別する。
そして、求めたぼけ量が閾値Eを超える場合、及び、閾値D以上の連続したフレームにおいて同一方向のぼけが発生している場合に、これらのぼけがカメラワークによるものと判別して、補正を行うことなく撮影画像を出力する。一方、上記の場合に該当しないケース、すなわち、求めたぼけ量が閾値E以下であり、かつ、閾値D以上のフレームで同一方向のぼけが連続しない場合には、手ぶれによるぼけが発生したものと判別して、補正を行った画像を出力する。
これにより、加速度センサやジャイロセンサ等の物理センサを備えない携帯型ビデオカメラ1において、手ぶれとカメラワークとを的確に切り分けることが可能である。また、ぼけの種類を判別する処理は、閾値としてのぼけ量E及びフレーム数Dに基づく極めてシンプルな処理であり、例えば複数のフレームに跨る複雑な解析処理等の高負荷の演算処理を伴わない。このため、高性能のハードウェア資源を用いることなく実行可能である。そして、ぼけが手ぶれによるものであった場合にのみ補正を行うので、見やすく、かつ自然な動画像を得ることができる。
In this way, the portable video camera 1 obtains the blur amount and the blur direction for each frame that is continuously shot during moving image shooting, and obtains the number of consecutive frames in which blur in the same direction has occurred. Using the blur amount E and the number of frames D stored in the flash ROM 12 as threshold values, it is determined whether the cause of blur is camera shake or camera work.
Then, when the obtained blur amount exceeds the threshold value E, and when blurring in the same direction occurs in consecutive frames that are equal to or greater than the threshold value D, it is determined that these blurs are caused by camera work, and correction is performed. Output the shot image without doing it. On the other hand, in a case not corresponding to the above case, that is, when the obtained blur amount is equal to or less than the threshold value E and blurs in the same direction are not continued in a frame equal to or greater than the threshold value D, blurring due to camera shake has occurred. Discriminate and output the corrected image.
Thereby, in the portable video camera 1 that does not include a physical sensor such as an acceleration sensor or a gyro sensor, it is possible to accurately separate camera shake and camera work. Further, the process for determining the type of blur is an extremely simple process based on the blur amount E and the number of frames D as threshold values, and does not involve high-load arithmetic processing such as complex analysis processing over a plurality of frames, for example. . Therefore, it can be executed without using high-performance hardware resources. Since the correction is performed only when the blur is caused by camera shake, an easy-to-see and natural moving image can be obtained.

さらに、フレームにおけるぼけ量とぼけ方向とを、フレーム中の複数の画素間における輝度の変化に基づいて求めるので、シンプルで負荷の低い処理によって、手ぶれとカメラワークとを切り分けることができる。
また、手ぶれとカメラワークとを判別する処理においては、予めフラッシュROM12に格納した閾値としてのぼけ量E及びフレーム数Dを用いた大小比較を行うので、非常に負荷の軽い処理によって判別が可能である。さらにまた、連続するフレームにおいて同一方向のぼけが検出されたか否かにより、手ぶれとカメラワークとを切り分けるので、シンプルで負荷の低い処理によって複数のフレームに跨る解析を実現し、的確に手ぶれとカメラワークとを切り分けることができる。
そして、フレームのぼけが手ぶれによるものと判別された場合にぼけを補正して補正画像を出力するので、見やすく自然な画像を出力できる。
Furthermore, since the blur amount and the blur direction in the frame are obtained based on the change in luminance between a plurality of pixels in the frame, camera shake and camera work can be separated by simple and low-load processing.
Further, in the process of discriminating camera shake and camera work, since the magnitude comparison using the blur amount E and the number of frames D as threshold values stored in advance in the flash ROM 12 is performed, the discrimination can be performed by a process with a very light load. is there. Furthermore, camera shake and camera work are separated depending on whether or not blur in the same direction is detected in consecutive frames, so analysis that spans multiple frames is achieved through simple and low-load processing, and camera shake and the camera are accurately detected. Can be separated from the workpiece.
When it is determined that the blur of the frame is caused by camera shake, the blur is corrected and a corrected image is output, so that a natural image that is easy to view can be output.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形及び応用が可能である。
例えば、上記実施の形態では、撮影部20により撮影されたフレーム70に対して、図8に示すぶれ補正処理を行う例について説明したが、例えば、リムーバブルメディア50等に格納された複数フレームからなる動画像について、その表示(再生)時にぶれ補正処理を行うようにしてもよい。すなわち、撮影されたフレームのデータと、各フレーム撮影時のぶれ量を示すデータとがリムーバブルメディア50等に格納されていれば、撮影機能を有しない他の機器においてぶれ補正処理を実行することが可能である。
さらに、上記実施の形態では、ぶれ補正処理を実行するに際して、閾値としてのぼけ量E及びフレーム数Dが予めフラッシュROM12に格納されているものとして説明したが、本発明はこれに限定されるものではなく、例えば、操作部40の操作により入力された情報に基づいてぼけ量E及びフレーム数Dを求めるようにしてもよいし、或いは、過去に撮影したフレームにおけるぼけ量とぼけの方向とに基づいて、随時、ぼけ量E及びフレーム数Dを求めるようにしてもよい。
また、本発明は、上記実施の形態及び変形例で説明した携帯型ビデオカメラ1以外の動画撮影機能を有する撮影機器にも適用することが可能であり、具体例を挙げると、動画撮影機能付きデジタルスチルカメラ、及び、このようなデジタルスチルカメラを具備した携帯電話機、PDA、ノート型パソコン等の各種電子機器においても適用可能である。
The above-described embodiment is merely an aspect of the present invention, and can be arbitrarily modified and applied within the scope of the present invention.
For example, in the above-described embodiment, the example in which the blur correction process illustrated in FIG. 8 is performed on the frame 70 photographed by the photographing unit 20 has been described. For example, the frame 70 includes a plurality of frames stored in the removable medium 50 or the like. You may make it perform a blurring correction process at the time of the display (reproduction | regeneration) about a moving image. That is, if the data of the shot frame and the data indicating the amount of blur at the time of shooting each frame are stored in the removable medium 50 or the like, the blur correction process can be executed in another device that does not have the shooting function. Is possible.
Furthermore, in the above-described embodiment, the blur amount E and the number of frames D as threshold values are preliminarily stored in the flash ROM 12 when executing the blur correction process. However, the present invention is not limited to this. Instead, for example, the blur amount E and the number of frames D may be obtained based on information input by operating the operation unit 40, or based on the blur amount and the blur direction in a frame shot in the past. Thus, the blur amount E and the number of frames D may be obtained as needed.
Further, the present invention can also be applied to a photographing apparatus having a moving image photographing function other than the portable video camera 1 described in the above embodiment and the modified examples. The present invention can also be applied to a digital still camera and various electronic devices such as a mobile phone, a PDA, and a notebook personal computer equipped with such a digital still camera.

実施の形態に係るデジタルカメラの構成を示すブロック図である。It is a block diagram which shows the structure of the digital camera which concerns on embodiment. ぶれ補正の様子を示す図である。It is a figure which shows the mode of blurring correction. ぶれによるフレームの変化を示す図である。It is a figure which shows the change of the flame | frame by blurring. ぶれのないフレームの例を示す図である。It is a figure which shows the example of a flame | frame without blurring. ぶれにより生じるぼけの状態を例示する図である。It is a figure which illustrates the state of the blur produced by blurring. 携帯型ビデオカメラの動きとぼけ量との相関を示す図である。It is a figure which shows the correlation with a motion and the amount of blurs of a portable video camera. 携帯型ビデオカメラの動きとフレームとの関係を示す説明図である。It is explanatory drawing which shows the relationship between a motion of a portable video camera, and a frame. ぶれ補正処理を示すフローチャートである。It is a flowchart which shows a blurring correction process.

符号の説明Explanation of symbols

1…携帯型デジタルビデオカメラ(撮影装置、画像処理装置)、10…制御部(フレーム取得手段、ぼけ解析手段、判別手段、補正手段、コンピュータ)、20…撮影部(撮影手段)、24…表示パネル、50…リムーバブルメディア、60…記録媒体、70…フレーム、71…出力部、72…補正画像、75…高輝度部分、76…低輝度部分、100…制御プログラム、100A…ぶれ補正プログラム。   DESCRIPTION OF SYMBOLS 1 ... Portable digital video camera (an imaging device, an image processing device), 10 ... Control part (a frame acquisition means, a blur analysis means, a discrimination means, a correction means, a computer), 20 ... An imaging part (imaging means), 24 ... Display Panel: 50 ... Removable medium, 60 ... Recording medium, 70 ... Frame, 71 ... Output unit, 72 ... Corrected image, 75 ... High brightness part, 76 ... Low brightness part, 100 ... Control program, 100A ... Shake correction program.

Claims (8)

動画を構成するフレームを順次取得するフレーム取得手段と、
前記フレーム毎にぼけ量とぼけ方向を取得するぼけ解析手段と、
前記ぼけ解析手段により取得されたぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別する判別手段と、
を備えることを特徴とする画像処理装置。
Frame acquisition means for sequentially acquiring frames constituting the video;
Blur analysis means for obtaining a blur amount and a blur direction for each frame;
Based on the blur amount and the blur direction acquired by the blur analysis unit, a discriminating unit for discriminating whether the blur of the frame is caused by camera shake or camera work at the time of shooting;
An image processing apparatus comprising:
前記ぼけ解析手段は、前記フレーム中の複数の画素間における輝度の変化に基づいて、ぼけ量とぼけ方向を取得すること、を特徴とする請求項1記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the blur analysis unit acquires a blur amount and a blur direction based on a change in luminance between a plurality of pixels in the frame. 前記判別手段は、前記ぼけ量が予め定められた閾値以下である場合に、前記フレームのぼけが手ぶれによるものと判別すること、を特徴とする請求項1または2記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determination unit determines that the blur of the frame is caused by camera shake when the amount of blur is equal to or less than a predetermined threshold. 前記判別手段は、前記ぼけ解析手段によって、予め定められた所定数以上の連続する前記フレームにおいて同一方向のぼけが検出された場合に、これらのぼけがカメラワークによるものと判別すること、を特徴とする請求項1から3のいずれかに記載の画像処理装置。   The discriminating means discriminates that the blur is caused by camera work when blur in the same direction is detected in a predetermined number or more of the consecutive frames by the blur analyzing means. The image processing apparatus according to claim 1. 前記判別手段により、前記フレームのぼけが手ぶれによるものと判別された場合に、前記フレームのぼけを補正する補正手段をさらに備えること、を特徴とする請求項1から4のいずれかに記載の画像処理装置。   5. The image according to claim 1, further comprising a correcting unit that corrects the blur of the frame when the determining unit determines that the blur of the frame is caused by camera shake. Processing equipment. 動画を構成するフレームを順次撮影する撮影手段と、
前記フレーム毎にぼけ量とぼけ方向を取得するぼけ解析手段と、
前記ぼけ解析手段により取得されたぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別する判別手段と、
前記判別手段により、前記フレームのぼけが手ぶれによるものと判別された場合に、前記フレームのぶれを補正する補正手段と、
を備えることを特徴とする撮影装置。
Photographing means for sequentially photographing the frames constituting the video;
Blur analysis means for obtaining a blur amount and a blur direction for each frame;
Based on the blur amount and the blur direction acquired by the blur analysis unit, a discriminating unit for discriminating whether the blur of the frame is caused by camera shake or camera work at the time of shooting;
Correction means for correcting blur of the frame when the determination means determines that the blur of the frame is due to camera shake;
An imaging apparatus comprising:
動画を構成するフレームを順次取得し、
前記フレーム毎にぼけ量とぼけ方向を取得するとともに、取得したぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別すること、
を特徴とする画像処理方法。
Obtain the frames that make up the video in sequence,
Obtaining a blur amount and a blur direction for each frame, and determining whether the blur of the frame is caused by camera shake or camera work at the time of shooting based on the obtained blur amount and blur direction;
An image processing method characterized by the above.
コンピュータを、
動画を構成するフレームを順次取得するフレーム取得手段と、
前記フレーム毎にぼけ量とぼけ方向を取得するぼけ解析手段と、
前記ぼけ解析手段により取得されたぼけ量とぼけ方向に基づいて、前記フレームのぼけが手ぶれによるものか撮影時のカメラワークによるものかを判別する判別手段と、
して機能させることを特徴とする制御プログラム。
Computer
Frame acquisition means for sequentially acquiring frames constituting the video;
Blur analysis means for obtaining a blur amount and a blur direction for each frame;
Based on the blur amount and the blur direction acquired by the blur analysis unit, a discriminating unit for discriminating whether the blur of the frame is caused by camera shake or camera work at the time of shooting;
A control program characterized by functioning as a function.
JP2006037415A 2006-02-15 2006-02-15 Image processing apparatus, photographing apparatus, image processing method and control program Pending JP2007221291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006037415A JP2007221291A (en) 2006-02-15 2006-02-15 Image processing apparatus, photographing apparatus, image processing method and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006037415A JP2007221291A (en) 2006-02-15 2006-02-15 Image processing apparatus, photographing apparatus, image processing method and control program

Publications (1)

Publication Number Publication Date
JP2007221291A true JP2007221291A (en) 2007-08-30

Family

ID=38498107

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006037415A Pending JP2007221291A (en) 2006-02-15 2006-02-15 Image processing apparatus, photographing apparatus, image processing method and control program

Country Status (1)

Country Link
JP (1) JP2007221291A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9986164B2 (en) 2014-03-25 2018-05-29 Fujifilm Corporation Camera shaking correction device and imaging apparatus with offset correction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9986164B2 (en) 2014-03-25 2018-05-29 Fujifilm Corporation Camera shaking correction device and imaging apparatus with offset correction

Similar Documents

Publication Publication Date Title
JP4823179B2 (en) Imaging apparatus and imaging control method
US7742690B2 (en) Imaging apparatus and method for processing imaging results
JP5589527B2 (en) Imaging apparatus and tracking subject detection method
JP2008129554A (en) Imaging device and automatic focusing control method
US9743000B2 (en) Moving image processing apparatus, imaging apparatus, and moving image processing method
JP2008109336A (en) Image processor and imaging apparatus
JP2010062952A (en) Imaging device, image processing device, method for processing image, program, and recording medium
JP2007116309A (en) Image information reproduction apparatus
JP2010114752A (en) Device and method of imaging and program
JP2010016544A (en) Image capturing apparatus and image processing apparatus, and image processing program
JP2007142565A (en) Imaging apparatus and method thereof
JP2006067452A (en) Video recording apparatus, and electronic camera
JP2013110754A (en) Camera device, and photographing method and program of the same
WO2017104102A1 (en) Imaging device
JP2009088628A (en) Image processor
JP2007201570A (en) Image processor, photography apparatus, image processing method and control program
JP2005348178A (en) Moving picture recording apparatus and moving picture indicator method, and storage medium
JP4888829B2 (en) Movie processing device, movie shooting device, and movie shooting program
JP2007221291A (en) Image processing apparatus, photographing apparatus, image processing method and control program
JP6427859B2 (en) Image processing apparatus, image processing method, and program
US9124803B2 (en) Image pickup apparatus, method of controlling the same, reproduction apparatus, and method of controlling the same
JP2014007622A (en) Image pick-up device and program
JP2017098635A (en) Imaging apparatus, image evaluation method, and program
JP2017038281A (en) Imaging device and control method therefor
JP2009027437A (en) Image processor, image processing method and imaging device