JPH10136373A - Motion detector and method therefor - Google Patents

Motion detector and method therefor

Info

Publication number
JPH10136373A
JPH10136373A JP28551896A JP28551896A JPH10136373A JP H10136373 A JPH10136373 A JP H10136373A JP 28551896 A JP28551896 A JP 28551896A JP 28551896 A JP28551896 A JP 28551896A JP H10136373 A JPH10136373 A JP H10136373A
Authority
JP
Japan
Prior art keywords
sum
image block
block
image
evaluation value
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.)
Granted
Application number
JP28551896A
Other languages
Japanese (ja)
Other versions
JP3747534B2 (en
Inventor
Takuya Kitamura
卓也 北村
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP28551896A priority Critical patent/JP3747534B2/en
Publication of JPH10136373A publication Critical patent/JPH10136373A/en
Application granted granted Critical
Publication of JP3747534B2 publication Critical patent/JP3747534B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PROBLEM TO BE SOLVED: To perform motion detection at a higher speed by stopping the processing of evaluation calculation in an earlier time period for a candidate vector without a possibility to be a motion vector to be obtained. SOLUTION: This motion detector 1 is provided with a CPU 2, a ROM 3 and a RAM 4. The CPU 1 processes data stored in the RAM 4 corresponding to a processing program stored in the ROM 3 and actually performs the processing of the motion detection. In these motion detector and method of the form, before obtaining evaluation to the candidate vector by the arithmetic operation of corresponding picture elements with each other between a current block and a reference block, whether or not an evaluation value to be obtained is to be smaller than the already detected evaluation value is checked. Then, only in the case that the possibility to be a minimum evaluation value is present, the evaluation value is actually obtained. Thus, a processing amount is reduced and the motion vector to one current block is obtained at a high speed.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、動画像圧縮装置な
どに用いられる動き検出装置および動き検出方法に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a motion detecting device and a motion detecting method used for a moving image compression device and the like.

【0002】[0002]

【従来の技術】動画像圧縮を効率よく行うための主要技
術の1つとして、画像の動きを示す動きベクトルを求め
る動き検出がある。この動きベクトルを求める手法はい
くつか提案されているが、主な手法の1つとしてブロッ
クマッチングアルゴリズムと呼ばれる手法がある。この
ブロックマッチングアルゴリズムについて図5を参照し
て説明する。このブロックマッチングアルゴリズムにお
いては、動き検出の対象となる画像(以後、カレントフ
レームと言う)を、たとえば16画素×16ラインと言
うようなブロック(以後、カレントブロックと言う)に
分割してそのカレントブロックごとに処理を行って動き
ベクトルを求める。
2. Description of the Related Art As one of main techniques for efficiently compressing a moving image, there is motion detection for obtaining a motion vector indicating a motion of an image. Several methods for obtaining the motion vector have been proposed. One of the main methods is a method called a block matching algorithm. This block matching algorithm will be described with reference to FIG. In this block matching algorithm, an image to be subjected to motion detection (hereinafter referred to as a current frame) is divided into blocks (hereinafter referred to as a current block) such as 16 pixels × 16 lines, for example. A motion vector is obtained by performing a process for each of them.

【0003】すなわち、各カレントブロックに対して、
与えられた候補ベクトルに基づいて参照フレーム内に対
応するブロック(以後、リファレンスブロックと言う)
を決定し、そのカレントブロックとリファレンスブロッ
クの対応する画素同士の差分を求め、その差分をブロッ
クで積算する。この時、差分は絶対値にして積算する。
そして、リファレンスフレームの探索範囲に応じて与え
られる全ての候補ベクトルについてこの積算値を求め、
積算値が最小になる候補ベクトルを動きベクトルとして
抽出する。
That is, for each current block,
A block corresponding to a reference frame based on a given candidate vector (hereinafter referred to as a reference block)
Is determined, a difference between corresponding pixels of the current block and the reference block is obtained, and the difference is integrated by the block. At this time, the difference is integrated as an absolute value.
Then, this integrated value is obtained for all candidate vectors given according to the search range of the reference frame,
A candidate vector with the minimum integrated value is extracted as a motion vector.

【0004】このブロックマッチングアルゴリズムを式
に示すと式2のようになる。
The block matching algorithm is expressed by the following equation (2).

【数2】 式2において、curr(x,y) はカレントブロックの画素で
あり、 ref(x+vx,y+vy ) はカレントブロック
の画素curr(x,y) に対応するリファレンスブロックの画
素であり、元のリファレンスブロックの画素ref(x,y)お
よび動きベクトル(vx ,vy )に基づいて決定される
ものである。すなわちこのような評価関数を用いて、様
々なベクトルに対して式2の評価値MEを算出し、それ
が最小になるものを動きベクトルにするのである。
(Equation 2) In Equation 2, curr (x, y) is a pixel of the current block, and ref (x + v x , y + v y ) is a pixel of the reference block corresponding to the pixel curr (x, y) of the current block. It is determined based on the pixel ref (x, y) of the block and the motion vector (v x , v y ). That is, using such an evaluation function, the evaluation value ME of Expression 2 is calculated for various vectors, and the one that minimizes the evaluation value ME is used as the motion vector.

【0005】このブロックマッチングアルゴリズムに基
づく実際の処理方法について図6および図7を参照して
説明する。図6は、このブロックマッチングアルゴリズ
ムを、通常の計算機装置などで行う場合のフローチャー
トである。図6に示すように、まず、カレントフレーム
を分割して得られる複数のブロックの中から最初のブロ
ックをカレントブロックとして設定し(ステップS5
1)、以下、そのカレントブロックに対する動きベクト
ル検出の処理に入る。
An actual processing method based on the block matching algorithm will be described with reference to FIGS. FIG. 6 is a flowchart in the case where this block matching algorithm is performed by a normal computer device or the like. As shown in FIG. 6, first, the first block is set as a current block from a plurality of blocks obtained by dividing the current frame (step S5).
1) Hereinafter, the processing of motion vector detection for the current block is started.

【0006】まず、最小の評価値を記憶するための変数
minに、たとえばその変数が取り得る最大値などの予
め定めた十分大きな値を初期値としてセットしておき
(ステップS52)、図5に示すように予め定められて
いるカレントブロックの探索範囲に基づいて決定される
m個の候補ベクトル(vxi,vyi)(i=1〜m)の中
の、最初の候補ベクトル(vx1,vy1)を、評価値を求
める対象の候補ベクトルとして設定する(ステップS5
3)。そのように設定されたカレントブロックおよび候
補ベクトルに対する評価値算出の処理においては、ま
ず、累積値を記憶する変数sumの内容をリセットした
後(ステップS54)、カレントブロックの最初の画素
(図5の例いおいては左上の画素)を、処理対象の画素
curr(x,y) としてセットする(ステップS55)。
First, a predetermined sufficiently large value such as a maximum value that the variable can take is set as an initial value in a variable min for storing a minimum evaluation value (step S52), and FIG. As shown, the first candidate vector (v x1 , v x1 , v m) of m candidate vectors (v xi , v yi ) (i = 1 to m) determined based on a predetermined search range of the current block. v y1 ) is set as a candidate vector for which an evaluation value is to be obtained (step S5).
3). In the process of calculating the evaluation value for the current block and the candidate vector set as described above, first, after resetting the content of the variable sum for storing the accumulated value (step S54), the first pixel of the current block (see FIG. In the example, the pixel at the upper left) is the pixel to be processed
It is set as curr (x, y) (step S55).

【0007】そして、そのカレントブロックの画素curr
(x,y) と、そのcurr(x,y) に対して候補ベクトル
(vx1,vy1)分だけ動いた位置のリファレンスブロッ
ク上の画素ref(x+vxi,y+vyi) との差を求め、
その差を変数sumに既に記憶されている値に対して加
算し、再び変数sumに格納する(ステップS56)。
以降、処理対象の画素がカレントブロックの最後の画素
(図5の例においては右下の画素)か否かを調べながら
(ステップS58)、最後の画素でなければ処理対象の
画素として次の画素をセットし(ステップS59)、ス
テップS56の処理を繰り返し行う。
The pixel curr of the current block is
The difference between (x, y) and the pixel ref (x + vxi , y + vyi ) on the reference block at the position moved by the candidate vector ( vx1 , vy1 ) with respect to the curr (x, y) is calculated. ,
The difference is added to the value already stored in the variable sum, and stored again in the variable sum (step S56).
Thereafter, while checking whether the pixel to be processed is the last pixel of the current block (the lower right pixel in the example of FIG. 5) (step S58), if it is not the last pixel, the next pixel is set as the pixel to be processed. Is set (step S59), and the process of step S56 is repeated.

