JP4696055B2 - Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus - Google Patents

Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus Download PDF

Info

Publication number
JP4696055B2
JP4696055B2 JP2006344317A JP2006344317A JP4696055B2 JP 4696055 B2 JP4696055 B2 JP 4696055B2 JP 2006344317 A JP2006344317 A JP 2006344317A JP 2006344317 A JP2006344317 A JP 2006344317A JP 4696055 B2 JP4696055 B2 JP 4696055B2
Authority
JP
Japan
Prior art keywords
vector
camera shake
pair
movement
shake vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2006344317A
Other languages
Japanese (ja)
Other versions
JP2008160273A (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.)
Fujifilm Corp
Original Assignee
Fujifilm 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 Fujifilm Corp filed Critical Fujifilm Corp
Priority to JP2006344317A priority Critical patent/JP4696055B2/en
Publication of JP2008160273A publication Critical patent/JP2008160273A/en
Application granted granted Critical
Publication of JP4696055B2 publication Critical patent/JP4696055B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、デジタルカメラ等で電子式手振れ補正を精度良く行うために手振れベクトルを高精度に検出する手振れベクトル検出方法及びその装置並びに検出プログラム、電子式手振れ補正方法及びその装置並びに補正プログラム、撮像装置に関する。   The present invention relates to a camera shake vector detection method and apparatus and detection program for detecting a camera shake vector with high accuracy in order to perform electronic camera shake correction with high accuracy in a digital camera or the like, an electronic camera shake correction method and apparatus and correction program therefor, and imaging Relates to the device.

例えば、動画撮影機能を有するデジタルスチルカメラやビデオカメラ等を手に持ち動画を撮影する場合、カメラを持つ手が振れると、あるフレームの画像中に映っている静止物画像の位置が次フレームの画面では移動してしまい、見づらい動画になってしまう。そこで、あるフレームの画像に対して次フレームの画像の移動ベクトル(手振れベクトル)を検出し、画像が揺れない様に手振れ補正を行うことが行われている。   For example, when shooting a video with a digital still camera or video camera with a video shooting function in hand, the position of the still object image shown in the image of a certain frame is the position of the next frame when the hand holding the camera shakes. It moves on the screen, making it difficult to see the video. Therefore, a movement vector (camera shake vector) of an image of the next frame is detected with respect to an image of a certain frame, and camera shake correction is performed so that the image does not shake.

図6は、手振れ補正を行うときの移動ベクトルを検出する原理を示す説明図である。図6(a)に示すNフレーム目の画像1中の所定アドレスで示されるブロック2内の画像を基準画像とすると、図6(b)に示す(N+1)フレーム目の画像3中の同一所定アドレスで示されるブロック4によって切り出された画像が基準画像と同一であれば、画像1に対して画像3は振れていないことになる。   FIG. 6 is an explanatory diagram illustrating the principle of detecting a movement vector when performing camera shake correction. If the image in the block 2 indicated by the predetermined address in the image 1 of the Nth frame shown in FIG. 6A is a reference image, the same predetermined in the image 3 of the (N + 1) th frame shown in FIG. 6B. If the image cut out by the block 4 indicated by the address is the same as the reference image, the image 3 is not shaken with respect to the image 1.

しかし、手振れが発生していれば、ブロック2内の基準画像とブロック4で切り出された画像は一致しない。そこで、画像3中のブロック4を、4a,4b,4c,…と、X方向(水平方向),Y方向(垂直方向)に1画素づつずらしながら、各ブロック4a,4b,4c,…内の夫々の画像を基準画像と比較し、基準画像と最も相関性が高い比較画像を切り出したブロック位置を求める。   However, if camera shake has occurred, the reference image in block 2 and the image cut out in block 4 do not match. Therefore, the block 4 in the image 3 is shifted in the X direction (horizontal direction) and the Y direction (vertical direction) by 4 pixels from 4a, 4b, 4c,..., And the blocks 4a, 4b, 4c,. Each image is compared with a reference image, and a block position where a comparison image having the highest correlation with the reference image is cut out is obtained.

図6(b)に示す例で、ブロック2の基準画像に対し最も相関性の高い比較画像がブロック4cで切り出されたとすると、画像1に対する画像3の差はベクトル「k」となる。このベクトルkが2画面間の移動ベクトルであり、画像1を表示した次に、画像3を移動ベクトルkと逆方向に移動させて表示すれば、手振れの無い画像を表示することができる。   In the example illustrated in FIG. 6B, if the comparison image having the highest correlation with the reference image of the block 2 is cut out at the block 4 c, the difference between the image 3 and the image 1 is a vector “k”. This vector k is a movement vector between two screens. If image 1 is displayed and then image 3 is moved in the direction opposite to that of movement vector k and displayed, an image without camera shake can be displayed.

この様な原理で移動ベクトル(手振れベクトル)kを求めるのであるが、通常は、図7(a)に示す様に、1画面を複数領域(図示する例では4行4列の計16個)に分割し、各分割画面毎に図7(b)に示す様に移動ベクトルk1〜k16を求め、これらを平均することで、手振れベクトルkを求めている。   The movement vector (shake vector) k is obtained based on such a principle. Normally, as shown in FIG. 7A, one screen is divided into a plurality of areas (in the example shown, a total of 16 in 4 rows and 4 columns). The movement vectors k1 to k16 are obtained for each divided screen as shown in FIG. 7B, and these are averaged to obtain the camera shake vector k.

また、特許文献1に記載されている従来技術では、画面を周辺領域と中央領域とに分け、周辺領域で検出される移動ベクトルは手振れによる移動ベクトルである蓋然性が高いとして手振れベクトルを求めている。   In the prior art described in Patent Document 1, the screen is divided into a peripheral area and a central area, and the motion vector detected in the peripheral area is determined to have a high probability of being a motion vector due to camera shake. .

