JP2007259103A - Method of calculating motion vector between two screens and apparatus thereof - Google Patents

Method of calculating motion vector between two screens and apparatus thereof Download PDF

Info

Publication number
JP2007259103A
JP2007259103A JP2006081169A JP2006081169A JP2007259103A JP 2007259103 A JP2007259103 A JP 2007259103A JP 2006081169 A JP2006081169 A JP 2006081169A JP 2006081169 A JP2006081169 A JP 2006081169A JP 2007259103 A JP2007259103 A JP 2007259103A
Authority
JP
Japan
Prior art keywords
value
screen
image
movement vector
highest
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2006081169A
Other languages
Japanese (ja)
Inventor
Hiroshi Iwabuchi
浩志 岩淵
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 JP2006081169A priority Critical patent/JP2007259103A/en
Publication of JP2007259103A publication Critical patent/JP2007259103A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To enable highly accurate calculation of a motion vector between two screens. <P>SOLUTION: Images of the first and second screens are each divided into a plurality of same regions, correlation values between a reference image segmented from the first screen and each of comparing images segmented from the second screen while shifting its position is obtained for each of the divided regions, the maximum values Mh, ..., Mk, Mj, ... of the correlation values are calculated for each of the divided regions, and a motion vector of the second screen for the first screen is calculated using a motion vector for each of the divided regions in which the remaining maximum values Mk, Mj, ... other than the maximum value Mh, ... below a predetermined threshold are calculated, among the maximum values. <P>COPYRIGHT: (C)2008,JPO&INPIT

Description

本発明は、手振れ等の移動ベクトル(移動量及び移動方向)を検出する2画面間の移動ベクトル算出方法及びその装置に関する。   The present invention relates to a method and apparatus for calculating a movement vector between two screens for detecting a movement vector (movement amount and movement direction) such as camera shake.

例えば、動画撮影機能を有するデジタルスチルカメラやデジタルビデオカメラ等を手に持ち動画を撮影する場合、カメラを持つ手が振れると、あるフレームの画像中に映っている静止物画像の位置が次フレームの画面では移動してしまい、見づらい動画になってしまう。そこで、あるフレームの画像に対して次フレームの画像の移動ベクトルを検出し、画像が揺れない様に手ぶれ補正を行うことが行われている。   For example, when shooting a movie with a digital still camera or digital video camera with a movie shooting function in hand, the position of the still object image in the image of a certain frame is the next frame when the hand holding the camera shakes. It moves on the screen and becomes a movie that is difficult to see. Therefore, a movement vector of an image of the next frame is detected for 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内の画像を基準画像とすると、(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 block 4 indicated by the same predetermined address in the image 3 of the (N + 1) th frame is used. If the cut out image 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方向(垂直方向)にずらしながら、各ブロック4a,4b,4c,…内の夫々の画像を基準画像と比較し、基準画像と最も相関性が高い比較画像を切り出したブロック位置を求める。基準画像と比較画像の相関性を求める演算は、基準画像と比較画像の1画素1画素を比較し各差分のブロック内総画素の総和(積算値)の最小値を求めることで行う。   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) from 4a, 4b, 4c,..., And the respective images in the blocks 4a, 4b, 4c,. Are compared with the reference image, and the block position where the comparison image having the highest correlation with the reference image is cut out is obtained. The calculation for obtaining the correlation between the reference image and the comparison image is performed by comparing one pixel per pixel of the reference image and the comparison image to obtain the minimum value of the total sum (integrated value) of the total pixels in each block of each difference.

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

尚、手振れ補正に関連する従来技術として、下記特許文献1,2等がある。   Note that, as conventional techniques related to camera shake correction, there are Patent Documents 1 and 2 below.

特開2003―331292号公報JP 2003-331292 A 特開2004―146995号公報JP 2004-14695 A

2画面間の移動ベクトルを実際に求める場合、例えば図7(a)に示す様に、1画面の画像1を複数領域(図示する例では16個の領域)5に分割し、各分割領域5毎に、分割領域5内に定めたブロック2の次フレーム画像(探索範囲は夫々の分割領域内)に対する移動ベクトルを算出する。   When actually obtaining a movement vector between two screens, for example, as shown in FIG. 7A, an image 1 of one screen is divided into a plurality of regions (16 regions in the illustrated example) 5 and each divided region 5 is divided. Every time, a movement vector for the next frame image of the block 2 determined in the divided area 5 (the search range is in each divided area) is calculated.

そして、図7(b)に示す様に算出された16個の移動ベクトルk1,k2,k3,…,k16の平均値K〔=(k1+k2+k3+……+k16)/16〕を求め、これを2画面間の移動ベクトルとする。   Then, an average value K [= (k1 + k2 + k3 +... + K16) / 16] of 16 movement vectors k1, k2, k3,..., K16 calculated as shown in FIG. It is set as the movement vector between.

これにより、撮像画像中における部分的な移動、例えば画像中の一部で小動物の被写体が移動している場合でも、この部分的な移動に惑わされることなく、2画面間の移動ベクトル算出が可能になる。   As a result, even when a partial movement in the captured image, for example, a small animal subject moves in a part of the image, the movement vector between the two screens can be calculated without being confused by this partial movement. become.

しかし、仮に画面中に部分的な移動が無い画像を撮像している場合でも、画像の種類によっては、移動ベクトルの高精度の算出ができず、揺れの大きい動画像がメディアに記録されてしまうことがある。   However, even if an image with no partial movement is captured on the screen, depending on the type of image, the movement vector cannot be calculated with high accuracy, and a moving image with large shaking is recorded on the medium. Sometimes.