【0008】ステップS58において、処理対象の画素
がカレントブロックの最後の画素だった場合には、次に
変数sumと変数minの値を比較し(ステップS6
0)、変数sumに記憶されている今回処理対象だった
候補ベクトルに対する評価値が、変数minに記憶され
ているそれまでに処理した各候補ベクトルにおける最小
評価値以下か否か、すなわちsum≧minか否かをチ
ェックする。そして、sum≧minだった場合には、
今回処理した候補ベクトルが求める動きベクトルである
可能性があるので、これを記憶する。すなわち、その評
価値sumを新たな最小評価値として変数minにセッ
トし、その候補ベクトルのx成分およびy成分を各々変
数minvxおよび変数minvyに格納する。なお、
ステップS60において、sum<minだった場合に
は、今回処理した候補ベクトルは求める動きベクトルで
ある可能性は無いので、その評価値を求めた結果等は無
視して次のステップS62に移る。
If the pixel to be processed is the last pixel in the current block in step S58, the values of the variables sum and min are compared (step S6).
0), whether or not the evaluation value for the candidate vector that has been processed this time and stored in the variable sum is equal to or less than the minimum evaluation value of each candidate vector processed so far that is stored in the variable min, that is, sum ≧ min Check whether or not. And if sum ≧ min,
Since the candidate vector processed this time may be the motion vector to be obtained, this is stored. That is, the evaluation value sum is set to the variable min as a new minimum evaluation value, and the x component and the y component of the candidate vector are stored in the variables minvx and minvy, respectively. In addition,
If sum <min in step S60, there is no possibility that the candidate vector processed this time is a motion vector to be obtained, so that the result of obtaining the evaluation value and the like are ignored, and the process proceeds to the next step S62.