尚、移動ベクトルの検出技術に関連する他の従来技術として、下記特許文献2等がある。   As another conventional technique related to the movement vector detection technique, there is Patent Document 2 below.

特開平8―251473号公報JP-A-8-251473 特開平6―46316号公報JP-A-6-46316

上述した様に、1画面を複数領域に分割し、各分割画面毎に移動ベクトルを求め、その平均値を画面全体の移動ベクトルつまり手振れによって生じた移動ベクトルとすることで、部分的な領域だけから求めた移動ベクトルより精度良く手振れベクトルを算出することができる。   As described above, one screen is divided into a plurality of areas, a movement vector is obtained for each divided screen, and the average value is used as a movement vector for the entire screen, that is, a movement vector caused by camera shake. Thus, the hand shake vector can be calculated with higher accuracy than the movement vector obtained from the above.

しかし、実際の被写界画像中に何が入り込んでいるかは分からず、一部の分割画面では歩いている人の頭や手の部分が映りその下の分割画面ではその人の足部分が映っている場合があり、また、他の分割画面中では鳥が飛んでいたり、犬や猫が動き回っていたりする。また、周辺領域の全てに移動物体が存在する可能性もある。   However, we do not know what is in the actual scene image, and some of the divided screens show the head and hands of the person walking, and the divided screen below shows the person's feet. In other split screens, birds are flying and dogs and cats are moving around. There is also a possibility that a moving object exists in the entire peripheral area.

このため、図7(b)に示す移動ベクトルk1〜k16は、当該分割画面中の動きのある物体の移動ベクトルと真の手振れベクトルとの合成ベクトルとなり、夫々様々な方向や長さになる。従って、各移動ベクトルk1〜k16を単純に平均したり、また、異常値を示す移動ベクトルを除外して平均値を求めても、高精度に手振れベクトルを算出することができない。   Therefore, the movement vectors k1 to k16 shown in FIG. 7B are combined vectors of the movement vector of the moving object in the divided screen and the true camera shake vector, and have various directions and lengths. Therefore, even if each of the movement vectors k1 to k16 is simply averaged or the average value is obtained by excluding the movement vector indicating the abnormal value, the camera shake vector cannot be calculated with high accuracy.

本発明の目的は、高精度に手振れベクトルを検出することができる手振れベクトル検出方法及びその装置並びに検出プログラム、電子式手振れ補正方法及びその装置並びに補正プログラム、撮像装置を提供することにある。   SUMMARY OF THE INVENTION An object of the present invention is to provide a camera shake vector detection method and apparatus, a detection program, an electronic camera shake correction method and apparatus, a correction program, and an imaging apparatus that can detect a camera shake vector with high accuracy.

本発明の手振れベクトル検出方法,検出プログラム,検出装置は、撮像画面を複数領域に分割し、各分割画面毎に移動ベクトルを算出し、各移動ベクトルから画面全体の手振れベクトルを算出する手振れベクトル検出方法において、前記複数の移動ベクトルのうちペアとなる移動ベクトルの組み合わせを求めると共に、各ペア毎に、ペアを構成する2つの移動ベクトルに所定演算を施したベクトル値を算出し、各ペアの2つの移動ベクトルを求めた2つの分割画面の間の距離を重みとして各ペア毎の前記ベクトル値を加算平均演算して前記手振れベクトルを算出することを特徴とする。   The hand movement vector detection method, detection program, and detection apparatus of the present invention divide an imaging screen into a plurality of regions, calculate a movement vector for each divided screen, and calculate a hand movement vector for the entire screen from each movement vector. In the method, a combination of movement vectors to be paired among the plurality of movement vectors is obtained, and for each pair, a vector value obtained by performing a predetermined operation on two movement vectors constituting the pair is calculated, and 2 of each pair is calculated. The hand movement vector is calculated by calculating an average of the vector values for each pair using a distance between two divided screens for which one movement vector is obtained as a weight.

本発明の手振れベクトル検出方法,検出プログラム,検出装置は、前記重み付けして行う前記加算平均演算の演算式の分母の値が或る閾値以下になった場合には該加算平均演算により求められる手振れベクトルの信頼性が無いと判断して手振れベクトルの検出を停止することを特徴とする。   The shake vector detection method, detection program, and detection apparatus according to the present invention provide the shake that is obtained by the addition average calculation when the denominator value of the arithmetic expression of the addition average calculation performed by weighting is less than a certain threshold value. It is characterized by determining that the vector is not reliable and stopping the detection of the shake vector.

本発明の手振れベクトル検出方法,検出プログラム,検出装置は、前記ペアとなる2つの移動ベクトルの差が所定閾値以上異なる場合には該ペアの前記手振れベクトルへの算出寄与率を“0”とすることを特徴とする。   The shake vector detection method, the detection program, and the detection apparatus according to the present invention set the calculation contribution ratio of the pair to the shake vector to be “0” when the difference between the two movement vectors forming the pair differs by a predetermined threshold or more. It is characterized by that.

本発明の手振れベクトル検出方法,検出プログラム,検出装置は、前記距離が所定閾値以下となる前記ペアは前記手振れベクトルの加算平均演算から除外することを特徴とする。   The camera shake vector detection method, the detection program, and the detection apparatus according to the present invention are characterized in that the pair whose distance is equal to or less than a predetermined threshold is excluded from the arithmetic mean calculation of the camera shake vectors.

本発明の電子式手振れ補正方法,補正プログラム,補正装置は、上記の手振れベクトル検出方法,検出プログラム,検出装置と、検出された手振れベクトルに基づき撮像画像データから出力範囲を切り出すことを特徴とする。   An electronic camera shake correction method, a correction program, and a correction device according to the present invention are characterized by cutting out an output range from captured image data based on the above-described camera shake vector detection method, detection program, and detection device, and the detected camera shake vector. .