本発明の目的は、2画面間の移動ベクトルの高精度の算出を可能にする2画面間の移動ベクトル算出方法及びその装置を提供することにある。   An object of the present invention is to provide a method and apparatus for calculating a movement vector between two screens, which can calculate a movement vector between the two screens with high accuracy.

本発明の2画面間の移動ベクトル算出方法及びその装置は、第1画面と第2画面の夫々の画像を同一複数領域に分割し、各分割領域毎に、前記第1画面から切り出した基準画像と前記第2画面から位置をずらしながら切り出した各比較画像との夫々の相関性値を求め、各分割領域毎に前記相関性値の最高値を算出し、前記最高値のうち所定閾値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする。   The method and apparatus for calculating a movement vector between two screens according to the present invention divides the images of the first screen and the second screen into the same plurality of regions, and the reference image cut out from the first screen for each divided region. And the respective correlation images cut out while shifting the position from the second screen, the highest correlation value is calculated for each divided region, and the predetermined threshold is reached among the highest values. The movement vector of the second screen with respect to the first screen is calculated using the movement vector for each divided region for which the remaining maximum value excluding the highest value that is not calculated is calculated.

本発明の2画面間の移動ベクトル算出方法及びその装置は、前記最高値のうち前記所定閾値に達しない最高値を除いた残りの最高値のうち、各分割領域毎に該最高値を与える比較画像に対し前記位置をずらした比較画像の前記相関性値と該最高値との差を求め、該差が所定値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする。   The method and apparatus for calculating a movement vector between two screens according to the present invention provides a comparison that gives the highest value for each divided region among the remaining highest values excluding the highest value that does not reach the predetermined threshold among the highest values. A difference between the correlation value of the comparative image shifted from the image with respect to the image and the highest value is obtained, and the remaining highest value excluding the highest value at which the difference does not reach a predetermined value is calculated for each divided region. A movement vector of the second screen relative to the first screen is calculated using a movement vector.

本発明の2画面間の移動ベクトル算出方法及びその装置は、第1画面と第2画面の夫々の画像を同一複数領域に分割し、各分割領域毎に、前記第1画面から切り出した基準画像と前記第2画面から位置をずらしながら切り出した各比較画像との夫々の相関性値を求め、各分割領域毎に前記相関性値の最高値を算出し、各分割領域毎に前記最高値を与える比較画像に対し前記位置をずらした比較画像の前記相関性値と該最高値との差を求め、該差が所定値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする。   The method and apparatus for calculating a movement vector between two screens according to the present invention divides the images of the first screen and the second screen into the same plurality of regions, and the reference image cut out from the first screen for each divided region. And the respective correlation images cut out from the second screen while shifting the position, the highest correlation value is calculated for each divided region, and the highest value is calculated for each divided region. A divided region in which the difference between the correlation value of the comparison image shifted in position relative to the given comparison image and the highest value is obtained, and the remaining highest value is calculated excluding the highest value at which the difference does not reach a predetermined value The movement vector of the second screen relative to the first screen is calculated using each movement vector.

本発明の2画面間の移動ベクトル算出方法及びその装置は、前記相関性値が、1画素単位に比較した前記基準画像と前記比較画像との間の画素データ間の不一致量を示す差分の積算値であり、前記基準画像と前記比較画像との前記積算値の最小値が前記相関性値の最高値となることを特徴とする。   The method and apparatus for calculating a movement vector between two screens according to the present invention is configured such that the correlation value indicates a difference indicating an amount of mismatch between pixel data between the reference image and the comparison image compared in units of one pixel. The minimum value of the integrated values of the reference image and the comparative image is the maximum value of the correlation value.

本発明の2画面間の移動ベクトル算出方法及びその装置は、前記画素データが、輝度データ,色差データ,色データのうちの1つまたは複数の組み合わせでなることを特徴とする。   In the method and apparatus for calculating a movement vector between two screens according to the present invention, the pixel data is one or a combination of luminance data, color difference data, and color data.

本発明の2画面間の移動ベクトル算出方法及びその装置は、前記基準画像と前記比較画像はそれぞれ元画像データを同一縮小倍率で縮小した縮小画像であることを特徴とする。   In the method and apparatus for calculating a movement vector between two screens according to the present invention, the reference image and the comparison image are reduced images obtained by reducing the original image data at the same reduction magnification.

本発明によれば、各分割領域毎の移動ベクトルのうち、画面間の移動ベクトルの算出に不適当な移動ベクトルを排除し利用しないことにより、即ち、信頼性の高い分割領域毎の移動ベクトルだけを用いるため、高精度に2画面間の移動ベクトルを算出することが可能になる。   According to the present invention, out of the movement vectors for each divided area, the movement vectors inappropriate for the calculation of the movement vector between the screens are excluded and not used, that is, only the movement vector for each reliable divided area is used. Therefore, it is possible to calculate a movement vector between two screens with high accuracy.

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

図1は、本発明の一実施形態に係る2画面間の移動ベクトル算出装置を搭載した動画撮影機能付デジタルスチルカメラの要部構成図である。図示しない固体撮像素子から出力された画像データは、フレームメモリ10に格納され、図示しない信号処理部によって各種画像処理が施された後、画像圧縮回路11により圧縮され、記録メディア12に格納される。   FIG. 1 is a configuration diagram of a main part of a digital still camera with a moving image shooting function equipped with a movement vector calculation device between two screens according to an embodiment of the present invention. Image data output from a solid-state imaging device (not shown) is stored in a frame memory 10, subjected to various image processing by a signal processing unit (not shown), compressed by an image compression circuit 11, and stored in a recording medium 12. .