【0009】このような得られた評価値に基づく処理が
終了したら、その処理を行うために用いた候補ベクトル
が、前述したm個の候補ベクトルの中の最後の候補ベク
トルか否かを調べ(ステップS62)、最後の候補ベク
トルでなければ評価対象の候補ベクトルとして次のベク
トルを設定し(ステップS63)、再びステップS54
〜ステップS61の処理を繰り返す。ステップS62に
おいて、その候補ベクトルが最後の候補ベクトルだった
場合には、その時点で変数minvxおよび変数min
vyに記憶されている候補ベクトルが、そのカレントブ
ロックに対して検出された動きベクトルということにな
り、そのカレントブロックに対する処理は終了する。
When the processing based on the obtained evaluation value is completed, it is checked whether or not the candidate vector used for performing the processing is the last candidate vector among the m candidate vectors described above ( In step S62, if it is not the last candidate vector, the next vector is set as a candidate vector to be evaluated (step S63), and step S54 is performed again.
To Step S61 are repeated. In step S62, if the candidate vector is the last candidate vector, the variables minvx and min
The candidate vector stored in vy is the motion vector detected for the current block, and the processing for the current block ends.

【0010】そして、そのカレントブロックが、カレン
トフレーム内の最後のブロックか否かを調べ(ステップ
S64)、最後のブロックでなければ動き検出対象のカ
レントブロックとして次のブロックを設定し(ステップ
S65)、再びステップS52〜ステップS63の処理
を繰り返す。ステップS64において、カレントブロッ
クがカレントフレーム内の最後のブロックだった場合に
は、そのカレントフレームに対する一連の処理を終了す
る(ステップS66)。
Then, it is determined whether or not the current block is the last block in the current frame (step S64). If the current block is not the last block, the next block is set as the current block for motion detection (step S65). Then, the processing of steps S52 to S63 is repeated again. If the current block is the last block in the current frame in step S64, a series of processes for the current frame is ended (step S66).

【0011】前述したブロックマッチングアルゴリズム
は、このような基本的な処理により実行することができ
るが、このアルゴリズムはネストしたループ(入れ子状
態になったループ)が多数あるため、計算処理量が多
く、時間がかるという問題があり、より高速に動き検出
を行うことができるアルゴリズムが求められている。そ
こで、図6に示した方法を改善したより高速な処理方法
について図7を参照して説明する。図7は、図6に示し
た動き検出の処理をより高速に行うことのできるアルゴ
リズムを示すフローチャートである。なお、図7に示す
処理において、図6の処理と全く同じ処理を行う工程に
対しては同じステップ番号を付しておりその説明を原則
として省略する。
The above-described block matching algorithm can be executed by such basic processing. However, since this algorithm has a large number of nested loops (nested loops), the amount of calculation processing is large. There is a problem that it takes time, and an algorithm that can perform motion detection at higher speed is required. Therefore, a faster processing method obtained by improving the method shown in FIG. 6 will be described with reference to FIG. FIG. 7 is a flowchart showing an algorithm capable of performing the motion detection processing shown in FIG. 6 at higher speed. In the processing shown in FIG. 7, steps that perform exactly the same processing as the processing in FIG. 6 are denoted by the same step numbers, and description thereof will be omitted in principle.

【0012】図6においては、ステップS56,S5
8,S59において差分の累算値を求めているが、必要
なのは、累算値の中で最小になるもののみである。した
がって、図7の処理手順においては、最小値になる見込
みがなければ累算のループから抜けることによって、処
理を実質的に中断し、高速化を図るようにした。したが
って、図7の処理において、ステップS51〜ステップ
S56までの処理は前述した図6の処理と同じであり、
ステップS56の直後のステップS57において、変数
sumと変数minの値を比較している。すなわち、ス
テップS56において各画素ごとに順に累算値を求めて
いるその途中において、変数sumに記憶されている今
回処理対象の候補ベクトルに対する現時点での評価値
が、変数minに記憶されているそれまでに処理した各
候補ベクトルにおける最小評価値以下か否か、すなわち
sum≧minか否かをチェックする。
In FIG. 6, steps S56 and S5
8. In S59, the accumulated value of the difference is obtained, but only the smallest accumulated value among the accumulated values is required. Therefore, in the processing procedure of FIG. 7, if there is no expectation of the minimum value, the processing is substantially interrupted by speeding up by exiting the accumulation loop. Therefore, in the processing of FIG. 7, the processing of steps S51 to S56 is the same as the processing of FIG.
In step S57 immediately after step S56, the values of the variables sum and min are compared. That is, in the middle of calculating the accumulated value in order for each pixel in step S56, the current evaluation value of the candidate vector to be processed this time stored in the variable sum is stored in the variable min. It is checked whether or not the sum is equal to or less than the minimum evaluation value in each candidate vector processed up to, that is, whether sum ≧ min.

【0013】そして、sum≧minだった場合には、
今回処理している候補ベクトルが求める動きベクトルで
ある可能性があるので、ステップS58に移り、以後の
画素について引き続き累算を求める処理を継続する。ま
た、sum<minだった場合には、現在処理している
候補ベクトルについては、既に求める動きベクトルであ
る可能性は無いので、評価値を求める処理を中断して、
ステップS62以降の次の候補ベクトルに係わる処理に
移る。
If sum ≧ min, then
Since there is a possibility that the candidate vector being processed this time is the motion vector to be obtained, the process proceeds to step S58, and the process for obtaining the accumulation for the subsequent pixels is continued. If sum <min, there is no possibility that the candidate vector currently being processed is a motion vector that has already been obtained.
The process moves to the process related to the next candidate vector after step S62.

【0014】このようなチェックをしながら評価値の算
出を行っていきステップS58においてブロックの最後
の画素まで累算が行えたと判断された場合、既にステッ
プS57で判定されているようにその処理対象の候補ベ
クトルが求める動きベクトルである可能性があるので、
直ちにステップ61においてこれらの値を記憶する。す
なわち、その評価値sumを新たな最小評価値として変
数minにセットし、その候補ベクトルのx成分および
y成分を各々変数minvxおよび変数minvyに格
納する。以下、図6に示した処理と同じようにステップ
S62〜ステップS66の処理を行う。
When the evaluation value is calculated while performing such a check, and it is determined in step S58 that the accumulation has been performed up to the last pixel of the block, the processing target is determined as already determined in step S57. Since the candidate vector of may be the desired motion vector,
Immediately in step 61 these values are stored. That is, the evaluation value sum is set to the variable min as a new minimum evaluation value, and the x component and the y component of the candidate vector are stored in the variables minvx and minvy, respectively. Hereinafter, the processing of steps S62 to S66 is performed in the same manner as the processing shown in FIG.

【0015】[0015]

【発明が解決しようとする課題】このような図7に示し
たような処理方法を用いることによりブロックマッチン
グアルゴリズムはある程度高速に処理できるようになっ
たものの、より高速に処理したいという要望がある。
Although the block matching algorithm can be processed at a relatively high speed by using such a processing method as shown in FIG. 7, there is a demand for processing at a higher speed.

【0016】したがって、本発明の目的は、より高速に
動き検出を行うことができる動き検出装置を提供するこ
とにある。また本発明の他の目的は、より高速に動き検
出を行うことができる動き検出方法を提供することにあ
る。
Accordingly, it is an object of the present invention to provide a motion detecting device capable of detecting motion at higher speed. It is another object of the present invention to provide a motion detection method capable of performing motion detection at higher speed.

【0017】[0017]

【課題を解決するための手段】前記課題を解決するため
に、候補ベクトルを評価する評価値のとり得る値を簡単
に求められるようにし、これにより求める動きベクトル
となる可能性がない候補ベクトルについてはより早い時
期に評価値算出の処理を中止することができるようにし
た。
In order to solve the above-mentioned problem, it is possible to easily obtain a value that can be taken as an evaluation value for evaluating a candidate vector. Has enabled the evaluation value calculation process to be stopped earlier.

【0018】したがって、本発明の動き検出装置は、複
数の候補ベクトルより順次1つを選択する候補ベクトル
選択手段と、カレントブロックおよび候補ベクトルに基
づいてリファレンスブロックを抽出する参照ブロック抽
出手段と、カレントブロックおよびリファレンスブロッ
クの各々画素値の総和を検出する第1および第2の総和
検出手段と、その第1の画像ブロックの画素値の総和と
第2の画像ブロックの画素値の総和の差を検出する総和
差検出手段と、その総和の差とそれまでに検出された最
小評価値とを比較する第1の比較手段と、その比較の結
果、画素値の総和の差が最小評価値よりも大きい場合は
その候補ベクトルに対する処理は中止し、画素値の総和
の差が最小評価値以下である場合にカレントブロックと
リファレンスブロックの画素同士の画素値の差分の総和
を評価値として検出する評価値検出手段と、その評価値
と既に検出された評価値とを比較する第2の比較手段
と、その比較の結果、検出された評価値が既に検出され
た評価値の中で最小であった場合にその選択された候補
ベクトルを記憶し、評価値を前記最小評価値として設定
する記憶手段と、前記候補ベクトル選択手段に予め定め
られていた複数の候補ベクトル全てが選択された後に、
前記記憶手段に記憶されている前記候補ベクトルを、そ
のカレント画像ブロックに対する動きベクトルとして出
力する出力手段とを有する。
Therefore, the motion detecting apparatus according to the present invention comprises: a candidate vector selecting means for sequentially selecting one from a plurality of candidate vectors; a reference block extracting means for extracting a reference block based on the current block and the candidate vector; First and second sum detection means for detecting the sum of the pixel values of the block and the reference block, and detecting the difference between the sum of the pixel values of the first image block and the sum of the pixel values of the second image block Sum difference detecting means, the first comparing means for comparing the difference between the sum and the minimum evaluation value detected so far, and as a result of the comparison, the difference in the sum of the pixel values is larger than the minimum evaluation value In this case, the processing for the candidate vector is stopped, and if the difference between the sums of the pixel values is equal to or smaller than the minimum evaluation value, the current block and the reference block Evaluation value detection means for detecting the sum of the differences between the pixel values of the pixels as the evaluation value, second comparison means for comparing the evaluation value with the already detected evaluation value, and a result of the comparison and detection. A storage unit that stores the selected candidate vector when the evaluated value is the smallest among the already detected evaluation values, and sets an evaluation value as the minimum evaluation value; and After all of a plurality of predetermined candidate vectors are selected,
Output means for outputting the candidate vector stored in the storage means as a motion vector for the current image block.

【0019】また、本発明の動き検出方法は、動き検出
対象の画像を所定の画素構成の領域に分割して得られる
カレントブロックと、参照画像中の画像ブロックであっ
て与えられた候補ベクトルに基づいて前記カレントブロ
ックの位置に対して決定される前記カレントブロックと
同じ画素構成のリファレンスブロックとの、対応する画
素同士の差分の総和を求め、該総和を前記候補ベクトル
に対する評価値とし、予め定めた複数の候補ベクトルよ
り前記評価値の最も小さい候補ベクトルを前記カレント
ブロックに対する動きベクトルとして検出する動き検出
方法であって、前記カレントブロックの画素値の総和を
求め、前記リファレンスブロックの画素値の総和を求
め、前記カレントブロックの画素値の総和、および、前
記リファレンスブロックの画素値の総和との差を求め、
前記求められた差が、それまでに与えられた候補ベクト
ルについて算出された前記評価値よりも小さいか否かを
判定し、前記判定結果、前記評価値が小さい場合に当該
候補ベクトルに対する前記評価値の計算を行う。
In the motion detection method according to the present invention, a current block obtained by dividing a motion detection target image into a region having a predetermined pixel configuration and a given candidate vector which is an image block in a reference image are provided. The sum of the differences between the corresponding pixels of the current block determined with respect to the position of the current block and the reference block having the same pixel configuration is determined based on the current block, and the sum is used as an evaluation value for the candidate vector. A motion vector for detecting a candidate vector having the smallest evaluation value from the plurality of candidate vectors as a motion vector for the current block, wherein a sum of pixel values of the current block is obtained, and a sum of pixel values of the reference block is calculated. Is calculated, and the sum of the pixel values of the current block and the reference block are calculated. Obtains the difference between the sum of the pixel values of the click,
It is determined whether or not the obtained difference is smaller than the evaluation value calculated for the given candidate vector, and if the evaluation result is smaller, the evaluation value for the candidate vector is smaller. Is calculated.

【0020】[0020]

【発明の実施の形態】本発明の実施の形態を図1〜図4
を参照して説明する。本実施の形態の動き検出装置およ
び動き検出方法は、カレントブロックおよびリファレン
スブロックの総和を用いることにより、その候補ベクト
ルの評価値の範囲を検出し、処理の高速化に用いるよう
にしたものである。すなわち、前述した式2に示したよ
うな評価関数は式3に示すように順に変形していくと、
最終的に式4に示すような形式にすることができる。
1 to 4 show an embodiment of the present invention.
This will be described with reference to FIG. The motion detection device and the motion detection method according to the present embodiment detect the range of the evaluation value of the candidate vector by using the sum of the current block and the reference block, and use the detected range for speeding up the processing. . That is, when the evaluation function as shown in Expression 2 is sequentially transformed as shown in Expression 3,
Finally, a format as shown in Equation 4 can be obtained.

【数3】 (Equation 3)

【0021】そしてこの式4から、各候補ベクトルごと
に求める式2に示したような評価値MEは、カレントブ
ロックおよびリファレンスブロックのそれぞれの総和の
差の絶対値(以下、ブロック総和差分と言う。)より大
きい、ということが分かる。換言すれば、ブロック総和
差分が既に他の候補ベクトルに対する評価値よりも大き
い候補ベクトルは、その候補ベクトルに対する評価値は
当然その評価値よりも大きくなり、全ての候補ベクトル
の中で評価値が最小となるベクトル、すなわち求める動
きベクトルにはなり得ないということになる。したがっ
て、本実施の形態の動き検出装置においては、そのよう
な候補ベクトルに対する処理は直ちに終了するようにし
て、高速に所望のベクトルを検出できるようにした。
From this equation 4, the evaluation value ME as shown in equation 2 for each candidate vector is the absolute value of the difference between the sum of the current block and the reference block (hereinafter referred to as the block sum difference). ). In other words, for a candidate vector whose block sum difference is already larger than the evaluation value for another candidate vector, the evaluation value for that candidate vector is naturally larger than that evaluation value, and the evaluation value is the smallest among all the candidate vectors. That is, the motion vector cannot be obtained. Therefore, in the motion detection device according to the present embodiment, processing on such a candidate vector is immediately terminated, so that a desired vector can be detected at high speed.