本発明の撮像装置は、被写体画像を撮像する固体撮像素子と、該固体撮像素子の出力データを取り込み電子式手振れ補正処理を行う上記記載の電子式手振れ補正装置とを備えることを特徴とする。   An imaging apparatus according to the present invention includes a solid-state imaging device that captures a subject image, and the above-described electronic camera shake correction device that takes in output data of the solid-state imaging device and performs electronic camera shake correction processing.

本発明によれば、手振れベクトルを高精度に算出することができるため、誤差が少なく精度の高い手振れ補正値を求めることができ、自然な電子式手振れ補正が可能となる。   According to the present invention, since the hand shake vector can be calculated with high accuracy, a hand shake correction value with little error and high accuracy can be obtained, and natural electronic hand shake correction can be performed.

以下、本発明の一実施形態について、図面を参照して説明する。   Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

図1は、本発明の一実施形態に係るデジタルカメラのブロック構成図である。このデジタルカメラは、撮像部21と、撮像部21から出力されるアナログの画像データを自動利得調整(AGC)や相関二重サンプリング処理等のアナログ処理するアナログ信号処理部22と、アナログ信号処理部22から出力されるアナログ画像データをデジタル画像データに変換するアナログデジタル変換部(A/D)23と、後述のシステム制御部(CPU)29からの指示によってA/D23,アナログ信号処理部22,撮像部21の駆動制御を行う駆動部(タイミングジェネレータTGを含む)24と、CPU29からの指示によって発光するフラッシュ25とを備える。   FIG. 1 is a block diagram of a digital camera according to an embodiment of the present invention. The digital camera includes an imaging unit 21, an analog signal processing unit 22 that performs analog processing such as automatic gain adjustment (AGC) and correlated double sampling processing on analog image data output from the imaging unit 21, and an analog signal processing unit. An analog / digital conversion unit (A / D) 23 that converts analog image data output from the digital image data into digital image data, and an A / D 23, an analog signal processing unit 22, according to instructions from a system control unit (CPU) 29 described later, A driving unit (including a timing generator TG) 24 that controls driving of the imaging unit 21 and a flash 25 that emits light in response to an instruction from the CPU 29 are provided.

撮像部21は、被写界からの光を集光する光学レンズ系21aと、該光学レンズ系21aを通った光を絞る絞りやメカニカルシャッタ21bと、光学レンズ系21aによって集光され絞りによって絞られた光を受光し撮像画像データ(アナログ画像データ)を出力する固体撮像素子21cとを備える。   The imaging unit 21 collects light from the object field, a diaphragm or a mechanical shutter 21b that condenses the light that has passed through the optical lens system 21a, and a diaphragm that is condensed by the optical lens system 21a. A solid-state image sensor 21c that receives the received light and outputs captured image data (analog image data).

本実施形態のデジタルカメラは更に、A/D23から出力されるデジタル画像データを取り込みホワイトバランス補正,RGB/YC変換処理等を行うデジタル信号処理部26と、画像データをJPEG形式などの画像データに圧縮したり逆に伸長したりする圧縮/伸長処理部27と、メニューなどを表示したりスルー画像や撮像画像を表示する表示部28と、デジタルカメラ全体を統括制御するシステム制御部(CPU)29と、フレームメモリ等の内部メモリ30と、JPEG画像データ等を格納する記録メディア32との間のインタフェース処理を行うメディアインタフェース(I/F)部31と、これらを相互に接続するバス40とを備え、また、システム制御部29には、ユーザからの指示入力を行う操作部23が接続されている。   The digital camera of this embodiment further includes a digital signal processing unit 26 that takes in digital image data output from the A / D 23 and performs white balance correction, RGB / YC conversion processing, and the like, and converts the image data into image data such as JPEG format. A compression / expansion processing unit 27 that compresses or reversely expands, a display unit 28 that displays a menu, displays a through image or a captured image, and a system control unit (CPU) 29 that performs overall control of the entire digital camera A media interface (I / F) unit 31 that performs an interface process between an internal memory 30 such as a frame memory and a recording medium 32 that stores JPEG image data, and a bus 40 that interconnects these. In addition, the system control unit 29 is connected to an operation unit 23 for inputting instructions from the user.

図2は、図1に示したデジタルカメラで電子式手振れ補正処理を行う場合に構成される電子式手振れ補正処理装置50の機能構成図である。この電子式手振れ補正処理装置50は、ユーザが図1に示す操作部33から電子式手振れ補正処理を行う旨の指示入力があったとき、システム制御部29が手振れベクトル検出プログラムを含む電子式手振れ補正処理プログラムを起動することで、システム制御部29が配下のデジタル信号処理部26,内部メモリ30等を用いて構成する。   FIG. 2 is a functional configuration diagram of an electronic camera shake correction processing device 50 configured when electronic camera shake correction processing is performed by the digital camera shown in FIG. In the electronic camera shake correction processing device 50, when the user inputs an instruction to perform electronic camera shake correction processing from the operation unit 33 shown in FIG. 1, the system control unit 29 includes an electronic camera shake including a camera shake vector detection program. By starting the correction processing program, the system control unit 29 is configured using the subordinate digital signal processing unit 26, the internal memory 30, and the like.

この電子式手振れ補正処理装置50は、固体撮像素子21cから出力される画像データを間引き処理して縮小画像を生成する間引き処理部51と、nフレーム目(偶数フレーム目)の間引き縮小画像データを格納する第1メモリ52と、n+1フレーム目(奇数フレーム目)の間引き縮小画像データを格納する第2メモリ53と、両メモリ52,53から縮小画像データを取り込み手振れベクトルを検出する手振れベクトル検出処理部55と、検出された手振れベクトルに基づき内部メモリ30の撮像画像データの読み出し範囲(切り出し範囲)を決める読出制御処理部56とを備える。   This electronic camera shake correction processing device 50 performs decimation processing on the image data output from the solid-state imaging device 21c to generate a reduced image, and the nth frame (even frame) decimation reduced image data. A first memory 52 to store, a second memory 53 to store the thinned reduced image data of the (n + 1) th frame (odd frame), and a hand shake vector detection process for detecting the hand shake vector by fetching the reduced image data from both memories 52 and 53 And a read control processing unit 56 that determines a read range (cutout range) of the captured image data in the internal memory 30 based on the detected camera shake vector.

本実施形態では、手振れベクトル検出処理の高速化を図るために間引き処理部51で基準画像,比較画像の夫々の縮小画像を生成している。演算処理装置として高性能なものが使用できメモリ容量に余裕があれば、間引き処理せずに、元画像データを用いて手振れベクトルを算出することも可能である。   In the present embodiment, in order to increase the speed of the camera shake vector detection process, the thinning processing unit 51 generates reduced images of the reference image and the comparison image. If a high-performance arithmetic processing device can be used and the memory capacity is sufficient, it is also possible to calculate a camera shake vector using original image data without performing thinning processing.

図3は、図2に示す手振れベクトル検出処理部55の詳細構成図である。この手振れベクトル検出部55は、基準画像切出回路61と、比較画像切出回路62と、両切出回路61,62と第1,第2メモリ52,53との接続をフレーム切替信号に基づき切り替える切替スイッチ63と、基準画像切出回路61から切り出された基準画像と比較画像切出回路62から切り出された比較画像との比較演算を行い各分割画面毎の移動ベクトルを算出する比較演算器64と、各移動ベクトルから詳細は後述するようにして手振れベクトルを算出する重み付け演算器65とを備える。   FIG. 3 is a detailed configuration diagram of the camera shake vector detection processing unit 55 shown in FIG. The hand movement vector detecting unit 55 connects the reference image cutting circuit 61, the comparison image cutting circuit 62, the both cutting circuits 61 and 62, and the first and second memories 52 and 53 based on the frame switching signal. A changeover switch 63 for switching, and a comparison operation unit for performing a comparison operation between the reference image cut out from the reference image cut-out circuit 61 and the comparison image cut out from the comparison image cut-out circuit 62 to calculate a movement vector for each divided screen. 64 and a weighting calculator 65 for calculating a hand movement vector from each movement vector as will be described in detail later.

本実施形態では、図7(a)に示す様に1画面を4行4列の計16個の分割画面に分割し、図7(b)に示す各分割画面毎の移動ベクトルk1〜k16を算出する。計16個の移動ベクトルを並列演算により同時に算出することも可能である。   In this embodiment, as shown in FIG. 7A, one screen is divided into a total of 16 divided screens of 4 rows and 4 columns, and movement vectors k1 to k16 for each divided screen shown in FIG. calculate. It is also possible to calculate a total of 16 movement vectors simultaneously by parallel operation.

しかし、本実施形態では、♯1から♯16までの分割画面における夫々の移動ベクトルを順に計算するため、比較演算器64は、基準画像切出回路61や比較画像切出回路62に探索範囲♯1〜♯16を順に指示する信号を出力すると共に、指示した探索範囲内における切出ブロック(図6(b)における4a,4b,4c等)の移動指示を比較画像切出回路62に出力する様になっている。   However, in this embodiment, since the respective movement vectors in the divided screens from # 1 to # 16 are calculated in order, the comparison arithmetic unit 64 causes the reference image cutting circuit 61 and the comparative image cutting circuit 62 to search the search range #. 1 to # 16 are output in order, and a movement instruction for the extracted blocks (4a, 4b, 4c, etc. in FIG. 6B) within the specified search range is output to the comparative image extraction circuit 62. It is like.

次に、上述した構成の電子式手振れ補正処理装置50における動画の手振れ補正処理について説明する。固体撮像素子21cからは、偶数フレームの撮像画像データと奇数フレームの撮像画像データとが交互に出力され、各撮像画像データは、内部メモリ30に格納される。   Next, moving image shake correction processing in the electronic shake correction processing device 50 having the above-described configuration will be described. From the solid-state imaging device 21 c, even-frame captured image data and odd-frame captured image data are alternately output, and each captured image data is stored in the internal memory 30.

固体撮像素子21cから出力される撮像画像データは、内部メモリ30への格納と並行して、間引き処理部51を通って縮小画像データとなり、メモリ52,53に格納される。   In parallel with the storage in the internal memory 30, the captured image data output from the solid-state imaging device 21 c passes through the thinning processing unit 51 and becomes reduced image data, and is stored in the memories 52 and 53.

今、nフレーム目の画像データに対してn+1フレーム目の画像データの手振れベクトルを検出するとする。つまり、nフレーム目の画像データ(縮小画像データ)から基準画像を切り出し、n+1フレーム目の画像データ(縮小画像データ)から比較画像を切り出し、両者の相関性を求める。   Assume that a camera shake vector of image data in the (n + 1) th frame is detected with respect to image data in the nth frame. That is, the reference image is cut out from the image data (reduced image data) of the nth frame, the comparison image is cut out from the image data (reduced image data) of the (n + 1) th frame, and the correlation between both is obtained.

先ず、♯1分割画面における基準画像を所定ブロック枠によって切出回路61が切り出して比較演算器64に出力する共に、♯1分割画面における比較画像を所定ブロック枠と同一大きさの切出ブロックによって切出回路62が切り出し比較演算器64に出力する。   First, the cutout circuit 61 cuts out the reference image in the # 1 divided screen by a predetermined block frame and outputs it to the comparison computing unit 64, and also compares the comparison image in the # 1 divided screen by a cutout block having the same size as the predetermined block frame. The cut-out circuit 62 outputs the cut-out comparison calculator 64.

比較演算器64は、基準画像の画素データと比較画像の画素データとの差分を縮小画像の1画素単位に求めると共に縮小画像の全画素についての前記差分の積算値を求める。そして、この積算値が求まる毎に移動指示を比較画像切出回路62に出力して切出ブロック位置を縮小画像の1画素単位で移動させ、移動後の比較画像と基準画像との上記積算値を求める、という動作を繰り返す。   The comparison computing unit 64 obtains a difference between the pixel data of the reference image and the pixel data of the comparison image in units of one pixel of the reduced image and obtains an integrated value of the differences for all the pixels of the reduced image. Each time the integrated value is obtained, a movement instruction is output to the comparative image cutting circuit 62 to move the cut block position in units of one pixel of the reduced image, and the integrated value of the comparative image after the movement and the reference image is moved. The operation of asking for is repeated.

この様にして求めた各積算値のうち、最小値を示す比較画像が基準画像との相関性が最も高いということができ、この比較画像の切出位置と基準画像の切出位置との差が♯1分割画面における移動ベクトルとなる。   It can be said that the comparison image showing the minimum value among the respective integrated values thus obtained has the highest correlation with the reference image, and the difference between the cut-out position of the comparison image and the cut-out position of the reference image Becomes the movement vector in the # 1 divided screen.

斯かる動作を♯2〜♯16の分割画面でも行い、例えば図4に示す様に得られた16個の移動ベクトルk1〜k16を重み付け演算器65に渡す。重み付け演算器65は、比較演算器64から渡された16個の移動ベクトルk1〜k16を次式に基づき演算処理し、画面全体の手振れベクトルkを算出する。   Such an operation is also performed on the divided screens # 2 to # 16, and for example, 16 movement vectors k1 to k16 obtained as shown in FIG. The weighting calculator 65 calculates the movement vector k for the entire screen by calculating the 16 movement vectors k1 to k16 passed from the comparison calculator 64 based on the following equation.

Figure 0004696055
Figure 0004696055

ここで、分母の「f」とはペア成立で“1”、ペア不成立で“0”となる値である。ペアとは、移動ベクトルk1〜k16の中の任意の2つの組を指す。   Here, the denominator “f” is a value that is “1” when the pair is established and “0” when the pair is not established. A pair refers to any two sets in the movement vectors k1 to k16.

例えば、図4に示す16個の移動ベクトルk1〜k16の中の例えば(k2,k11)の組を指す。そして、ベクトルk2とベクトルk11との差が所定閾値A以下のとき、ペア成立となり、所定閾値Aを越えて違いが大きい場合にはペア不成立となる。   For example, it indicates a set of (k2, k11), for example, among the 16 movement vectors k1 to k16 shown in FIG. When the difference between the vector k2 and the vector k11 is equal to or less than the predetermined threshold A, the pair is established, and when the difference exceeds the predetermined threshold A, the pair is not established.

「Pair値」とは、ペア不成立の場合には“0”となり、ペア成立時にはベクトルk2とベクトルk11に所定演算を施したベクトル値、例えば加算平均ベクトル値となる。   The “Pair value” is “0” when the pair is not established, and is a vector value obtained by performing a predetermined operation on the vector k2 and the vector k11, for example, an addition average vector value when the pair is established.