この画像圧縮回路11で画像データが圧縮処理されるとき、2画面間の移動ベクトル算出装置が算出した移動ベクトルが用いられ、手振れ補正された圧縮画像データが記録メディア12に格納される。   When the image data is compressed by the image compression circuit 11, the movement vector calculated by the movement vector calculation device between the two screens is used, and the compressed image data subjected to camera shake correction is stored in the recording medium 12.

2画面間の移動ベクトル算出装置は、固体撮像素子から出力された画像データを取り込み間引き処理する前処理部21と、前処理部21で間引き処理され生成された縮小画像データを保存する2つのメモリ22,23と、2つのメモリ22,23の一方を前処理部21に切替接続するスイッチ24とを備える。前処理部21が取り込む画像データは、フレームメモリ10に一旦格納された画像データでも、画像処理された後の画像データでも良い。   The movement vector calculation apparatus between two screens includes a pre-processing unit 21 that captures and thins out image data output from a solid-state imaging device, and two memories that store reduced image data generated by the thinning-out processing by the pre-processing unit 21. 22 and 23, and a switch 24 that switches and connects one of the two memories 22 and 23 to the preprocessing unit 21. The image data captured by the preprocessing unit 21 may be image data temporarily stored in the frame memory 10 or image data after image processing.

この移動ベクトル算出装置は更に、基準画像切出回路26と、比較画像切出回路27と、基準画像切出回路26及び比較画像切出回路27とメモリ22,23との間に設けられメモリ22,23の一方を基準画像切出回路26に接続したときメモリ22,23の他方を比較画像切出回路27に接続する接続切替回路28と、両切出回路26,27の出力画像データを比較して相関性の演算処理等を行い2画面間の移動ベクトルを求め画像圧縮回路11に出力する比較演算処理部29とを備える。   This movement vector calculation device is further provided between the reference image cutting circuit 26, the comparative image cutting circuit 27, the reference image cutting circuit 26 and the comparative image cutting circuit 27, and the memories 22, 23. , 23 is connected to the reference image cut-out circuit 26, and the connection switching circuit 28 that connects the other of the memories 22, 23 to the comparison image cut-out circuit 27 is compared with the output image data of both the cut-out circuits 26, 27. And a comparison calculation processing unit 29 that performs correlation calculation processing and the like to obtain a movement vector between the two screens and outputs it to the image compression circuit 11.

斯かる2画面間の移動ベクトル算出装置では、Nフレーム目の画像データ,N+1フレーム目の画像データ,N+2フレーム目の画像データ,……が次々と入力してくる。前処理部21は、各フレームの画像データを次々と間引き処理して縮小画像データを生成して出力し、スイッチ24はフレーム切替信号によって切り替え制御される。   In such a movement vector calculation apparatus between two screens, image data of the Nth frame, image data of the (N + 1) th frame, image data of the (N + 2) th frame,... The preprocessing unit 21 thins out the image data of each frame one after another to generate and output reduced image data, and the switch 24 is controlled to be switched by a frame switching signal.

これにより、Nフレーム目の縮小画像データがメモリ22に格納され、N+1フレーム目の縮小画像データがメモリ23に格納され、メモリ22の格納画像データ(今回の基準画像データ)に対するメモリ23の格納画像データ(今回の比較画像データ)の移動ベクトルが後述する様にして算出される。   Thereby, the reduced image data of the Nth frame is stored in the memory 22, the reduced image data of the (N + 1) th frame is stored in the memory 23, and the stored image in the memory 23 with respect to the stored image data (current reference image data) in the memory 22 is stored. The movement vector of the data (current comparison image data) is calculated as described later.

次にN+2フレーム目の縮小画像データがメモリ22に上書きされると、メモリ23の格納画像データ(N+1フレーム目の縮小画像データ:次回の基準画像データ)に対するメモリ22の格納画像データ(次回の比較画像データ)の移動ベクトルが後述する様にして算出され、以後、同様の処理が繰り返される。この様に、移動ベクトルを算出する場合、比較演算処理部29の処理負荷の軽減と処理速度の高速化を図るために縮小画像データを用いて行うのが好ましい。   Next, when the reduced image data of the (N + 2) th frame is overwritten in the memory 22, the stored image data (the next comparison) of the image stored in the memory 23 with respect to the stored image data (the reduced image data of the (N + 1) th frame: the next reference image data). The movement vector of (image data) is calculated as described later, and the same processing is repeated thereafter. Thus, when calculating the movement vector, it is preferable to use the reduced image data in order to reduce the processing load of the comparison calculation processing unit 29 and increase the processing speed.

接続切換回路28は、フレーム切替信号により、基準画像とする方の縮小画像データを格納したメモリ22,23の一方を選択して基準画像切出回路26に接続し、メモリ22,23の他方を比較画像切出回路27に接続する。   The connection switching circuit 28 selects one of the memories 22 and 23 storing the reduced image data to be used as the reference image by the frame switching signal and connects it to the reference image cutting circuit 26, and the other of the memories 22 and 23 is connected. The comparison image cutting circuit 27 is connected.

基準画像切出回路26は、先ず、基準画像(今の場合、Nフレームの縮小画像データとする。)の中の図7(a)に示す第1行第1列の分割領域5を選択し、ブロック2によって基準画像を切り出して比較演算処理部29に出力する。   First, the reference image cutting circuit 26 selects the divided region 5 in the first row and the first column shown in FIG. 7A in the reference image (in this case, reduced image data of N frames). The reference image is cut out by block 2 and output to the comparison calculation processing unit 29.

比較画像切出回路27も同様に、比較画像(今の場合、N+1フレームの縮小画像データとする。)の中から第1行第1列の分割領域5を探索範囲として選択し、この探索範囲の中からブロック2と同一大きさの比較画像切出ブロックによって比較画像を切り出し、比較演算処理部29に出力する。   Similarly, the comparative image cutout circuit 27 selects the divided region 5 in the first row and first column from the comparative image (in this case, the reduced image data of N + 1 frame) as the search range, and this search range. The comparison image is cut out from the image by the comparison image cutout block having the same size as that of the block 2, and is output to the comparison calculation processing unit 29.

比較演算処理部29は、切出回路26,27から取り込んだ両画像を1画素単位に比較して各画素毎の差分(輝度の差分,色差の差分,原色系フィルタの場合はRGB色毎の差分,補色系フィルタの場合は補色毎の差分等)を求め、各差分のブロック内総画素の積算値を算出し、自身内の内部メモリ(図示せず)に保存しておく。   The comparison calculation processing unit 29 compares both images captured from the cut-out circuits 26 and 27 on a pixel-by-pixel basis, and compares each pixel with a difference (brightness difference, color difference difference, or RGB color in the case of a primary color filter). In the case of a difference or complementary color filter, a difference for each complementary color is obtained, and an integrated value of the total pixels in each block of each difference is calculated and stored in an internal memory (not shown).

積算値が算出された後、比較演算処理部29は比較画像切出回路27に移動指令を出力する。これにより、比較画像切出ブロックが探索範囲内で次位置に移動し(縮小画像データを用いているため、移動は、縮小画像上の1画素単位となる。)、次の比較画像が切り出され、比較演算処理部29はこの比較画像と基準画像との比較演算を行い、各画素の差分の上記積算値を同様にして求める。   After the integrated value is calculated, the comparison calculation processing unit 29 outputs a movement command to the comparison image cutting circuit 27. As a result, the comparison image cutout block moves to the next position within the search range (because the reduced image data is used, the movement is in units of one pixel on the reduced image), and the next comparison image is cut out. The comparison calculation processing unit 29 performs a comparison calculation between the comparison image and the reference image, and similarly obtains the integrated value of the difference between the pixels.

以下同様にして、次々と探索範囲(第1行第1列の分割領域5)内の比較画像を切り出し、各比較画像毎の積算値を求め、各積算値のうちの最小値(相関性の最高値)を求める。   In the same manner, the comparison images in the search range (division region 5 in the first row and first column) are cut out one after another, the integrated value for each comparative image is obtained, and the minimum value (correlation value) of each integrated value is obtained. Find the highest value.

第1行第1列の分割領域における処理が終了した後は、次に、基準画像切出回路26と比較画像切出回路27に探索範囲切替指示を出力する。これにより、次に、図7(a)に示す第1行第2列の分割領域5が探索範囲となり、上記の処理が繰り返される。   After the processing in the divided region of the first row and the first column is completed, a search range switching instruction is output to the reference image cutting circuit 26 and the comparative image cutting circuit 27. As a result, the divided region 5 in the first row and the second column shown in FIG. 7A becomes the search range, and the above processing is repeated.

以下同様にして、図7(a)に示す4行4列に分割された16個の探索範囲i(i=1〜16)における夫々の上記最小値Mi(i=1〜16)を求める。   Similarly, the minimum values Mi (i = 1 to 16) in the 16 search ranges i (i = 1 to 16) divided into 4 rows and 4 columns shown in FIG. 7A are obtained.

図2は、比較演算処理部29が16個の探索範囲iの上記不一致量の最小値Miを求めた後に実行する処理手順を示すフローチャートである。   FIG. 2 is a flowchart showing a processing procedure executed after the comparison calculation processing unit 29 obtains the minimum value Mi of the mismatch amount in the 16 search ranges i.

先ずステップS1で、変数iをi=1とする。次のステップS2で、変数iで示される探索範囲iの上記最小値Miを取り出す。そして、最小値Miを閾値αと比較する(ステップS3)。   First, in step S1, the variable i is set to i = 1. In the next step S2, the minimum value Mi of the search range i indicated by the variable i is extracted. Then, the minimum value Mi is compared with the threshold value α (step S3).

ステップS3でMi≧αと判定された場合にはステップS4でこの最小値Miを廃棄してステップS6に進む。ステップS3でMi<αと判定された場合にはステップS5に進み、この最小値Miを選択保持し、ステップS6に進む。   If it is determined in step S3 that Mi ≧ α, the minimum value Mi is discarded in step S4, and the process proceeds to step S6. If it is determined in step S3 that Mi <α, the process proceeds to step S5, the minimum value Mi is selected and held, and the process proceeds to step S6.

ステップS6では、i=16であるか否かを判定し、i≠16の場合にはステップS7でi=i+1としてステップS2に戻る。即ち、探索範囲i=1〜16について上記の処理を繰り返し、16個の最小値Miのうち閾値αより小さい最小値MiをステップS5で選択保持する。   In step S6, it is determined whether i = 16. If i ≠ 16, i = i + 1 is set in step S7, and the process returns to step S2. That is, the above processing is repeated for the search range i = 1 to 16, and the minimum value Mi smaller than the threshold value α among the 16 minimum values Mi is selected and held in step S5.

ステップS6でi=16になると、次のステップS8に進む。ステップS8では、ステップS5で選択された最小値Miを取り出す。そして、各最小値Miを示す夫々の探索範囲iにおける比較画像切出ブロックのアドレスを求め、各アドレスと基準画像切出ブロック2との間の差すなわち移動量,移動方向を当該探索範囲iにおける移動ベクトルとして算出する。   When i = 16 in step S6, the process proceeds to next step S8. In step S8, the minimum value Mi selected in step S5 is extracted. Then, the address of the comparison image cutout block in each search range i indicating each minimum value Mi is obtained, and the difference between each address and the reference image cutout block 2, that is, the movement amount and the movement direction, are calculated in the search range i. Calculated as a movement vector.

次のステップS9では、ステップS8で求めた探索範囲i毎の移動ベクトルの平均値を算出し、これを2画面間の移動ベクトルとして図1の画像圧縮回路11に出力し、この処理を終了する。   In the next step S9, the average value of the movement vectors for each search range i obtained in step S8 is calculated and output to the image compression circuit 11 in FIG. 1 as a movement vector between two screens, and this process is terminated. .

16個の探索範囲の夫々の上記積算値の最小値すなわち不一致量の最小値をグラフに示したとき、例えば図3に示す様な場合が発生する。即ち、最小値が所定の閾値αより大きい探索範囲が生じる場合がある。図示する例では、5つの探索範囲の上記最小値Mh,…が閾値αより大きくなっている。即ち、相関性が低くなっている。   When the minimum value of the integrated value of each of the 16 search ranges, that is, the minimum value of the mismatch amount is shown in the graph, for example, a case as shown in FIG. 3 occurs. That is, there may be a search range in which the minimum value is larger than the predetermined threshold value α. In the illustrated example, the minimum values Mh,... Of the five search ranges are larger than the threshold value α. That is, the correlation is low.

例えば或る探索範囲において、基準画像に一致する比較画像の位置が検出できないとき、探索範囲内のどの場所から切り出した比較画像も、基準画像との間の不一致量は大きくなってしまう。しかし、その中からに不一致量の「最小値」を演算処理によって求めることはでき、これが、この探索範囲iの最小値Miとして算出される。しかし、このような最小値Miに基づいて2画面間の移動ベクトルを求めると、精度が劣化してしまうことになる。   For example, when the position of the comparison image that matches the reference image cannot be detected in a certain search range, the amount of mismatch between the comparison image cut out from any location in the search range and the reference image becomes large. However, the “minimum value” of the mismatch amount can be obtained from the inside by calculation processing, and this is calculated as the minimum value Mi of the search range i. However, when the movement vector between the two screens is obtained based on such a minimum value Mi, the accuracy is deteriorated.

そこで、本実施形態の2画面間の移動ベクトル算出装置の比較演算処理部29は、図2に示す処理を行うことで、図3に示す閾値αより不一致量の大きい探索範囲における処理結果を排除して信頼性の高いデータだけを残し、2画面間の移動ベクトルの算出精度を向上させている。   Therefore, the comparison calculation processing unit 29 of the apparatus for calculating a motion vector between two screens according to the present embodiment eliminates processing results in the search range having a larger mismatch amount than the threshold value α shown in FIG. 3 by performing the processing shown in FIG. Thus, only the highly reliable data is left, and the calculation accuracy of the movement vector between the two screens is improved.

図3に示す閾値αより小さな最小値であっても、2画面間の移動ベクトルを算出するとき使用するのに相応しく無いものが存在する場合もある。例えば、基準画像と比較画像との間の相関性がその探索範囲の全範囲で高い(不一致量が小さい)場合がある。斯かる場合を排除した方が、更に、2画面間の移動ベクトルの算出精度が向上する。   Even a minimum value smaller than the threshold value α shown in FIG. 3 may not be suitable for use when calculating a movement vector between two screens. For example, the correlation between the reference image and the comparison image may be high (the amount of mismatch is small) in the entire search range. Excluding such a case further improves the calculation accuracy of the movement vector between the two screens.

図4は、2画面間の移動ベクトル算出処理の処理手順を示すフローチャートである。この処理は、単独に行う構成でも、また、図2のステップS8,S9の代わりに行う構成でも良い。以下の説明では、図2の処理と組み合わせた場合を説明する。   FIG. 4 is a flowchart showing a processing procedure of a movement vector calculation process between two screens. This process may be performed independently or may be performed in place of steps S8 and S9 in FIG. In the following description, a case where it is combined with the processing of FIG. 2 will be described.

先ず、ステップS11で、図2のステップS5で選択された最小値Miの中から1つの最小値Miを取り出す。そして、次のステップS12で、比較演算処理部29が以前に演算し求めた積算値(これは内部メモリに保存されている。)の中から、この最小値Miを求めた比較画像の切出位置の1つ前の切出位置,1つ後の切出位置の夫々の比較画像を基準画像と比較した積算値を求める。   First, in step S11, one minimum value Mi is extracted from the minimum values Mi selected in step S5 in FIG. In the next step S12, the comparison image processing unit 29 cuts out the comparison image from which the minimum value Mi has been obtained from the integrated values previously calculated and stored (which are stored in the internal memory). An integrated value is obtained by comparing the comparison images of the cut-out position immediately before and the cut-out position immediately after the position with the reference image.

これを例示したのが図5であり、最小値Mkに対して1つ前の切出位置における積算値Mk−1と1つ後の切出位置における積算値Mk+1を求める。また、最小値Mjに対して1つ前の切出位置における積算値Mj−1と1つ後の切出位置における積算値Mj+1を求める。   FIG. 5 illustrates this, and the integrated value Mk−1 at the previous cutting position and the integrated value Mk + 1 at the next cutting position with respect to the minimum value Mk are obtained. Further, an integrated value Mj-1 at the previous cut position and an integrated value Mj + 1 at the next cut position with respect to the minimum value Mj are obtained.

そして、最小値Mi(図5ではMk,Mj)と1つ前の積算値Mi−1(図5ではMk−1,Mj−1)との差または1つ後の積算値Mi+1(図5ではMk+1,Mj+1)との差を求める(ステップS12)。   Then, the difference between the minimum value Mi (Mk, Mj in FIG. 5) and the previous integrated value Mi-1 (Mk-1, Mj-1 in FIG. 5) or the subsequent integrated value Mi + 1 (in FIG. 5). The difference from Mk + 1, Mj + 1) is obtained (step S12).

この差が求まった後は、次のステップS13で、差と閾値βとを比較する。差<βの場合には、この最小値Miを廃棄する(ステップS14)。図5の例では、最小値Mkは廃棄する。差≧βの場合には、その最小値Miを選択する(ステップS15)。図5の例では、最小値Mjは選択される。   After the difference is obtained, the difference is compared with the threshold value β in the next step S13. If the difference is less than β, the minimum value Mi is discarded (step S14). In the example of FIG. 5, the minimum value Mk is discarded. If the difference is greater than or equal to β, the minimum value Mi is selected (step S15). In the example of FIG. 5, the minimum value Mj is selected.

ステップS14,S15の後のステップS16では、図2のステップS5で選択された全最小値について上記処理を終了したか否かを判定し、終了した場合には、ステップS17に進み、ステップS15で選択された最小値Miだけを用いて、図2のステップS8,S9と同様にして2画面間の移動ベクトルを算出する。   In step S16 after steps S14 and S15, it is determined whether or not the above processing has been completed for all the minimum values selected in step S5 in FIG. 2, and if completed, the process proceeds to step S17, and in step S15. Using only the selected minimum value Mi, a movement vector between two screens is calculated in the same manner as in steps S8 and S9 in FIG.

以上の処理により、図5に示す様に、比較画像切出ブロックを移動させながら求めた積算値の最小値が真に「最小値」であるか否かを判定することができ、探索範囲毎の移動ベクトルのうち信頼性の高い移動ベクトルだけを用いて2画面間の移動ベクトルを高精度に算出することが可能になる。   With the above processing, as shown in FIG. 5, it is possible to determine whether or not the minimum value of the integrated values obtained while moving the comparison image cut block is truly “minimum value”. It is possible to calculate the movement vector between the two screens with high accuracy using only the movement vector having high reliability among the movement vectors.

尚、上述した実施形態では、閾値βと比較する積算値の差を、最小値の1つ前または1つ後としているが、1つ前及び1つ後の各差の両方で判断しても良い。また、上述した実施形態では、1画面を16分割した例で説明したが、分割数はこれに限るものではない。   In the above-described embodiment, the difference between the integrated values to be compared with the threshold value β is set to be one before or one after the minimum value, but may be determined based on both the one before and one after. good. In the embodiment described above, an example in which one screen is divided into 16 has been described, but the number of divisions is not limited thereto.

本発明に係る2画面間の移動ベクトル算出方法及びその装置は、移動ベクトルの算出精度を高精度にすることができるため、動画撮影機能をもったデジタルスチルカメラやデジタルビデオカメラ等に適用すると有用である。   The method and apparatus for calculating the movement vector between two screens according to the present invention can increase the calculation accuracy of the movement vector, and is useful when applied to a digital still camera, a digital video camera or the like having a moving image shooting function. It is.

本発明の一実施形態に係る2画面間の移動ベクトル算出装置を搭載した動画撮影機能付デジタルスチルカメラの要部構成図である。It is a principal part block diagram of the digital still camera with a video recording function carrying the movement vector calculation apparatus between two screens concerning one Embodiment of this invention. 図1に示す比較演算処理部が実行する移動ベクトル算出処理手順を示すフローチャートである。It is a flowchart which shows the movement vector calculation process procedure which the comparison calculation process part shown in FIG. 1 performs. 図2の処理の説明図である。It is explanatory drawing of the process of FIG. 図1に示す比較演算処理部が図2の処理と組み合わせて或いは単独で実行する移動ベクトル算出処理手順を示すフローチャートである。It is a flowchart which shows the movement vector calculation process procedure which the comparison calculation process part shown in FIG. 1 performs in combination with the process of FIG. 2, or independently. 図4の処理の説明図である。It is explanatory drawing of the process of FIG. 2画面間の移動ベクトル算出原理の説明図である。It is explanatory drawing of the movement vector calculation principle between 2 screens. 2画面間の移動ベクトル算出時の画面分割例を示す図である。It is a figure which shows the example of a screen division at the time of the movement vector calculation between 2 screens.

符号の説明Explanation of symbols

10 フレームメモリ
11 画像圧縮回路
22,23 縮小画像格納用のメモリ
26 基準画像切出回路
27 比較画像切出回路
28 接続切換回路
29 比較演算処理部
10 frame memory 11 image compression circuit 22, 23 memory for storing reduced image 26 reference image extraction circuit 27 comparison image extraction circuit 28 connection switching circuit 29 comparison operation processing unit

Claims (12)

第1画面と第2画面の夫々の画像を同一複数領域に分割し、各分割領域毎に、前記第1画面から切り出した基準画像と前記第2画面から位置をずらしながら切り出した各比較画像との夫々の相関性値を求め、各分割領域毎に前記相関性値の最高値を算出し、前記最高値のうち所定閾値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする2画面間の移動ベクトル算出方法。   Each image of the first screen and the second screen is divided into the same plurality of regions, and for each divided region, a reference image cut out from the first screen and each comparative image cut out while shifting the position from the second screen, For each of the divided regions, the highest value of the correlation value is calculated for each divided region, and the remaining highest value excluding the highest value that does not reach the predetermined threshold among the highest values is calculated. A movement vector calculation method between two screens, wherein a movement vector of the second screen relative to the first screen is calculated using a movement vector for each. 前記最高値のうち前記所定閾値に達しない最高値を除いた残りの最高値のうち、各分割領域毎に該最高値を与える比較画像に対し前記位置をずらした比較画像の前記相関性値と該最高値との差を求め、該差が所定値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする請求項1に記載の2画面間の移動ベクトル算出方法。   Among the remaining highest values excluding the highest value that does not reach the predetermined threshold among the highest values, the correlation value of the comparative image in which the position is shifted with respect to the comparative image that gives the highest value for each divided region; Movement of the second screen relative to the first screen is obtained using a movement vector for each divided area in which the difference between the highest value and the highest value that does not reach the predetermined value is calculated and the remaining highest value is calculated. The method of calculating a movement vector between two screens according to claim 1, wherein the vector is calculated. 第1画面と第2画面の夫々の画像を同一複数領域に分割し、各分割領域毎に、前記第1画面から切り出した基準画像と前記第2画面から位置をずらしながら切り出した各比較画像との夫々の相関性値を求め、各分割領域毎に前記相関性値の最高値を算出し、各分割領域毎に前記最高値を与える比較画像に対し前記位置をずらした比較画像の前記相関性値と該最高値との差を求め、該差が所定値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする2画面間の移動ベクトル算出方法。   Each image of the first screen and the second screen is divided into the same plurality of regions, and for each divided region, a reference image cut out from the first screen and each comparative image cut out while shifting the position from the second screen, The correlation value of each of the comparison images is calculated, the highest correlation value is calculated for each divided region, and the position of the comparison image is shifted with respect to the comparison image that gives the highest value for each divided region. The second screen relative to the first screen is obtained using a movement vector for each divided region from which the difference between the value and the maximum value is obtained and the remaining maximum value excluding the maximum value at which the difference does not reach a predetermined value is calculated. A movement vector calculation method between two screens, characterized by calculating a movement vector of. 前記相関性値は、1画素単位に比較した前記基準画像と前記比較画像との間の画素データ間の不一致量を示す差分の積算値であり、前記基準画像と前記比較画像との前記積算値の最小値が前記相関性値の最高値となることを特徴とする請求項1乃至請求項3のいずれかに記載の2画面間の移動ベクトル算出方法。   The correlation value is an integrated value of a difference indicating an amount of mismatch between pixel data between the reference image and the comparative image compared in units of one pixel, and the integrated value of the reference image and the comparative image The method of calculating a movement vector between two screens according to any one of claims 1 to 3, wherein the minimum value is a maximum value of the correlation value. 前記画素データは、輝度データ,色差データ,色データのうちの1つまたは複数の組み合わせでなることを特徴とする請求項4に記載の2画面間の移動ベクトル算出方法。   5. The method of calculating a movement vector between two screens according to claim 4, wherein the pixel data is one or a combination of luminance data, color difference data, and color data. 前記基準画像と前記比較画像はそれぞれ元画像データを同一縮小倍率で縮小した縮小画像であることを特徴とする請求項1乃至請求項5のいずれかに記載の2画面間の移動ベクトル算出方法。   6. The method for calculating a movement vector between two screens according to claim 1, wherein the reference image and the comparison image are reduced images obtained by reducing the original image data at the same reduction magnification. 第1画面と第2画面の夫々の画像を同一複数領域に分割し各分割領域毎に前記第1画面から切り出した基準画像と前記第2画面から位置をずらしながら切り出した各比較画像との夫々の相関性値を求める手段と、各分割領域毎に前記相関性値の最高値を算出する手段と、前記最高値のうち所定閾値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出する手段とを備えること特徴とする2画面間の移動ベクトル算出装置。   Each of the images on the first screen and the second screen is divided into the same plurality of regions, and a reference image cut out from the first screen for each divided region and each comparative image cut out while shifting the position from the second screen. Means for calculating the correlation value, means for calculating the maximum value of the correlation value for each divided region, and the remaining maximum value excluding the maximum value that does not reach the predetermined threshold value among the maximum values was calculated. A movement vector calculation device between two screens, comprising means for calculating a movement vector of the second screen relative to the first screen using a movement vector for each divided region. 前記最高値のうち前記所定閾値に達しない最高値を除いた残りの最高値のうち、各分割領域毎に該最高値を与える比較画像に対し前記位置をずらした比較画像の前記相関性値と該最高値との差を求め、該差が所定値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出すること特徴とする請求項7に記載の2画面間の移動ベクトル算出装置。   Among the remaining highest values excluding the highest value that does not reach the predetermined threshold among the highest values, the correlation value of the comparative image in which the position is shifted with respect to the comparative image that gives the highest value for each divided region; Movement of the second screen relative to the first screen is obtained using a movement vector for each divided area in which the difference between the highest value and the highest value that does not reach the predetermined value is calculated and the remaining highest value is calculated. The apparatus for calculating a movement vector between two screens according to claim 7, wherein the vector is calculated. 第1画面と第2画面の夫々の画像を同一複数領域に分割し各分割領域毎に前記第1画面から切り出した基準画像と前記第2画面から位置をずらしながら切り出した各比較画像との夫々の相関性値を求める手段と、各分割領域毎に前記相関性値の最高値を算出する手段と、各分割領域毎に前記最高値を与える比較画像に対し前記位置をずらした比較画像の前記相関性値と該最高値との差を求める手段と、該差が所定値に達しない最高値を除いた残りの最高値が算出された分割領域毎の移動ベクトルを用いて前記第1画面に対する前記第2画面の移動ベクトルを算出する手段とを備えること特徴とする2画面間の移動ベクトル算出装置。   Each of the images on the first screen and the second screen is divided into the same plurality of regions, and a reference image cut out from the first screen for each divided region and each comparative image cut out while shifting the position from the second screen. Means for calculating the correlation value, means for calculating the highest value of the correlation value for each divided region, and the comparison image shifted in position relative to the comparison image that gives the highest value for each divided region. A means for obtaining a difference between the correlation value and the highest value, and a moving vector for each divided area from which the highest value other than the highest value at which the difference does not reach a predetermined value is calculated. A movement vector calculation device between two screens, comprising: means for calculating a movement vector of the second screen. 前記相関性値は、1画素単位に比較した前記基準画像と前記比較画像との間の画素データ間の不一致量を示す差分の積算値であり、前記基準画像と前記比較画像との前記積算値の最小値が前記相関性値の最高値となることを特徴とする請求項7乃至請求項9のいずれかに記載の2画面間の移動ベクトル算出装置。   The correlation value is an integrated value of a difference indicating an amount of mismatch between pixel data between the reference image and the comparative image compared in units of one pixel, and the integrated value of the reference image and the comparative image The movement vector calculation device between two screens according to any one of claims 7 to 9, wherein the minimum value is a maximum value of the correlation value. 前記画素データは、輝度データ,色差データ,色データのうちの1つまたは複数の組み合わせでなることを特徴とする請求項10に記載の2画面間の移動ベクトル算出装置。   The apparatus for calculating a movement vector between two screens according to claim 10, wherein the pixel data is one or a combination of luminance data, color difference data, and color data. 前記基準画像と前記比較画像はそれぞれ元画像データを同一縮小倍率で縮小した縮小画像であることを特徴とする請求項7乃至請求項11のいずれかに記載の2画面間の移動ベクトル算出装置。   The apparatus for calculating a movement vector between two screens according to any one of claims 7 to 11, wherein the reference image and the comparison image are reduced images obtained by reducing the original image data at the same reduction magnification.
JP2006081169A 2006-03-23 2006-03-23 Method of calculating motion vector between two screens and apparatus thereof Pending JP2007259103A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006081169A JP2007259103A (en) 2006-03-23 2006-03-23 Method of calculating motion vector between two screens and apparatus thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006081169A JP2007259103A (en) 2006-03-23 2006-03-23 Method of calculating motion vector between two screens and apparatus thereof

Publications (1)

Publication Number Publication Date
JP2007259103A true JP2007259103A (en) 2007-10-04

Family

ID=38632884

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006081169A Pending JP2007259103A (en) 2006-03-23 2006-03-23 Method of calculating motion vector between two screens and apparatus thereof

Country Status (1)

Country Link
JP (1) JP2007259103A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009267716A (en) * 2008-04-24 2009-11-12 Kyocera Corp Motion vector detecting apparatus and method, and imaging apparatus

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001145109A (en) * 1999-11-11 2001-05-25 Nec Corp Moving vector detecting device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001145109A (en) * 1999-11-11 2001-05-25 Nec Corp Moving vector detecting device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009267716A (en) * 2008-04-24 2009-11-12 Kyocera Corp Motion vector detecting apparatus and method, and imaging apparatus

Similar Documents

Publication Publication Date Title
US8248480B2 (en) Imaging apparatus provided with panning mode for taking panned image
JP3103894B2 (en) Apparatus and method for correcting camera shake of video data
JP2009147757A (en) Motion vector detecting apparatus, motion vector detecting method, imaging apparatus, and program
US20170280066A1 (en) Image processing method by image processing apparatus
JP4985124B2 (en) Image processing apparatus, image processing method, and image processing program
JP5003657B2 (en) Image stabilization device
JP2007267232A (en) Electronic camera shake correction method and apparatus thereof, and imaging apparatus
JP2013110754A (en) Camera device, and photographing method and program of the same
JP2007134788A (en) Image processing apparatus and program
KR100793965B1 (en) Broadcast receiving device for capturing broadcast image and method thereof
JP5300413B2 (en) Motion vector detection device, motion vector detection method, imaging device, and program
JP2007259103A (en) Method of calculating motion vector between two screens and apparatus thereof
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
JP2007259106A (en) Method of detecting moving object in picked-up image and apparatus thereof
JP2007259104A (en) Method of calculating motion vector between two screens, and apparatus thereof
JP2007259105A (en) Camera shake correcting method and its apparatus, and imaging apparatus
JP2005252570A (en) Video signal processor
JP4543000B2 (en) Electronic image stabilization method and apparatus, and imaging apparatus
JP5480211B2 (en) Image capturing apparatus and image processing method for image capturing apparatus
JP4945235B2 (en) Image blur detection method, imaging apparatus, and image blur detection program
JP4786452B2 (en) camera
JP2007243333A (en) Camera shake correction method, camera shake correction apparatus, and imaging apparatus
JP2009116244A (en) Imaging device
JP2008172309A (en) Electronic hand blurring correction method, device and program and imaging apparatus
JP2007214666A (en) Digital camera with moving picture photographing function

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071109

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071116

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071126

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080710

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100316

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20100803