【0022】そのような動き検出処理を行う動き検出装
置の構成を図1に示す。図1に示すように、この動き検
出装置は通常の計算機装置などにより構成される。すな
わち、動き検出装置1は、中央処理装置(CPU)2,
ROM3,RAM4を有する。ROM3は、処理プログ
ラムなどを記憶している。RAM4は、カレントフレー
ム、リファレンスフレームなどの画像データや、候補ベ
クトル、評価値など、この動き検出方法に係わる種々の
データを記憶する。そしてCPU1は、ROM3に格納
されている処理プログラムにしたがって、RAM2に記
憶されているデータを処理し、実際に動き検出の処理を
行う。
FIG. 1 shows a configuration of a motion detecting device for performing such a motion detecting process. As shown in FIG. 1, the motion detection device is configured by a general computer device or the like. That is, the motion detection device 1 includes a central processing unit (CPU) 2,
It has ROM3 and RAM4. The ROM 3 stores a processing program and the like. The RAM 4 stores various data related to the motion detection method, such as image data such as a current frame and a reference frame, candidate vectors, and evaluation values. Then, the CPU 1 processes the data stored in the RAM 2 according to the processing program stored in the ROM 3 and actually performs the motion detection processing.

【0023】このような動き検出装置により実際に行わ
れる動き検出処理について、図2〜図4のフローチャー
トを参照して説明する。図2は、その動き検出処理を説
明するためのフローチャートである。この動き検出処理
においては、処理を開始したら(ステップS10)、ま
ず冒頭において、処理対象のカレントフレームおよびリ
ファレンスフレームの各フレームについて、得られる画
像ブロック各々に対して、その画素値の総和を求める処
理を行う(ステップS11,S12)。
The motion detection processing actually performed by such a motion detection device will be described with reference to the flowcharts of FIGS. FIG. 2 is a flowchart for explaining the motion detection processing. In the motion detection process, when the process is started (step S10), at the beginning, for each of the current frame and the reference frame to be processed, a process of obtaining the sum of the pixel values for each of the obtained image blocks. (Steps S11 and S12).

【0024】このステップS11におけるカレントフレ
ームの各ブロック総和を求める処理について、図3を参
照して詳細に説明する。まず、入力された処理対象のカ
レントフレームを所定の画素構成の領域に分割したら
(本実施の形態においては16画素×16ラインのブロ
ックに分割する)、その最初のブロックをカレントブロ
ックと設定し(ステップS31)、総和を記憶する変数
sumの内容を0にリセットしておく(ステップS3
2)。そして、そのカレントブロックの最初の画素(本
実施の形態では左上の画素)を加算対象の画素としてセ
ットし(ステップS33)、その画素値を変数sumに
既に格納されている値と加算した後、その結果を再び変
数sumに格納する(ステップS34)。
The process of obtaining the block sum of the current frame in step S11 will be described in detail with reference to FIG. First, when an input current frame to be processed is divided into regions having a predetermined pixel configuration (in the present embodiment, the current frame is divided into blocks of 16 pixels × 16 lines), the first block is set as a current block ( (Step S31) The content of the variable sum for storing the sum is reset to 0 (step S3).
2). Then, the first pixel of the current block (the upper left pixel in the present embodiment) is set as a pixel to be added (step S33), and after adding the pixel value to the value already stored in the variable sum, The result is stored again in the variable sum (step S34).

【0025】次に、カレントブロック内の全ての画素を
加算したか否かをチェックし(ステップS35)、まだ
全ての画素の加算を行ってなければ次の画素を加算対象
の画素として設定し(ステップS36)、再びステップ
S34において、その画素値の累算を行う。このような
処理を繰り返し、ステップS35においてそのカレント
ブロックの全ての画素の累算が終了したことが検出され
たら、その時に変数sumに記憶されている値が、その
カレントブロックの画素値の総和なので、そのカレント
ブロックに対応付けて記憶する(ステップS37)。
Next, it is checked whether or not all the pixels in the current block have been added (step S35). If all the pixels have not been added yet, the next pixel is set as a pixel to be added (step S35). Step S36) In step S34 again, the pixel values are accumulated. Such processing is repeated, and when it is detected in step S35 that the accumulation of all the pixels of the current block is completed, the value stored in the variable sum at that time is the sum of the pixel values of the current block. Is stored in association with the current block (step S37).

【0026】そして、カレントフレームを分割して形成
された全てのブロックに対して総和を求める処理が終了
したか否かを検出し(ステップS38)、未だ全てのブ
ロックに対して処理が終了していなければ、次のブロッ
クをカレントブロックとして設定し(ステップS3
9)、再びステップS32〜ステップS37の処理を繰
り返す。ステップS38において、全てのブロックに対
して総和を求める処理が終了したと判定された場合に
は、このカレントフレームの各ブロック総和を求める処
理を終了し(ステップS40)、メインルーチンに戻
る。
Then, it is detected whether or not the processing for obtaining the sum has been completed for all the blocks formed by dividing the current frame (step S38), and the processing has been completed for all the blocks. If not, the next block is set as the current block (step S3).
9) The process of steps S32 to S37 is repeated again. If it is determined in step S38 that the process of calculating the sum of all blocks has been completed, the process of calculating the sum of each block of the current frame is finished (step S40), and the process returns to the main routine.

【0027】次に、ステップS12におけるリファレン
スフレームの各ブロック総和を求める処理について、図
4を参照して詳細に説明する。ここで、カレントフレー
ムの各カレントブロック各々に対してたとえば図5に示
したような動きベクトル探索範囲を設定した場合には、
リファレンスフレームから得られるカレントブロックと
同じ画素構成(本実施の形態においては16画素×16
ライン)の全ての画像ブロックが、カレントブロックお
よび候補ベクトルの組み合わせに基づいて決定されるリ
ファレンスブロックとなる。したがって、リファレンス
フレームについては、これらリファレンスブロックとな
る可能性のある全てのブロックに対して、ブロック総和
を求めておく。
Next, the process of calculating the sum of each block of the reference frame in step S12 will be described in detail with reference to FIG. Here, for example, when a motion vector search range as shown in FIG. 5 is set for each current block of the current frame,
The same pixel configuration as the current block obtained from the reference frame (16 pixels × 16 pixels in the present embodiment)
All the image blocks of the line) are reference blocks determined based on a combination of the current block and the candidate vector. Therefore, for the reference frame, the block sum is calculated for all the blocks that may become reference blocks.

【0028】具体的には、リファレンスフレームから抽
出される16画素×16ラインの画像ブロック全て、す
なわち相互にX方向およびY方向に1画素ずつしかずれ
ていないような画像ブロックの各々全てについて、ブロ
ック総和を求める。このことは、リファレンスフレーム
の各ブロックに対してブロック総和を求める処理は、カ
レントフレームの各カレントブロックに対してブロック
総和を求める処理に比べて処理量が非常に多くなること
を意味している。しかし、リファレンフレーム内の画像
ブロックは、通常は種々のカレントブロックと候補ベク
トルの組み合わせにおいて各々多数回参照されるので、
予め全てのブロックに対してブロック総和を求めておく
ことがやはり有効なのである。
More specifically, all the image blocks of 16 pixels × 16 lines extracted from the reference frame, that is, all the image blocks which are shifted from each other by only one pixel in the X direction and the Y direction, are block-wise. Find the sum. This means that the processing for obtaining the block sum for each block of the reference frame requires a much larger processing amount than the processing for obtaining the block sum for each current block of the current frame. However, the image blocks in the reference frame are typically referenced many times in each of the various current block and candidate vector combinations,
Obtaining the block sum for all the blocks in advance is still effective.

【0029】したがって、まず入力されたリファレンス
フレームから最初に得られる16画素×16ラインのブ
ロックをリファレンスブロックと設定し(ステップS4
1)、総和を記憶する変数sumの内容を0にリセット
しておく(ステップS42)。そして、そのリファレン
スブロックの最初の画素(本実施の形態では左上の画
素)を加算対象の画素としてセットし(ステップS4
3)、その画素値を変数sumに既に格納されている値
と加算した後、その結果を再び変数sumに格納する
(ステップS44)。
Therefore, first, a block of 16 pixels × 16 lines obtained first from the input reference frame is set as a reference block (step S4).
1) The content of the variable sum for storing the sum is reset to 0 (step S42). Then, the first pixel (the upper left pixel in the present embodiment) of the reference block is set as a pixel to be added (step S4).
3) After adding the pixel value to the value already stored in the variable sum, the result is stored in the variable sum again (step S44).

【0030】次に、リファレンスブロック内の全ての画
素を加算したか否かをチェックし(ステップS45)、
まだ全ての画素の加算を行ってなければ次の画素を加算
対象の画素として設定し(ステップS46)、再びステ
ップS44において、その画素値の累算を行う。このよ
うな処理を繰り返し、ステップS45においてそのリフ
ァレンスブロックの全ての画素の累算が終了したことが
検出されたら、その時に変数sumに記憶されている値
が、そのリファレンスブロックの画素値の総和なので、
そのリファレンスブロックに対応付けて記憶する(ステ
ップS47)。
Next, it is checked whether or not all the pixels in the reference block have been added (step S45).
If all pixels have not been added yet, the next pixel is set as a pixel to be added (step S46), and the pixel values are again accumulated in step S44. Such processing is repeated, and when it is detected in step S45 that the accumulation of all the pixels of the reference block has been completed, the value stored in the variable sum at that time is the sum of the pixel values of the reference block. ,
The information is stored in association with the reference block (step S47).

【0031】そして、リファレンスフレームを分割して
形成された全てのブロックに対して総和を求める処理が
終了したか否かを検出し(ステップS48)、未だ全て
のブロックに対して処理が終了していなければ、次のブ
ロックをリファレンスブロックとして設定し(ステップ
S49)、再びステップS42〜ステップS47の処理
を繰り返す。ステップS48において、全てのブロック
に対して総和を求める処理が終了したと判定された場合
には、このリファレンスフレームの各ブロック総和を求
める処理を終了し(ステップS50)、メインルーチン
に戻る。
Then, it is detected whether or not the processing for obtaining the sum has been completed for all the blocks formed by dividing the reference frame (step S48), and the processing has been completed for all the blocks. If not, the next block is set as a reference block (step S49), and the processing of steps S42 to S47 is repeated again. If it is determined in step S48 that the process of obtaining the sum of all blocks has been completed, the process of obtaining the sum of each block of the reference frame ends (step S50), and the process returns to the main routine.

【0032】以下、再び図2のメインルーチンの処理に
ついて説明する。カレントフレームおよびリファレンス
フレームの全画像ブロックのブロック総和の算出が終了
したら、カレントフレームを分割して得られる複数のブ
ロックの中から最初のブロックをカレントブロックとし
て設定し(ステップS13)、以下、そのカレントブロ
ックに対する動きベクトル検出の処理に入る。まず初期
設定として、最小の評価値を記憶するための変数min
に、たとえばその変数が取り得る最大値などの予め定め
た十分大きな値を初期値としてセットする(ステップS
14)。次に、予め設定された複数の候補ベクトル(v
xi,vyi)(i=1〜m)の中の、最初の候補ベクトル
(vx1,vy1)を、評価値を求める対象の候補ベクトル
として設定する(ステップS15)。
Hereinafter, the processing of the main routine of FIG. 2 will be described again. When the calculation of the block sum of all the image blocks of the current frame and the reference frame is completed, the first block is set as a current block from a plurality of blocks obtained by dividing the current frame (step S13). The processing for motion vector detection for the block is started. First, as an initial setting, a variable min for storing the minimum evaluation value
, A predetermined sufficiently large value such as the maximum value that the variable can take is set as an initial value (step S
14). Next, a plurality of preset candidate vectors (v
xi , v yi ) (i = 1 to m), the first candidate vector (v x1 , v y1 ) is set as a candidate vector for which an evaluation value is to be obtained (step S15).

【0033】そして、その動き検出対象のカレントブロ
ック、および、ステップS15で設定された候補ベクト
ルに基づいてリファレンスブロックを決定し、ステップ
S11およびステップS12で既に求められているその
カレントブロックおよびリファレンスブロックに対する
ブロック総和の値を読み出し、その差分を求め変数di
ffに格納する(ステップS16)。次に、この差分d
iffがそれまでにそのカレントブロックに対して既に
検出されている候補ベクトルの評価値の最小値minよ
りも大きいか否かをチェックする(ステップS17)。
ブロック総和の差分diffの方が、既に検出されてい
る最小評価値minよりも大きい場合には、仮にこの候
補ベクトルに対して評価値を求めたとしても式4に示し
たように現在の最小評価値minよりも大きくなること
は明らかなので、この候補ベクトルに対する処理は中止
し、ステップS25以降の処理に移る。ステップS17
において、ブロック総和の差分diffが、既に検出さ
れている最小評価値min以下の場合には、この候補ベ
クトルに対して評価値を求める意義があるものとしてス
テップS18以降のその評価値を求める処理に移る。
Then, a reference block is determined based on the current block to be subjected to the motion detection and the candidate vector set in step S15, and the current block and the reference block already determined in steps S11 and S12 are determined. The value of the block sum is read, and the difference is obtained to obtain the variable di.
ff (step S16). Next, this difference d
It is checked whether or not iff is larger than the minimum value min of the evaluation value of the candidate vector already detected for the current block (step S17).
If the difference diff of the block sum is larger than the already detected minimum evaluation value min, even if an evaluation value is obtained for this candidate vector, the current minimum evaluation Since it is clear that the value becomes larger than the value min, the process for this candidate vector is stopped, and the process proceeds to step S25 and thereafter. Step S17
In the case where the difference diff of the block sum is equal to or smaller than the already detected minimum evaluation value min, it is determined that it is meaningful to obtain an evaluation value for this candidate vector. Move on.

【0034】評価値を求める処理においては、まず、ま
ず、累積値を記憶する変数sumの内容をリセットした
後(ステップS18)、カレントブロックの最初の画素
(本実施の形態においては左上の画素)を処理対象の画
素curr(x,y) としてセットする(ステップS19)。そ
して、そのカレントブロックの画素curr(x,y) と、その
curr(x,y) に対して候補ベクトル(vx ,vy )分だけ
動いた位置のリファレンスブロック上の画素ref(x+
x ,y+vy ) との差を求め、その差を変数sumに
既に記憶されている値に対して加算し、再び変数sum
に格納する(ステップS20)。そしてその変数sum
と変数minの値を比較し、変数sumに記憶されてい
る今回処理対象の候補ベクトルに対する現時点での評価
値が、変数minに記憶されているそれまでに処理した
各候補ベクトルにおける最小評価値以下か否か、すなわ
ちsum≧minか否かをチェックする(ステップS2
1)。
In the process of obtaining the evaluation value, first, after resetting the contents of the variable sum for storing the accumulated value (step S18), the first pixel of the current block (the upper left pixel in the present embodiment) Is set as the pixel to be processed curr (x, y) (step S19). And the pixel curr (x, y) of the current block and its
curr (x, y) candidate vectors for (v x, v y) an amount corresponding pixel on the reference block of the moved position ref (x +
v x , y + v y ), the difference is added to the value already stored in the variable sum, and the variable sum is calculated again.
(Step S20). And the variable sum
And the value of the variable min are compared, and the current evaluation value of the candidate vector to be processed currently stored in the variable sum is equal to or less than the minimum evaluation value of each candidate vector processed so far stored in the variable min. Whether or not sum ≧ min is checked (step S2).
1).

【0035】ステップS21においてsum≧minだ
った場合には、今回処理している候補ベクトルが求める
動きベクトルである可能性があるので、ステップS22
に移り、以後の画素について引き続き累算を求める処理
を継続する。すなわち、処理対象の画素がカレントブロ
ックの最後の画素(本実施の形態においては右下の画
素)か否かを調べながら(ステップS22)、最後の画
素でなければ処理対象の画素として次の画素をセットし
(ステップS23)、ステップS20およびステップS
21の処理を繰り返し行う。また、ステップS21にお
いてsum<minだった場合には、現在処理している
候補ベクトルについては、既に求める動きベクトルであ
る可能性は無いので、評価値を求める処理を中断して、
ステップS25以降の次の候補ベクトルに係わる処理に
移る。
If sum.gtoreq.min in step S21, the candidate vector being processed this time may be the motion vector to be obtained.
Then, the processing for obtaining the accumulation for the subsequent pixels is continued. That is, while checking whether the pixel to be processed is the last pixel (the lower right pixel in the present embodiment) of the current block (step S22), if it is not the last pixel, the next pixel is determined as the pixel to be processed. Is set (Step S23), and Step S20 and Step S20 are performed.
Step 21 is repeated. If sum <min in step S21, there is no possibility that the candidate vector currently being processed is a motion vector that has already been obtained.
The process proceeds to the process related to the next candidate vector after step S25.

【0036】ステップS21に示したようなチェックを
行いながら評価値の算出を行っていきステップS22に
おいてブロックの最後の画素まで累算が行えたと判断さ
れた場合には、既にステップS21で判定されているよ
うにその候補ベクトルに対する評価値はそれまでに求め
られている評価値以下であることになり、求める動きベ
クトルである可能性があるので、ステップ24において
これらの値を記憶する。すなわち、その評価値sumを
新たな最小評価値として変数minにセットし、その候
補ベクトルのx成分およびy成分を各々変数minvx
および変数minvyに格納する。
The evaluation value is calculated while performing the check shown in step S21. If it is determined in step S22 that the accumulation has been completed up to the last pixel of the block, the determination is already made in step S21. As described above, the evaluation value for the candidate vector is equal to or smaller than the evaluation value obtained so far, and there is a possibility that the motion vector is the motion vector to be obtained. That is, the evaluation value sum is set to a variable min as a new minimum evaluation value, and the x component and the y component of the candidate vector are respectively set to a variable minvx
And the variable minvy.

【0037】ステップS24におけるこのような得られ
た評価値に基づく処理が終了した場合、および、ステッ
プS17およびステップS21においてその候補ベクト
ルに対する処理が途中で中断された場合のいずれの場合
においても、ステップS25においてその候補ベクトル
が前述した複数の候補ベクトルの中の最後の候補ベクト
ルか否かを調べ(ステップS25)、最後の候補ベクト
ルでなければ評価対象の候補ベクトルとして次のベクト
ルを設定し(ステップS26)、再びステップS16〜
ステップS24の処理を繰り返す。ステップS25にお
いて、その候補ベクトルが最後の候補ベクトルだった場
合には、その時点で変数minvxおよび変数minv
yに記憶されている候補ベクトルが、そのカレントブロ
ックに対して検出された動きベクトルということにな
り、そのカレントブロックに対する処理は終了する。
When the processing based on the obtained evaluation value in step S24 is completed, and when the processing for the candidate vector is interrupted in steps S17 and S21, the step In S25, it is checked whether or not the candidate vector is the last candidate vector among the plurality of candidate vectors described above (step S25). If the last candidate vector is not the last candidate vector, the next vector is set as a candidate vector to be evaluated (step S25). S26), again from step S16
Step S24 is repeated. In step S25, if the candidate vector is the last candidate vector, the variables minvx and minvx are
The candidate vector stored in y is the motion vector detected for the current block, and the processing for the current block ends.

【0038】そして、そのカレントブロックが、カレン
トフレーム内の最後のブロックか否かを調べ(ステップ
S27)、最後のブロックでなければ動き検出対象のカ
レントブロックとして次のブロックを設定し(ステップ
S28)、再びステップS14〜ステップS26の処理
を繰り返す。ステップS27において、カレントブロッ
クがカレントフレーム内の最後のブロックだった場合に
は、そのカレントフレームに対する一連の処理を終了す
る(ステップS29)。
Then, it is checked whether or not the current block is the last block in the current frame (step S27). If the current block is not the last block, the next block is set as the current block for motion detection (step S28). , And repeat the processing of steps S14 to S26 again. If the current block is the last block in the current frame in step S27, a series of processes for the current frame is ended (step S29).

【0039】このように、本実施の形態の動き検出装置
および方法においては、カレントブロックとリファレン
スブロックの間の対応する画素同士の演算により候補ベ
クトルに対する評価値を求める前に、まずそのカレント
ブロックおよびリファレンスブロックの単純なブロック
内画素値総和に基づいて、求める評価値が既に検出され
ている評価値より小さくなるか否かを調べており、最小
評価値となる可能性のある場合のみ実際に評価値を求め
るようにしている。したがって、入れ子状態になって処
理量の多い画素同士の演算に入る前にある程度の判断を
して無意味な処理を排除しているので、従来の方法に比
べて処理量が大幅に削減でき、1つのカレントブロック
に対する動きベクトルの検出処理を非常に高速に行うこ
とができる。
As described above, in the motion detection apparatus and method according to the present embodiment, before calculating the evaluation value for the candidate vector by calculating the corresponding pixels between the current block and the reference block, the current block and the reference block are first obtained. Based on the simple sum of pixel values in the reference block, it is checked whether the desired evaluation value is smaller than the already detected evaluation value. I try to find the value. Therefore, since the nested state is performed and some meaningless processing is eliminated before the calculation of pixels having a large processing amount is started, the processing amount can be significantly reduced as compared with the conventional method. The motion vector detection processing for one current block can be performed very quickly.

【0040】さらに、本実施の形態においては、与えら
れたカレントフレームおよびリファレンスフレームに対
して、まず最初に抽出され得る画像ブロックのブロック
内画素値総和を一括して求めている。したがって、後の
各カレントブロックごとの処理の時にはそのブロック内
画素値総和を参照するのみでよく、ほとんど処理時間が
必要なくなり、効率的に動き検出処理が行える。また、
リファレンスブロックにおいては、複数のカレントブロ
ックおよび複数の候補ベクトルに対して何度も同じリフ
ァレンスブロックが参照されることがあるが、そのよう
な場合にもそのリファレンスブロックに対しては1度だ
けブロック内画素値総和を求めておけばよいので、フレ
ーム単位の動き検出処理は、より一層高速に行える。
Further, in the present embodiment, for a given current frame and reference frame, the sum of pixel values in a block of an image block that can be extracted first is collectively obtained. Therefore, at the time of subsequent processing for each current block, it is only necessary to refer to the sum of pixel values in that block, and almost no processing time is required, and the motion detection processing can be performed efficiently. Also,
In the reference block, the same reference block may be referred to many times for a plurality of current blocks and a plurality of candidate vectors. In such a case, the reference block is included only once in the block. Since the sum of the pixel values only needs to be obtained, the motion detection processing for each frame can be performed at higher speed.

【0041】なお、本発明は、本実施の形態に限られる
ものではなく、任意好適な改変が可能である。たとえ
ば、本実施の形態においては、カレントフレームおよび
リファレンスフレームを各々独立したものとして説明
し、各々ブロック総和を毎回求めるようにしているが、
たとえば入力される画像信号がMEPG方式(Moving Pi
cture coding Experts Groupによる高品質動画符号化方
式) の信号であり、前方予測や後方予測がある場合等に
は、ある処理におけるカレントフレームが他のカレント
フレームのリファレンスフレームとして参照される場合
がある。このような場合には、一度算出したブロック総
和のデータを保持しておくことにより、ブロック総和を
求める回数を減らすことができ、より高速に処理するこ
とができる。このような構成にしても、本発明の範囲内
であることは明らかである。
Note that the present invention is not limited to the present embodiment, and any suitable modifications can be made. For example, in the present embodiment, the current frame and the reference frame are described as being independent from each other, and the block sum is calculated each time.
For example, if an input image signal is an MPEG signal (Moving Pi
This is a signal of a high-quality moving picture coding system by the coding coding experts group, and when there is forward prediction or backward prediction, a current frame in a certain process may be referred to as a reference frame of another current frame. In such a case, by holding the data of the block sum calculated once, the number of times of obtaining the block sum can be reduced, and the processing can be performed at higher speed. Obviously, such a configuration is within the scope of the present invention.

【0042】また、本実施の形態においては、評価値を
求める際にカレントブロックとリファレンスブロックの
対応する画素同士の1度の演算が終了するごとに、その
累算値を最小の評価値と比較するようにしていた。しか
し、たとえば10画素ごとに比較を行うとか、1ライン
分ごとに比較を行うとかのように、任意の間隔で行って
もよい。比較を適切なタイミングで行うことにより、よ
り高速化を図ることができる。また、本実施の形態にお
いては、リファレンスフレームにおいては、1画素ある
いは1ラインずつずれた全ての画像ブロックに対してブ
ロック総和を求めるようにした。しかし、動きベクトル
の探索範囲が狭く限られている場合や、予測できる場合
など、全ての画像ブロックがリファレンスブロックとし
て参照される可能性の無い場合には、必要な画像ブロッ
クのみブロック総和を求めればよい。
Also, in this embodiment, every time one calculation between corresponding pixels of the current block and the reference block is completed, the accumulated value is compared with the minimum evaluation value when obtaining the evaluation value. I was trying to do it. However, the comparison may be performed at arbitrary intervals, for example, the comparison is performed every ten pixels or the comparison is performed every one line. By performing the comparison at an appropriate timing, a higher speed can be achieved. Further, in the present embodiment, in the reference frame, the block sum is obtained for all the image blocks shifted by one pixel or one line. However, when the search range of the motion vector is narrow and limited, or when prediction is possible, when there is no possibility that all image blocks are referred to as reference blocks, the block sum of only the necessary image blocks can be obtained. Good.

【0043】[0043]

【発明の効果】本発明の動き検出装置およびその方法に
よれば、高速に動き検出を行うことができる。
According to the motion detecting apparatus and method of the present invention, motion can be detected at high speed.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の一実施の形態の動き検出装置の構成を
示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a motion detection device according to an embodiment of the present invention.

【図2】図1に示した動き検出装置で行われる動き検出
処理を説明するためのフローチャートである。
FIG. 2 is a flowchart illustrating a motion detection process performed by the motion detection device illustrated in FIG. 1;

【図3】図2に示したフローチャート中の、カレントフ
レームの各ブロックの総和を求める処理をより詳細に説
明するためのフローチャートである。
FIG. 3 is a flowchart for explaining in more detail a process of obtaining a sum of each block of a current frame in the flowchart shown in FIG. 2;

【図4】図2に示したフローチャート中の、リファレン
スフレームの各ブロックの総和を求める処理をより詳細
に説明するためのフローチャートである。
FIG. 4 is a flowchart for explaining in more detail a process of calculating the sum of each block of a reference frame in the flowchart shown in FIG. 2;

【図5】ブロックマッチングアルゴリズムを説明するた
めの図である。
FIG. 5 is a diagram for explaining a block matching algorithm.

【図6】従来の動き検出処理を説明するためのフローチ
ャートである。
FIG. 6 is a flowchart for explaining a conventional motion detection process.

【図7】図6に示した処理を改善した動き検出処理を説
明するためのフローチャートである。
FIG. 7 is a flowchart illustrating a motion detection process in which the process illustrated in FIG. 6 is improved.

【符号の説明】[Explanation of symbols]

1…動き検出装置、2…CPU、3…ROM、4…RA
DESCRIPTION OF SYMBOLS 1 ... Motion detection device, 2 ... CPU, 3 ... ROM, 4 ... RA
M

Claims (8)

【特許請求の範囲】[Claims] 【請求項1】動き検出対象の画像を分割して得られる第
1の画像ブロックに対して、参照画像を参照して動きベ
クトルを検出する動き検出装置であって、 予め定めた複数の候補ベクトルより、順次1つを選択す
る候補ベクトル選択手段と、 前記第1の画像ブロックおよび前記選択された候補ベク
トルに基づいて、前記参照画像上において第2の画像ブ
ロックを抽出する参照ブロック抽出手段と、 前記第1の画像ブロックの画素値の総和を検出する第1
の総和検出手段と、 前記第2の画像ブロックの画素値の総和を検出する第2
の総和検出手段と、 前記検出された第1の画像ブロックの画素値の総和、お
よび、前記検出された第2の画像ブロックの画素値の総
和の差を検出する総和差検出手段と、 前記検出された総和の差と、設定された最小評価値とを
比較する第1の比較手段と、 前記比較の結果、前記検出された総和の差が前記最小評
価値よりも少なくとも小さい場合に、前記第1の画像ブ
ロックと前記第2の画像ブロックの対応する画素同士の
画素値の差分の総和を、前記選択された候補ベクトルに
対する評価値して検出する評価値検出手段と、 前記検出された評価値と、前記候補ベクトル選択手段に
おいて既に選択された候補ベクトルに対して既に検出さ
れた評価値とを比較する第2の比較手段と、 前記比較の結果、前記検出された評価値が前記既に検出
された評価値の中で最小であった場合に、前記選択され
た候補ベクトルを記憶し、当該評価値を前記最小評価値
として設定する記憶手段と、 前記候補ベクトル選択手段に予め定められていた複数の
候補ベクトル全てが選択された後に、前記記憶手段に記
憶されている前記候補ベクトルを、当該第1の画像ブロ
ックに対する動きベクトルとして出力する出力手段とを
有する動き検出装置。
1. A motion detecting apparatus for detecting a motion vector by referring to a reference image for a first image block obtained by dividing a motion detection target image, comprising a plurality of predetermined candidate vectors. A candidate vector selecting unit that sequentially selects one; a reference block extracting unit that extracts a second image block on the reference image based on the first image block and the selected candidate vector; A first step of detecting a sum of pixel values of the first image block;
And a second sum detecting means for detecting a sum of pixel values of the second image block.
Sum detection means for detecting a difference between the sum of the detected pixel values of the first image block and the sum of the pixel values of the detected second image block; First comparing means for comparing the difference between the sums thus set and the set minimum evaluation value; and as a result of the comparison, when the detected difference between the sums is at least smaller than the minimum evaluation value, Evaluation value detection means for detecting the sum of differences between pixel values of corresponding pixels of the first image block and the second image block as an evaluation value for the selected candidate vector; and the detected evaluation value And second comparing means for comparing an evaluation value already detected with respect to the candidate vector already selected by the candidate vector selecting means; and, as a result of the comparison, the detected evaluation value Storage means for storing the selected candidate vector when the evaluation value is the smallest among the evaluation values, and setting the evaluation value as the minimum evaluation value; and Output means for outputting the candidate vector stored in the storage means as a motion vector for the first image block after all the candidate vectors are selected.
【請求項2】前記動き検出対象の画像を分割して得られ
る複数の画像ブロックの各々に対して、前記候補ベクト
ル選択手段に予め定められている複数の候補ベクトルを
適用して前記第2の画像ブロックを決定した場合に、該
第2の画像ブロックとなり得る前記参照画像上の全ての
画像ブロックについて、画素値の総和を予め求める参照
ブロック総和算出手段をさらに有し、 前記第2の総和検出手段は、前記参照ブロック抽出手段
において抽出される前記第2の画像ブロックに対して、
前記参照ブロック総和算出手段において予め求められて
いる当該第2の画像ブロックの画素値の総和を参照する
ことにより、当該第2の画像ブロックの画素値の総和を
検出する請求項1記載の動き検出装置。
2. The method according to claim 2, wherein said plurality of candidate vectors predetermined by said candidate vector selecting means are applied to each of a plurality of image blocks obtained by dividing said motion detection target image. When the image block is determined, the image processing apparatus further includes a reference block total calculation unit that previously obtains a total of pixel values for all image blocks on the reference image that can be the second image block. Means for the second image block extracted by the reference block extraction means,
The motion detection according to claim 1, wherein the reference block sum calculating means detects the sum of the pixel values of the second image block by referring to the sum of the pixel values of the second image block obtained in advance. apparatus.
【請求項3】前記参照ブロック総和算出手段は、前記第
1の画像ブロックと同一の画素構成であり、前記参照画
像上から得られる全ての画像ブロックについて、前記画
素値の総和を予め求める請求項2記載の動き検出装置。
3. The reference block sum calculating means has the same pixel configuration as that of the first image block, and obtains the sum of the pixel values in advance for all image blocks obtained from the reference image. 3. The motion detection device according to 2.
【請求項4】前記動き検出対象の画像を分割して得られ
る複数の画像ブロックの各々について、画素値の総和を
予め求める動き検出対象ブロック総和算出手段をさらに
有し、 前記第1の総和検出手段は、前記第1の画像ブロックに
ついて、前記動き検出対象ブロック総和算出手段におい
て予め求められている当該第1の画像ブロックの画素値
の総和を参照することにより、当該第1の画像ブロック
の画素値の総和を検出する請求項3記載の動き検出装
置。
4. A motion detection target block sum calculating means for previously calculating a sum of pixel values for each of a plurality of image blocks obtained by dividing the motion detection target image; Means for the first image block, by referring to the sum of the pixel values of the first image block obtained in advance by the motion detection target block sum calculation means, 4. The motion detection device according to claim 3, wherein the sum of the values is detected.
【請求項5】前記評価値検出手段は、実質的に式1に示
されるような値MEを前記評価値として求める請求項4
記載の動き検出装置。 【数1】
5. The evaluation value detecting means obtains a value ME substantially as shown in Expression 1 as the evaluation value.
The motion detection device according to claim 1. (Equation 1)
【請求項6】動き検出対象の画像を所定の画素構成の領
域に分割して得られる第1の画像ブロックと、参照画像
中の画像ブロックであって与えられた候補ベクトルに基
づいて前記第1の画像ブロックの位置に対して決定され
る前記第1の画像ブロックと同じ画素構成の第2の画像
ブロックとの、対応する画素同士の差分の総和を求め、
該総和を前記候補ベクトルに対する評価値とし、予め定
めた複数の候補ベクトルより前記評価値の最も小さい候
補ベクトルを前記第1の画像ブロックに対する動きベク
トルとして検出する動き検出方法であって、 前記第1の画像ブロックの画素値の総和を求め、 前記第2の画像ブロックの画素値の総和を求め、 前記第1の画像ブロックの画素値の総和、および、前記
第2の画像ブロックの画素値の総和との差を求め、 前記求められた差が、それまでに与えられた候補ベクト
ルについて算出された前記評価値よりも小さいか否かを
判定し、 前記判定結果、前記評価値が小さい場合に当該候補ベク
トルに対する前記評価値の計算を行う動き検出方法。
6. A first image block obtained by dividing a motion detection target image into a region having a predetermined pixel configuration, and the first image block based on a given candidate vector which is an image block in a reference image. Sum of differences between corresponding pixels of the first image block and the second image block having the same pixel configuration determined for the position of the image block of
A motion detection method, wherein the sum is used as an evaluation value for the candidate vector, and a candidate vector having the smallest evaluation value from a plurality of predetermined candidate vectors is detected as a motion vector for the first image block. The sum of the pixel values of the second image block, the sum of the pixel values of the second image block, and the sum of the pixel values of the second image block It is determined whether or not the obtained difference is smaller than the evaluation value calculated for the candidate vector given so far. A motion detection method for calculating the evaluation value for a candidate vector.
【請求項7】前記動き検出対象の画像を分割して得られ
る複数の画像ブロックの各々に対して、前記予め定めた
複数の候補ベクトルに基づいて前記第2の画像ブロック
を決定した場合に、該第2の画像ブロックとなり得る前
記参照画像中の全ての画像ブロックについて、画素値の
総和を予め求めておき、 前記第1の画像ブロックおよび前記候補ベクトルが与え
られたことに伴って前記第2の画像ブロックが決定され
た場合には、前記予め求められた当該第2の画像ブロッ
クの画素値の総和を参照することにより、前記第1の画
像ブロックの画素値の総和との差を求める請求項6記載
の動き検出方法。
7. When the second image block is determined based on the plurality of predetermined candidate vectors for each of a plurality of image blocks obtained by dividing the motion detection target image, For all image blocks in the reference image that can be the second image block, the sum of pixel values is obtained in advance, and the second image block and the second When the image block of the first image block is determined, a difference from the total of the pixel values of the first image block is determined by referring to the previously calculated total of the pixel values of the second image block. Item 7. The motion detection method according to Item 6.
【請求項8】前記動き検出対象の画像を分割して得られ
る複数の画像ブロックの各々について、画素値の総和を
予め求めておき、 前記第1の画像ブロックについて、与えられた候補ベク
トルにより前記第2の画像ブロックが決定された場合に
は、前記予め求められた当該第1の画像ブロックの画素
値の総和を参照することにより、前記第2の画像ブロッ
クの画素値の総和との差を求める請求項7記載の動き検
出方法。
8. A sum of pixel values is obtained in advance for each of a plurality of image blocks obtained by dividing the motion detection target image, and for the first image block, a given candidate vector is used. When the second image block is determined, the difference from the sum of the pixel values of the second image block is determined by referring to the previously calculated sum of the pixel values of the first image block. 8. The motion detection method according to claim 7, wherein the motion is obtained.
JP28551896A 1996-10-28 1996-10-28 Motion detection apparatus and method Expired - Fee Related JP3747534B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP28551896A JP3747534B2 (en) 1996-10-28 1996-10-28 Motion detection apparatus and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP28551896A JP3747534B2 (en) 1996-10-28 1996-10-28 Motion detection apparatus and method

Publications (2)

Publication Number Publication Date
JPH10136373A true JPH10136373A (en) 1998-05-22
JP3747534B2 JP3747534B2 (en) 2006-02-22

Family

ID=17692578

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28551896A Expired - Fee Related JP3747534B2 (en) 1996-10-28 1996-10-28 Motion detection apparatus and method

Country Status (1)

Country Link
JP (1) JP3747534B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6618441B1 (en) 1999-11-11 2003-09-09 Nec Corporation Motion vector detection apparatus
JP2006229927A (en) * 2005-02-15 2006-08-31 Ind Technol Res Inst Method for coding mode selection of intra prediction in video compression

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6618441B1 (en) 1999-11-11 2003-09-09 Nec Corporation Motion vector detection apparatus
JP2006229927A (en) * 2005-02-15 2006-08-31 Ind Technol Res Inst Method for coding mode selection of intra prediction in video compression
JP4555758B2 (en) * 2005-02-15 2010-10-06 インダストリアル テクノロジー リサーチ インスティテュート Coding mode selection method for intra prediction in video compression

Also Published As

Publication number Publication date
JP3747534B2 (en) 2006-02-22

Similar Documents

Publication Publication Date Title
KR100591470B1 (en) Detection of transitions in video sequences
JP3576987B2 (en) Image template matching method and image processing apparatus
US20060126942A1 (en) Method of and apparatus for retrieving movie image
EP0624981B1 (en) Motion vector detecting circuit
CN115984307A (en) Video object segmentation method and device, electronic equipment and storage medium
US20060098886A1 (en) Efficient predictive image parameter estimation
US6671321B1 (en) Motion vector detection device and motion vector detection method
US7840068B2 (en) System and method for video processing by image segmentation
CN116266387A (en) YOLOV4 image recognition algorithm and system based on re-parameterized residual error structure and coordinate attention mechanism
JP4632830B2 (en) Image search method and image search apparatus
JP2003123074A (en) Moving object detector, moving object detection method and moving object detection program
JPH10136373A (en) Motion detector and method therefor
US10748292B2 (en) Image signal detection device
JPH089379A (en) Motion vector detection method
JP4082664B2 (en) Video search device
JP3175914B2 (en) Image encoding method and image encoding device
JP5683153B2 (en) Image processing apparatus and image processing method
JP2001285874A (en) Device for searching motion vector, its method and recording medium for recording program
CN112749660A (en) Method and equipment for generating video content description information
JP2009059047A (en) Device, method and program for detecting object
JP2004229150A (en) Motion vector searching method and device
JPH11120351A (en) Image matching device and storage medium to store image matching program
CN114339156B (en) Video stream frame rate adjusting method, device, equipment and readable storage medium
JP3941900B2 (en) Motion vector detection device
US6810134B2 (en) Method, system and apparatus for choosing an optimal candidate value for block matching

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050913

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051013

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051121

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

Free format text: PAYMENT UNTIL: 20091209

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees