JP6381212B2 - Imaging apparatus and control method thereof - Google Patents

Imaging apparatus and control method thereof Download PDF

Info

Publication number
JP6381212B2
JP6381212B2 JP2014002380A JP2014002380A JP6381212B2 JP 6381212 B2 JP6381212 B2 JP 6381212B2 JP 2014002380 A JP2014002380 A JP 2014002380A JP 2014002380 A JP2014002380 A JP 2014002380A JP 6381212 B2 JP6381212 B2 JP 6381212B2
Authority
JP
Japan
Prior art keywords
image
reduction
imaging
motion vector
reduction ratio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2014002380A
Other languages
Japanese (ja)
Other versions
JP2015133532A (en
Inventor
光洋 齊藤
光洋 齊藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2014002380A priority Critical patent/JP6381212B2/en
Publication of JP2015133532A publication Critical patent/JP2015133532A/en
Application granted granted Critical
Publication of JP6381212B2 publication Critical patent/JP6381212B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)

Description

本発明は、撮像装置及びその制御方法に関し、特に撮像装置の動きに起因する画像のぶれを低減する防振処理技術に関する。 The present invention relates to an imaging apparatus and a control method therefor, and more particularly to an image stabilization technique for reducing image blurring caused by movement of the imaging apparatus.

デジタルスチルカメラやデジタルビデオカメラ等の撮像装置を用いて撮影された映像に防振処理(ブレ補正)を施すためには、フレーム画像間の動き量を検出し、複数枚の画像に対する位置合わせを行う必要がある。フレーム画像間の動き量を検出する方法としては、ジャイロセンサのような付属機器の情報を用いる方法や、撮影されたフレーム画像から動き量を推定する方法等がある。   In order to perform image stabilization processing (blur correction) on images shot using an imaging device such as a digital still camera or digital video camera, the amount of motion between frame images is detected, and alignment for multiple images is performed. There is a need to do. As a method for detecting the motion amount between frame images, there are a method using information of an accessory device such as a gyro sensor, a method for estimating a motion amount from a captured frame image, and the like.

フレーム画像から動き量を推定する方法には種々の方法があるが、代表的なものとして、テンプレートマッチングによる動きベクトル検出方法がある。テンプレートマッチングでは、先ず、映像中の任意の2枚のフレーム画像の一方を原画像とし、他方を参照画像と定義する。そして、原画像上に配置した所定の大きさの矩形領域をテンプレートブロックとし、参照画像の各位置についてテンプレートブロック内の輝度値の分布との相関を求める。このとき、参照画像中で最も相関が高くなる位置がテンプレートブロックの移動先であり、原画像上でのテンプレートブロックの位置を基準としたときの移動先への向きと移動量が動きベクトルとなる。こうして求めた複数の動きベクトルを用いて統計的な処理を行うことにより、フレーム画像間の動きを幾何変形量として算出する。このとき、画面全域から多数の動きベクトルを高い精度で算出することができれば、フレーム画像間の正確な幾何変形量を求めることができる。   There are various methods for estimating the amount of motion from the frame image. A typical example is a motion vector detection method based on template matching. In template matching, first, one of two arbitrary frame images in a video is defined as an original image, and the other is defined as a reference image. Then, a rectangular area having a predetermined size arranged on the original image is used as a template block, and a correlation with the luminance value distribution in the template block is obtained for each position of the reference image. At this time, the position where the correlation is highest in the reference image is the destination of the template block, and the direction to the destination and the amount of movement based on the position of the template block on the original image are the motion vector. . By performing statistical processing using the plurality of motion vectors thus obtained, the motion between the frame images is calculated as a geometric deformation amount. At this time, if a large number of motion vectors can be calculated from the entire screen with high accuracy, an accurate geometric deformation amount between frame images can be obtained.

しかしながら、撮像装置において撮影動作とリアルタイムで防振動作と行う場合、処理時間やリソースを考慮すると、多数の動きベクトルを高精度で得ることは困難である。そこで、状況に応じて、標準精度で多数のベクトルを検出する検出方法と高精度で少数のベクトルを検出する検出方法とを使い分けることが考えられる。その一例として、画像中のどの被写体に対して防振処理を施すかに応じて検出方法を使い分けることが考えられる。   However, when performing an imaging operation and an image stabilization operation in real time in the imaging apparatus, it is difficult to obtain a large number of motion vectors with high accuracy in consideration of processing time and resources. Therefore, depending on the situation, it is conceivable to use a detection method for detecting a large number of vectors with standard accuracy and a detection method for detecting a small number of vectors with high accuracy. As an example, it is conceivable to use different detection methods depending on which subject in the image is subjected to image stabilization processing.

例えば、撮像装置の近くにいる人物等の主被写体に対して防振処理を施す場合には、主被写体の領域の動きだけが分かればよいので少ないベクトル数の検出で足ることから、高精度な動きベクトルを一定数だけ検出するようにすればよい。一方、背景領域に対して防振処理を施す場合には、画面全域から多数の動きベクトルを検出して、あおりや回転の動きを表す幾何変形量を求める必要がある。このように、動きベクトルの精度と数のどちらを重視するかによって、動きベクトルを検出可能な被写体に違いが生じるため、動きベクトルの精度と数の一方のみを重視してしまうと、特定の被写体については良好な動きベクトルを得ることができなくなる。   For example, when image stabilization processing is performed on a main subject such as a person in the vicinity of an imaging device, it is sufficient to detect only the movement of the main subject area, so that it is sufficient to detect a small number of vectors. A certain number of motion vectors may be detected. On the other hand, when the image stabilization process is performed on the background area, it is necessary to detect a large number of motion vectors from the entire screen and to obtain a geometric deformation amount representing a tilt or rotation motion. In this way, the subject that can detect the motion vector differs depending on whether the accuracy or the number of the motion vector is important. Therefore, if only one of the accuracy and the number of the motion vector is important, a specific subject For, a good motion vector cannot be obtained.

そこで、検出する動きベクトルの精度に応じて、動きベクトルを検出するためのパラメータを変更する方法が提案されている。例えば、動きベクトルの誤検出が画像にどのような影響を与えるかを表す影響パラメータを生成し、生成した影響パラメータに応じて原画像と参照画像の縮小率を制御する技術が提案されている(特許文献1参照)。   Therefore, a method has been proposed in which a parameter for detecting a motion vector is changed according to the accuracy of the detected motion vector. For example, a technique has been proposed in which an influence parameter representing how an erroneous detection of a motion vector affects an image is generated, and the reduction ratio of the original image and the reference image is controlled according to the generated influence parameter ( Patent Document 1).

特開2010−252259号公報JP 2010-252259 A

しかしながら、上記特許文献1に記載された技術は、テンプレートブロック内の輝度値の分散値や平均値に着目して画像の縮小率を変更するものであり、算出すべきフレーム画像間の幾何変形量の性質に着目していない。   However, the technique described in Patent Document 1 changes the reduction ratio of an image by paying attention to the variance value and average value of luminance values in a template block, and the amount of geometric deformation between frame images to be calculated. Not paying attention to the nature of.

本発明は、防振処理を施す対象に応じてぶれの補正に適した動きベクトルを検出することを可能にする技術を提供することを目的とする。   An object of the present invention is to provide a technique that makes it possible to detect a motion vector suitable for shake correction in accordance with an object to be subjected to image stabilization processing.

本発明に係る撮像装置は、光学系により形成された被写体像を画像として取得する撮像手段と、前記撮像手段が取得した画像の画像データを記憶する記憶手段と、前記撮像手段が取得した画像の情報から防振対象を決定する決定手段と、前記撮像手段が取得した画像に対する縮小率を設定する設定手段と、前記設定手段により設定された縮小率に基づいて前記記憶手段を通して入力された画像に対して縮小処理を施す縮小手段と、前記縮小手段により縮小された画像を用いて前記防振対象の複数の動きベクトルを検出する検出手段と、前記動きベクトルの信頼度を判断する判断手段と、前記信頼度が低いと判断された一部の前記動きベクトルを除去する除去手段と、を備え、前記判断手段は、前記動きベクトルが検出された前記画像の領域のテクスチャに基づいて前記信頼度を判断し、前記設定手段は、前記防振対象に応じて前記縮小率を変更することにより、前記信頼度が低いと判断されて除去される一部の前記動きベクトルの数および精度を制御することを特徴とする。 Imaging device according to the present invention includes an imaging means for obtaining an object image formed by the optical system as an image, a storage means for storing image data of an image to the imaging unit has acquired, images that the imaging unit has acquired Determination means for determining the image stabilization target from the information of the above, a setting means for setting a reduction ratio for the image acquired by the imaging means, and an image input through the storage means based on the reduction ratio set by the setting means Reduction means for performing reduction processing on the image, detection means for detecting a plurality of motion vectors of the image stabilization target using the image reduced by the reduction means, and determination means for determining the reliability of the motion vector the a removing means reliability of removing the motion vector of a part that is determined to be low, wherein the determination means, the area of the image which the motion vector is detected It determines the reliability based on Kusucha, the setting means, the Ri by the changing the reduction ratio in accordance with the vibration-proof object, the reliability of the part which is removed is determined to be low the It is characterized by controlling the number and accuracy of motion vectors.

本発明では、防振処理を施す対象となる被写体に応じて最適な幾何変形量を推定することができるように、信頼度が低いと判断された一部の動きベクトルを除去し、特に、防振対象に応じて縮小率を変更することにより、信頼度が低いと判断されて除去される一部の動きベクトルの数と精度を制御する。これにより、標準精度で多数の動きベクトルを検出することが有効な被写体と、高精度で少数の動きベクトルが必要な被写体とを区別した動きベクトルの検出が可能となり、防振処理を施す被写体に生じているぶれが良好に補正された映像を得ることができるようになる。 In the present invention, a part of motion vectors determined to be low in reliability is removed so that an optimal geometric deformation amount can be estimated according to the subject to be subjected to the image stabilization process. By changing the reduction ratio according to the object to be transferred, the number and accuracy of some motion vectors that are judged to have low reliability and are removed are controlled. This makes it possible to detect motion vectors that distinguish between subjects that are effective in detecting a large number of motion vectors with standard accuracy and subjects that require a small number of motion vectors with high accuracy. It is possible to obtain an image in which the generated blur is well corrected.

本発明の第1実施形態に係る撮像装置の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an imaging apparatus according to a first embodiment of the present invention. 図1の撮像装置の動作を説明するフローチャートである。3 is a flowchart for explaining the operation of the imaging apparatus in FIG. 1. 図1の撮像装置による撮影シーンの一例を模式的に示す図である。It is a figure which shows typically an example of the imaging | photography scene by the imaging device of FIG. 図1の撮像装置での画像の縮小率と検出される動きベクトルの数との関係を模式的に示すグラフと、画像の縮小率と検出される動きベクトルの精度との関係を模式的に示すグラフと、縮小率と残ベクトル数とベクトル精度の関係をまとめた表である。1 schematically shows a relationship between the image reduction rate and the number of detected motion vectors in the image pickup apparatus of FIG. 1, and schematically shows a relationship between the image reduction rate and the detected motion vector accuracy. It is the table | surface which put together the relationship between a graph and the reduction rate, the number of remaining vectors, and vector accuracy. 図3の主被写体と背景領域のそれぞれから検出される動きベクトルの一例を示す図である。It is a figure which shows an example of the motion vector detected from each of the main to-be-photographed object and background area | region of FIG. 図3の撮影シーンから主被写体と撮像装置との間の距離が開いたときの撮影シーンと、その際に検出される動きベクトルを示す図である。FIG. 4 is a diagram illustrating a shooting scene when the distance between the main subject and the imaging apparatus is increased from the shooting scene of FIG. 3 and motion vectors detected at that time. テンプレートマッチングの概要を説明するための原画像と参照画像を示す図である。It is a figure which shows the original image and reference image for demonstrating the outline | summary of template matching. 本発明の第2実施形態に係る撮像装置の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the imaging device which concerns on 2nd Embodiment of this invention. 図8の撮像装置の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of the imaging device of FIG.

以下、本発明の実施形態について、添付図面を参照して詳細に説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

<第1実施形態>
[撮像装置の概略構成]
図1は、本発明の実施形態に係る撮像装置の概略構成を示すブロック図である。第1実施形態に係る撮像装置は、光学系101、撮像素子102、カメラ信号処理回路103、メモリ104、防振対象決定回路105、縮小率設定回路106、第1の画像縮小回路107及び第2の画像縮小回路108を備える。また、第1実施形態に係る撮像装置は、動きベクトル検出回路109、幾何変形パラメータ推定回路110、幾何変形回路111及びマイコン(制御部)112を備える。
<First Embodiment>
[Schematic configuration of imaging device]
FIG. 1 is a block diagram illustrating a schematic configuration of an imaging apparatus according to an embodiment of the present invention. The imaging apparatus according to the first embodiment includes an optical system 101, an imaging element 102, a camera signal processing circuit 103, a memory 104, an image stabilization target determination circuit 105, a reduction ratio setting circuit 106, a first image reduction circuit 107, and a second image reduction circuit. The image reduction circuit 108 is provided. The imaging apparatus according to the first embodiment includes a motion vector detection circuit 109, a geometric deformation parameter estimation circuit 110, a geometric deformation circuit 111, and a microcomputer (control unit) 112.

光学系101は、被写体像を形成する。撮像素子102は、光学系101により形成された被写体像を光電変換するCCDセンサやCMOSセンサ等のイメージセンサである。カメラ信号処理回路103は、A/D変換回路、オートゲイン制御回路(AGC)及びオートホワイトバランス回路を含み、撮像素子102から出力されるアナログ電気信号からからデジタル画像信号(画像データ)を形成する。なお、第1実施形態に係る撮像装置では、光学系101、撮像素子102及びカメラ信号処理回路103が、画像の取得を行う撮像部を構成する。   The optical system 101 forms a subject image. The image sensor 102 is an image sensor such as a CCD sensor or a CMOS sensor that photoelectrically converts a subject image formed by the optical system 101. The camera signal processing circuit 103 includes an A / D conversion circuit, an auto gain control circuit (AGC), and an auto white balance circuit, and forms a digital image signal (image data) from an analog electric signal output from the image sensor 102. . In the imaging apparatus according to the first embodiment, the optical system 101, the imaging element 102, and the camera signal processing circuit 103 constitute an imaging unit that acquires an image.

メモリ104は、カメラ信号処理回路103により生成された1又は複数のフレーム画像の画像データを一時的に記憶する。防振対象決定回路105は、カメラ信号処理回路103からメモリ104を介して入力されるフレーム画像(の画像データ)を用いて、防振処理を施す対象(以下「防振対象」という)を決定する。縮小率設定回路106は、防振対象決定回路105で決定された防振対象に応じてフレーム画像を縮小する際の縮小率(以下、単に「縮小率」という)を設定する。第1の画像縮小回路107と第2の画像縮小回路108はそれぞれ、縮小率設定回路106で決定された縮小率に基づいてメモリ104から入力されるフレーム画像に対して縮小処理を施す。   The memory 104 temporarily stores image data of one or a plurality of frame images generated by the camera signal processing circuit 103. The image stabilization target determination circuit 105 determines an object to be subjected to image stabilization processing (hereinafter referred to as “image stabilization target”) using a frame image (image data) input from the camera signal processing circuit 103 via the memory 104. To do. The reduction ratio setting circuit 106 sets a reduction ratio (hereinafter simply referred to as “reduction ratio”) when reducing the frame image in accordance with the image stabilization target determined by the image stabilization target determination circuit 105. Each of the first image reduction circuit 107 and the second image reduction circuit 108 performs a reduction process on the frame image input from the memory 104 based on the reduction rate determined by the reduction rate setting circuit 106.

動きベクトル検出回路109は、第1の画像縮小回路107と第2の画像縮小回路108から入力される2枚のフレーム画像間の動きベクトルを検出する。幾何変形パラメータ推定回路110は、動きベクトル検出回路109において検出された動きベクトルを用いて、フレーム画像間のぶれの動きの補正量を幾何変形パラメータとして出力する。幾何変形回路111は、幾何変形パラメータ推定回路110が算出した幾何変形パラメータに基づいて、フレーム画像に対してぶれを補正するための幾何変形処理を行う。   The motion vector detection circuit 109 detects a motion vector between two frame images input from the first image reduction circuit 107 and the second image reduction circuit 108. The geometric deformation parameter estimation circuit 110 uses the motion vector detected by the motion vector detection circuit 109 to output a correction amount of blur motion between frame images as a geometric deformation parameter. Based on the geometric deformation parameter calculated by the geometric deformation parameter estimation circuit 110, the geometric deformation circuit 111 performs a geometric deformation process for correcting the shake on the frame image.

マイコン112は、CPUと、撮像装置の動作を制御するためにCPUが実行するプログラムを格納するROMと、CPUが用いるパラメータや計算された計算値を一時的に記憶すると共に、プログラムを展開するワークエリアとしてのRAMを備える。マイコン112は、光学系101や防振対象決定回路、幾何変形回路111等の各回路の動作を制御し、また、撮像装置の全体的な動作制御を行う。   The microcomputer 112 temporarily stores a CPU, a ROM that stores a program executed by the CPU to control the operation of the imaging apparatus, a parameter used by the CPU and a calculated value, and a work for developing the program. A RAM is provided as an area. The microcomputer 112 controls the operation of each circuit such as the optical system 101, the image stabilization target determination circuit, the geometric deformation circuit 111, and performs overall operation control of the imaging apparatus.

[撮像装置の撮像動作]
図2は、第1実施形態に係る撮像装置の動作(撮像および画像処理)のフローチャートであり、図2に示す各処理は、マイコン112の制御下において実行される。ステップS201では、画像入力処理が行われる。即ち、光学系101によって形成された被写体像が撮像素子102において被写体輝度に応じたアナログ電気信号に変換される。そして、撮像素子102から出力されるアナログ電気信号がカメラ信号処理回路103によってデジタル信号(画像データ)に変換され、メモリ104に記憶される。
[Imaging operation of the imaging device]
FIG. 2 is a flowchart of the operation (imaging and image processing) of the imaging apparatus according to the first embodiment, and each process shown in FIG. 2 is executed under the control of the microcomputer 112. In step S201, an image input process is performed. That is, the subject image formed by the optical system 101 is converted into an analog electrical signal corresponding to the subject brightness by the image sensor 102. The analog electrical signal output from the image sensor 102 is converted into a digital signal (image data) by the camera signal processing circuit 103 and stored in the memory 104.

なお、カメラ信号処理回路103は、A/D変換回路によってアナログ電気信号を、例えば、12ビットのデジタル信号に変換し、また、AGC及びAWBによって信号レベル補正や白レベル補正を行う。第1実施形態に係る撮像装置では、所定のフレームレートで、順次、フレーム画像の画像データが生成され、メモリ104に記憶される。こうして、メモリ104に記憶された等倍サイズのフレーム画像は、後述するステップS203において、第1の画像縮小回路107と第2の画像縮小回路108へ伝送される。これに伴って、メモリ104に記憶されるフレーム画像は、順次、更新される。   The camera signal processing circuit 103 converts an analog electric signal into, for example, a 12-bit digital signal by an A / D conversion circuit, and performs signal level correction and white level correction by AGC and AWB. In the imaging apparatus according to the first embodiment, image data of frame images is sequentially generated at a predetermined frame rate and stored in the memory 104. Thus, the frame image of the same size stored in the memory 104 is transmitted to the first image reduction circuit 107 and the second image reduction circuit 108 in step S203 described later. Along with this, the frame images stored in the memory 104 are sequentially updated.

続いて、ステップS202では、防振対象決定回路105がメモリ104からフレーム画像を読み出して防振処理を施す対象を決定し、決定された防振対象に基づいて縮小率設定回路106が縮小率を設定する。このステップS202の処理の詳細については、後述することとする。   Subsequently, in step S202, the image stabilization target determination circuit 105 reads the frame image from the memory 104 to determine an object to be subjected to image stabilization processing, and the reduction rate setting circuit 106 sets the reduction rate based on the determined image stabilization target. Set. Details of the processing in step S202 will be described later.

ステップS202で設定された縮小率は、防振対象決定回路105から第1の画像縮小回路107と第2の画像縮小回路108へ伝送される。そこで次に、ステップS203では、第1の画像縮小回路107と第2の画像縮小回路108が、ステップS202で設定された縮小率で画像の縮小処理を行う。   The reduction ratio set in step S202 is transmitted from the image stabilization target determination circuit 105 to the first image reduction circuit 107 and the second image reduction circuit 108. In step S203, the first image reduction circuit 107 and the second image reduction circuit 108 perform image reduction processing at the reduction rate set in step S202.

具体的には、ステップS203では、ステップS201においてメモリ104に記憶された等倍サイズの複数のフレーム画像の中から動きベクトル検出に用いる原画像と参照画像とが選択される。そして、選択された原画像と参照画像はそれぞれ、第1の画像縮小回路107と第2の画像縮小回路108へ入力される。第1の画像縮小回路107と第2の画像縮小回路108はそれぞれ、縮小率設定回路106において設定された縮小率に基づいて、取得したフレーム画像(原画像、参照画像)に対して縮小処理を施す。なお、画像縮小方法には、特に制限はない。例えば、1/8縮小であれば、近傍8×8の矩形領域内の画素の平均値を算出する画素平均法を用いることができる。また、中央の画素に対して重み付けを行うような縮小フィルタを用いる方法を用いることもできる。   Specifically, in step S203, an original image and a reference image used for motion vector detection are selected from a plurality of frame images of the same size stored in the memory 104 in step S201. Then, the selected original image and reference image are input to the first image reduction circuit 107 and the second image reduction circuit 108, respectively. Each of the first image reduction circuit 107 and the second image reduction circuit 108 performs a reduction process on the acquired frame image (original image or reference image) based on the reduction rate set in the reduction rate setting circuit 106. Apply. The image reduction method is not particularly limited. For example, in the case of 1/8 reduction, a pixel average method for calculating an average value of pixels in a neighboring 8 × 8 rectangular area can be used. Also, a method using a reduction filter that weights the central pixel can be used.

ステップS203において縮小処理された画像データは動きベクトル検出回路109へ伝送される。続くステップS204では、動きベクトル検出回路109が、第1の画像縮小回路107と第2の画像縮小回路108から取得した2枚のフレーム画像間の動きベクトル(動きベクトル群)を検出する。動きベクトル検出回路109が検出した動きベクトル(動きベクトル群)は、幾何変形パラメータ推定回路110へ伝送される。ステップS204での具体的な処理については後述することとする。   The image data reduced in step S203 is transmitted to the motion vector detection circuit 109. In subsequent step S204, the motion vector detection circuit 109 detects a motion vector (motion vector group) between the two frame images acquired from the first image reduction circuit 107 and the second image reduction circuit 108. The motion vector (motion vector group) detected by the motion vector detection circuit 109 is transmitted to the geometric deformation parameter estimation circuit 110. Specific processing in step S204 will be described later.

続くステップS205では、幾何変形パラメータ推定回路110が、ステップS204において検出された動きベクトル群を用いて、フレーム画像間の幾何変形パラメータを推定する。ステップS205の具体的な処理については後述することとする。   In the subsequent step S205, the geometric deformation parameter estimation circuit 110 estimates the geometric deformation parameter between the frame images using the motion vector group detected in step S204. Specific processing in step S205 will be described later.

その後のステップS206では、幾何変形回路111が、ステップS205で得られた幾何変形パラメータを用いて、メモリ104に記憶されたフレーム画像に対して防振のための幾何変換処理を施す。そして、ステップS207では、防振処理が施された画像の出力処理が行われ、例えば、防振処理が施された画像は表示装置(不図示)に表示され、或いは、その画像の画像データが記憶装置(不図示)へ記憶される。   In subsequent step S206, the geometric transformation circuit 111 performs a geometric transformation process for image stabilization on the frame image stored in the memory 104 using the geometric transformation parameter obtained in step S205. In step S207, an output process of the image subjected to the image stabilization process is performed. For example, the image subjected to the image stabilization process is displayed on a display device (not shown), or the image data of the image is stored. It is stored in a storage device (not shown).

[ステップS202の処理の詳細]
上述したステップS202の処理の詳細について説明する。先ず、防振対象決定回路105による防振対象の決定方法について説明する。図3は、第1実施形態に係る撮像装置による撮影シーンの一例を模式的に示す図である。この撮像シーンでは、撮像装置の近傍に人物が主被写体301として写っており、撮像装置から遠く離れた位置に背景302が写っている。
[Details of processing in step S202]
Details of the processing in step S202 described above will be described. First, a method for determining the image stabilization target by the image stabilization target determination circuit 105 will be described. FIG. 3 is a diagram schematically illustrating an example of a shooting scene by the imaging apparatus according to the first embodiment. In this imaging scene, a person is shown as a main subject 301 in the vicinity of the imaging device, and a background 302 is shown at a position far away from the imaging device.

図3のような画像(撮影シーン)において防振対象を決定する方法の一例として、ユーザ(撮影者)が手動で設定する方法が挙げられる。例えば、図3のシーンは、撮像装置が備える液晶モニタ等の不図示の表示装置に表示される。そこで、ユーザは、表示装置を参照して、防振対象として主被写体301の領域を選択する。防振対象の選択方法としては、例えば、カーソルキーを選択したい領域に移動させる方法や、表示装置がタッチパネル機能を備える場合には、主被写体301の画像にタッチする方法等が挙げられる。   As an example of a method for determining an image stabilization target in an image (photographing scene) as shown in FIG. 3, there is a method in which a user (photographer) manually sets. For example, the scene of FIG. 3 is displayed on a display device (not shown) such as a liquid crystal monitor included in the imaging device. Therefore, the user refers to the display device and selects the region of the main subject 301 as the image stabilization target. As a method for selecting the image stabilization target, for example, a method of moving a cursor key to an area to be selected or a method of touching an image of the main subject 301 when the display device has a touch panel function can be cited.

防振対象決定回路105は、選択された領域が主被写体であるか背景であるかを判定する。この判定には、選択された位置を中心として色情報等に基づいて領域分割を行うことにより被写体領域を抽出し、抽出した被写体領域の位置や大きさに基づいて、その被写体領域が主被写体であるか背景であるかを判定する方法を用いることができる。   The image stabilization target determination circuit 105 determines whether the selected area is the main subject or the background. In this determination, a subject region is extracted by performing region division based on color information or the like around the selected position, and the subject region is the main subject based on the position and size of the extracted subject region. A method for determining whether there is a background or a background can be used.

例えば、抽出された被写体領域が画面の中央付近に存在しており、且つ、他の領域よりも小さい場合には、選択された領域は主被写体であると判定する。また、選択された領域においてAF評価値として得られる距離情報やその他の測距手段から得られる距離情報を参照して、選択された領域が他の領域よりも撮像装置の近くに存在している場合には、選択された領域は主被写体領域であると判定することができる。なお、図3のように人物が主被写体301である場合には、顔認識機能を用いて、人物を主被写体として判定する方法を用いることができる。   For example, if the extracted subject area exists near the center of the screen and is smaller than the other areas, the selected area is determined to be the main subject. In addition, referring to the distance information obtained as the AF evaluation value in the selected area and the distance information obtained from other distance measuring means, the selected area exists closer to the imaging device than the other areas. In this case, it can be determined that the selected area is the main subject area. In the case where the person is the main subject 301 as shown in FIG. 3, a method of determining the person as the main subject using the face recognition function can be used.

一方、背景302の領域が選択された場合、抽出される領域は画面の周辺部に存在し、さらに画面の大部分を占めていることが分かるため、背景を示す領域であると判定することができる。また、選択された領域の距離情報に基づいて、選択された領域が他の領域よりも遠くに存在していることが分かれば、背景領域であると判定することができる。   On the other hand, when the area of the background 302 is selected, it can be determined that the extracted area exists in the periphery of the screen and further occupies most of the screen. it can. Further, if it is known that the selected area exists farther than other areas based on the distance information of the selected area, it can be determined that the selected area is the background area.

このように防振対象をユーザが選択する方法に対して、撮像装置が自動で(プログラム制御により)防振対象を決定する方法がある。例えば、マイコン112が、画面の領域分割を行って主被写体領域と背景領域とを抽出し、主被写体領域が画面中央に存在している場合には主被写体を防振対象として決定する。これにより、ユーザ(撮影者)の意図を反映した防振映像(防振画像)を生成することができる。一方、主被写体領域が小さい場合や画面の端に存在している場合には、背景領域を防振の対象とすることにより、画面の大部分に対して防振処理が施された画像(映像)を生成することができる。こうして、撮影シーンの中の被写体の位置や大きさに基づいて撮像装置が自動で防振対象を決定することで、ユーザの手を煩わせることなく、常に良好な画像(映像)を得ることができる。   In contrast to the method in which the user selects the image stabilization target in this way, there is a method in which the imaging apparatus automatically determines the image stabilization target (by program control). For example, the microcomputer 112 divides the screen area to extract the main subject area and the background area, and when the main subject area exists at the center of the screen, the main subject is determined as the image stabilization target. Accordingly, it is possible to generate a vibration-proof image (a vibration-proof image) that reflects the intention of the user (photographer). On the other hand, if the main subject area is small or exists at the edge of the screen, an image (video) that has been subjected to image stabilization processing for the majority of the screen by targeting the background area for image stabilization. ) Can be generated. Thus, the image pickup apparatus automatically determines the image stabilization target based on the position and size of the subject in the shooting scene, so that a good image (video) can always be obtained without bothering the user. it can.

以上のようにして決定された防振対象に基づいて、縮小率設定回路106は、動きベクトルの検出に用いる画像に施す縮小処理の縮小率を設定する。先ず、画像上で防振対象に生じている見かけのぶれの性質と縮小率との関係について説明する。   Based on the image stabilization target determined as described above, the reduction rate setting circuit 106 sets the reduction rate of the reduction processing to be performed on the image used for motion vector detection. First, a description will be given of the relationship between the characteristics of apparent blur occurring on the image stabilization target on the image and the reduction ratio.

図4(a)は、縮小率と検出される動きベクトルの数との関係を模式的に示すグラフである。図4(a)のグラフの横軸には縮小率を取っており、縮小率の値が大きくなるにしたがって、縮小後の画像サイズは大きくなる。例えば、縮小率が1である場合には、画像サイズは等倍となって、結果的に縮小されない。つまり、縮小前の画像サイズに縮小率を乗じた後の画像サイズが、縮小後の画像サイズとなる。また、図4(a)のグラフの縦軸には、検出された動きベクトルの中で信頼度が高いと判定された動きベクトルの数を取っている。   FIG. 4A is a graph schematically showing the relationship between the reduction rate and the number of detected motion vectors. The horizontal axis of the graph of FIG. 4A shows the reduction rate, and the image size after reduction increases as the value of the reduction rate increases. For example, when the reduction ratio is 1, the image size becomes the same size and is not reduced as a result. That is, the image size after multiplying the image size before reduction by the reduction ratio becomes the image size after reduction. In addition, the vertical axis of the graph of FIG. 4A represents the number of motion vectors determined to have high reliability among the detected motion vectors.

動きベクトルの信頼度の高さは、どのようなテクスチャを持つ領域から検出された動きベクトルであるかに依存する。つまり、テンプレートマッチングによる動きベクトルの検出が苦手とする領域である低コントラストの領域や繰り返しパターンを含む領域からは、正しい動きベクトルが検出される可能性が低い。そこで、このようなテクスチャの判定を行うために、テンプレートブロック内の画素の輝度値について平均値や分散値を求め、その領域が低コントラスト領域や繰り返しパターン領域であるか否かの判定を行う。そして、低コントラスト領域や繰り返しパターン領域であると判定された場合には、その領域から検出された動きベクトルを信頼度の低いものとして除外する。このような判定を全ての動きベクトルに対して実施し、最終的に残った信頼度の高い動きベクトルの数が、図4の縦軸で表されている残ベクトル数となる。   The high reliability of the motion vector depends on the texture vector detected from the region having the texture. That is, it is unlikely that a correct motion vector is detected from a low-contrast region or a region including a repetitive pattern, which is a region that is difficult to detect a motion vector by template matching. Therefore, in order to perform such texture determination, an average value and a variance value are obtained for the luminance values of the pixels in the template block, and it is determined whether the area is a low contrast area or a repetitive pattern area. If it is determined that the region is a low-contrast region or a repeated pattern region, motion vectors detected from the region are excluded as those with low reliability. Such a determination is performed for all the motion vectors, and the number of motion vectors having high reliability that is finally left is the number of remaining vectors represented by the vertical axis in FIG.

図4(a)に示すように、縮小率が1に近い場合、つまり、動きベクトル検出に用いる画像サイズが大きい場合には、テンプレートブロックとの相関が高い箇所が複数個発生する傾向が強くなり、誤った動きベクトルが検出されやすくなる。そして、それらの誤った動きベクトルは誤差の要因となるため、使用することができない。また、テンプレートブロック内のテクスチャが乏しくなり、低コントラスト領域と判定されて除外される動きベクトルも増加する。そのため、残ベクトル数は少なくなる。   As shown in FIG. 4A, when the reduction ratio is close to 1, that is, when the image size used for motion vector detection is large, there is a strong tendency to generate a plurality of portions having high correlation with the template block. This makes it easier to detect erroneous motion vectors. Since these erroneous motion vectors cause errors, they cannot be used. In addition, the texture in the template block becomes scarce, and the motion vector that is determined to be a low-contrast region and excluded is also increased. Therefore, the number of remaining vectors is reduced.

これに対して、縮小率が0に近い、つまり動きベクトル検出に用いる画像サイズが小さい場合には、テンプレートブロック内に画像中の広い領域のテクスチャが入り込むことになるため、低コントラストや繰り返しの判定で除外される動きベクトルが少なくなる。その結果、残ベクトル数は多くなる。   On the other hand, when the reduction ratio is close to 0, that is, when the image size used for motion vector detection is small, the texture of a wide area in the image enters the template block. The number of motion vectors excluded by As a result, the number of remaining vectors increases.

図4(b)は、縮小率と検出される動きベクトルの精度(検出精度)との関係を模式的に示すグラフである。図4(b)のグラフの横軸には、図4(a)の横軸と同じく、縮小率を取っている。また、図4(b)のグラフの縦軸には、動きベクトルの検出精度を取っている。ここで、縮小率が1に近い、つまり動きベクトル検出に用いる画像サイズが大きい場合には、画像が明瞭であるため、個々の動きベクトルの精度は向上する。一方、縮小率が0に近い場合は、縮小処理によるローパスフィルタ効果により画像が不鮮明になるため、個々の動きベクトルの精度は低下する。   FIG. 4B is a graph schematically showing the relationship between the reduction ratio and the accuracy (detection accuracy) of the detected motion vector. The horizontal axis of the graph of FIG. 4B shows the reduction ratio, as in the horizontal axis of FIG. Also, the vertical axis of the graph of FIG. 4B represents the motion vector detection accuracy. Here, when the reduction ratio is close to 1, that is, when the image size used for motion vector detection is large, since the image is clear, the accuracy of each motion vector is improved. On the other hand, when the reduction ratio is close to 0, the image becomes unclear due to the low-pass filter effect by the reduction process, and the accuracy of each motion vector is lowered.

画像サイズはどこまでも小さくしてもよいというものではなく、検出精度が低下しても検知限界以下とならない精度を保つことができるように、図4(b)に示すように、縮小率に制限(閾値S)を設ける必要がある。第1実施形態における検知限界とは、正しい動きベクトルと同一であるとみなすことができる精度の限界を指す。例えば、その動きベクトルを用いて画像の幾何変形を行った画像と正しい動きベクトルを用いて幾何変形を施した画像との違いが目視では分からないときの検出精度の下限を検知限界と定義することができる。 The image size does not have to be as small as possible. As shown in FIG. 4B, the reduction rate is limited so that the accuracy that does not fall below the detection limit can be maintained even if the detection accuracy is reduced. It is necessary to provide a threshold value S L ). The detection limit in the first embodiment refers to a limit of accuracy that can be regarded as the same as a correct motion vector. For example, the detection limit is defined as the lower limit of detection accuracy when the difference between an image that has undergone geometric deformation using the motion vector and an image that has undergone geometric deformation using the correct motion vector cannot be visually confirmed. Can do.

図4(c)は、図4(a),(b)のグラフに基づいて縮小率と残ベクトル数とベクトル精度の関係をまとめた表である。図4(c)の表から、標準的な精度で多数の動きベクトルを検出したい場合と、少数でも高精度の動きベクトルを検出したい場合とを使い分けるためには、動きベクトルの検出に使用する画像のサイズを変更すればよいことがわかる。そこで次に、良好な防振映像を得るために、防振対象に応じてどのように縮小率を変化させればよいかについて説明する。   FIG. 4C is a table summarizing the relationship among the reduction ratio, the number of remaining vectors, and the vector accuracy based on the graphs of FIGS. 4A and 4B. From the table of FIG. 4 (c), in order to distinguish between the case where it is desired to detect a large number of motion vectors with standard accuracy and the case where it is desired to detect a high-precision motion vector even with a small number, an image used for motion vector detection It can be seen that the size of should be changed. Next, how to reduce the reduction ratio according to the image stabilization target in order to obtain a good image stabilization will be described.

前出の図3に示した撮影シーンのように、撮像装置の近くに主被写体301が在り、主被写体301よりも遠くに背景302が在る場合を考える。図5(a)は、主被写体301から検出される動きベクトルの一例を示す図であり、図5(b)は、背景302から検出される動きベクトルの一例を示す図である。   Consider a case where the main subject 301 is near the imaging apparatus and the background 302 is farther than the main subject 301 as in the above-described shooting scene shown in FIG. FIG. 5A is a diagram illustrating an example of a motion vector detected from the main subject 301, and FIG. 5B is a diagram illustrating an example of a motion vector detected from the background 302.

主被写体301は撮像装置の近くに存在しているため、主被写体301に生じる動きは、図5(a)に矢印501に示すように、並進の動きが支配的となる。また、主被写体301が画面中の一部の領域(中央部)にのみ存在しているため、回転やあおりの動きも並進の動きとして近似することができる。その場合、画面全体から多数の動きベクトルを検出する必要は無く、主被写体301の領域のみから動きベクトルを検出できればよいので、検出すべき動きベクトルの数は少なくてもよい。   Since the main subject 301 exists in the vicinity of the imaging apparatus, the movement that occurs in the main subject 301 is dominated by the translational movement as indicated by the arrow 501 in FIG. Further, since the main subject 301 exists only in a part of the area (central part) in the screen, the rotation and the movement of the tilt can be approximated as a translational movement. In this case, it is not necessary to detect a large number of motion vectors from the entire screen, and it is only necessary to detect a motion vector only from the area of the main subject 301. Therefore, the number of motion vectors to be detected may be small.

しかし、主被写体301は、再生時に注目されやすい領域であるため、主被写体301に生じているぶれを高精度に補正する必要がある。そのため、主被写体301を防振対象とした場合には、縮小率を大きく設定し、動きベクトルの検出に使用する画像サイズを、例えば、等倍サイズや1/2サイズのような大きさにして、少ないベクトル数で高精度な動きベクトルを検出するようにすればよい。主被写体301については、こうして得られた動きベクトルを用いることで、主被写体301に生じている動きを正確に表した高精度な幾何変形パラメータを推定することができ、これにより、主被写体301に対して良好な防振処理を施すことができる。   However, since the main subject 301 is an area that is easily noticed at the time of reproduction, it is necessary to correct the blur occurring in the main subject 301 with high accuracy. For this reason, when the main subject 301 is set as an image stabilization target, a large reduction ratio is set, and an image size used for motion vector detection is set to a size such as an equal size or a half size, for example. A highly accurate motion vector may be detected with a small number of vectors. For the main subject 301, by using the motion vector obtained in this way, it is possible to estimate a highly accurate geometric deformation parameter that accurately represents the motion occurring in the main subject 301. On the other hand, it is possible to perform a favorable vibration isolation treatment.

一方、背景302は遠距離に存在しているため、背景302に生じる動きには、図5(b)に矢印502で示すように、並進の動きだけではなく、あおりの動きも顕著に表れる。このようなあおりの動きを推定するために、例えば、図5(b)に破線で示すように、画像中の一部の領域503にのみ注目して、動きベクトルの検出を行ったとしても、単なる上方向への並進の動きと誤判定されてしまう。そのため、あおりの動きが生じていることを知ることはできない。したがって、あおりの動きを推定するためには、画面全体から多数の動きベクトルを検出する必要がある。   On the other hand, since the background 302 exists at a long distance, not only the translational motion but also the tilting motion appears remarkably in the motion generated in the background 302 as indicated by the arrow 502 in FIG. In order to estimate the movement of such a tilt, for example, as shown by a broken line in FIG. 5B, even if a motion vector is detected while paying attention to only a partial region 503 in the image, It is misjudged as a mere upward movement. Therefore, it is impossible to know that the movement of the tilt is occurring. Therefore, in order to estimate the movement of the tilt, it is necessary to detect a large number of motion vectors from the entire screen.

そのため、背景302を防振対象とした場合には、縮小率を小さくすることで動きベクトルの検出に使用する画像のサイズを、例えば1/8サイズのような大きさにして、画面全域から多数の動きベクトルを検出すればよい。なお、ここでは、あおりの動きの場合について述べたが、回転や拡大/縮小の動きを検出する場合も同様に、画面全体から多数の動きベクトルを検出する必要がある。   Therefore, when the background 302 is set as an image stabilization target, the size of an image used for motion vector detection is reduced to a size such as 1/8 size by reducing the reduction ratio, and a large number of images are displayed from the entire screen. It is only necessary to detect the motion vector. Here, the case of tilt movement has been described, but in the case of detecting rotation or enlargement / reduction movement, it is necessary to detect a large number of motion vectors from the entire screen.

ここまで、防振対象の大きさや撮像装置からの距離を基準にして縮小率を設定する方法について説明したが、これに加えて撮像装置の動きを考慮に入れることで、より良好な動きベクトルを得ることができる場合がある。例えば、主被写体301の近くで撮像装置が大きくチルトした場合には、並進の動きよりもあおりの動きの方が支配的になることがある。逆に、背景302を防振対象とした場合でも、撮像装置に生じているぶれの大きさが微小である場合には、あおりや回転の動きを並進の動きとして近似することが可能になる。   Up to this point, the method of setting the reduction ratio based on the size of the image stabilization target and the distance from the imaging device has been described, but in addition to this, a better motion vector can be obtained by taking the motion of the imaging device into account. You may be able to get it. For example, when the imaging apparatus is largely tilted near the main subject 301, the tilt movement may be dominant over the translation movement. On the other hand, even when the background 302 is set as the image stabilization target, if the magnitude of the blur generated in the imaging apparatus is very small, it is possible to approximate the movement of the tilt or rotation as the translational movement.

撮像装置の動きの判定方法としては、フレーム画像間の動きベクトルの時間的な変動から判定する方法を用いてもよいし、撮像装置に搭載されているジャイロセンサ(不図示)から得られる動き情報から判定する方法を用いてもよく、特に限定されない。   As a method for determining the motion of the imaging device, a method for determining from a temporal variation of a motion vector between frame images may be used, or motion information obtained from a gyro sensor (not shown) mounted on the imaging device. The method of determining from the above may be used, and is not particularly limited.

また、防振対象やカメラワークの動きによる撮影シーンの時間的な変動に応じて縮小率を変更することにより、より良好な防振映像を生成することが可能となる場合がある。図6は、図3の撮影シーンから主被写体301と撮像装置との間の距離が開いた場合の、撮影シーンと、その際に検出される動きベクトルを示す図である。   In addition, it may be possible to generate a better vibration-proof image by changing the reduction ratio according to the temporal variation of the shooting scene due to the movement of the vibration-proof object or camera work. FIG. 6 is a diagram illustrating a shooting scene and a motion vector detected at that time when the distance between the main subject 301 and the imaging apparatus is increased from the shooting scene of FIG.

例えば、図3に示したように撮像装置の近くに主被写体301が存在している場合には、前述の通り、主被写体領域では並進の動きが支配的であるため、主被写体領域から少数の高精度な動きベクトルを検出する必要がある。このとき、図3の主被写体301に対応する図6の主被写体601のように、主被写体601が撮像装置から遠ざかった場合には、主被写体領域の動き(図6に示す矢印)には、並進の動き以外にあおりの動きが目立つようになる。また、主被写体領域が画像中に占める割合も小さくなる。そのため、主被写体601に対して防振処理を施すと、主被写体601以外の画像中の大部分の領域において補正しきれていない動きが顕著になり、全体として良好な防振映像ではなくなってしまう。   For example, as shown in FIG. 3, when the main subject 301 is present near the imaging device, the translational movement is dominant in the main subject region as described above, and therefore, a small number of images from the main subject region. It is necessary to detect a highly accurate motion vector. At this time, when the main subject 601 moves away from the imaging device, as in the main subject 601 in FIG. 6 corresponding to the main subject 301 in FIG. 3, the movement of the main subject area (arrow shown in FIG. 6) In addition to translational movements, the movement of the cage becomes conspicuous. Further, the proportion of the main subject area in the image is also reduced. For this reason, when image stabilization processing is performed on the main subject 601, uncorrected movement becomes significant in most areas of the image other than the main subject 601, and the image is not good as a whole. .

このような場合には、主被写体までの距離や画像中に占める割合等の時間的変化に応じて、縮小率を変更する必要がある。縮小率の変更方法の一例として、主被写体までの距離や画像中に占める面積の割合に対して予め閾値を設けておき、その閾値を境にして縮小率を切り替える方法がある。これにより、撮影シーン中の主要な領域が常に良好に防振されている画像(映像)を生成することができる。   In such a case, it is necessary to change the reduction ratio in accordance with temporal changes such as the distance to the main subject and the proportion of the image in the image. As an example of a method for changing the reduction ratio, there is a method in which a threshold is set in advance for the distance to the main subject and the ratio of the area occupied in the image, and the reduction ratio is switched using the threshold as a boundary. Thereby, it is possible to generate an image (video) in which the main area in the shooting scene is always well-vibrated.

縮小率の変更方法の別の例として、主被写体までの距離や画像中に占める割合の時間的変化に応じて、段階的に縮小率を切り替える方法がある。この方法を用いることにより、防振対象が滑らかに移動していく防振映像を生成することができる。なお、ここでは、時間的に主被写体が画像内で変化する際に、主被写体までの距離や主被写体の大きさに基づいて縮小率を変更することとした。但し、これに限られるものではなく、例えば、主被写体の画面内への入退場や背景領域との距離等に基づいて防振対象と縮小率を切り替えるようにしてもよい。   As another example of the method for changing the reduction ratio, there is a method of switching the reduction ratio in stages in accordance with the temporal change in the distance to the main subject and the proportion of the image in the image. By using this method, it is possible to generate a vibration proof image in which the vibration proof object moves smoothly. Here, when the main subject changes in the image in time, the reduction ratio is changed based on the distance to the main subject and the size of the main subject. However, the present invention is not limited to this. For example, the image stabilization target and the reduction ratio may be switched based on the entry / exit of the main subject into the screen, the distance from the background area, and the like.

ここまで、防振対象と縮小率を設定する方法として、フレーム画像を解析する方法について説明したが、他の方法として、撮像パラメータを利用する方法がある。防振対象と縮小率を設定するために使用可能な撮影パラメータの一例として、焦点距離情報がある。即ち、撮像時の焦点距離が短い場合には撮像シーンを広い画角で撮像することになり、画像上に現れる動きではあおりや回転が顕著になることから、防振対象を背景領域に切り替えて、画像サイズが小さくなるように縮小率を設定する。これにより、画像全体から多数の動きベクトルを検出することができるようになり、あおりや回転の動きを良好に補正した防振映像を生成することができる。   Up to this point, the method for analyzing the frame image has been described as a method for setting the image stabilization target and the reduction ratio. However, as another method, there is a method using an imaging parameter. There is focal length information as an example of imaging parameters that can be used to set the image stabilization target and the reduction ratio. In other words, if the focal length at the time of imaging is short, the imaging scene will be imaged with a wide angle of view, and since the movement appearing on the image will be noticeable in the tilt and rotation, switch the image stabilization target to the background area. The reduction ratio is set so that the image size becomes small. As a result, a large number of motion vectors can be detected from the entire image, and an anti-vibration image in which the tilt and rotation motions are corrected well can be generated.

これに対して、撮像時の焦点距離が長い場合には、望遠画像(撮像シーン中の局所的な領域を切り出して拡大した画像)となるため、あおりや回転のような撮像シーンの全体的な動きは目立たなくなり、画像上に現れる動きは並進の動きが支配的となる。したがって、撮像時の焦点距離が長い場合には、防振対象を主被写体と決定した場合と同様に、画像サイズが大きくなるように縮小率を設定する。これにより、数は少ないが高精度な動きベクトルを検出することができるため、並進の動きが良好に補正された防振映像を得ることができる。   On the other hand, when the focal length at the time of imaging is long, a telephoto image (an image obtained by cutting out and expanding a local area in the imaging scene) is generated. The movement becomes inconspicuous, and the movement appearing on the image is dominated by the translational movement. Therefore, when the focal length at the time of imaging is long, the reduction ratio is set so that the image size becomes large, as in the case where the image stabilization target is determined as the main subject. As a result, since a small number of highly accurate motion vectors can be detected, it is possible to obtain a vibration-proof image in which the translational motion is well corrected.

防振対象の決定に使用する撮影パラメータの他の例としては、絞り値(F値)が挙げられる。例えば、絞り値を小さくして開放状態に近付けるにしたがって、撮像シーンに対する被写界深度は狭くなる。このとき、撮像シーンのうちのピントの合っていない領域ではぼやけ(ボケ)量が大きくなるため、正しい動きベクトルを検出することは難しくなる。この場合、ピントの合っている領域を防振対象とし、その領域が主被写体領域であるか又は背景領域であるかに応じて縮小率を設定する。これにより、ピントの合っている領域で生じているぶれが良好に補正された防振映像を生成することができる。一方、絞り値を大きくすると、撮像シーンに対する被写界深度が深くなるため、撮像シーンのうちのどの領域にもピントが合っている状態になる。よって、この場合には、この撮像シーンの画像で防振対象を決定し、防振対象が主被写体領域であるか又は背景領域であるかに応じて縮小率を設定すればよい。   Another example of the shooting parameter used for determining the image stabilization target is an aperture value (F value). For example, as the aperture value is decreased to approach the open state, the depth of field for the captured scene becomes narrower. At this time, since an amount of blur (blur) increases in an out-of-focus area of the imaging scene, it is difficult to detect a correct motion vector. In this case, the in-focus area is set as the image stabilization target, and the reduction ratio is set according to whether the area is the main subject area or the background area. As a result, it is possible to generate a vibration-proof image in which the blurring occurring in the in-focus area is well corrected. On the other hand, when the aperture value is increased, the depth of field with respect to the captured scene becomes deeper, so that any region in the captured scene is in focus. Therefore, in this case, the image stabilization target is determined based on the image of the imaging scene, and the reduction ratio may be set according to whether the image stabilization target is the main subject area or the background area.

なお、上述した撮影パラメータ(焦点距離、絞り値)の値は、撮像装置が備えるマイコン112が決定し、マイコン112は、決定した撮影パラメータを光学系101と防振対象決定回路105へと伝送して、撮像装置の動作を制御する。   Note that the above-described shooting parameters (focal length, aperture value) are determined by the microcomputer 112 included in the imaging apparatus, and the microcomputer 112 transmits the determined shooting parameters to the optical system 101 and the image stabilization target determination circuit 105. To control the operation of the imaging apparatus.

ステップS202では、以上の通りにして防振処理を施す対象を決定し、決定した防振対象に生じているぶれの動きを高い精度で推定可能な動きベクトルを検出することができるように縮小率を設定する。   In step S202, the target to be subjected to the image stabilization process is determined as described above, and the reduction rate is determined so that a motion vector that can estimate the motion of the shake occurring in the determined image stabilization target with high accuracy can be detected. Set.

[ステップS204の処理の詳細]
上述したステップS204の処理の詳細について説明する。ここでは、動きベクトル検出方法の一例として、テンプレートマッチングを用いた方法について説明する。図7は、テンプレートマッチングの概要を説明する図であり、図7(a)は原画像701を示しており、図7(b)は参照画像702を示している。原画像701と参照画像702は、メモリ104に記憶された等倍サイズのフレーム画像に対して、ステップS202で設定された縮小率にてステップS203で縮小処理が施された画像データに基づく画像である。
[Details of Step S204]
Details of the processing in step S204 described above will be described. Here, a method using template matching will be described as an example of a motion vector detection method. 7A and 7B are diagrams for explaining the outline of template matching. FIG. 7A shows an original image 701 and FIG. 7B shows a reference image 702. The original image 701 and the reference image 702 are images based on the image data obtained by performing the reduction process in step S203 on the frame image of the same size stored in the memory 104 at the reduction rate set in step S202. is there.

原画像701内の任意の位置にテンプレートブロック703を配置し、テンプレートブロック703と参照画像702の各領域との相関値を算出する。このとき、参照画像702の全領域に対して相関値を算出しようとすると、演算量が膨大となってしまうため、実際には、参照画像702内に相関値を算出するための矩形領域をサーチ範囲704として設定する。サーチ範囲704の位置や大きさに特に制限は無いが、正しい動きベクトルを検出するためには、サーチ範囲704の内部にテンプレートブロック703の移動先に相当する領域が含まれるようする必要がある。第1実施形態では、相関値の算出方法の一例として、差分絶対値和(SAD:Sum of Absolute Difference)を用いることとする。SADの計算式は、下記式1の通りである。   A template block 703 is arranged at an arbitrary position in the original image 701, and a correlation value between the template block 703 and each region of the reference image 702 is calculated. At this time, if the correlation value is calculated for the entire region of the reference image 702, the amount of calculation becomes enormous. Therefore, in practice, a rectangular region for calculating the correlation value is searched in the reference image 702. Set as range 704. The position and size of the search range 704 are not particularly limited, but in order to detect a correct motion vector, it is necessary to include an area corresponding to the destination of the template block 703 within the search range 704. In the first embodiment, a sum of absolute differences (SAD) is used as an example of a correlation value calculation method. The calculation formula of SAD is as the following formula 1.

下記式1において、f(i,j)はテンプレートブロック703内の座標(i,j)における輝度値を表しており、g(i,j)はサーチ範囲704において相関値算出の対象となる相関値算出ブロック705内の各輝度値を表している。SADでは、これらの輝度値f(i,j),g(i,j)について差の絶対値を算出し、その総和を求めることで相関値S_SADを得る。したがって、相関値S_SADの値が小さくなるほど、テンプレートブロック703と相関値算出ブロック705との間の輝度値の差分が小さい、つまりテンプレートブロック703と相関値算出ブロック705の各ブロック内のテクスチャが類似することとなる。   In the following equation 1, f (i, j) represents the luminance value at the coordinates (i, j) in the template block 703, and g (i, j) is the correlation for which the correlation value is calculated in the search range 704. Each luminance value in the value calculation block 705 is represented. In SAD, the absolute value of the difference is calculated for these luminance values f (i, j) and g (i, j), and the sum is obtained to obtain the correlation value S_SAD. Therefore, the smaller the correlation value S_SAD value, the smaller the difference in luminance value between the template block 703 and the correlation value calculation block 705, that is, the texture in each block of the template block 703 and the correlation value calculation block 705 is similar. It will be.

サーチ範囲704の全領域について相関値算出ブロック705を移動させて相関値を算出する。そして、テンプレートブロック703とサーチ範囲704との間で相関値を算出し、その値が最も小さくなる位置を判定することにより、原画像701上のテンプレートブロック703が参照画像702においてどの位置に移動したかを検出する。こうして、原画像701と参照画像702の画像間の動きベクトルを検出することができる。   Correlation values are calculated by moving the correlation value calculation block 705 for all regions in the search range 704. Then, a correlation value is calculated between the template block 703 and the search range 704, and a position where the value becomes the smallest is determined, whereby the template block 703 on the original image 701 has moved to which position in the reference image 702. To detect. In this way, a motion vector between the original image 701 and the reference image 702 can be detected.

動きベクトル検出回路109は、以上の動きベクトル検出処理を、第1の画像縮小回路107と第2の画像縮小回路108から取得した2枚のフレーム画像間の複数の領域で行う。   The motion vector detection circuit 109 performs the above-described motion vector detection processing in a plurality of regions between two frame images acquired from the first image reduction circuit 107 and the second image reduction circuit 108.

なお、第1実施形態では、相関値の一例としてSADを使用しているが、これに限るものではなく、差分二乗和(SSD)や正規化相互相関(NCC)等の他の相関値を用いてもよい。但し、SAD以外の相関値を使用する場合には、その特性に応じて、相関値が小さくなるほど類似度が高くなる場合と、相関値が大きくなるほど類似度が高くなる場合の2通りがあるため、各傾向に応じてそれ以降の処理を変更する必要が生じる。   In the first embodiment, SAD is used as an example of the correlation value. However, the present invention is not limited to this, and other correlation values such as sum of squares of differences (SSD) and normalized cross correlation (NCC) are used. May be. However, when a correlation value other than SAD is used, there are two cases depending on the characteristics: a case where the degree of similarity increases as the correlation value decreases and a case where the degree of similarity increases as the correlation value increases. The subsequent processing needs to be changed according to each tendency.

[ステップS205の処理の詳細]
上述したステップS205の処理(幾何変形パラメータ推定処理)の詳細について説明する。ここでは、幾何変形のモデルとして、画像を変形させるための量を示す幾何変形パラメータとしてホモグラフィ行列を用いる場合について説明する。
[Details of processing in step S205]
Details of the above-described processing of step S205 (geometric deformation parameter estimation processing) will be described. Here, a case will be described in which a homography matrix is used as a geometric deformation parameter indicating an amount for deforming an image as a geometric deformation model.

下記式2で示される画像上のある点aが、次フレームにおいて下記式3で示される点a´へ移動したとき、点aと点a´の対応関係は、ホモグラフィ行列Hを用いて下記式4で表すことができる。なお、式2及び式3に示す添え字Tは、転置行列であること示す。   When a point a on the image represented by the following equation 2 moves to a point a ′ represented by the following equation 3 in the next frame, the correspondence between the point a and the point a ′ is as follows using the homography matrix H: It can be expressed by Equation 4. Note that the subscript T shown in Equation 2 and Equation 3 indicates a transposed matrix.

ホモグラフィ行列Hは、画像間の並進、回転、変倍、せん断及びあおりによる変形量を示す行列式であり、下記式5で表される。ここで、ホモグラフィ行列Hの各要素は、ステップS204で得られた動きベクトル群、つまり、フレーム画像間における代表点の対応関係を用いて最小二乗法等の統計的処理を行うことによって算出することができる。但し、縮小処理が施されたフレーム画像を用いて検出された動きベクトルは、縮小画像における値となっているため、幾何変形パラメータを推定する際には、動きベクトルの値を等倍サイズのものへ変換しておく必要がある。   The homography matrix H is a determinant representing the amount of deformation caused by translation, rotation, scaling, shearing, and tilting between images, and is expressed by the following formula 5. Here, each element of the homography matrix H is calculated by performing statistical processing such as a least-squares method using the motion vector group obtained in step S204, that is, the correspondence of representative points between frame images. be able to. However, since the motion vector detected using the reduced frame image is a value in the reduced image, when estimating the geometric deformation parameter, the motion vector value is the same size. It is necessary to convert to.

こうして求められたホモグラフィ行列Hは、撮像装置のぶれによる画像の変形量を表す。そのため、画像のぶれを補正するには、ぶれによる変形を打ち消すような画像変形量が得られるようにホモグラフィ行列Hを変換する必要がある。つまり、ホモグラフィ行列Hを逆行列Hに変換することにより、点a´と点aの対応関係を下記式6によって表すことができ、この式6により、ぶれが生じた後の点a´をぶれが生じる前の点aと同じ座標に戻すことが可能になる。   The homography matrix H obtained in this way represents the amount of deformation of the image due to camera shake. Therefore, in order to correct image blurring, it is necessary to convert the homography matrix H so as to obtain an image deformation amount that cancels deformation due to blurring. In other words, by converting the homography matrix H to the inverse matrix H, the correspondence between the points a ′ and a can be expressed by the following equation (6). It becomes possible to return to the same coordinates as the point a before the shake occurs.

なお、ここでは、フレーム画像間のぶれ量を表すモデルとしてホモグラフィ行列を用いた場合について説明したが、これに限るものではなく、ヘルマート行列やアフィン行列等の他のモデルを用いてもよい。また、主被写体を防振対象とした場合には、並進のぶれ補正量だけを求めればよいため、単に動きベクトル群の平均値を求めるようにすることができる。これにより、統計的な推定を行わずに済むため、計算量を削減することができる。   Here, the case where a homography matrix is used as a model representing the amount of blur between frame images has been described. However, the present invention is not limited to this, and other models such as a Helmat matrix and an affine matrix may be used. Further, when the main subject is set as an image stabilization target, it is only necessary to obtain the translational blur correction amount, and therefore it is possible to simply obtain the average value of the motion vector group. This eliminates the need for statistical estimation, thereby reducing the amount of calculation.

以上に説明したように、第1実施形態では、撮影シーン中の防振処理を施したい対象(防振対象)に応じて、動きベクトルの検出に用いる縮小率を変更することで、検出する動きベクトル群の性質(精度、数)を制御する。これにより、指定した防振対象に対して良好に防振処理が施された映像を、限られたリソースで生成することができる。   As described above, in the first embodiment, the motion to be detected is detected by changing the reduction ratio used for detecting the motion vector in accordance with the target (anti-shake target) to be subjected to the anti-shake process in the shooting scene. Control the properties (precision, number) of vector groups. As a result, it is possible to generate an image in which the image stabilization process is performed satisfactorily for the specified image stabilization target with limited resources.

<第2実施形態>
[撮像装置の概略構成]
図8は、本発明の第2実施形態に係る撮像装置の概略構成を示すブロック図である。図8のブロック図に示す撮像装置の構成要素のうちで図1のブロック図に示す撮像装置の構成要素と同じ構成要素については、同じ符号を付して、ここでの説明を省略する。第2実施形態に係る図8の撮像装置は、第1実施形態に係る図1の撮像装置が備える第2の画像縮小回路108を備えておらず、その代わりに、画像リサイズ回路801を備えている。
Second Embodiment
[Schematic configuration of imaging device]
FIG. 8 is a block diagram showing a schematic configuration of an imaging apparatus according to the second embodiment of the present invention. Among the components of the imaging device shown in the block diagram of FIG. 8, the same components as those of the imaging device shown in the block diagram of FIG. 1 are denoted by the same reference numerals and description thereof is omitted here. The imaging apparatus of FIG. 8 according to the second embodiment does not include the second image reduction circuit 108 included in the imaging apparatus of FIG. 1 according to the first embodiment, and includes an image resizing circuit 801 instead. Yes.

第2実施形態では、撮像部から得られるフレーム画像の画像データを、メモリ104に入力してメモリ104に記憶させると共に、第1の画像縮小回路107へ入力して縮小処理を施し、縮小処理されたフレーム画像をメモリ104に記憶する。これにより、使用するメモリ104の帯域の削減を図る。   In the second embodiment, the image data of the frame image obtained from the imaging unit is input to the memory 104 and stored in the memory 104, and is input to the first image reduction circuit 107 to perform the reduction process and the reduction process is performed. The frame image is stored in the memory 104. Thereby, the bandwidth of the memory 104 to be used is reduced.

[撮像装置の撮像動作]
図9は、第2実施形態に係る撮像装置の動作のフローチャートであり、図9に示す各処理は、マイコン112の制御下において実行される。図9のフローチャートの処理のうち、図2のフローチャートの処理と同じ処理については、同じステップ番号(S202,S204〜S207)を付して、ここでの説明を省略し、図2のフローチャートの処理とは異なる処理についてのみ、説明を行う。
[Imaging operation of the imaging device]
FIG. 9 is a flowchart of the operation of the imaging apparatus according to the second embodiment, and each process shown in FIG. 9 is executed under the control of the microcomputer 112. Among the processes in the flowchart of FIG. 9, the same processes as those in the flowchart of FIG. 2 are denoted by the same step numbers (S202, S204 to S207), description thereof is omitted, and the processes of the flowchart in FIG. Only the processing different from that will be described.

ステップS901では、画像入力処理が行われる。ここでは、撮像部(の後段のカメラ信号処理回路103)から出力されるフレーム画像が、等倍サイズでメモリ104に入力されて記憶されると共に、第1の画像縮小回路107へ入力される。   In step S901, an image input process is performed. Here, the frame image output from the imaging unit (the camera signal processing circuit 103 in the subsequent stage) is input and stored in the memory 104 in the same size and input to the first image reduction circuit 107.

ステップS902では、第1の画像縮小回路107が、入力されたフレーム画像に対して、フレーム画像の入力時に縮小率設定回路106で設定されている縮小率で縮小処理を行う。こうして生成された縮小画像は、メモリ104に記憶される。   In step S902, the first image reduction circuit 107 performs a reduction process on the input frame image at a reduction rate set by the reduction rate setting circuit 106 when the frame image is input. The reduced image generated in this way is stored in the memory 104.

ステップS903では、画像リサイズ回路801が、メモリ104に記憶されている縮小済みのフレーム画像(ステップS902で縮小処理されたフレーム画像)に対して、必要に応じて、リサイズ処理を施す。これは、以下の理由による。   In step S903, the image resizing circuit 801 performs resizing processing on the reduced frame image stored in the memory 104 (the frame image reduced in step S902) as necessary. This is due to the following reason.

即ち、前述の通り、メモリ104に記憶されている縮小処理が施されたフレーム画像のサイズは、第1の画像縮小回路107への入力時に縮小率設定回路106で設定されている縮小率で縮小されたものとなっている。この場合、撮影中のシーンの時間的変動に応じて縮小率が変更されると、既にメモリ104に記憶されている縮小処理済みのフレーム画像と縮小率が変更された後に縮小処理が施されたフレーム画像との間で画像サイズに差異が生じることになる。つまり、原画像と参照画像とで画像サイズが異なってしまうこととなり、このままでは動きベクトルを検出することができない。そこで、原画像と参照画像の双方の画像サイズを合わせるために、画像リサイズ回路801において、画像のリサイズ処理を行う。   That is, as described above, the size of the frame image subjected to the reduction process stored in the memory 104 is reduced by the reduction rate set by the reduction rate setting circuit 106 when input to the first image reduction circuit 107. It has been made. In this case, when the reduction ratio is changed in accordance with the temporal variation of the scene being shot, the reduction process is performed after the reduction process and the reduced frame image already stored in the memory 104 are changed. There is a difference in image size between frame images. That is, the image size differs between the original image and the reference image, and the motion vector cannot be detected as it is. Therefore, in order to match the image sizes of both the original image and the reference image, the image resizing circuit 801 performs image resizing processing.

例えば、あるフレーム画像に対する入力時点での縮小率が1/8であったとし、その後、撮影シーンの時間的変動に応じて縮小率が1/4に変更されたとする。この場合には、画像リサイズ回路801において、メモリ104内に記憶されている1/8に縮小されたフレーム画像に対して2倍の拡大処理を施し、拡大処理されたフレーム画像が動きベクトル検出回路109へ入力される。これにより、原画像と参照画像とが共に同じ1/4サイズの画像サイズとなるため、動きベクトル検出回路109は動きベクトルの検出を行うことができる。リサイズ処理の方法はどのようなものでもよく、例えば、バイリニアやバイキュービック等の補間処理を用いることができる。   For example, it is assumed that the reduction ratio at the time of input for a certain frame image is 1/8, and then the reduction ratio is changed to 1/4 according to the temporal variation of the shooting scene. In this case, the image resizing circuit 801 performs a double enlargement process on the frame image reduced to 1/8 stored in the memory 104, and the enlarged frame image is a motion vector detection circuit. 109 is input. Accordingly, both the original image and the reference image have the same ¼ size image size, so that the motion vector detection circuit 109 can detect a motion vector. Any resizing method may be used. For example, bilinear or bicubic interpolation processing may be used.

なお、第2実施形態のステップS206では、第1実施形態と同様に、幾何変形回路111は、メモリ104に記憶されている等倍サイズのフレーム画像に対して、ステップS205において算出された幾何変形パラメータを用いて幾何変形処理を施す。これにより、防振映像が生成される。   In step S206 of the second embodiment, as in the first embodiment, the geometric deformation circuit 111 performs the geometric deformation calculated in step S205 on the frame image of the same size that is stored in the memory 104. Perform geometric deformation processing using parameters. Thereby, a vibration-proof image is generated.

第1実施形態のように等倍サイズのフレーム画像のみをメモリ104に記憶する方法では、縮小率の変動に合わせて等倍サイズのフレーム画像に縮小処理を施せばよいが、常に等倍サイズのフレーム画像を伝送することになるため、必要となる帯域が大きくなる。これに対して、第2実施形態では、画像入力の時点で所定の縮小率で画像を縮小してメモリ104に記憶しておき、縮小率の変化に対応した画像サイズとなるようにメモリ104内の縮小画像に対してリサイズ処理を施す。したがって、縮小された画像を伝送すればよいために、伝送帯域を削減することが可能になる。   In the method of storing only the same size frame image in the memory 104 as in the first embodiment, it is only necessary to perform the reduction process on the same size frame image in accordance with the fluctuation of the reduction rate. Since a frame image is transmitted, a necessary band becomes large. On the other hand, in the second embodiment, at the time of image input, the image is reduced and stored in the memory 104 at a predetermined reduction rate, and the image size in the memory 104 is set so as to correspond to the change in the reduction rate. Resize processing is performed on the reduced image. Accordingly, since it is sufficient to transmit a reduced image, it is possible to reduce the transmission band.

<その他の実施形態>
以上、本発明をその好適な実施形態に基づいて詳述してきたが、本発明はこれら特定の実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の様々な形態も本発明に含まれる。
<Other embodiments>
Although the present invention has been described in detail based on preferred embodiments thereof, the present invention is not limited to these specific embodiments, and various forms within the scope of the present invention are also included in the present invention. included.

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

105 防振対象決定回路
106 縮小率設定回路
107 第1の画像縮小回路
108 第1の画像縮小回路
109 動きベクトル検出回路
110 幾何変形パラメータ推定回路
111 幾何変形回路
112 マイコン
801 画像リサイズ回路
DESCRIPTION OF SYMBOLS 105 Anti-vibration object determination circuit 106 Reduction ratio setting circuit 107 1st image reduction circuit 108 1st image reduction circuit 109 Motion vector detection circuit 110 Geometric deformation parameter estimation circuit 111 Geometric deformation circuit 112 Microcomputer 801 Image resizing circuit

Claims (12)

光学系により形成された被写体像を画像として取得する撮像手段と、
前記撮像手段が取得した画像の画像データを記憶する記憶手段と、
前記撮像手段が取得した画像の情報から防振対象を決定する決定手段と、
前記撮像手段が取得した画像に対する縮小率を設定する設定手段と、
前記設定手段により設定された縮小率に基づいて前記記憶手段を通して入力された画像に対して縮小処理を施す縮小手段と、
前記縮小手段により縮小された画像を用いて前記防振対象の複数の動きベクトルを検出する検出手段と
前記動きベクトルの信頼度を判断する判断手段と、
前記信頼度が低いと判断された一部の前記動きベクトルを除去する除去手段と、を備え、
前記判断手段は、前記動きベクトルが検出された前記画像の領域のテクスチャに基づいて前記信頼度を判断し、
前記設定手段は、前記防振対象に応じて前記縮小率を変更することにより、前記信頼度が低いと判断されて除去される一部の前記動きベクトルの数および精度を制御することを特徴とする撮像装置。
Imaging means for acquiring a subject image formed by the optical system as an image;
Storage means for storing image data of an image acquired by the imaging means;
Determining means for determining the vibration damping target from information of images that the imaging unit has acquired,
Setting means for setting a reduction ratio for the image acquired by the imaging means;
Reduction means for performing reduction processing on an image input through the storage means based on the reduction ratio set by the setting means;
Detecting means for detecting a plurality of motion vectors of the image stabilization target using the image reduced by the reducing means ;
Determining means for determining the reliability of the motion vector;
Removing means for removing a part of the motion vectors determined to have low reliability ,
The determination means determines the reliability based on a texture of the region of the image in which the motion vector is detected;
The setting means, the controller controls the Ri by the changing the vibration isolating said reduction ratio in response to the target, the number and accuracy of the motion vector of the part that reliability is low and the removal is determined An imaging device that is characterized.
前記決定手段は、前記撮像手段が取得した画像中の被写体の大きさ、位置、距離の少なくとも1つに基づいて前記防振対象を決定することを特徴とする請求項1に記載の撮像装置。   The imaging apparatus according to claim 1, wherein the determination unit determines the image stabilization target based on at least one of a size, a position, and a distance of a subject in an image acquired by the imaging unit. 光学系により形成された被写体像を画像として取得する撮像手段と、
前記撮像手段が取得した画像の画像データを記憶する記憶手段と、
前記撮像手段が取得した画像の情報、および、前記光学系の焦点距離と絞り値の少なくとも一方から、防振対象を決定する決定手段と、
前記撮像手段が取得した画像に対する縮小率を設定する設定手段と、
前記設定手段により設定された縮小率に基づいて前記記憶手段を通して入力された画像に対して縮小処理を施す縮小手段と、
前記縮小手段により縮小された画像を用いて前記防振対象の複数の動きベクトルを検出する検出手段と、
前記動きベクトルの信頼度を判断する判断手段と、
前記信頼度が低いと判断された一部の前記動きベクトルを除去する除去手段と、を備え、
前記判断手段は、前記動きベクトルが検出された前記画像の領域のテクスチャに基づいて前記信頼度を判断し、
前記設定手段は、前記防振対象に応じて前記縮小率を変更することにより、前記信頼度が低いと判断されて除去される一部の前記動きベクトルの数および精度を制御することを特徴とする撮像装置。
Imaging means for acquiring a subject image formed by the optical system as an image;
Storage means for storing image data of an image acquired by the imaging means;
Determining means for determining an image stabilization target from information on the image acquired by the imaging means and at least one of a focal length and an aperture value of the optical system;
Setting means for setting a reduction ratio for the image acquired by the imaging means;
Reduction means for performing reduction processing on an image input through the storage means based on the reduction ratio set by the setting means;
Detecting means for detecting a plurality of motion vectors of the image stabilization target using the image reduced by the reducing means;
Determining means for determining the reliability of the motion vector;
Removing means for removing a part of the motion vectors determined to have low reliability ,
The determination means determines the reliability based on a texture of the region of the image in which the motion vector is detected;
The setting means controls the number and accuracy of a part of the motion vectors to be removed when the reliability is determined to be low by changing the reduction ratio according to the vibration isolation target. An imaging device.
前記縮小手段に入力される画像を表示する表示手段を備え、
前記決定手段は、前記表示手段に表示された画像上において撮影者によって決定された防振対象の領域が主被写体領域であるか背景領域であるかを判定することを特徴とする請求項1乃至3のいずれか1項に記載の撮像装置。
Display means for displaying an image input to the reduction means;
2. The determination unit according to claim 1, wherein the determination unit determines whether an image stabilization target region determined by a photographer on the image displayed on the display unit is a main subject region or a background region. 4. The imaging device according to any one of 3.
前記設定手段は、前記防振対象が主被写体である場合には画像サイズが大きくなるように前記縮小率を設定し、前記防振対象が背景領域である場合には画像サイズが小さくなるように前記縮小率を設定することを特徴とする請求項1乃至4のいずれか1項に記載の撮像装置。   The setting means sets the reduction ratio so that the image size is increased when the image stabilization target is a main subject, and the image size is decreased when the image stabilization target is a background area. The imaging apparatus according to claim 1, wherein the reduction ratio is set. 前記設定手段は、前記防振対象の大きさ、位置、距離の少なくとも1つの時間的変動に応じて前記縮小率を変更することを特徴とする請求項1乃至5のいずれか1項に記載の撮像装置。   The said setting means changes the said reduction ratio according to at least 1 time fluctuation | variation of the magnitude | size of the said vibration-proof object, a position, and distance, The Claim 1 characterized by the above-mentioned. Imaging device. 前記記憶手段は、前記撮像手段から入力された画像を等倍サイズで記憶し、
前記縮小手段は前記等倍サイズの画像に対して縮小処理を施すことを特徴とする請求項1乃至6のいずれか1項に記載の撮像装置。
The storage means stores the image input from the imaging means in the same size size,
The imaging apparatus according to claim 1, wherein the reduction unit performs a reduction process on the same-size image.
前記記憶手段は、前記縮小手段によって縮小された画像を記憶し、
前記設定手段によって設定された前記縮小率が前記縮小手段により縮小されて前記記憶手段に記憶された画像の縮小率から変更されたときに、前記縮小手段によって縮小されて前記記憶手段に記憶された画像を、前記変更された縮小率の画像サイズへリサイズするリサイズ手段を備えることを特徴とする請求項1乃至6のいずれか1項に記載の撮像装置。
The storage means stores the image reduced by the reduction means,
When the reduction ratio set by the setting means is changed from the reduction ratio of the image reduced by the reduction means and stored in the storage means, the reduction ratio is reduced by the reduction means and stored in the storage means The image pickup apparatus according to claim 1, further comprising a resizing unit that resizes an image to an image size having the changed reduction ratio.
前記検出手段が検出した動きベクトルを用いて前記縮小手段に入力された画像間のぶれを幾何変形パラメータとして推定する推定手段と、
前記推定手段が推定した幾何変形パラメータを用いて前記縮小手段に入力された画像に幾何変形を施す変形手段とを更に有することを特徴とする請求項1乃至8のいずれか1項に記載の撮像装置。
Estimating means for estimating blur between images input to the reducing means using the motion vector detected by the detecting means as a geometric deformation parameter;
The imaging according to any one of claims 1 to 8, further comprising a deformation unit that performs geometric deformation on the image input to the reduction unit using the geometric deformation parameter estimated by the estimation unit. apparatus.
前記判断手段は、前記動きベクトルが検出された前記画像の領域が低コントラストであるほど、または当該領域に繰り返しパターンが存在するほど、前記信頼度を低く判断することを特徴とする請求項1乃至9のいずれか1項に記載の撮像装置。2. The determination unit according to claim 1, wherein the determination unit determines that the reliability is low as the region of the image in which the motion vector is detected has a low contrast or as a repetitive pattern exists in the region. The imaging apparatus according to any one of 9. 光学系により形成された被写体像を画像として取得する撮像手段を備える撮像装置の制御方法であって、An image pickup apparatus control method comprising an image pickup means for acquiring a subject image formed by an optical system as an image,
前記撮像手段が取得した画像の画像データを記憶手段に記憶する記憶ステップと、A storage step of storing image data of an image acquired by the imaging unit in a storage unit;
前記撮像手段が取得した画像の情報から防振対象を決定する決定ステップと、A determination step of determining an image stabilization target from information of an image acquired by the imaging unit;
前記撮像手段が取得した画像に対する縮小率を設定する設定ステップと、A setting step for setting a reduction ratio for the image acquired by the imaging means;
前記設定ステップで設定された縮小率に基づいて前記記憶手段を通して入力された画像に対して縮小処理を施す縮小ステップと、A reduction step of performing a reduction process on the image input through the storage unit based on the reduction rate set in the setting step;
前記縮小ステップで縮小された画像を用いて前記防振対象の複数の動きベクトルを検出手段により検出する検出ステップと、A detecting step of detecting a plurality of motion vectors of the image stabilization target by using the image reduced in the reducing step;
前記動きベクトルの信頼度を判断する判断ステップと、A determination step of determining a reliability of the motion vector;
前記信頼度が低いと判断された一部の前記動きベクトルを除去する除去ステップと、を備え、Removing a part of the motion vectors determined to be low in reliability, and
前記判断ステップでは、前記動きベクトルが検出された前記画像の領域のテクスチャに基づいて前記信頼度を判断し、In the determination step, the reliability is determined based on a texture of the area of the image in which the motion vector is detected,
前記設定ステップでは、前記防振対象に応じて前記縮小率を変更することにより、前記信頼度が低いと判断されて除去される一部の前記動きベクトルの数および精度を制御することを特徴とする制御方法。In the setting step, the number and accuracy of a part of the motion vectors to be removed when the reliability is determined to be low are controlled by changing the reduction ratio according to the image stabilization target. Control method to do.
光学系により形成された被写体像を画像として取得する撮像手段を備える撮像装置の制御方法であって、An image pickup apparatus control method comprising an image pickup means for acquiring a subject image formed by an optical system as an image,
前記撮像手段が取得した画像の画像データを記憶手段に記憶する記憶ステップと、A storage step of storing image data of an image acquired by the imaging unit in a storage unit;
前記撮像手段が取得した画像の情報、および、前記光学系の焦点距離と絞り値の少なくとも一方から、防振対象を決定する決定ステップと、A determination step of determining an image stabilization target from the information of the image acquired by the imaging unit and at least one of a focal length and an aperture value of the optical system;
前記撮像手段が取得した画像に対する縮小率を設定する設定ステップと、A setting step for setting a reduction ratio for the image acquired by the imaging means;
前記設定ステップで設定された縮小率に基づいて前記記憶手段を通して入力された画像に対して縮小処理を施す縮小ステップと、A reduction step of performing a reduction process on the image input through the storage unit based on the reduction rate set in the setting step;
前記縮小ステップで縮小された画像を用いて前記防振対象の複数の動きベクトルを検出手段により検出する検出ステップと、A detecting step of detecting a plurality of motion vectors of the image stabilization target by using the image reduced in the reducing step;
前記動きベクトルの信頼度を判断する判断ステップと、A determination step of determining a reliability of the motion vector;
前記信頼度が低いと判断された一部の前記動きベクトルを除去する除去ステップと、を備え、Removing a part of the motion vectors determined to be low in reliability, and
前記判断ステップでは、前記動きベクトルが検出された前記画像の領域のテクスチャに基づいて前記信頼度を判断し、In the determination step, the reliability is determined based on a texture of the area of the image in which the motion vector is detected,
前記設定ステップでは、前記防振対象に応じて前記縮小率を変更することにより、前記信頼度が低いと判断されて除去される一部の前記動きベクトルの数および精度を制御することを特徴とする制御方法。In the setting step, the number and accuracy of a part of the motion vectors to be removed when the reliability is determined to be low are controlled by changing the reduction ratio according to the image stabilization target. Control method to do.
JP2014002380A 2014-01-09 2014-01-09 Imaging apparatus and control method thereof Active JP6381212B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014002380A JP6381212B2 (en) 2014-01-09 2014-01-09 Imaging apparatus and control method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014002380A JP6381212B2 (en) 2014-01-09 2014-01-09 Imaging apparatus and control method thereof

Publications (2)

Publication Number Publication Date
JP2015133532A JP2015133532A (en) 2015-07-23
JP6381212B2 true JP6381212B2 (en) 2018-08-29

Family

ID=53900468

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014002380A Active JP6381212B2 (en) 2014-01-09 2014-01-09 Imaging apparatus and control method thereof

Country Status (1)

Country Link
JP (1) JP6381212B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113358309B (en) * 2021-06-03 2023-10-20 昆山丘钛微电子科技股份有限公司 Anti-shake test method and device, electronic equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009065619A (en) * 2007-09-10 2009-03-26 Fujifilm Corp Camera-shake correcting device and imaging apparatus
JP2009302731A (en) * 2008-06-11 2009-12-24 Olympus Corp Image processing apparatus, image processing program, image processing method, and electronic device
JP2011155582A (en) * 2010-01-28 2011-08-11 Sanyo Electric Co Ltd Imaging device
JP2012175289A (en) * 2011-02-18 2012-09-10 Canon Inc Image processing apparatus and method for controlling the same
JP5708097B2 (en) * 2011-03-18 2015-04-30 株式会社リコー Imaging apparatus, imaging method, and imaging program

Also Published As

Publication number Publication date
JP2015133532A (en) 2015-07-23

Similar Documents

Publication Publication Date Title
JP6271990B2 (en) Image processing apparatus and image processing method
JP5980294B2 (en) Data processing apparatus, imaging apparatus, and data processing method
JP5284048B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP5374119B2 (en) Distance information acquisition device, imaging device, and program
JP2015148532A (en) Distance measuring device, imaging apparatus, distance measuring method, and program
JP6656035B2 (en) Image processing apparatus, imaging apparatus, and control method for image processing apparatus
JP5800187B2 (en) Imaging apparatus and distance information acquisition method
JP2018107526A (en) Image processing device, imaging apparatus, image processing method and computer program
JP2017098884A (en) Movement detection device, movement detection method, and program
JP6604908B2 (en) Image processing apparatus, control method thereof, and control program
JP6282133B2 (en) Imaging device, control method thereof, and control program
JP6178646B2 (en) Imaging apparatus and image shake correction processing method
JP6231816B2 (en) IMAGING DEVICE, ITS CONTROL METHOD, PROGRAM, AND STORAGE MEDIUM
JP6486453B2 (en) Image processing apparatus, image processing method, and program
JP6381212B2 (en) Imaging apparatus and control method thereof
JP7025237B2 (en) Image processing equipment and its control method and program
JP6016546B2 (en) Imaging device, control method thereof, and control program
JP6639155B2 (en) Image processing apparatus and image processing method
JP2020086216A (en) Imaging control device, imaging apparatus and imaging control program
JP6548409B2 (en) Image processing apparatus, control method therefor, control program, and imaging apparatus
JP2018072942A (en) Image processing apparatus, image processing method, program, and storage medium
JP2010079815A (en) Image correction device
JP6525693B2 (en) Image processing apparatus and image processing method
JP2018072941A (en) Image processing device, image processing method, program, and storage medium
JP5610967B2 (en) Image processing apparatus, imaging apparatus, image processing method, and image processing program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161228

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20171016

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171128

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180129

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180703

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180731

R151 Written notification of patent or utility model registration

Ref document number: 6381212

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151