「L(n)」とは、図5に示す様に、ペアがk2,k11の場合には両ベクトル間(分割画面♯2,♯11間)の距離となる。   As shown in FIG. 5, “L (n)” is the distance between both vectors (between divided screens # 2 and # 11) when the pair is k2 and k11.

即ち、数1では、全てのペアの総計の重み付き平均値を手振れベクトルとして算出している。k1とペアになる組は計15組存在し、k2とペアになる組も計15組存在し、…、k16とペアになる組も計15組存在する。各ペアについて距離を重みとして加算平均することで、精度の高い手振れベクトルを算出することが可能となる。   That is, in Equation 1, the weighted average value of the sum of all pairs is calculated as a shake vector. There are a total of 15 pairs that are paired with k1, 15 pairs that are paired with k2,..., 15 pairs that are paired with k16. It is possible to calculate a hand shake vector with high accuracy by averaging the distances as weights for each pair.

この様に、本実施形態では、画面中の場所に関係なく、距離が離れた位置で同じ様な方向,長さの移動ベクトルが検出された場合には、その移動ベクトルは「手振れベクトル」の蓋然性が高いとしてその寄与率を高くし、同じ様な方向,長さの移動ベクトルであっても距離が近い場合には移動物体による移動ベクトルである蓋然性が高いため寄与率を小さくしている。このため、移動物体が画面のどの場所に存在していても、手振れベクトルの算出精度を向上させることができる。   As described above, in the present embodiment, when a movement vector having the same direction and length is detected at a distance away from each other regardless of the location on the screen, the movement vector is the “shake vector”. If the probability is high, the contribution ratio is increased, and even if the movement vectors have the same direction and length, the contribution ratio is reduced because the probability that the movement vector is a movement vector is high. For this reason, it is possible to improve the calculation accuracy of the hand shake vector regardless of where the moving object is present on the screen.

算出された手振れベクトルは図2の読出制御処理部56に出力され、内部メモリ30から切り出され出力されるn+1フレーム画像の切出範囲(出力範囲)が制御される。   The calculated camera shake vector is output to the read control processing unit 56 in FIG. 2, and the cutout range (output range) of the n + 1 frame image cut out and output from the internal memory 30 is controlled.

次に、n+2フレーム目の撮像画像データが固体撮像素子21cから出力され内部メモリ30に格納されると共に間引き処理部51で縮小画像データが生成されると、この縮小画像データはメモリ52に上書きされる。そして、切替スイッチ63が切り替わり、今度は、n+1フレーム縮小画像から基準画像が切り出され、n+2フレーム縮小画像から比較画像が切り出され、上記と同様にして手振れベクトルが検出される。   Next, when the captured image data of the (n + 2) th frame is output from the solid-state imaging device 21c and stored in the internal memory 30, and the reduced image data is generated by the thinning processing unit 51, the reduced image data is overwritten in the memory 52. The Then, the changeover switch 63 is switched, and this time, the reference image is cut out from the n + 1 frame reduced image, the comparison image is cut out from the n + 2 frame reduced image, and the camera shake vector is detected in the same manner as described above.

上述した実施形態では、画面を16分割して16個の移動ベクトルを求めているが、画面を更に細分化して各分割画面の移動ベクトルを求め、手振れベクトルを算出することも可能である。しかし、この場合には、ペア数が増大して計算負荷が高くなってしまうという問題が新たに生じる。そこでこの様な場合には、数1において、距離L(n)が閾値以下の短距離の場合(距離L(n)は既知である。)には計算から除外し、実際に計算するペア数を減らすことが効果的である。   In the above-described embodiment, the screen is divided into 16 to obtain 16 movement vectors. However, it is also possible to further subdivide the screen to obtain the movement vector of each divided screen and calculate the hand movement vector. However, in this case, a new problem arises that the number of pairs increases and the calculation load increases. Therefore, in such a case, in Equation 1, when the distance L (n) is a short distance equal to or smaller than the threshold (distance L (n) is known), the number of pairs to be actually calculated is excluded from the calculation. It is effective to reduce

尚、数1では分母が存在するため、分母が“0”となることが起こり得る。即ち、全て分割画面における移動ベクトルがバラバラとなり、全ペアがペア不成立になってしまう場合がある。例えば、暗い夜空を撮影した場合とか、同一色の壁を撮影した場合には、各分割画面における移動ベクトルはバラバラとなる。この様な場合には、手振れ補正処理を停止する。   Since the denominator exists in Equation 1, the denominator may become “0”. That is, there are cases where the movement vectors in all the divided screens are disjoint and all pairs are not established. For example, when a dark night sky is photographed or when a wall of the same color is photographed, the movement vectors in the divided screens vary. In such a case, the camera shake correction process is stopped.

または、数1の分母を計算したとき、算出値が所定閾値より小さいか否かを判定し、小さい場合には、数1で求める手振れベクトルの信頼性が無いと判断できるため、手振れベクトルの算出を停止して手振れ補正を一時停止し、あるいは別の方法で手振れベクトルを算出する。   Alternatively, when the denominator of Formula 1 is calculated, it is determined whether or not the calculated value is smaller than a predetermined threshold value. If the calculated value is small, it can be determined that the shake vector obtained in Formula 1 is not reliable. Is stopped to suspend the camera shake correction, or the camera shake vector is calculated by another method.

上述した実施形態では、デジタルカメラ内部での処理として説明したが、固体撮像素子21cから出力される画像データを全て記録しておき、これを外部のパーソナルコンピュータ等に取り込み、パーソナルコンピュータが手振れベクトル検出プログラムや電子式手振れ補正プログラムを実行することでも同様に処理が可能である。   In the above-described embodiment, the processing is described as the processing inside the digital camera. However, all the image data output from the solid-state imaging device 21c is recorded, and this is captured in an external personal computer or the like. The same processing can be performed by executing a program or an electronic image stabilization program.

本発明に係る手振れベクトル検出方法等は、高精度に手振れベクトルを検出できるため、これを電子式手振れ補正機能付デジタルカメラに適用すると有用である。   Since the camera shake vector detection method and the like according to the present invention can detect a camera shake vector with high accuracy, it is useful to apply this to a digital camera with an electronic camera shake correction function.

本発明の一実施形態に係るデジタルカメラのブロック構成図である。It is a block block diagram of the digital camera which concerns on one Embodiment of this invention. 本発明の一実施形態に係る電子式手振れ補正処理装置の機能構成図である。1 is a functional configuration diagram of an electronic camera shake correction processing apparatus according to an embodiment of the present invention. 図2に示す手振れベクトル検出処理部の詳細構成図である。FIG. 3 is a detailed configuration diagram of a camera shake vector detection processing unit illustrated in FIG. 2. 各分割画面毎に求めた移動ベクトルの例示図である。It is an illustration figure of the movement vector calculated | required for every divided screen. ペアとなる移動ベクトル間の距離L(n)の説明図である。It is explanatory drawing of distance L (n) between the movement vectors used as a pair. 移動ベクトルの算出原理説明図である。It is explanatory drawing of the calculation principle of a movement vector. 分割画面の説明図である。It is explanatory drawing of a division | segmentation screen.

符号の説明Explanation of symbols

21 撮像部
21c 固体撮像素子
26 デジタル信号処理部
29 システム制御部
50 電子式手振れ補正処理部
55 手振れベクトル検出処理部
61 基準画像切出回路
62 比較画像切出回路
64 比較演算器
65 重み付け演算器
21 Imaging unit 21c Solid-state imaging device 26 Digital signal processing unit 29 System control unit 50 Electronic camera shake correction processing unit 55 Camera shake vector detection processing unit 61 Reference image extraction circuit 62 Comparative image extraction circuit 64 Comparison calculator 65 Weighting calculator

Claims (16)

撮像画面を複数領域に分割し、各分割画面毎に移動ベクトルを算出し、各移動ベクトルから画面全体の手振れベクトルを算出する手振れベクトル検出方法において、前記複数の移動ベクトルのうちペアとなる移動ベクトルの組み合わせを求めると共に、各ペア毎に、ペアを構成する2つの移動ベクトルに所定演算を施したベクトル値を算出し、各ペアの2つの移動ベクトルを求めた2つの分割画面の間の距離を重みとして各ペア毎の前記ベクトル値を加算平均演算して前記手振れベクトルを算出することを特徴とする手振れベクトル検出方法。   In the hand movement vector detection method of dividing the imaging screen into a plurality of areas, calculating a movement vector for each divided screen, and calculating a hand movement vector of the entire screen from each movement vector, the pair of movement vectors among the plurality of movement vectors For each pair, a vector value obtained by performing a predetermined operation on the two movement vectors constituting the pair is calculated, and the distance between the two divided screens for obtaining the two movement vectors of each pair is calculated. A camera shake vector detection method, wherein the camera shake vector is calculated by calculating an average of the vector values for each pair as a weight. 前記重み付けして行う前記加算平均演算の演算式の分母の値が或る閾値以下になった場合には該加算平均演算により求められる手振れベクトルの信頼性が無いと判断して手振れベクトルの検出を停止することを特徴とする請求項1に記載の手振れベクトル検出方法。   When the denominator value of the arithmetic expression of the weighted average calculation performed by the weighting is less than a certain threshold value, it is determined that there is no reliability of the shake vector obtained by the average calculation, and the shake vector is detected. The camera shake vector detection method according to claim 1, wherein the camera shake vector detection method is stopped. 前記ペアとなる2つの移動ベクトルの差が所定閾値以上異なる場合には該ペアの前記手振れベクトルへの算出寄与率を“0”とすることを特徴とする請求項1または請求項2に記載の手振れベクトル検出方法。   The calculation contribution rate to the camera shake vector of the pair is set to “0” when the difference between the two movement vectors that form the pair differs by a predetermined threshold value or more. Camera shake vector detection method. 前記距離が所定閾値以下となる前記ペアは前記手振れベクトルの加算平均演算から除外することを特徴とする請求項1乃至請求項3のいずれかに記載の手振れベクトル検出方法。   4. The camera shake vector detection method according to claim 1, wherein the pair whose distance is equal to or less than a predetermined threshold is excluded from the arithmetic mean calculation of the camera shake vectors. 5. 撮像画像データから出力範囲を切り出すときに請求項1乃至請求項4のいずれかに記載の手振れベクトル検出方法により検出された手振れベクトルに基づき前記出力範囲を決めることを特徴とする電子式手振れ補正方法。   5. An electronic camera shake correction method, wherein the output range is determined based on a camera shake vector detected by the camera shake vector detection method according to claim 1 when the output range is cut out from captured image data. . 撮像画面を複数領域に分割し、各分割画面毎に移動ベクトルを算出し、各移動ベクトルから画面全体の手振れベクトルを算出する手振れベクトル検出プログラムにおいて、前記複数の移動ベクトルのうちペアとなる移動ベクトルの組み合わせを求めると共に各ペア毎にペアを構成する2つの移動ベクトルに所定演算を施したベクトル値を算出するステップと、各ペアの2つの移動ベクトルを求めた2つの分割画面の間の距離を重みとして各ペア毎の前記ベクトル値を加算平均演算して前記手振れベクトルを算出するステップとを備えることを特徴とする手振れベクトル検出プログラム。   In a hand shake vector detection program that divides an imaging screen into a plurality of areas, calculates a motion vector for each divided screen, and calculates a hand shake vector of the entire screen from each motion vector, a pair of motion vectors among the plurality of motion vectors And calculating a vector value obtained by performing a predetermined operation on the two movement vectors constituting the pair for each pair, and the distance between the two divided screens for obtaining the two movement vectors of each pair. And a step of calculating the camera shake vector by calculating an average of the vector values for each pair as weights. 前記重み付けして行う前記加算平均演算の演算式の分母の値が或る閾値以下になった場合には該加算平均演算により求められる手振れベクトルの信頼性が無いと判断して手振れベクトルの検出を停止することを特徴とする請求項6に記載の手振れベクトル検出プログラム。   When the denominator value of the arithmetic expression of the weighted average calculation performed by the weighting is less than a certain threshold value, it is determined that there is no reliability of the shake vector obtained by the average calculation, and the shake vector is detected. The program according to claim 6, which stops. 前記ペアとなる2つの移動ベクトルの差が所定閾値以上異なる場合には該ペアの前記手振れベクトルへの算出寄与率を“0”とすることを特徴とする請求項6または請求項7に記載の手振れベクトル検出プログラム。   8. The calculation contribution rate of the pair to the camera shake vector is set to “0” when the difference between the pair of two movement vectors differs by a predetermined threshold value or more. 8. Camera shake vector detection program. 前記距離が所定閾値以下となる前記ペアは前記手振れベクトルの加算平均演算から除外することを特徴とする請求項6乃至請求項8のいずれかに記載の手振れベクトル検出プログラム。 9. The camera shake vector detection program according to claim 6, wherein the pair whose distance is equal to or less than a predetermined threshold is excluded from the arithmetic mean calculation of the camera shake vectors. 請求項6乃至請求項9のいずれかに記載の手振れベクトル検出プログラムと、撮像画像データから出力範囲を切り出すときに前記手振れベクトル検出プログラムにより検出された手振れベクトルに基づき前記出力範囲を決めるステップとを備えることを特徴とする電子式手振れ補正プログラム。   A camera shake vector detection program according to any one of claims 6 to 9, and a step of determining the output range based on a camera shake vector detected by the camera shake vector detection program when the output range is cut out from captured image data. An electronic camera shake correction program characterized by comprising: 撮像画面を複数領域に分割し、各分割画面毎に移動ベクトルを算出し、各移動ベクトルから画面全体の手振れベクトルを算出する手振れベクトル検出装置において、前記複数の移動ベクトルのうちペアとなる移動ベクトルの組み合わせを求めると共に各ペア毎にペアを構成する2つの移動ベクトルに所定演算を施したベクトル値を算出する手段と、各ペアの2つの移動ベクトルを求めた2つの分割画面の間の距離を重みとして各ペア毎の前記ベクトル値を加算平均演算して前記手振れベクトルを算出する手段とを備えることを特徴とする手振れベクトル検出装置。   In a camera shake vector detection device that divides an imaging screen into a plurality of areas, calculates a motion vector for each divided screen, and calculates a camera shake vector of the entire screen from each of the motion vectors, a pair of motion vectors among the plurality of motion vectors And calculating a vector value obtained by performing a predetermined operation on the two movement vectors constituting the pair for each pair, and the distance between the two divided screens for obtaining the two movement vectors of each pair And a means for calculating the hand shake vector by calculating an average of the vector values for each pair as a weight. 前記重み付けして行う前記加算平均演算の演算式の分母の値が或る閾値以下になった場合には該加算平均演算により求められる手振れベクトルの信頼性が無いと判断して手振れベクトルの検出を停止することを特徴とする請求項11に記載の手振れベクトル検出装置。   When the denominator value of the arithmetic expression of the weighted average calculation performed by the weighting is less than a certain threshold value, it is determined that there is no reliability of the shake vector obtained by the average calculation, and the shake vector is detected. The hand movement vector detection device according to claim 11, wherein the hand movement vector detection device is stopped. 前記ペアとなる2つの移動ベクトルの差が所定閾値以上異なる場合には該ペアの前記手振れベクトルへの算出寄与率を“0”とすることを特徴とする請求項11または請求項12に記載の手振れベクトル検出装置。   13. The calculation contribution ratio of the pair to the hand movement vector is set to “0” when the difference between the two movement vectors forming the pair differs by a predetermined threshold or more. 13. Hand shake vector detection device. 前記距離が所定閾値以下となる前記ペアは前記手振れベクトルの加算平均演算から除外することを特徴とする請求項11乃至請求項13のいずれかに記載の手振れベクトル検出装置。   The camera shake vector detection device according to claim 11, wherein the pair whose distance is equal to or less than a predetermined threshold is excluded from the arithmetic mean calculation of the camera shake vectors. 請求項11乃至請求項14のいずれかに記載の手振れベクトル検出装置と、撮像画像データから出力範囲を切り出すときに前記手振れベクトル検出装置により検出された手振れベクトルに基づき前記出力範囲を決める読出制御処理手段とを備えることを特徴とする電子式手振れ補正装置。   15. The shake vector detecting device according to claim 11, and a read control process for determining the output range based on a shake vector detected by the shake vector detecting device when an output range is cut out from captured image data. And an electronic camera shake correction device. 被写体画像を撮像する固体撮像素子と、該固体撮像素子の出力データを取り込み電子式手振れ補正処理を行う請求項15に記載の電子式手振れ補正装置とを備えることを特徴とする撮像装置。   An image pickup apparatus comprising: a solid-state image pickup device that picks up a subject image; and an electronic camera shake correction device according to claim 15 that takes in output data of the solid-state image pickup device and performs electronic camera shake correction processing.
JP2006344317A 2006-12-21 2006-12-21 Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus Expired - Fee Related JP4696055B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006344317A JP4696055B2 (en) 2006-12-21 2006-12-21 Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006344317A JP4696055B2 (en) 2006-12-21 2006-12-21 Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus

Publications (2)

Publication Number Publication Date
JP2008160273A JP2008160273A (en) 2008-07-10
JP4696055B2 true JP4696055B2 (en) 2011-06-08

Family

ID=39660733

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006344317A Expired - Fee Related JP4696055B2 (en) 2006-12-21 2006-12-21 Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus

Country Status (1)

Country Link
JP (1) JP4696055B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005250561A (en) * 2004-03-01 2005-09-15 Sony Corp Motion vector detecting device, motion vector detecting method and computer program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04180370A (en) * 1990-11-14 1992-06-26 Matsushita Electric Ind Co Ltd Motion vector detector and fluctuation corrector for image
JP3465264B2 (en) * 1991-04-05 2003-11-10 ソニー株式会社 Apparatus and method for detecting motion of video data

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005250561A (en) * 2004-03-01 2005-09-15 Sony Corp Motion vector detecting device, motion vector detecting method and computer program

Also Published As

Publication number Publication date
JP2008160273A (en) 2008-07-10

Similar Documents

Publication Publication Date Title
JP4656216B2 (en) Imaging apparatus, image processing apparatus, image processing method, program, and recording medium
EP2330812A1 (en) Apparatus for generating a panoramic image, method for generating a panoramic image, and computer-readable medium
US9380206B2 (en) Image processing apparatus that combines images
JP4759524B2 (en) Electronic camera shake correction method and apparatus, electronic camera shake correction program, and imaging apparatus
US20120169840A1 (en) Image Processing Device and Method, and Program
US11070729B2 (en) Image processing apparatus capable of detecting moving objects, control method thereof, and image capture apparatus
JP4876065B2 (en) Motion vector detection device, motion vector detection method, imaging device, and program
JP2013165485A (en) Image processing apparatus, image capturing apparatus, and computer program
US20160314591A1 (en) Image processing apparatus, distance measuring apparatus, imaging apparatus, and image processing method
JP2006245677A (en) Image processor, image processing method, and image processing program
JP2017175364A (en) Image processing device, imaging device, and control method of image processing device
KR101025133B1 (en) Video surveillance system and video surveillance method thereof
KR102592745B1 (en) Posture estimating apparatus, posture estimating method and computer program stored in recording medium
US10116865B2 (en) Image processing apparatus and image processing method for calculating motion vector between images with different in-focus positions
JP4807582B2 (en) Image processing apparatus, imaging apparatus, and program thereof
JP5118590B2 (en) Subject tracking method and imaging apparatus
JP4696055B2 (en) Camera shake vector detection method and apparatus, detection program, electronic camera shake correction method and apparatus, correction program, and imaging apparatus
JP4877186B2 (en) Image processing apparatus, image processing method, and program
JP2008160274A (en) Motion vector detection method, its apparatus and its program, electronic hand-blur correction method, its apparatus and its program, as well as imaging apparatus
JP2010257041A (en) Object tracking device and camera
JP2009027437A (en) Image processor, image processing method and imaging device
JP2010093451A (en) Imaging apparatus and program for imaging apparatus
US20130236055A1 (en) Image analysis device for calculating vector for adjusting a composite position between images
JP2008048152A (en) Moving picture processing apparatus, moving picture photographing apparatus and moving picture photographing program
JP2014216830A (en) Image tracking device, image tracking method and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090904

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110113

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110228

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140304

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees